@astral/ui 4.89.0 → 4.90.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 (103) 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/Badge/styles.js +7 -0
  7. package/components/BulletListItem/styles.d.ts +1 -1
  8. package/components/Chevron/styles.d.ts +1 -1
  9. package/components/Chip/ChipStatusIcon/styled.d.ts +1 -1
  10. package/components/ComplianceStatus/styles.d.ts +3 -3
  11. package/components/CopyTypography/styles.d.ts +1 -1
  12. package/components/DataGrid/Row/styles.d.ts +1 -1
  13. package/components/DataGridCollapsibleRow/styles.d.ts +1 -1
  14. package/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarNextButton/styles.d.ts +2 -2
  15. package/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarPrevButton/styles.d.ts +2 -2
  16. package/components/FormHelperText/FormHelperTextContent/styles.d.ts +2 -2
  17. package/components/HintIcon/HintIcon.d.ts +1 -1
  18. package/components/HintIcon/HintIcon.js +2 -2
  19. package/components/HintIcon/Icon/Icon.d.ts +1 -1
  20. package/components/HintIcon/Icon/Icon.js +11 -4
  21. package/components/HintIcon/Icon/useLogic/useLogic.d.ts +1 -3
  22. package/components/HintIcon/Icon/useLogic/useLogic.js +2 -14
  23. package/components/HintIcon/constants.d.ts +5 -4
  24. package/components/HintIcon/constants.js +4 -5
  25. package/components/HintIcon/types.d.ts +6 -0
  26. package/components/IconButton/IconButton.js +4 -2
  27. package/components/IconButton/constants.d.ts +3 -0
  28. package/components/IconButton/constants.js +4 -0
  29. package/components/IconButton/index.d.ts +1 -0
  30. package/components/IconButton/index.js +1 -0
  31. package/components/IconButton/public.d.ts +1 -0
  32. package/components/IconButton/public.js +1 -0
  33. package/components/JsonViewer/JsonNode/styles.d.ts +1 -1
  34. package/components/LegacyNotification/styles.d.ts +4 -4
  35. package/components/Loader/styles.d.ts +1 -1
  36. package/components/NavMenu/Item/ItemButton/styles.d.ts +2 -2
  37. package/components/NewPopover/styles.js +1 -1
  38. package/components/NewStepper/Step/styles.d.ts +1 -1
  39. package/components/Notification/styles.d.ts +4 -4
  40. package/components/SearchField/styles.d.ts +1 -1
  41. package/components/Stepper/ArrowConnector/ArrowConnector.d.ts +1 -1
  42. package/components/Stepper/StepIcon/styles.d.ts +5 -5
  43. package/components/SvgIcon/SvgIcon.js +11 -1
  44. package/components/SvgIcon/constants.d.ts +4 -0
  45. package/components/SvgIcon/constants.js +4 -0
  46. package/components/SvgIcon/styles.js +7 -4
  47. package/components/SvgIcon/types.d.ts +2 -2
  48. package/components/Tree/TreeItem/styles.d.ts +1 -1
  49. package/components/fileUploading/FileInfo/styles.d.ts +1 -1
  50. package/hook-form/EditableText/styles.d.ts +1 -1
  51. package/hook-form/FormWizardPageLayout/FormWizardFooter/styles.d.ts +2 -2
  52. package/node/components/Accordion/styles.d.ts +1 -1
  53. package/node/components/AutoSaveIndicator/DefaultState/styles.d.ts +1 -1
  54. package/node/components/AutoSaveIndicator/ErrorState/styles.d.ts +1 -1
  55. package/node/components/AutoSaveIndicator/LoadingState/styles.d.ts +1 -1
  56. package/node/components/AutoSaveIndicator/SuccessState/styles.d.ts +1 -1
  57. package/node/components/Badge/styles.js +7 -0
  58. package/node/components/BulletListItem/styles.d.ts +1 -1
  59. package/node/components/Chevron/styles.d.ts +1 -1
  60. package/node/components/Chip/ChipStatusIcon/styled.d.ts +1 -1
  61. package/node/components/ComplianceStatus/styles.d.ts +3 -3
  62. package/node/components/CopyTypography/styles.d.ts +1 -1
  63. package/node/components/DataGrid/Row/styles.d.ts +1 -1
  64. package/node/components/DataGridCollapsibleRow/styles.d.ts +1 -1
  65. package/node/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarNextButton/styles.d.ts +2 -2
  66. package/node/components/DatePicker/DateCalendar/DateCalendarChevronButton/DateCalendarPrevButton/styles.d.ts +2 -2
  67. package/node/components/FormHelperText/FormHelperTextContent/styles.d.ts +2 -2
  68. package/node/components/HintIcon/HintIcon.d.ts +1 -1
  69. package/node/components/HintIcon/HintIcon.js +2 -2
  70. package/node/components/HintIcon/Icon/Icon.d.ts +1 -1
  71. package/node/components/HintIcon/Icon/Icon.js +10 -3
  72. package/node/components/HintIcon/Icon/useLogic/useLogic.d.ts +1 -3
  73. package/node/components/HintIcon/Icon/useLogic/useLogic.js +2 -14
  74. package/node/components/HintIcon/constants.d.ts +5 -4
  75. package/node/components/HintIcon/constants.js +4 -5
  76. package/node/components/HintIcon/types.d.ts +6 -0
  77. package/node/components/IconButton/IconButton.js +4 -2
  78. package/node/components/IconButton/constants.d.ts +3 -0
  79. package/node/components/IconButton/constants.js +7 -0
  80. package/node/components/IconButton/index.d.ts +1 -0
  81. package/node/components/IconButton/index.js +3 -0
  82. package/node/components/IconButton/public.d.ts +1 -0
  83. package/node/components/IconButton/public.js +3 -0
  84. package/node/components/JsonViewer/JsonNode/styles.d.ts +1 -1
  85. package/node/components/LegacyNotification/styles.d.ts +4 -4
  86. package/node/components/Loader/styles.d.ts +1 -1
  87. package/node/components/NavMenu/Item/ItemButton/styles.d.ts +2 -2
  88. package/node/components/NewPopover/styles.js +1 -1
  89. package/node/components/NewStepper/Step/styles.d.ts +1 -1
  90. package/node/components/Notification/styles.d.ts +4 -4
  91. package/node/components/SearchField/styles.d.ts +1 -1
  92. package/node/components/Stepper/ArrowConnector/ArrowConnector.d.ts +1 -1
  93. package/node/components/Stepper/StepIcon/styles.d.ts +5 -5
  94. package/node/components/SvgIcon/SvgIcon.js +11 -1
  95. package/node/components/SvgIcon/constants.d.ts +4 -0
  96. package/node/components/SvgIcon/constants.js +4 -0
  97. package/node/components/SvgIcon/styles.js +7 -4
  98. package/node/components/SvgIcon/types.d.ts +2 -2
  99. package/node/components/Tree/TreeItem/styles.d.ts +1 -1
  100. package/node/components/fileUploading/FileInfo/styles.d.ts +1 -1
  101. package/node/hook-form/EditableText/styles.d.ts +1 -1
  102. package/node/hook-form/FormWizardPageLayout/FormWizardFooter/styles.d.ts +2 -2
  103. 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
  }, {}, {}>;
