@scbt-ecom/ui 0.14.0 → 0.15.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.
Files changed (43) hide show
  1. package/dist/client.js +7045 -7028
  2. package/dist/client.js.map +1 -1
  3. package/dist/hybrid.js +427 -381
  4. package/dist/hybrid.js.map +1 -1
  5. package/dist/{index-BJGvyDqg.js → index-CexXWplL.js} +22 -2
  6. package/dist/index-CexXWplL.js.map +1 -0
  7. package/dist/shared/hooks/index.d.ts +1 -0
  8. package/dist/shared/hooks/useFieldsProgress.d.ts +14 -0
  9. package/dist/shared/ui/CustomLink.d.ts +7 -2
  10. package/dist/shared/ui/checkbox/Checkbox.d.ts +12 -0
  11. package/dist/shared/ui/formElements/controlled/index.d.ts +1 -3
  12. package/dist/shared/ui/icon/sprite.gen.d.ts +1 -0
  13. package/dist/shared/ui/input/Input.d.ts +30 -0
  14. package/dist/shared/ui/select/Select.d.ts +38 -6
  15. package/dist/shared/ui/select/ui/control/Control.d.ts +4 -1
  16. package/dist/shared/ui/select/ui/control/hooks/useSelectController.d.ts +32 -0
  17. package/dist/sprites/logos.svg +1 -0
  18. package/dist/style.css +1 -1
  19. package/dist/widgets/authProvider/AuthProvider.d.ts +3 -0
  20. package/dist/widgets/authProvider/index.d.ts +2 -0
  21. package/dist/widgets/authProvider/model/helpers.d.ts +5 -0
  22. package/dist/widgets/authProvider/model/types.d.ts +75 -0
  23. package/dist/widgets/authProvider/ui/Esia.d.ts +2 -0
  24. package/dist/widgets/authProvider/ui/MobileId.d.ts +2 -0
  25. package/dist/widgets/authProvider/ui/index.d.ts +2 -0
  26. package/dist/widgets/authProvider/ui/ui/AuthWrapper.d.ts +11 -0
  27. package/dist/widgets/authProvider/ui/ui/EsiaLogo.d.ts +2 -0
  28. package/dist/widgets/authProvider/ui/ui/Links.d.ts +11 -0
  29. package/dist/widgets/authProvider/ui/ui/index.d.ts +3 -0
  30. package/dist/widgets/baseForm/BaseForm.d.ts +3 -0
  31. package/dist/widgets/baseForm/index.d.ts +1 -0
  32. package/dist/widgets/footer/Footer.d.ts +14 -12
  33. package/dist/widgets/footer/ui/Copyright.d.ts +4 -3
  34. package/dist/widgets/footer/ui/FooterLogo.d.ts +8 -0
  35. package/dist/widgets/footer/ui/Ligal.d.ts +4 -4
  36. package/dist/widgets/footer/ui/NavLinks.d.ts +7 -6
  37. package/dist/widgets/footer/ui/PhonesBlock.d.ts +5 -5
  38. package/dist/widgets/footer/ui/SiteMap.d.ts +8 -0
  39. package/dist/widgets/footer/ui/SocialLinks.d.ts +4 -4
  40. package/dist/widgets/footer/ui/index.d.ts +7 -5
  41. package/dist/widgets/index.d.ts +9 -7
  42. package/package.json +1 -1
  43. package/dist/index-BJGvyDqg.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import { TAuthProviderProps } from './model/types';
