@astral/ui 4.89.0 → 4.90.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 (87) hide show
  1. package/components/Accordion/styles.d.ts +1 -1
  2. package/components/AutoSaveIndicator/DefaultState/styles.d.ts +1 -1
  3. package/components/AutoSaveIndicator/ErrorState/styles.d.ts +1 -1
  4. package/components/AutoSaveIndicator/LoadingState/styles.d.ts +1 -1
  5. package/components/AutoSaveIndicator/SuccessState/styles.d.ts +1 -1
  6. package/components/BulletListItem/styles.d.ts +1 -1
  7. package/components/Chevron/styles.d.ts +1 -1
  8. package/components/Chip/ChipStatusIcon/styled.d.ts +1 -1
  9. package/components/ComplianceStatus/styles.d.ts +3 -3
  10. package/components/CopyTypography/styles.d.ts +1 -1
  11. package/components/DataGrid/Row/styles.d.ts +1 -1
  12. package/components/DataGridCollapsibleRow/styles.d.ts +1 -1
  13. package/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarNextButton/styles.d.ts +2 -2
  14. package/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarPrevButton/styles.d.ts +2 -2
  15. package/components/FormHelperText/FormHelperTextContent/styles.d.ts +2 -2
  16. package/components/HintIcon/HintIcon.d.ts +1 -1
  17. package/components/HintIcon/HintIcon.js +2 -2
  18. package/components/HintIcon/Icon/Icon.d.ts +1 -1
  19. package/components/HintIcon/Icon/Icon.js +11 -4
  20. package/components/HintIcon/Icon/useLogic/useLogic.d.ts +1 -3
  21. package/components/HintIcon/Icon/useLogic/useLogic.js +2 -14
  22. package/components/HintIcon/constants.d.ts +5 -4
  23. package/components/HintIcon/constants.js +4 -5
  24. package/components/HintIcon/types.d.ts +6 -0
  25. package/components/JsonViewer/JsonNode/styles.d.ts +1 -1
  26. package/components/LegacyNotification/styles.d.ts +4 -4
  27. package/components/Loader/styles.d.ts +1 -1
  28. package/components/NavMenu/Item/ItemButton/styles.d.ts +2 -2
  29. package/components/NewPopover/styles.js +1 -1
  30. package/components/NewStepper/Step/styles.d.ts +1 -1
  31. package/components/Notification/styles.d.ts +4 -4
  32. package/components/SearchField/styles.d.ts +1 -1
  33. package/components/Stepper/ArrowConnector/ArrowConnector.d.ts +1 -1
  34. package/components/Stepper/StepIcon/styles.d.ts +5 -5
  35. package/components/SvgIcon/SvgIcon.js +11 -1
  36. package/components/SvgIcon/constants.d.ts +4 -0
  37. package/components/SvgIcon/constants.js +4 -0
  38. package/components/SvgIcon/styles.js +7 -4
  39. package/components/SvgIcon/types.d.ts +2 -2
  40. package/components/Tree/TreeItem/styles.d.ts +1 -1
  41. package/components/fileUploading/FileInfo/styles.d.ts +1 -1
  42. package/hook-form/EditableText/styles.d.ts +1 -1
  43. package/hook-form/FormWizardPageLayout/FormWizardFooter/styles.d.ts +2 -2
  44. package/node/components/Accordion/styles.d.ts +1 -1
  45. package/node/components/AutoSaveIndicator/DefaultState/styles.d.ts +1 -1
  46. package/node/components/AutoSaveIndicator/ErrorState/styles.d.ts +1 -1
  47. package/node/components/AutoSaveIndicator/LoadingState/styles.d.ts +1 -1
  48. package/node/components/AutoSaveIndicator/SuccessState/styles.d.ts +1 -1
  49. package/node/components/BulletListItem/styles.d.ts +1 -1
  50. package/node/components/Chevron/styles.d.ts +1 -1
  51. package/node/components/Chip/ChipStatusIcon/styled.d.ts +1 -1
  52. package/node/components/ComplianceStatus/styles.d.ts +3 -3
  53. package/node/components/CopyTypography/styles.d.ts +1 -1
  54. package/node/components/DataGrid/Row/styles.d.ts +1 -1
  55. package/node/components/DataGridCollapsibleRow/styles.d.ts +1 -1
  56. package/node/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarNextButton/styles.d.ts +2 -2
  57. package/node/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarPrevButton/styles.d.ts +2 -2
  58. package/node/components/FormHelperText/FormHelperTextContent/styles.d.ts +2 -2
  59. package/node/components/HintIcon/HintIcon.d.ts +1 -1
  60. package/node/components/HintIcon/HintIcon.js +2 -2
  61. package/node/components/HintIcon/Icon/Icon.d.ts +1 -1
  62. package/node/components/HintIcon/Icon/Icon.js +10 -3
  63. package/node/components/HintIcon/Icon/useLogic/useLogic.d.ts +1 -3
  64. package/node/components/HintIcon/Icon/useLogic/useLogic.js +2 -14
  65. package/node/components/HintIcon/constants.d.ts +5 -4
  66. package/node/components/HintIcon/constants.js +4 -5
  67. package/node/components/HintIcon/types.d.ts +6 -0
  68. package/node/components/JsonViewer/JsonNode/styles.d.ts +1 -1
  69. package/node/components/LegacyNotification/styles.d.ts +4 -4
  70. package/node/components/Loader/styles.d.ts +1 -1
  71. package/node/components/NavMenu/Item/ItemButton/styles.d.ts +2 -2
  72. package/node/components/NewPopover/styles.js +1 -1
  73. package/node/components/NewStepper/Step/styles.d.ts +1 -1
  74. package/node/components/Notification/styles.d.ts +4 -4
  75. package/node/components/SearchField/styles.d.ts +1 -1
  76. package/node/components/Stepper/ArrowConnector/ArrowConnector.d.ts +1 -1
  77. package/node/components/Stepper/StepIcon/styles.d.ts +5 -5
  78. package/node/components/SvgIcon/SvgIcon.js +11 -1
  79. package/node/components/SvgIcon/constants.d.ts +4 -0
  80. package/node/components/SvgIcon/constants.js +4 -0
  81. package/node/components/SvgIcon/styles.js +7 -4
  82. package/node/components/SvgIcon/types.d.ts +2 -2
  83. package/node/components/Tree/TreeItem/styles.d.ts +1 -1
  84. package/node/components/fileUploading/FileInfo/styles.d.ts +1 -1
  85. package/node/hook-form/EditableText/styles.d.ts +1 -1
  86. package/node/hook-form/FormWizardPageLayout/FormWizardFooter/styles.d.ts +2 -2
  87. package/package.json +1 -1
