@scbt-ecom/ui 0.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.
Files changed (81) hide show
  1. package/README.md +47 -0
  2. package/dist/index.d.ts +6 -0
  3. package/dist/shared/constants/api.d.ts +2 -0
  4. package/dist/shared/constants/designSystem/colors.d.ts +120 -0
  5. package/dist/shared/constants/designSystem/index.d.ts +3 -0
  6. package/dist/shared/constants/designSystem/others.d.ts +8 -0
  7. package/dist/shared/constants/designSystem/typography.d.ts +75 -0
  8. package/dist/shared/constants/index.d.ts +2 -0
  9. package/dist/shared/hooks/index.d.ts +4 -0
  10. package/dist/shared/hooks/useBoolean.d.ts +3 -0
  11. package/dist/shared/hooks/useClickOutside.d.ts +2 -0
  12. package/dist/shared/hooks/useControlledForm.d.ts +7 -0
  13. package/dist/shared/hooks/useDebounce.d.ts +3 -0
  14. package/dist/shared/ui/Badge.d.ts +6 -0
  15. package/dist/shared/ui/Breadcrumbs.d.ts +15 -0
  16. package/dist/shared/ui/ButtonIcon.d.ts +17 -0
  17. package/dist/shared/ui/CustomLink.d.ts +15 -0
  18. package/dist/shared/ui/Heading.d.ts +12 -0
  19. package/dist/shared/ui/Hint.d.ts +21 -0
  20. package/dist/shared/ui/Loader.d.ts +12 -0
  21. package/dist/shared/ui/PhoneView.d.ts +5 -0
  22. package/dist/shared/ui/Portal.d.ts +7 -0
  23. package/dist/shared/ui/ResponsiveContainer.d.ts +6 -0
  24. package/dist/shared/ui/Section.d.ts +6 -0
  25. package/dist/shared/ui/accordion/Accordion.d.ts +7 -0
  26. package/dist/shared/ui/accordion/index.d.ts +1 -0
  27. package/dist/shared/ui/accordion/model/types.d.ts +16 -0
  28. package/dist/shared/ui/accordion/ui/AccordionHeader.d.ts +8 -0
  29. package/dist/shared/ui/brandLogos.d.ts +5 -0
  30. package/dist/shared/ui/button/Button.d.ts +17 -0
  31. package/dist/shared/ui/button/index.d.ts +1 -0
  32. package/dist/shared/ui/button/model/helpers.d.ts +2 -0
  33. package/dist/shared/ui/formControlElements/CheckboxControl.d.ts +11 -0
  34. package/dist/shared/ui/formControlElements/FormControl.d.ts +3 -0
  35. package/dist/shared/ui/formControlElements/InputControl.d.ts +6 -0
  36. package/dist/shared/ui/formControlElements/InputControlMask.d.ts +10 -0
  37. package/dist/shared/ui/formControlElements/RadioControl.d.ts +26 -0
  38. package/dist/shared/ui/formControlElements/dadata/DadataInputControl.d.ts +14 -0
  39. package/dist/shared/ui/formControlElements/dadata/index.d.ts +1 -0
  40. package/dist/shared/ui/formControlElements/dadata/model/api.d.ts +2 -0
  41. package/dist/shared/ui/formControlElements/dadata/model/helpers.d.ts +7 -0
  42. package/dist/shared/ui/formControlElements/dadata/model/types.d.ts +42 -0
  43. package/dist/shared/ui/formControlElements/dadata/model/useDadata.d.ts +6 -0
  44. package/dist/shared/ui/formControlElements/index.d.ts +6 -0
  45. package/dist/shared/ui/formControlElements/model/classes-types.d.ts +18 -0
  46. package/dist/shared/ui/formControlElements/model/index.d.ts +2 -0
  47. package/dist/shared/ui/formControlElements/model/props-types.d.ts +18 -0
  48. package/dist/shared/ui/formControlElements/ui/FieldAttachment.d.ts +8 -0
  49. package/dist/shared/ui/formControlElements/ui/FieldContainer.d.ts +13 -0
  50. package/dist/shared/ui/formControlElements/ui/FieldWrapper.d.ts +13 -0
  51. package/dist/shared/ui/formControlElements/ui/MessageView.d.ts +13 -0
  52. package/dist/shared/ui/formControlElements/ui/index.d.ts +4 -0
  53. package/dist/shared/ui/icon/Icon.d.ts +10 -0
  54. package/dist/shared/ui/icon/index.d.ts +2 -0
  55. package/dist/shared/ui/icon/sprite.gen.d.ts +14 -0
  56. package/dist/shared/ui/index.d.ts +16 -0
  57. package/dist/shared/ui/popover/Popover.d.ts +23 -0
  58. package/dist/shared/ui/popover/index.d.ts +1 -0
  59. package/dist/shared/utils/capitalize.d.ts +1 -0
  60. package/dist/shared/utils/capitalize.test.d.ts +1 -0
  61. package/dist/shared/utils/cn.d.ts +2 -0
  62. package/dist/shared/utils/deepCompare.d.ts +1 -0
  63. package/dist/shared/utils/index.d.ts +4 -0
  64. package/dist/shared/utils/isClient.d.ts +1 -0
  65. package/dist/shared/validation/index.d.ts +3 -0
  66. package/dist/shared/validation/messages.d.ts +10 -0
  67. package/dist/shared/validation/regExp.d.ts +3 -0
  68. package/dist/shared/validation/zodValidation/dadataFio.d.ts +6 -0
  69. package/dist/shared/validation/zodValidation/index.d.ts +1 -0
  70. package/dist/style.css +1 -0
  71. package/dist/ui.es.js +35759 -0
  72. package/dist/ui.umd.js +287 -0
  73. package/dist/widgets/Advantages.d.ts +8 -0
  74. package/dist/widgets/banner/Banner.d.ts +11 -0
  75. package/dist/widgets/banner/index.d.ts +1 -0
  76. package/dist/widgets/banner/model/helpers.d.ts +3 -0
  77. package/dist/widgets/banner/ui/BannerButtonsGroup.d.ts +6 -0
  78. package/dist/widgets/index.d.ts +3 -0
  79. package/dist/widgets/pageHeader/PageHeader.d.ts +16 -0
  80. package/dist/widgets/pageHeader/index.d.ts +1 -0
  81. package/package.json +128 -0
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+
14
+ - Configure the top-level `parserOptions` property like this:
15
+
16
+ ```js
17
+ export default {
18
+ // other rules...
19
+ parserOptions: {
20
+ ecmaVersion: 'latest',
21
+ sourceType: 'module',
22
+ project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.app.json'],
23
+ tsconfigRootDir: __dirname
24
+ }
25
+ }
26
+ ```
27
+
28
+ - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29
+ - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
31
+
32
+ ## Тестирование
33
+
34
+ - На проекте для unit тестирования используется vitest, документация — https://vitest.dev/
35
+ - Все тесты лежат в папке test, она полностью должно дублировать структуру папки lib, собственно, что мы и тестируем
36
+ - Снепшоты создаются также с помощью vitest, функция toMatchSnapshot(). Тут главное не нужно создавать на всё подряд их, желательно для реакт компонентов, каких-то больших и сложных объектов, конфигурационных файлов, API-ответов, сложных выходных данных
37
+ - Чтобы обновить снепшоты введите
38
+
39
+ ```
40
+ npx vitest -u
41
+ ```
42
+
43
+ - Скриншотное тестирование работает с помощью chromatic — https://storybook.js.org/docs/writing-tests/visual-testing
44
+ - При запуске Storybook вы увидите новую дополнительную панель для визуальных тестов, где вы можете запускать тесты и просматривать результаты.
45
+ - Чтобы включить визуальное тестирование, зарегистрируйтесь в Chromatic и создайте проект. Это даст вам доступ к парку облачных браузеров.
46
+ - Выберите проект из списка проектов, чтобы завершить настройку. Если вы настраиваете дополнение впервые, файлы конфигурации и необходимые идентификаторы проектов будут добавлены для вас автоматически
47
+ - Нажмите кнопку ▶️ Play на боковой панели Storybook, чтобы запустить визуальные тесты. Это отправит ваши истории в облако для создания снимков и обнаружения визуальных изменений.
@@ -0,0 +1,6 @@
1
+ export * from './shared/constants';
2
+ export * from './shared/hooks';
3
+ export * from './shared/ui';
4
+ export * from './shared/utils';
5
+ export * from './shared/validation';
6
+ export * from './widgets';
@@ -0,0 +1,2 @@
1
+ export declare const DADATA_BASE_CACHE_URL: any;
2
+ export declare const DADATA_BASE_CONSTANTS_URL: any;
@@ -0,0 +1,120 @@
1
+ declare const allowedBackgroundColors: {
2
+ readonly transparent: string;
3
+ readonly current: string;
4
+ readonly inherit: string;
5
+ readonly initial: string;
6
+ readonly 'blue-grey-100': "#f3f4f7";
7
+ readonly 'blue-grey-200': "#eaedf1";
8
+ readonly 'blue-grey-300': "#d4dbe2";
9
+ readonly 'blue-grey-500': "#a9b6c5";
10
+ readonly footer: "#40465a";
11
+ readonly negative: "#f42500";
12
+ readonly 'negative-light': "#ffd2ca";
13
+ readonly positive: "#76bc21";
14
+ readonly 'positive-light': "#e4f6ce";
15
+ readonly 'primary-default': "#003790";
16
+ readonly 'primary-focus': "#2477ff";
17
+ readonly 'primary-hover': "#042e73";
18
+ readonly 'primary-light-default': "#f0f4f9";
19
+ readonly 'primary-tr-focus': "#0037901f";
20
+ readonly 'primary-tr-hover': "#00379014";
21
+ readonly 'primary-tr-pressed': "#00379033";
22
+ readonly 'secondary-default': "#fc5055";
23
+ readonly 'secondary-hover': "#f12f34";
24
+ readonly warning: "#f49f00";
25
+ readonly 'warning-light': "#ffeecc";
26
+ readonly white: "#ffffff";
27
+ readonly 'primary-disabled': "#809bc7";
28
+ readonly 'secondary-disabled': "#FFB7BF";
29
+ };
30
+ declare const allowedTextColors: {
31
+ readonly transparent: string;
32
+ readonly current: string;
33
+ readonly inherit: string;
34
+ readonly initial: string;
35
+ readonly dark: "#292929";
36
+ readonly disabled: "#a9b6c5";
37
+ readonly footer: "#c3c3c3";
38
+ readonly negative: "#f42500";
39
+ readonly positive: "#76bc21";
40
+ readonly 'primary-default': "#003790";
41
+ readonly 'primary-hover': "#042e73";
42
+ readonly secondary: "#40465a";
43
+ readonly tetriary: "#5a6e85";
44
+ readonly warning: "#f49f00";
45
+ readonly white: "#ffffff";
46
+ readonly 'primary-disabled': "#809bc7";
47
+ readonly 'blue-grey-600': "#94a4b7";
48
+ };
49
+ declare const allowedBannersBackgroundColors: {
50
+ readonly transparent: string;
51
+ readonly current: string;
52
+ readonly inherit: string;
53
+ readonly initial: string;
54
+ readonly 'barvcray-200': "#ebeef4";
55
+ readonly 'barvcray-300': "#dde1e8";
56
+ readonly 'greymint-200': "#deecee";
57
+ readonly 'lavender-100': "#f7f7ff";
58
+ readonly 'lavender-200': "#ecedfa";
59
+ readonly 'lavender-300': "#d0d3f1";
60
+ readonly 'lightblue-300': "#bed3ec";
61
+ readonly 'mint-200': "#e4f5ed";
62
+ readonly 'salmon-200': "#faecec";
63
+ readonly 'skyblue-100': "#f4f8fe";
64
+ readonly 'skyblue-200': "#e7f3ff";
65
+ readonly 'skyblue-300': "#d9edff";
66
+ };
67
+ declare const allowedIconsColors: {
68
+ readonly transparent: string;
69
+ readonly current: string;
70
+ readonly inherit: string;
71
+ readonly initial: string;
72
+ readonly 'accent-default': "#2477ff";
73
+ readonly 'accent-hover': "#0053da";
74
+ readonly 'blue-grey-100': "#f3f4f7";
75
+ readonly 'blue-grey-600': "#94a4b7";
76
+ readonly 'blue-grey-700': "#69809a";
77
+ readonly 'blue-grey-800': "#5a6e85";
78
+ readonly 'dark-default': "#292929";
79
+ readonly 'dark-hover': "#535353";
80
+ readonly disabled: "#a9b6c5";
81
+ readonly 'negative-default': "#f42500";
82
+ readonly 'negative-hover': "#c31e00";
83
+ readonly 'positive-default': "#76bc21";
84
+ readonly 'positive-hover': "#598d19";
85
+ readonly 'primary-default': "#003790";
86
+ readonly 'primary-hover': "#042e73";
87
+ readonly 'secondary-dark-default': "#f12f34";
88
+ readonly 'secondary-dark-hover': "#c40309";
89
+ readonly 'secondary-default': "#fc5055";
90
+ readonly 'secondary-hover': "#f12f34";
91
+ readonly 'warning-default': "#f49f00";
92
+ readonly 'warning-hover': "#d68b00";
93
+ readonly white: "#ffffff";
94
+ readonly 'primary-disabled': "#809bc7";
95
+ readonly footer: "#C3C3C3";
96
+ };
97
+ declare const allowedStrokeColors: {
98
+ readonly transparent: string;
99
+ readonly current: string;
100
+ readonly inherit: string;
101
+ readonly initial: string;
102
+ readonly 'blue-grey-500': "#a9b6c5";
103
+ readonly 'blue-grey-700': "#69809a";
104
+ readonly 'blue-grey-800': "#5a6e85";
105
+ readonly dark: "#292929";
106
+ readonly negative: "#f42500";
107
+ readonly positive: "#76bc21";
108
+ readonly 'primary-default': "#003790";
109
+ readonly 'primary-focus': "#2477ff";
110
+ readonly 'primary-hover': "#042e73";
111
+ readonly 'primary-light': "#f0f4f9";
112
+ readonly 'secondary-default': "#fc5055";
113
+ readonly 'secondary-hover': "#f12f34";
114
+ readonly 'warm-grey-200': "#e4e4e4";
115
+ readonly 'warm-grey-300': "#c3c3c3";
116
+ readonly warning: "#f49f00";
117
+ readonly white: "#ffffff";
118
+ readonly 'primary-disabled': "#809bc7";
119
+ };
120
+ export { allowedStrokeColors, allowedBannersBackgroundColors, allowedIconsColors, allowedTextColors, allowedBackgroundColors };
@@ -0,0 +1,3 @@
1
+ export * from './colors';
2
+ export * from './others';
3
+ export * from './typography';
@@ -0,0 +1,8 @@
1
+ declare const allowedBorderRadius: {
2
+ none: string;
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ full: string;
7
+ };
8
+ export { allowedBorderRadius };
@@ -0,0 +1,75 @@
1
+ declare const allowedFontSize: {
2
+ 12: string;
3
+ 14: string;
4
+ 16: string;
5
+ 18: string;
6
+ 20: string;
7
+ 24: string;
8
+ 28: string;
9
+ 32: string;
10
+ 40: string;
11
+ };
12
+ declare const allowedLineHeight: {
13
+ 16: string;
14
+ 20: string;
15
+ 22: string;
16
+ 24: string;
17
+ 30: string;
18
+ 32: string;
19
+ 40: string;
20
+ 48: string;
21
+ };
22
+ declare const allowedTextStyles: {
23
+ '.mob-headline-bold-m': {
24
+ '@apply font-bold text-28 leading-32': string;
25
+ };
26
+ '.mob-headline-bold-s': {
27
+ '@apply font-bold text-24 leading-30': string;
28
+ };
29
+ '.mob-title-bold-l': {
30
+ '@apply font-bold text-20 leading-24': string;
31
+ };
32
+ '.mob-title-bold-m ': {
33
+ ' @apply font-bold text-18 leading-22': string;
34
+ };
35
+ '.mob-body-medium-l': {
36
+ '@apply font-medium text-16 leading-22': string;
37
+ };
38
+ '.mob-body-regular-l': {
39
+ '@apply font-normal text-16 leading-22': string;
40
+ };
41
+ '.mob-body-medium-m': {
42
+ '@apply font-medium text-14 leading-20': string;
43
+ };
44
+ '.mob-body-regular-m': {
45
+ '@apply font-normal text-14 leading-20': string;
46
+ };
47
+ '.mob-body-regular-s': {
48
+ '@apply font-normal text-12 leading-20': string;
49
+ };
50
+ '.desk-headline-bold-l': {
51
+ '@apply font-bold text-40 leading-48': string;
52
+ };
53
+ '.desk-headline-bold-m': {
54
+ '@apply font-bold text-32 leading-40': string;
55
+ };
56
+ '.desk-title-bold-l': {
57
+ '@apply font-bold text-24 leading-30': string;
58
+ };
59
+ '.desk-title-bold-s': {
60
+ '@apply font-bold text-18 leading-22': string;
61
+ };
62
+ '.desk-body-medium-l': {
63
+ '@apply font-medium text-16 leading-22': string;
64
+ };
65
+ '.desk-body-regular-l': {
66
+ '@apply font-normal text-16 leading-22': string;
67
+ };
68
+ '.desk-body-regular-m': {
69
+ '@apply font-normal text-14 leading-20': string;
70
+ };
71
+ '.desk-body-regular-s': {
72
+ '@apply font-normal text-12 leading-16': string;
73
+ };
74
+ };
75
+ export { allowedLineHeight, allowedFontSize, allowedTextStyles };
@@ -0,0 +1,2 @@
1
+ export * from './designSystem';
2
+ export * from './api';
@@ -0,0 +1,4 @@
1
+ export { useBoolean } from './useBoolean';
2
+ export { useClickOutside } from './useClickOutside';
3
+ export { useControlledForm } from './useControlledForm';
4
+ export { useDebounceValue, debounce, useDebounceCallback } from './useDebounce';
@@ -0,0 +1,3 @@
1
+ type UseBooleanReturn = [value: boolean, action: (val?: boolean) => void];
2
+ export declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
3
+ export {};
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useClickOutside: (ref: RefObject<HTMLElement>, callback: () => void) => void;
@@ -0,0 +1,7 @@
1
+ import { UseFormProps } from 'react-hook-form';
2
+ import { TypeOf, ZodTypeAny } from 'zod';
3
+ interface UseControlledForm<T extends ZodTypeAny> extends UseFormProps<TypeOf<T>> {
4
+ schema: T;
5
+ }
6
+ export declare const useControlledForm: <T extends ZodTypeAny>({ schema, ...formConfig }: UseControlledForm<T>) => import('react-hook-form').UseFormReturn<TypeOf<T>, any, undefined>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const debounce: <Params extends unknown[]>(callback: (...args: Params) => void, delay: number) => ((...args: Params) => void);
2
+ export declare const useDebounceCallback: <Params extends unknown[], Return>(callback: (...args: Params) => Return, delay: number) => (...args: Params) => void;
3
+ export declare const useDebounceValue: <Value>(value: Value, delay: number) => Value;
@@ -0,0 +1,6 @@
1
+ import { ReactElement } from 'react';
2
+ export interface IBadgeProps {
3
+ children: ReactElement | string;
4
+ className?: string;
5
+ }
6
+ export declare const Badge: ({ children, className }: IBadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ export interface IBreadcrumbLink {
2
+ label: string;
3
+ path: string;
4
+ isDisabled?: boolean;
5
+ }
6
+ interface IBreadcrumbLinkWithoutPath {
7
+ label: string;
8
+ isDisabled?: boolean;
9
+ }
10
+ export type TLinksList = [...IBreadcrumbLink[], IBreadcrumbLinkWithoutPath];
11
+ export interface IBreadcrumbsProps {
12
+ linksList: TLinksList;
13
+ }
14
+ export declare const Breadcrumbs: ({ linksList }: IBreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ComponentProps, ReactElement } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ type TAdditionalClasses = {
4
+ button: string;
5
+ icon: string;
6
+ };
7
+ declare const buttonConfig: (props?: ({
8
+ intent?: "primary" | "secondary" | "ghost" | null | undefined;
9
+ size?: "sm" | "md" | "lg" | null | undefined;
10
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
11
+ type TButtonProps = VariantProps<typeof buttonConfig>;
12
+ export interface IButtonIconProps extends ComponentProps<'button'>, TButtonProps {
13
+ children: ReactElement;
14
+ classes?: Partial<TAdditionalClasses>;
15
+ }
16
+ export declare const ButtonIcon: import('react').ForwardRefExoticComponent<Omit<IButtonIconProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
17
+ export {};
@@ -0,0 +1,15 @@
1
+ import { ComponentProps } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { AnyIconName } from './icon/Icon';
4
+ declare const customLinkConfig: (props?: ({
5
+ intent?: "white" | "blue" | null | undefined;
6
+ withIcon?: boolean | null | undefined;
7
+ disabled?: boolean | null | undefined;
8
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
+ type TCustomLinkConfig = VariantProps<typeof customLinkConfig>;
10
+ export interface ICustomLinkProps extends TCustomLinkConfig, ComponentProps<'a'> {
11
+ Component: 'a';
12
+ icon?: AnyIconName;
13
+ }
14
+ export declare const CustomLink: ({ Component, intent, children, withIcon, disabled, icon, ...props }: ICustomLinkProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const headingConfig: (props?: ({
4
+ as?: "h1" | "h2" | "h3" | "h4" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface IHeadingProps extends VariantProps<typeof headingConfig> {
7
+ children: ReactNode;
8
+ className?: string;
9
+ as?: 'h1' | 'h2' | 'h3' | 'h4';
10
+ }
11
+ export declare const Heading: ({ as, children, className, ...props }: IHeadingProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ReactElement } from 'react';
2
+ import { TooltipContentProps } from '@radix-ui/react-tooltip';
3
+ type TAdditionalClasses = {
4
+ content: string;
5
+ arrow: string;
6
+ trigger: string;
7
+ };
8
+ export interface IHintContentProps extends TooltipContentProps {
9
+ delayDuration?: number;
10
+ sideOffset?: number;
11
+ align?: 'end' | 'center' | 'start';
12
+ side?: 'top' | 'right' | 'bottom' | 'left';
13
+ defaultOpen?: boolean;
14
+ }
15
+ export interface IHintProps extends IHintContentProps {
16
+ triggerElement: ReactElement;
17
+ children: ReactElement | string;
18
+ classes?: Partial<TAdditionalClasses>;
19
+ }
20
+ export declare const Hint: ({ triggerElement, children, delayDuration, sideOffset, align, side, defaultOpen, classes, ...contentProps }: IHintProps) => import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const loaderConfig: (props?: ({
4
+ intent?: "primary" | "secondary" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ position?: "fixed" | "absolute" | "static" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export interface ILoaderProps extends VariantProps<typeof loaderConfig>, HTMLAttributes<HTMLDivElement> {
9
+ intent?: 'primary' | 'secondary';
10
+ }
11
+ export declare const Loader: ({ size, className, intent, position, ...props }: ILoaderProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface IPhoneViewProps {
2
+ phone: string;
3
+ text: string;
4
+ }
5
+ export declare const PhoneView: ({ phone, text }: IPhoneViewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface IPortalProps {
3
+ children: ReactNode;
4
+ container?: HTMLElement;
5
+ }
6
+ export declare const Portal: ({ children, container }: IPortalProps) => import('react').ReactPortal;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface IResponsiveContainerProps extends HTMLAttributes<HTMLDivElement> {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const ResponsiveContainer: ({ children, className }: IResponsiveContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface ISectionProps extends HTMLAttributes<HTMLDivElement> {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const Section: ({ children, className, ...props }: ISectionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { IAccordionHeaderClasses, IAccordionItem, IAccordionRootClasses } from './model/types';
2
+ export interface IAccordionProps {
3
+ accordionItems: IAccordionItem[];
4
+ classes?: Partial<IAccordionRootClasses> & Partial<IAccordionHeaderClasses>;
5
+ defaultValue?: string[];
6
+ }
7
+ export declare const Accordion: ({ accordionItems, classes, defaultValue }: IAccordionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Accordion, type IAccordionProps } from './Accordion';
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IAccordionHeaderClasses {
3
+ trigger: string;
4
+ icon: string;
5
+ header: string;
6
+ inner: string;
7
+ }
8
+ export interface IAccordionRootClasses {
9
+ item: string;
10
+ content: string;
11
+ accordion: string;
12
+ }
13
+ export interface IAccordionItem {
14
+ label: string;
15
+ content: ReactNode;
16
+ }
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from 'react';
2
+ import { IAccordionHeaderClasses } from '../model/types';
3
+ interface IAccordionHeaderProps {
4
+ children?: ReactElement | string;
5
+ classes?: Partial<IAccordionHeaderClasses>;
6
+ }
7
+ export declare const AccordionHeader: import('react').ForwardRefExoticComponent<IAccordionHeaderProps & import('react').RefAttributes<HTMLButtonElement>>;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+ export type TBrandLogoVariant = 'main' | 'white' | 'gray' | 'black' | 'business' | 'insurance';
3
+ type TBrandLogosVariants = Record<TBrandLogoVariant, ReactElement>;
4
+ export declare const brandLogos: TBrandLogosVariants;
5
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ComponentProps, ReactElement } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const buttonConfig: (props?: ({
4
+ intent?: "primary" | "secondary" | "ghost" | "red" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ textFormat?: "initial" | "capitalize" | "uppercase" | "lowercase" | null | undefined;
7
+ isLoading?: boolean | null | undefined;
8
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
+ type TButtonConfig = VariantProps<typeof buttonConfig>;
10
+ export type TButtonIntents = 'primary' | 'secondary' | 'ghost' | 'red';
11
+ export interface IButtonProps extends ComponentProps<'button'>, TButtonConfig {
12
+ iconLeft?: ReactElement;
13
+ iconRight?: ReactElement;
14
+ isLoading?: boolean;
15
+ }
16
+ export declare const Button: import('react').ForwardRefExoticComponent<Omit<IButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
17
+ export {};
@@ -0,0 +1 @@
1
+ export { Button, type IButtonProps } from './Button';
@@ -0,0 +1,2 @@
1
+ import { TButtonIntents } from '../Button';
2
+ export declare const setButtonLoaderIntent: (intent: TButtonIntents) => "primary" | "secondary";
@@ -0,0 +1,11 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { TAdditionalInputPrimitiveClasses, TControlledInputPrimitiveProps } from './model';
3
+ type TCheckboxClasses = Partial<TAdditionalInputPrimitiveClasses> & {
4
+ wrapper?: string;
5
+ indicator?: string;
6
+ };
7
+ export interface ICheckboxControlProps<T extends FieldValues> extends TControlledInputPrimitiveProps<T> {
8
+ classes?: TCheckboxClasses;
9
+ }
10
+ export declare const CheckboxControl: <T extends FieldValues>({ control, helperText, label, disabled, classes, ...props }: ICheckboxControlProps<T>) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface IFormControlProps {
2
+ }
3
+ export declare const FormControl: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { TAdditionalInputClassesWithAttachment, TControlledInputProps } from './model';
3
+ export interface InputControlProps<T extends FieldValues> extends TControlledInputProps<T> {
4
+ classes?: Partial<TAdditionalInputClassesWithAttachment>;
5
+ }
6
+ export declare const InputControl: <T extends FieldValues>({ label, size, helperText, control, classes, badge, icon, disabled, ...props }: InputControlProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { TAdditionalInputClassesWithAttachment, TControlledInputProps } from './model';
3
+ export interface InputControlMaskProps<T extends FieldValues> extends TControlledInputProps<T> {
4
+ format: string;
5
+ mask?: string | string[];
6
+ allowEmptyFormatting?: boolean;
7
+ onInputChange?: (arg?: string) => void;
8
+ classes?: Partial<TAdditionalInputClassesWithAttachment>;
9
+ }
10
+ export declare const InputControlMask: <T extends FieldValues>({ format, allowEmptyFormatting, mask, control, onInputChange, size, helperText, label, classes, disabled, badge, icon, ...props }: InputControlMaskProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { TAdditionalInputPrimitiveClasses, TControlledInputPrimitiveProps } from './model';
4
+ declare const radioOptionsConfig: (props?: ({
5
+ orientation?: "horizontal" | "vertical" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ type TRadioClasses = Partial<TAdditionalInputPrimitiveClasses> & {
8
+ groupName?: string;
9
+ radioGroup?: string;
10
+ radioOption?: string;
11
+ indicator?: string;
12
+ };
13
+ export interface IRadioGroupOption {
14
+ label: string;
15
+ value: string;
16
+ isDisabled?: boolean;
17
+ }
18
+ type TRadioOptionsConfig = VariantProps<typeof radioOptionsConfig>;
19
+ export interface IRadioControlProps<T extends FieldValues> extends TRadioOptionsConfig, Omit<TControlledInputPrimitiveProps<T>, 'label'> {
20
+ radioItemsGroup: IRadioGroupOption[];
21
+ groupName?: string;
22
+ classes?: TRadioClasses;
23
+ label?: never;
24
+ }
25
+ export declare const RadioControl: <T extends FieldValues>({ radioItemsGroup, control, groupName, helperText, disabled, classes, orientation, ...props }: IRadioControlProps<T>) => import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,14 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { TAdditionalInputClassesWithAttachment, TControlledInputProps } from '../model';
3
+ import { TDadataBaseUrl, TDadataType } from './model/types';
4
+ type TDadataClasses = Partial<TAdditionalInputClassesWithAttachment> & {
5
+ options?: string;
6
+ indentMargin?: string;
7
+ };
8
+ export interface IDadataInputControlProps<T extends FieldValues> extends TControlledInputProps<T> {
9
+ classes?: TDadataClasses;
10
+ dadataType?: TDadataType;
11
+ dadataBaseUrl?: TDadataBaseUrl;
12
+ }
13
+ export declare const DadataInputControl: <T extends FieldValues>({ control, helperText, classes, size, label, disabled, dadataType, dadataBaseUrl, badge, icon, ...props }: IDadataInputControlProps<T>) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1 @@
1
+ export { DadataInputControl, type IDadataInputControlProps } from './DadataInputControl';
@@ -0,0 +1,2 @@
1
+ import { TDadataBaseUrl, TDadataType } from './types';
2
+ export declare const fetchSuggestions: (searchText: string, dadataType: TDadataType, dadataBaseUrl: TDadataBaseUrl) => Promise<import('./types').IDadataCountryOption[] | import('./types').IDadataAutoOption[] | import('./types').IDadataCacheOption<unknown>[]>;
@@ -0,0 +1,7 @@
1
+ import { IDadataAutoOption, IDadataCacheOption, IDadataCountryOption, TDadataBaseUrl, TDadataReturn, TDadataSuggestionType, TDadataType } from './types';
2
+ export declare const getDadataBaseUrl: (baseUrl: TDadataBaseUrl) => any;
3
+ export declare const getDataByDadataType: <T>(dadataType: TDadataType, data: TDadataReturn<T>) => IDadataCountryOption[] | IDadataAutoOption[] | IDadataCacheOption<T>[];
4
+ export declare const getOptionsByDadataType: <T>(dadataType: TDadataType, suggestions: TDadataSuggestionType<T>) => {
5
+ value: string;
6
+ label: string;
7
+ }[];