@itcase/ui-web 1.9.91 → 1.9.93

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 (150) hide show
  1. package/dist/{Avatar_cjs_CTpQ8p9y.js → Avatar_cjs_CrBNDT-b.js} +1 -1
  2. package/dist/{Avatar_es_CZaOp89f.js → Avatar_es_U1YYJODp.js} +1 -1
  3. package/dist/{Button_cjs_BwvUAR8Q.js → Button_cjs_BooGWjFA.js} +1 -1
  4. package/dist/{Button_es_CVTnbWvY.js → Button_es_ByZvr97d.js} +1 -1
  5. package/dist/{ChipsGroup_cjs_BsIhJo6T.js → ChipsGroup_cjs_e06Mbwfo.js} +1 -1
  6. package/dist/{ChipsGroup_es_0BYWqUPj.js → ChipsGroup_es_BPB49-MY.js} +1 -1
  7. package/dist/{DatePicker_cjs_CiMRU0F5.js → DatePicker_cjs_wBpuO_k6.js} +1 -1
  8. package/dist/{DatePicker_es_BRmU-HB_.js → DatePicker_es_CNeC_D8K.js} +1 -1
  9. package/dist/{Label_cjs_ChRo7KzR.js → Label_cjs_DvzrQiaJ.js} +1 -1
  10. package/dist/{Label_es_BsCvIlt8.js → Label_es_GkbUOWkY.js} +1 -1
  11. package/dist/{Loader_cjs_CqtSa-19.js → Loader_cjs_jDizp0PM.js} +1 -1
  12. package/dist/{Loader_es_Gu2mEy8z.js → Loader_es_CNm-0k9h.js} +1 -1
  13. package/dist/Overlay_cjs_Bt7hgSVF.js +1 -0
  14. package/dist/Overlay_es_RVGuxGY4.js +1 -0
  15. package/dist/{SelectContainer_cjs_yJf1uj-L.js → SelectContainer_cjs_DwcpbekD.js} +1 -1
  16. package/dist/{SelectContainer_es_CfRZq9xe.js → SelectContainer_es_BBw3-MW1.js} +1 -1
  17. package/dist/cjs/components/Accordion.js +1 -1
  18. package/dist/cjs/components/Avatar.js +1 -1
  19. package/dist/cjs/components/AvatarStack.js +1 -1
  20. package/dist/cjs/components/Badge.js +1 -1
  21. package/dist/cjs/components/Breadcrumbs.js +1 -1
  22. package/dist/cjs/components/Button.js +1 -1
  23. package/dist/cjs/components/Cell.js +1 -1
  24. package/dist/cjs/components/Checkbox.js +1 -1
  25. package/dist/cjs/components/Checkmark.js +1 -1
  26. package/dist/cjs/components/Chips.js +1 -1
  27. package/dist/cjs/components/Choice.js +1 -1
  28. package/dist/cjs/components/CookiesWarning.js +1 -1
  29. package/dist/cjs/components/DatePeriod.js +1 -1
  30. package/dist/cjs/components/DatePicker.js +1 -1
  31. package/dist/cjs/components/Divider.js +1 -1
  32. package/dist/cjs/components/Drawer.js +1 -1
  33. package/dist/cjs/components/Dropdown.js +1 -1
  34. package/dist/cjs/components/Dropzone.js +1 -1
  35. package/dist/cjs/components/HeroTitle.js +1 -1
  36. package/dist/cjs/components/Icon.js +1 -1
  37. package/dist/cjs/components/InputNumber.js +1 -1
  38. package/dist/cjs/components/InputPassword.js +1 -1
  39. package/dist/cjs/components/Label.js +1 -1
  40. package/dist/cjs/components/Link.js +1 -1
  41. package/dist/cjs/components/List.js +1 -1
  42. package/dist/cjs/components/Loader.js +1 -1
  43. package/dist/cjs/components/Logo.js +1 -1
  44. package/dist/cjs/components/MenuItem.js +1 -1
  45. package/dist/cjs/components/Modal.js +1 -1
  46. package/dist/cjs/components/ModalSheetBottom.js +1 -1
  47. package/dist/cjs/components/Notification.js +1 -1
  48. package/dist/cjs/components/Overlay.js +1 -1
  49. package/dist/cjs/components/Pagination.js +1 -1
  50. package/dist/cjs/components/Radio.js +1 -1
  51. package/dist/cjs/components/Response.js +1 -1
  52. package/dist/cjs/components/Search.js +1 -1
  53. package/dist/cjs/components/Segmented.js +1 -1
  54. package/dist/cjs/components/Select.js +1 -1
  55. package/dist/cjs/components/Swiper.js +1 -1
  56. package/dist/cjs/components/Switch.js +1 -1
  57. package/dist/cjs/components/Tab.js +1 -1
  58. package/dist/cjs/components/Text.js +1 -1
  59. package/dist/cjs/components/Tile.js +1 -1
  60. package/dist/cjs/components/Title.js +1 -1
  61. package/dist/cjs/components/Tooltip.js +1 -1
  62. package/dist/cjs/components/Warning.js +1 -1
  63. package/dist/components/Accordion.js +1 -1
  64. package/dist/components/Avatar.js +1 -1
  65. package/dist/components/AvatarStack.js +1 -1
  66. package/dist/components/Badge.js +1 -1
  67. package/dist/components/Breadcrumbs.js +1 -1
  68. package/dist/components/Button.js +1 -1
  69. package/dist/components/Cell.js +1 -1
  70. package/dist/components/Checkbox.js +1 -1
  71. package/dist/components/Checkmark.js +1 -1
  72. package/dist/components/Chips.js +1 -1
  73. package/dist/components/Choice.js +1 -1
  74. package/dist/components/CookiesWarning.js +1 -1
  75. package/dist/components/DatePeriod.js +1 -1
  76. package/dist/components/DatePicker.js +1 -1
  77. package/dist/components/Divider.js +1 -1
  78. package/dist/components/Drawer.js +1 -1
  79. package/dist/components/Dropdown.js +1 -1
  80. package/dist/components/Dropzone.js +1 -1
  81. package/dist/components/HeroTitle.js +1 -1
  82. package/dist/components/Icon.js +1 -1
  83. package/dist/components/InputNumber.js +1 -1
  84. package/dist/components/InputPassword.js +1 -1
  85. package/dist/components/Label.js +1 -1
  86. package/dist/components/Link.js +1 -1
  87. package/dist/components/List.js +1 -1
  88. package/dist/components/Loader.js +1 -1
  89. package/dist/components/Logo.js +1 -1
  90. package/dist/components/MenuItem.js +1 -1
  91. package/dist/components/Modal.js +1 -1
  92. package/dist/components/ModalSheetBottom.js +1 -1
  93. package/dist/components/Notification.js +1 -1
  94. package/dist/components/Overlay.js +1 -1
  95. package/dist/components/Pagination.js +1 -1
  96. package/dist/components/Radio.js +1 -1
  97. package/dist/components/Response.js +1 -1
  98. package/dist/components/Search.js +1 -1
  99. package/dist/components/Segmented.js +1 -1
  100. package/dist/components/Select.js +1 -1
  101. package/dist/components/Swiper.js +1 -1
  102. package/dist/components/Switch.js +1 -1
  103. package/dist/components/Tab.js +1 -1
  104. package/dist/components/Text.js +1 -1
  105. package/dist/components/Tile.js +1 -1
  106. package/dist/components/Title.js +1 -1
  107. package/dist/components/Tooltip.js +1 -1
  108. package/dist/components/Warning.js +1 -1
  109. package/dist/primitives_cjs_e06YLoA1.js +1 -0
  110. package/dist/primitives_es_B2iaeM5M.js +1 -0
  111. package/dist/types/components/Badge/Badge.js +3 -2
  112. package/dist/types/components/Code/Code.interface.d.ts +3 -3
  113. package/dist/types/components/Input/Input.d.ts +5 -4
  114. package/dist/types/components/Input/Input.interface.d.ts +7 -5
  115. package/dist/types/components/Input/stories/Input.stories.d.ts +6 -5
  116. package/dist/types/components/Input/stories/InputDefault.stories.d.ts +6 -5
  117. package/dist/types/components/Input/stories/InputDisabled.stories.d.ts +6 -5
  118. package/dist/types/components/Input/stories/InputError.stories.d.ts +6 -5
  119. package/dist/types/components/Input/stories/InputRequire.stories.d.ts +6 -5
  120. package/dist/types/components/Input/stories/InputSize.stories.d.ts +6 -5
  121. package/dist/types/components/Input/stories/InputStyle.stories.d.ts +6 -5
  122. package/dist/types/components/Input/stories/InputSuccess.stories.d.ts +6 -5
  123. package/dist/types/components/InputNumber/InputNumber.interfaces.d.ts +5 -2
  124. package/dist/types/components/InputNumber/InputNumber.js +9 -11
  125. package/dist/types/components/InputNumber/stories/InputNumberDefault.stories.js +4 -1
  126. package/dist/types/components/InputPassword/InputPassword.interface.d.ts +6 -4
  127. package/dist/types/components/Overlay/Overlay.appearance.d.ts +1 -1
  128. package/dist/types/components/Overlay/appearance/overlayDefault.d.ts +1 -1
  129. package/dist/types/components/Overlay/appearance/overlayDefault.js +1 -1
  130. package/dist/types/components/Radio/Radio.interface.d.ts +2 -2
  131. package/dist/types/components/Switch/Switch.d.ts +4 -1
  132. package/dist/types/components/Switch/Switch.interface.d.ts +5 -1
  133. package/dist/types/components/Switch/stories/Switch.stories.d.ts +4 -1
  134. package/dist/types/components/Switch/stories/SwitchDefault.stories.d.ts +4 -1
  135. package/dist/types/components/Switch/stories/SwitchDemo.stories.d.ts +4 -1
  136. package/dist/types/components/Switch/stories/SwitchDisabled.stories.d.ts +4 -1
  137. package/dist/types/components/Switch/stories/SwitchError.stories.d.ts +4 -1
  138. package/dist/types/components/Switch/stories/SwitchRequire.stories.d.ts +4 -1
  139. package/dist/types/components/Switch/stories/SwitchSize.stories.d.ts +4 -1
  140. package/dist/types/components/Switch/stories/SwitchSuccess.stories.d.ts +4 -1
  141. package/dist/types/components/Switch/stories/SwitchTitleDescSwitch.stories.d.ts +4 -1
  142. package/dist/types/components/Switch/stories/SwitchTitleSwitch.stories.d.ts +4 -1
  143. package/dist/types/components/Text/Text.interface.d.ts +1 -0
  144. package/dist/types/components/Text/Text.js +2 -2
  145. package/dist/types/components/Textarea/Textarea.interface.d.ts +6 -4
  146. package/package.json +7 -4
  147. package/dist/Overlay_cjs_CTNhV_Ly.js +0 -1
  148. package/dist/Overlay_es_BlFqOTLN.js +0 -1
  149. package/dist/primitives_cjs_ggfFWBhs.js +0 -1
  150. package/dist/primitives_es_1Ei6qOpa.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useState } from 'react';
