profinansy-ui-lib 3.8.0 → 3.8.1

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 (54) hide show
  1. package/dist/components/banners/TextBlackBanner/TextBlackBanner.styled.d.ts +30 -2
  2. package/dist/components/blocks/Navigation/components/NewFeature/NewFeature.styled.d.ts +30 -2
  3. package/dist/components/blocks/header/components/Cart/components/CartItem/CartStyled.styled.d.ts +30 -2
  4. package/dist/components/blocks/header/components/header-link-item/components/Hit/Hit.d.ts +30 -2
  5. package/dist/components/blocks/header/components/header-link-item/components/MoreItems/MoreItems.styled.d.ts +60 -4
  6. package/dist/components/blocks/header/components/header-link-item/components/New/New.d.ts +30 -2
  7. package/dist/components/blocks/header/components/header-link-item/header-link-item.styled.d.ts +30 -2
  8. package/dist/components/blocks/header/components/userMenu/components/PersonalInformation/PersonalInformation.styled.d.ts +30 -2
  9. package/dist/components/blocks/search/components/InstrumentItem/InstrumentItem.styled.d.ts +90 -6
  10. package/dist/components/blocks/search/components/Item.styled.d.ts +30 -2
  11. package/dist/components/blocks/search/components/SearchNotFound/SearchNotFound.styled.d.ts +30 -2
  12. package/dist/components/blocks/search/hooks/useFavourites.d.ts +2 -4
  13. package/dist/components/blocks/sideMenu/components/FooterSlot/FooterSlot.d.ts +3 -4
  14. package/dist/components/blocks/sideMenu/components/SubPages/SubPages.styled.d.ts +30 -2
  15. package/dist/components/layouts/LayoutSideMenu/LayoutSideMenu.tyled.d.ts +3 -4
  16. package/dist/components/uikit/Bubbles/Bubbles.styled.d.ts +30 -2
  17. package/dist/components/uikit/Card/Card.d.ts +20 -2
  18. package/dist/components/uikit/Card/Card.typed.d.ts +3 -5
  19. package/dist/components/uikit/Checkbox/Checkbox.styled.d.ts +30 -2
  20. package/dist/components/uikit/DragScroll/DragScroll.d.ts +2 -5
  21. package/dist/components/uikit/Dropdown/Dropdown.d.ts +13 -1
  22. package/dist/components/uikit/Dropdown/Dropdown.typed.d.ts +3 -5
  23. package/dist/components/uikit/FieldRow/FieldRow.typed.d.ts +3 -5
  24. package/dist/components/uikit/FilterButton/FilterButton.d.ts +19 -2
  25. package/dist/components/uikit/FilterButton/FilterButton.typed.d.ts +5 -8
  26. package/dist/components/uikit/FilterButton/components/Drop/Drop.d.ts +14 -2
  27. package/dist/components/uikit/FilterButton/components/Mobile/MobileFilter.d.ts +18 -2
  28. package/dist/components/uikit/HiddenText/HiddenText.typed.d.ts +3 -8
  29. package/dist/components/uikit/Hint/Hint.typed.d.ts +3 -5
  30. package/dist/components/uikit/Modal/Modal.styled.d.ts +60 -4
  31. package/dist/components/uikit/Modal/Modal.typed.d.ts +3 -5
  32. package/dist/components/uikit/ModalMobile/ModalMobile.typed.d.ts +3 -5
  33. package/dist/components/uikit/Portal/Portal.typed.d.ts +3 -4
  34. package/dist/components/uikit/Radio/Radio.styled.d.ts +30 -2
  35. package/dist/components/uikit/SegmentControl/SegmentControl.styled.d.ts +30 -2
  36. package/dist/components/uikit/Select/components/ValueContainerWithImage/ValueContainerWithImage.styled.d.ts +30 -2
  37. package/dist/components/uikit/SideModal/SideModal.typed.d.ts +3 -5
  38. package/dist/components/uikit/Table/components/TCellText/TCellText.d.ts +3 -5
  39. package/dist/components/uikit/Tabs/Tabs.styled.d.ts +30 -2
  40. package/dist/components/uikit/Tooltip/Tooltip.d.ts +3 -4
  41. package/dist/components/uikit/Tooltip/Tooltip.typed.d.ts +3 -5
  42. package/dist/components/uikit/Typography/Typography.d.ts +15 -2
  43. package/dist/components/uikit/Typography/Typography.typed.d.ts +3 -5
  44. package/dist/components/uikit/storybook/StoryExample/StoryExample.d.ts +2 -5
  45. package/dist/components/uikit/storybook/StoryTitle/StoryTitle.d.ts +3 -4
  46. package/dist/config.d.ts +3 -4
  47. package/dist/hooks/useTransitionModal.d.ts +3 -4
  48. package/dist/localization/useLocalization.d.ts +3 -4
  49. package/dist/profinansy-ui-lib.cjs.js +1 -1
  50. package/dist/profinansy-ui-lib.cjs.js.map +1 -1
  51. package/dist/profinansy-ui-lib.es.js +2 -2
  52. package/dist/profinansy-ui-lib.es.js.map +1 -1
  53. package/dist/theme/ThemeProvider.d.ts +3 -8
  54. package/package.json +3 -2