@@ -1,4 +1,5 @@
1
1
  import Badge from '@mui/material/Badge';
2
+ import { iconButtonClassnames } from '../IconButton';
2
3
  import { styled } from '../styled';
3
4
  import { badgeClassnames } from './constants';
4
5
  const getBgColor = ({ $customColor, theme, $variantColor, }) => {
@@ -53,6 +54,12 @@ export const StyledBadge = styled(Badge, {
53
54
  flex-grow: 1;
54
55
  }
55
56
 
57
+ /* Причина игнора: прогрессивное улучшение */
58
+ /* stylelint-disable plugin/no-unsupported-browser-features */
59
+ &:has(.${iconButtonClassnames.root}) {
60
+ width: max-content;
61
+ }
62
+
56
63
  .${badgeClassnames.content} {
57
64
  cursor: default;
58
65
  user-select: none;
@@ -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
  */
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ButtonVariants } from '../Button';
3
3
  import { forwardRefWithGeneric } from '../forwardRefWithGeneric';
4
+ import { classNames } from '../utils/classNames';
5
+ import { iconButtonClassnames } from './constants';
4
6
  import { StyledButton } from './styles';
5
7
  const UnwrappedIconButton = (props, ref) => {
6
- const { variant = ButtonVariants.Contained, children, ...restProps } = props;
7
- return (_jsx(StyledButton, { variant: variant, ...restProps, ref: ref, children: children }));
8
+ const { variant = ButtonVariants.Contained, children, className, ...restProps } = props;
9
+ return (_jsx(StyledButton, { variant: variant, className: classNames(iconButtonClassnames.root, className), ...restProps, ref: ref, children: children }));
8
10
  };
9
11
  export const IconButton = forwardRefWithGeneric(UnwrappedIconButton);
@@ -0,0 +1,3 @@
1
+ export declare const iconButtonClassnames: {
2
+ root: string;
3
+ };
@@ -0,0 +1,4 @@
1
+ import { createUIKitClassname } from '../utils/createUIKitClassname';
2
+ export const iconButtonClassnames = {
3
+ root: createUIKitClassname('icon-button'),
4
+ };
@@ -1 +1,2 @@
1
1
  export * from './IconButton';
2
+ export { iconButtonClassnames } from './constants';
@@ -1 +1,2 @@
1
1
  export * from './IconButton';
2
+ export { iconButtonClassnames } from './constants';
@@ -1 +1,2 @@
1
+ export { iconButtonClassnames } from './constants';
1
2
  export * from './IconButton';
@@ -1 +1,2 @@
1
+ export { iconButtonClassnames } from './constants';
1
2
  export * from './IconButton';
@@ -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
  };