2
+ import { useCallback } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import { useAppearanceConfig, useDevicePropsGenerator, } from '@itcase/ui-core/hooks';
5
5
  import { Button } from 'src/components/Button';
@@ -12,31 +12,29 @@ const inputNumberConfig = {
12
12
  };
13
13
  const InputNumber = (props) => {
14
14
  const { id, appearance, className, dataTestId, dataTour, type = 'custom', name, min = 0, max = Infinity, step = 1, value = 0, onChange, } = props;
15
- const [number, setNumber] = useState(value);
16
15
  const onChangeValue = useCallback((params) => {
17
16
  const { event, mode = 'button', operation } = params;
18
- let value;
17
+ let newValue;
19
18
  if (mode === 'input') {
20
- value = Number(event?.target.value);
19
+ newValue = Number(event?.target.value);
21
20
  }
22
21
  else {
23
22
  const operationType = operation === 'minus' ? -step : step;
24
- value = number + operationType;
23
+ newValue = value + operationType;
25
24
  }
26
- if (value < min || value > max) {
25
+ if (newValue < min || newValue > max) {
27
26
  return null;
28
27
  }
29
- setNumber(value);
30
- onChange?.(value);
31
- }, [max, min, number, onChange, step]);
28
+ onChange?.(newValue);
29
+ }, [max, min, onChange, step, value]);
32
30
  const appearanceConfig = useAppearanceConfig(appearance, inputNumberConfig);
33
31
  const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
34
32
  const { fillClass, fillHoverClass, borderColorClass, borderColorHoverClass, borderWidthClass, iconFill, iconFillHover, iconFillIcon, iconMinus, iconPlus, iconShape, iconSize, inputNumberTextColorClass, inputNumberTextSizeClass, inputNumberTextWeightClass, shapeClass, sizeClass, widthClass, } = propsGenerator;
35
33
  if (type === 'native') {
36
- return (_jsx("input", { id: String(id), type: "number", min: min, max: max, step: step, value: number, onChange: (event) => onChangeValue({ event: event, mode: 'input' }) }));
34
+ return (_jsx("input", { id: String(id), type: "number", min: min, max: max, step: step, value: value, onChange: (event) => onChangeValue({ event: event, mode: 'input' }) }));
37
35
  }
38
36
  return (_jsxs("div", { id: String(id), className: clsx(className, 'input-number', 'input-number__custom', borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, shapeClass && `shape_${shapeClass}`, sizeClass && `input-number_size_${sizeClass}`, widthClass && `width_${widthClass}`), "data-tour": dataTour, "date-testid": dataTestId, children: [_jsx(Button, { className: "input-number__icon", icon: iconMinus, iconFill: iconFill, iconFillHover: iconFillHover, iconFillIcon: iconFillIcon, iconShape: iconShape, iconSize: iconSize, onClick: () => onChangeValue({ operation: 'minus' }) }), _jsx("input", { className: clsx(inputNumberTextColorClass &&
39
37
  `text-color_${inputNumberTextColorClass}`, inputNumberTextSizeClass && `text_size_${inputNumberTextSizeClass}`, inputNumberTextWeightClass &&
40
- `text-weight_${inputNumberTextWeightClass}`), type: "number", min: min, max: max, "data-testid": dataTestId || (name ? `${name}-input-number` : 'input-number'), step: step, value: number, onChange: (event) => onChangeValue({ event: event, mode: 'input' }) }), _jsx(Button, { className: "input-number__icon", icon: iconPlus, iconFill: iconFill, iconFillHover: iconFillHover, iconFillIcon: iconFillIcon, iconShape: iconShape, iconSize: iconSize, onClick: () => onChangeValue({ operation: 'plus' }) })] }));
38
+ `text-weight_${inputNumberTextWeightClass}`), type: "number", min: min, max: max, "data-testid": dataTestId || (name ? `${name}-input-number` : 'input-number'), step: step, value: value, onChange: (event) => onChangeValue({ event: event, mode: 'input' }) }), _jsx(Button, { className: "input-number__icon", icon: iconPlus, iconFill: iconFill, iconFillHover: iconFillHover, iconFillIcon: iconFillIcon, iconShape: iconShape, iconSize: iconSize, onClick: () => onChangeValue({ operation: 'plus' }) })] }));
41
39
  };
42
40
  export { InputNumber };
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable react-hooks/rules-of-hooks */
3
+ import { useState } from 'react';
2
4
  import { InputNumber } from '..';
