@scbt-ecom/ui 0.0.27 → 0.0.30
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/.env +2 -0
- package/.eslintrc.cjs +134 -0
- package/.github/workflows/npm-publish.yml +22 -0
- package/.github/workflows/publish.yml +49 -0
- package/.github/workflows/setup-node/action.yml +22 -0
- package/.husky/pre-commit +1 -0
- package/.prettierrc +19 -0
- package/.storybook/main.ts +44 -0
- package/.storybook/preview.tsx +37 -0
- package/chromatic.config.json +5 -0
- package/index.html +13 -0
- package/lib/client.ts +80 -0
- package/lib/configs/index.ts +1 -0
- package/lib/configs/tailwindConfigBase.ts +110 -0
- package/lib/server.ts +2 -0
- package/lib/shared/constants/api.ts +2 -0
- package/lib/shared/constants/designSystem/colors.ts +117 -0
- package/lib/shared/constants/designSystem/index.ts +3 -0
- package/lib/shared/constants/designSystem/others.ts +18 -0
- package/lib/shared/constants/designSystem/typography.ts +88 -0
- package/lib/shared/constants/index.ts +2 -0
- package/lib/shared/hooks/index.ts +4 -0
- package/lib/shared/hooks/useBoolean.ts +12 -0
- package/lib/shared/hooks/useClickOutside.ts +19 -0
- package/lib/shared/hooks/useControlledForm.ts +16 -0
- package/lib/shared/hooks/useDebounce.ts +38 -0
- package/lib/shared/style.css +74 -0
- package/lib/shared/ui/Badge.tsx +20 -0
- package/lib/shared/ui/Breadcrumbs.tsx +57 -0
- package/lib/shared/ui/ButtonIcon.tsx +52 -0
- package/lib/shared/ui/CustomLink.tsx +70 -0
- package/lib/shared/ui/Document.tsx +51 -0
- package/lib/shared/ui/Heading.tsx +33 -0
- package/lib/shared/ui/Hint.tsx +62 -0
- package/lib/shared/ui/Loader.tsx +58 -0
- package/lib/shared/ui/PhoneView.tsx +23 -0
- package/lib/shared/ui/Portal.tsx +9 -0
- package/lib/shared/ui/ProgressBar.tsx +43 -0
- package/lib/shared/ui/ResponsiveContainer.tsx +11 -0
- package/lib/shared/ui/Section.tsx +15 -0
- package/lib/shared/ui/Skeleton.tsx +9 -0
- package/lib/shared/ui/TabsSwitcher.tsx +80 -0
- package/lib/shared/ui/accordion/Accordion.tsx +36 -0
- package/lib/shared/ui/accordion/index.ts +1 -0
- package/lib/shared/ui/accordion/model/types.ts +20 -0
- package/lib/shared/ui/accordion/ui/AccordionHeader.tsx +35 -0
- package/lib/shared/ui/brandLogos.tsx +14 -0
- package/lib/shared/ui/button/Button.tsx +111 -0
- package/lib/shared/ui/button/index.ts +1 -0
- package/lib/shared/ui/button/model/helpers.ts +16 -0
- package/lib/shared/ui/calendar/Calendar.tsx +228 -0
- package/lib/shared/ui/calendar/index.ts +231 -0
- package/lib/shared/ui/calendar/model/animation.ts +112 -0
- package/lib/shared/ui/calendar/model/classes.ts +34 -0
- package/lib/shared/ui/calendar/model/helpers.ts +51 -0
- package/lib/shared/ui/calendar/model/hooks/index.ts +2 -0
- package/lib/shared/ui/calendar/model/hooks/useCalendarDropdowns.ts +38 -0
- package/lib/shared/ui/calendar/model/hooks/useDatePicker.ts +103 -0
- package/lib/shared/ui/calendar/ui/CalendarHeader.tsx +54 -0
- package/lib/shared/ui/calendar/ui/Dropdown.tsx +75 -0
- package/lib/shared/ui/calendar/ui/NavigationArrows.tsx +23 -0
- package/lib/shared/ui/calendar/ui/Weekdays.tsx +16 -0
- package/lib/shared/ui/calendar/ui/index.ts +2 -0
- package/lib/shared/ui/formControlElements/CheckboxControl.tsx +92 -0
- package/lib/shared/ui/formControlElements/FormControl.tsx +5 -0
- package/lib/shared/ui/formControlElements/InputControl.tsx +68 -0
- package/lib/shared/ui/formControlElements/InputControlMask.tsx +80 -0
- package/lib/shared/ui/formControlElements/RadioControl.tsx +130 -0
- package/lib/shared/ui/formControlElements/SelectControl.tsx +185 -0
- package/lib/shared/ui/formControlElements/SwitchControl.tsx +79 -0
- package/lib/shared/ui/formControlElements/TextareaControl.tsx +92 -0
- package/lib/shared/ui/formControlElements/calendarControl/CalendarControl.tsx +175 -0
- package/lib/shared/ui/formControlElements/calendarControl/hooks/index.ts +2 -0
- package/lib/shared/ui/formControlElements/calendarControl/hooks/useCalendar.tsx +86 -0
- package/lib/shared/ui/formControlElements/calendarControl/hooks/useCalendarDropdowns.ts +38 -0
- package/{dist/shared/ui/formControlElements/calendarControl/index.d.ts → lib/shared/ui/formControlElements/calendarControl/index.ts} +1 -1
- package/lib/shared/ui/formControlElements/calendarControl/model/helpers.ts +60 -0
- package/lib/shared/ui/formControlElements/calendarControl/model/types.ts +44 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/DaysOfMonth.tsx +53 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/DaysOfWeek.tsx +28 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/Dropdown.tsx +62 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/Header.tsx +51 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/Navigation.tsx +32 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/OptionsList.tsx +44 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/index.ts +4 -0
- package/lib/shared/ui/formControlElements/dadata/DadataInputControl.tsx +132 -0
- package/{dist/shared/ui/formControlElements/dadata/index.d.ts → lib/shared/ui/formControlElements/dadata/index.ts} +1 -1
- package/lib/shared/ui/formControlElements/dadata/model/api.ts +25 -0
- package/lib/shared/ui/formControlElements/dadata/model/helpers.ts +76 -0
- package/lib/shared/ui/formControlElements/dadata/model/types.ts +52 -0
- package/lib/shared/ui/formControlElements/dadata/model/useDadata.ts +25 -0
- package/{dist/shared/ui/formControlElements/index.d.ts → lib/shared/ui/formControlElements/index.ts} +10 -10
- package/lib/shared/ui/formControlElements/model/classes-types.ts +22 -0
- package/lib/shared/ui/formControlElements/model/index.ts +2 -0
- package/lib/shared/ui/formControlElements/model/props-types.ts +26 -0
- package/lib/shared/ui/formControlElements/ui/FieldAttachment.tsx +66 -0
- package/lib/shared/ui/formControlElements/ui/FieldContainer.tsx +36 -0
- package/lib/shared/ui/formControlElements/ui/FieldWrapper.tsx +55 -0
- package/lib/shared/ui/formControlElements/ui/MessageView.tsx +37 -0
- package/lib/shared/ui/formControlElements/ui/index.ts +4 -0
- package/lib/shared/ui/icon/Icon.tsx +43 -0
- package/{dist/shared/ui/icon/index.d.ts → lib/shared/ui/icon/index.ts} +2 -2
- package/lib/shared/ui/icon/sprite.gen.ts +121 -0
- package/lib/shared/ui/index.ts +56 -0
- package/lib/shared/ui/popover/Popover.tsx +77 -0
- package/lib/shared/ui/popover/index.ts +1 -0
- package/lib/shared/ui/table/Table.tsx +143 -0
- package/lib/shared/ui/table/index.ts +1 -0
- package/lib/shared/ui/table/type.ts +30 -0
- package/lib/shared/utils/capitalize.ts +6 -0
- package/lib/shared/utils/cn.ts +6 -0
- package/lib/shared/utils/deepCompare.ts +1 -0
- package/lib/shared/utils/formatToDate.ts +5 -0
- package/lib/shared/utils/index.ts +5 -0
- package/lib/shared/utils/isClient.ts +1 -0
- package/lib/shared/validation/index.ts +3 -0
- package/lib/shared/validation/messages.ts +12 -0
- package/lib/shared/validation/regExp.ts +5 -0
- package/lib/shared/validation/zodValidation/calendar.ts +32 -0
- package/lib/shared/validation/zodValidation/dadataFio.ts +67 -0
- package/lib/shared/validation/zodValidation/index.ts +2 -0
- package/lib/vite-env.d.ts +2 -0
- package/lib/widgets/Advantages.tsx +45 -0
- package/lib/widgets/banner/Banner.tsx +62 -0
- package/lib/widgets/banner/index.ts +1 -0
- package/lib/widgets/banner/model/helpers.ts +44 -0
- package/lib/widgets/banner/money.png +0 -0
- package/lib/widgets/banner/ui/BannerButtonsGroup.tsx +30 -0
- package/{dist/widgets/index.d.ts → lib/widgets/index.ts} +3 -3
- package/lib/widgets/pageHeader/PageHeader.tsx +54 -0
- package/{dist/widgets/pageHeader/index.d.ts → lib/widgets/pageHeader/index.ts} +1 -1
- package/package.json +10 -12
- package/postcss.config.mjs +8 -0
- package/src/App.tsx +9 -0
- package/src/app/providers/RootProvider.tsx +11 -0
- package/src/app/providers/index.ts +1 -0
- package/src/app/providers/model/types.ts +5 -0
- package/src/app/providers/ui/ToasterProvider.tsx +23 -0
- package/src/app/providers/ui/index.ts +1 -0
- package/src/configs/setup.ts +9 -0
- package/src/configs/storybook.config.ts +23 -0
- package/src/main.tsx +10 -0
- package/src/stories/primitives/Accordion.stories.tsx +66 -0
- package/src/stories/primitives/Badge.stories.tsx +28 -0
- package/src/stories/primitives/Breadcrumbs.stories.tsx +29 -0
- package/src/stories/primitives/Button/Button.stories.tsx +149 -0
- package/src/stories/primitives/Button/Button.test.tsx +150 -0
- package/src/stories/primitives/ButtonIcon.stories.tsx +75 -0
- package/src/stories/primitives/CustomLink.stories.tsx +64 -0
- package/src/stories/primitives/Document.stories.tsx +36 -0
- package/src/stories/primitives/Heading.stories.tsx +29 -0
- package/src/stories/primitives/Hint.stories.tsx +82 -0
- package/src/stories/primitives/Icon.stories.tsx +36 -0
- package/src/stories/primitives/Loader.stories.tsx +39 -0
- package/src/stories/primitives/PhoneView.stories.tsx +22 -0
- package/src/stories/primitives/Popover.stories.tsx +41 -0
- package/src/stories/primitives/ProgressBar.stories.tsx +68 -0
- package/src/stories/primitives/Skeleton.stories.tsx +21 -0
- package/src/stories/primitives/Table.stories.tsx +44 -0
- package/src/stories/primitives/TabsSwitcher.stories.tsx +34 -0
- package/src/stories/primitives/formControl/Calendar.stories.tsx +61 -0
- package/src/stories/primitives/formControl/CalendarControl.stories.tsx +39 -0
- package/src/stories/primitives/formControl/CheckboxControl.stories.tsx +64 -0
- package/src/stories/primitives/formControl/DadataInputControl.stories.tsx +83 -0
- package/src/stories/primitives/formControl/FormControlAllFields.stories.tsx +25 -0
- package/src/stories/primitives/formControl/InputControl.stories.tsx +77 -0
- package/src/stories/primitives/formControl/RadioContol.stories.tsx +63 -0
- package/src/stories/primitives/formControl/SelectControl.stories.tsx +117 -0
- package/src/stories/primitives/formControl/SwitchControl.stories.tsx +51 -0
- package/src/stories/primitives/formControl/TextareaControl.stories.tsx +55 -0
- package/src/stories/primitives/formControl/inputControlMask.stories.tsx +69 -0
- package/src/stories/widgets/Advantages.stories.tsx +42 -0
- package/src/stories/widgets/Banner.stories.tsx +40 -0
- package/src/stories/widgets/PageHeader.stories.tsx +33 -0
- package/src/storybookHelpers/actions.tsx +5 -0
- package/src/storybookHelpers/index.ts +2 -0
- package/src/storybookHelpers/reactHookForm/index.ts +3 -0
- package/src/storybookHelpers/reactHookForm/model/mockData.ts +21 -0
- package/src/storybookHelpers/reactHookForm/model/mocks.tsx +71 -0
- package/src/storybookHelpers/reactHookForm/model/types.ts +62 -0
- package/src/storybookHelpers/reactHookForm/ui/StorybookFieldsMapper.tsx +76 -0
- package/src/storybookHelpers/reactHookForm/ui/StorybookFormProvider.tsx +43 -0
- package/src/storybookHelpers/reactHookForm/ui/index.ts +2 -0
- package/src/storybookHelpers/table/utils/defaultValue.ts +51 -0
- package/static/arrows/arrowCircle.svg +18 -0
- package/static/arrows/arrowLink.svg +3 -0
- package/static/arrows/arrowRight.svg +3 -0
- package/static/brandLogos/logoBlack.svg +14 -0
- package/static/brandLogos/logoBusiness.svg +80 -0
- package/static/brandLogos/logoGray.svg +56 -0
- package/static/brandLogos/logoInsurance.svg +124 -0
- package/static/brandLogos/logoMain.svg +14 -0
- package/static/brandLogos/logoWhite.svg +56 -0
- package/static/files/documentFilled.svg +4 -0
- package/static/files/documentOutline.svg +4 -0
- package/static/general/calendar.svg +3 -0
- package/static/general/check.svg +6 -0
- package/static/general/close.svg +12 -0
- package/static/info/warningCircle.svg +5 -0
- package/tailwind.config.ts +9 -0
- package/tsconfig.json +33 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +63 -0
- package/vitest.config.mjs +12 -0
- package/dist/ExampleContainer.d.ts +0 -5
- package/dist/configs/index.d.ts +0 -1
- package/dist/configs/tailwindConfigBase.d.ts +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/shared/constants/api.d.ts +0 -2
- package/dist/shared/constants/designSystem/colors.d.ts +0 -120
- package/dist/shared/constants/designSystem/index.d.ts +0 -3
- package/dist/shared/constants/designSystem/others.d.ts +0 -16
- package/dist/shared/constants/designSystem/typography.d.ts +0 -75
- package/dist/shared/constants/index.d.ts +0 -2
- package/dist/shared/hooks/index.d.ts +0 -4
- package/dist/shared/hooks/useBoolean.d.ts +0 -3
- package/dist/shared/hooks/useClickOutside.d.ts +0 -2
- package/dist/shared/hooks/useControlledForm.d.ts +0 -7
- package/dist/shared/hooks/useDebounce.d.ts +0 -3
- package/dist/shared/ui/Badge.d.ts +0 -6
- package/dist/shared/ui/Breadcrumbs.d.ts +0 -15
- package/dist/shared/ui/ButtonIcon.d.ts +0 -17
- package/dist/shared/ui/CustomLink.d.ts +0 -15
- package/dist/shared/ui/Document.d.ts +0 -13
- package/dist/shared/ui/Heading.d.ts +0 -12
- package/dist/shared/ui/Hint.d.ts +0 -21
- package/dist/shared/ui/Loader.d.ts +0 -21
- package/dist/shared/ui/PhoneView.d.ts +0 -12
- package/dist/shared/ui/Portal.d.ts +0 -7
- package/dist/shared/ui/ProgressBar.d.ts +0 -18
- package/dist/shared/ui/ResponsiveContainer.d.ts +0 -6
- package/dist/shared/ui/Section.d.ts +0 -6
- package/dist/shared/ui/Skeleton.d.ts +0 -4
- package/dist/shared/ui/TabsSwitcher.d.ts +0 -33
- package/dist/shared/ui/accordion/Accordion.d.ts +0 -13
- package/dist/shared/ui/accordion/index.d.ts +0 -1
- package/dist/shared/ui/accordion/model/types.d.ts +0 -17
- package/dist/shared/ui/accordion/ui/AccordionHeader.d.ts +0 -8
- package/dist/shared/ui/brandLogos.d.ts +0 -5
- package/dist/shared/ui/button/Button.d.ts +0 -17
- package/dist/shared/ui/button/index.d.ts +0 -1
- package/dist/shared/ui/button/model/helpers.d.ts +0 -2
- package/dist/shared/ui/calendar/Calendar.d.ts +0 -20
- package/dist/shared/ui/calendar/index.d.ts +0 -1
- package/dist/shared/ui/calendar/model/animation.d.ts +0 -18
- package/dist/shared/ui/calendar/model/classes.d.ts +0 -24
- package/dist/shared/ui/calendar/model/helpers.d.ts +0 -9
- package/dist/shared/ui/calendar/model/hooks/index.d.ts +0 -2
- package/dist/shared/ui/calendar/model/hooks/useCalendarDropdowns.d.ts +0 -9
- package/dist/shared/ui/calendar/model/hooks/useDatePicker.d.ts +0 -19
- package/dist/shared/ui/calendar/ui/CalendarHeader.d.ts +0 -15
- package/dist/shared/ui/calendar/ui/Dropdown.d.ts +0 -10
- package/dist/shared/ui/calendar/ui/NavigationArrows.d.ts +0 -5
- package/dist/shared/ui/calendar/ui/Weekdays.d.ts +0 -1
- package/dist/shared/ui/calendar/ui/index.d.ts +0 -2
- package/dist/shared/ui/formControlElements/CheckboxControl.d.ts +0 -13
- package/dist/shared/ui/formControlElements/FormControl.d.ts +0 -3
- package/dist/shared/ui/formControlElements/InputControl.d.ts +0 -6
- package/dist/shared/ui/formControlElements/InputControlMask.d.ts +0 -10
- package/dist/shared/ui/formControlElements/RadioControl.d.ts +0 -26
- package/dist/shared/ui/formControlElements/SelectControl.d.ts +0 -27
- package/dist/shared/ui/formControlElements/SwitchControl.d.ts +0 -16
- package/dist/shared/ui/formControlElements/TextareaControl.d.ts +0 -11
- package/dist/shared/ui/formControlElements/calendarControl/CalendarControl.d.ts +0 -13
- package/dist/shared/ui/formControlElements/calendarControl/hooks/index.d.ts +0 -2
- package/dist/shared/ui/formControlElements/calendarControl/hooks/useCalendar.d.ts +0 -16
- package/dist/shared/ui/formControlElements/calendarControl/hooks/useCalendarDropdowns.d.ts +0 -9
- package/dist/shared/ui/formControlElements/calendarControl/model/helpers.d.ts +0 -24
- package/dist/shared/ui/formControlElements/calendarControl/model/types.d.ts +0 -33
- package/dist/shared/ui/formControlElements/calendarControl/ui/DaysOfMonth.d.ts +0 -10
- package/dist/shared/ui/formControlElements/calendarControl/ui/DaysOfWeek.d.ts +0 -6
- package/dist/shared/ui/formControlElements/calendarControl/ui/Dropdown.d.ts +0 -11
- package/dist/shared/ui/formControlElements/calendarControl/ui/Header.d.ts +0 -14
- package/dist/shared/ui/formControlElements/calendarControl/ui/Navigation.d.ts +0 -9
- package/dist/shared/ui/formControlElements/calendarControl/ui/OptionsList.d.ts +0 -5
- package/dist/shared/ui/formControlElements/calendarControl/ui/index.d.ts +0 -4
- package/dist/shared/ui/formControlElements/dadata/DadataInputControl.d.ts +0 -14
- package/dist/shared/ui/formControlElements/dadata/model/api.d.ts +0 -2
- package/dist/shared/ui/formControlElements/dadata/model/helpers.d.ts +0 -7
- package/dist/shared/ui/formControlElements/dadata/model/types.d.ts +0 -42
- package/dist/shared/ui/formControlElements/dadata/model/useDadata.d.ts +0 -7
- package/dist/shared/ui/formControlElements/model/classes-types.d.ts +0 -18
- package/dist/shared/ui/formControlElements/model/index.d.ts +0 -2
- package/dist/shared/ui/formControlElements/model/props-types.d.ts +0 -20
- package/dist/shared/ui/formControlElements/ui/FieldAttachment.d.ts +0 -13
- package/dist/shared/ui/formControlElements/ui/FieldContainer.d.ts +0 -14
- package/dist/shared/ui/formControlElements/ui/FieldWrapper.d.ts +0 -14
- package/dist/shared/ui/formControlElements/ui/MessageView.d.ts +0 -13
- package/dist/shared/ui/formControlElements/ui/index.d.ts +0 -4
- package/dist/shared/ui/icon/Icon.d.ts +0 -10
- package/dist/shared/ui/icon/sprite.gen.d.ts +0 -17
- package/dist/shared/ui/index.d.ts +0 -21
- package/dist/shared/ui/popover/Popover.d.ts +0 -23
- package/dist/shared/ui/popover/index.d.ts +0 -1
- package/dist/shared/ui/table/Table.d.ts +0 -17
- package/dist/shared/ui/table/index.d.ts +0 -1
- package/dist/shared/ui/table/type.d.ts +0 -21
- package/dist/shared/utils/capitalize.d.ts +0 -1
- package/dist/shared/utils/cn.d.ts +0 -2
- package/dist/shared/utils/deepCompare.d.ts +0 -1
- package/dist/shared/utils/formatToDate.d.ts +0 -1
- package/dist/shared/utils/index.d.ts +0 -5
- package/dist/shared/utils/isClient.d.ts +0 -1
- package/dist/shared/validation/index.d.ts +0 -3
- package/dist/shared/validation/messages.d.ts +0 -12
- package/dist/shared/validation/regExp.d.ts +0 -3
- package/dist/shared/validation/zodValidation/calendar.d.ts +0 -2
- package/dist/shared/validation/zodValidation/dadataFio.d.ts +0 -6
- package/dist/shared/validation/zodValidation/index.d.ts +0 -2
- package/dist/style.css +0 -1
- package/dist/ui.es.js +0 -25268
- package/dist/ui.umd.js +0 -85
- package/dist/widgets/Advantages.d.ts +0 -17
- package/dist/widgets/banner/Banner.d.ts +0 -28
- package/dist/widgets/banner/index.d.ts +0 -1
- package/dist/widgets/banner/model/helpers.d.ts +0 -4
- package/dist/widgets/banner/ui/BannerButtonsGroup.d.ts +0 -12
- package/dist/widgets/pageHeader/PageHeader.d.ts +0 -16
- /package/{dist → public}/sprites/arrows.svg +0 -0
- /package/{dist → public}/sprites/brandLogos.svg +0 -0
- /package/{dist → public}/sprites/common.svg +0 -0
- /package/{dist → public}/sprites/files.svg +0 -0
- /package/{dist → public}/sprites/general.svg +0 -0
- /package/{dist → public}/sprites/info.svg +0 -0
package/.env
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: { browser: true, es2020: true },
|
|
4
|
+
extends: [
|
|
5
|
+
'eslint:recommended',
|
|
6
|
+
'plugin:@typescript-eslint/recommended',
|
|
7
|
+
'plugin:react-hooks/recommended',
|
|
8
|
+
'plugin:storybook/recommended',
|
|
9
|
+
'eslint:recommended',
|
|
10
|
+
'plugin:@typescript-eslint/recommended',
|
|
11
|
+
'plugin:react/recommended',
|
|
12
|
+
'plugin:prettier/recommended',
|
|
13
|
+
'airbnb',
|
|
14
|
+
'airbnb-typescript',
|
|
15
|
+
'plugin:@typescript-eslint/recommended'
|
|
16
|
+
],
|
|
17
|
+
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts', 'vitest.config.mjs', 'tailwind.config.ts', 'postcss.config.mjs', 'storybook-static'],
|
|
18
|
+
parser: '@typescript-eslint/parser',
|
|
19
|
+
overrides: [
|
|
20
|
+
{
|
|
21
|
+
env: {
|
|
22
|
+
node: true
|
|
23
|
+
},
|
|
24
|
+
files: ['.eslintrc.{js,cjs}'],
|
|
25
|
+
parserOptions: {
|
|
26
|
+
sourceType: 'module',
|
|
27
|
+
ecmaVersion: 'latest'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
files: ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
|
|
32
|
+
rules: {
|
|
33
|
+
'import/no-default-export': 'off'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
parserOptions: {
|
|
38
|
+
ecmaVersion: 'latest',
|
|
39
|
+
sourceType: 'module',
|
|
40
|
+
ecmaFeatures: {
|
|
41
|
+
jsx: true
|
|
42
|
+
},
|
|
43
|
+
project: './tsconfig.json',
|
|
44
|
+
tsconfigRootDir: __dirname
|
|
45
|
+
},
|
|
46
|
+
plugins: [
|
|
47
|
+
'react-refresh',
|
|
48
|
+
'@typescript-eslint',
|
|
49
|
+
'react',
|
|
50
|
+
'@typescript-eslint/eslint-plugin',
|
|
51
|
+
'simple-import-sort',
|
|
52
|
+
'jsx-a11y',
|
|
53
|
+
'unused-imports',
|
|
54
|
+
'promise',
|
|
55
|
+
'prettier'
|
|
56
|
+
],
|
|
57
|
+
rules: {
|
|
58
|
+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
|
59
|
+
'react/react-in-jsx-scope': 'off',
|
|
60
|
+
'react/display-name': 'off',
|
|
61
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
62
|
+
'promise/prefer-await-to-then': 'error',
|
|
63
|
+
'react/self-closing-comp': 'off',
|
|
64
|
+
'react/jsx-closing-tag-location': 'off',
|
|
65
|
+
'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }],
|
|
66
|
+
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
|
|
67
|
+
'import/prefer-default-export': 'off',
|
|
68
|
+
'react/function-component-definition': 'off',
|
|
69
|
+
'arrow-body-style': 'off',
|
|
70
|
+
'react/destructuring-assignment': 'off',
|
|
71
|
+
'operator-linebreak': 'off',
|
|
72
|
+
'jsx-a11y/control-has-associated-label': 'off',
|
|
73
|
+
'import/no-extraneous-dependencies': 'off',
|
|
74
|
+
'react/require-default-props': 'off',
|
|
75
|
+
'react/jsx-props-no-spreading': 'off',
|
|
76
|
+
'react/button-has-type': 'off',
|
|
77
|
+
'@typescript-eslint/semi': 'off',
|
|
78
|
+
'linebreak-style': 'off',
|
|
79
|
+
'object-curly-newline': 'off',
|
|
80
|
+
'prefer-arrow-callback': 'off',
|
|
81
|
+
'no-case-declarations': 'off',
|
|
82
|
+
'@typescript-eslint/comma-dangle': 'off',
|
|
83
|
+
'max-len': 'off',
|
|
84
|
+
'jsx-quotes': [2, 'prefer-single'],
|
|
85
|
+
'import/extensions': 'off',
|
|
86
|
+
'consistent-return': 'off',
|
|
87
|
+
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
88
|
+
'react/jsx-no-useless-fragment': 'off',
|
|
89
|
+
'import/no-default-export': 'error',
|
|
90
|
+
'implicit-arrow-linebreak': 'off',
|
|
91
|
+
'react/jsx-one-expression-per-line': 'off',
|
|
92
|
+
'@typescript-eslint/indent': 'off',
|
|
93
|
+
'prettier/prettier': [
|
|
94
|
+
'error',
|
|
95
|
+
{
|
|
96
|
+
endOfLine: 'auto'
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
'@typescript-eslint/consistent-type-exports': ['error', { fixMixedExportsWithInlineTypeSpecifier: true }],
|
|
100
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
101
|
+
'error',
|
|
102
|
+
{ prefer: 'type-imports', disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' }
|
|
103
|
+
],
|
|
104
|
+
'unused-imports/no-unused-imports': 'error',
|
|
105
|
+
'unused-imports/no-unused-vars': [
|
|
106
|
+
'error',
|
|
107
|
+
{
|
|
108
|
+
vars: 'all',
|
|
109
|
+
varsIgnorePattern: '^_',
|
|
110
|
+
args: 'after-used',
|
|
111
|
+
argsIgnorePattern: '^_'
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
|
|
115
|
+
'simple-import-sort/imports': [
|
|
116
|
+
'error',
|
|
117
|
+
{
|
|
118
|
+
groups: [['^react', '^', '^\u0000', '^@/app', '^@/widgets', '^$/shared', '^../', '^./']]
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
'@typescript-eslint/naming-convention': [
|
|
122
|
+
'error',
|
|
123
|
+
{
|
|
124
|
+
selector: 'typeLike',
|
|
125
|
+
format: ['PascalCase']
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
settings: {
|
|
130
|
+
'jsx-a11y': {
|
|
131
|
+
polymorphicPropName: 'component'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish-npm:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
|
|
17
|
+
uses: ./.github/workflows/setup-node
|
|
18
|
+
|
|
19
|
+
- run: npm run build
|
|
20
|
+
- run: npm publish --access public
|
|
21
|
+
env:
|
|
22
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: publish-to-github-pages
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
pages: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: 'pages'
|
|
14
|
+
cancel-in-progress: false
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout 🛎️
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
|
|
25
|
+
uses: ./.github/workflows/setup-node
|
|
26
|
+
|
|
27
|
+
- name: Setup Pages ⚙️
|
|
28
|
+
uses: actions/configure-pages@v4
|
|
29
|
+
|
|
30
|
+
- name: Build 🏗️
|
|
31
|
+
run: npm run build-storybook
|
|
32
|
+
|
|
33
|
+
- name: Upload artifact 📡
|
|
34
|
+
uses: actions/upload-pages-artifact@v3
|
|
35
|
+
with:
|
|
36
|
+
path: ./storybook-static
|
|
37
|
+
|
|
38
|
+
deploy:
|
|
39
|
+
environment:
|
|
40
|
+
name: github-pages
|
|
41
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
42
|
+
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
needs: build
|
|
45
|
+
|
|
46
|
+
steps:
|
|
47
|
+
- name: Publish to GitHub Pages 🚀
|
|
48
|
+
id: deployment
|
|
49
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: setup-node
|
|
2
|
+
description: "Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧"
|
|
3
|
+
runs:
|
|
4
|
+
using: "composite"
|
|
5
|
+
steps:
|
|
6
|
+
- name: Setup Node.js ⚙️
|
|
7
|
+
uses: actions/setup-node@v4
|
|
8
|
+
with:
|
|
9
|
+
node-version: 20
|
|
10
|
+
registry-url: 'https://registry.npmjs.org'
|
|
11
|
+
|
|
12
|
+
- name: Cache dependencies ⚡
|
|
13
|
+
id: cache_dependencies
|
|
14
|
+
uses: actions/cache@v4
|
|
15
|
+
with:
|
|
16
|
+
path: node_modules
|
|
17
|
+
key: node-modules-${{ hashFiles('package-lock.json') }}
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies 🔧
|
|
20
|
+
shell: bash
|
|
21
|
+
if: steps.cache_dependencies.outputs.cache-hit != 'true'
|
|
22
|
+
run: npm install --package-lock=false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npm run pre-deploy
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "always",
|
|
3
|
+
"bracketSpacing": true,
|
|
4
|
+
"embeddedLanguageFormatting": "auto",
|
|
5
|
+
"htmlWhitespaceSensitivity": "css",
|
|
6
|
+
"jsxBracketSameLine": false,
|
|
7
|
+
"jsxSingleQuote": true,
|
|
8
|
+
"proseWrap": "preserve",
|
|
9
|
+
"quoteProps": "as-needed",
|
|
10
|
+
"requirePragma": false,
|
|
11
|
+
"singleQuote": true,
|
|
12
|
+
"trailingComma": "none",
|
|
13
|
+
"vueIndentScriptAndStyle": false,
|
|
14
|
+
"printWidth": 130,
|
|
15
|
+
"tabWidth": 2,
|
|
16
|
+
"rangeStart": 0,
|
|
17
|
+
"endOfLine": "auto",
|
|
18
|
+
"semi": false
|
|
19
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-vite'
|
|
2
|
+
import { mergeConfig } from 'vite'
|
|
3
|
+
import { resolve } from 'path'
|
|
4
|
+
|
|
5
|
+
const config: StorybookConfig = {
|
|
6
|
+
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)'],
|
|
7
|
+
|
|
8
|
+
addons: [
|
|
9
|
+
'@storybook/addon-onboarding',
|
|
10
|
+
'@storybook/addon-links',
|
|
11
|
+
'@storybook/addon-essentials',
|
|
12
|
+
'@chromatic-com/storybook',
|
|
13
|
+
'@storybook/addon-interactions',
|
|
14
|
+
'@storybook/addon-coverage',
|
|
15
|
+
'@storybook/addon-console',
|
|
16
|
+
'@storybook/addon-viewport'
|
|
17
|
+
],
|
|
18
|
+
core: {
|
|
19
|
+
builder: '@storybook/builder-vite'
|
|
20
|
+
},
|
|
21
|
+
framework: {
|
|
22
|
+
name: '@storybook/react-vite',
|
|
23
|
+
options: {
|
|
24
|
+
strictMode: true
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
// staticDirs: ['../public'],
|
|
28
|
+
docs: {
|
|
29
|
+
autodocs: 'tag'
|
|
30
|
+
},
|
|
31
|
+
viteFinal: (config) =>
|
|
32
|
+
mergeConfig(config, {
|
|
33
|
+
resolve: {
|
|
34
|
+
alias: {
|
|
35
|
+
'@': resolve(__dirname, '../src'),
|
|
36
|
+
$: resolve(__dirname, '../lib')
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
typescript: {
|
|
41
|
+
reactDocgen: 'react-docgen-typescript'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export default config
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { RootProvider } from '../src/app/providers'
|
|
2
|
+
import '../lib/shared/style.css'
|
|
3
|
+
import { STORYBOOK_VIEWPORTS } from '../src/configs/storybook.config'
|
|
4
|
+
import type { Preview } from '@storybook/react'
|
|
5
|
+
import { withConsole } from '@storybook/addon-console'
|
|
6
|
+
import React from 'react'
|
|
7
|
+
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
|
|
8
|
+
|
|
9
|
+
const preview: Preview = {
|
|
10
|
+
decorators: [
|
|
11
|
+
(storyFn, context) => withConsole()(storyFn)(context),
|
|
12
|
+
(Story) => (
|
|
13
|
+
<RootProvider>
|
|
14
|
+
<Story />
|
|
15
|
+
</RootProvider>
|
|
16
|
+
)
|
|
17
|
+
],
|
|
18
|
+
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'fullscreen',
|
|
21
|
+
viewport: {
|
|
22
|
+
viewports: {
|
|
23
|
+
...STORYBOOK_VIEWPORTS,
|
|
24
|
+
...INITIAL_VIEWPORTS
|
|
25
|
+
},
|
|
26
|
+
defaultViewport: 'fullscreen'
|
|
27
|
+
},
|
|
28
|
+
controls: {
|
|
29
|
+
matchers: {
|
|
30
|
+
color: /(background|color)$/i,
|
|
31
|
+
date: /Date$/i
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default preview
|
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>UI-KIT</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/lib/client.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export * from './shared/ui/button'
|
|
2
|
+
export * from './shared/ui/accordion'
|
|
3
|
+
// import './shared/style.css'
|
|
4
|
+
// "exports": {
|
|
5
|
+
// ".": {
|
|
6
|
+
// "import": "./dist/ui.es.js",
|
|
7
|
+
// "require": "./dist/ui.umd.cjs",
|
|
8
|
+
// "types": "./dist/index.d.ts"
|
|
9
|
+
// },
|
|
10
|
+
// "./dist/style.css": "./dist/style.css"
|
|
11
|
+
// },
|
|
12
|
+
// "main": "./dist/ui.umd.cjs",
|
|
13
|
+
// "module": "./dist/ui.es.js",
|
|
14
|
+
// "types": "./dist/index.d.ts",
|
|
15
|
+
// "files": [
|
|
16
|
+
// "dist"
|
|
17
|
+
// ],
|
|
18
|
+
// export * from './shared/constants'
|
|
19
|
+
// export * from './shared/hooks'
|
|
20
|
+
// export * from './shared/ui'
|
|
21
|
+
// export * from './shared/utils'
|
|
22
|
+
// export * from './shared/validation'
|
|
23
|
+
// export * from './widgets'
|
|
24
|
+
// export * from './configs'
|
|
25
|
+
// # BASE
|
|
26
|
+
// export { Section, type ISectionProps } from './shared/ui/Section'
|
|
27
|
+
// export { ResponsiveContainer, type IResponsiveContainerProps } from './shared/ui/ResponsiveContainer'
|
|
28
|
+
// export { Button, type IButtonProps } from './shared/ui/button'
|
|
29
|
+
// export { ButtonIcon, type IButtonIconProps } from './shared/ui/ButtonIcon'
|
|
30
|
+
// export { PhoneView } from './shared/ui/PhoneView'
|
|
31
|
+
// export { Badge, type IBadgeProps } from './shared/ui/Badge'
|
|
32
|
+
// export { Loader, type ILoaderProps } from './shared/ui/Loader'
|
|
33
|
+
// export { Skeleton, type ISkeletonProps } from './shared/ui/Skeleton'
|
|
34
|
+
// export { Table } from './shared/ui/table'
|
|
35
|
+
|
|
36
|
+
// // # INTERACTIVE
|
|
37
|
+
// export { Accordion, type IAccordionProps } from './shared/ui/accordion'
|
|
38
|
+
// export { Hint, type IHintProps } from './shared/ui/Hint'
|
|
39
|
+
// export { Popover } from './shared/ui/popover'
|
|
40
|
+
// export { ProgressBar, type IProgressBarProps } from './shared/ui/ProgressBar'
|
|
41
|
+
// export { TabsSwitcher, type ITabsSwitcherProps, type ITabRenderContent } from './shared/ui/TabsSwitcher'
|
|
42
|
+
|
|
43
|
+
// // # TYPOGRAPHY
|
|
44
|
+
// export { Heading, type IHeadingProps } from './shared/ui/Heading'
|
|
45
|
+
|
|
46
|
+
// // # ICONS
|
|
47
|
+
// export { Icon, type IconProps, type TAllowedIcons } from './shared/ui/icon'
|
|
48
|
+
// export { brandLogos, type TBrandLogoVariant } from './shared/ui/brandLogos'
|
|
49
|
+
|
|
50
|
+
// // # NAVIGATION
|
|
51
|
+
// export { Breadcrumbs, type IBreadcrumbsProps } from './shared/ui/Breadcrumbs'
|
|
52
|
+
// export { CustomLink, type ICustomLinkProps } from './shared/ui/CustomLink'
|
|
53
|
+
|
|
54
|
+
// // # FILes
|
|
55
|
+
// export { Document, type IDocumentProps } from './shared/ui/Document'
|
|
56
|
+
|
|
57
|
+
// // # CONTROLLED FORM UI
|
|
58
|
+
// export {
|
|
59
|
+
// FormControl,
|
|
60
|
+
// InputControl,
|
|
61
|
+
// type InputControlProps,
|
|
62
|
+
// InputControlMask,
|
|
63
|
+
// type InputControlMaskProps,
|
|
64
|
+
// DadataInputControl,
|
|
65
|
+
// type IDadataInputControlProps,
|
|
66
|
+
// CheckboxControl,
|
|
67
|
+
// type ICheckboxControlProps,
|
|
68
|
+
// RadioControl,
|
|
69
|
+
// type IRadioControlProps,
|
|
70
|
+
// type IRadioGroupOption,
|
|
71
|
+
// SwitchControl,
|
|
72
|
+
// type ISwitchControlProps,
|
|
73
|
+
// SelectControl,
|
|
74
|
+
// type ISelectControlProps,
|
|
75
|
+
// type ISelectOption,
|
|
76
|
+
// TextareaControl,
|
|
77
|
+
// type ITextareaControlProps,
|
|
78
|
+
// CalendarControl,
|
|
79
|
+
// type ICalendarControlProps
|
|
80
|
+
// } from './shared/ui/formControlElements'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { tailwindConfigBase } from './tailwindConfigBase'
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Config } from 'tailwindcss'
|
|
2
|
+
import plugin from 'tailwindcss/plugin'
|
|
3
|
+
import tailwindAnimation from 'tailwindcss-animate'
|
|
4
|
+
import {
|
|
5
|
+
allowedBackgroundColors,
|
|
6
|
+
allowedBackgroundDeg,
|
|
7
|
+
allowedBannersBackgroundColors,
|
|
8
|
+
allowedBorderRadius,
|
|
9
|
+
allowedFontSize,
|
|
10
|
+
allowedIconsColors,
|
|
11
|
+
allowedLineHeight,
|
|
12
|
+
allowedStrokeColors,
|
|
13
|
+
allowedTextColors,
|
|
14
|
+
allowedTextStyles
|
|
15
|
+
} from '../shared/constants'
|
|
16
|
+
|
|
17
|
+
export const tailwindConfigBase: Omit<Config, 'content'> = {
|
|
18
|
+
theme: {
|
|
19
|
+
screens: {
|
|
20
|
+
mobile: { max: '1187px' },
|
|
21
|
+
desktop: '1188px'
|
|
22
|
+
},
|
|
23
|
+
backgroundColor: {
|
|
24
|
+
color: allowedBackgroundColors,
|
|
25
|
+
banner: allowedBannersBackgroundColors,
|
|
26
|
+
icon: allowedIconsColors
|
|
27
|
+
},
|
|
28
|
+
textColor: {
|
|
29
|
+
icon: allowedIconsColors,
|
|
30
|
+
color: allowedTextColors
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
fill: allowedIconsColors,
|
|
34
|
+
stroke: allowedIconsColors,
|
|
35
|
+
borderColor: allowedStrokeColors,
|
|
36
|
+
outlineColor: allowedStrokeColors,
|
|
37
|
+
borderRadius: allowedBorderRadius,
|
|
38
|
+
fontFamily: { roboto: ['var(--ff-roboto)', 'sans-serif'] },
|
|
39
|
+
fontSize: allowedFontSize,
|
|
40
|
+
lineHeight: allowedLineHeight,
|
|
41
|
+
gradientColorStops: allowedBackgroundColors,
|
|
42
|
+
boxShadow: {
|
|
43
|
+
sm: '0 8px 20px 0 rgba(0, 0, 0, 0.08)',
|
|
44
|
+
md: '0 12px 20px 0 rgba(0, 33, 87, 0.10)',
|
|
45
|
+
lg: '0 16px 24px 0 rgba(0, 33, 87, 0.16)'
|
|
46
|
+
},
|
|
47
|
+
extend: {
|
|
48
|
+
bgGradientDeg: allowedBackgroundDeg,
|
|
49
|
+
width: {
|
|
50
|
+
'popper-content': 'var(--radix-popover-content-available-width)',
|
|
51
|
+
'popper-trigger': 'var(--radix-popover-trigger-width)',
|
|
52
|
+
'autocomplete-input': 'var(--input-width)',
|
|
53
|
+
'select-trigger': 'var(--button-width)'
|
|
54
|
+
},
|
|
55
|
+
transitionDuration: {
|
|
56
|
+
DEFAULT: '0.3s',
|
|
57
|
+
12: '0.12s',
|
|
58
|
+
15: '0.15s',
|
|
59
|
+
2: '2s'
|
|
60
|
+
},
|
|
61
|
+
transitionTimingFunction: {
|
|
62
|
+
DEFAULT: 'ease-in-out'
|
|
63
|
+
},
|
|
64
|
+
keyframes: {
|
|
65
|
+
slideDown: {
|
|
66
|
+
from: { height: '0px' },
|
|
67
|
+
to: { height: 'var(--radix-accordion-content-height)' }
|
|
68
|
+
},
|
|
69
|
+
slideUp: {
|
|
70
|
+
from: { height: 'var(--radix-accordion-content-height)' },
|
|
71
|
+
to: { height: '0px' }
|
|
72
|
+
},
|
|
73
|
+
'scale-in': {
|
|
74
|
+
from: { opacity: '0', scale: '0' },
|
|
75
|
+
to: { opacity: '1', scale: '1' }
|
|
76
|
+
},
|
|
77
|
+
'progress-loader': {
|
|
78
|
+
'100%': {
|
|
79
|
+
backgroundPosition: '100% 100%'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
animation: {
|
|
84
|
+
slideDown: 'slideDown 0.3s cubic-bezier(0.87, 0, 0.13, 1)',
|
|
85
|
+
slideUp: 'slideUp 0.3s cubic-bezier(0.87, 0, 0.13, 1)',
|
|
86
|
+
'scale-in': 'scale-in 0.3s ease-in-out',
|
|
87
|
+
'progress-loader': 'progress-loader 250s linear infinite'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
plugins: [
|
|
92
|
+
// eslint-disable-next-line global-require
|
|
93
|
+
tailwindAnimation,
|
|
94
|
+
plugin(({ addComponents }) => {
|
|
95
|
+
addComponents(allowedTextStyles)
|
|
96
|
+
}),
|
|
97
|
+
plugin(function ({ matchUtilities, theme }) {
|
|
98
|
+
matchUtilities(
|
|
99
|
+
{
|
|
100
|
+
'bg-deg-gradient': (angle) => ({
|
|
101
|
+
'background-image': `linear-gradient(${angle}, var(--tw-gradient-stops))`
|
|
102
|
+
})
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
values: Object.assign(theme('bgGradientDeg', {}), {})
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
}
|
package/lib/server.ts
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const rootStyles = {
|
|
2
|
+
transparent: 'transparent',
|
|
3
|
+
current: 'currentColor',
|
|
4
|
+
inherit: 'inherit',
|
|
5
|
+
initial: 'initial'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const allowedBackgroundColors = {
|
|
9
|
+
'blue-grey-100': '#f3f4f7',
|
|
10
|
+
'blue-grey-200': '#eaedf1',
|
|
11
|
+
'blue-grey-300': '#d4dbe2',
|
|
12
|
+
'blue-grey-500': '#a9b6c5',
|
|
13
|
+
footer: '#40465a',
|
|
14
|
+
negative: '#f42500',
|
|
15
|
+
'negative-light': '#ffd2ca',
|
|
16
|
+
positive: '#76bc21',
|
|
17
|
+
'positive-light': '#e4f6ce',
|
|
18
|
+
'primary-default': '#003790',
|
|
19
|
+
'primary-focus': '#2477ff',
|
|
20
|
+
'primary-hover': '#042e73',
|
|
21
|
+
'primary-light-default': '#f0f4f9',
|
|
22
|
+
'primary-tr-focus': '#0037901f',
|
|
23
|
+
'primary-tr-hover': '#00379014',
|
|
24
|
+
'primary-tr-pressed': '#00379033',
|
|
25
|
+
'secondary-default': '#fc5055',
|
|
26
|
+
'secondary-hover': '#f12f34',
|
|
27
|
+
warning: '#f49f00',
|
|
28
|
+
'warning-light': '#ffeecc',
|
|
29
|
+
white: '#ffffff',
|
|
30
|
+
'primary-disabled': '#809bc7',
|
|
31
|
+
'secondary-disabled': '#FFB7BF',
|
|
32
|
+
...rootStyles
|
|
33
|
+
} as const
|
|
34
|
+
|
|
35
|
+
const allowedTextColors = {
|
|
36
|
+
dark: '#292929',
|
|
37
|
+
disabled: '#a9b6c5',
|
|
38
|
+
footer: '#c3c3c3',
|
|
39
|
+
negative: '#f42500',
|
|
40
|
+
positive: '#76bc21',
|
|
41
|
+
'primary-default': '#003790',
|
|
42
|
+
'primary-hover': '#042e73',
|
|
43
|
+
secondary: '#40465a',
|
|
44
|
+
tetriary: '#5a6e85',
|
|
45
|
+
warning: '#f49f00',
|
|
46
|
+
white: '#ffffff',
|
|
47
|
+
'primary-disabled': '#809bc7',
|
|
48
|
+
'blue-grey-600': '#94a4b7',
|
|
49
|
+
...rootStyles
|
|
50
|
+
} as const
|
|
51
|
+
|
|
52
|
+
const allowedBannersBackgroundColors = {
|
|
53
|
+
'barvcray-200': '#ebeef4',
|
|
54
|
+
'barvcray-300': '#dde1e8',
|
|
55
|
+
'greymint-200': '#deecee',
|
|
56
|
+
'lavender-100': '#f7f7ff',
|
|
57
|
+
'lavender-200': '#ecedfa',
|
|
58
|
+
'lavender-300': '#d0d3f1',
|
|
59
|
+
'lightblue-300': '#bed3ec',
|
|
60
|
+
'mint-200': '#e4f5ed',
|
|
61
|
+
'salmon-200': '#faecec',
|
|
62
|
+
'skyblue-100': '#f4f8fe',
|
|
63
|
+
'skyblue-200': '#e7f3ff',
|
|
64
|
+
'skyblue-300': '#d9edff',
|
|
65
|
+
...rootStyles
|
|
66
|
+
} as const
|
|
67
|
+
|
|
68
|
+
const allowedIconsColors = {
|
|
69
|
+
'accent-default': '#2477ff',
|
|
70
|
+
'accent-hover': '#0053da',
|
|
71
|
+
'blue-grey-100': '#f3f4f7',
|
|
72
|
+
'blue-grey-600': '#94a4b7',
|
|
73
|
+
'blue-grey-700': '#69809a',
|
|
74
|
+
'blue-grey-800': '#5a6e85',
|
|
75
|
+
'dark-default': '#292929',
|
|
76
|
+
'dark-hover': '#535353',
|
|
77
|
+
disabled: '#a9b6c5',
|
|
78
|
+
'negative-default': '#f42500',
|
|
79
|
+
'negative-hover': '#c31e00',
|
|
80
|
+
'positive-default': '#76bc21',
|
|
81
|
+
'positive-hover': '#598d19',
|
|
82
|
+
'primary-default': '#003790',
|
|
83
|
+
'primary-hover': '#042e73',
|
|
84
|
+
'secondary-dark-default': '#f12f34',
|
|
85
|
+
'secondary-dark-hover': '#c40309',
|
|
86
|
+
'secondary-default': '#fc5055',
|
|
87
|
+
'secondary-hover': '#f12f34',
|
|
88
|
+
'warning-default': '#f49f00',
|
|
89
|
+
'warning-hover': '#d68b00',
|
|
90
|
+
white: '#ffffff',
|
|
91
|
+
'primary-disabled': '#809bc7',
|
|
92
|
+
footer: '#C3C3C3',
|
|
93
|
+
...rootStyles
|
|
94
|
+
} as const
|
|
95
|
+
|
|
96
|
+
const allowedStrokeColors = {
|
|
97
|
+
'blue-grey-500': '#a9b6c5',
|
|
98
|
+
'blue-grey-700': '#69809a',
|
|
99
|
+
'blue-grey-800': '#5a6e85',
|
|
100
|
+
dark: '#292929',
|
|
101
|
+
negative: '#f42500',
|
|
102
|
+
positive: '#76bc21',
|
|
103
|
+
'primary-default': '#003790',
|
|
104
|
+
'primary-focus': '#2477ff',
|
|
105
|
+
'primary-hover': '#042e73',
|
|
106
|
+
'primary-light': '#f0f4f9',
|
|
107
|
+
'secondary-default': '#fc5055',
|
|
108
|
+
'secondary-hover': '#f12f34',
|
|
109
|
+
'warm-grey-200': '#e4e4e4',
|
|
110
|
+
'warm-grey-300': '#c3c3c3',
|
|
111
|
+
warning: '#f49f00',
|
|
112
|
+
white: '#ffffff',
|
|
113
|
+
'primary-disabled': '#809bc7',
|
|
114
|
+
...rootStyles
|
|
115
|
+
} as const
|
|
116
|
+
|
|
117
|
+
export { allowedStrokeColors, allowedBannersBackgroundColors, allowedIconsColors, allowedTextColors, allowedBackgroundColors }
|