@scbt-ecom/ui 0.0.18 → 0.0.20
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/shared/constants/designSystem/others.d.ts +9 -1
- package/dist/shared/ui/ButtonIcon.d.ts +2 -2
- package/dist/shared/ui/CustomLink.d.ts +2 -2
- package/dist/shared/ui/Document.d.ts +13 -0
- package/dist/shared/ui/Loader.d.ts +13 -4
- package/dist/shared/ui/PhoneView.d.ts +8 -1
- package/dist/shared/ui/ProgressBar.d.ts +18 -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 +11 -5
- package/dist/shared/ui/accordion/model/types.d.ts +5 -4
- package/dist/shared/ui/accordion/ui/AccordionHeader.d.ts +2 -2
- package/dist/shared/ui/formControlElements/CheckboxControl.d.ts +3 -1
- package/dist/shared/ui/formControlElements/InputControl.d.ts +2 -2
- package/dist/shared/ui/formControlElements/InputControlMask.d.ts +2 -2
- 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/dadata/DadataInputControl.d.ts +2 -2
- package/dist/shared/ui/formControlElements/index.d.ts +4 -1
- package/dist/shared/ui/formControlElements/model/props-types.d.ts +4 -3
- package/dist/shared/ui/formControlElements/ui/FieldAttachment.d.ts +2 -1
- package/dist/shared/ui/formControlElements/ui/FieldContainer.d.ts +2 -1
- package/dist/shared/ui/formControlElements/ui/FieldWrapper.d.ts +2 -1
- package/dist/shared/ui/icon/Icon.d.ts +2 -2
- package/dist/shared/ui/icon/index.d.ts +1 -1
- package/dist/shared/ui/icon/sprite.gen.d.ts +4 -1
- package/dist/shared/ui/index.d.ts +6 -2
- package/dist/sprites/arrows.svg +1 -0
- package/dist/sprites/common.svg +1 -0
- package/dist/sprites/files.svg +1 -0
- package/dist/sprites/general.svg +1 -0
- package/dist/sprites/info.svg +1 -0
- package/dist/style.css +1 -1
- package/dist/ui.es.js +18606 -17589
- package/dist/ui.umd.js +98 -97
- package/dist/widgets/banner/Banner.d.ts +16 -1
- package/dist/widgets/banner/ui/BannerButtonsGroup.d.ts +7 -1
- package/dist/widgets/index.d.ts +1 -1
- package/dist/widgets/pageHeader/PageHeader.d.ts +2 -2
- package/dist/widgets/pageHeader/index.d.ts +1 -1
- package/package.json +6 -5
- package/dist/sprites/common.5922c9ad.svg +0 -1
- package/public/sprites/brandLogos.aa92281d.svg +0 -1
- package/public/sprites/common.5922c9ad.svg +0 -1
- /package/dist/sprites/{brandLogos.aa92281d.svg → brandLogos.svg} +0 -0
|
@@ -5,4 +5,12 @@ declare const allowedBorderRadius: {
|
|
|
5
5
|
lg: string;
|
|
6
6
|
full: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
declare const allowedBackgroundDeg: {
|
|
9
|
+
30: string;
|
|
10
|
+
45: string;
|
|
11
|
+
80: string;
|
|
12
|
+
90: string;
|
|
13
|
+
110: string;
|
|
14
|
+
180: string;
|
|
15
|
+
};
|
|
16
|
+
export { allowedBorderRadius, allowedBackgroundDeg };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, ReactElement } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
type
|
|
3
|
+
type TButtonClasses = {
|
|
4
4
|
button: string;
|
|
5
5
|
icon: string;
|
|
6
6
|
};
|
|
@@ -11,7 +11,7 @@ declare const buttonConfig: (props?: ({
|
|
|
11
11
|
type TButtonProps = VariantProps<typeof buttonConfig>;
|
|
12
12
|
export interface IButtonIconProps extends ComponentProps<'button'>, TButtonProps {
|
|
13
13
|
children: ReactElement;
|
|
14
|
-
classes?: Partial<
|
|
14
|
+
classes?: Partial<TButtonClasses>;
|
|
15
15
|
}
|
|
16
16
|
export declare const ButtonIcon: import('react').ForwardRefExoticComponent<Omit<IButtonIconProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import {
|
|
3
|
+
import { TAllowedIcons } from './icon/Icon';
|
|
4
4
|
declare const customLinkConfig: (props?: ({
|
|
5
5
|
intent?: "white" | "blue" | null | undefined;
|
|
6
6
|
withIcon?: boolean | null | undefined;
|
|
@@ -9,7 +9,7 @@ declare const customLinkConfig: (props?: ({
|
|
|
9
9
|
type TCustomLinkConfig = VariantProps<typeof customLinkConfig>;
|
|
10
10
|
export interface ICustomLinkProps extends TCustomLinkConfig, ComponentProps<'a'> {
|
|
11
11
|
Component: 'a';
|
|
12
|
-
icon?:
|
|
12
|
+
icon?: TAllowedIcons;
|
|
13
13
|
}
|
|
14
14
|
export declare const CustomLink: ({ Component, intent, children, withIcon, disabled, icon, ...props }: ICustomLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
declare const iconConfig: (props?: ({
|
|
3
|
+
intent?: "outline" | "filled" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
type TIconConfig = VariantProps<typeof iconConfig>;
|
|
6
|
+
export interface IDocumentProps extends TIconConfig {
|
|
7
|
+
text: string;
|
|
8
|
+
size: number;
|
|
9
|
+
sizeType: 'КБ' | 'МБ';
|
|
10
|
+
href: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Document: ({ text, size, sizeType, href, intent }: IDocumentProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { HTMLAttributes, ReactElement } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const wrapperConfig: (props?: ({
|
|
4
|
+
position?: "fixed" | "absolute" | "static" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
3
6
|
declare const loaderConfig: (props?: ({
|
|
4
7
|
intent?: "primary" | "secondary" | null | undefined;
|
|
5
8
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
-
position?: "fixed" | "absolute" | "static" | null | undefined;
|
|
7
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
|
|
10
|
+
type ILoaderClasses = {
|
|
11
|
+
wrapper: string;
|
|
12
|
+
loader: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
export interface ILoaderProps extends VariantProps<typeof loaderConfig>, VariantProps<typeof wrapperConfig>, HTMLAttributes<HTMLDivElement> {
|
|
9
16
|
intent?: 'primary' | 'secondary';
|
|
17
|
+
text?: ReactElement | string;
|
|
18
|
+
classes?: Partial<ILoaderClasses>;
|
|
10
19
|
}
|
|
11
|
-
export declare const Loader: ({ size,
|
|
20
|
+
export declare const Loader: ({ size, classes, intent, position, text, ...props }: ILoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
21
|
export {};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
interface IPhoneViewClasses {
|
|
2
|
+
wrapper: string;
|
|
3
|
+
link: string;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
1
6
|
export interface IPhoneViewProps {
|
|
2
7
|
phone: string;
|
|
3
8
|
text: string;
|
|
9
|
+
classes?: Partial<IPhoneViewClasses>;
|
|
4
10
|
}
|
|
5
|
-
export declare const PhoneView: ({ phone, text }: IPhoneViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const PhoneView: ({ phone, text, classes }: IPhoneViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
type IProgressBarClasses = {
|
|
3
|
+
wrapper: string;
|
|
4
|
+
topContent: string;
|
|
5
|
+
bottomContent: string;
|
|
6
|
+
progressBar: string;
|
|
7
|
+
progress: string;
|
|
8
|
+
loader: string;
|
|
9
|
+
};
|
|
10
|
+
export interface IProgressBarProps {
|
|
11
|
+
topContent?: ReactElement;
|
|
12
|
+
bottomContent?: ReactElement;
|
|
13
|
+
progress: number;
|
|
14
|
+
maxPercent?: number;
|
|
15
|
+
classes?: Partial<IProgressBarClasses>;
|
|
16
|
+
}
|
|
17
|
+
export declare const ProgressBar: ({ topContent, bottomContent, progress, maxPercent, classes }: IProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @param {string} id - для триггера и для контента должен совпадать
|
|
4
|
+
*/
|
|
5
|
+
interface ITabsClasses {
|
|
6
|
+
root: string;
|
|
7
|
+
list: string;
|
|
8
|
+
trigger: string;
|
|
9
|
+
content: string;
|
|
10
|
+
contentsWrapper: string;
|
|
11
|
+
}
|
|
12
|
+
interface ITabContent {
|
|
13
|
+
id: string;
|
|
14
|
+
body: ReactElement | string;
|
|
15
|
+
accordion?: {
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
interface ITabTrigger {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ITabRenderContent {
|
|
24
|
+
triggers: ITabTrigger[];
|
|
25
|
+
contents: ITabContent[];
|
|
26
|
+
}
|
|
27
|
+
export interface ITabsSwitcherProps {
|
|
28
|
+
renderContent: ITabRenderContent;
|
|
29
|
+
defaultActiveTabId?: string;
|
|
30
|
+
classes?: Partial<ITabsClasses>;
|
|
31
|
+
}
|
|
32
|
+
export declare const TabsSwitcher: ({ renderContent, defaultActiveTabId, classes }: ITabsSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { TAccordionHeaderClasses, TAccordionRootClasses } from './model/types';
|
|
3
|
+
/**
|
|
4
|
+
* @param {string[]} defaultOpen - По умолчанию открытые аккордеоны необходимо указать тот же label явно руками.
|
|
5
|
+
* Пример defaultValue={['Заголовок аккордеона 1', 'Заголовок аккордеона 2']}
|
|
6
|
+
*/
|
|
2
7
|
export interface IAccordionProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
label: string | ReactElement;
|
|
10
|
+
classes?: Partial<TAccordionHeaderClasses> & Partial<TAccordionRootClasses>;
|
|
11
|
+
defaultOpen?: string[];
|
|
6
12
|
}
|
|
7
|
-
export declare const Accordion: ({
|
|
13
|
+
export declare const Accordion: ({ children, label, classes, defaultOpen }: IAccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TAccordionHeaderClasses = {
|
|
3
3
|
trigger: string;
|
|
4
4
|
icon: string;
|
|
5
5
|
header: string;
|
|
6
6
|
inner: string;
|
|
7
|
-
}
|
|
8
|
-
export
|
|
7
|
+
};
|
|
8
|
+
export type TAccordionRootClasses = {
|
|
9
9
|
item: string;
|
|
10
10
|
content: string;
|
|
11
|
+
contentInner: string;
|
|
11
12
|
accordion: string;
|
|
12
|
-
}
|
|
13
|
+
};
|
|
13
14
|
export interface IAccordionItem {
|
|
14
15
|
label: string;
|
|
15
16
|
content: ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TAccordionHeaderClasses } from '../model/types';
|
|
3
3
|
interface IAccordionHeaderProps {
|
|
4
4
|
children?: ReactElement | string;
|
|
5
|
-
classes?: Partial<
|
|
5
|
+
classes?: Partial<TAccordionHeaderClasses>;
|
|
6
6
|
}
|
|
7
7
|
export declare const AccordionHeader: import('react').ForwardRefExoticComponent<IAccordionHeaderProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
8
|
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
import { FieldValues } from 'react-hook-form';
|
|
2
3
|
import { TAdditionalInputPrimitiveClasses, TControlledInputPrimitiveProps } from './model';
|
|
3
4
|
type TCheckboxClasses = Partial<TAdditionalInputPrimitiveClasses> & {
|
|
4
5
|
wrapper?: string;
|
|
5
6
|
indicator?: string;
|
|
6
7
|
};
|
|
7
|
-
export interface ICheckboxControlProps<T extends FieldValues> extends TControlledInputPrimitiveProps<T> {
|
|
8
|
+
export interface ICheckboxControlProps<T extends FieldValues> extends Omit<TControlledInputPrimitiveProps<T>, 'label'> {
|
|
8
9
|
classes?: TCheckboxClasses;
|
|
10
|
+
label: ReactElement | string;
|
|
9
11
|
}
|
|
10
12
|
export declare const CheckboxControl: <T extends FieldValues>({ control, helperText, label, disabled, classes, ...props }: ICheckboxControlProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { TAdditionalInputClassesWithAttachment, TControlledInputProps } from './model';
|
|
3
|
-
export interface InputControlProps<T extends FieldValues> extends TControlledInputProps<T
|
|
2
|
+
import { TAdditionalInputClassesWithAttachment, TControlledInputProps, TInputCommonProps } from './model';
|
|
3
|
+
export interface InputControlProps<T extends FieldValues> extends TControlledInputProps<T>, TInputCommonProps {
|
|
4
4
|
classes?: Partial<TAdditionalInputClassesWithAttachment>;
|
|
5
5
|
}
|
|
6
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { TAdditionalInputClassesWithAttachment, TControlledInputProps } from './model';
|
|
3
|
-
export interface InputControlMaskProps<T extends FieldValues> extends TControlledInputProps<T
|
|
2
|
+
import { TAdditionalInputClassesWithAttachment, TControlledInputProps, TInputCommonProps } from './model';
|
|
3
|
+
export interface InputControlMaskProps<T extends FieldValues> extends TControlledInputProps<T>, TInputCommonProps {
|
|
4
4
|
format: string;
|
|
5
5
|
mask?: string | string[];
|
|
6
6
|
allowEmptyFormatting?: boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { TControlledInputProps } from './model';
|
|
3
|
+
interface ISelectControlClasses {
|
|
4
|
+
trigger: string;
|
|
5
|
+
options: string;
|
|
6
|
+
scrollArea: string;
|
|
7
|
+
option: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
message: string;
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ISelectOption {
|
|
14
|
+
id: string;
|
|
15
|
+
optionValue: string;
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ISelectControlProps<T extends FieldValues> extends TControlledInputProps<T> {
|
|
19
|
+
classes?: Partial<ISelectControlClasses>;
|
|
20
|
+
optionsList: ISelectOption[];
|
|
21
|
+
label: string;
|
|
22
|
+
multiple?: boolean;
|
|
23
|
+
intent?: 'filled' | 'clear';
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const SelectControl: <T extends FieldValues>({ size, control, helperText, disabled, classes, optionsList, label, multiple, intent, ...props }: ISelectControlProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { TControlledInputPrimitiveProps } from './model';
|
|
3
|
+
interface ISwitchClasses {
|
|
4
|
+
wrapper: string;
|
|
5
|
+
input: string;
|
|
6
|
+
thumb: string;
|
|
7
|
+
textBlock: string;
|
|
8
|
+
label: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ISwitchControlProps<T extends FieldValues> extends TControlledInputPrimitiveProps<T> {
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
classes?: Partial<ISwitchClasses>;
|
|
14
|
+
}
|
|
15
|
+
export declare const SwitchControl: <T extends FieldValues>({ disabled, classes, control, helperText, label, ...props }: ISwitchControlProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { TAdditionalInputClassesWithAttachment, TControlledInputProps, TTextareaCommonProps } from './model';
|
|
3
|
+
type TTextareaClasses = Partial<TAdditionalInputClassesWithAttachment> & {
|
|
4
|
+
head: string;
|
|
5
|
+
scrollArea: string;
|
|
6
|
+
};
|
|
7
|
+
export interface TextareaControlProps<T extends FieldValues> extends TControlledInputProps<T>, TTextareaCommonProps {
|
|
8
|
+
classes?: Partial<TTextareaClasses>;
|
|
9
|
+
}
|
|
10
|
+
export declare const TextareaControl: <T extends FieldValues>({ label, size, helperText, control, classes, badge, icon, disabled, placeholder, ...props }: TextareaControlProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { TAdditionalInputClassesWithAttachment, TControlledInputProps } from '../model';
|
|
2
|
+
import { TAdditionalInputClassesWithAttachment, TControlledInputProps, TInputCommonProps } from '../model';
|
|
3
3
|
import { TDadataBaseUrl, TDadataType } from './model/types';
|
|
4
4
|
type TDadataClasses = Partial<TAdditionalInputClassesWithAttachment> & {
|
|
5
5
|
options?: string;
|
|
6
6
|
indentMargin?: string;
|
|
7
7
|
};
|
|
8
|
-
export interface IDadataInputControlProps<T extends FieldValues> extends TControlledInputProps<T
|
|
8
|
+
export interface IDadataInputControlProps<T extends FieldValues> extends TControlledInputProps<T>, TInputCommonProps {
|
|
9
9
|
classes?: TDadataClasses;
|
|
10
10
|
dadataType?: TDadataType;
|
|
11
11
|
dadataBaseUrl?: TDadataBaseUrl;
|
|
@@ -3,4 +3,7 @@ export { InputControlMask, type InputControlMaskProps } from './InputControlMask
|
|
|
3
3
|
export { FormControl } from './FormControl';
|
|
4
4
|
export { DadataInputControl, type IDadataInputControlProps } from './dadata';
|
|
5
5
|
export { CheckboxControl, type ICheckboxControlProps } from './CheckboxControl';
|
|
6
|
-
export { RadioControl, type IRadioControlProps } from './RadioControl';
|
|
6
|
+
export { RadioControl, type IRadioControlProps, type IRadioGroupOption } from './RadioControl';
|
|
7
|
+
export { SwitchControl, type ISwitchControlProps } from './SwitchControl';
|
|
8
|
+
export { SelectControl, type ISelectControlProps, type ISelectOption } from './SelectControl';
|
|
9
|
+
export { TextareaControl, type TextareaControlProps } from './TextareaControl';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentProps, ReactElement } from 'react';
|
|
2
2
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
3
3
|
import { TFieldContainerConfig } from '../ui/FieldContainer';
|
|
4
|
-
type
|
|
4
|
+
export type TInputCommonProps = Omit<ComponentProps<'input'>, 'name' | 'placeholder' | 'size' | 'type' | 'defaultValue'>;
|
|
5
|
+
export type TTextareaCommonProps = Omit<ComponentProps<'textarea'>, 'name' | 'size' | 'type' | 'defaultValue'>;
|
|
5
6
|
type TFieldControlledProps<T extends FieldValues> = {
|
|
6
7
|
name: Path<T>;
|
|
7
8
|
control: Control<T>;
|
|
@@ -13,6 +14,6 @@ export type TFieldAttachment = {
|
|
|
13
14
|
badge?: string;
|
|
14
15
|
icon?: ReactElement;
|
|
15
16
|
};
|
|
16
|
-
export type TControlledInputProps<T extends FieldValues> = TFieldContainerConfig &
|
|
17
|
-
export type TControlledInputPrimitiveProps<T extends FieldValues> =
|
|
17
|
+
export type TControlledInputProps<T extends FieldValues> = TFieldContainerConfig & TFieldAttachment & TFieldControlledProps<T>;
|
|
18
|
+
export type TControlledInputPrimitiveProps<T extends FieldValues> = TInputCommonProps & TFieldControlledProps<T>;
|
|
18
19
|
export {};
|
|
@@ -3,6 +3,7 @@ import { TFieldAttachment } from '../model/props-types';
|
|
|
3
3
|
interface IFieldAttachmentProps extends TFieldAttachment {
|
|
4
4
|
classes?: Partial<TFieldAttachmentClasses>;
|
|
5
5
|
error?: boolean;
|
|
6
|
+
isTextarea?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const FieldAttachment: ({ badge, icon, error, classes }: IFieldAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const FieldAttachment: ({ badge, icon, error, isTextarea, classes }: IFieldAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { TFieldContainerClasses } from '../model/classes-types';
|
|
4
4
|
declare const fieldContainerConfig: (props?: ({
|
|
5
|
+
intent?: "filled" | "clear" | null | undefined;
|
|
5
6
|
size?: "sm" | "md" | "lg" | "full" | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
8
|
export type TFieldContainerConfig = VariantProps<typeof fieldContainerConfig>;
|
|
@@ -9,5 +10,5 @@ interface IFieldContainerProps extends TFieldContainerConfig {
|
|
|
9
10
|
classes?: Partial<TFieldContainerClasses>;
|
|
10
11
|
children: ReactNode;
|
|
11
12
|
}
|
|
12
|
-
export declare const FieldContainer: ({ size, classes, children }: IFieldContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const FieldContainer: ({ size, intent, classes, children }: IFieldContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -8,6 +8,7 @@ interface IFieldWrapperProps<V> {
|
|
|
8
8
|
error?: boolean;
|
|
9
9
|
classes?: Partial<TFieldWrapperClasses>;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
isTextarea?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare const FieldWrapper: <V>({ children, error, disabled, classes, fieldId, label, value }: IFieldWrapperProps<V>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const FieldWrapper: <V>({ children, error, disabled, classes, fieldId, label, value, isTextarea }: IFieldWrapperProps<V>) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SVGProps } from 'react';
|
|
2
2
|
import { SpritesMap } from './sprite.gen';
|
|
3
3
|
export type IconName<Key extends keyof SpritesMap> = `${Key}/${SpritesMap[Key]}`;
|
|
4
|
-
export type
|
|
4
|
+
export type TAllowedIcons = {
|
|
5
5
|
[Key in keyof SpritesMap]: IconName<Key>;
|
|
6
6
|
}[keyof SpritesMap];
|
|
7
7
|
export interface IconProps extends SVGProps<SVGSVGElement> {
|
|
8
|
-
name:
|
|
8
|
+
name: TAllowedIcons;
|
|
9
9
|
}
|
|
10
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
|
|
1
|
+
export { Icon, type IconProps, type TAllowedIcons } from './Icon';
|
|
2
2
|
export * from './sprite.gen';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export interface SpritesMap {
|
|
2
|
+
arrows: 'arrowCircle' | 'arrowLink' | 'arrowRight';
|
|
2
3
|
brandLogos: 'logoBlack' | 'logoBusiness' | 'logoGray' | 'logoInsurance' | 'logoMain' | 'logoWhite';
|
|
3
|
-
|
|
4
|
+
files: 'documentFilled' | 'documentOutline';
|
|
5
|
+
general: 'check' | 'close';
|
|
6
|
+
info: 'warningCircle';
|
|
4
7
|
}
|
|
5
8
|
export declare const SPRITES_META: {
|
|
6
9
|
[Key in keyof SpritesMap]: {
|
|
@@ -5,12 +5,16 @@ export { ButtonIcon, type IButtonIconProps } from './ButtonIcon';
|
|
|
5
5
|
export { PhoneView } from './PhoneView';
|
|
6
6
|
export { Badge, type IBadgeProps } from './Badge';
|
|
7
7
|
export { Loader, type ILoaderProps } from './Loader';
|
|
8
|
+
export { Skeleton, type ISkeletonProps } from './Skeleton';
|
|
8
9
|
export { Accordion, type IAccordionProps } from './accordion';
|
|
9
10
|
export { Hint, type IHintProps } from './Hint';
|
|
10
11
|
export { Popover } from './popover';
|
|
12
|
+
export { ProgressBar, type IProgressBarProps } from './ProgressBar';
|
|
13
|
+
export { TabsSwitcher, type ITabsSwitcherProps, type ITabRenderContent } from './TabsSwitcher';
|
|
11
14
|
export { Heading, type IHeadingProps } from './Heading';
|
|
12
|
-
export { Icon, type IconProps, type
|
|
15
|
+
export { Icon, type IconProps, type TAllowedIcons } from './icon';
|
|
13
16
|
export { brandLogos, type TBrandLogoVariant } from './brandLogos';
|
|
14
17
|
export { Breadcrumbs, type IBreadcrumbsProps } from './Breadcrumbs';
|
|
15
18
|
export { CustomLink, type ICustomLinkProps } from './CustomLink';
|
|
16
|
-
export {
|
|
19
|
+
export { Document, type IDocumentProps } from './Document';
|
|
20
|
+
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 TextareaControlProps } from './formControlElements';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="arrowCircle" fill="none" viewBox="0 0 32 32"><rect width="31" height="31" x=".5" y="31.5" stroke="currentColor" rx="15.5" transform="rotate(-90 .5 31.5)"/><path fill="currentColor" stroke="currentColor" d="M22.707 18.707a1 1 0 0 1-1.414 0L16 13.414l-5.293 5.293a1 1 0 0 1-1.414-1.414l6-6a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1 0 1.414Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="arrowLink" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M8 7a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0V9.414l-8.293 8.293a1 1 0 0 1-1.414-1.414L14.586 8H9a1 1 0 0 1-1-1Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="arrowRight" fill="none" viewBox="0 0 16 17"><path fill="currentColor" d="M6.195 13.157a.667.667 0 0 1 0-.943l3.529-3.528-3.529-3.529a.667.667 0 1 1 .943-.943l4 4c.26.26.26.683 0 .943l-4 4a.667.667 0 0 1-.943 0Z"/></symbol></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="check" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m4.892 13.269 4.274 4.274L18.709 8"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="close" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M5.293 5.293a1 1 0 0 1 1.414 0L12 10.586l5.293-5.293a1 1 0 1 1 1.414 1.414L13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 0 1-1.414-1.414L10.586 12 5.293 6.707a1 1 0 0 1 0-1.414Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="documentFilled" fill="none" viewBox="0 0 22 28"><path fill="currentColor" fill-rule="evenodd" d="M.333 3.038A2.374 2.374 0 0 1 2.71.667h11.053c.26 0 .51.102.698.288l6.909 6.85c.188.188.297.444.297.714v16.443a2.374 2.374 0 0 1-2.377 2.371H2.71a2.374 2.374 0 0 1-2.377-2.371V3.038ZM2.71 2.67H11c.103 0 .201.04.274.108a.36.36 0 0 1 .113.261V9.89a1 1 0 0 0 .995 1.002h6.908c.214 0 .387.165.387.369v13.702a.378.378 0 0 1-.387.369H2.71a.378.378 0 0 1-.387-.37V3.039c0-.204.173-.369.387-.369Zm10.909.595a.4.4 0 0 1 .423.086l4.955 4.913a.356.356 0 0 1 .077.4.388.388 0 0 1-.356.225h-4.955a.378.378 0 0 1-.386-.369V3.606a.37.37 0 0 1 .242-.342Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M11 2.67H2.71a.378.378 0 0 0-.387.368v21.924c0 .204.173.369.387.369h16.58a.378.378 0 0 0 .387-.37V11.26a.378.378 0 0 0-.387-.37h-6.908a.998.998 0 0 1-.995-1V3.037a.36.36 0 0 0-.113-.26.397.397 0 0 0-.274-.109Zm0 9.925c-.535 0-.995.3-.995.867v4.766a.37.37 0 0 1-.242.342.4.4 0 0 1-.424-.086l-.404-.401a.99.99 0 0 0-1.397 0 1.006 1.006 0 0 0 0 1.426l2.764 2.74a.99.99 0 0 0 1.396 0l2.763-2.74a1.006 1.006 0 0 0 0-1.426.99.99 0 0 0-1.396 0l-.404.4a.4.4 0 0 1-.424.087.37.37 0 0 1-.242-.342v-4.766c0-.567-.46-.867-.995-.867Z" clip-rule="evenodd"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="documentOutline" fill="none" viewBox="0 0 22 28"><path fill="currentColor" d="M.333 3.333A2.667 2.667 0 0 1 3 .667h10.667c.353 0 .692.14.943.39l6.666 6.667c.25.25.39.589.39.943v16A2.667 2.667 0 0 1 19 27.333H3a2.667 2.667 0 0 1-2.667-2.666V3.333Zm18.115 5.334-4.781-4.781v4.78h4.78ZM11 3.333H3v21.334h16V11.333h-6.667A1.333 1.333 0 0 1 11 10V3.333Z"/><path fill="currentColor" d="M9.941 13.722c0-.597.49-1.055 1.059-1.055.57 0 1.059.458 1.059 1.055v3.735a.39.39 0 0 0 .258.361c.156.06.334.023.45-.091l.431-.423a1.06 1.06 0 0 1 1.486 0c.421.413.421 1.09 0 1.503l-2.94 2.89a1.06 1.06 0 0 1-1.487 0l-2.941-2.89a1.053 1.053 0 0 1 0-1.503 1.06 1.06 0 0 1 1.486 0l.43.423a.43.43 0 0 0 .451.091.39.39 0 0 0 .258-.36v-3.736Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="warningCircle" fill="none" viewBox="0 0 20 20"><path fill="currentColor" d="M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM0 10C0 4.477 4.477 0 10 0s10 4.477 10 10-4.477 10-10 10S0 15.523 0 10Z"/><path fill="currentColor" d="M10 12a1 1 0 0 1-1-1V5a1 1 0 0 1 2 0v6a1 1 0 0 1-1 1Zm-1.5 2.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z"/></symbol></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="documentFilled" fill="none" viewBox="0 0 22 28"><path fill="currentColor" fill-rule="evenodd" d="M.333 3.038A2.374 2.374 0 0 1 2.71.667h11.053c.26 0 .51.102.698.288l6.909 6.85c.188.188.297.444.297.714v16.443a2.374 2.374 0 0 1-2.377 2.371H2.71a2.374 2.374 0 0 1-2.377-2.371V3.038ZM2.71 2.67H11c.103 0 .201.04.274.108a.36.36 0 0 1 .113.261V9.89a1 1 0 0 0 .995 1.002h6.908c.214 0 .387.165.387.369v13.702a.378.378 0 0 1-.387.369H2.71a.378.378 0 0 1-.387-.37V3.039c0-.204.173-.369.387-.369Zm10.909.595a.4.4 0 0 1 .423.086l4.955 4.913a.356.356 0 0 1 .077.4.388.388 0 0 1-.356.225h-4.955a.378.378 0 0 1-.386-.369V3.606a.37.37 0 0 1 .242-.342Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M11 2.67H2.71a.378.378 0 0 0-.387.368v21.924c0 .204.173.369.387.369h16.58a.378.378 0 0 0 .387-.37V11.26a.378.378 0 0 0-.387-.37h-6.908a.998.998 0 0 1-.995-1V3.037a.36.36 0 0 0-.113-.26.397.397 0 0 0-.274-.109Zm0 9.925c-.535 0-.995.3-.995.867v4.766a.37.37 0 0 1-.242.342.4.4 0 0 1-.424-.086l-.404-.401a.99.99 0 0 0-1.397 0 1.006 1.006 0 0 0 0 1.426l2.764 2.74a.99.99 0 0 0 1.396 0l2.763-2.74a1.006 1.006 0 0 0 0-1.426.99.99 0 0 0-1.396 0l-.404.4a.4.4 0 0 1-.424.087.37.37 0 0 1-.242-.342v-4.766c0-.567-.46-.867-.995-.867Z" clip-rule="evenodd"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="documentOutline" fill="none" viewBox="0 0 22 28"><path fill="currentColor" d="M.333 3.333A2.667 2.667 0 0 1 3 .667h10.667c.353 0 .692.14.943.39l6.666 6.667c.25.25.39.589.39.943v16A2.667 2.667 0 0 1 19 27.333H3a2.667 2.667 0 0 1-2.667-2.666V3.333Zm18.115 5.334-4.781-4.781v4.78h4.78ZM11 3.333H3v21.334h16V11.333h-6.667A1.333 1.333 0 0 1 11 10V3.333Z"/><path fill="currentColor" d="M9.941 13.722c0-.597.49-1.055 1.059-1.055.57 0 1.059.458 1.059 1.055v3.735a.39.39 0 0 0 .258.361c.156.06.334.023.45-.091l.431-.423a1.06 1.06 0 0 1 1.486 0c.421.413.421 1.09 0 1.503l-2.94 2.89a1.06 1.06 0 0 1-1.487 0l-2.941-2.89a1.053 1.053 0 0 1 0-1.503 1.06 1.06 0 0 1 1.486 0l.43.423a.43.43 0 0 0 .451.091.39.39 0 0 0 .258-.36v-3.736Z"/></symbol></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="check" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m4.892 13.269 4.274 4.274L18.709 8"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="close" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M5.293 5.293a1 1 0 0 1 1.414 0L12 10.586l5.293-5.293a1 1 0 1 1 1.414 1.414L13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 0 1-1.414-1.414L10.586 12 5.293 6.707a1 1 0 0 1 0-1.414Z"/></symbol></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="warningCircle" fill="none" viewBox="0 0 20 20"><path fill="currentColor" d="M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM0 10C0 4.477 4.477 0 10 0s10 4.477 10 10-4.477 10-10 10S0 15.523 0 10Z"/><path fill="currentColor" d="M10 12a1 1 0 0 1-1-1V5a1 1 0 0 1 2 0v6a1 1 0 0 1-1 1Zm-1.5 2.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z"/></symbol></svg>
|