3
5
  const meta = {
4
6
  title: 'Atoms / InputNumber',
@@ -21,6 +23,7 @@ const meta = {
21
23
  export default meta;
22
24
  export const Demo = {
23
25
  render: (args) => {
24
- return _jsx(InputNumber, { ...args });
26
+ const [number, setNumber] = useState(0);
27
+ return _jsx(InputNumber, { value: number, onChange: setNumber, ...args });
25
28
  },
26
29
  };
@@ -1,3 +1,4 @@
1
+ import type { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler } from 'react';
1
2
  import { AppearanceConfig, AppearanceKeysState, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderWidthProps, CompositeAppearanceStateDefault, FillHoverProps, FillProps, ItemFillProps, ShapeProps, SizeProps, WidthProps } from '@itcase/types-ui';
2
3
  import type { AppearancePartialRecord, AppearanceRecord } from '@itcase/types-ui';
3
4
  import { StyleAttributes } from '@itcase/ui-core/hooks';
@@ -30,15 +31,16 @@ type InputAppearanceProps = {
30
31
  type InputPasswordProps = InputAppearanceProps & StyleAttributes & {
31
32
  id?: string;
32
33
  appearance?: CompositeAppearanceStateDefault;
34
+ autoComplete?: string;
33
35
  className?: string;
34
36
  dataTestId?: string;
35
37
  dataTour?: string;
36
38
  isDisabled?: boolean;
37
39
  name?: string;
38
- onBlur?: () => void;
39
- onChange?: () => void;
40
- onFocus?: () => void;
41
- onKeyDown?: () => void;
40
+ onBlur?: FocusEventHandler<HTMLInputElement>;
41
+ onChange?: ChangeEventHandler<HTMLInputElement>;
42
+ onFocus?: FocusEventHandler<HTMLInputElement>;
43
+ onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
42
44
  placeholder?: string;
43
45
  value?: string;
44
46
  };
@@ -4,7 +4,7 @@ declare const overlayAppearance: {
4
4
  opacity: "50";
5
5
  };
6
6
  blur: {
7
- fill: "surfaceQuaternary";
7
+ fill: "graphiteGrey";
8
8
  blur: "10";
9
9
  };
10
10
  };
@@ -4,7 +4,7 @@ declare const overlayAppearanceDefault: {
4
4
  opacity: "50";
5
5
  };
6
6
  blur: {
7
- fill: "surfaceQuaternary";
7
+ fill: "graphiteGrey";
8
8
  blur: "10";
9
9
  };
10
10
  };
@@ -4,7 +4,7 @@ const overlayAppearanceDefault = {
4
4
  opacity: '50',
5
5
  },
6
6
  blur: {
7
- fill: 'surfaceQuaternary',
7
+ fill: 'graphiteGrey',
8
8
  blur: '10',
9
9
  },
10
10
  };
@@ -1,4 +1,4 @@
1
- import { ElementType } from 'react';
1
+ import { ChangeEventHandler, ElementType } from 'react';
2
2
  import { AppearanceConfig, AppearanceKeysState, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorActiveProps, BorderColorHoverProps, BorderColorProps, CompositeAppearanceStateDefault, FillActiveHoverProps, FillActiveProps, FillHoverProps, FillProps, ShapeProps, SizeProps } from '@itcase/types-ui';
3
3
  import type { AppearanceRecord } from '@itcase/types-ui';
4
4
  import { StyleAttributes } from '@itcase/ui-core/hooks';
@@ -38,7 +38,7 @@ type RadioProps = RadioAppearanceProps & StyleAttributes & {
38
38
  isDisabled?: boolean;
39
39
  isSkeleton?: boolean;
40
40
  label?: string;
41
- onChange?: () => void;
41
+ onChange?: ChangeEventHandler<HTMLInputElement>;
42
42
  tag?: ElementType;
43
43
  value?: string;
44
44
  };
@@ -28,7 +28,10 @@ declare const Switch: React.ForwardRefExoticComponent<import("@itcase/ui-core/ho
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
32
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & React.RefAttributes<HTMLInputElement>>;
34
37
  export { Switch, switchConfig };
@@ -1,3 +1,4 @@
1
+ import { ChangeEventHandler, FocusEventHandler } from 'react';
1
2
  import { AppearanceConfig, AppearanceKeysState, AppearanceSizeKey, AppearanceStyleKey, BorderColorProps, CompositeAppearanceStateDefault, FillActiveHoverProps, FillActiveProps, FillHoverProps, FillProps } from '@itcase/types-ui';
2
3
  import type { AppearancePartialRecord, AppearanceRecord } from '@itcase/types-ui';
3
4
  import { StyleAttributes } from '@itcase/ui-core/hooks';
@@ -30,8 +31,11 @@ type SwitchProps = StyleAttributes & SwitchAppearanceProps & {
30
31
  isActive?: boolean;
31
32
  isDisabled?: boolean;
32
33
  isSkeleton?: boolean;
33
- onChange?: () => void;
34
+ onBlur?: FocusEventHandler<HTMLInputElement>;
35
+ onChange?: ChangeEventHandler<HTMLInputElement>;
36
+ onFocus?: FocusEventHandler<HTMLInputElement>;
34
37
  title?: string;
38
+ type?: 'checkbox';
35
39
  };
36
40
  type SwitchConfig = AppearanceConfig<AppearanceKeysState, SwitchAppearanceProps>;
37
41
  type SwitchAppearance = SwitchConfig['appearance'];
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  isActive: true;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  appearance: "defaultPrimary sizeL";
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -28,8 +28,11 @@ declare const meta: {
28
28
  isActive?: boolean;
29
29
  isDisabled?: boolean;
30
30
  isSkeleton?: boolean;
31
- onChange?: () => void;
31
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
32
+ onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
33
+ onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
32
34
  title?: string;
35
+ type?: "checkbox";
33
36
  } & import("react").RefAttributes<HTMLInputElement>>;
34
37
  args: {
35
38
  title: string;
@@ -34,6 +34,7 @@ type TextProps = StyleAttributes & TextAppearanceProps & {
34
34
  onDoubleClick?: () => void;
35
35
  style?: CSSProperties;
36
36
  tag?: TextTagProps;
37
+ text?: string;
37
38
  };
38
39
  type TextConfig = AppearanceConfig<AppearanceSizeKey, TextAppearanceProps>;
39
40
  type TextAppearance = TextConfig['appearance'];
@@ -9,7 +9,7 @@ const textConfig = {
9
9
  },
10
10
  };
11
11
  function Text(props) {
12
- const { appearance, className, dataTestId, dataTour, cursor, style, tag: Tag = 'span', before, after, isActive, isDisabled, isSkeleton, onClick, onDoubleClick, children, } = props;
12
+ const { appearance, className, dataTestId, dataTour, text, cursor, style, tag: Tag = 'span', before, after, isActive, isDisabled, isSkeleton, onClick, onDoubleClick, children, } = props;
13
13
  const appearanceConfig = useAppearanceConfig(appearance, textConfig, isDisabled);
14
14
  const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
15
15
  const { textAlignClass, textColorActiveClass, textColorActiveHoverClass, textColorClass, textColorDisabledClass, textColorHoverClass, textFontClass, textStyleClass, textTruncateClass, textWeightClass, textWrapClass, cursorClass, sizeClass, widthClass, } = propsGenerator;
@@ -28,6 +28,6 @@ function Text(props) {
28
28
  `text-color_active_hover_${textColorActiveHoverClass}`, isActive &&
29
29
  !isDisabled &&
30
30
  textColorActiveClass &&
31
- `text-color_active_${textColorActiveClass}`, textFontClass && `text-font_${textFontClass}`, textStyleClass && `text-style_${textStyleClass}`, textWrapClass && `word-wrap_${textWrapClass}`, textTruncateClass && `text-truncate_${textTruncateClass}`, isSkeleton && 'skeleton', widthClass && `width_${widthClass}`, cursorClass && `cursor_${cursorClass}`, onClick && (cursor || 'cursor_type_pointer')), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, textStyles, style), onClick: onClick, onDoubleClick: onDoubleClick, children: [before, children, after] }));
31
+ `text-color_active_${textColorActiveClass}`, textFontClass && `text-font_${textFontClass}`, textStyleClass && `text-style_${textStyleClass}`, textWrapClass && `word-wrap_${textWrapClass}`, textTruncateClass && `text-truncate_${textTruncateClass}`, isSkeleton && 'skeleton', widthClass && `width_${widthClass}`, cursorClass && `cursor_${cursorClass}`, onClick && (cursor || 'cursor_type_pointer')), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, textStyles, style), onClick: onClick, onDoubleClick: onDoubleClick, children: [before, children || text, after] }));
32
32
  }
