@daryasidorovich/modsen-datepicker 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +302 -302
- package/package.json +111 -106
- package/.babelrc.json +0 -7
- package/.github/workflows/chromatic.yml +0 -25
- package/.github/workflows/ci.yml +0 -56
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/.prettierignore +0 -16
- package/.prettierrc +0 -6
- package/.storybook/main.js +0 -93
- package/.storybook/preview-head.html +0 -6
- package/.storybook/preview.js +0 -26
- package/.storybook/preview.tsx +0 -18
- package/commitlint.config.js +0 -23
- package/eslint.config.ts +0 -80
- package/jest.config.json +0 -21
- package/rollup.config.js +0 -65
- package/src/assets/actions/Delete.svg +0 -4
- package/src/assets/actions/Edit.svg +0 -3
- package/src/assets/arrows/Next.svg +0 -4
- package/src/assets/arrows/Prev.svg +0 -4
- package/src/assets/input/Calendar.svg +0 -3
- package/src/assets/input/Clear.svg +0 -3
- package/src/components/BaseCalendar/BaseCalendar.stories.tsx +0 -77
- package/src/components/BaseCalendar/index.tsx +0 -63
- package/src/components/BaseCalendar/styles.module.scss +0 -15
- package/src/components/CalendarGrid/CalendarGrid.stories.tsx +0 -136
- package/src/components/CalendarGrid/CalendarGridWithTasks/Tooltip/index.tsx +0 -27
- package/src/components/CalendarGrid/CalendarGridWithTasks/Tooltip/styles.module.scss +0 -9
- package/src/components/CalendarGrid/CalendarGridWithTasks/index.tsx +0 -51
- package/src/components/CalendarGrid/CalendarGridWithoutTasks/CalendarGridWithoutTasks.test.tsx +0 -223
- package/src/components/CalendarGrid/CalendarGridWithoutTasks/index.tsx +0 -36
- package/src/components/CalendarGrid/CalendarGridWithoutTasks/styles.module.scss +0 -11
- package/src/components/CalendarGrid/index.tsx +0 -19
- package/src/components/CalendarGrid/types.ts +0 -26
- package/src/components/Clear/Clear.stories.tsx +0 -16
- package/src/components/Clear/index.tsx +0 -12
- package/src/components/Clear/styles.module.scss +0 -34
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -127
- package/src/components/DatePicker/index.tsx +0 -72
- package/src/components/DatePicker/styles.module.scss +0 -10
- package/src/components/Day/Day.stories.tsx +0 -75
- package/src/components/Day/index.tsx +0 -95
- package/src/components/Day/styles.module.scss +0 -97
- package/src/components/Input/Input.stories.tsx +0 -37
- package/src/components/Input/index.tsx +0 -64
- package/src/components/Input/styles.module.scss +0 -79
- package/src/components/Modal/CrudModal/index.tsx +0 -43
- package/src/components/Modal/CrudModal/styles.module.scss +0 -44
- package/src/components/Modal/index.tsx +0 -66
- package/src/components/Modal/styles.module.scss +0 -40
- package/src/components/Modal/types.ts +0 -13
- package/src/components/Month/Month.stories.tsx +0 -19
- package/src/components/Month/index.tsx +0 -31
- package/src/components/Month/styles.module.scss +0 -30
- package/src/components/RangePicker/RangePicker.stories.tsx +0 -134
- package/src/components/RangePicker/index.tsx +0 -144
- package/src/components/RangePicker/styles.module.scss +0 -19
- package/src/components/TasksManager/AddModal/index.tsx +0 -62
- package/src/components/TasksManager/DeleteModal/index.tsx +0 -22
- package/src/components/TasksManager/EditModal/index.tsx +0 -96
- package/src/components/TasksManager/index.tsx +0 -112
- package/src/components/TasksManager/styles.module.scss +0 -62
- package/src/components/Week/Week.stories.tsx +0 -49
- package/src/components/Week/index.tsx +0 -68
- package/src/components/Week/styles.module.scss +0 -7
- package/src/components/WeekDay/WeekDay.stories.tsx +0 -38
- package/src/components/WeekDay/index.tsx +0 -35
- package/src/components/WeekDay/styles.module.scss +0 -19
- package/src/constants/dateMask.ts +0 -23
- package/src/constants/firstDayOfWeek.ts +0 -7
- package/src/constants/holidays.ts +0 -32
- package/src/constants/modes.ts +0 -6
- package/src/constants/monthsNames.ts +0 -14
- package/src/constants/weekdaysNames.ts +0 -1
- package/src/hooks/useCalendar.ts +0 -62
- package/src/hooks/useLockBodyScroll.ts +0 -19
- package/src/hooks/useModal.ts +0 -45
- package/src/hooks/useTooltip.ts +0 -41
- package/src/hooks/useValidate.ts +0 -80
- package/src/index.ts +0 -15
- package/src/services/calendarService.ts +0 -62
- package/src/services/decorators/withHolidays.test.ts +0 -64
- package/src/services/decorators/withHolidays.ts +0 -12
- package/src/services/decorators/withMinMax.test.ts +0 -77
- package/src/services/decorators/withMinMax.ts +0 -19
- package/src/services/holidayService.ts +0 -56
- package/src/setupTests.ts +0 -1
- package/src/store/localStorage.ts +0 -33
- package/src/store/tasksStore.test.tsx +0 -208
- package/src/store/tasksStore.tsx +0 -146
- package/src/store/types.ts +0 -22
- package/src/styles/_border.scss +0 -9
- package/src/styles/_colors.scss +0 -53
- package/src/styles/_gap.scss +0 -4
- package/src/styles/_globals.scss +0 -61
- package/src/styles/_grid.scss +0 -9
- package/src/styles/_mixins.scss +0 -6
- package/src/styles/_reset.scss +0 -98
- package/src/styles/_theme-mixins.scss +0 -51
- package/src/styles/_typography.scss +0 -10
- package/src/styles/_variables.scss +0 -8
- package/src/styles/main.scss +0 -3
- package/src/types/types.d.ts +0 -15
- package/src/utils/calendar.test.ts +0 -154
- package/src/utils/calendar.ts +0 -82
- package/src/utils/controlDate.ts +0 -3
- package/src/utils/dateChecks.test.ts +0 -216
- package/src/utils/dateChecks.ts +0 -75
- package/src/utils/formatDate.test.ts +0 -57
- package/src/utils/formatDate.ts +0 -27
- package/src/utils/schema.test.ts +0 -40
- package/src/utils/schema.ts +0 -8
- package/src/utils/weekdayOrder.test.ts +0 -11
- package/src/utils/weekdayOrder.ts +0 -7
- package/tsconfig.json +0 -31
- package/vitest.config.ts +0 -38
- package/vitest.shims.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,106 +1,111 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@daryasidorovich/modsen-datepicker",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.esm.js",
|
|
7
|
-
"typings": "types.d.ts",
|
|
8
|
-
"style": "index.css",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"eslint
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@daryasidorovich/modsen-datepicker",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"typings": "types.d.ts",
|
|
8
|
+
"style": "index.css",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"docs",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"clean": "rimraf dist lib",
|
|
16
|
+
"build": "npm run clean && rollup -c --bundleConfigAsCjs",
|
|
17
|
+
"pack": "npm run build && npm pack",
|
|
18
|
+
"dev": "rollup -c -w",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build",
|
|
21
|
+
"lint": "eslint src/ --ext .ts,.tsx",
|
|
22
|
+
"lint:fix": "eslint src/ --ext .ts,.tsx --fix",
|
|
23
|
+
"format": "prettier . --write",
|
|
24
|
+
"format:check": "prettier . --check",
|
|
25
|
+
"test": "jest",
|
|
26
|
+
"test:watch": "jest --watch",
|
|
27
|
+
"test:coverage": "jest --coverage",
|
|
28
|
+
"chromatic": "npx chromatic --project-token=chpt_0fa93e1434c19df",
|
|
29
|
+
"prepare": "husky"
|
|
30
|
+
},
|
|
31
|
+
"lint-staged": {
|
|
32
|
+
"src/**/*.{js,jsx,ts,tsx}": [
|
|
33
|
+
"eslint --fix",
|
|
34
|
+
"prettier --write"
|
|
35
|
+
],
|
|
36
|
+
"src/**/*.{scss,css}": [
|
|
37
|
+
"prettier --write"
|
|
38
|
+
],
|
|
39
|
+
"*.{js,cjs}": [
|
|
40
|
+
"prettier --write"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"keywords": [],
|
|
44
|
+
"author": "",
|
|
45
|
+
"license": "ISC",
|
|
46
|
+
"type": "module",
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@babel/preset-env": "^7.29.7",
|
|
49
|
+
"@babel/preset-react": "^7.29.7",
|
|
50
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
51
|
+
"@chromatic-com/storybook": "latest",
|
|
52
|
+
"@commitlint/cli": "^21.2.2",
|
|
53
|
+
"@commitlint/config-conventional": "^21.2.2",
|
|
54
|
+
"@eslint/js": "^9.7.0",
|
|
55
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
56
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
57
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
58
|
+
"@storybook/addon-a11y": "^10.5.10",
|
|
59
|
+
"@storybook/addon-docs": "^10.5.10",
|
|
60
|
+
"@storybook/addon-themes": "^10.5.10",
|
|
61
|
+
"@storybook/addon-vitest": "^10.5.10",
|
|
62
|
+
"@storybook/react-vite": "^10.5.10",
|
|
63
|
+
"@svgr/rollup": "^8.1.0",
|
|
64
|
+
"@testing-library/dom": "^10.4.1",
|
|
65
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
66
|
+
"@testing-library/react": "^16.3.2",
|
|
67
|
+
"@testing-library/user-event": "^14.6.5",
|
|
68
|
+
"@types/jest": "^30.0.0",
|
|
69
|
+
"@types/react": "^18.2.0",
|
|
70
|
+
"@types/react-dom": "^18.2.0",
|
|
71
|
+
"@vitest/browser-playwright": "latest",
|
|
72
|
+
"@vitest/coverage-v8": "latest",
|
|
73
|
+
"chromatic": "^18.5.0",
|
|
74
|
+
"classnames": "^2.5.1",
|
|
75
|
+
"eslint": "^9.7.0",
|
|
76
|
+
"eslint-plugin-import": "^2.32.0",
|
|
77
|
+
"eslint-plugin-react": "^7.37.5",
|
|
78
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
79
|
+
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
80
|
+
"eslint-plugin-storybook": "^10.5.10",
|
|
81
|
+
"globals": "^17.11.0",
|
|
82
|
+
"husky": "^9.1.7",
|
|
83
|
+
"identity-obj-proxy": "^3.0.0",
|
|
84
|
+
"jest": "^30.4.2",
|
|
85
|
+
"jest-environment-jsdom": "^30.4.1",
|
|
86
|
+
"jiti": "^2.7.0",
|
|
87
|
+
"lint-staged": "^16.4.0",
|
|
88
|
+
"playwright": "latest",
|
|
89
|
+
"postcss": "^8.5.26",
|
|
90
|
+
"prettier": "3.9.6",
|
|
91
|
+
"react": "^19.2.8",
|
|
92
|
+
"react-dom": "^19.2.8",
|
|
93
|
+
"rimraf": "^6.1.3",
|
|
94
|
+
"rollup": "^2.80.0",
|
|
95
|
+
"rollup-plugin-babel": "^4.4.0",
|
|
96
|
+
"rollup-plugin-styles": "^4.0.0",
|
|
97
|
+
"sass": "^1.103.1",
|
|
98
|
+
"storybook": "^10.5.10",
|
|
99
|
+
"typescript": "^5.6.2",
|
|
100
|
+
"typescript-eslint": "^8.0.0",
|
|
101
|
+
"vite-plugin-svgr": "^5.2.0",
|
|
102
|
+
"vitest": "latest"
|
|
103
|
+
},
|
|
104
|
+
"dependencies": {
|
|
105
|
+
"@hookform/resolvers": "^5.9.1",
|
|
106
|
+
"react-hook-form": "^7.87.0",
|
|
107
|
+
"react-imask": "^7.6.1",
|
|
108
|
+
"tslib": "^2.8.1",
|
|
109
|
+
"zod": "^4.5.4"
|
|
110
|
+
}
|
|
111
|
+
}
|
package/.babelrc.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: 'Chromatic'
|
|
2
|
-
|
|
3
|
-
on: push
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
chromatic:
|
|
7
|
-
name: Run Chromatic
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- name: Checkout code
|
|
11
|
-
uses: actions/checkout@v7
|
|
12
|
-
with:
|
|
13
|
-
fetch-depth: 0
|
|
14
|
-
- uses: actions/setup-node@v7
|
|
15
|
-
with:
|
|
16
|
-
node-version: 24.19.0
|
|
17
|
-
- name: Install dependencies
|
|
18
|
-
run: npm ci
|
|
19
|
-
- name: Run Chromatic
|
|
20
|
-
uses: chromaui/action@latest
|
|
21
|
-
with:
|
|
22
|
-
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
23
|
-
env:
|
|
24
|
-
STORYBOOK_HOLIDAY_API_KEY: ${{ secrets.STORYBOOK_HOLIDAY_API_KEY }}
|
|
25
|
-
STORYBOOK_HOLIDAY_API_URL: ${{ secrets.STORYBOOK_HOLIDAY_API_URL }}
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
name: CI for datepicker
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main, dev]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main, dev]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
lint:
|
|
11
|
-
name: Lint
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v7
|
|
15
|
-
- uses: actions/setup-node@v7
|
|
16
|
-
with:
|
|
17
|
-
node-version: 24.19.0
|
|
18
|
-
cache: 'npm'
|
|
19
|
-
- run: npm ci
|
|
20
|
-
- run: npm run lint
|
|
21
|
-
|
|
22
|
-
format:
|
|
23
|
-
name: Format
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
steps:
|
|
26
|
-
- uses: actions/checkout@v7
|
|
27
|
-
- uses: actions/setup-node@v7
|
|
28
|
-
with:
|
|
29
|
-
node-version: 24.19.0
|
|
30
|
-
cache: 'npm'
|
|
31
|
-
- run: npm ci
|
|
32
|
-
- run: npm run format:check
|
|
33
|
-
|
|
34
|
-
test:
|
|
35
|
-
name: Test
|
|
36
|
-
runs-on: ubuntu-latest
|
|
37
|
-
steps:
|
|
38
|
-
- uses: actions/checkout@v7
|
|
39
|
-
- uses: actions/setup-node@v7
|
|
40
|
-
with:
|
|
41
|
-
node-version: 24.19.0
|
|
42
|
-
cache: 'npm'
|
|
43
|
-
- run: npm ci
|
|
44
|
-
- run: npm test
|
|
45
|
-
|
|
46
|
-
build:
|
|
47
|
-
name: Build
|
|
48
|
-
runs-on: ubuntu-latest
|
|
49
|
-
steps:
|
|
50
|
-
- uses: actions/checkout@v7
|
|
51
|
-
- uses: actions/setup-node@v7
|
|
52
|
-
with:
|
|
53
|
-
node-version: 24.19.0
|
|
54
|
-
cache: 'npm'
|
|
55
|
-
- run: npm ci
|
|
56
|
-
- run: npm run build
|
package/.husky/commit-msg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx commitlint --edit "$1"
|
package/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx lint-staged
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/.storybook/main.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/** @type { import('@storybook/react-vite').StorybookConfig } */
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import svgr from 'vite-plugin-svgr';
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = path.dirname(__filename);
|
|
7
|
-
|
|
8
|
-
const config = {
|
|
9
|
-
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
10
|
-
addons: [
|
|
11
|
-
'@storybook/addon-themes',
|
|
12
|
-
'@storybook/addon-vitest',
|
|
13
|
-
'@storybook/addon-a11y',
|
|
14
|
-
'@storybook/addon-docs',
|
|
15
|
-
],
|
|
16
|
-
framework: {
|
|
17
|
-
name: '@storybook/react-vite',
|
|
18
|
-
options: {},
|
|
19
|
-
},
|
|
20
|
-
docs: {
|
|
21
|
-
autodocs: true,
|
|
22
|
-
},
|
|
23
|
-
typescript: {
|
|
24
|
-
check: false,
|
|
25
|
-
reactDocgen: 'react-docgen-typescript',
|
|
26
|
-
},
|
|
27
|
-
async viteFinal(config) {
|
|
28
|
-
config.optimizeDeps = {
|
|
29
|
-
include: ['react', 'react-dom'],
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
config.plugins = config.plugins || [];
|
|
33
|
-
config.plugins.push(
|
|
34
|
-
svgr({
|
|
35
|
-
include: '**/*.svg?react',
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
config.css = {
|
|
40
|
-
modules: {
|
|
41
|
-
localsConvention: 'camelCase',
|
|
42
|
-
},
|
|
43
|
-
preprocessorOptions: {
|
|
44
|
-
scss: {
|
|
45
|
-
additionalData: `
|
|
46
|
-
@use "@styles/variables" as *;
|
|
47
|
-
@use "@styles/border" as *;
|
|
48
|
-
@use "@styles/mixins" as *;
|
|
49
|
-
@use "@styles/theme-mixins" as *;
|
|
50
|
-
@use "@styles/colors" as *;
|
|
51
|
-
@use "@styles/typography" as *;
|
|
52
|
-
@use "@styles/gap" as *;
|
|
53
|
-
`,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
config.define = {
|
|
59
|
-
...config.define,
|
|
60
|
-
'process.env.STORYBOOK_HOLIDAY_API_KEY': JSON.stringify(
|
|
61
|
-
process.env.STORYBOOK_HOLIDAY_API_KEY
|
|
62
|
-
),
|
|
63
|
-
'process.env.STORYBOOK_HOLIDAY_API_URL': JSON.stringify(
|
|
64
|
-
process.env.STORYBOOK_HOLIDAY_API_URL
|
|
65
|
-
),
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
config.resolve = {
|
|
69
|
-
alias: {
|
|
70
|
-
'@': path.resolve(__dirname, '../src'),
|
|
71
|
-
'@components': path.resolve(__dirname, '../src/components'),
|
|
72
|
-
'@styles': path.resolve(__dirname, '../src/styles'),
|
|
73
|
-
'@assets': path.resolve(__dirname, '../src/assets'),
|
|
74
|
-
'@utils': path.resolve(__dirname, '../src/utils'),
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
config.server = {
|
|
79
|
-
...config.server,
|
|
80
|
-
proxy: {
|
|
81
|
-
'/holidays': {
|
|
82
|
-
target: 'https://holidayapi.com/v1',
|
|
83
|
-
changeOrigin: true,
|
|
84
|
-
secure: true,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
return config;
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export default config;
|
package/.storybook/preview.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/** @type { import('@storybook/react-vite').Preview } */
|
|
2
|
-
import '../src/styles/main.scss';
|
|
3
|
-
|
|
4
|
-
import { withThemeByClassName } from '@storybook/addon-themes';
|
|
5
|
-
|
|
6
|
-
const preview = {
|
|
7
|
-
parameters: {
|
|
8
|
-
controls: {
|
|
9
|
-
matchers: {
|
|
10
|
-
color: /(background|color)$/i,
|
|
11
|
-
date: /Date$/i,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
decorators: [
|
|
16
|
-
withThemeByClassName({
|
|
17
|
-
themes: {
|
|
18
|
-
light: 'theme-light',
|
|
19
|
-
dark: 'theme-dark',
|
|
20
|
-
},
|
|
21
|
-
defaultTheme: 'light',
|
|
22
|
-
}),
|
|
23
|
-
],
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default preview;
|
package/.storybook/preview.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Preview } from '@storybook/react-vite';
|
|
2
|
-
|
|
3
|
-
const preview: Preview = {
|
|
4
|
-
parameters: {
|
|
5
|
-
controls: {
|
|
6
|
-
matchers: {
|
|
7
|
-
color: /(background|color)$/i,
|
|
8
|
-
date: /Date$/i,
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
a11y: {
|
|
13
|
-
test: 'todo',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default preview;
|
package/commitlint.config.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
extends: ['@commitlint/config-conventional'],
|
|
3
|
-
rules: {
|
|
4
|
-
'type-enum': [
|
|
5
|
-
2,
|
|
6
|
-
'always',
|
|
7
|
-
[
|
|
8
|
-
'feat',
|
|
9
|
-
'fix',
|
|
10
|
-
'docs',
|
|
11
|
-
'style',
|
|
12
|
-
'refactor',
|
|
13
|
-
'test',
|
|
14
|
-
'chore',
|
|
15
|
-
'build',
|
|
16
|
-
'ci',
|
|
17
|
-
],
|
|
18
|
-
],
|
|
19
|
-
'subject-max-length': [2, 'always', 100],
|
|
20
|
-
'subject-empty': [2, 'never'],
|
|
21
|
-
'type-empty': [2, 'never'],
|
|
22
|
-
},
|
|
23
|
-
};
|
package/eslint.config.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import pluginImport from 'eslint-plugin-import';
|
|
3
|
-
import react from 'eslint-plugin-react';
|
|
4
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
5
|
-
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
|
-
import storybook from 'eslint-plugin-storybook';
|
|
7
|
-
import tseslint from 'typescript-eslint';
|
|
8
|
-
|
|
9
|
-
export default [
|
|
10
|
-
js.configs.recommended,
|
|
11
|
-
...tseslint.configs.recommended,
|
|
12
|
-
{
|
|
13
|
-
files: ['**/*.{ts,tsx,js,jsx}'],
|
|
14
|
-
plugins: {
|
|
15
|
-
react: react,
|
|
16
|
-
'react-hooks': reactHooks,
|
|
17
|
-
'simple-import-sort': simpleImportSort,
|
|
18
|
-
import: pluginImport,
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
'react/react-in-jsx-scope': 'off',
|
|
22
|
-
'react-hooks/rules-of-hooks': 'error',
|
|
23
|
-
'react-hooks/exhaustive-deps': 'warn',
|
|
24
|
-
'simple-import-sort/imports': 'error',
|
|
25
|
-
'simple-import-sort/exports': 'error',
|
|
26
|
-
'@typescript-eslint/no-unused-vars': [
|
|
27
|
-
'error',
|
|
28
|
-
{ argsIgnorePattern: '^_' },
|
|
29
|
-
],
|
|
30
|
-
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
31
|
-
'react/destructuring-assignment': ['error', 'always'],
|
|
32
|
-
'prefer-destructuring': [
|
|
33
|
-
'error',
|
|
34
|
-
{
|
|
35
|
-
VariableDeclarator: { array: false, object: true },
|
|
36
|
-
AssignmentExpression: { array: false, object: false },
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
settings: {
|
|
41
|
-
react: {
|
|
42
|
-
version: 'detect',
|
|
43
|
-
},
|
|
44
|
-
'import/resolver': {
|
|
45
|
-
alias: {
|
|
46
|
-
map: [
|
|
47
|
-
['@', './src'],
|
|
48
|
-
['@components', './src/components'],
|
|
49
|
-
['@utils', './src/utils'],
|
|
50
|
-
['@styles', './src/styles'],
|
|
51
|
-
['@assets', './src/assets'],
|
|
52
|
-
],
|
|
53
|
-
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
languageOptions: {
|
|
58
|
-
ecmaVersion: 2022,
|
|
59
|
-
sourceType: 'module',
|
|
60
|
-
parserOptions: {
|
|
61
|
-
ecmaFeatures: {
|
|
62
|
-
jsx: true,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
globals: {
|
|
67
|
-
process: 'readonly',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
ignores: [
|
|
73
|
-
'dist/**',
|
|
74
|
-
'node_modules/**',
|
|
75
|
-
'**/*.test.tsx',
|
|
76
|
-
'**/*.stories.tsx',
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
...storybook.configs['flat/recommended'],
|
|
80
|
-
];
|
package/jest.config.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"clearMocks": true,
|
|
3
|
-
"logHeapUsage": true,
|
|
4
|
-
"passWithNoTests": true,
|
|
5
|
-
"testEnvironment": "jsdom",
|
|
6
|
-
"transform": {
|
|
7
|
-
"^.+\\.(ts|tsx|js|jsx)$": "babel-jest"
|
|
8
|
-
},
|
|
9
|
-
"transformIgnorePatterns": ["node_modules/(?!(react|react-dom)/)"],
|
|
10
|
-
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json"],
|
|
11
|
-
"setupFilesAfterEnv": ["<rootDir>/src/setupTests.ts"],
|
|
12
|
-
"moduleNameMapper": {
|
|
13
|
-
"^@/(.*)$": "<rootDir>/src/$1",
|
|
14
|
-
"^@components/(.*)$": "<rootDir>/src/components/$1",
|
|
15
|
-
"^@utils/(.*)$": "<rootDir>/src/utils/$1",
|
|
16
|
-
"^@store/(.*)$": "<rootDir>/src/store/$1",
|
|
17
|
-
"^@styles/(.*)$": "<rootDir>/src/styles/$1",
|
|
18
|
-
"^@assets/(.*)$": "<rootDir>/src/assets/$1",
|
|
19
|
-
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
|
|
20
|
-
}
|
|
21
|
-
}
|