@@ -1,13 +1,11 @@
1
- import { ReactNode } from 'react';
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
2
  import { Placement } from '@floating-ui/react';
3
3
  import CSS from 'csstype';
4
- export interface ITooltipProps {
4
+ export type ITooltipProps = PropsWithChildren<{
5
5
  /** Элемент, по которому открывается выпадашка*/
6
6
  targetElement: ReactNode;
7
7
  /** Положение выпадашки*/
8
8
  placement?: Placement;
9
- /** Контент*/
10
- children: ReactNode;
11
9
  /** Ширина выпадашки*/
12
10
  width?: string;
13
11
  /** Максимальная высота выпадашки*/
@@ -26,4 +24,4 @@ export interface ITooltipProps {
26
24
  onOpenTooltip?: (val: boolean) => void;
27
25
  /** Стили для контейнера.*/
28
26
  styleContainer?: CSS.Properties;
29
- }
27
+ }>;
@@ -1,4 +1,17 @@
1
1
  import React from 'react';
2
- import { ITypographyProps } from './Typography.typed';
3
- declare const Typography: React.ForwardRefExoticComponent<ITypographyProps & React.CSSProperties & React.RefAttributes<HTMLElement>>;
2
+ declare const Typography: React.ForwardRefExoticComponent<{
3
+ tag?: keyof JSX.IntrinsicElements;
4
+ variant: "header1-Bold" | "header2-ExtraBold" | "header2-Bold" | "header3-Bold" | "header3-SemiBold" | "header4-Bold" | "header4-SemiBold" | "header5-Bold" | "header5-SemiBold" | "header6-Bold" | "header6-SemiBold" | "paragraph-Regular" | "paragraph-Medium" | "text-Regular" | "text-Medium" | "text-Bold" | "description-Regular" | "description-Medium" | "description-SemiBold" | "description-Bold" | "caption-Medium" | "caption-SemiBold" | "caption-Bold" | "caption2-Medium" | "caption2-SemiBold" | "caption2-Bold" | "tag-Medium11" | "tag-Medium10" | "tag-Medium9" | "controls-Regular" | "controls-Medium" | "controls-SemiBold" | {
5
+ variant: "header1-Bold" | "header2-ExtraBold" | "header2-Bold" | "header3-Bold" | "header3-SemiBold" | "header4-Bold" | "header4-SemiBold" | "header5-Bold" | "header5-SemiBold" | "header6-Bold" | "header6-SemiBold" | "paragraph-Regular" | "paragraph-Medium" | "text-Regular" | "text-Medium" | "text-Bold" | "description-Regular" | "description-Medium" | "description-SemiBold" | "description-Bold" | "caption-Medium" | "caption-SemiBold" | "caption-Bold" | "caption2-Medium" | "caption2-SemiBold" | "caption2-Bold" | "tag-Medium11" | "tag-Medium10" | "tag-Medium9" | "controls-Regular" | "controls-Medium" | "controls-SemiBold";
6
+ resolution: number;
7
+ }[];
8
+ className?: string;
9
+ title?: string;
10
+ valueNumber?: number;
11
+ onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
12
+ colorName?: "link" | "content" | "black" | "blue" | "gray" | "green" | "olive" | "orange" | "pink" | "red" | "turquoise" | "violet" | "primary" | "secondary" | "tertiary" | "fourth" | "contrast" | "contrastThemed" | "accent" | "accentSecondary" | "positive" | "warning" | "negative" | "info" | "secondaryAlpha" | "field" | "fieldSecondary" | "accentSecondaryTint" | "positiveTint" | "warningTint" | "negativeTint" | "bottomActions" | "contrastThemRev" | "warring" | "brandBackground" | "brandBackgroundHover" | "brandText" | "secondaryBrandBackground" | "secondaryBrandBackgroundHover" | "secondaryBrandText" | "outlineBrandBackground" | "outlineBrandBackgroundHover" | "outlineBrandText" | "outlineBrandBorder" | "outlineBrandBorderHover" | "systemBackground" | "systemBackgroundHover" | "systemText" | "successBackground" | "successBackgroundHover" | "successText" | "warningBackground" | "warningBackgroundHover" | "warningText" | "criticalBackground" | "criticalBackgroundHover" | "criticalText" | "neutralBackground" | "neutralBackgroundHover" | "neutralText" | "supportive" | "brand" | "brandAlpha" | "accentDark" | "red2" | "mediumBlue" | "darkBlue" | "lightBlue" | "navyBlue" | "lightBlueTint" | "orangeTint" | "greenTint" | "oliveTint" | "violetTint" | "redTint" | "pinkTint" | "turquoiseTint" | "darkBlueTint";
13
+ colorCategory?: "text" | "club" | "stroke" | "background" | "icons" | "interactiveButtons" | "interactiveControls" | "other" | "shadow" | "statesBackground" | "gradient";
14
+ } & {
15
+ children?: React.ReactNode;
16
+ } & React.CSSProperties & React.RefAttributes<HTMLElement>>;
4
17
  export { Typography };
@@ -1,8 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  import { typographyVariants } from './Typography.const';
3
3
  import { TTheme } from '../../../theme/theme.typed';
4
4
  export type TTypographyVariant = (typeof typographyVariants)[number];
5
- export interface ITypographyProps {
5
+ export type ITypographyProps = PropsWithChildren<{
6
6
  /**HTML тег */
7
7
  tag?: keyof JSX.IntrinsicElements;
8
8
  /**Тип тега */
@@ -12,8 +12,6 @@ export interface ITypographyProps {
12
12
  }[];
13
13
  /**Класс элемента */
14
14
  className?: string;
15
- /**Контента внутри элемента */
16
- children: ReactNode;
17
15
  /**Подсказка на элемент */
18
16
  title?: string;
19
17
  /**Если вам надо покарсить число в позитивный или негативный цвет, то передайте это числю сюда. */
@@ -24,4 +22,4 @@ export interface ITypographyProps {
24
22
  colorName?: keyof TTheme['text'] | keyof TTheme['background'] | keyof TTheme['icons'] | keyof TTheme['stroke'] | keyof TTheme['interactiveButtons'] | keyof TTheme['interactiveControls'] | keyof TTheme['other'];
25
23
  /**Категория цвета из палитры. По умолчанию text */
26
24
  colorCategory?: keyof TTheme;
27
- }
25
+ }>;
@@ -1,6 +1,3 @@
1
- import React from 'react';
2
- interface IProps {
3
- children: React.ReactNode;
4
- }
5
- declare const StoryExample: ({ children }: IProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { PropsWithChildren } from 'react';
2
+ declare const StoryExample: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
6
3
  export { StoryExample };
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
- interface IProps {
3
- children: React.ReactNode;
1
+ import { PropsWithChildren } from 'react';
2
+ type IProps = PropsWithChildren<{
4
3
  isBig?: boolean;
5
- }
4
+ }>;
6
5
  declare const StoryTitle: ({ children, isBig }: IProps) => import("react/jsx-runtime").JSX.Element;
7
6
  export { StoryTitle };
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactNode, ElementType } from 'react';
1
+ import React, { ElementType, PropsWithChildren } from 'react';
2
2
  import { IUser, UserRole } from './common.types';
3
3
  import { StateTypeOpenMenu } from './hooks/sideMenu/useSaveOpenMode';
4
4
  export type TProject = 'profinansy' | 'wallet' | 'lms' | 'lenta';
@@ -24,9 +24,8 @@ interface IConfig extends IConfigProps {
24
24
  /** Роль пользователя **/
25
25
  userRole: UserRole | null;
26
26
  }
27
- export declare const ConfigLibraryProvider: ({ config, children }: {
27
+ export declare const ConfigLibraryProvider: ({ config, children }: React.PropsWithChildren<{
28
28
  config: IConfigProps;
29
- children: ReactNode;
30
- }) => import("react/jsx-runtime").JSX.Element;
29
+ }>) => import("react/jsx-runtime").JSX.Element;
31
30
  export declare const useConfigLibrary: () => IConfig;
32
31
  export {};
@@ -1,11 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  declare function useControlsForModal(handleClose: () => void): void;
3
- interface ITransition {
3
+ type ITransition = PropsWithChildren<{
4
4
  isOpen: boolean;
5
- children: ReactNode;
6
5
  onClose: () => void;
7
6
  onBeforeClose?: () => void;
8
- }
7
+ }>;
9
8
  declare function useTransitionModal({ isOpen, onClose, onBeforeClose, children }: ITransition): {
10
9
  animation: boolean;
11
10
  content: any;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import React, { PropsWithChildren } from 'react';
2
2
  import { Locales } from '../common.types';
3
3
  interface ILocalizationProps {
4
4
  /** Выбранная локализация **/
@@ -7,9 +7,8 @@ interface ILocalizationProps {
7
7
  interface ILocalization extends ILocalizationProps {
8
8
  isForeignSite: boolean;
9
9
  }
10
- export declare const LocalizationProvider: ({ config, children }: {
10
+ export declare const LocalizationProvider: ({ config, children }: React.PropsWithChildren<{
11
11
  config: ILocalizationProps;
12
- children: ReactNode;
13
- }) => import("react/jsx-runtime").JSX.Element;
12
+ }>) => import("react/jsx-runtime").JSX.Element;
14
13
  export declare const useLocalization: () => ILocalization;
15
14
  export {};
@@ -4843,7 +4843,7 @@ Check the top-level render call using <`+Q+">.")}return Z}}function V2(I,Z){{if(
4843
4843
  white-space: normal;
4844
4844
  text-overflow: ellipsis;
4845
4845
  }
4846
- `,fM=({children:e})=>{const[t,n]=m.useState(!1),r=m.useRef(null),o=m.useMemo(()=>m.isValidElement(e)?m.cloneElement(e,{ref:r}):e,[e]);return m.useEffect(()=>{r.current&&n(r.current.scrollWidth>r.current.clientWidth)},[e,r]),t?s.jsx(Fr,{zIndex:Et.zIndex8,padding:"8px 10px",isHover:!0,showArrow:!1,placement:"bottom-start",styleContainer:{overflow:"hidden"},targetElement:s.jsx(pl,{children:o}),children:s.jsx(O,{tag:"span",variant:"caption-Medium",colorName:"primary",children:e.props.children})}):s.jsx(pl,{children:o})},hM=({children:e,lines:t})=>{const[n,r]=m.useState(!1),o=m.useRef(null),i=m.useMemo(()=>m.isValidElement(e)?m.cloneElement(e,{ref:o}):e,[e]);return m.useEffect(()=>{o.current&&r(o.current.scrollHeight>o.current.clientHeight+5)},[e,o]),n?s.jsx(Fr,{zIndex:Et.zIndex8,padding:"8px 10px",isHover:!0,showArrow:!1,placement:"bottom-start",styleContainer:{overflow:"hidden"},targetElement:s.jsx(fl,{lines:t,children:i}),children:s.jsx(O,{tag:"span",variant:"caption-Medium",colorName:"primary",children:e.props.children})}):s.jsx(fl,{lines:t,children:i})},Cr=({children:e,mode:t="ellipsis",...n})=>{if(t==="ellipsis")return s.jsx(fM,{children:e});if(t==="multiline"){const{lines:r}=n;return s.jsx(hM,{lines:r,children:e})}return null},mM=h.styled.div`
4846
+ `,fM=({children:e})=>{const[t,n]=m.useState(!1),r=m.useRef(null),o=m.useMemo(()=>m.isValidElement(e)?m.cloneElement(e,{ref:r}):e,[e]);return m.useEffect(()=>{r.current&&n(r.current.scrollWidth>r.current.clientWidth)},[e,r]),t?s.jsx(Fr,{zIndex:Et.zIndex8,padding:"8px 10px",isHover:!0,showArrow:!1,placement:"bottom-start",styleContainer:{overflow:"hidden"},targetElement:s.jsx(pl,{children:o}),children:s.jsx(O,{tag:"span",variant:"caption-Medium",colorName:"primary",children:m.isValidElement(e)&&e.props.children})}):s.jsx(pl,{children:o})},hM=({children:e,lines:t})=>{const[n,r]=m.useState(!1),o=m.useRef(null),i=m.useMemo(()=>m.isValidElement(e)?m.cloneElement(e,{ref:o}):e,[e]);return m.useEffect(()=>{o.current&&r(o.current.scrollHeight>o.current.clientHeight+5)},[e,o]),n?s.jsx(Fr,{zIndex:Et.zIndex8,padding:"8px 10px",isHover:!0,showArrow:!1,placement:"bottom-start",styleContainer:{overflow:"hidden"},targetElement:s.jsx(fl,{lines:t,children:i}),children:s.jsx(O,{tag:"span",variant:"caption-Medium",colorName:"primary",children:m.isValidElement(e)&&e.props.children})}):s.jsx(fl,{lines:t,children:i})},Cr=({children:e,mode:t="ellipsis",...n})=>{if(t==="ellipsis")return s.jsx(fM,{children:e});if(t==="multiline"){const{lines:r}=n;return s.jsx(hM,{lines:r,children:e})}return null},mM=h.styled.div`
4847
4847
  width: 100%;
4848
4848
  max-width: ${e=>e.maxWidth?`${e.maxWidth}px`:"100%"};
4849
4849
  min-width: ${e=>e.minWidth?`${e.minWidth}px`:"auto"};