Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

54 changes: 0 additions & 54 deletions .eslintrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist/
assets/
.next/
.rollup.cache/
pnpm-lock.yaml

# Files
README.md
README.md
65 changes: 65 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintReact from "@eslint-react/eslint-plugin";
import prettierRecommended from "eslint-plugin-prettier/recommended";
import globals from "globals";

export default [
{
ignores: [
"dist/**",
"assets/**",
"styles/**",
".next/**",
".rollup.cache/**",
"node_modules/**",
"next-env.d.ts"
]
},
js.configs.recommended,
...tseslint.configs.recommended,
eslintReact.configs.recommended,
{
files: ["**/*.{js,jsx,ts,tsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parserOptions: {
ecmaFeatures: { jsx: true }
},
globals: {
...globals.browser,
...globals.node,
...globals.es2021
}
},
settings: {
"react-x": { version: "19" }
},
rules: {
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"@typescript-eslint/no-var-requires": "off"
}
},
{
files: [
"*.js",
"*.cjs",
"rollup.config.js",
"tailwind.config.js",
"postcss.config.js",
"next.config.js"
],
rules: {
"@typescript-eslint/no-require-imports": "off"
}
},
prettierRecommended,
{
rules: {
"prettier/prettier": ["error", { endOfLine: "auto" }, { usePrettierrc: true }]
}
}
];
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"watch": "rollup -c -w",
"clean": "rm -rf dist",
"lint": "eslint --ignore-path .gitignore .",
"lint:fix": "eslint --ignore-path .gitignore --fix .",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"pret": "prettier -c .",
"pret:fix": "prettier --ignore-path .gitignore --config ./.prettierrc --write './**/*.{js,jsx,ts,tsx,css,md,json}'",
"code-style": "npm run pret && npm run lint",
Expand Down Expand Up @@ -39,33 +39,33 @@
],
"peerDependencies": {
"dayjs": "^1.11.6",
"react": "^17.0.2 || ^18.2.0"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-typescript": "^11.0.0",
"@tailwindcss/forms": "^0.5.3",
"@types/node": "18.14.5",
"@types/react": "^18.0.21",
"@types/react": "^19.0.2",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "^10.4.13",
"dayjs": "^1.11.7",
"eslint": "^8.29.0",
"eslint-config-next": "^13.1.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"@eslint-react/eslint-plugin": "catalog:",
"eslint": "catalog:",
"eslint-config-next": "^16.2.6",
"eslint-config-prettier": "catalog:",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-import": "^2.32.0",
"husky": "^8.0.0",
"lint-staged": "^13.2.3",
"next": "^13.1.1",
"next": "16.2.6",
"postcss": "^8.4.19",
"prettier": "^2.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rollup": "^2.77.2",
"tailwindcss": "^3.2.4",
"tslib": "^2.4.0",
Expand Down
16 changes: 16 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default function Playground() {
const [newDisabledDates, setNewDisabledDates] = useState({ startDate: "", endDate: "" });
const [startFrom, setStartFrom] = useState("2023-03-01");
const [startWeekOn, setStartWeekOn] = useState("");
const [inline, setInline] = useState(false);

const handleChange = (value, e) => {
setValue(value);
Expand Down Expand Up @@ -113,6 +114,7 @@ export default function Playground() {
return isEmpty ? "Select Date" : "Clear";
}}
popoverDirection={"down"}
inline={inline}
// classNames={{
// input: ({ disabled, readOnly, className }) => {
// if (disabled) {
Expand Down Expand Up @@ -215,6 +217,20 @@ export default function Playground() {
</label>
</div>
</div>
<div className="mb-2 w-1/2 sm:w-full">
<div className="inline-flex items-center">
<input
type="checkbox"
className="mr-2 rounded"
id="inline"
checked={inline}
onChange={e => setInline(e.target.checked)}
/>
<label className="block" htmlFor="inline">
Inline
</label>
</div>
</div>
</div>
<div className="w-full sm:w-1/3 pr-2 flex flex-col">
<div className="mb-2">
Expand Down
Loading