2
+ import * as React from 'react';
3
+ export declare const AuthProvider: (props: TAuthProviderProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -0,0 +1,2 @@
1
+ export * from './AuthProvider';
2
+ export type * from './model/types';
@@ -0,0 +1,5 @@
1
+ export declare const AUTH_PROVIDER_MODE: {
2
+ readonly ESIA: "esia";
3
+ readonly MOBILE_ID: "mobileId";
4
+ readonly COMBINE: "combine";
5
+ };
@@ -0,0 +1,75 @@
1
+ import { AUTH_PROVIDER_MODE } from './helpers';
2
+ import { ILoaderProps } from '../../../shared/ui';
3
+ export type TCombineClasses = {
4
+ root?: string;
5
+ topContent?: string;
6
+ badge?: string;
7
+ subtitle?: string;
8
+ authWrapper?: string;
9
+ };
10
+ type TMobileIdClasses = {
11
+ root?: string;
12
+ wrapper?: string;
13
+ innerWrapper?: string;
14
+ textContent?: string;
15
+ mtsLogo?: string;
16
+ megafonLogo?: string;
17
+ beelineLogo?: string;
18
+ arrowIcon?: string;
19
+ badge?: string;
20
+ linksWrapper?: string;
21
+ linksMainLink?: string;
22
+ linksSubLink?: string;
23
+ };
24
+ type TEsiaClasses = {
25
+ root?: string;
26
+ wrapper?: string;
27
+ innerWrapper?: string;
28
+ textContent?: string;
29
+ esiaLogo?: string;
30
+ arrowIcon?: string;
31
+ badge?: string;
32
+ linksWrapper?: string;
33
+ linksMainLink?: string;
34
+ linksSubLink?: string;
35
+ };
36
+ export type TSingleAuthSchema = {
37
+ mainLink: {
38
+ title: string;
39
+ mobileTitle: string;
40
+ href: string;
41
+ };
42
+ subLink?: {
43
+ text: string;
44
+ href: string;
45
+ };
46
+ classes?: TCombineClasses;
47
+ badge?: string;
48
+ loaderProps?: ILoaderProps;
49
+ isLoading?: boolean;
50
+ };
51
+ type TCombineAuthSchema = {
52
+ esiaConfig: Omit<TSingleAuthSchema, 'badge'> & Pick<TEsiaMode, 'classes'>;
53
+ mobileIdConfig: Omit<TSingleAuthSchema, 'badge'> & Pick<TMobileIdMode, 'classes'>;
54
+ subtitle?: string;
55
+ badge?: string;
56
+ classes?: TCombineClasses;
57
+ };
58
+ type TEsiaMode = TSingleAuthSchema & {
59
+ classes?: TEsiaClasses;
60
+ } & {
61
+ mode: typeof AUTH_PROVIDER_MODE.ESIA;
62
+ };
63
+ type TMobileIdMode = TSingleAuthSchema & {
64
+ classes?: TMobileIdClasses;
65
+ } & {
66
+ mode: typeof AUTH_PROVIDER_MODE.MOBILE_ID;
67
+ };
68
+ type TCombineMode = TCombineAuthSchema & {
69
+ mode: typeof AUTH_PROVIDER_MODE.COMBINE;
70
+ };
71
+ export type TEsiaProps = Omit<TEsiaMode, 'mode'>;
72
+ export type TMobileIdProps = Omit<TMobileIdMode, 'mode'>;
73
+ export type TCombineProps = Omit<TCombineMode, 'mode'>;
74
+ export type TAuthProviderProps = TCombineMode | TMobileIdMode | TEsiaMode;
75
+ export {};
@@ -0,0 +1,2 @@
1
+ import { TEsiaProps } from '../model/types';
2
+ export declare const Esia: ({ mainLink, subLink, isLoading, badge, loaderProps, classes }: TEsiaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TMobileIdProps } from '../model/types';
2
+ export declare const MobileId: ({ mainLink, subLink, isLoading, badge, loaderProps, classes }: TMobileIdProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './MobileId';
2
+ export * from './Esia.tsx';
@@ -0,0 +1,11 @@
1
+ import { ILoaderProps } from '../../../../shared/ui';
2
+ export interface IAuthWrapper {
3
+ children: React.ReactElement;
4
+ classes?: {
5
+ root?: string;
6
+ wrapper?: string;
7
+ };
8
+ isLoading?: boolean;
9
+ loaderProps?: ILoaderProps;
10
+ }
11
+ export declare const AuthWrapper: ({ children, isLoading, classes, loaderProps }: IAuthWrapper) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SVGProps } from 'react';
2
+ export declare const EsiaLogo: ({ ...props }: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { TSingleAuthSchema } from '../../model/types';
2
+ interface ILinksProps extends Pick<TSingleAuthSchema, 'subLink' | 'mainLink'> {
3
+ isMobile: boolean;
4
+ classes?: {
5
+ linksWrapper?: string;
6
+ linksMainLink?: string;
7
+ linksSubLink?: string;
8
+ };
9
+ }
10
+ export declare const Links: ({ mainLink, subLink, isMobile, classes }: ILinksProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './AuthWrapper';
2
+ export * from './EsiaLogo';
3
+ export * from './Links';
@@ -0,0 +1,3 @@
1
+ export interface IBaseFormProps {
2
+ }
3
+ export declare const BaseForm: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './BaseForm';
@@ -1,27 +1,29 @@
1
1
  import { IFooterNavLinks, IFooterPhones, IFooterSocialLinks } from './model/types';
2
- import { TCopyrightClasses, TLigalClasses, TNavigationLinksClasses, TPhoneBlockClasses, TSocialLinksClasses } from './ui';
2
+ import { TCopyrightClasses, TFooterLogoClasses, TLigalClasses, TNavigationLinksClasses, TPhoneBlockClasses, TSiteMapClasses, TSocialLinksClasses } from './ui';
3
3
  import * as React from 'react';
4
- type IFooterClasses = TLigalClasses & TNavigationLinksClasses & TPhoneBlockClasses & TSocialLinksClasses & TCopyrightClasses & {
5
- section: string;
6
- container: string;
7
- footerRoot: string;
8
- footerHead: string;
9
- footerSocialBlock: string;
10
- footerLogo: string;
11
- };
12
- export interface IFooterProps {
13
- classes?: Partial<IFooterClasses>;
4
+ type TFooterRenderBlocks = {
14
5
  withSocial?: boolean;
15
6
  withPhones?: boolean;
16
7
  withNavLinks?: boolean;
17
8
  withLigal?: boolean;
18
9
  withCopyright?: boolean;
19
10
  withSiteMap?: boolean;
11
+ };
12
+ type TFooterClasses = TSiteMapClasses & TFooterLogoClasses & TLigalClasses & TNavigationLinksClasses & TPhoneBlockClasses & TSocialLinksClasses & TCopyrightClasses & {
13
+ root?: string;
14
+ footerContainer?: string;
15
+ footerWrapper?: string;
16
+ footerHead?: string;
17
+ footerSocialBlock?: string;
18
+ };
19
+ export interface IFooterProps {
20
+ classes?: TFooterClasses;
21
+ renderBlocks?: TFooterRenderBlocks;
20
22
  socialsLinks?: IFooterSocialLinks[];
21
23
  phones?: IFooterPhones[];
22
24
  navigationLinks: IFooterNavLinks[];
23
25
  ligal: string | React.ReactElement;
24
26
  copyright?: string | React.ReactElement;
25
27
  }
26
- export declare const Footer: ({ withSocial, withPhones, withNavLinks, withLigal, withCopyright, withSiteMap, socialsLinks, phones, navigationLinks, ligal, copyright, classes }: IFooterProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const Footer: ({ renderBlocks: { withSocial, withPhones, withNavLinks, withLigal, withCopyright, withSiteMap }, socialsLinks, phones, navigationLinks, ligal, copyright, classes }: IFooterProps) => import("react/jsx-runtime").JSX.Element;
27
29
  export {};
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  export type TCopyrightClasses = {
3
- text: string;
3
+ copyRight?: string;
4
4
  };
5
5
  interface ICopyrightProps {
6
6
  text?: string | React.ReactElement;
7
- classes?: Partial<TCopyrightClasses>;
7
+ classes?: TCopyrightClasses;
8
+ withSiteMap?: boolean;
8
9
  }
9
- export declare const Copyright: ({ text, classes }: ICopyrightProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Copyright: ({ text, classes, withSiteMap }: ICopyrightProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -0,0 +1,8 @@
1
+ export type TFooterLogoClasses = {
2
+ footerLogo?: string;
3
+ footerLogoIcon?: string;
4
+ };
5
+ export interface IFooterLogoProps {
6
+ classes?: TFooterLogoClasses;
7
+ }
8
+ export declare const FooterLogo: ({ classes }: IFooterLogoProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  export type TLigalClasses = {
3
- ligalRoot: string;
4
- ligal: string;
5
- ligalButton: string;
3
+ ligalRoot?: string;
4
+ ligalText?: string;
5
+ ligalButton?: string;
6
6
  };
7
7
  interface ILigalProps {
8
8
  ligal: string | React.ReactElement;
9
- classes?: Partial<TLigalClasses>;
9
+ classes?: TLigalClasses;
10
10
  }
11
11
  export declare const Ligal: ({ ligal, classes }: ILigalProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,14 +1,15 @@
1
1
  import { IFooterNavLinks } from '../model/types';
2
2
  export type TNavigationLinksClasses = {
3
- navRoot: string;
4
- navGroup: string;
5
- navLabel: string;
6
- navWrapper: string;
7
- navLink: string;
3
+ navRoot?: string;
4
+ navGroup?: string;
5
+ navLabel?: string;
6
+ navLinks?: string;
7
+ navLink?: string;
8
+ navLinkIcon?: string;
8
9
  };
9
10
  interface INavLinksProps {
10
11
  navigationLinks: IFooterNavLinks[];
11
- classes?: Partial<TNavigationLinksClasses>;
12
+ classes?: TNavigationLinksClasses;
12
13
  }
13
14
  export declare const NavLinks: ({ navigationLinks, classes }: INavLinksProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export {};
@@ -1,13 +1,13 @@
1
1
  import { IFooterPhones } from '../model/types';
2
2
  export type TPhoneBlockClasses = {
3
- phonesRoot: string;
4
- phoneWrapper: string;
5
- phoneText: string;
6
- phoneLink: string;
3
+ phonesRoot?: string;
4
+ phoneWrapper?: string;
5
+ phoneText?: string;
6
+ phoneLink?: string;
7
7
  };
8
8
  interface IPhonesBlockProps {
9
9
  phones: IFooterPhones[];
10
- classes?: Partial<TPhoneBlockClasses>;
10
+ classes?: TPhoneBlockClasses;
11
11
  }
12
12
  export declare const PhonesBlock: ({ phones, classes }: IPhonesBlockProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -0,0 +1,8 @@
1
+ export type TSiteMapClasses = {
2
+ siteMapLink?: string;
3
+ siteMapLinkIcon?: string;
4
+ };
5
+ export interface ISiteMapProps {
6
+ classes?: TSiteMapClasses;
7
+ }
8
+ export declare const SiteMap: ({ classes }: ISiteMapProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import { IFooterSocialLinks } from '../model/types';
2
2
  export type TSocialLinksClasses = {
3
- socialRoot: string;
4
- socialLink: string;
5
- socialIcon: string;
3
+ socialRoot?: string;
4
+ socialLink?: string;
5
+ socialIcon?: string;
6
6
  };
7
7
  interface ISocialLinksProps {
8
8
  socialsLinks: IFooterSocialLinks[];
9
- classes?: Partial<TSocialLinksClasses>;
9
+ classes?: TSocialLinksClasses;
10
10
  }
11
11
  export declare const SocialLinks: ({ socialsLinks, classes }: ISocialLinksProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,5 +1,7 @@
1
- export { SocialLinks, type TSocialLinksClasses } from './SocialLinks';
2
- export { PhonesBlock, type TPhoneBlockClasses } from './PhonesBlock';
3
- export { NavLinks, type TNavigationLinksClasses } from './NavLinks';
4
- export { Ligal, type TLigalClasses } from './Ligal';
5
- export { Copyright, type TCopyrightClasses } from './Copyright';
1
+ export * from './SocialLinks';
2
+ export * from './PhonesBlock';
3
+ export * from './NavLinks';
4
+ export * from './Ligal';
5
+ export * from './Copyright';
6
+ export * from './FooterLogo';
7
+ export * from './SiteMap';
@@ -1,7 +1,9 @@
1
- export { Benefit, type IBenefitProps } from './benefit';
2
- export { PageHeader, type TPageHeaderProps } from './pageHeader';
3
- export { Banner, type IBannerProps } from './banner';
4
- export { Advantages, type IAdvantagesProps } from './advantages';
5
- export { Footer, type IFooterProps } from './footer';
6
- export { Stepper, type IStepperProps, type ISingleStep } from './stepper';
7
- export { LongBanner, type ILongBannerProps } from './longBanner';
1
+ export * from './benefit';
2
+ export * from './pageHeader';
3
+ export * from './banner';
4
+ export * from './advantages';
5
+ export * from './footer';
6
+ export * from './stepper';
7
+ export * from './longBanner';
8
+ export * from './baseForm';
9
+ export * from './authProvider';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scbt-ecom/ui",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./utils-tailwind.css": "./dist/utils-tailwind.css",