33
33
  export { Text, textConfig };
@@ -1,3 +1,4 @@
1
+ import type { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler } from 'react';
1
2
  import { AppearanceConfig, AppearanceKeysState, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderWidthProps, CompositeAppearanceStateDefault, FillHoverProps, FillProps, ShapeProps, SizeProps, WidthProps } from '@itcase/types-ui';
2
3
  import type { AppearancePartialRecord, AppearanceRecord } from '@itcase/types-ui';
3
4
  import { StyleAttributes } from '@itcase/ui-core/hooks';
@@ -23,6 +24,7 @@ type TextareaAppearanceProps = {
23
24
  type TextareaProps = StyleAttributes & TextareaAppearanceProps & {
24
25
  id?: string;
25
26
  appearance?: CompositeAppearanceStateDefault;
27
+ autoComplete?: string;
26
28
  className?: string;
27
29
  dataTestId?: string;
28
30
  dataTour?: string;
@@ -30,10 +32,10 @@ type TextareaProps = StyleAttributes & TextareaAppearanceProps & {
30
32
  isDisabled?: boolean;
31
33
  isSkeleton?: boolean;
32
34
  name?: string;
33
- onBlur?: () => void;
34
- onChange?: () => void;
35
- onFocus?: () => void;
36
- onKeyDown?: () => void;
35
+ onBlur?: FocusEventHandler<HTMLTextAreaElement>;
36
+ onChange?: ChangeEventHandler<HTMLTextAreaElement>;
37
+ onFocus?: FocusEventHandler<HTMLTextAreaElement>;
38
+ onKeyDown?: KeyboardEventHandler<HTMLTextAreaElement>;
37
39
  placeholder?: string;
38
40
  value?: string;
39
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui-web",
3
- "version": "1.9.91",
3
+ "version": "1.9.93",
4
4
  "description": "UI components",
5
5
  "keywords": "",
6
6
  "license": "MIT",
@@ -11,7 +11,10 @@
11
11
  "import": "./dist/components/*.js",
12
12
  "require": "./dist/cjs/components/*.js"
13
13
  },
14
- "./stories/*": "./dist/stories/*.js"
14
+ "./stories/*": "./dist/stories/*.js",
15
+ "./dist/css/styles/*": "./dist/css/styles/*",
16
+ "./dist/css/mixins/*": "./dist/css/mixins/*",
17
+ "./dist/css/mediaqueries/*": "./dist/css/mediaqueries/*"
15
18
  },
16
19
  "types": "./dist/types/types/index.d.ts",
17
20
  "scripts": {
@@ -84,7 +87,7 @@
84
87
  "@babel/preset-react": "^7.28.5",
85
88
  "@itcase/storybook-config": "^1.2.51",
86
89
  "@itcase/types-core": "^1.1.64",
87
- "@itcase/types-ui": "^1.1.67",
90
+ "@itcase/types-ui": "^1.1.68",
88
91
  "@rollup/plugin-alias": "^6.0.0",
89
92
  "@rollup/plugin-babel": "^7.0.0",
90
93
  "@rollup/plugin-commonjs": "^29.0.2",
@@ -111,5 +114,5 @@
111
114
  "storybook": "^10.3.5",
112
115
  "typescript": "^6.0.3"
113
116
  },
114
- "gitHead": "749ead6b41f7c13cdac85ee96dfe6db66a8f1263"
117
+ "gitHead": "846937e2010133a3a4666b864b5e5b59a2b04a24"
115
118
  }
