@scbt-ecom/ui 0.157.1 → 0.158.0
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/lib/exports/widget.js +1 -1
- package/dist/lib/shared/style.css +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/combobox.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/hooks/useCombobox.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/model/utils.js.map +1 -1
- package/dist/lib/widgets/dynamicForm/DynamicForm.js +1 -1
- package/dist/lib/widgets/dynamicForm/DynamicForm.js.map +1 -1
- package/dist/lib/widgets/dynamicForm/model/helpers.js +1 -1
- package/dist/lib/widgets/dynamicForm/model/helpers.js.map +1 -1
- package/dist/lib/widgets/dynamicForm/model/index.js +1 -1
- package/dist/lib/widgets/dynamicFormDialog/DynamicFormDialog.js +1 -1
- package/dist/lib/widgets/dynamicFormDialog/DynamicFormDialog.js.map +1 -1
- package/dist/lib/widgets/esia/Esia.js +2 -0
- package/dist/lib/widgets/esia/Esia.js.map +1 -0
- package/dist/lib/widgets/esia/index.js +2 -0
- package/dist/lib/widgets/esia/ui/EsiaLogo.js.map +1 -0
- package/dist/lib/widgets/esia/ui/TextBlock.js +2 -0
- package/dist/lib/widgets/esia/ui/TextBlock.js.map +1 -0
- package/dist/lib/widgets/esia/ui/index.js +2 -0
- package/dist/lib/widgets/index.js +1 -1
- package/dist/lib/widgets/model/helpers.js +2 -2
- package/dist/lib/widgets/model/helpers.js.map +1 -1
- package/dist/lib/widgets/usefulInfo/UsefulInfo.js.map +1 -1
- package/dist/lib/widgets/usefulInfo/ui/Tabs.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/lib/shared/ui/formElements/uncontrolled/combobox/combobox.d.ts +2 -2
- package/dist/types/lib/shared/ui/formElements/uncontrolled/combobox/hooks/useCombobox.d.ts +2 -2
- package/dist/types/lib/widgets/dynamicForm/DynamicForm.d.ts +5 -4
- package/dist/types/lib/widgets/dynamicForm/model/helpers.d.ts +1 -2
- package/dist/types/lib/widgets/dynamicForm/model/types.d.ts +0 -7
- package/dist/types/lib/widgets/dynamicFormDialog/DynamicFormDialog.d.ts +4 -4
- package/dist/types/lib/widgets/dynamicFormDialog/model/types.d.ts +0 -4
- package/dist/types/lib/widgets/esia/Esia.d.ts +23 -0
- package/dist/types/lib/widgets/esia/index.d.ts +1 -0
- package/dist/types/lib/widgets/esia/ui/TextBlock.d.ts +15 -0
- package/dist/types/lib/widgets/esia/ui/index.d.ts +2 -0
- package/dist/types/lib/widgets/index.d.ts +1 -1
- package/dist/types/lib/widgets/model/helpers.d.ts +2 -2
- package/dist/types/lib/widgets/usefulInfo/UsefulInfo.d.ts +2 -2
- package/dist/types/lib/widgets/usefulInfo/index.d.ts +1 -0
- package/dist/types/lib/widgets/usefulInfo/model/types.d.ts +3 -3
- package/dist/types/lib/widgets/usefulInfo/ui/Tabs.d.ts +2 -2
- package/package.json +1 -6
- package/dist/lib/widgets/authProvider/AuthProvider.js +0 -2
- package/dist/lib/widgets/authProvider/AuthProvider.js.map +0 -1
- package/dist/lib/widgets/authProvider/index.js +0 -2
- package/dist/lib/widgets/authProvider/model/helpers.js +0 -2
- package/dist/lib/widgets/authProvider/model/helpers.js.map +0 -1
- package/dist/lib/widgets/authProvider/model/index.js +0 -2
- package/dist/lib/widgets/authProvider/model/types.js +0 -2
- package/dist/lib/widgets/authProvider/model/types.js.map +0 -1
- package/dist/lib/widgets/authProvider/ui/Esia.js +0 -2
- package/dist/lib/widgets/authProvider/ui/Esia.js.map +0 -1
- package/dist/lib/widgets/authProvider/ui/MobileId.js +0 -2
- package/dist/lib/widgets/authProvider/ui/MobileId.js.map +0 -1
- package/dist/lib/widgets/authProvider/ui/index.js +0 -2
- package/dist/lib/widgets/authProvider/ui/index.js.map +0 -1
- package/dist/lib/widgets/authProvider/ui/ui/AuthWrapper.js +0 -2
- package/dist/lib/widgets/authProvider/ui/ui/AuthWrapper.js.map +0 -1
- package/dist/lib/widgets/authProvider/ui/ui/EsiaLogo.js.map +0 -1
- package/dist/lib/widgets/authProvider/ui/ui/Links.js +0 -2
- package/dist/lib/widgets/authProvider/ui/ui/Links.js.map +0 -1
- package/dist/lib/widgets/authProvider/ui/ui/index.js +0 -2
- package/dist/lib/widgets/authProvider/ui/ui/index.js.map +0 -1
- package/dist/types/lib/widgets/authProvider/AuthProvider.d.ts +0 -2
- package/dist/types/lib/widgets/authProvider/index.d.ts +0 -2
- package/dist/types/lib/widgets/authProvider/model/helpers.d.ts +0 -5
- package/dist/types/lib/widgets/authProvider/model/index.d.ts +0 -2
- package/dist/types/lib/widgets/authProvider/model/types.d.ts +0 -69
- package/dist/types/lib/widgets/authProvider/ui/Esia.d.ts +0 -2
- package/dist/types/lib/widgets/authProvider/ui/MobileId.d.ts +0 -2
- package/dist/types/lib/widgets/authProvider/ui/index.d.ts +0 -2
- package/dist/types/lib/widgets/authProvider/ui/ui/AuthWrapper.d.ts +0 -12
- package/dist/types/lib/widgets/authProvider/ui/ui/Links.d.ts +0 -12
- package/dist/types/lib/widgets/authProvider/ui/ui/index.d.ts +0 -3
- /package/dist/lib/widgets/{authProvider → esia}/index.js.map +0 -0
- /package/dist/lib/widgets/{authProvider/ui → esia}/ui/EsiaLogo.js +0 -0
- /package/dist/lib/widgets/{authProvider/model → esia/ui}/index.js.map +0 -0
- /package/dist/types/lib/widgets/{authProvider/ui → esia}/ui/EsiaLogo.d.ts +0 -0
|
@@ -12,7 +12,7 @@ export type ComboboxClasses = {
|
|
|
12
12
|
} & DropdownListClasses;
|
|
13
13
|
input?: InputBaseProps['classes'];
|
|
14
14
|
};
|
|
15
|
-
export type ExternalHandlers<Multi extends boolean> = {
|
|
15
|
+
export type ExternalHandlers<Multi extends boolean = false> = {
|
|
16
16
|
changeHandler?: ChangeHandler<Multi>;
|
|
17
17
|
clickHandler?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
18
18
|
blurHandler?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
@@ -20,7 +20,7 @@ export type ExternalHandlers<Multi extends boolean> = {
|
|
|
20
20
|
inputChangeHandler?: (value: string) => void;
|
|
21
21
|
onKeyDown?: (value: React.KeyboardEventHandler<HTMLInputElement>) => void;
|
|
22
22
|
};
|
|
23
|
-
export interface ComboboxProps<Multi extends boolean> extends Omit<DropdownListProps<Multi>, 'options' | 'value' | 'onChange' | 'onBlur'>, Record<`data-${string}`, unknown> {
|
|
23
|
+
export interface ComboboxProps<Multi extends boolean = false> extends Omit<DropdownListProps<Multi>, 'options' | 'value' | 'onChange' | 'onBlur'>, Record<`data-${string}`, unknown> {
|
|
24
24
|
/**
|
|
25
25
|
* Список опций
|
|
26
26
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExternalHandlers } from '../combobox';
|
|
2
2
|
import { ChangeHandler, ComboboxValue } from '../model';
|
|
3
3
|
import { ComboboxItemOption } from '../ui';
|
|
4
|
-
type UseComboboxOptions<Multi extends boolean> = {
|
|
4
|
+
type UseComboboxOptions<Multi extends boolean = false> = {
|
|
5
5
|
initialOptions: ComboboxItemOption[];
|
|
6
6
|
searchable?: boolean;
|
|
7
7
|
multiple?: Multi;
|
|
@@ -14,7 +14,7 @@ type UseComboboxOptions<Multi extends boolean> = {
|
|
|
14
14
|
externalOnInputChange?: (value: string) => void;
|
|
15
15
|
filterDisabled?: boolean;
|
|
16
16
|
};
|
|
17
|
-
export declare const useCombobox: <Multi extends boolean>(props: UseComboboxOptions<Multi>) => {
|
|
17
|
+
export declare const useCombobox: <Multi extends boolean = false>(props: UseComboboxOptions<Multi>) => {
|
|
18
18
|
open: boolean;
|
|
19
19
|
setOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
20
20
|
changeHandler: (newValue: ComboboxItemOption) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EsiaProps } from '../esia';
|
|
2
|
+
import { Approvement, ApprovementClasses, ApprovementType, Chips, ChipsClasses, ChipsType, Progress, ProgressField, ProgressType, SubmitProps } from './model';
|
|
2
3
|
import { FieldValidation } from '../../../src/shared/utils';
|
|
3
4
|
import { BackgroundColors } from '../../shared/constants';
|
|
4
5
|
import { ButtonProps, ProgressBar } from '../../shared/ui';
|
|
@@ -13,7 +14,7 @@ export type DynamicFormClasses = {
|
|
|
13
14
|
progressBar?: React.ComponentProps<typeof ProgressBar>['classes'];
|
|
14
15
|
submit?: string;
|
|
15
16
|
};
|
|
16
|
-
export type DynamicFormProps<AType extends ApprovementType, CType extends ChipsType, PType extends ProgressType
|
|
17
|
+
export type DynamicFormProps<AType extends ApprovementType, CType extends ChipsType, PType extends ProgressType> = {
|
|
17
18
|
fields: FieldElement<any, any, {
|
|
18
19
|
validation: FieldValidation;
|
|
19
20
|
progress: ProgressField;
|
|
@@ -26,9 +27,9 @@ export type DynamicFormProps<AType extends ApprovementType, CType extends ChipsT
|
|
|
26
27
|
submitProps?: SubmitProps;
|
|
27
28
|
classes?: DynamicFormClasses;
|
|
28
29
|
buttonGroup: ButtonProps[];
|
|
29
|
-
auth: Auth<AuthType>;
|
|
30
30
|
backgroundColor?: BackgroundColors;
|
|
31
31
|
disabledButtons?: boolean;
|
|
32
|
+
esiaConfig?: EsiaProps;
|
|
32
33
|
};
|
|
33
|
-
export declare const DynamicForm: <AType extends ApprovementType, CType extends ChipsType, PType extends ProgressType
|
|
34
|
+
export declare const DynamicForm: <AType extends ApprovementType, CType extends ChipsType, PType extends ProgressType>({ fields, title, progress, approvement, chips, submitProps, classes, buttonGroup, ssoAuthorizationTop, backgroundColor, disabledButtons, esiaConfig }: DynamicFormProps<AType, CType, PType>) => import("react/jsx-runtime").JSX.Element;
|
|
34
35
|
export default DynamicForm;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { Approvement, ApprovementClasses, ApprovementType,
|
|
2
|
+
import { Approvement, ApprovementClasses, ApprovementType, Progress, ProgressField, ProgressType } from './types';
|
|
3
3
|
import { ISubscribedField } from '../../../shared/hooks';
|
|
4
4
|
import { CheckedState } from '../../../shared/ui/formElements/uncontrolled/checkbox/Checkbox';
|
|
5
5
|
import { FieldElement } from '../../fieldMapper';
|
|
6
|
-
export declare const withAuthProvider: <Mode extends AuthMode>(auth: Auth<Mode>) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export declare const withApprovement: <Type extends ApprovementType>(approvement: Approvement<Type>, checked: CheckedState, onCheckedChange: (checked: CheckedState) => void, classes?: ApprovementClasses) => React.ReactNode;
|
|
8
7
|
export declare const getFieldsProgress: <TFieldValues extends FieldValues, Type extends ProgressType>(progress: Progress<Type>, fields: FieldElement<any, any, {
|
|
9
8
|
progress: ProgressField;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { AuthCombine, AuthEsia, AuthMobileId } from '../../authProvider';
|
|
3
2
|
import { AllowedIcons, CheckboxBase } from '../../../shared/ui';
|
|
4
3
|
type ApprovementDisabled = {
|
|
5
4
|
type: 'off';
|
|
@@ -53,10 +52,4 @@ export type ApprovementClasses = {
|
|
|
53
52
|
checkbox?: React.ComponentProps<typeof CheckboxBase>['classes'];
|
|
54
53
|
content?: string;
|
|
55
54
|
};
|
|
56
|
-
export type AuthMode = 'off' | 'esia' | 'mobileId' | 'combine';
|
|
57
|
-
type AuthDisabled = {
|
|
58
|
-
mode: 'off';
|
|
59
|
-
isLoading?: boolean;
|
|
60
|
-
};
|
|
61
|
-
export type Auth<Mode extends AuthMode> = Mode extends 'off' ? AuthDisabled : Mode extends 'esia' ? AuthEsia : Mode extends 'mobileId' ? AuthMobileId : AuthCombine;
|
|
62
55
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FieldValues } from 'react-hook-form';
|
|
2
|
-
import { Auth, AuthMode } from '../dynamicForm/model';
|
|
3
2
|
import { Approvement, ApprovementType } from './model';
|
|
4
3
|
import { FieldValidation } from '../../../src/shared/utils';
|
|
5
4
|
import { ButtonProps } from '../../shared/ui/button/Button';
|
|
6
5
|
import { CheckboxBase } from '../../shared/ui/formElements/uncontrolled/checkbox/Checkbox';
|
|
6
|
+
import { EsiaProps } from '..';
|
|
7
7
|
import { FieldElement } from '../fieldMapper';
|
|
8
8
|
type SubmitProps = {
|
|
9
9
|
submitCallback: <T extends FieldValues>(values: T) => void;
|
|
@@ -21,7 +21,7 @@ type DynamicFormDialogClasses = {
|
|
|
21
21
|
approvement?: ApprovementClasses;
|
|
22
22
|
submit?: string;
|
|
23
23
|
};
|
|
24
|
-
export type DynamicFormDialogProps<AType extends ApprovementType
|
|
24
|
+
export type DynamicFormDialogProps<AType extends ApprovementType> = React.DialogHTMLAttributes<HTMLDialogElement> & {
|
|
25
25
|
fields: FieldElement<any, any, {
|
|
26
26
|
validation: FieldValidation;
|
|
27
27
|
}>[];
|
|
@@ -31,9 +31,9 @@ export type DynamicFormDialogProps<AType extends ApprovementType, AuthType exten
|
|
|
31
31
|
submitProps?: SubmitProps;
|
|
32
32
|
classes?: DynamicFormDialogClasses;
|
|
33
33
|
buttonGroup: ButtonProps[];
|
|
34
|
-
auth: Auth<AuthType>;
|
|
35
34
|
ssoAuthorizationTop?: boolean;
|
|
36
35
|
disabledButtons?: boolean;
|
|
36
|
+
esiaConfig?: EsiaProps;
|
|
37
37
|
};
|
|
38
|
-
export declare const DynamicFormDialog: <AType extends ApprovementType
|
|
38
|
+
export declare const DynamicFormDialog: <AType extends ApprovementType>({ fields, title, approvement, submitProps, dialogId, classes, buttonGroup, ssoAuthorizationTop, disabledButtons, esiaConfig, ...props }: DynamicFormDialogProps<AType>) => import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export default DynamicFormDialog;
|
|
@@ -11,8 +11,4 @@ type ApprovementText = {
|
|
|
11
11
|
};
|
|
12
12
|
export type ApprovementType = 'off' | 'checkbox' | 'text';
|
|
13
13
|
export type Approvement<Type extends ApprovementType> = Type extends 'checkbox' ? ApprovementCheckbox : Type extends 'text' ? ApprovementText : ApprovementDisabled;
|
|
14
|
-
export type ProgressField = {
|
|
15
|
-
progress: number;
|
|
16
|
-
maxPercent: number;
|
|
17
|
-
};
|
|
18
14
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
|
3
|
+
import { TextBlockClasses, TextBlockProps } from './ui';
|
|
4
|
+
import { LoaderProps } from '../../shared/ui';
|
|
5
|
+
type EsiaClasses = {
|
|
6
|
+
root?: string;
|
|
7
|
+
wrapper?: string;
|
|
8
|
+
innerWrapper?: string;
|
|
9
|
+
textWrapper?: string;
|
|
10
|
+
esiaLogo?: string;
|
|
11
|
+
arrowIcon?: string;
|
|
12
|
+
badge?: string;
|
|
13
|
+
textBlock?: TextBlockClasses;
|
|
14
|
+
};
|
|
15
|
+
export interface EsiaProps extends Pick<TextBlockProps, 'titles' | 'description'>, ComponentProps<'button'> {
|
|
16
|
+
classes?: EsiaClasses;
|
|
17
|
+
badge?: string;
|
|
18
|
+
loaderProps?: LoaderProps;
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
onClick: <T extends FieldValues>(values: T) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const Esia: ({ isLoading, disabled, classes, titles, description, badge, onClick, loaderProps, ...props }: EsiaProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Esia';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type TextBlockClasses = {
|
|
2
|
+
root?: string;
|
|
3
|
+
titles?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
};
|
|
6
|
+
export interface TextBlockProps {
|
|
7
|
+
isMobile: boolean;
|
|
8
|
+
classes?: TextBlockClasses;
|
|
9
|
+
titles: {
|
|
10
|
+
desktopTitle: string;
|
|
11
|
+
mobileTitle: string;
|
|
12
|
+
};
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TextBlock: ({ titles, description, isMobile, classes }: TextBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,6 @@ export * from './banner';
|
|
|
4
4
|
export * from './footer';
|
|
5
5
|
export * from './stepper';
|
|
6
6
|
export * from './longBanner';
|
|
7
|
-
export * from './authProvider';
|
|
8
7
|
export * from './interLinking';
|
|
9
8
|
export * from './usefulInfo';
|
|
10
9
|
export * from './dynamicForm';
|
|
@@ -22,4 +21,5 @@ export * from './userFeedback';
|
|
|
22
21
|
export * from './table';
|
|
23
22
|
export * from './conditionBlock';
|
|
24
23
|
export * from './carouselBlock';
|
|
24
|
+
export * from './esia';
|
|
25
25
|
export { queryClient } from './queryClientProvider';
|
|
@@ -4,8 +4,8 @@ export declare const WIDGET_LIST_MAP: {
|
|
|
4
4
|
readonly seoHeader: import('react').LazyExoticComponent<({ categories, helpers, phone, breadcrumbs, classes }: import('..').SeoHeaderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
readonly banner: import('react').LazyExoticComponent<({ variant, ...props }: import('..').BannerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
6
|
readonly calculator: import('react').LazyExoticComponent<({ calculators, headline, classes }: import('..').CalculatorProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
-
readonly form: import('react').LazyExoticComponent<(<AType extends import('../dynamicForm/model').ApprovementType, CType extends import('../dynamicForm/model').ChipsType, PType extends import('../dynamicForm/model').ProgressType
|
|
8
|
-
readonly formDialog: import('react').LazyExoticComponent<(<AType extends import('../dynamicFormDialog/model').ApprovementType
|
|
7
|
+
readonly form: import('react').LazyExoticComponent<(<AType extends import('../dynamicForm/model').ApprovementType, CType extends import('../dynamicForm/model').ChipsType, PType extends import('../dynamicForm/model').ProgressType>({ fields, title, progress, approvement, chips, submitProps, classes, buttonGroup, ssoAuthorizationTop, backgroundColor, disabledButtons, esiaConfig }: import('..').DynamicFormProps<AType, CType, PType>) => import("react/jsx-runtime").JSX.Element)>;
|
|
8
|
+
readonly formDialog: import('react').LazyExoticComponent<(<AType extends import('../dynamicFormDialog/model').ApprovementType>({ fields, title, approvement, submitProps, dialogId, classes, buttonGroup, ssoAuthorizationTop, disabledButtons, esiaConfig, ...props }: import('../dynamicFormDialog/DynamicFormDialog').DynamicFormDialogProps<AType>) => import("react/jsx-runtime").JSX.Element)>;
|
|
9
9
|
readonly stepper: import('react').LazyExoticComponent<(<WithImages extends boolean>({ steppers, headline, classes }: import('..').StepperProps<WithImages>) => import("react/jsx-runtime").JSX.Element)>;
|
|
10
10
|
readonly benefit: import('react').LazyExoticComponent<({ headline, details, variant, classes }: import('..').BenefitProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
11
|
readonly longBanner: import('react').LazyExoticComponent<(<Enabled extends boolean>({ headline, buttonConfig, intent, details, images, backgroundColor, classes }: import('..').LongBannerProps<Enabled>) => import("react/jsx-runtime").JSX.Element)>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntitiesAccordionsConfig,
|
|
1
|
+
import { EntitiesAccordionsConfig, UsefulInfoTab } from './model';
|
|
2
2
|
import { EntityClasses, TabsClasses } from './ui';
|
|
3
3
|
export type UsefulInfoClasses = {
|
|
4
4
|
root?: string;
|
|
@@ -11,7 +11,7 @@ export type UsefulInfoClasses = {
|
|
|
11
11
|
};
|
|
12
12
|
export type UsefulInfoProps = {
|
|
13
13
|
headline: string;
|
|
14
|
-
tabs:
|
|
14
|
+
tabs: UsefulInfoTab[];
|
|
15
15
|
classes?: UsefulInfoClasses;
|
|
16
16
|
accordionsConfig?: EntitiesAccordionsConfig;
|
|
17
17
|
};
|
|
@@ -22,13 +22,13 @@ export type Entity<Variant extends EntityVariant = EntityVariant> = {
|
|
|
22
22
|
variant: Variant;
|
|
23
23
|
details: EntityDetailsMap[Variant];
|
|
24
24
|
};
|
|
25
|
-
export type
|
|
25
|
+
export type UsefulInfoTabContents = {
|
|
26
26
|
entity: Entity;
|
|
27
27
|
entityId: string;
|
|
28
28
|
};
|
|
29
|
-
export type
|
|
29
|
+
export type UsefulInfoTab = {
|
|
30
30
|
tabName: string;
|
|
31
|
-
contents:
|
|
31
|
+
contents: UsefulInfoTabContents[];
|
|
32
32
|
tabId: string;
|
|
33
33
|
dataLayers?: DataLayers;
|
|
34
34
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { UsefulInfoTab } from '../model';
|
|
3
3
|
export type TabsClasses = {
|
|
4
4
|
tabs?: string;
|
|
5
5
|
button?: string;
|
|
6
6
|
};
|
|
7
|
-
type TabsShortInfo = Pick<
|
|
7
|
+
type TabsShortInfo = Pick<UsefulInfoTab, 'tabName' | 'dataLayers'> & {};
|
|
8
8
|
export interface TabsProps {
|
|
9
9
|
tabsShortInfo?: TabsShortInfo[];
|
|
10
10
|
activeTab?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scbt-ecom/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.158.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -60,11 +60,6 @@
|
|
|
60
60
|
"import": "./dist/lib/widgets/longBanner/index.js",
|
|
61
61
|
"require": "./dist/lib/widgets/longBanner/index.js"
|
|
62
62
|
},
|
|
63
|
-
"./widgets/authProvider": {
|
|
64
|
-
"types": "./dist/types/lib/widgets/authProvider/index.d.ts",
|
|
65
|
-
"import": "./dist/lib/widgets/authProvider/index.js",
|
|
66
|
-
"require": "./dist/lib/widgets/authProvider/index.js"
|
|
67
|
-
},
|
|
68
63
|
"./widgets/interLinking": {
|
|
69
64
|
"types": "./dist/types/lib/widgets/interLinking/index.d.ts",
|
|
70
65
|
"import": "./dist/lib/widgets/interLinking/index.js",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e}from"react/jsx-runtime";import*as f from"react";import{cn as r}from"../../shared/utils/cn.js";import{Esia as m}from"./ui/Esia.js";import{MobileId as p}from"./ui/MobileId.js";import{AUTH_PROVIDER_MODE as c}from"./model/helpers.js";import{Badge as g}from"../../shared/ui/badge/Badge.js";const E=t=>{switch(t.mode){case c.ESIA:return e(m,{...t});case c.MOBILE_ID:return e(p,{...t});case c.COMBINE:default:const{esiaConfig:d,mobileIdConfig:n,subtitle:a,badge:l,classes:o}=t,u=!a&&!l?f.Fragment:"div",s="p-0 outline-0 h-[74px]";return i("div",{className:r("flex w-full flex-col items-center justify-center gap-2 rounded-sm bg-color-white px-2 py-4 outline outline-1 outline-warm-grey-200 desktop:w-[524px] desktop:p-4",o?.root),children:[i(u,{className:r("flex w-full items-center justify-between gap-2",o?.topContent),children:[a&&e("h5",{className:r("desk-body-regular-l flex flex-1 text-color-dark",o?.subtitle),children:a}),l&&e(g,{className:r("bg-color-positive",o?.badge),children:l})]}),i("div",{className:r("grid w-full grid-cols-2 gap-2 desktop:gap-4",o?.authWrapper),children:[e(m,{...d,classes:{authWrapper:{root:s},root:s,arrowIcon:"hidden",...d.classes}}),e(p,{...n,classes:{root:s,authWrapper:{root:s},arrowIcon:"hidden",...n.classes}})]})]})}};export{E as AuthProvider};
|
|
2
|
-
//# sourceMappingURL=AuthProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthProvider.js","sources":["../../../../lib/widgets/authProvider/AuthProvider.tsx"],"sourcesContent":["import * as React from 'react'\nimport { AUTH_PROVIDER_MODE, type AuthVariant } from './model'\nimport { Esia, MobileId } from './ui'\nimport { Badge } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport const AuthProvider = (props: AuthVariant) => {\n switch (props.mode) {\n // Esia\n case AUTH_PROVIDER_MODE.ESIA:\n return <Esia {...props} />\n // MobileId\n case AUTH_PROVIDER_MODE.MOBILE_ID:\n return <MobileId {...props} />\n // MobileId & Esia\n case AUTH_PROVIDER_MODE.COMBINE:\n default:\n const { esiaConfig, mobileIdConfig, subtitle, badge, classes } = props\n const HeadWrapper = !subtitle && !badge ? React.Fragment : 'div'\n const rootStyles = 'p-0 outline-0 h-[74px]'\n\n return (\n <div\n className={cn(\n 'flex w-full flex-col items-center justify-center gap-2 rounded-sm bg-color-white px-2 py-4 outline outline-1 outline-warm-grey-200 desktop:w-[524px] desktop:p-4',\n classes?.root\n )}\n >\n <HeadWrapper className={cn('flex w-full items-center justify-between gap-2', classes?.topContent)}>\n {subtitle && <h5 className={cn('desk-body-regular-l flex flex-1 text-color-dark', classes?.subtitle)}>{subtitle}</h5>}\n {badge && <Badge className={cn('bg-color-positive', classes?.badge)}>{badge}</Badge>}\n </HeadWrapper>\n <div className={cn('grid w-full grid-cols-2 gap-2 desktop:gap-4', classes?.authWrapper)}>\n <Esia\n {...esiaConfig}\n classes={{\n authWrapper: {\n root: rootStyles\n },\n root: rootStyles,\n arrowIcon: 'hidden',\n ...esiaConfig.classes\n }}\n />\n <MobileId\n {...mobileIdConfig}\n classes={{\n root: rootStyles,\n authWrapper: {\n root: rootStyles\n },\n arrowIcon: 'hidden',\n ...mobileIdConfig.classes\n }}\n />\n </div>\n </div>\n )\n }\n}\n"],"names":["AuthProvider","props","AUTH_PROVIDER_MODE","jsx","Esia","MobileId","esiaConfig","mobileIdConfig","subtitle","badge","classes","HeadWrapper","React","rootStyles","jsxs","cn","Badge"],"mappings":"uTAMO,MAAMA,EAAgBC,GAAuB,CAClD,OAAQA,EAAM,KAAA,CAEZ,KAAKC,EAAmB,KACtB,OAAOC,EAACC,EAAA,CAAM,GAAGH,CAAA,CAAO,EAE1B,KAAKC,EAAmB,UACtB,OAAOC,EAACE,EAAA,CAAU,GAAGJ,CAAA,CAAO,EAE9B,KAAKC,EAAmB,QACxB,QACE,KAAM,CAAE,WAAAI,EAAY,eAAAC,EAAgB,SAAAC,EAAU,MAAAC,EAAO,QAAAC,GAAYT,EAC3DU,EAAc,CAACH,GAAY,CAACC,EAAQG,EAAM,SAAW,MACrDC,EAAa,yBAEnB,OACEC,EAAC,MAAA,CACC,UAAWC,EACT,mKACAL,GAAS,IAAA,EAGX,SAAA,CAAAI,EAACH,GAAY,UAAWI,EAAG,iDAAkDL,GAAS,UAAU,EAC7F,SAAA,CAAAF,GAAYL,EAAC,MAAG,UAAWY,EAAG,kDAAmDL,GAAS,QAAQ,EAAI,SAAAF,CAAA,CAAS,EAC/GC,KAAUO,EAAA,CAAM,UAAWD,EAAG,oBAAqBL,GAAS,KAAK,EAAI,SAAAD,CAAA,CAAM,CAAA,EAC9E,IACC,MAAA,CAAI,UAAWM,EAAG,8CAA+CL,GAAS,WAAW,EACpF,SAAA,CAAAP,EAACC,EAAA,CACE,GAAGE,EACJ,QAAS,CACP,YAAa,CACX,KAAMO,CAAA,EAER,KAAMA,EACN,UAAW,SACX,GAAGP,EAAW,OAAA,CAChB,CAAA,EAEFH,EAACE,EAAA,CACE,GAAGE,EACJ,QAAS,CACP,KAAMM,EACN,YAAa,CACX,KAAMA,CAAA,EAER,UAAW,SACX,GAAGN,EAAe,OAAA,CACpB,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CAAA,CACF,CAGR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../lib/widgets/authProvider/model/helpers.ts"],"sourcesContent":["export const AUTH_PROVIDER_MODE = {\n ESIA: 'esia',\n MOBILE_ID: 'mobileId',\n COMBINE: 'combine'\n} as const\n"],"names":["AUTH_PROVIDER_MODE"],"mappings":"AAAO,MAAMA,EAAqB,CAChC,KAAM,OACN,UAAW,WACX,QAAS,SACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as r,jsxs as m}from"react/jsx-runtime";import{cn as o}from"../../../shared/utils/cn.js";import{EsiaLogo as f}from"./ui/EsiaLogo.js";import{useDevice as l}from"../../../shared/hooks/useDevice.js";import{AuthWrapper as d}from"./ui/AuthWrapper.js";import{Links as h}from"./ui/Links.js";import{Icon as g}from"../../../shared/ui/icon/Icon.js";import{Badge as x}from"../../../shared/ui/badge/Badge.js";const L=({mainLink:n,linkDescription:p,isLoading:s,badge:i,loaderProps:a,classes:e,onClick:c})=>{const{isMobile:t}=l();return r(d,{isLoading:s,loaderProps:a,classes:e?.authWrapper,children:m("div",{className:o("flex flex-1 items-center justify-between gap-1",{"mobile: justify-center":!i&&t},e?.innerWrapper),children:[m("div",{className:o("flex items-center gap-1 desktop:gap-4",e?.textContent),children:[r(f,{className:o("size-7 desktop:size-8",e?.esiaLogo)}),r(h,{onClick:c,mainLink:n,linkDescription:p,isMobile:t,classes:e?.links}),r(g,{name:"arrows/arrowRight",className:o("size-6 mobile:hidden",e?.arrowIcon)})]}),i&&r(x,{className:o("bg-color-positive",e?.badge),children:i})]})})};export{L as Esia};
|
|
2
|
-
//# sourceMappingURL=Esia.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Esia.js","sources":["../../../../../lib/widgets/authProvider/ui/Esia.tsx"],"sourcesContent":["import type { EsiaProps } from '../model'\nimport { AuthWrapper, EsiaLogo, Links } from './ui'\nimport { useDevice } from '$/shared/hooks'\nimport { Badge, Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport const Esia = ({ mainLink, linkDescription, isLoading, badge, loaderProps, classes, onClick }: EsiaProps) => {\n const { isMobile } = useDevice()\n\n return (\n <AuthWrapper isLoading={isLoading} loaderProps={loaderProps} classes={classes?.authWrapper}>\n <div\n className={cn(\n 'flex flex-1 items-center justify-between gap-1',\n { 'mobile: justify-center': !badge && isMobile },\n classes?.innerWrapper\n )}\n >\n <div className={cn('flex items-center gap-1 desktop:gap-4', classes?.textContent)}>\n <EsiaLogo className={cn('size-7 desktop:size-8', classes?.esiaLogo)} />\n <Links\n onClick={onClick}\n mainLink={mainLink}\n linkDescription={linkDescription}\n isMobile={isMobile}\n classes={classes?.links}\n />\n <Icon name='arrows/arrowRight' className={cn('size-6 mobile:hidden', classes?.arrowIcon)} />\n </div>\n {badge && <Badge className={cn('bg-color-positive', classes?.badge)}>{badge}</Badge>}\n </div>\n </AuthWrapper>\n )\n}\n"],"names":["Esia","mainLink","linkDescription","isLoading","badge","loaderProps","classes","onClick","isMobile","useDevice","AuthWrapper","jsxs","cn","jsx","EsiaLogo","Links","Icon","Badge"],"mappings":"uZAMO,MAAMA,EAAO,CAAC,CAAE,SAAAC,EAAU,gBAAAC,EAAiB,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,QAAAC,EAAS,QAAAC,KAAyB,CACjH,KAAM,CAAE,SAAAC,CAAA,EAAaC,EAAA,EAErB,SACGC,EAAA,CAAY,UAAAP,EAAsB,YAAAE,EAA0B,QAASC,GAAS,YAC7E,SAAAK,EAAC,MAAA,CACC,UAAWC,EACT,iDACA,CAAE,yBAA0B,CAACR,GAASI,CAAA,EACtCF,GAAS,YAAA,EAGX,SAAA,CAAAK,EAAC,OAAI,UAAWC,EAAG,wCAAyCN,GAAS,WAAW,EAC9E,SAAA,CAAAO,EAACC,GAAS,UAAWF,EAAG,wBAAyBN,GAAS,QAAQ,EAAG,EACrEO,EAACE,EAAA,CACC,QAAAR,EACA,SAAAN,EACA,gBAAAC,EACA,SAAAM,EACA,QAASF,GAAS,KAAA,CAAA,EAEpBO,EAACG,GAAK,KAAK,oBAAoB,UAAWJ,EAAG,uBAAwBN,GAAS,SAAS,CAAA,CAAG,CAAA,EAC5F,EACCF,KAAUa,EAAA,CAAM,UAAWL,EAAG,oBAAqBN,GAAS,KAAK,EAAI,SAAAF,CAAA,CAAM,CAAA,CAAA,CAAA,EAEhF,CAEJ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as o,jsxs as n}from"react/jsx-runtime";import{AuthWrapper as f}from"./ui/AuthWrapper.js";import{cn as r}from"../../../shared/utils/cn.js";import{Links as g}from"./ui/Links.js";import{useDevice as d}from"../../../shared/hooks/useDevice.js";import{Icon as i}from"../../../shared/ui/icon/Icon.js";import{Badge as h}from"../../../shared/ui/badge/Badge.js";const w=({mainLink:a,linkDescription:l,isLoading:s,badge:m,loaderProps:p,classes:e,onClick:c})=>{const{isMobile:t}=d();return o(f,{isLoading:s,loaderProps:p,classes:e?.authWrapper,children:n("div",{className:r("flex flex-1 items-center justify-between gap-1",{"justify-center":!m&&t},e?.innerWrapper),children:[n("div",{className:r("flex h-max items-center gap-1 desktop:gap-4",e?.textContent),children:[n("div",{className:"flex h-full",children:[o(i,{name:"logos/mts",className:r("z-[9] size-8",e?.mtsLogo)}),o(i,{name:"logos/megafon",className:r("z-[8] -ml-4 size-8",e?.megafonLogo)}),o(i,{name:"logos/beeline",className:r("z-[7] -ml-4 size-8",e?.beelineLogo)})]}),o(g,{onClick:c,mainLink:a,linkDescription:l,isMobile:t,classes:e?.links}),o(i,{name:"arrows/arrowRight",className:r("size-6 mobile:hidden",e?.arrowIcon)})]}),m&&o(h,{className:r("bg-color-positive",e?.badge),children:m})]})})};export{w as MobileId};
|
|
2
|
-
//# sourceMappingURL=MobileId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MobileId.js","sources":["../../../../../lib/widgets/authProvider/ui/MobileId.tsx"],"sourcesContent":["import { type MobileIdProps } from '../model'\nimport { AuthWrapper, Links } from './ui/'\nimport { useDevice } from '$/shared/hooks'\nimport { Badge, Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport const MobileId = ({ mainLink, linkDescription, isLoading, badge, loaderProps, classes, onClick }: MobileIdProps) => {\n const { isMobile } = useDevice()\n\n return (\n <AuthWrapper isLoading={isLoading} loaderProps={loaderProps} classes={classes?.authWrapper}>\n <div\n className={cn(\n 'flex flex-1 items-center justify-between gap-1',\n { 'justify-center': !badge && isMobile },\n classes?.innerWrapper\n )}\n >\n <div className={cn('flex h-max items-center gap-1 desktop:gap-4', classes?.textContent)}>\n <div className='flex h-full'>\n <Icon name='logos/mts' className={cn('z-[9] size-8', classes?.mtsLogo)} />\n <Icon name='logos/megafon' className={cn('z-[8] -ml-4 size-8', classes?.megafonLogo)} />\n <Icon name='logos/beeline' className={cn('z-[7] -ml-4 size-8', classes?.beelineLogo)} />\n </div>\n <Links\n onClick={onClick}\n mainLink={mainLink}\n linkDescription={linkDescription}\n isMobile={isMobile}\n classes={classes?.links}\n />\n <Icon name='arrows/arrowRight' className={cn('size-6 mobile:hidden', classes?.arrowIcon)} />\n </div>\n {badge && <Badge className={cn('bg-color-positive', classes?.badge)}>{badge}</Badge>}\n </div>\n </AuthWrapper>\n )\n}\n"],"names":["MobileId","mainLink","linkDescription","isLoading","badge","loaderProps","classes","onClick","isMobile","useDevice","AuthWrapper","jsxs","cn","jsx","Icon","Links","Badge"],"mappings":"2WAMO,MAAMA,EAAW,CAAC,CAAE,SAAAC,EAAU,gBAAAC,EAAiB,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,QAAAC,EAAS,QAAAC,KAA6B,CACzH,KAAM,CAAE,SAAAC,CAAA,EAAaC,EAAA,EAErB,SACGC,EAAA,CAAY,UAAAP,EAAsB,YAAAE,EAA0B,QAASC,GAAS,YAC7E,SAAAK,EAAC,MAAA,CACC,UAAWC,EACT,iDACA,CAAE,iBAAkB,CAACR,GAASI,CAAA,EAC9BF,GAAS,YAAA,EAGX,SAAA,CAAAK,EAAC,OAAI,UAAWC,EAAG,8CAA+CN,GAAS,WAAW,EACpF,SAAA,CAAAK,EAAC,MAAA,CAAI,UAAU,cACb,SAAA,CAAAE,EAACC,EAAA,CAAK,KAAK,YAAY,UAAWF,EAAG,eAAgBN,GAAS,OAAO,EAAG,EACxEO,EAACC,GAAK,KAAK,gBAAgB,UAAWF,EAAG,qBAAsBN,GAAS,WAAW,EAAG,EACtFO,EAACC,GAAK,KAAK,gBAAgB,UAAWF,EAAG,qBAAsBN,GAAS,WAAW,CAAA,CAAG,CAAA,EACxF,EACAO,EAACE,EAAA,CACC,QAAAR,EACA,SAAAN,EACA,gBAAAC,EACA,SAAAM,EACA,QAASF,GAAS,KAAA,CAAA,EAEpBO,EAACC,GAAK,KAAK,oBAAoB,UAAWF,EAAG,uBAAwBN,GAAS,SAAS,CAAA,CAAG,CAAA,EAC5F,EACCF,KAAUY,EAAA,CAAM,UAAWJ,EAAG,oBAAqBN,GAAS,KAAK,EAAI,SAAAF,CAAA,CAAM,CAAA,CAAA,CAAA,EAEhF,CAEJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{cn as t}from"../../../../shared/utils/cn.js";import{Loader as s}from"../../../../shared/ui/loader/Loader.js";const a=({children:i,isLoading:r,classes:o,loaderProps:l,...p})=>e("div",{...p,role:"button",tabIndex:0,className:t("relative flex h-[90px] w-full items-center justify-center rounded-sm p-2 desktop:max-w-[524px]","bg-color-white outline outline-1 outline-warm-grey-200 transition-colors focus-visible:outline-primary-focus",o?.root),children:e("div",{className:t("flex h-[74px] flex-1 cursor-pointer rounded-sm px-2 py-3 transition-colors desktop:px-4 desktop:py-3","bg-color-blue-grey-100 hover:bg-color-blue-grey-200 active:bg-color-blue-grey-300",{"items-center":r},o?.wrapper),children:r?e(s,{position:"static",classes:{wrapper:"size-8 m-auto"},...l}):i})});export{a as AuthWrapper};
|
|
2
|
-
//# sourceMappingURL=AuthWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthWrapper.js","sources":["../../../../../../lib/widgets/authProvider/ui/ui/AuthWrapper.tsx"],"sourcesContent":["import { Loader, type LoaderProps } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport type AuthWrapperClasses = {\n root?: string\n wrapper?: string\n}\n\nexport interface AuthWrapperProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactElement\n classes?: AuthWrapperClasses\n isLoading?: boolean\n loaderProps?: LoaderProps\n}\n\nexport const AuthWrapper = ({ children, isLoading, classes, loaderProps, ...props }: AuthWrapperProps) => {\n return (\n <div\n {...props}\n role='button'\n tabIndex={0}\n className={cn(\n 'relative flex h-[90px] w-full items-center justify-center rounded-sm p-2 desktop:max-w-[524px]',\n 'bg-color-white outline outline-1 outline-warm-grey-200 transition-colors focus-visible:outline-primary-focus',\n classes?.root\n )}\n >\n <div\n className={cn(\n 'flex h-[74px] flex-1 cursor-pointer rounded-sm px-2 py-3 transition-colors desktop:px-4 desktop:py-3',\n 'bg-color-blue-grey-100 hover:bg-color-blue-grey-200 active:bg-color-blue-grey-300',\n { 'items-center': isLoading },\n classes?.wrapper\n )}\n >\n {isLoading ? <Loader position='static' classes={{ wrapper: 'size-8 m-auto' }} {...loaderProps} /> : children}\n </div>\n </div>\n )\n}\n"],"names":["AuthWrapper","children","isLoading","classes","loaderProps","props","jsx","cn","Loader"],"mappings":"4JAeO,MAAMA,EAAc,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAS,YAAAC,EAAa,GAAGC,KAExEC,EAAC,MAAA,CACE,GAAGD,EACJ,KAAK,SACL,SAAU,EACV,UAAWE,EACT,iGACA,+GACAJ,GAAS,IAAA,EAGX,SAAAG,EAAC,MAAA,CACC,UAAWC,EACT,uGACA,oFACA,CAAE,eAAgBL,CAAA,EAClBC,GAAS,OAAA,EAGV,SAAAD,EAAYI,EAACE,EAAA,CAAO,SAAS,SAAS,QAAS,CAAE,QAAS,eAAA,EAAoB,GAAGJ,CAAA,CAAa,EAAKH,CAAA,CAAA,CACtG,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EsiaLogo.js","sources":["../../../../../../lib/widgets/authProvider/ui/ui/EsiaLogo.tsx"],"sourcesContent":["import { type SVGProps } from 'react'\n\nexport const EsiaLogo = ({ ...props }: SVGProps<SVGSVGElement>) => {\n return (\n <svg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>\n <path\n d='M30.3986 10.6149C30.2728 8.96576 29.014 6.85155 27.7553 5.83672C26.3398 4.79816 24.8691 3.83828 23.3497 2.96139C21.8418 2.06068 20.2871 1.24201 18.6923 0.508895C17.8404 0.15868 16.927 -0.0139306 16.007 0.00148264C15.0868 -0.0180029 14.1725 0.154761 13.3217 0.508895C11.7272 1.24253 10.1725 2.06119 8.66438 2.96139C6.23081 4.44134 4.25878 5.83672 4.25878 5.83672C3.22329 6.71008 2.43892 7.83418 1.97146 9.09195C1.87834 9.34251 2.07032 9.59987 2.33762 9.59987H4.2568C4.55401 9.59987 4.82321 9.43281 4.98085 9.18085C5.33539 8.61417 5.77902 8.10202 6.29948 7.66607C6.29948 7.66607 7.92774 6.52186 9.93709 5.3083C11.1823 4.57013 12.466 3.89884 13.7826 3.29725C14.485 3.00687 15.2399 2.8652 15.9998 2.88118C16.7593 2.86854 17.5136 3.01008 18.217 3.29725C19.5337 3.89841 20.8174 4.56972 22.0624 5.3083C23.317 6.02735 24.5313 6.81445 25.7 7.66607C26.7394 8.49823 27.7787 10.2319 27.8826 11.5841C27.8826 11.5841 28.1251 13.5952 28.1598 15.9772C28.1576 17.4483 28.0767 18.9183 27.9173 20.3807C27.6755 21.912 26.8879 23.3038 25.7 24.2988C25.7 24.2988 24.0718 25.4777 22.0624 26.6912C20.8172 27.4294 19.5335 28.1007 18.217 28.7023C17.5145 28.9927 16.7596 29.1343 15.9998 29.1184C15.2409 29.1343 14.4867 28.9963 13.7826 28.7127C12.4658 28.1115 11.1821 27.4402 9.93709 26.7016C7.92774 25.5228 6.29948 24.3092 6.29948 24.3092C5.84515 23.9454 5.39081 23.4094 5.01172 22.8082C4.85581 22.561 4.5896 22.3997 4.2973 22.3997H2.34718C2.07645 22.3997 1.88475 22.6629 1.98611 22.914C2.49249 24.168 3.37564 25.4212 4.25878 26.1332C4.25878 26.1332 6.23081 27.6132 8.66438 29.0508C10.1723 29.9515 11.7269 30.7702 13.3217 31.5033C14.1745 31.8492 15.088 32.0175 16.007 31.998C16.9273 32.0175 17.8416 31.8448 18.6923 31.4906C20.2869 30.757 21.8415 29.9383 23.3497 29.0381C25.7833 27.5582 27.7553 26.1205 27.7553 26.1205C29.1939 24.9072 30.1478 23.2098 30.4406 21.3424C30.6337 19.5589 30.7317 17.7663 30.7343 15.9723C30.6923 13.0673 30.3986 10.6149 30.3986 10.6149Z'\n fill='url(#paint0_linear_6493_452)'\n />\n <path\n d='M1.27985 12.4821C1.27985 12.1286 1.56638 11.8421 1.91985 11.8421H11.8398C12.1933 11.8421 12.4798 12.1286 12.4798 12.4821V14.4021C12.4798 14.7555 12.1933 15.0421 11.8398 15.0421H1.27985V12.4821Z'\n fill='#0066B3'\n />\n <path\n d='M1.27985 16.9618H21.4398C21.7933 16.9618 22.0798 17.2484 22.0798 17.6018V19.5218C22.0798 19.8752 21.7933 20.1618 21.4398 20.1618H1.91985C1.56638 20.1618 1.27985 19.8752 1.27985 19.5218V16.9618Z'\n fill='#EE2F53'\n />\n <defs>\n <linearGradient id='paint0_linear_6493_452' x1='16.0071' y1='0' x2='16.0071' y2='31.9996' gradientUnits='userSpaceOnUse'>\n <stop stopColor='#0066B3' />\n <stop offset='0.354167' stopColor='#0066B3' />\n <stop offset='0.6875' stopColor='#EE2F53' />\n <stop offset='1' stopColor='#EE2F53' />\n </linearGradient>\n </defs>\n </svg>\n )\n}\n"],"names":["EsiaLogo","props","jsxs","jsx"],"mappings":"kDAEO,MAAMA,EAAW,CAAC,CAAE,GAAGC,KAE1BC,EAAC,MAAA,CAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGD,EACjG,SAAA,CAAAE,EAAC,OAAA,CACC,EAAE,i5DACF,KAAK,8BAAA,CAAA,EAEPA,EAAC,OAAA,CACC,EAAE,oMACF,KAAK,SAAA,CAAA,EAEPA,EAAC,OAAA,CACC,EAAE,oMACF,KAAK,SAAA,CAAA,EAEPA,EAAC,OAAA,CACC,SAAAD,EAAC,iBAAA,CAAe,GAAG,yBAAyB,GAAG,UAAU,GAAG,IAAI,GAAG,UAAU,GAAG,UAAU,cAAc,iBACtG,SAAA,CAAAC,EAAC,OAAA,CAAK,UAAU,SAAA,CAAU,EAC1BA,EAAC,OAAA,CAAK,OAAO,WAAW,UAAU,UAAU,EAC5CA,EAAC,OAAA,CAAK,OAAO,SAAS,UAAU,UAAU,EAC1CA,EAAC,OAAA,CAAK,OAAO,IAAI,UAAU,SAAA,CAAU,CAAA,CAAA,CACvC,CAAA,CACF,CAAA,EACF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as b,jsx as o}from"react/jsx-runtime";import{cn as l}from"../../../../shared/utils/cn.js";const i=({mainLink:e,linkDescription:r,isMobile:a,classes:t,...f})=>b("div",{className:l("flex flex-col",t?.linksWrapper),children:[o("button",{...f,type:"button",className:l('before:content=[" "] desk-body-medium-l z-[4] text-color-dark before:absolute before:left-1/2 before:top-1/2 before:h-full before:w-full before:-translate-x-1/2 before:-translate-y-1/2',t?.linksMainLink),children:a?e.mobileTitle:e.title}),r&&o("p",{className:"desk-body-regular-m relative z-[6] w-max p-0 text-color-tetriary",children:r})]});export{i as Links};
|
|
2
|
-
//# sourceMappingURL=Links.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Links.js","sources":["../../../../../../lib/widgets/authProvider/ui/ui/Links.tsx"],"sourcesContent":["import type { BaseAuthSchema } from '../../model/types'\nimport { cn } from '$/shared/utils'\n\nexport type TLinksClasses = {\n linksWrapper?: string\n linksMainLink?: string\n linksSubLink?: string\n}\n\ninterface ILinksProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n Pick<BaseAuthSchema, 'linkDescription' | 'mainLink'> {\n isMobile: boolean\n classes?: TLinksClasses\n}\n\nexport const Links = ({ mainLink, linkDescription, isMobile, classes, ...props }: ILinksProps) => {\n return (\n <div className={cn('flex flex-col', classes?.linksWrapper)}>\n <button\n {...props}\n type='button'\n className={cn(\n 'before:content=[\" \"] desk-body-medium-l z-[4] text-color-dark before:absolute before:left-1/2 before:top-1/2 before:h-full before:w-full before:-translate-x-1/2 before:-translate-y-1/2',\n classes?.linksMainLink\n )}\n >\n {isMobile ? mainLink.mobileTitle : mainLink.title}\n </button>\n\n {linkDescription && <p className='desk-body-regular-m relative z-[6] w-max p-0 text-color-tetriary'>{linkDescription}</p>}\n </div>\n )\n}\n"],"names":["Links","mainLink","linkDescription","isMobile","classes","props","cn","jsx"],"mappings":"sGAgBO,MAAMA,EAAQ,CAAC,CAAE,SAAAC,EAAU,gBAAAC,EAAiB,SAAAC,EAAU,QAAAC,EAAS,GAAGC,OAEpE,MAAA,CAAI,UAAWC,EAAG,gBAAiBF,GAAS,YAAY,EACvD,SAAA,CAAAG,EAAC,SAAA,CACE,GAAGF,EACJ,KAAK,SACL,UAAWC,EACT,2LACAF,GAAS,aAAA,EAGV,SAAAD,EAAWF,EAAS,YAAcA,EAAS,KAAA,CAAA,EAG7CC,GAAmBK,EAAC,IAAA,CAAE,UAAU,mEAAoE,SAAAL,CAAA,CAAgB,CAAA,EACvH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { AuthWrapperClasses } from '../ui/ui/AuthWrapper';
|
|
2
|
-
import { AUTH_PROVIDER_MODE } from './helpers';
|
|
3
|
-
import { LoaderProps } from '../../../shared/ui';
|
|
4
|
-
import { TLinksClasses } from '../ui/ui';
|
|
5
|
-
export type CombineClasses = {
|
|
6
|
-
root?: string;
|
|
7
|
-
topContent?: string;
|
|
8
|
-
badge?: string;
|
|
9
|
-
subtitle?: string;
|
|
10
|
-
authWrapper?: AuthWrapperClasses;
|
|
11
|
-
};
|
|
12
|
-
type MobileIdClasses = {
|
|
13
|
-
authWrapper?: AuthWrapperClasses;
|
|
14
|
-
innerWrapper?: string;
|
|
15
|
-
textContent?: string;
|
|
16
|
-
mtsLogo?: string;
|
|
17
|
-
megafonLogo?: string;
|
|
18
|
-
beelineLogo?: string;
|
|
19
|
-
arrowIcon?: string;
|
|
20
|
-
badge?: string;
|
|
21
|
-
links?: TLinksClasses;
|
|
22
|
-
};
|
|
23
|
-
type EsiaClasses = {
|
|
24
|
-
root?: string;
|
|
25
|
-
authWrapper?: AuthWrapperClasses;
|
|
26
|
-
innerWrapper?: string;
|
|
27
|
-
textContent?: string;
|
|
28
|
-
esiaLogo?: string;
|
|
29
|
-
arrowIcon?: string;
|
|
30
|
-
badge?: string;
|
|
31
|
-
links?: TLinksClasses;
|
|
32
|
-
};
|
|
33
|
-
export type BaseAuthSchema = {
|
|
34
|
-
mainLink: {
|
|
35
|
-
title: string;
|
|
36
|
-
mobileTitle: string;
|
|
37
|
-
};
|
|
38
|
-
linkDescription?: string;
|
|
39
|
-
classes?: CombineClasses;
|
|
40
|
-
badge?: string;
|
|
41
|
-
loaderProps?: LoaderProps;
|
|
42
|
-
isLoading?: boolean;
|
|
43
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
44
|
-
};
|
|
45
|
-
export type CombineAuthSchema = {
|
|
46
|
-
esiaConfig: Omit<BaseAuthSchema, 'badge'> & Pick<AuthEsia, 'classes'>;
|
|
47
|
-
mobileIdConfig: Omit<BaseAuthSchema, 'badge'> & Pick<AuthMobileId, 'classes'>;
|
|
48
|
-
subtitle?: string;
|
|
49
|
-
badge?: string;
|
|
50
|
-
classes?: CombineClasses;
|
|
51
|
-
};
|
|
52
|
-
export type AuthEsia = BaseAuthSchema & {
|
|
53
|
-
classes?: EsiaClasses;
|
|
54
|
-
} & {
|
|
55
|
-
mode: typeof AUTH_PROVIDER_MODE.ESIA;
|
|
56
|
-
};
|
|
57
|
-
export type AuthMobileId = BaseAuthSchema & {
|
|
58
|
-
classes?: MobileIdClasses;
|
|
59
|
-
} & {
|
|
60
|
-
mode: typeof AUTH_PROVIDER_MODE.MOBILE_ID;
|
|
61
|
-
};
|
|
62
|
-
export type AuthCombine = CombineAuthSchema & {
|
|
63
|
-
mode: typeof AUTH_PROVIDER_MODE.COMBINE;
|
|
64
|
-
};
|
|
65
|
-
export type AuthVariant = AuthCombine | AuthMobileId | AuthEsia;
|
|
66
|
-
export type EsiaProps = Omit<AuthEsia, 'mode'>;
|
|
67
|
-
export type MobileIdProps = Omit<AuthMobileId, 'mode'>;
|
|
68
|
-
export type CombineProps = Omit<AuthCombine, 'mode'>;
|
|
69
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { LoaderProps } from '../../../../shared/ui';
|
|
2
|
-
export type AuthWrapperClasses = {
|
|
3
|
-
root?: string;
|
|
4
|
-
wrapper?: string;
|
|
5
|
-
};
|
|
6
|
-
export interface AuthWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
-
children: React.ReactElement;
|
|
8
|
-
classes?: AuthWrapperClasses;
|
|
9
|
-
isLoading?: boolean;
|
|
10
|
-
loaderProps?: LoaderProps;
|
|
11
|
-
}
|
|
12
|
-
export declare const AuthWrapper: ({ children, isLoading, classes, loaderProps, ...props }: AuthWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseAuthSchema } from '../../model/types';
|
|
2
|
-
export type TLinksClasses = {
|
|
3
|
-
linksWrapper?: string;
|
|
4
|
-
linksMainLink?: string;
|
|
5
|
-
linksSubLink?: string;
|
|
6
|
-
};
|
|
7
|
-
interface ILinksProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Pick<BaseAuthSchema, 'linkDescription' | 'mainLink'> {
|
|
8
|
-
isMobile: boolean;
|
|
9
|
-
classes?: TLinksClasses;
|
|
10
|
-
}
|
|
11
|
-
export declare const Links: ({ mainLink, linkDescription, isMobile, classes, ...props }: ILinksProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|