@@ -42,7 +42,7 @@ export declare const Chevron: import("../styled").StyledComponent<{
42
42
  children?: import("react").ReactNode;
43
43
  color?: string | undefined;
44
44
  titleAccess?: string | undefined;
45
- size?: "sm" | "md" | undefined;
45
+ size?: "sm" | "md" | "auto" | undefined;
46
46
  } & import("react").SVGProps<SVGSVGElement> & {
47
47
  theme?: import("@emotion/react").Theme | undefined;
48
48
  } & {
@@ -6,7 +6,7 @@ export declare const DefaultIcon: import("../../styled").StyledComponent<{
6
6
  children?: import("react").ReactNode;
7
7
  color?: string | undefined;
8
8
  titleAccess?: string | undefined;
9
- size?: "sm" | "md" | undefined;
9
+ size?: "sm" | "md" | "auto" | undefined;
10
10
  } & import("react").SVGProps<SVGSVGElement> & {
11
11
  theme?: import("@emotion/react").Theme | undefined;
12
12
  }, {}, {}>;
@@ -17,7 +17,7 @@ export declare const ErrorIcon: import("../../styled").StyledComponent<{
17
17
  children?: import("react").ReactNode;
18
18
  color?: string | undefined;
19
19
  titleAccess?: string | undefined;
20
- size?: "sm" | "md" | undefined;
20
+ size?: "sm" | "md" | "auto" | undefined;
21
21
  } & import("react").SVGProps<SVGSVGElement> & {
22
22
  theme?: import("@emotion/react").Theme | undefined;
23
23
  }, {}, {}>;
@@ -3,7 +3,7 @@ export declare const LoadingIcon: import("../../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -3,7 +3,7 @@ export declare const SuccessIcon: import("../../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -7,7 +7,7 @@ export declare const Icon: import("../styled").StyledComponent<{
7
7
  children?: import("react").ReactNode;
8
8
  color?: string | undefined;
9
9
  titleAccess?: string | undefined;
10
- size?: "sm" | "md" | undefined;
10
+ size?: "sm" | "md" | "auto" | undefined;
11
11
  } & import("react").SVGProps<SVGSVGElement> & {
12
12
  theme?: import("@emotion/react").Theme | undefined;
13
13
  }, {}, {}>;
@@ -6,7 +6,7 @@ export declare const ChevronIcon: import("../styled").StyledComponent<{
6
6
  children?: import("react").ReactNode;
7
7
  color?: string | undefined;
8
8
  titleAccess?: string | undefined;
9
- size?: "sm" | "md" | undefined;
9
+ size?: "sm" | "md" | "auto" | undefined;
10
10
  } & import("react").SVGProps<SVGSVGElement> & {
11
11
  theme?: import("@emotion/react").Theme | undefined;
12
12
  } & ChevronWrapperProps, {}, {}>;
@@ -3,7 +3,7 @@ export declare const StatusIcon: import("../../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -20,7 +20,7 @@ export declare const EmptyIcon: import("../styled").StyledComponent<{
20
20
  children?: import("react").ReactNode;
21
21
  color?: string | undefined;
22
22
  titleAccess?: string | undefined;
23
- size?: "sm" | "md" | undefined;
23
+ size?: "sm" | "md" | "auto" | undefined;
24
24
  } & import("react").SVGProps<SVGSVGElement>, {}, {}>;
25
25
  export declare const RejectIcon: import("../styled").StyledComponent<{
26
26
  theme?: import("@emotion/react").Theme | undefined;
@@ -31,7 +31,7 @@ export declare const RejectIcon: import("../styled").StyledComponent<{
31
31
  children?: import("react").ReactNode;
32
32
  color?: string | undefined;
33
33
  titleAccess?: string | undefined;
34
- size?: "sm" | "md" | undefined;
34
+ size?: "sm" | "md" | "auto" | undefined;
35
35
  } & import("react").SVGProps<SVGSVGElement>, {}, {}>;
36
36
  export declare const SuccessIcon: import("../styled").StyledComponent<{
37
37
  theme?: import("@emotion/react").Theme | undefined;
@@ -42,7 +42,7 @@ export declare const SuccessIcon: import("../styled").StyledComponent<{
42
42
  children?: import("react").ReactNode;
43
43
  color?: string | undefined;
44
44
  titleAccess?: string | undefined;
45
- size?: "sm" | "md" | undefined;
45
+ size?: "sm" | "md" | "auto" | undefined;
46
46
  } & import("react").SVGProps<SVGSVGElement>, {}, {}>;
47
47
  export declare const StyledLoader: import("../styled").StyledComponent<import("../Loader").LoaderProps & {
48
48
  theme?: import("@emotion/react").Theme | undefined;
@@ -18,7 +18,7 @@ export declare const StyledCopyIcon: import("../styled").StyledComponent<{
18
18
  children?: import("react").ReactNode;
19
19
  color?: string | undefined;
20
20
  titleAccess?: string | undefined;
21
- size?: "sm" | "md" | undefined;
21
+ size?: "sm" | "md" | "auto" | undefined;
22
22
  } & import("react").SVGProps<SVGSVGElement> & {
23
23
  theme?: import("@emotion/react").Theme | undefined;
24
24
  } & {
@@ -34,7 +34,7 @@ export declare const ChevronIcon: import("../../styled").StyledComponent<{
34
34
  children?: import("react").ReactNode;
35
35
  color?: string | undefined;
36
36
  titleAccess?: string | undefined;
37
- size?: "sm" | "md" | undefined;
37
+ size?: "sm" | "md" | "auto" | undefined;
38
38
  } & import("react").SVGProps<SVGSVGElement> & {
39
39
  theme?: import("@emotion/react").Theme | undefined;
40
40
  } & {
@@ -33,7 +33,7 @@ export declare const ChevronIcon: import("../styled").StyledComponent<{
33
33
  children?: import("react").ReactNode;
34
34
  color?: string | undefined;
35
35
  titleAccess?: string | undefined;
36
- size?: "sm" | "md" | undefined;
36
+ size?: "sm" | "md" | "auto" | undefined;
37
37
  } & import("react").SVGProps<SVGSVGElement> & {
38
38
  theme?: import("@emotion/react").Theme | undefined;
39
39
  }, {}, {}>;
@@ -6,7 +6,7 @@ export declare const NextIcon: import("../../../../styled").StyledComponent<{
6
6
  children?: import("react").ReactNode;
7
7
  color?: string | undefined;
8
8
  titleAccess?: string | undefined;
9
- size?: "sm" | "md" | undefined;
9
+ size?: "sm" | "md" | "auto" | undefined;
10
10
  } & import("react").SVGProps<SVGSVGElement> & {
11
11
  theme?: import("@emotion/react").Theme | undefined;
12
12
  }, {}, {}>;
@@ -18,7 +18,7 @@ export declare const DoubleNextIcon: import("../../../../styled").StyledComponen
18
18
  children?: import("react").ReactNode;
19
19
  color?: string | undefined;
20
20
  titleAccess?: string | undefined;
21
- size?: "sm" | "md" | undefined;
21
+ size?: "sm" | "md" | "auto" | undefined;
22
22
  } & import("react").SVGProps<SVGSVGElement> & {
23
23
  theme?: import("@emotion/react").Theme | undefined;
24
24
  }, {}, {}>;
@@ -6,7 +6,7 @@ export declare const PrevIcon: import("../../../../styled").StyledComponent<{
6
6
  children?: import("react").ReactNode;
7
7
  color?: string | undefined;
8
8
  titleAccess?: string | undefined;
9
- size?: "sm" | "md" | undefined;
9
+ size?: "sm" | "md" | "auto" | undefined;
10
10
  } & import("react").SVGProps<SVGSVGElement> & {
11
11
  theme?: import("@emotion/react").Theme | undefined;
12
12
  }, {}, {}>;
@@ -18,7 +18,7 @@ export declare const DoublePrevIcon: import("../../../../styled").StyledComponen
18
18
  children?: import("react").ReactNode;
19
19
  color?: string | undefined;
20
20
  titleAccess?: string | undefined;
21
- size?: "sm" | "md" | undefined;
21
+ size?: "sm" | "md" | "auto" | undefined;
22
22
  } & import("react").SVGProps<SVGSVGElement> & {
23
23
  theme?: import("@emotion/react").Theme | undefined;
24
24
  }, {}, {}>;
@@ -11,7 +11,7 @@ export declare const SuccessIcon: import("../../styled").StyledComponent<{
11
11
  children?: import("react").ReactNode;
12
12
  color?: string | undefined;
13
13
  titleAccess?: string | undefined;
14
- size?: "sm" | "md" | undefined;
14
+ size?: "sm" | "md" | "auto" | undefined;
15
15
  } & import("react").SVGProps<SVGSVGElement> & {
16
16
  theme?: import("@emotion/react").Theme | undefined;
17
17
  }, {}, {}>;
@@ -19,7 +19,7 @@ export declare const ErrorIcon: import("../../styled").StyledComponent<{
19
19
  children?: import("react").ReactNode;
20
20
  color?: string | undefined;
21
21
  titleAccess?: string | undefined;
22
- size?: "sm" | "md" | undefined;
22
+ size?: "sm" | "md" | "auto" | undefined;
23
23
  } & import("react").SVGProps<SVGSVGElement> & {
24
24
  theme?: import("@emotion/react").Theme | undefined;
25
25
  }, {}, {}>;
@@ -1,2 +1,2 @@
1
1
  import { type HintIconProps } from './types';
2
- export declare const HintIcon: ({ variant, title, note, iconOption, tooltipPlacement, renderIcon, tooltipWidth, }: HintIconProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const HintIcon: ({ variant, title, note, iconOption, size, tooltipPlacement, renderIcon, tooltipWidth, }: HintIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { BottomDrawer } from '../BottomDrawer';
3
3
  import { Icon } from './Icon';
4
4
  import { DrawerContent } from './styles';
5
5
  import { useLogic } from './useLogic';
6
- export const HintIcon = ({ variant, title, note, iconOption, tooltipPlacement = 'bottom', renderIcon, tooltipWidth, }) => {
6
+ export const HintIcon = ({ variant, title, note, iconOption, size, tooltipPlacement = 'bottom', renderIcon, tooltipWidth, }) => {
7
7
  const { handleClose, handleOpen, open } = useLogic();
8
- return (_jsxs(_Fragment, { children: [_jsx(Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon, tooltipWidth: tooltipWidth }), _jsx(BottomDrawer, { title: title, open: open, onClose: handleClose, children: _jsx(DrawerContent, { children: note }) })] }));
8
+ return (_jsxs(_Fragment, { children: [_jsx(Icon, { onClick: handleOpen, variant: variant, iconOption: iconOption, size: size, note: note, tooltipPlacement: tooltipPlacement, renderIcon: renderIcon, tooltipWidth: tooltipWidth }), _jsx(BottomDrawer, { title: title, open: open, onClose: handleClose, children: _jsx(DrawerContent, { children: note }) })] }));
9
9
  };
@@ -1,6 +1,6 @@
1
1
  import type { SyntheticEvent } from 'react';
2
2
  import type { HintIconProps, TooltipPlacement } from '../types';
3
- export type IconProps = Pick<HintIconProps, 'variant' | 'iconOption' | 'note' | 'renderIcon' | 'tooltipWidth'> & {
3
+ export type IconProps = Pick<HintIconProps, 'variant' | 'iconOption' | 'size' | 'note' | 'renderIcon' | 'tooltipWidth'> & {
4
4
  onClick: (e: SyntheticEvent) => void;
5
5
  tooltipPlacement: TooltipPlacement;
6
6
  };
@@ -1,10 +1,17 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Tooltip } from '../../Tooltip';
3
- import { hintIconClassnames } from '../constants';
3
+ import { hintIconClassnames, ICONS } from '../constants';
4
4
  import { IconWrapper } from './styles';
5
5
  import { useLogic } from './useLogic';
6
6
  export const Icon = (props) => {
7
- const { getIcon, iconColor } = useLogic(props);
8
- const { onClick, note, tooltipPlacement, tooltipWidth } = props;
9
- return (_jsx(Tooltip, { title: note, placement: tooltipPlacement, width: tooltipWidth, children: _jsx(IconWrapper, { onClick: onClick, "$color": iconColor, className: hintIconClassnames.iconWrapper, children: getIcon() }) }));
7
+ const { iconColor } = useLogic(props);
8
+ const { onClick, variant, iconOption, size, note, tooltipPlacement, tooltipWidth, renderIcon, } = props;
9
+ const IconVariant = () => {
10
+ if (renderIcon) {
11
+ return renderIcon();
12
+ }
13
+ const Component = ICONS[variant ?? 'info'][iconOption?.variant ?? 'fill'];
14
+ return _jsx(Component, { size: size });
15
+ };
16
+ return (_jsx(Tooltip, { title: note, placement: tooltipPlacement, width: tooltipWidth, children: _jsx(IconWrapper, { onClick: onClick, "$color": iconColor, className: hintIconClassnames.iconWrapper, children: _jsx(IconVariant, {}) }) }));
10
17
  };
@@ -1,8 +1,6 @@
1
- import { type ReactNode } from 'react';
2
1
  import { type IconProps } from '../Icon';
3
2
  type UseLogicParams = IconProps;
4
- export declare const useLogic: ({ iconOption, variant, renderIcon, }: UseLogicParams) => {
5
- getIcon: () => ReactNode;
3
+ export declare const useLogic: ({ iconOption, renderIcon }: UseLogicParams) => {
6
4
  iconColor: string;
7
5
  };
8
6
  export {};
@@ -1,17 +1,5 @@
1
- import { ICONS } from '../../constants';
2
1
  import { useIconColor } from './hooks';
3
- export const useLogic = ({ iconOption, variant, renderIcon, }) => {
2
+ export const useLogic = ({ iconOption, renderIcon }) => {
4
3
  const iconColor = useIconColor({ color: iconOption?.color, renderIcon });
5
- const { variant: iconOptionVariant = 'fill' } = iconOption || {};
6
- const getIcon = () => {
7
- if (renderIcon) {
8
- return renderIcon();
9
- }
10
- const icon = ICONS[variant][iconOptionVariant];
11
- if (icon) {
12
- return icon;
13
- }
14
- return ICONS.info.fill;
15
- };
16
- return { getIcon, iconColor };
4
+ return { iconColor };
17
5
  };
@@ -1,13 +1,14 @@
1
+ /// <reference types="react" />
1
2
  export declare const hintIconClassnames: {
2
3
  iconWrapper: string;
3
4
  };
4
5
  export declare const ICONS: {
5
6
  question: {
6
- fill: import("react/jsx-runtime").JSX.Element;
7
- outline: import("react/jsx-runtime").JSX.Element;
7
+ fill: import("react").FunctionComponent<import("..").SvgIconProps>;
8
+ outline: import("react").FunctionComponent<import("..").SvgIconProps>;
8
9
  };
9
10
  info: {
10
- fill: import("react/jsx-runtime").JSX.Element;
11
- outline: import("react/jsx-runtime").JSX.Element;
11
+ fill: import("react").FunctionComponent<import("..").SvgIconProps>;
12
+ outline: import("react").FunctionComponent<import("..").SvgIconProps>;
12
13
  };
13
14
  };
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { InfoFillMd } from '../../icons/InfoFillMd';
3
2
  import { InfoOutlineMd } from '../../icons/InfoOutlineMd';
4
3
  import { QuestionFillMd } from '../../icons/QuestionFillMd';
@@ -9,11 +8,11 @@ export const hintIconClassnames = {
9
8
  };
10
9
  export const ICONS = {
11
10
  question: {
12
- fill: _jsx(QuestionFillMd, {}),
13
- outline: _jsx(QuestionOutlineMd, {}),
11
+ fill: QuestionFillMd,
12
+ outline: QuestionOutlineMd,
14
13
  },
15
14
  info: {
16
- fill: _jsx(InfoFillMd, {}),
17
- outline: _jsx(InfoOutlineMd, {}),
15
+ fill: InfoFillMd,
16
+ outline: InfoOutlineMd,
18
17
  },
19
18
  };
@@ -20,6 +20,12 @@ export type HintIconProps = {
20
20
  */
21
21
  color?: 'warning' | 'grey' | 'lightGrey';
22
22
  };
23
+ /**
24
+ * Размеры (width и height) иконки.
25
+ *
26
+ * sm = 16px, md = 24px, auto = 1em
27
+ */
28
+ size?: 'sm' | 'md' | 'auto';
23
29
  /**
24
30
  * Текст заголовка BottomDrawer
25
31
  */
@@ -16,7 +16,7 @@ export declare const Chevron: import("../../styled").StyledComponent<{
16
16
  children?: import("react").ReactNode;
17
17
  color?: string | undefined;
18
18
  titleAccess?: string | undefined;
19
- size?: "sm" | "md" | undefined;
19
+ size?: "sm" | "md" | "auto" | undefined;
20
20
  } & import("react").SVGProps<SVGSVGElement> & {
21
21
  theme?: import("@emotion/react").Theme | undefined;
22
22
  } & {
@@ -3,7 +3,7 @@ export declare const InfoNotificationIcon: import("../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -11,7 +11,7 @@ export declare const SuccessNotificationIcon: import("../styled").StyledComponen
11
11
  children?: import("react").ReactNode;
12
12
  color?: string | undefined;
13
13
  titleAccess?: string | undefined;
14
- size?: "sm" | "md" | undefined;
14
+ size?: "sm" | "md" | "auto" | undefined;
15
15
  } & import("react").SVGProps<SVGSVGElement> & {
16
16
  theme?: import("@emotion/react").Theme | undefined;
17
17
  }, {}, {}>;
@@ -19,7 +19,7 @@ export declare const WarningNotificationIcon: import("../styled").StyledComponen
19
19
  children?: import("react").ReactNode;
20
20
  color?: string | undefined;
21
21
  titleAccess?: string | undefined;
22
- size?: "sm" | "md" | undefined;
22
+ size?: "sm" | "md" | "auto" | undefined;
23
23
  } & import("react").SVGProps<SVGSVGElement> & {
24
24
  theme?: import("@emotion/react").Theme | undefined;
25
25
  }, {}, {}>;
@@ -27,7 +27,7 @@ export declare const ErrorNotificationIcon: import("../styled").StyledComponent<
27
27
  children?: import("react").ReactNode;
28
28
  color?: string | undefined;
29
29
  titleAccess?: string | undefined;
30
- size?: "sm" | "md" | undefined;
30
+ size?: "sm" | "md" | "auto" | undefined;
31
31
  } & import("react").SVGProps<SVGSVGElement> & {
32
32
  theme?: import("@emotion/react").Theme | undefined;
33
33
  }, {}, {}>;
@@ -12,7 +12,7 @@ export declare const StyledSvgIcon: import("../styled").StyledComponent<{
12
12
  children?: import("react").ReactNode;
13
13
  color?: string | undefined;
14
14
  titleAccess?: string | undefined;
15
- size?: "sm" | "md" | undefined;
15
+ size?: "sm" | "md" | "auto" | undefined;
16
16
  } & import("react").SVGProps<SVGSVGElement> & {
17
17
  theme?: import("@emotion/react").Theme | undefined;
18
18
  }, {}, {}>;
@@ -642,7 +642,7 @@ export declare const NavMenuItemButtonChevron: import("../../../styled").StyledC
642
642
  children?: import("react").ReactNode;
643
643
  color?: string | undefined;
644
644
  titleAccess?: string | undefined;
645
- size?: "sm" | "md" | undefined;
645
+ size?: "sm" | "md" | "auto" | undefined;
646
646
  } & import("react").SVGProps<SVGSVGElement> & {
647
647
  theme?: import("@emotion/react").Theme | undefined;
648
648
  } & {
@@ -659,7 +659,7 @@ export declare const StyledPageDotOutlineMd: import("../../../styled").StyledCom
659
659
  children?: import("react").ReactNode;
660
660
  color?: string | undefined;
661
661
  titleAccess?: string | undefined;
662
- size?: "sm" | "md" | undefined;
662
+ size?: "sm" | "md" | "auto" | undefined;
663
663
  } & import("react").SVGProps<SVGSVGElement> & {
664
664
  theme?: import("@emotion/react").Theme | undefined;
665
665
  }, {}, {}>;
@@ -6,7 +6,7 @@ export const StyledMuiPopper = styled(MuiPopper) `
6
6
  --arrow-base: ${ARROW_BASE}px;
7
7
  --arrow-height: ${ARROW_HEIGHT}px;
8
8
 
9
- z-index: ${({ theme }) => theme.zIndex.tooltip};
9
+ z-index: ${({ theme }) => theme.zIndex.modal};
10
10
  }
11
11
 
12
12
  /* Anchor ушёл за скролл/вьюпорт — прячем стрелку. */
@@ -11,7 +11,7 @@ export declare const ArrowConnector: import("../../styled").StyledComponent<{
11
11
  children?: import("react").ReactNode;
12
12
  color?: string | undefined;
13
13
  titleAccess?: string | undefined;
14
- size?: "sm" | "md" | undefined;
14
+ size?: "sm" | "md" | "auto" | undefined;
15
15
  } & import("react").SVGProps<SVGSVGElement> & {
16
16
  theme?: import("@emotion/react").Theme | undefined;
17
17
  }, {}, {}>;
@@ -3,7 +3,7 @@ export declare const InfoNotificationIcon: import("../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -11,7 +11,7 @@ export declare const SuccessNotificationIcon: import("../styled").StyledComponen
11
11
  children?: import("react").ReactNode;
12
12
  color?: string | undefined;
13
13
  titleAccess?: string | undefined;
14
- size?: "sm" | "md" | undefined;
14
+ size?: "sm" | "md" | "auto" | undefined;
15
15
  } & import("react").SVGProps<SVGSVGElement> & {
16
16
  theme?: import("@emotion/react").Theme | undefined;
17
17
  }, {}, {}>;
@@ -19,7 +19,7 @@ export declare const WarningNotificationIcon: import("../styled").StyledComponen
19
19
  children?: import("react").ReactNode;
20
20
  color?: string | undefined;
21
21
  titleAccess?: string | undefined;
22
- size?: "sm" | "md" | undefined;
22
+ size?: "sm" | "md" | "auto" | undefined;
23
23
  } & import("react").SVGProps<SVGSVGElement> & {
24
24
  theme?: import("@emotion/react").Theme | undefined;
25
25
  }, {}, {}>;
@@ -27,7 +27,7 @@ export declare const ErrorNotificationIcon: import("../styled").StyledComponent<
27
27
  children?: import("react").ReactNode;
28
28
  color?: string | undefined;
29
29
  titleAccess?: string | undefined;
30
- size?: "sm" | "md" | undefined;
30
+ size?: "sm" | "md" | "auto" | undefined;
31
31
  } & import("react").SVGProps<SVGSVGElement> & {
32
32
  theme?: import("@emotion/react").Theme | undefined;
33
33
  }, {}, {}>;
@@ -3,7 +3,7 @@ export declare const SearchIcon: import("../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -3,7 +3,7 @@ export declare const ArrowConnector: import("../../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -3,7 +3,7 @@ export declare const ErrorIcon: import("../../styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  color?: string | undefined;
5
5
  titleAccess?: string | undefined;
6
- size?: "sm" | "md" | undefined;
6
+ size?: "sm" | "md" | "auto" | undefined;
7
7
  } & import("react").SVGProps<SVGSVGElement> & {
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  }, {}, {}>;
@@ -11,7 +11,7 @@ export declare const SuccessIcon: import("../../styled").StyledComponent<{
11
11
  children?: import("react").ReactNode;
12
12
  color?: string | undefined;
13
13
  titleAccess?: string | undefined;
14
- size?: "sm" | "md" | undefined;
14
+ size?: "sm" | "md" | "auto" | undefined;
15
15
  } & import("react").SVGProps<SVGSVGElement> & {
16
16
  theme?: import("@emotion/react").Theme | undefined;
17
17
  }, {}, {}>;
@@ -19,7 +19,7 @@ export declare const SelectIcon: import("../../styled").StyledComponent<{
19
19
  children?: import("react").ReactNode;
20
20
  color?: string | undefined;
21
21
  titleAccess?: string | undefined;
22
- size?: "sm" | "md" | undefined;
22
+ size?: "sm" | "md" | "auto" | undefined;
23
23
  } & import("react").SVGProps<SVGSVGElement> & {
24
24
  theme?: import("@emotion/react").Theme | undefined;
25
25
  } & {
@@ -29,7 +29,7 @@ export declare const DefaultIcon: import("../../styled").StyledComponent<{
29
29
  children?: import("react").ReactNode;
30
30
  color?: string | undefined;
31
31
  titleAccess?: string | undefined;
32
- size?: "sm" | "md" | undefined;
32
+ size?: "sm" | "md" | "auto" | undefined;
33
33
  } & import("react").SVGProps<SVGSVGElement> & {
34
34
  theme?: import("@emotion/react").Theme | undefined;
35
35
  }, {}, {}>;
@@ -37,7 +37,7 @@ export declare const ActiveIcon: import("../../styled").StyledComponent<{
37
37
  children?: import("react").ReactNode;
38
38
  color?: string | undefined;
39
39
  titleAccess?: string | undefined;
40
- size?: "sm" | "md" | undefined;
40
+ size?: "sm" | "md" | "auto" | undefined;
41
41
  } & import("react").SVGProps<SVGSVGElement> & {
42
42
  theme?: import("@emotion/react").Theme | undefined;
43
43
  }, {}, {}>;
@@ -1,8 +1,18 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { classNames } from '../utils/classNames';
3
+ import { cva } from '../utils/cva';
3
4
  import { SIZES, svgIconClassnames } from './constants';
4
5
  import { StyledSvg } from './styles';
6
+ const svgCva = cva(svgIconClassnames.root, {
7
+ variants: {
8
+ size: {
9
+ auto: svgIconClassnames.sizeAuto,
10
+ sm: svgIconClassnames.sizeSm,
11
+ md: svgIconClassnames.sizeMd,
12
+ },
13
+ },
14
+ });
5
15
  export const SvgIcon = (props) => {
6
16
  const { children, color = 'inherit', titleAccess, size, width, height, viewBox = '0 0 24 24', xmlns = 'http://www.w3.org/2000/svg', className, ...restProps } = props;
7
- return (_jsxs(StyledSvg, { className: classNames(className, svgIconClassnames.root), viewBox: viewBox, "aria-hidden": titleAccess ? undefined : true, role: titleAccess ? 'img' : undefined, xmlns: xmlns, color: color, width: SIZES[size] || width || '1em', height: SIZES[size] || height || '1em', ...restProps, children: [children, titleAccess ? _jsx("title", { children: titleAccess }) : null] }));
17
+ return (_jsxs(StyledSvg, { className: classNames(className, svgCva({ size })), viewBox: viewBox, "aria-hidden": titleAccess ? undefined : true, role: titleAccess ? 'img' : undefined, xmlns: xmlns, color: color, width: SIZES[size] || width || '1em', height: SIZES[size] || height || '1em', ...restProps, children: [children, titleAccess ? _jsx("title", { children: titleAccess }) : null] }));
8
18
  };
@@ -1,7 +1,11 @@
1
1
  export declare const SIZES: {
2
2
  sm: string;
3
3
  md: string;
4
+ auto: string;
4
5
  };
5
6
  export declare const svgIconClassnames: {
6
7
  root: string;
8
+ sizeAuto: string;
9
+ sizeSm: string;
10
+ sizeMd: string;
7
11
  };
@@ -2,7 +2,11 @@ import { createUIKitClassname } from '../utils/createUIKitClassname';
2
2
  export const SIZES = {
3
3
  sm: '16px',
4
4
  md: '24px',
5
+ auto: '1em',
5
6
  };
6
7
  export const svgIconClassnames = {
7
8
  root: createUIKitClassname('svg-icon'),
9
+ sizeAuto: createUIKitClassname('svg-icon_size-auto'),
10
+ sizeSm: createUIKitClassname('svg-icon_size-sm'),
11
+ sizeMd: createUIKitClassname('svg-icon_size-md'),
8
12
  };
@@ -1,4 +1,5 @@
1
1
  import { styled } from '../styled';
2
+ import { svgIconClassnames } from './constants';
2
3
  const getColor = (theme, color) => {
3
4
  if (color === 'inherit') {
4
5
  return 'inherit';
@@ -29,10 +30,8 @@ export const StyledSvg = styled.svg `
29
30
  display: inline-block;
30
31
  flex-shrink: 0;
31
32
 
32
- font-size: ${({ theme }) => {
33
- // По умолчанию как в MUI
34
- return theme.typography.pxToRem(24);
35
- }};
33
+ font-size: ${({ theme }) => theme.typography.pxToRem(24)};
34
+
36
35
  color: ${({ theme, color }) => getColor(theme, color)};
37
36
 
38
37
  fill: currentColor;
@@ -40,4 +39,8 @@ export const StyledSvg = styled.svg `
40
39
  transition: ${({ theme }) => theme.transitions.create(['fill'], {
41
40
  duration: theme.transitions.duration.shorter,
42
41
  })};
42
+
43
+ &.${svgIconClassnames.sizeAuto} {
44
+ font-size: inherit;
45
+ }
43
46
  `;
@@ -21,7 +21,7 @@ export type SvgIconProps = {
21
21
  /**
22
22
  * Размеры (width и height) иконки.
23
23
  *
24
- * sm = 16px, md = 24px
24
+ * auto = 1em, sm = 16px, md = 24px
25
25
  */
26
- size?: 'sm' | 'md';
26
+ size?: 'auto' | 'sm' | 'md';
27
27
  } & ComponentProps<'svg'>;
@@ -30,7 +30,7 @@ export declare const ChevronIcon: import("../../styled").StyledComponent<{
30
30
  children?: import("react").ReactNode;
31
31
  color?: string | undefined;
32
32
  titleAccess?: string | undefined;
33
- size?: "sm" | "md" | undefined;
33
+ size?: "sm" | "md" | "auto" | undefined;
34
34
  } & import("react").SVGProps<SVGSVGElement> & {
35
35
  theme?: import("@emotion/react").Theme | undefined;
36
36
  } & {