@@ -1 +0,0 @@
1
- "use strict";var e=require("react/jsx-runtime"),a=require("clsx"),r=require("@itcase/ui-core/hooks");const s={blackout:{fill:"black",opacity:"50"},blur:{fill:"surfaceQuaternary",blur:"10"}},l={appearance:s,setAppearance:e=>{l.appearance=e}};exports.Overlay=function(s){const{appearance:t,className:c,dataTestId:i,dataTour:o,isOverlay:u,onClick:n}=s,p=r.useAppearanceConfig(t,l),y=r.useDevicePropsGenerator(s,p),{fillClass:v,blurClass:d,opacityClass:f}=y,{styles:b}=r.useStyles(s);return e.jsx("div",{className:a(c,"overlay",f&&`opacity_${f}`,d&&`blur_${d}`,u&&"overlay_state_visible",v&&`fill_${v}`),"data-testid":i,"data-tour":o,style:b,onClick:n,children:" "})},exports.overlayAppearance=s,exports.overlayConfig=l;
@@ -1 +0,0 @@
1
- import{jsx as a}from"react/jsx-runtime";import e from"clsx";import{useAppearanceConfig as l,useDevicePropsGenerator as r,useStyles as s}from"@itcase/ui-core/hooks";const t={blackout:{fill:"black",opacity:"50"},blur:{fill:"surfaceQuaternary",blur:"10"}},o={appearance:t,setAppearance:a=>{o.appearance=a}};function c(t){const{appearance:c,className:i,dataTestId:p,dataTour:n,isOverlay:u,onClick:f}=t,m=l(c,o),y=r(t,m),{fillClass:d,blurClass:b,opacityClass:k}=y,{styles:v}=s(t);return a("div",{className:e(i,"overlay",k&&`opacity_${k}`,b&&`blur_${b}`,u&&"overlay_state_visible",d&&`fill_${d}`),"data-testid":p,"data-tour":n,style:v,onClick:f,children:" "})}export{c as O,o as a,t as o};
@@ -1 +0,0 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@rc-component/tooltip"),i=require("react"),a=require("clsx"),o=require("@itcase/ui-core/hooks"),l=require("react-inlinesvg"),t=require("@itcase/ui-core/hoc"),s=require("@itcase/ui-core/utils");const n={sizeXXL:{size:"xxl"},sizeXL:{size:"xl"},sizeL:{size:"l"},sizeM:{size:"m"},sizeS:{size:"s"},sizeXS:{size:"xs"},sizeXXS:{size:"xxs"}},c={appearance:n,setAppearance:e=>{c.appearance=e}};function d(r){const{appearance:i,className:l,dataTestId:t,dataTour:s,cursor:n,style:d,tag:f="span",before:y,after:p,isActive:x,isDisabled:m,isSkeleton:u,onClick:S,onDoubleClick:z,children:g}=r,C=o.useAppearanceConfig(i,c,m),_=o.useDevicePropsGenerator(r,C),{textAlignClass:b,textColorActiveClass:v,textColorActiveHoverClass:P,textColorClass:T,textColorDisabledClass:h,textColorHoverClass:A,textFontClass:H,textStyleClass:w,textTruncateClass:B,textWeightClass:$,textWrapClass:F,cursorClass:I,sizeClass:X,widthClass:k}=_,{styles:j}=o.useStyles(r);return e.jsxs(f,{className:a(l,"text",X&&`text_size_${X}`,$&&`text-weight_${$}`,b&&`text-align_${b}`,m&&h&&`text-color_${h}`,!x&&!m&&T&&`text-color_${T}`,!x&&!m&&A&&`text-color_hover_${A}`,x&&!m&&P&&`text-color_active_hover_${P}`,x&&!m&&v&&`text-color_active_${v}`,H&&`text-font_${H}`,w&&`text-style_${w}`,F&&`word-wrap_${F}`,B&&`text-truncate_${B}`,u&&"skeleton",k&&`width_${k}`,I&&`cursor_${I}`,S&&(n||"cursor_type_pointer")),"data-testid":t,"data-tour":s,style:Object.assign({},j,d),onClick:S,onDoubleClick:z,children:[y,g,p]})}const f={sizeXXL:{size:"xxl",textSize:"xl",iconSize:"24"},sizeXL:{size:"xl",textSize:"l",iconSize:"24"},sizeL:{size:"l",textSize:"l",iconSize:"24"},sizeM:{size:"m",textSize:"m",iconSize:"24"},sizeS:{size:"s",textSize:"s",iconSize:"24"},sizeXS:{size:"xs",textSize:"xxs",iconSize:"24"},sizeXXS:{size:"xxs",textSize:"xxs",iconSize:"24"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentQuaternary:{fill:"accentQuaternary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentSecondary",borderColor:"accentBorderQuaternary",textColor:"accentTextQuaternary",dotFill:"accentItemQuaternary",iconFill:"accentItemQuaternary"},accentTertiary:{fill:"accentTertiary",borderColor:"accentBorderSecondary",textColor:"accentTextSecondary",dotFill:"accentItemSecondary",iconFill:"accentItemSecondary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"dangerBorderPrimary",textColor:"dangerTextPrimary",dotFill:"dangerItemPrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderSecondary",textColor:"infoTextPrimary",dotFill:"infoItemPrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"infoSecondary",borderColor:"infoBorderSecondary",textColor:"infoTextSecondary",dotFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"specialBorderSecondary",textColor:"specialTextPrimary",dotFill:"specialItemPrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",borderColor:"extraBorderSecondary",textColor:"extraTextPrimary",dotFill:"extraItemPrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",dotFill:"successItemPrimary",iconFill:"successItemPrimary"},disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",iconFill:"surfaceItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary",dotFill:"surfaceItemPrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"accentPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderSecondary",textColor:"surfaceTextPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary",dotFill:"warningItemPrimary",iconFill:"warningItemPrimary"}},y={appearance:f,setAppearance:e=>{y.appearance=e}};function p(r){const{appearance:i,className:l,dataTestId:t,dataTour:s,dot:n,icon:c,iconSrc:f,value:p,isSkeleton:x,children:m}=r,u=o.useAppearanceConfig(i,y),S=o.useDevicePropsGenerator(r,u),{fillClass:z,fillHoverClass:g,borderColorClass:C,borderColorHoverClass:_,borderTypeClass:b,borderWidthClass:v,textColor:P,textSize:h,dotFillClass:A,iconFill:H,iconShape:w,iconSize:B,shapeClass:$,sizeClass:F}=S,{styles:I}=o.useStyles(r),X=p?c?n?"badge_type_dot-icon-counter":"badge_type_icon-counter":"badge_type_counter":c?"badge_type_icon":n?"badge_type_dot":"badge_type_fill";return e.jsxs("div",{className:a(l,"badge",C&&`border-color_${C}`,_&&`border-color_hover_${_}`,v&&`border-width_${v}`,b&&`border_type_${b}`,z&&`fill_${z}`,g&&`fill_hover_${g}`,F&&`badge_size_${F}`,$&&`shape_${$}`,X,x&&"skeleton"),"data-testid":t,"data-tour":s,style:I,children:[n&&e.jsx("div",{className:a("badge__dot",A&&`svg_fill_${A}`),children:e.jsx("svg",{width:"6",height:"6",viewBox:"0 0 6 6",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("rect",{width:"6",height:"6",rx:"50"})})}),c&&e.jsx(T,{className:"badge__icon",size:B,iconFill:H,imageSrc:f,shape:w,SvgImage:c}),m||p&&e.jsx(d,{className:"badge__value",size:h,textColor:P,children:p})]})}const x={sizeXXL:{size:"xxl",labelTextSize:"xxl",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},sizeXL:{size:"xl",labelTextSize:"l",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},sizeL:{size:"l",labelTextSize:"l",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},sizeM:{size:"m",labelTextSize:"m",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},sizeS:{size:"s",labelTextSize:"s",iconAfterFillSize:"20",iconAfterSize:"20",iconBeforeFillSize:"20",iconBeforeSize:"20"},sizeXS:{size:"xs",labelTextSize:"xs",iconAfterFillSize:"16",iconAfterSize:"16",iconBeforeFillSize:"16",iconBeforeSize:"16"},sizeXXS:{size:"xxs",labelTextSize:"xs",iconAfterFillSize:"14",iconAfterSize:"14",iconBeforeFillSize:"14",iconBeforeSize:"14"},disabledPrimary:{fill:"surfaceDisabled",borderColor:"errorBorderQuaternary",textColor:"surfaceTextQuaternary"},disabledSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderColorHover:"surfaceBorderQuaternary"},requirePrimary:{fill:"warningTertiary",borderColor:"warningBorderQuaternary",textColor:"surfaceTextPrimary"},requireSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{borderColor:"none"},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextSecondary",labelTextColorHover:"accentTextSecondary",borderColor:"accentBorderPrimary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextPrimary",labelTextColorHover:"errorTextPrimary"},infoPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextPrimary",labelTextColorHover:"accentTextPrimary",borderColor:"accentBorderPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextSecondary",labelTextColorHover:"accentTextPrimary",borderColor:"accentBorderPrimary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",labelTextColor:"successTextSecondary",labelTextColorHover:"successTextSecondary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary",labelTextColor:"surfaceTextPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary",labelTextColor:"surfaceTextPrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary",labelTextColor:"surfaceTextPrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary",labelTextColor:"surfaceTextPrimary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextSecondary"}},m={appearance:x,LinkComponent:"a",setAppearance:e=>{m.appearance=e},setLinkComponent:e=>{m.LinkComponent=e}};function u(r){const{href:a,LinkComponent:o,rel:l,target:t,children:s,...n}=r;if(a){const r=o||m.LinkComponent;if(r)return e.jsx(r,{href:a,rel:l,target:t,...n,children:s})}else if(o)return e.jsx(o,{...n,children:s});return i.Children.toArray(s).filter(Boolean).map(e=>i.isValidElement(e)?i.cloneElement(e,n):e)}const S={h1:{size:"h1",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h2:{size:"h2",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h3:{size:"h3",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h4:{size:"h4",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h5:{size:"h5",iconAfterFillSize:"20",iconAfterSize:"20",iconBeforeFillSize:"20",iconBeforeSize:"20"},h6:{size:"h6",iconAfterFillSize:"16",iconAfterSize:"16",iconBeforeFillSize:"16",iconBeforeSize:"16"},disabledPrimary:{fill:"surfacePrimary",borderColor:"errorBorderQuaternary",borderHover:"errorBorderHoverQuaternary",textColor:"surfaceTextQuaternary",iconBeforeFill:"errorQuaternary"},disabledSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderHoverQuaternary",iconBeforeFill:"surfaceQuaternary"},solid:{},outlined:{fill:"none"},full:{},ghost:{fill:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",textColorHover:"errorTextPrimary"},infoPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",textColor:"extraTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",textColor:"warningTextSecondary",textColorHover:"warningTextSecondary"},requirePrimary:{fill:"warningTertiary",borderColor:"warningBorderQuaternary",borderHover:"warningBorderQuaternary",textColor:"surfaceTextPrimary",iconBeforeFill:"warningQuaternary"},requireSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderQuaternary",iconBeforeFill:"surfaceQuaternary"}},z={appearance:S,setAppearance:e=>{z.appearance=e}};function g(r){const{appearance:l,className:t,dataTestId:s,dataTour:n,text:c,afterWrapper:d,beforeWrapper:f,style:y,tag:p="span",before:x,after:m,isActive:u,isDisabled:S,isSkeleton:g,onClick:C,children:_}=r,b=o.useAppearanceConfig(l,z,S),v=o.useDevicePropsGenerator(r,b),{directionClass:P,size:h,fillClass:A,fillHoverClass:H,textAlignClass:w,textColorActiveClass:B,textColorActiveHoverClass:$,textColorClass:F,textColorDisabledClass:I,textColorHoverClass:X,textFontClass:k,textStyleClass:j,textTruncateClass:D,textWeightClass:N,textWrap:Q,heightClass:L,iconAfter:M,iconAfterFill:W,iconAfterFillIcon:E,iconAfterFillSize:V,iconAfterShape:q,iconAfterSize:G,iconAfterSrc:O,iconBadgeAppearance:R,iconBadgeShape:U,iconBadgeSize:K,iconBadgeTextColor:J,iconBadgeTextSize:Y,iconBadgeValue:Z,iconBefore:ee,iconBeforeFill:re,iconBeforeFillIcon:ie,iconBeforeFillSize:ae,iconBeforeShape:oe,iconBeforeSize:le,iconBeforeSrc:te,svgFillClass:se,svgFillHoverClass:ne,widthClass:ce,wrapperDirectionClass:de,onClickIconAfter:fe,onClickIconBefore:ye}=v,{styles:pe,wrapper:xe}=o.useStyles(r),me=i.useMemo(()=>p||(h||"span"),[p,h]);return e.jsxs(me,{className:a(t,"title",A&&`fill_${A}`,H&&`fill_hover_${H}`,se&&`svg_fill_${se}`,ne&&`svg_fill_hover_${ne}`,ce&&`width_${ce}`,L&&`height_${L}`,h&&`title_size_${h}`,P&&`title_direction_${P}`,S&&I&&`text-color_${I}`,!u&&!S&&F&&`text text-color_${F}`,u&&!S&&B&&`text-color_active_${B}`,!u&&!S&&X&&`text-color_hover_${X}`,u&&!S&&$&&`text-color_active_hover${$}`,k&&`text-font_${k}`,j&&`text-style_${j}`,N&&`text-weight_${N}`,Q&&`word-wrap_${Q}`,Z&&"title_badge",g&&"skeleton"),"data-testid":s,"data-tour":n,style:Object.assign({},pe,y),onClick:C,children:[x,e.jsxs("span",{className:a(w&&`text-align_${w}`,de&&`title_direction_${de}`,"title__wrapper",D&&`text-truncate_${D}`),style:xe,children:[(ee||te)&&e.jsx(T,{className:a("title__icon_before",Z&&"title__icon_before-badge"),fill:re,fillSize:ae,badgeAppearance:R,badgeClass:"title__icon_before_badge",badgeShape:U,badgeSize:K,badgeTextColor:J,badgeTextSize:Y,badgeValue:Z,iconFill:ie,iconSize:le,imageSrc:te,shape:oe,SvgImage:ee,onClick:ye}),f,_||c,d,(M||O)&&e.jsx(T,{className:a("title__icon_after",Z&&"title__icon_after-badge"),fill:W,fillSize:V,badgeAppearance:R,badgeClass:"title__icon_after_badge",badgeShape:U,badgeSize:K,badgeTextColor:J,badgeTextSize:Y,badgeValue:Z,iconFill:E,iconSize:G,imageSrc:O,shape:q,SvgImage:M,onClick:fe})]}),m]})}const C={defaultPrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary",titleColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},sizeL:{size:"l",titleSize:"h5",textSize:"s"},sizeM:{size:"m",titleSize:"h5",textSize:"s"},sizeS:{size:"s",titleSize:"h5",textSize:"s"},disabledPrimary:{fill:"disabledPrimary",fillHover:"disabledHoverPrimary",titleColor:"surfaceTextPrimary",textColor:"surfaceTextPrimary"},requirePrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",titleColor:"warningTextPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",titleColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",titleColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary"}},_={appearance:C,setAppearance:e=>{_.appearance=e}},b=i.forwardRef(function(r,l){const{appearance:t,className:s,dataTestId:n,dataTour:c,initialIsVisible:f,title:y,text:p,before:x,after:m,openTimeoutDelay:u=500,closeTimeoutDelay:S=250,isSkeleton:z,children:C}=r,b=i.useRef(null),v=i.useRef(null),P=i.useRef(null),T=i.useRef(!1),[h,A]=i.useState(f),H=i.useCallback(()=>{T.current||(v.current&&clearTimeout(v.current),P.current=setTimeout(()=>{A(!0)},u))},[u]),w=i.useCallback(()=>{P.current&&clearTimeout(P.current),v.current=setTimeout(()=>{A(e=>(!0===e&&(T.current=!0),!1))},S)},[S]),B=i.useCallback(()=>{T.current=!1},[]);i.useImperativeHandle(l,()=>({get tooltipElement(){return b.current},openTooltip:H,closeTooltip:w,isTooltipVisible:h}),[h,H,w]);const $=o.useAppearanceConfig(t,_),F=o.useDevicePropsGenerator(r,$),{alignClass:I,alignDirectionClass:X,alignmentClass:k,alignPosition:j,fillClass:D,titleColor:N,titleSize:Q,titleWeight:L,borderColorClass:M,borderTypeClass:W,borderWidthClass:E,textColor:V,textSize:q,textWeight:G,arrowPosition:O,elevationClass:R,shapeClass:U,sizeClass:K,widthClass:J}=F,{styles:Y}=o.useStyles(r);return e.jsxs("div",{className:a(s,"tooltip",j&&`tooltip_align-position_${j}`,X&&`align_${X}`,I&&`align_${I}`,R&&`elevation_${R}`,k&&`alignment_${k}`,K&&`tooltip_size_${K}`,z&&"skeleton",J&&`width_${J}`),ref:b,"data-testid":n,"data-tour":c,style:Y,onAnimationEnd:B,children:[O&&e.jsx("div",{className:a("tooltip__arrow",O&&`tooltip__arrow_position_${O}`,D&&`fill_${D}`),children:" "}),x,e.jsxs("div",{className:a("tooltip__inner",E&&`border-width_${E}`,M&&`border-color_${M}`,W&&`border_type_${W}`,D&&`fill_${D}`,U&&`shape_${U}`),children:[y&&e.jsx(g,{className:"tooltip__title text",size:Q,textColor:N,textWeight:L,children:y}),p&&e.jsx(d,{className:"tooltip__text",size:q,textColor:V,textWeight:G,children:p}),C]}),m]})}),v={disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemQuaternary"},size12_12:{fillSize:"12",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_12:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_14:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_12:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size16_14:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_16:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_12:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size20_14:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size20_16:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_20:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_12:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size24_14:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size24_16:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size24_20:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_24:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_12:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size32_14:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size32_16:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size32_20:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size32_24:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_32:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_12:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size40_14:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size40_16:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size40_20:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size40_24:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size40_32:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_40:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"40"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"accentItemPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",borderColor:"dangerBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",borderColor:"errorBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",borderColor:"specialBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",borderColor:"extraBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",borderColor:"successBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"successItemPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverSecondary",borderColor:"surfaceBorderTertiary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary solid rounded",iconFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",borderColor:"warningBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"warningItemPrimary"}},P={appearance:v,setAppearance:e=>{P.appearance=e}},T=t.urlWithAssetPrefix(i.forwardRef(function(r,t){const{id:n,appearance:c,className:d,dataTestId:f,dataTour:y,width:x,height:m,badgeClass:S,href:z,imageSrc:g,link:C,linkRel:_,linkTarget:v,notification:T,saveFillStroke:A,showTooltip:H,SvgImage:w,svgImageStyles:B,before:$,after:F,isActive:I,isDisabled:X,isSkeleton:k,onClick:j,onMouseEnter:D,onMouseLeave:N}=r,Q=i.useMemo(()=>{if(w){const r=w,i={};return x&&(i.width=x),m&&(i.height=m),e.jsx(r,{...i,...B})}return g?g.endsWith(".svg")?A?e.jsx(l,{src:g}):e.jsx(l,{src:g,preProcessor:h}):e.jsx("img",{src:g}):null},[w,g,x,m,B,A]),L=o.useAppearanceConfig(c,P,X),M=o.useDevicePropsGenerator(r,L),{alignmentClass:W,fillActiveClass:E,fillActiveHoverClass:V,fillClass:q,fillDisabledClass:G,fillHoverClass:O,fillSizeClass:R,borderColorClass:U,borderColorHoverClass:K,borderTypeClass:J,borderWidthClass:Y,badgeAppearance:Z,badgeAppearanceSize:ee,badgeShape:re,badgeSize:ie,badgeTextColor:ae,badgeTextSize:oe,badgeValue:le,centeringClass:te,iconFillActiveClass:se,iconFillActiveHoverClass:ne,iconFillClass:ce,iconFillDisabledClass:de,iconFillHoverClass:fe,iconSizeClass:ye,shapeClass:pe,tooltipAppearance:xe,tooltipText:me,tooltipTextSize:ue,tooltipTitle:Se,tooltipTitleSize:ze}=M,{styles:ge}=o.useStyles(r);return e.jsxs("div",{id:n,className:a(d,"icon",I?E&&`fill_active_${E}`:q&&`fill_${q}`,I?V&&`fill_active_hover_${V}`:O&&`fill_hover_${O}`,R&&`icon_fill_size_${R}`,G&&`fill_disabled_${G}`,I?se&&`icon_fill_active_${se}`:ce&&`icon_fill_${ce}`,I?ne&&`icon_fill_active_hover_${ne}`:fe&&`icon_fill_hover_${fe}`,X&&de&&`icon_fill_disabled_${de}`,pe&&`shape_${pe}`,U&&`border-color_${U}`,K&&`border-color_hover_${K}`,Y&&`border-width_${Y}`,J&&`border_type_${J}`,le&&"icon_with-badge",te&&`centering_${te}`,j&&"cursor_type_pointer",k&&"skeleton"),ref:t,"data-testid":f,"data-tour":y,style:ge,onClick:j,onMouseEnter:D,onMouseLeave:N,children:[$,e.jsxs(u,{className:a((C||z||j)&&"cursor_type_pointer",C||z?"icon__link":"icon__item",ye&&`icon_size_${ye}`),href:C||z,LinkComponent:"div",rel:_,target:v,children:[Q,(le||T)&&e.jsx(p,{appearance:s.mergeAppearanceKeys(Z,ee),className:a(S,"icon__badge"),size:ie,textColor:ae,textSize:oe,shape:re,value:le}),H&&e.jsx(b,{appearance:xe,className:a(d,"icon__tooltip",W&&`alignment_${W}`),title:Se,titleSize:ze,text:me,textSize:ue})]}),F]})})),h=e=>e.replace(/fill=".*?"/g,'fill=""').replace(/stroke=".*?"/g,'stroke=""'),A={sizeL:{size:"l"},sizeM:{size:"m"},sizeS:{size:"s"},accentPrimary:{fill:"accentPrimary"},errorPrimary:{fill:"errorPrimary"},specialPrimary:{fill:"specialPrimary"},extraPrimary:{fill:"extraPrimary"},successPrimary:{fill:"successPrimary"},surfacePrimary:{fill:"surfacePrimary"},surfaceQuaternary:{fill:"surfaceQuaternary"},surfaceSecondary:{fill:"surfaceSecondary"},surfaceTertiary:{fill:"surfaceTertiary"},warningPrimary:{fill:"warningPrimary"}},H={appearance:A,setAppearance:e=>{H.appearance=e}};function w(r){const{appearance:i,className:l,dataTestId:t,dataTour:s,print:n,isActive:c,isDisabled:d,isSkeleton:f}=r,y=o.useAppearanceConfig(i,H),p=o.useDevicePropsGenerator(r,y),{directionClass:x,fillActiveClass:m,fillActiveHoverClass:u,fillClass:S,fillDisabledClass:z,fillHoverClass:g,shapeClass:C,sizeClass:_,widthClass:b}=p,{styles:v}=o.useStyles(r);return e.jsx("hr",{className:a(l,"divider",b&&`width_${b}`,x&&`divider_direction_${x}`,C&&`shape_${C}`,_&&`divider_size_${_}`,c?m&&`fill_active_${m}`:S&&`fill_${S}`,c?u&&`fill_active_hover_${u}`:g&&`fill_hover_${g}`,d&&z&&`fill_disabled_${z}`,f&&"skeleton",!n&&"no-print",n&&"print"),"data-testid":t,"data-tour":s,style:v})}const B={accentPrimary:{fill:"accentPrimary",fillActive:"accentActivePrimary",fillActiveHover:"accentActiveHoverPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextPrimary",labelTextColorActive:"accentTextPrimary",labelTextColorActiveHover:"accentTextPrimary",labelTextColorHover:"accentTextPrimary",badgeAppearance:"surfacePrimary",dividerFill:"surfaceTertiary",emptyMessageTextColor:"accentTextPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextSecondary",labelTextColorHover:"accentTextSecondary"}},$={circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"}},F={sizeL:{size:"l",labelTextSize:"m",badgeSize:"xs",badgeTextSize:"xs",dividerSize:"s",emptyMessageTextSize:"m",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},sizeS:{size:"s",labelTextSize:"s",badgeSize:"xs",badgeTextSize:"xs",dividerSize:"s",emptyMessageTextSize:"m",iconAfterFillSize:"16",iconAfterSize:"16",iconBeforeFillSize:"16",iconBeforeSize:"16"},sizeXS:{size:"xs",labelTextSize:"xs",badgeSize:"xs",badgeTextSize:"xs",dividerSize:"s",emptyMessageTextSize:"xs",iconAfterFillSize:"12",iconAfterSize:"12",iconBeforeFillSize:"12",iconBeforeSize:"12"}},I={solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},X={surfacePrimary:{fill:"surfacePrimary",fillActive:"surfaceActivePrimary",fillHover:"surfaceHoverPrimary",labelTextColor:"surfaceTextPrimary",labelTextColorActive:"surfaceTextPrimary",labelTextColorActiveHover:"surfaceTextPrimary",labelTextColorHover:"surfaceTextPrimary",badgeAppearance:"accentPrimary",dividerFill:"surfaceTertiary",emptyMessageTextColor:"surfaceTextPrimary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary",labelTextColor:"surfaceTextPrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary",labelTextColor:"surfaceTextPrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary",labelTextColor:"surfaceTextPrimary"}},k={appearance:{...X,...I,...$,...B,...F},setAppearance:e=>{k.appearance=e}};const j={...X,...I,...$,...B,...F},D={appearance:j,setAppearance:e=>{D.appearance=e}};function N(r){const{appearance:l,className:t,dataTestId:s,dataTour:n,label:c,desc:f,badgeValue:y,emptyMessage:x,showDivider:m,before:u,after:S,isActive:z,isDisabled:g,isSkeleton:C,isHover:_,onClick:b,onMouseEnter:v,children:P}=r,h=o.useAppearanceConfig(l,D),A=o.useDevicePropsGenerator(r,h),{directionClass:H,justifyContentClass:B,fillActiveClass:$,fillActiveHoverClass:F,fillClass:I,fillDisabledClass:X,fillHoverClass:k,labelTextAlign:j,labelTextColor:N,labelTextColorActive:Q,labelTextColorActiveHover:L,labelTextColorHover:M,labelTextSize:W,labelTextStyle:E,labelTextWeight:V,labelTextWrap:q,descTextColor:G,descTextColorHover:O,descTextGradient:R,descTextSize:U,descTextStyle:K,descTextWeight:J,descTextWrap:Y,badgeAppearance:Z,badgeShape:ee,badgeSize:re,badgeTextColor:ie,badgeTextSize:ae,dividerDirection:oe,dividerFill:le,dividerSize:te,emptyMessageTextColor:se,emptyMessageTextColorHover:ne,emptyMessageTextSize:ce,emptyMessageTextStyle:de,emptyMessageTextWeight:fe,emptyMessageTextWrap:ye,iconAfter:pe,iconAfterFill:xe,iconAfterFillIcon:me,iconAfterFillSize:ue,iconAfterShape:Se,iconAfterSize:ze,iconAfterSrc:ge,iconBadgeAppearance:Ce,iconBadgeShape:_e,iconBadgeSize:be,iconBadgeTextColor:ve,iconBadgeTextSize:Pe,iconBadgeValue:Te,iconBefore:he,iconBeforeFill:Ae,iconBeforeFillIcon:He,iconBeforeFillSize:we,iconBeforeShape:Be,iconBeforeSize:$e,iconBeforeSrc:Fe,shapeClass:Ie,sizeClass:Xe,widthClass:ke}=A,{styles:je}=o.useStyles(r);return e.jsxs("div",{className:a("dropdown__item",z&&"dropdown__item_state_active",_&&"dropdown__item_state_hover",H&&`dropdown__item_direction_${H}`,t,z?$&&`fill_active_${$}`:I&&`fill_${I}`,z?F&&`fill_active_hover_${F}`:k&&`fill_hover_${k}`,X&&`fill_disabled_${X}`,Xe&&`dropdown__item_size_${Xe}`,Ie&&`shape_${Ie}`,ke&&`dropdown__item_width_${ke}`,g&&"dropdown__item_state_disabled",b&&"cursor_type_pointer",C&&"skeleton",B&&`dropdown__item_justify-content_${B}`),"data-testid":s,"data-tour":n,style:je,onClick:b,onMouseEnter:v,children:[e.jsx("div",{className:"dropdown__item-wrapper",children:e.jsxs(i.Fragment,{children:[u,(he||Fe)&&e.jsx(T,{className:a("dropdown__item_before",Te&&"dropdown__item_before-badge"),fill:Ae,fillSize:we,badgeAppearance:Ce,badgeClass:"dropdown__item_before_badge",badgeShape:_e,badgeSize:be,badgeTextColor:ve,badgeTextSize:Pe,badgeValue:Te,iconFill:He,iconSize:$e,imageSrc:Fe,shape:Be,SvgImage:he}),P||e.jsxs(i.Fragment,{children:[c&&e.jsx(d,{className:"dropdown__item-label",size:W,textAlign:j,textColor:N,textColorActive:Q,textColorActiveHover:L,textColorHover:M,textStyle:E,textWeight:V,textWrap:q,isActive:z,children:c}),y&&e.jsx(p,{appearance:Z,size:re,textColor:ie,textSize:ae,shape:ee,value:y}),f&&e.jsx(d,{className:"dropdown__item-desc",size:U,textColor:G,textColorGradient:R,textColorHover:O,textStyle:K,textWeight:J,textWrap:Y,isActive:z,children:f}),x&&e.jsx(d,{className:"dropdown__item",size:ce,textColor:se,textColorHover:ne,textStyle:de,textWeight:fe,textWrap:ye,isActive:z,children:x})]}),S,(pe||ge)&&e.jsx(T,{className:a("dropdown__item_after",Te&&"dropdown__item_after-badge"),fill:xe,fillSize:ue,badgeAppearance:Ce,badgeClass:"dropdown__item_after_badge",badgeShape:_e,badgeSize:be,badgeTextColor:ve,badgeTextSize:Pe,badgeValue:Te,iconFill:me,iconSize:ze,imageSrc:ge,shape:Se,SvgImage:pe})]})}),m&&e.jsx(w,{width:"fill",direction:oe,size:te,fill:le})]})}exports.Badge=p,exports.Divider=w,exports.Dropdown=function(r){const{appearance:l,className:t,dataTestId:s,dataTour:n,animationClose:c="dropdown_animation_close",animationOpen:d="dropdown_animation_open",dropdownList:f,showDivider:y,before:p,after:x,isSkeleton:m,isOpen:u,setIsOpen:S,onClickItem:z,children:g}=r,C=i.useRef(null),_=o.useAppearanceConfig(l,k),[b,v]=i.useState({className:""}),P=i.useCallback(()=>{v(e=>({className:u?e.className:""}))},[u]);i.useEffect(()=>{d&&c&&v(()=>({className:u?d:c}))},[u,d,c]),i.useEffect(()=>{function e(e){const r=C.current;if(r&&d){const i=r.contains(e.target),a=r.classList.contains(d);!i&&a&&S(!1)}}return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}},[d,S]);const T=o.useDevicePropsGenerator(r,_),{alignmentClass:h,fillClass:A,elevationClass:H,shapeClass:w}=T,{styles:B}=o.useStyles(r);return e.jsxs("div",{className:a(t,"dropdown",h&&`alignment_${h}`,A&&`fill_${A}`,w&&`shape_${w}`,H&&`elevation_${H}`,u?"dropdown_state_open":"dropdown_state_close",b.className),ref:C,"data-testid":s,"data-tour":n,style:B,children:[p,(g||f)&&e.jsxs("div",{className:a("dropdown__wrapper"),onAnimationEnd:P,children:[f?.map(r=>e.jsx(N,{appearance:l,label:r.label,badgeValue:r.badgeValue,emptyMessage:r.emptyMessage,iconAfter:r.iconAfter,iconBefore:r.iconBefore,iconSrc:r.icon,showDivider:y,isActive:r.isActive,isSkeleton:m,onClick:r.onClick||(e=>z?.(r,e))},r.key)),g]}),x]})},exports.DropdownItem=N,exports.Icon=T,exports.Link=function(r){const{appearance:i,className:l,dataTestId:t,dataTour:s,text:n,href:c,link:d,LinkComponent:f,rel:y,style:p,target:x,before:S,after:z,isDisabled:g,onClick:C,onMouseDown:_,onPointerCancel:b,onPointerDown:v,onPointerLeave:P,onPointerUp:T,children:h}=r,A=o.useAppearanceConfig(i,m,g),H=o.useDevicePropsGenerator(r,A),{directionClass:w,fillClass:B,fillHoverClass:$,borderColorClass:F,borderColorHoverClass:I,borderTypeClass:X,borderWidthClass:k,textColorClass:j,textColorHoverClass:D,textGradientClass:N,textStyleClass:Q,textWeightClass:L,heightClass:M,shapeClass:W,sizeClass:E,svgFillClass:V,svgFillHoverClass:q,underline:G="underline",widthClass:O}=H,{styles:R}=o.useStyles(r);return e.jsxs(u,{className:a(l,"link",O&&`width_${O}`,M&&`height_${M}`,w&&`link_direction_${w}`,E&&`text_size_${E}`,V&&`svg_fill_${V}`,q&&`svg_fill_hover_${q}`,G&&`link_underline_${G}`,"text",(j||D||N||Q||L)&&"text",j&&`text-color_${j}`,D&&`text-color_hover_${D}`,N&&`text-gradient_${N}`,Q&&`text-style_${Q}`,L&&`text-weight_${L}`,B&&`fill_${B}`,$&&`fill_hover_${$}`,F&&`border-color_${F}`,I&&`border-color_hover_${I}`,k&&`border-width_${k}`,X&&`border_type_${X}`,W&&`link_shape_${W}`),"data-testid":t,"data-tour":s,href:c||d,LinkComponent:f,rel:y,style:Object.assign({},R,p),target:x,onClick:C,onMouseDown:_,onPointerCancel:b,onPointerDown:v,onPointerLeave:P,onPointerUp:T,children:[S,h||n,z]})},exports.LinkWrapper=u,exports.Text=d,exports.Title=g,exports.Tooltip=b,exports.TooltipWrapper=i=>{const{destroyOnHidden:a=!1,placement:o="right",tooltipContent:l,trigger:t="hover",openDelay:s=.5,closeDelay:n=.25,isOpen:c,children:d,...f}=i;return e.jsx(r,{destroyOnHidden:a,mouseEnterDelay:s,mouseLeaveDelay:n,overlay:e.jsx(b,{initialIsVisible:!0,...f,children:l}),placement:o,prefixCls:"tooltip-wrapper",trigger:t,visible:c,children:d})},exports.badgeAppearance=f,exports.badgeConfig=y,exports.dividerAppearance=A,exports.dividerConfig=H,exports.dropdownItemAppearance=j,exports.dropdownItemConfig=D,exports.iconAppearance=v,exports.iconConfig=P,exports.linkAppearance=x,exports.linkConfig=m,exports.textAppearance=n,exports.textConfig=c,exports.titleAppearance=S,exports.titleConfig=z,exports.tooltipAppearance=C,exports.tooltipConfig=_;