@scbt-ecom/ui 0.0.30 → 0.0.31
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/dist/client.d.ts +2 -0
- package/dist/client.js +921 -0
- package/dist/cn-uh4jkx7b.js +2892 -0
- package/dist/configs/index.d.ts +1 -0
- package/dist/configs/tailwindConfigBase.d.ts +2 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +15 -0
- package/dist/shared/constants/api.d.ts +2 -0
- package/dist/shared/constants/designSystem/colors.d.ts +120 -0
- package/dist/shared/constants/designSystem/index.d.ts +3 -0
- package/dist/shared/constants/designSystem/others.d.ts +16 -0
- package/dist/shared/constants/designSystem/typography.d.ts +75 -0
- package/dist/shared/constants/index.d.ts +2 -0
- package/dist/shared/hooks/index.d.ts +4 -0
- package/dist/shared/hooks/useBoolean.d.ts +3 -0
- package/dist/shared/hooks/useClickOutside.d.ts +2 -0
- package/dist/shared/hooks/useControlledForm.d.ts +7 -0
- package/dist/shared/hooks/useDebounce.d.ts +3 -0
- package/dist/shared/ui/Badge.d.ts +6 -0
- package/dist/shared/ui/Breadcrumbs.d.ts +15 -0
- package/dist/shared/ui/ButtonIcon.d.ts +17 -0
- package/dist/shared/ui/CustomLink.d.ts +15 -0
- package/dist/shared/ui/Document.d.ts +13 -0
- package/dist/shared/ui/Heading.d.ts +12 -0
- package/dist/shared/ui/Hint.d.ts +21 -0
- package/dist/shared/ui/Loader.d.ts +21 -0
- package/dist/shared/ui/PhoneView.d.ts +12 -0
- package/dist/shared/ui/Portal.d.ts +7 -0
- package/dist/shared/ui/ProgressBar.d.ts +18 -0
- package/dist/shared/ui/ResponsiveContainer.d.ts +6 -0
- package/dist/shared/ui/Section.d.ts +6 -0
- package/dist/shared/ui/Skeleton.d.ts +4 -0
- package/dist/shared/ui/TabsSwitcher.d.ts +33 -0
- package/dist/shared/ui/accordion/Accordion.d.ts +13 -0
- package/dist/shared/ui/accordion/index.d.ts +1 -0
- package/dist/shared/ui/accordion/model/types.d.ts +17 -0
- package/dist/shared/ui/accordion/ui/AccordionHeader.d.ts +8 -0
- package/dist/shared/ui/brandLogos.d.ts +5 -0
- package/dist/shared/ui/button/Button.d.ts +17 -0
- package/dist/shared/ui/button/index.d.ts +1 -0
- package/dist/shared/ui/button/model/helpers.d.ts +2 -0
- package/dist/shared/ui/calendar/Calendar.d.ts +20 -0
- package/dist/shared/ui/calendar/index.d.ts +1 -0
- package/dist/shared/ui/calendar/model/animation.d.ts +18 -0
- package/dist/shared/ui/calendar/model/classes.d.ts +24 -0
- package/dist/shared/ui/calendar/model/helpers.d.ts +9 -0
- package/dist/shared/ui/calendar/model/hooks/index.d.ts +2 -0
- package/dist/shared/ui/calendar/model/hooks/useCalendarDropdowns.d.ts +9 -0
- package/dist/shared/ui/calendar/model/hooks/useDatePicker.d.ts +19 -0
- package/dist/shared/ui/calendar/ui/CalendarHeader.d.ts +15 -0
- package/dist/shared/ui/calendar/ui/Dropdown.d.ts +10 -0
- package/dist/shared/ui/calendar/ui/NavigationArrows.d.ts +5 -0
- package/dist/shared/ui/calendar/ui/Weekdays.d.ts +1 -0
- package/dist/shared/ui/calendar/ui/index.d.ts +2 -0
- package/dist/shared/ui/formControlElements/CheckboxControl.d.ts +13 -0
- package/dist/shared/ui/formControlElements/FormControl.d.ts +3 -0
- package/dist/shared/ui/formControlElements/InputControl.d.ts +6 -0
- package/dist/shared/ui/formControlElements/InputControlMask.d.ts +10 -0
- package/dist/shared/ui/formControlElements/RadioControl.d.ts +26 -0
- package/dist/shared/ui/formControlElements/SelectControl.d.ts +27 -0
- package/dist/shared/ui/formControlElements/SwitchControl.d.ts +16 -0
- package/dist/shared/ui/formControlElements/TextareaControl.d.ts +11 -0
- package/dist/shared/ui/formControlElements/calendarControl/CalendarControl.d.ts +13 -0
- package/dist/shared/ui/formControlElements/calendarControl/hooks/index.d.ts +2 -0
- package/dist/shared/ui/formControlElements/calendarControl/hooks/useCalendar.d.ts +16 -0
- package/dist/shared/ui/formControlElements/calendarControl/hooks/useCalendarDropdowns.d.ts +9 -0
- package/{lib/shared/ui/formControlElements/calendarControl/index.ts → dist/shared/ui/formControlElements/calendarControl/index.d.ts} +1 -1
- package/dist/shared/ui/formControlElements/calendarControl/model/helpers.d.ts +24 -0
- package/dist/shared/ui/formControlElements/calendarControl/model/types.d.ts +33 -0
- package/dist/shared/ui/formControlElements/calendarControl/ui/DaysOfMonth.d.ts +10 -0
- package/dist/shared/ui/formControlElements/calendarControl/ui/DaysOfWeek.d.ts +6 -0
- package/dist/shared/ui/formControlElements/calendarControl/ui/Dropdown.d.ts +11 -0
- package/dist/shared/ui/formControlElements/calendarControl/ui/Header.d.ts +14 -0
- package/dist/shared/ui/formControlElements/calendarControl/ui/Navigation.d.ts +9 -0
- package/dist/shared/ui/formControlElements/calendarControl/ui/OptionsList.d.ts +5 -0
- package/dist/shared/ui/formControlElements/calendarControl/ui/index.d.ts +4 -0
- package/dist/shared/ui/formControlElements/dadata/DadataInputControl.d.ts +14 -0
- package/{lib/shared/ui/formControlElements/dadata/index.ts → dist/shared/ui/formControlElements/dadata/index.d.ts} +1 -1
- package/dist/shared/ui/formControlElements/dadata/model/api.d.ts +2 -0
- package/dist/shared/ui/formControlElements/dadata/model/helpers.d.ts +7 -0
- package/dist/shared/ui/formControlElements/dadata/model/types.d.ts +42 -0
- package/dist/shared/ui/formControlElements/dadata/model/useDadata.d.ts +7 -0
- package/{lib/shared/ui/formControlElements/index.ts → dist/shared/ui/formControlElements/index.d.ts} +10 -10
- package/dist/shared/ui/formControlElements/model/classes-types.d.ts +18 -0
- package/dist/shared/ui/formControlElements/model/index.d.ts +2 -0
- package/dist/shared/ui/formControlElements/model/props-types.d.ts +20 -0
- package/dist/shared/ui/formControlElements/ui/FieldAttachment.d.ts +13 -0
- package/dist/shared/ui/formControlElements/ui/FieldContainer.d.ts +14 -0
- package/dist/shared/ui/formControlElements/ui/FieldWrapper.d.ts +14 -0
- package/dist/shared/ui/formControlElements/ui/MessageView.d.ts +13 -0
- package/dist/shared/ui/formControlElements/ui/index.d.ts +4 -0
- package/dist/shared/ui/icon/Icon.d.ts +10 -0
- package/{lib/shared/ui/icon/index.ts → dist/shared/ui/icon/index.d.ts} +2 -2
- package/dist/shared/ui/icon/sprite.gen.d.ts +17 -0
- package/dist/shared/ui/index.d.ts +21 -0
- package/dist/shared/ui/popover/Popover.d.ts +23 -0
- package/dist/shared/ui/popover/index.d.ts +1 -0
- package/dist/shared/ui/table/Table.d.ts +17 -0
- package/dist/shared/ui/table/index.d.ts +1 -0
- package/dist/shared/ui/table/type.d.ts +21 -0
- package/dist/shared/utils/capitalize.d.ts +1 -0
- package/dist/shared/utils/cn.d.ts +2 -0
- package/dist/shared/utils/deepCompare.d.ts +1 -0
- package/dist/shared/utils/formatToDate.d.ts +1 -0
- package/dist/shared/utils/index.d.ts +5 -0
- package/dist/shared/utils/isClient.d.ts +1 -0
- package/dist/shared/validation/index.d.ts +3 -0
- package/dist/shared/validation/messages.d.ts +12 -0
- package/dist/shared/validation/regExp.d.ts +3 -0
- package/dist/shared/validation/zodValidation/calendar.d.ts +2 -0
- package/dist/shared/validation/zodValidation/dadataFio.d.ts +6 -0
- package/dist/shared/validation/zodValidation/index.d.ts +2 -0
- package/dist/widgets/Advantages.d.ts +17 -0
- package/dist/widgets/banner/Banner.d.ts +28 -0
- package/dist/widgets/banner/index.d.ts +1 -0
- package/dist/widgets/banner/model/helpers.d.ts +4 -0
- package/dist/widgets/banner/ui/BannerButtonsGroup.d.ts +12 -0
- package/{lib/widgets/index.ts → dist/widgets/index.d.ts} +3 -3
- package/dist/widgets/pageHeader/PageHeader.d.ts +16 -0
- package/{lib/widgets/pageHeader/index.ts → dist/widgets/pageHeader/index.d.ts} +1 -1
- package/package.json +4 -1
- package/.env +0 -2
- package/.eslintrc.cjs +0 -134
- package/.github/workflows/npm-publish.yml +0 -22
- package/.github/workflows/publish.yml +0 -49
- package/.github/workflows/setup-node/action.yml +0 -22
- package/.husky/pre-commit +0 -1
- package/.prettierrc +0 -19
- package/.storybook/main.ts +0 -44
- package/.storybook/preview.tsx +0 -37
- package/chromatic.config.json +0 -5
- package/index.html +0 -13
- package/lib/client.ts +0 -80
- package/lib/configs/index.ts +0 -1
- package/lib/configs/tailwindConfigBase.ts +0 -110
- package/lib/server.ts +0 -2
- package/lib/shared/constants/api.ts +0 -2
- package/lib/shared/constants/designSystem/colors.ts +0 -117
- package/lib/shared/constants/designSystem/index.ts +0 -3
- package/lib/shared/constants/designSystem/others.ts +0 -18
- package/lib/shared/constants/designSystem/typography.ts +0 -88
- package/lib/shared/constants/index.ts +0 -2
- package/lib/shared/hooks/index.ts +0 -4
- package/lib/shared/hooks/useBoolean.ts +0 -12
- package/lib/shared/hooks/useClickOutside.ts +0 -19
- package/lib/shared/hooks/useControlledForm.ts +0 -16
- package/lib/shared/hooks/useDebounce.ts +0 -38
- package/lib/shared/style.css +0 -74
- package/lib/shared/ui/Badge.tsx +0 -20
- package/lib/shared/ui/Breadcrumbs.tsx +0 -57
- package/lib/shared/ui/ButtonIcon.tsx +0 -52
- package/lib/shared/ui/CustomLink.tsx +0 -70
- package/lib/shared/ui/Document.tsx +0 -51
- package/lib/shared/ui/Heading.tsx +0 -33
- package/lib/shared/ui/Hint.tsx +0 -62
- package/lib/shared/ui/Loader.tsx +0 -58
- package/lib/shared/ui/PhoneView.tsx +0 -23
- package/lib/shared/ui/Portal.tsx +0 -9
- package/lib/shared/ui/ProgressBar.tsx +0 -43
- package/lib/shared/ui/ResponsiveContainer.tsx +0 -11
- package/lib/shared/ui/Section.tsx +0 -15
- package/lib/shared/ui/Skeleton.tsx +0 -9
- package/lib/shared/ui/TabsSwitcher.tsx +0 -80
- package/lib/shared/ui/accordion/Accordion.tsx +0 -36
- package/lib/shared/ui/accordion/index.ts +0 -1
- package/lib/shared/ui/accordion/model/types.ts +0 -20
- package/lib/shared/ui/accordion/ui/AccordionHeader.tsx +0 -35
- package/lib/shared/ui/brandLogos.tsx +0 -14
- package/lib/shared/ui/button/Button.tsx +0 -111
- package/lib/shared/ui/button/index.ts +0 -1
- package/lib/shared/ui/button/model/helpers.ts +0 -16
- package/lib/shared/ui/calendar/Calendar.tsx +0 -228
- package/lib/shared/ui/calendar/index.ts +0 -231
- package/lib/shared/ui/calendar/model/animation.ts +0 -112
- package/lib/shared/ui/calendar/model/classes.ts +0 -34
- package/lib/shared/ui/calendar/model/helpers.ts +0 -51
- package/lib/shared/ui/calendar/model/hooks/index.ts +0 -2
- package/lib/shared/ui/calendar/model/hooks/useCalendarDropdowns.ts +0 -38
- package/lib/shared/ui/calendar/model/hooks/useDatePicker.ts +0 -103
- package/lib/shared/ui/calendar/ui/CalendarHeader.tsx +0 -54
- package/lib/shared/ui/calendar/ui/Dropdown.tsx +0 -75
- package/lib/shared/ui/calendar/ui/NavigationArrows.tsx +0 -23
- package/lib/shared/ui/calendar/ui/Weekdays.tsx +0 -16
- package/lib/shared/ui/calendar/ui/index.ts +0 -2
- package/lib/shared/ui/formControlElements/CheckboxControl.tsx +0 -92
- package/lib/shared/ui/formControlElements/FormControl.tsx +0 -5
- package/lib/shared/ui/formControlElements/InputControl.tsx +0 -68
- package/lib/shared/ui/formControlElements/InputControlMask.tsx +0 -80
- package/lib/shared/ui/formControlElements/RadioControl.tsx +0 -130
- package/lib/shared/ui/formControlElements/SelectControl.tsx +0 -185
- package/lib/shared/ui/formControlElements/SwitchControl.tsx +0 -79
- package/lib/shared/ui/formControlElements/TextareaControl.tsx +0 -92
- package/lib/shared/ui/formControlElements/calendarControl/CalendarControl.tsx +0 -175
- package/lib/shared/ui/formControlElements/calendarControl/hooks/index.ts +0 -2
- package/lib/shared/ui/formControlElements/calendarControl/hooks/useCalendar.tsx +0 -86
- package/lib/shared/ui/formControlElements/calendarControl/hooks/useCalendarDropdowns.ts +0 -38
- package/lib/shared/ui/formControlElements/calendarControl/model/helpers.ts +0 -60
- package/lib/shared/ui/formControlElements/calendarControl/model/types.ts +0 -44
- package/lib/shared/ui/formControlElements/calendarControl/ui/DaysOfMonth.tsx +0 -53
- package/lib/shared/ui/formControlElements/calendarControl/ui/DaysOfWeek.tsx +0 -28
- package/lib/shared/ui/formControlElements/calendarControl/ui/Dropdown.tsx +0 -62
- package/lib/shared/ui/formControlElements/calendarControl/ui/Header.tsx +0 -51
- package/lib/shared/ui/formControlElements/calendarControl/ui/Navigation.tsx +0 -32
- package/lib/shared/ui/formControlElements/calendarControl/ui/OptionsList.tsx +0 -44
- package/lib/shared/ui/formControlElements/calendarControl/ui/index.ts +0 -4
- package/lib/shared/ui/formControlElements/dadata/DadataInputControl.tsx +0 -132
- package/lib/shared/ui/formControlElements/dadata/model/api.ts +0 -25
- package/lib/shared/ui/formControlElements/dadata/model/helpers.ts +0 -76
- package/lib/shared/ui/formControlElements/dadata/model/types.ts +0 -52
- package/lib/shared/ui/formControlElements/dadata/model/useDadata.ts +0 -25
- package/lib/shared/ui/formControlElements/model/classes-types.ts +0 -22
- package/lib/shared/ui/formControlElements/model/index.ts +0 -2
- package/lib/shared/ui/formControlElements/model/props-types.ts +0 -26
- package/lib/shared/ui/formControlElements/ui/FieldAttachment.tsx +0 -66
- package/lib/shared/ui/formControlElements/ui/FieldContainer.tsx +0 -36
- package/lib/shared/ui/formControlElements/ui/FieldWrapper.tsx +0 -55
- package/lib/shared/ui/formControlElements/ui/MessageView.tsx +0 -37
- package/lib/shared/ui/formControlElements/ui/index.ts +0 -4
- package/lib/shared/ui/icon/Icon.tsx +0 -43
- package/lib/shared/ui/icon/sprite.gen.ts +0 -121
- package/lib/shared/ui/index.ts +0 -56
- package/lib/shared/ui/popover/Popover.tsx +0 -77
- package/lib/shared/ui/popover/index.ts +0 -1
- package/lib/shared/ui/table/Table.tsx +0 -143
- package/lib/shared/ui/table/index.ts +0 -1
- package/lib/shared/ui/table/type.ts +0 -30
- package/lib/shared/utils/capitalize.ts +0 -6
- package/lib/shared/utils/cn.ts +0 -6
- package/lib/shared/utils/deepCompare.ts +0 -1
- package/lib/shared/utils/formatToDate.ts +0 -5
- package/lib/shared/utils/index.ts +0 -5
- package/lib/shared/utils/isClient.ts +0 -1
- package/lib/shared/validation/index.ts +0 -3
- package/lib/shared/validation/messages.ts +0 -12
- package/lib/shared/validation/regExp.ts +0 -5
- package/lib/shared/validation/zodValidation/calendar.ts +0 -32
- package/lib/shared/validation/zodValidation/dadataFio.ts +0 -67
- package/lib/shared/validation/zodValidation/index.ts +0 -2
- package/lib/vite-env.d.ts +0 -2
- package/lib/widgets/Advantages.tsx +0 -45
- package/lib/widgets/banner/Banner.tsx +0 -62
- package/lib/widgets/banner/index.ts +0 -1
- package/lib/widgets/banner/model/helpers.ts +0 -44
- package/lib/widgets/banner/money.png +0 -0
- package/lib/widgets/banner/ui/BannerButtonsGroup.tsx +0 -30
- package/lib/widgets/pageHeader/PageHeader.tsx +0 -54
- package/postcss.config.mjs +0 -8
- package/src/App.tsx +0 -9
- package/src/app/providers/RootProvider.tsx +0 -11
- package/src/app/providers/index.ts +0 -1
- package/src/app/providers/model/types.ts +0 -5
- package/src/app/providers/ui/ToasterProvider.tsx +0 -23
- package/src/app/providers/ui/index.ts +0 -1
- package/src/configs/setup.ts +0 -9
- package/src/configs/storybook.config.ts +0 -23
- package/src/main.tsx +0 -10
- package/src/stories/primitives/Accordion.stories.tsx +0 -66
- package/src/stories/primitives/Badge.stories.tsx +0 -28
- package/src/stories/primitives/Breadcrumbs.stories.tsx +0 -29
- package/src/stories/primitives/Button/Button.stories.tsx +0 -149
- package/src/stories/primitives/Button/Button.test.tsx +0 -150
- package/src/stories/primitives/ButtonIcon.stories.tsx +0 -75
- package/src/stories/primitives/CustomLink.stories.tsx +0 -64
- package/src/stories/primitives/Document.stories.tsx +0 -36
- package/src/stories/primitives/Heading.stories.tsx +0 -29
- package/src/stories/primitives/Hint.stories.tsx +0 -82
- package/src/stories/primitives/Icon.stories.tsx +0 -36
- package/src/stories/primitives/Loader.stories.tsx +0 -39
- package/src/stories/primitives/PhoneView.stories.tsx +0 -22
- package/src/stories/primitives/Popover.stories.tsx +0 -41
- package/src/stories/primitives/ProgressBar.stories.tsx +0 -68
- package/src/stories/primitives/Skeleton.stories.tsx +0 -21
- package/src/stories/primitives/Table.stories.tsx +0 -44
- package/src/stories/primitives/TabsSwitcher.stories.tsx +0 -34
- package/src/stories/primitives/formControl/Calendar.stories.tsx +0 -61
- package/src/stories/primitives/formControl/CalendarControl.stories.tsx +0 -39
- package/src/stories/primitives/formControl/CheckboxControl.stories.tsx +0 -64
- package/src/stories/primitives/formControl/DadataInputControl.stories.tsx +0 -83
- package/src/stories/primitives/formControl/FormControlAllFields.stories.tsx +0 -25
- package/src/stories/primitives/formControl/InputControl.stories.tsx +0 -77
- package/src/stories/primitives/formControl/RadioContol.stories.tsx +0 -63
- package/src/stories/primitives/formControl/SelectControl.stories.tsx +0 -117
- package/src/stories/primitives/formControl/SwitchControl.stories.tsx +0 -51
- package/src/stories/primitives/formControl/TextareaControl.stories.tsx +0 -55
- package/src/stories/primitives/formControl/inputControlMask.stories.tsx +0 -69
- package/src/stories/widgets/Advantages.stories.tsx +0 -42
- package/src/stories/widgets/Banner.stories.tsx +0 -40
- package/src/stories/widgets/PageHeader.stories.tsx +0 -33
- package/src/storybookHelpers/actions.tsx +0 -5
- package/src/storybookHelpers/index.ts +0 -2
- package/src/storybookHelpers/reactHookForm/index.ts +0 -3
- package/src/storybookHelpers/reactHookForm/model/mockData.ts +0 -21
- package/src/storybookHelpers/reactHookForm/model/mocks.tsx +0 -71
- package/src/storybookHelpers/reactHookForm/model/types.ts +0 -62
- package/src/storybookHelpers/reactHookForm/ui/StorybookFieldsMapper.tsx +0 -76
- package/src/storybookHelpers/reactHookForm/ui/StorybookFormProvider.tsx +0 -43
- package/src/storybookHelpers/reactHookForm/ui/index.ts +0 -2
- package/src/storybookHelpers/table/utils/defaultValue.ts +0 -51
- package/static/arrows/arrowCircle.svg +0 -18
- package/static/arrows/arrowLink.svg +0 -3
- package/static/arrows/arrowRight.svg +0 -3
- package/static/brandLogos/logoBlack.svg +0 -14
- package/static/brandLogos/logoBusiness.svg +0 -80
- package/static/brandLogos/logoGray.svg +0 -56
- package/static/brandLogos/logoInsurance.svg +0 -124
- package/static/brandLogos/logoMain.svg +0 -14
- package/static/brandLogos/logoWhite.svg +0 -56
- package/static/files/documentFilled.svg +0 -4
- package/static/files/documentOutline.svg +0 -4
- package/static/general/calendar.svg +0 -3
- package/static/general/check.svg +0 -6
- package/static/general/close.svg +0 -12
- package/static/info/warningCircle.svg +0 -5
- package/tailwind.config.ts +0 -9
- package/tsconfig.json +0 -33
- package/tsconfig.node.json +0 -11
- package/vite.config.ts +0 -63
- package/vitest.config.mjs +0 -12
- /package/{public → dist}/sprites/arrows.svg +0 -0
- /package/{public → dist}/sprites/brandLogos.svg +0 -0
- /package/{public → dist}/sprites/common.svg +0 -0
- /package/{public → dist}/sprites/files.svg +0 -0
- /package/{public → dist}/sprites/general.svg +0 -0
- /package/{public → dist}/sprites/info.svg +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FieldError } from 'react-hook-form';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const messageViewConfig: (props?: ({
|
|
4
|
+
intent?: "error" | "simple" | null | undefined;
|
|
5
|
+
disabled?: boolean | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface IMessageViewProps extends VariantProps<typeof messageViewConfig> {
|
|
8
|
+
as?: 'div' | 'span' | 'p';
|
|
9
|
+
text?: string | FieldError['message'];
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MessageView: ({ intent, as: Element, disabled, text, className, ...props }: IMessageViewProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SpritesMap } from './sprite.gen';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type IconName<Key extends keyof SpritesMap> = `${Key}/${SpritesMap[Key]}`;
|
|
4
|
+
export type TAllowedIcons = {
|
|
5
|
+
[Key in keyof SpritesMap]: IconName<Key>;
|
|
6
|
+
}[keyof SpritesMap];
|
|
7
|
+
export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
8
|
+
name: TAllowedIcons;
|
|
9
|
+
}
|
|
10
|
+
export declare const Icon: ({ name, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Icon, type IconProps, type TAllowedIcons } from './Icon'
|
|
2
|
-
export * from './sprite.gen'
|
|
1
|
+
export { Icon, type IconProps, type TAllowedIcons } from './Icon';
|
|
2
|
+
export * from './sprite.gen';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SpritesMap {
|
|
2
|
+
arrows: 'arrowCircle' | 'arrowLink' | 'arrowRight';
|
|
3
|
+
brandLogos: 'logoBlack' | 'logoBusiness' | 'logoGray' | 'logoInsurance' | 'logoMain' | 'logoWhite';
|
|
4
|
+
files: 'documentFilled' | 'documentOutline';
|
|
5
|
+
general: 'calendar' | 'check' | 'close';
|
|
6
|
+
info: 'warningCircle';
|
|
7
|
+
}
|
|
8
|
+
export declare const SPRITES_META: {
|
|
9
|
+
[Key in keyof SpritesMap]: {
|
|
10
|
+
filePath: string;
|
|
11
|
+
items: Record<SpritesMap[Key], {
|
|
12
|
+
viewBox: string;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { Section, type ISectionProps } from './Section';
|
|
2
|
+
export { ResponsiveContainer, type IResponsiveContainerProps } from './ResponsiveContainer';
|
|
3
|
+
export { Button, type IButtonProps } from './button';
|
|
4
|
+
export { ButtonIcon, type IButtonIconProps } from './ButtonIcon';
|
|
5
|
+
export { PhoneView } from './PhoneView';
|
|
6
|
+
export { Badge, type IBadgeProps } from './Badge';
|
|
7
|
+
export { Loader, type ILoaderProps } from './Loader';
|
|
8
|
+
export { Skeleton, type ISkeletonProps } from './Skeleton';
|
|
9
|
+
export { Table } from './table';
|
|
10
|
+
export { Accordion, type IAccordionProps } from './accordion';
|
|
11
|
+
export { Hint, type IHintProps } from './Hint';
|
|
12
|
+
export { Popover } from './popover';
|
|
13
|
+
export { ProgressBar, type IProgressBarProps } from './ProgressBar';
|
|
14
|
+
export { TabsSwitcher, type ITabsSwitcherProps, type ITabRenderContent } from './TabsSwitcher';
|
|
15
|
+
export { Heading, type IHeadingProps } from './Heading';
|
|
16
|
+
export { Icon, type IconProps, type TAllowedIcons } from './icon';
|
|
17
|
+
export { brandLogos, type TBrandLogoVariant } from './brandLogos';
|
|
18
|
+
export { Breadcrumbs, type IBreadcrumbsProps } from './Breadcrumbs';
|
|
19
|
+
export { CustomLink, type ICustomLinkProps } from './CustomLink';
|
|
20
|
+
export { Document, type IDocumentProps } from './Document';
|
|
21
|
+
export { InputControl, type InputControlProps, InputControlMask, type InputControlMaskProps, FormControl, DadataInputControl, type IDadataInputControlProps, CheckboxControl, type ICheckboxControlProps, RadioControl, type IRadioControlProps, type IRadioGroupOption, SwitchControl, type ISwitchControlProps, SelectControl, type ISelectControlProps, type ISelectOption, TextareaControl, type ITextareaControlProps, CalendarControl, type ICalendarControlProps } from './formControlElements';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { PopoverContentProps as TPopoverContentPropsBase } from '@radix-ui/react-popover';
|
|
3
|
+
type TAdditionalClasses = {
|
|
4
|
+
content: string;
|
|
5
|
+
arrow: string;
|
|
6
|
+
trigger: string;
|
|
7
|
+
};
|
|
8
|
+
interface IPopoverContentProps extends TPopoverContentPropsBase {
|
|
9
|
+
sideOffset?: number;
|
|
10
|
+
alignOffset?: number;
|
|
11
|
+
align?: 'end' | 'center' | 'start';
|
|
12
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
avoidCollisions?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface IPopoverProps extends IPopoverContentProps {
|
|
17
|
+
triggerElement: ReactElement;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
classes?: Partial<TAdditionalClasses>;
|
|
20
|
+
headLine?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const Popover: ({ triggerElement, classes, sideOffset, alignOffset, align, side, defaultOpen, avoidCollisions, headLine, children, arrowPadding, ...contentProps }: IPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Popover } from './Popover';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { TableRows, TTableClasses, TTableColumnCount } from './type';
|
|
4
|
+
declare const tableConfig: (props?: ({
|
|
5
|
+
columnCount?: "twoColumns" | "threeColumns" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
type TTableProps = VariantProps<typeof tableConfig>;
|
|
8
|
+
export interface ITable<C extends TTableColumnCount> extends TTableProps {
|
|
9
|
+
headTitle: string | ReactElement;
|
|
10
|
+
columnCount: TTableColumnCount;
|
|
11
|
+
tableHead?: string[];
|
|
12
|
+
tableRows: TableRows<C>;
|
|
13
|
+
additionalText?: string;
|
|
14
|
+
classes?: Partial<TTableClasses>;
|
|
15
|
+
}
|
|
16
|
+
export declare const Table: <C extends TTableColumnCount>({ headTitle, tableRows, tableHead, additionalText, columnCount, classes }: ITable<C>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from './Table';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type TTableColumnCount = 'twoColumns' | 'threeColumns';
|
|
3
|
+
export type TableRows<C extends TTableColumnCount> = ColumnsCount<C>[];
|
|
4
|
+
export type Ceil = {
|
|
5
|
+
text: string | ReactElement;
|
|
6
|
+
};
|
|
7
|
+
export type ColumnsCount<C extends TTableColumnCount> = C extends 'twoColumns' ? [Ceil, Ceil] : C extends 'threeColumns' ? [Ceil, Ceil, Ceil] : never;
|
|
8
|
+
export type TTableClasses = {
|
|
9
|
+
tableRootWrapper: string;
|
|
10
|
+
tableHeading: string;
|
|
11
|
+
tableBody: string;
|
|
12
|
+
tableRowTitles: string;
|
|
13
|
+
tableCell: string;
|
|
14
|
+
tableAdditionalText: string;
|
|
15
|
+
tableTitlesContainer: string;
|
|
16
|
+
tableTitleCeil: string;
|
|
17
|
+
tableBodyContainer: string;
|
|
18
|
+
tableTitleRow: string;
|
|
19
|
+
tableBodyRow: string;
|
|
20
|
+
tableBodyCeil: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const capitalize: (str: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const deepCompare: <A, B>(dataA: A, dataB: B) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatToDate: (value: string, format?: string) => Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isClient: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const VALIDATION_MESSAGES: {
|
|
2
|
+
readonly REQUIRED: "Поле обязательно к заполнению";
|
|
3
|
+
readonly MIN_LENGTH: "Минимальная длина символов должна быть не менее";
|
|
4
|
+
readonly MAX_LENGTH: "Максимальная длина символов должна быть не более";
|
|
5
|
+
readonly FIX_LENGTH: "Длина символов должна быть равна";
|
|
6
|
+
readonly MAX_LENGTH_ELEMENTS: "Максимальное количество элементов должно быть не более";
|
|
7
|
+
readonly MIN_LENGTH_ELEMENTS: "Минимальное количество элементов должно быть не менее";
|
|
8
|
+
readonly FIX_LENGTH_ELEMENTS: "Количество элементов должно быть равно";
|
|
9
|
+
readonly INVALID_VALUE: "Поле заполнено некорректно";
|
|
10
|
+
readonly INVALID_DATE: "Введите корректную дату";
|
|
11
|
+
readonly FUTURE_DATE_NOT_ALLOWED: "Нельзя выбрать дату позже текущей";
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface IAdvantageClasses {
|
|
3
|
+
wrapper: string;
|
|
4
|
+
advantage: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IAdvantage {
|
|
9
|
+
title: string;
|
|
10
|
+
description: string | React.ReactElement;
|
|
11
|
+
}
|
|
12
|
+
export interface IAdvantagesProps {
|
|
13
|
+
advantagesList: IAdvantage[];
|
|
14
|
+
classes?: Partial<IAdvantageClasses>;
|
|
15
|
+
}
|
|
16
|
+
export declare const Advantages: ({ advantagesList, classes }: IAdvantagesProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IAdvantage } from '../Advantages';
|
|
2
|
+
import { IBannerButtonsGroupClasses } from './ui/BannerButtonsGroup';
|
|
3
|
+
import { IButtonProps } from '../../shared/ui';
|
|
4
|
+
interface IBannerClasses extends IBannerButtonsGroupClasses {
|
|
5
|
+
section: string;
|
|
6
|
+
container: string;
|
|
7
|
+
wrapper: string;
|
|
8
|
+
content: string;
|
|
9
|
+
textBlock: string;
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
imageContainer: string;
|
|
13
|
+
image: string;
|
|
14
|
+
advantages: string;
|
|
15
|
+
}
|
|
16
|
+
export type TButtonsConfig = {
|
|
17
|
+
primary: IButtonProps;
|
|
18
|
+
secondary?: IButtonProps;
|
|
19
|
+
};
|
|
20
|
+
export interface IBannerProps {
|
|
21
|
+
headTitle: string;
|
|
22
|
+
subtitle: string;
|
|
23
|
+
buttonsConfig: TButtonsConfig;
|
|
24
|
+
advantagesList?: IAdvantage[];
|
|
25
|
+
classes?: Partial<IBannerClasses>;
|
|
26
|
+
}
|
|
27
|
+
export declare const Banner: ({ headTitle, subtitle, buttonsConfig, advantagesList, classes }: IBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Banner } from './Banner';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TButtonsConfig } from '../Banner';
|
|
2
|
+
export interface IBannerButtonsGroupClasses {
|
|
3
|
+
group: string;
|
|
4
|
+
primary: string;
|
|
5
|
+
secondary: string;
|
|
6
|
+
}
|
|
7
|
+
interface IBannerButtonsGroupProps {
|
|
8
|
+
buttonsConfig: TButtonsConfig;
|
|
9
|
+
classes?: Partial<IBannerButtonsGroupClasses>;
|
|
10
|
+
}
|
|
11
|
+
export declare const BannerButtonsGroup: ({ buttonsConfig, classes }: IBannerButtonsGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { PageHeader, type TPageHeaderProps } from './pageHeader'
|
|
2
|
-
export { Banner } from './banner'
|
|
3
|
-
export { Advantages, type IAdvantage, type IAdvantagesProps } from './Advantages'
|
|
1
|
+
export { PageHeader, type TPageHeaderProps } from './pageHeader';
|
|
2
|
+
export { Banner } from './banner';
|
|
3
|
+
export { Advantages, type IAdvantage, type IAdvantagesProps } from './Advantages';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TBrandLogoVariant } from '../../shared/ui';
|
|
2
|
+
export interface ICommonHeaderProps {
|
|
3
|
+
logoPath?: string;
|
|
4
|
+
logoType?: TBrandLogoVariant;
|
|
5
|
+
}
|
|
6
|
+
interface IHeaderWithPhone extends ICommonHeaderProps {
|
|
7
|
+
variant: 'withPhone';
|
|
8
|
+
phone: string;
|
|
9
|
+
phoneText: string;
|
|
10
|
+
}
|
|
11
|
+
interface IHeaderWithButton extends ICommonHeaderProps {
|
|
12
|
+
variant: 'withButton';
|
|
13
|
+
}
|
|
14
|
+
export type TPageHeaderProps = IHeaderWithButton | IHeaderWithPhone;
|
|
15
|
+
export declare const PageHeader: (props: TPageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PageHeader, type TPageHeaderProps } from './PageHeader'
|
|
1
|
+
export { PageHeader, type TPageHeaderProps } from './PageHeader';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scbt-ecom/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./client": {
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"types": "./dist/types/server.d.ts"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
17
20
|
"scripts": {
|
|
18
21
|
"dev": "vite",
|
|
19
22
|
"build": "tsc -b && vite build",
|
package/.env
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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}}
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
package/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npm run pre-deploy
|
package/.prettierrc
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
}
|
package/.storybook/main.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
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
|