mimir-ui-kit 1.15.2 → 1.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. package/dist/Input-BFFPzelg.js +228 -0
  2. package/dist/{ProgressBar-BekX41HR.js → ProgressBar-CwLwhaeM.js} +23 -23
  3. package/dist/assets/Accordion.css +1 -1
  4. package/dist/assets/AnchorLink.css +1 -0
  5. package/dist/assets/Input.css +1 -1
  6. package/dist/assets/OtpInput.css +1 -1
  7. package/dist/assets/ProgressBar2.css +1 -1
  8. package/dist/assets/TextArea.css +1 -0
  9. package/dist/components/Accordion/Accordion.d.ts +2 -1
  10. package/dist/components/Accordion/Accordion.js +79 -38
  11. package/dist/components/Accordion/constants.d.ts +9 -1
  12. package/dist/components/Accordion/constants.js +18 -6
  13. package/dist/components/AnchorLink/AnchorLink.d.ts +13 -0
  14. package/dist/components/AnchorLink/AnchorLink.js +69 -0
  15. package/dist/components/AnchorLink/constants.d.ts +10 -0
  16. package/dist/components/AnchorLink/constants.js +16 -0
  17. package/dist/components/AnchorLink/index.d.ts +2 -0
  18. package/dist/components/AnchorLink/index.js +7 -0
  19. package/dist/components/DatePicker/DatePicker.d.ts +1 -9
  20. package/dist/components/DatePicker/DatePicker.js +1 -1
  21. package/dist/components/Input/Input.d.ts +11 -27
  22. package/dist/components/Input/Input.js +9 -120
  23. package/dist/components/Input/index.d.ts +1 -1
  24. package/dist/components/Input/index.js +2 -2
  25. package/dist/components/Input/types.d.ts +11 -0
  26. package/dist/components/InputPassword/InputPassword.d.ts +1 -9
  27. package/dist/components/InputPassword/InputPassword.js +1 -1
  28. package/dist/components/InputPhoneNumber/InputPhoneNumber.d.ts +1 -9
  29. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  30. package/dist/components/OtpInput/OtpInput.js +5 -5
  31. package/dist/components/SelectSearch/SelectSearch.js +1 -1
  32. package/dist/components/TextArea/TextArea.d.ts +5 -0
  33. package/dist/components/TextArea/TextArea.js +209 -0
  34. package/dist/components/TextArea/hooks.d.ts +1 -0
  35. package/dist/components/TextArea/hooks.js +13 -0
  36. package/dist/components/TextArea/index.d.ts +1 -0
  37. package/dist/components/TextArea/index.js +4 -0
  38. package/dist/components/TextArea/types.d.ts +3 -0
  39. package/dist/components/TextArea/types.js +1 -0
  40. package/dist/components/Toasts/ProgressBar.js +1 -1
  41. package/dist/components/Toasts/Toast.js +1 -1
  42. package/dist/components/Toasts/ToastList.js +1 -1
  43. package/dist/components/Toasts/ToastsProvider.js +1 -1
  44. package/dist/components/index.d.ts +3 -0
  45. package/dist/components/index.js +9 -2
  46. package/dist/hooks/index.d.ts +1 -0
  47. package/dist/hooks/index.js +2 -0
  48. package/dist/hooks/useMergeRefs/index.d.ts +1 -0
  49. package/dist/hooks/useMergeRefs/index.js +4 -0
  50. package/dist/hooks/useMergeRefs/useMergeRefs.d.ts +4 -0
  51. package/dist/hooks/useMergeRefs/useMergeRefs.js +28 -0
  52. package/dist/icons/Icon.d.ts +1 -2
  53. package/dist/icons/components/12px/Close12px.js +1 -1
  54. package/dist/icons/index.d.ts +1 -1
  55. package/dist/index.js +11 -2
  56. package/package.json +2 -3
@@ -0,0 +1,228 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { c as classNames } from "./index-CweZ_OcN.js";
3
+ import { memo, forwardRef, useState, useRef, useEffect } from "react";
4
+ import { EInputVariant } from "./components/Input/constants.js";
5
+ import { useMergeRefs } from "./hooks/useMergeRefs/useMergeRefs.js";
6
+ import { Icon } from "./icons/Icon.js";
7
+ import { Button } from "./components/Button/Button.js";
8
+ import './assets/Input.css';const label = "_label_1lw8q_16";
9
+ const input = "_input_1lw8q_3";
10
+ const focused = "_focused_1lw8q_65";
11
+ const clear = "_clear_1lw8q_98";
12
+ const s = "_s_1lw8q_126";
13
+ const m = "_m_1lw8q_141";
14
+ const l = "_l_1lw8q_16";
15
+ const success = "_success_1lw8q_198";
16
+ const alarm = "_alarm_1lw8q_216";
17
+ const error = "_error_1lw8q_234";
18
+ const disabled = "_disabled_1lw8q_252";
19
+ const cls = {
20
+ "input-wrapper": "_input-wrapper_1lw8q_3",
21
+ label,
22
+ "has-left-slot": "_has-left-slot_1lw8q_29",
23
+ "active-label": "_active-label_1lw8q_32",
24
+ input,
25
+ "has-right-slot": "_has-right-slot_1lw8q_62",
26
+ focused,
27
+ "has-label": "_has-label_1lw8q_68",
28
+ "left-slot": "_left-slot_1lw8q_71",
29
+ "right-slot": "_right-slot_1lw8q_72",
30
+ "addon-icon": "_addon-icon_1lw8q_94",
31
+ clear,
32
+ s,
33
+ m,
34
+ l,
35
+ "default-gray": "_default-gray_1lw8q_171",
36
+ "default-white": "_default-white_1lw8q_183",
37
+ success,
38
+ alarm,
39
+ error,
40
+ disabled
41
+ };
42
+ const renderAddon = (addon) => {
43
+ var _a, _b;
44
+ if (!addon) {
45
+ return null;
46
+ }
47
+ switch (addon.addonType) {
48
+ case "icon": {
49
+ const is16px = (_a = addon.addonContent) == null ? void 0 : _a.includes("16px");
50
+ const is24px = (_b = addon.addonContent) == null ? void 0 : _b.includes("24px");
51
+ return /* @__PURE__ */ jsx(
52
+ Icon,
53
+ {
54
+ style: {
55
+ ["--icon-size"]: classNames({
56
+ "16px": is16px,
57
+ "24px": is24px
58
+ })
59
+ },
60
+ className: cls["addon-icon"],
61
+ iconName: addon.addonContent
62
+ }
63
+ );
64
+ }
65
+ case "text": {
66
+ return addon.addonContent;
67
+ }
68
+ default: {
69
+ return null;
70
+ }
71
+ }
72
+ };
73
+ const Input = memo(
74
+ forwardRef(
75
+ (props, ref) => {
76
+ const {
77
+ value,
78
+ className,
79
+ wrapperClassName,
80
+ variant = EInputVariant.DefaultGray,
81
+ type = "text",
82
+ autofocus,
83
+ readonly,
84
+ id,
85
+ onFocus,
86
+ onBlur,
87
+ label: label2,
88
+ withClearButton,
89
+ disabled: disabled2,
90
+ rightAddon,
91
+ leftAddon,
92
+ size = "m",
93
+ ...otherProps
94
+ } = props;
95
+ const [isFocused, setIsFocused] = useState(autofocus);
96
+ const [withValue, setWithValue] = useState(!!value);
97
+ const inputRef = useRef(null);
98
+ const leftAddonRef = useRef(null);
99
+ const mergedInputRef = useMergeRefs(inputRef, ref);
100
+ useEffect(() => {
101
+ if (autofocus) {
102
+ setIsFocused(true);
103
+ }
104
+ }, [autofocus]);
105
+ const handleBlur = (event) => {
106
+ const currentValue = event.currentTarget.value;
107
+ onBlur == null ? void 0 : onBlur(event);
108
+ if (currentValue) {
109
+ return;
110
+ }
111
+ setIsFocused(false);
112
+ };
113
+ const handleFocus = (event) => {
114
+ if (readonly) {
115
+ return;
116
+ }
117
+ setIsFocused(true);
118
+ onFocus == null ? void 0 : onFocus(event);
119
+ };
120
+ const handleClear = () => {
121
+ if (inputRef == null ? void 0 : inputRef.current) {
122
+ inputRef.current.value = "";
123
+ inputRef.current.focus();
124
+ setWithValue(false);
125
+ }
126
+ };
127
+ const handleChange = (event) => {
128
+ var _a;
129
+ const targetValue = event.target.value;
130
+ setWithValue(!!targetValue);
131
+ (_a = otherProps == null ? void 0 : otherProps.onChange) == null ? void 0 : _a.call(otherProps, event);
132
+ };
133
+ const currentLeftAddon = renderAddon(leftAddon);
134
+ const currentRightAddon = renderAddon(rightAddon);
135
+ const mods = {
136
+ [cls.readonly]: disabled2 || readonly,
137
+ [cls.focused]: isFocused || withValue,
138
+ [cls.disabled]: disabled2 || readonly,
139
+ [cls["has-label"]]: !!label2,
140
+ [cls["has-left-slot"]]: !!currentLeftAddon,
141
+ [cls["has-right-slot"]]: !!currentRightAddon
142
+ };
143
+ const labelClassNames = classNames(
144
+ cls.label,
145
+ {
146
+ [cls["active-label"]]: isFocused || value,
147
+ [cls.disabled]: disabled2 || readonly,
148
+ [cls["has-left-slot"]]: !!currentLeftAddon
149
+ },
150
+ className,
151
+ cls[size]
152
+ );
153
+ const inputClassNames = classNames(cls.input, mods, className, [
154
+ cls[variant],
155
+ cls[size]
156
+ ]);
157
+ return /* @__PURE__ */ jsxs(
158
+ "div",
159
+ {
160
+ className: classNames(
161
+ cls["input-wrapper"],
162
+ cls[variant],
163
+ cls[size],
164
+ { [cls.focused]: isFocused || withValue },
165
+ wrapperClassName
166
+ ),
167
+ children: [
168
+ label2 && /* @__PURE__ */ jsx("label", { htmlFor: id, className: labelClassNames, children: label2 }),
169
+ currentLeftAddon && /* @__PURE__ */ jsx(
170
+ "span",
171
+ {
172
+ ref: leftAddonRef,
173
+ className: classNames(cls["left-slot"], {
174
+ [cls.focused]: isFocused,
175
+ [cls["has-label"]]: !!label2
176
+ }),
177
+ children: currentLeftAddon
178
+ }
179
+ ),
180
+ /* @__PURE__ */ jsx(
181
+ "input",
182
+ {
183
+ ref: mergedInputRef,
184
+ type,
185
+ id,
186
+ className: inputClassNames,
187
+ onFocus: handleFocus,
188
+ onBlur: handleBlur,
189
+ readOnly: readonly,
190
+ value,
191
+ onChange: handleChange,
192
+ ...otherProps
193
+ }
194
+ ),
195
+ currentRightAddon && /* @__PURE__ */ jsx(
196
+ "span",
197
+ {
198
+ className: classNames(cls["right-slot"], {
199
+ [cls.focused]: isFocused,
200
+ [cls["has-label"]]: !!label2
201
+ }),
202
+ children: currentRightAddon
203
+ }
204
+ ),
205
+ withClearButton && withValue && /* @__PURE__ */ jsx(
206
+ Button,
207
+ {
208
+ tabIndex: -1,
209
+ className: cls.clear,
210
+ isIconButton: true,
211
+ iconName: "Close16px",
212
+ size: "m-s",
213
+ clear: true,
214
+ variant: "secondary-gray",
215
+ onClick: handleClear
216
+ }
217
+ )
218
+ ]
219
+ }
220
+ );
221
+ }
222
+ )
223
+ );
224
+ Input.displayName = "Input";
225
+ export {
226
+ Input as I,
227
+ cls as c
228
+ };
@@ -2,39 +2,39 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { c as classNames } from "./index-CweZ_OcN.js";
3
3
  import { memo, useRef, useEffect } from "react";
4
4
  import { DEFAULT_TOAST_DURATION, EToastVariant } from "./components/Toasts/constants.js";
5
- import './assets/ProgressBar2.css';const title = "_title_1bc98_37";
6
- const timer = "_timer_1bc98_41";
7
- const seconds = "_seconds_1bc98_51";
8
- const message = "_message_1bc98_61";
9
- const progress = "_progress_1bc98_69";
10
- const slot = "_slot_1bc98_95";
11
- const success = "_success_1bc98_104";
12
- const alarm = "_alarm_1bc98_109";
13
- const error = "_error_1bc98_114";
5
+ import './assets/ProgressBar2.css';const title = "_title_1rvsh_37";
6
+ const timer = "_timer_1rvsh_41";
7
+ const seconds = "_seconds_1rvsh_51";
8
+ const message = "_message_1rvsh_61";
9
+ const progress = "_progress_1rvsh_69";
10
+ const slot = "_slot_1rvsh_95";
11
+ const success = "_success_1rvsh_104";
12
+ const alarm = "_alarm_1rvsh_109";
13
+ const error = "_error_1rvsh_114";
14
14
  const cls = {
15
- "toast-list": "_toast-list_1bc98_2",
16
- "toast-wrapper": "_toast-wrapper_1bc98_24",
15
+ "toast-list": "_toast-list_1rvsh_2",
16
+ "toast-wrapper": "_toast-wrapper_1rvsh_24",
17
17
  title,
18
18
  timer,
19
- "timer-title": "_timer-title_1bc98_49",
19
+ "timer-title": "_timer-title_1rvsh_49",
20
20
  seconds,
21
21
  message,
22
22
  progress,
23
- "progress-bar": "_progress-bar_1bc98_78",
24
- "close-button": "_close-button_1bc98_89",
23
+ "progress-bar": "_progress-bar_1rvsh_78",
24
+ "close-button": "_close-button_1rvsh_89",
25
25
  slot,
26
- "default": "_default_1bc98_99",
26
+ "default": "_default_1rvsh_99",
27
27
  success,
28
28
  alarm,
29
29
  error,
30
- "top-right": "_top-right_1bc98_119",
31
- "top-center": "_top-center_1bc98_125",
32
- "top-left": "_top-left_1bc98_131",
33
- "bottom-left": "_bottom-left_1bc98_136",
34
- "bottom-center": "_bottom-center_1bc98_141",
35
- "bottom-right": "_bottom-right_1bc98_147",
36
- "toast-in": "_toast-in_1bc98_179",
37
- "toast-out": "_toast-out_1bc98_183"
30
+ "top-right": "_top-right_1rvsh_119",
31
+ "top-center": "_top-center_1rvsh_125",
32
+ "top-left": "_top-left_1rvsh_131",
33
+ "bottom-left": "_bottom-left_1rvsh_136",
34
+ "bottom-center": "_bottom-center_1rvsh_141",
35
+ "bottom-right": "_bottom-right_1rvsh_147",
36
+ "toast-in": "_toast-in_1rvsh_179",
37
+ "toast-out": "_toast-out_1rvsh_183"
38
38
  };
39
39
  const ProgressBar = memo(
40
40
  ({
@@ -1 +1 @@
1
- ._accordion_18wwx_2{padding-bottom:var(--accordion-space);border-bottom:1px solid var(--black-20)}._accordion_18wwx_2 svg path{fill:var(--white)}._header_18wwx_10{display:flex;gap:var(--space-m);align-items:flex-start;justify-content:space-between;width:100%;font-weight:var(--font-weight-text-medium);font-family:var(--font-montserrat);text-align:left;border:none;cursor:pointer}._title_18wwx_23{font-size:var(--accordion-text-size)}._title-uppercase_18wwx_26{text-transform:uppercase}._icon_18wwx_30{transition:transform .3s ease-in-out}._icon-container_18wwx_33{display:flex;align-items:center;justify-content:center;min-width:var(--accordion-icon-width);min-height:var(--accordion-icon-height);background-color:var(--black-80);border-radius:50%;transition:background-color .3s ease-in-out}._panel_18wwx_44{margin-top:var(--accordion-panel-space)}._open_18wwx_48{background-color:var(--sapphire-100)}._open_18wwx_48 svg{transform:rotate(-180deg)}._m_18wwx_55{--accordion-space: var(--space-xl);--accordion-text-size: var(--size-text-xl2);--accordion-icon-width: var(--accordion-icon-size-m);--accordion-icon-height: var(--accordion-icon-size-m);--accordion-panel-space: var(--space-xl)}._s_18wwx_63{--accordion-space: var(--space-m);--accordion-text-size: var(--size-text-l);--accordion-icon-width: var(--accordion-icon-size-s);--accordion-icon-height: var(--accordion-icon-size-s);--accordion-panel-space: var(--space-m)}
1
+ ._accordion_11o2x_2{padding-bottom:var(--accordion-space);border-bottom:1px solid var(--black-20)}._accordion_11o2x_2 svg path{fill:var(--white)}._accordion_11o2x_2._is-link_11o2x_9{border:none}._header_11o2x_13{display:flex;gap:var(--space-m);align-items:flex-start;justify-content:space-between;width:100%;font-weight:var(--font-weight-text-medium);font-family:var(--font-montserrat);text-align:left;border:none;cursor:pointer}._title_11o2x_26{font-size:var(--accordion-text-size)}._title-uppercase_11o2x_29{text-transform:uppercase}._icon_11o2x_33{transition:transform .3s ease-in-out}._icon-container_11o2x_36{display:flex;align-items:center;justify-content:center;min-width:var(--accordion-icon-width);min-height:var(--accordion-icon-height);background-color:var(--black-80);border-radius:50%;transition:background-color .3s ease-in-out}._panel_11o2x_47{margin-top:var(--accordion-panel-space)}._panel_11o2x_47._is-link_11o2x_9{margin-top:var(--space-xs)}._open_11o2x_54{background-color:var(--sapphire-100)}._open_11o2x_54 svg{transform:rotate(-180deg)}._link-open_11o2x_61{transform:rotate(-180deg)}._m_11o2x_65{--accordion-space: var(--space-xl);--accordion-text-size: var(--size-text-xl2);--accordion-icon-width: var(--accordion-icon-size-m);--accordion-icon-height: var(--accordion-icon-size-m);--accordion-panel-space: var(--space-xl)}._s_11o2x_73{--accordion-space: var(--space-m);--accordion-text-size: var(--size-text-l);--accordion-icon-width: var(--accordion-icon-size-s);--accordion-icon-height: var(--accordion-icon-size-s);--accordion-panel-space: var(--space-m)}
@@ -0,0 +1 @@
1
+ ._link_12t08_2{--link-color: var(--dark-text);display:inline-flex;align-items:center;color:var(--link-color);font-size:var(--link-font-size);font-family:var(--font-inter);line-height:var(--link-line-height);-moz-column-gap:var(--link-gap);column-gap:var(--link-gap);transition:all .15s ease}._link_12t08_2:hover{--link-color: var(--sapphire-hover)}._link_12t08_2:active{--link-color: var(--sapphire-active)}._link_12t08_2._sample_12t08_19:hover{-webkit-text-decoration:underline var(--link-color);text-decoration:underline var(--link-color);text-underline-offset:4px}._link_12t08_2._anchor_12t08_23:hover{-webkit-text-decoration:underline dashed var(--link-color);text-decoration:underline dashed var(--link-color);text-underline-offset:4px}._link_12t08_2._disabled_12t08_27{--link-color: var(--disabled);-webkit-text-decoration:none;text-decoration:none}._link_12t08_2._disabled_12t08_27:hover,._link_12t08_2._disabled_12t08_27:active{-webkit-text-decoration:none;text-decoration:none;--link-color: var(--disabled)}._link_12t08_2 ._icon_12t08_35{color:currentcolor;fill:currentcolor}._link_12t08_2 ._icon_12t08_35 path{color:currentcolor;fill:currentcolor}._xs_12t08_44{--link-font-size: var(--size-text-s);--link-line-height: var(--size-text-s);--link-gap: var(--space-2xs)}._s_12t08_19{--link-font-size: var(--size-text-m);--link-line-height: var(--size-text-s);--link-gap: var(--space-2xs)}._m_12t08_56{--link-font-size: var(--size-text-l);--link-line-height: var(--size-text-s);--link-gap: var(--space-2xs)}._l_12t08_2{--link-font-size: var(--size-text-l2);--link-line-height: var(--size-text-s);--link-gap: var(--space-xs)}
@@ -1 +1 @@
1
- ._input-wrapper_1sn09_2{position:relative}._input-wrapper_1sn09_2 ._label_1sn09_5{position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--space-m);z-index:1;display:block;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;transform-origin:left center;transition:transform .15s ease-out,color .15s ease-out;pointer-events:none}._input-wrapper_1sn09_2 ._label_1sn09_5._active-label_1sn09_18{transform:scale(var(--label-scaled)) translateY(calc(var(--input-font-size) * -1))}._input-wrapper_1sn09_2:hover ._label_1sn09_5,._input-wrapper_1sn09_2:focus-within ._label_1sn09_5{color:var(--label-color)}._input_1sn09_2{--button-border-radius-l: 8px;--button-border-radius-m: 6px;--button-border-radius-s: 6px;position:relative;display:block;width:100%;min-width:0;height:var(--input-height);padding-top:0;color:var(--dark-text);font-size:var(--input-font-size);font-family:var(--font-inter);line-height:var(--input-line-height);letter-spacing:-.42px;background:none;background-color:var(--input-bg-color);border-bottom:1px solid transparent;border-radius:var(--input-border-radius);outline:none;cursor:var(--input-cursor);transition:background-color .2s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding-left:var(--input-padding);padding-right:var(--input-padding);font-feature-settings:"zero"}._input_1sn09_2:hover{color:var(--input-color-hover);background:var(--input-bg-color-hover)}._input_1sn09_2:focus{color:var(--input-color-active);background-color:var(--input-bg-color-active);border-bottom:1px solid var(--input-bottom-color-active)}._s_1sn09_61{--input-height: var(--space-xxl);--input-font-size: var(--control-text-size-m);--input-line-height: var(--line-height-text-xs);--input-padding: var(--space-m);--input-padding-position: var(--space-1xs);--input-border-radius: var(--button-border-radius-s);--label-font-size: var(--size-text-xs);--label-scaled: .85;--label-spacing: var(--space-1xs)}._m_1sn09_73{--input-height: var(--space-4xl);--input-font-size: var(--control-text-size-l);--input-line-height: var(--line-height-text-s1);--input-padding: var(--space-m);--input-padding-position: var(--space-xs);--input-border-radius: var(--button-border-radius-m);--label-font-size: var(--size-text-s);--label-scaled: .75;--label-spacing: var(--space-xs)}._l_1sn09_5{--input-height: var(--space-4xxl);--input-font-size: var(--control-text-size-2xl);--input-line-height: var(--line-height-text-l);--input-padding: var(--space-m);--input-padding-position: var(--space-s);--input-border-radius: var(--button-border-radius-l);--label-font-size: var(--size-text-s);--label-scaled: .6;--label-spacing: var(--space-s)}._default-gray_1sn09_97{--input-bg-color: var(--black-5);--input-bg-color-active: var(--black-10);--input-bg-color-hover: var(--black-10);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1sn09_109{--input-bg-color: var(--white);--input-bg-color-hover: var(--black-10);--input-bg-color-active: var(--white);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1sn09_109:hover{--label-color: var(--dark-text)}._success_1sn09_124{--input-bg-color: var(--success-normal);--input-bg-color-hover: var(--success-bg-hover);--input-bg-color-active: var(--success-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--success-normal);--label-color: var(--black-60)}._success_1sn09_124::-moz-placeholder{color:var(--input-color)}._success_1sn09_124::placeholder{color:var(--input-color)}._success_1sn09_124:hover::-moz-placeholder{color:var(--input-color)}._success_1sn09_124:hover::placeholder{color:var(--input-color)}._alarm_1sn09_142{--input-bg-color: var(--alarm-normal);--input-bg-color-hover: var(--alarm-bg-hover);--input-bg-color-active: var(--alarm-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--alarm-normal);--label-color: var(--black-60)}._alarm_1sn09_142::-moz-placeholder{color:var(--input-color)}._alarm_1sn09_142::placeholder{color:var(--input-color)}._alarm_1sn09_142:hover::-moz-placeholder{color:var(--input-color)}._alarm_1sn09_142:hover::placeholder{color:var(--input-color)}._error_1sn09_160{--input-bg-color: var(--error-normal);--input-bg-color-hover: var(--error-bg-hover);--input-bg-color-active: var(--error-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--error-normal);--label-color: var(--black-60)}._error_1sn09_160::-moz-placeholder{color:var(--input-color)}._error_1sn09_160::placeholder{color:var(--input-color)}._error_1sn09_160:hover::-moz-placeholder{color:var(--input-color)}._error_1sn09_160:hover::placeholder{color:var(--input-color)}._disabled_1sn09_178{--input-cursor: not-allowed;--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20)}._disabled_1sn09_178:hover,._disabled_1sn09_178:active,._disabled_1sn09_178:focus{--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20);border:none;box-shadow:none}._disabled_1sn09_178::-moz-placeholder{color:var(--light-text)}._disabled_1sn09_178::placeholder{color:var(--light-text)}._disabled_1sn09_178:hover::-moz-placeholder{color:var(--light-text)}._disabled_1sn09_178:hover::placeholder{color:var(--light-text)}._has-label_1sn09_198{padding-top:var(--input-padding-position)}
1
+ ._input-wrapper_1lw8q_3{--input-border-radius-l: 8px;--input-border-radius-m: 6px;--input-border-radius-s: 6px;position:relative;display:flex;padding:0 var(--space-m);overflow:hidden;background-color:var(--input-bg-color);border-bottom:1px solid transparent;border-radius:var(--input-border-radius);transition:background-color .2s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease}._input-wrapper_1lw8q_3 ._label_1lw8q_16{position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--space-m);z-index:1;display:block;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;transform-origin:left center;transition:transform .15s ease-out,left .15s ease-out,color .15s ease-out;pointer-events:none}._input-wrapper_1lw8q_3 ._label_1lw8q_16._has-left-slot_1lw8q_29{left:calc(var(--space-m) + var(--icon-size) + var(--clear-button-mg))}._input-wrapper_1lw8q_3 ._label_1lw8q_16._active-label_1lw8q_32{transform:scale(var(--label-scaled)) translateY(calc(var(--input-font-size) * -1))}._input-wrapper_1lw8q_3 ._label_1lw8q_16._active-label_1lw8q_32._has-left-slot_1lw8q_29{left:calc(var(--space-m) + var(--icon-size) + var(--space-s));transform:scale(var(--label-scaled)) translate(calc((var(--space-m) + var(--left-addon-position)) * 2 * -1),calc(var(--input-font-size) * -1))}._input-wrapper_1lw8q_3 ._input_1lw8q_3{position:relative;display:block;flex:1;width:100%;min-width:0;height:var(--input-height);color:var(--dark-text);font-size:var(--input-font-size);font-family:var(--font-inter);line-height:var(--input-line-height);letter-spacing:-.42px;background-color:inherit;border-radius:var(--input-border-radius);outline:none;cursor:var(--input-cursor);transition:border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-feature-settings:"zero"}._input-wrapper_1lw8q_3 ._input_1lw8q_3._has-left-slot_1lw8q_29{padding-left:0}._input-wrapper_1lw8q_3 ._input_1lw8q_3._has-right-slot_1lw8q_62{padding-right:0}._input-wrapper_1lw8q_3 ._input_1lw8q_3._focused_1lw8q_65{padding-top:0}._input-wrapper_1lw8q_3 ._input_1lw8q_3._has-label_1lw8q_68{padding-top:var(--input-padding-position)}._input-wrapper_1lw8q_3 ._left-slot_1lw8q_71,._input-wrapper_1lw8q_3 ._right-slot_1lw8q_72{display:flex;align-items:center;height:var(--input-height);color:var(--black-60);font-size:var(--input-font-size);font-family:var(--font-inter);line-height:var(--input-line-height);background-color:inherit;transition:padding-top .15s ease-out}._input-wrapper_1lw8q_3 ._left-slot_1lw8q_71._focused_1lw8q_65._has-label_1lw8q_68,._input-wrapper_1lw8q_3 ._right-slot_1lw8q_72._focused_1lw8q_65._has-label_1lw8q_68{padding-top:var(--input-padding-position)}._input-wrapper_1lw8q_3 ._left-slot_1lw8q_71{justify-content:flex-end;margin-right:var(--clear-button-mg)}._input-wrapper_1lw8q_3 ._right-slot_1lw8q_72{margin-left:var(--clear-button-mg)}._input-wrapper_1lw8q_3 ._addon-icon_1lw8q_94{width:var(--icon-size);height:var(--icon-size)}._input-wrapper_1lw8q_3 ._clear_1lw8q_98{align-self:center;width:16px;height:16px;margin-left:var(--clear-button-mg)}._input-wrapper_1lw8q_3 svg{color:currentcolor;fill:currentcolor}._input-wrapper_1lw8q_3:hover ._label_1lw8q_16,._input-wrapper_1lw8q_3:focus-within ._label_1lw8q_16{color:var(--label-color)}._input-wrapper_1lw8q_3:hover{background-color:var(--input-bg-color-hover)}._input-wrapper_1lw8q_3:focus-within{background-color:var(--input-bg-color-active);border-bottom:1px solid var(--input-bottom-color-active)}._input-wrapper_1lw8q_3._focused_1lw8q_65{color:var(--input-color-active);background-color:var(--input-bg-color-active)}._input-wrapper_1lw8q_3._focused_1lw8q_65:hover{background-color:var(--input-bg-color-hover)}._s_1lw8q_126{--input-height: var(--space-xxl);--input-font-size: var(--control-text-size-m);--input-line-height: var(--line-height-text-xs);--input-padding: var(--space-m);--input-padding-position: var(--space-1xs);--input-border-radius: var(--input-border-radius-s);--label-font-size: var(--size-text-xs);--label-scaled: .85;--label-spacing: var(--space-1xs);--clear-button-mg: var(--space-2xs);--icon-size: 16px;--left-addon-position: 0px}._m_1lw8q_141{--input-height: var(--space-4xl);--input-font-size: var(--control-text-size-l);--input-line-height: var(--line-height-text-s1);--input-padding: var(--space-m);--input-padding-position: var(--space-xs);--input-border-radius: var(--input-border-radius-m);--label-font-size: var(--size-text-s);--label-scaled: .75;--label-spacing: var(--space-xs);--clear-button-mg: var(--space-2xs);--icon-size: 16px;--left-addon-position: var(--space-3xs)}._l_1lw8q_16{--input-height: var(--space-4xxl);--input-font-size: var(--control-text-size-2xl);--input-line-height: var(--line-height-text-l);--input-padding: var(--space-m);--input-padding-position: var(--space-s);--input-border-radius: var(--input-border-radius-l);--label-font-size: var(--size-text-s);--label-scaled: .6;--label-spacing: var(--space-s);--clear-button-mg: var(--space-xs);--icon-size: 24px;--left-addon-position: var(--space-s)}._default-gray_1lw8q_171{--input-bg-color: var(--black-5);--input-bg-color-active: var(--black-10);--input-bg-color-hover: var(--black-10);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1lw8q_183{--input-bg-color: var(--white);--input-bg-color-hover: var(--black-10);--input-bg-color-active: var(--white);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1lw8q_183:hover{--label-color: var(--dark-text)}._success_1lw8q_198{--input-bg-color: var(--success-normal);--input-bg-color-hover: var(--success-bg-hover);--input-bg-color-active: var(--success-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--success-normal);--label-color: var(--black-60)}._success_1lw8q_198::-moz-placeholder{color:var(--input-color)}._success_1lw8q_198::placeholder{color:var(--input-color)}._success_1lw8q_198:hover::-moz-placeholder{color:var(--input-color)}._success_1lw8q_198:hover::placeholder{color:var(--input-color)}._alarm_1lw8q_216{--input-bg-color: var(--alarm-normal);--input-bg-color-hover: var(--alarm-bg-hover);--input-bg-color-active: var(--alarm-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--alarm-normal);--label-color: var(--black-60)}._alarm_1lw8q_216::-moz-placeholder{color:var(--input-color)}._alarm_1lw8q_216::placeholder{color:var(--input-color)}._alarm_1lw8q_216:hover::-moz-placeholder{color:var(--input-color)}._alarm_1lw8q_216:hover::placeholder{color:var(--input-color)}._error_1lw8q_234{--input-bg-color: var(--error-normal);--input-bg-color-hover: var(--error-bg-hover);--input-bg-color-active: var(--error-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--error-normal);--label-color: var(--black-60)}._error_1lw8q_234::-moz-placeholder{color:var(--input-color)}._error_1lw8q_234::placeholder{color:var(--input-color)}._error_1lw8q_234:hover::-moz-placeholder{color:var(--input-color)}._error_1lw8q_234:hover::placeholder{color:var(--input-color)}._disabled_1lw8q_252{--input-cursor: not-allowed;--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20)}._disabled_1lw8q_252:hover,._disabled_1lw8q_252:active,._disabled_1lw8q_252:focus{--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20);border:none;box-shadow:none}._disabled_1lw8q_252::-moz-placeholder{color:var(--light-text)}._disabled_1lw8q_252::placeholder{color:var(--light-text)}._disabled_1lw8q_252:hover::-moz-placeholder{color:var(--light-text)}._disabled_1lw8q_252:hover::placeholder{color:var(--light-text)}
@@ -1 +1 @@
1
- ._otp_1005h_3{display:flex;align-items:center;width:100%;-moz-column-gap:var(--space-xs);column-gap:var(--space-xs)}@media (max-width: 768px){._otp_1005h_3{-moz-column-gap:4.65px;column-gap:4.65px}}._input-wrapper_1005h_15{flex:0 0 64px;padding:0}@media (max-width: 768px){._input-wrapper_1005h_15{flex:0 0 48px}}._input_1005h_15{text-align:center}._separator_1005h_29{display:block;flex:0 0 54px;align-self:center;height:1px;margin:0 var(--space-xs);background-color:var(--black-100)}
1
+ ._otp_196ev_3{display:flex;align-items:center;width:100%;-moz-column-gap:var(--space-xs);column-gap:var(--space-xs)}@media (max-width: 768px){._otp_196ev_3{-moz-column-gap:4.65px;column-gap:4.65px}}._otp_196ev_3 ._input-wrapper_196ev_14{flex:0 0 64px;padding:0}@media (max-width: 768px){._otp_196ev_3 ._input-wrapper_196ev_14{flex:0 0 48px}}._input_196ev_14{text-align:center}._separator_196ev_28{display:block;flex:0 0 54px;align-self:center;height:1px;margin:0 var(--space-xs);background-color:var(--black-100)}
@@ -1 +1 @@
1
- ._toast-list_1bc98_2{position:fixed;z-index:50;width:100vw;max-width:515px;max-height:100vh;padding:var(--space-m);overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._toast-list_1bc98_2::-webkit-scrollbar{display:none}._toast-list_1bc98_2::-webkit-scrollbar-track{background-color:transparent}._toast-list_1bc98_2::-webkit-scrollbar-thumb{background-color:transparent}._toast-list_1bc98_2::-webkit-scrollbar-thumb:window-inactive{background-color:transparent}._toast-wrapper_1bc98_24{position:relative;display:flex;flex-direction:column;padding:var(--space-m);background-color:var(--toast-bg-color);border-radius:var(--control-radius);transition:all .3s ease}._toast-wrapper_1bc98_24:not(:last-child){margin-bottom:var(--space-s)}._title_1bc98_37:not(:last-child){margin-bottom:var(--space-xs)}._timer_1bc98_41{display:flex;justify-content:space-between}._timer_1bc98_41:not(:last-child){margin-bottom:var(--space-2xs)}._timer-title_1bc98_49,._title_1bc98_37,._seconds_1bc98_51{color:var(--black-60);font-size:var(--size-text-m);line-height:var(--line-height-text-xxs)}._seconds_1bc98_51{color:var(--black-100)}._message_1bc98_61{font-size:var(--size-text-l);line-height:var(--line-height-text-s1)}._message_1bc98_61:not(:last-child){margin-bottom:var(--space-xs)}._progress_1bc98_69{position:relative;width:100%;height:8px;overflow:hidden;background-color:var(--black-5);border-radius:var(--control-radius-xs)}._progress-bar_1bc98_78{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;background-color:var(--progress-bg-color);border-radius:var(--control-radius-xs)}._close-button_1bc98_89{position:absolute;top:var(--space-s);right:var(--space-s)}._slot_1bc98_95{margin-top:var(--space-xl)}._default_1bc98_99{--toast-bg-color: var(--white);--progress-bg-color: var(--sapphire-100)}._success_1bc98_104{--toast-bg-color: var(--success-bg-active);--progress-bg-color: var(--success-normal)}._alarm_1bc98_109{--toast-bg-color: var(--alarm-bg-active);--progress-bg-color: var(--alarm-normal)}._error_1bc98_114{--toast-bg-color: var(--error-bg-active);--progress-bg-color: var(--error-normal)}._top-right_1bc98_119{top:0;right:0;transition:all .3s ease}._top-center_1bc98_125{top:0;right:50%;transform:translate(50%)}._top-left_1bc98_131{top:0;left:0}._bottom-left_1bc98_136{bottom:0;left:0}._bottom-center_1bc98_141{right:50%;bottom:0;transform:translate(50%)}._bottom-right_1bc98_147{right:0;bottom:0}@keyframes _toast-in_1bc98_179{0%{transform:var(--elm-translate);opacity:.7}80%{transform:translate(0);opacity:.7}to{transform:scale(1);opacity:1}}@keyframes _toast-out_1bc98_183{0%{opacity:1}20%{transform:translate(0);opacity:.7}to{transform:var(--elm-translate);opacity:.7}}._toast-in_1bc98_179{animation:_toast-in_1bc98_179 .3s both}._toast-out_1bc98_183{animation:_toast-out_1bc98_183 .8s both}
1
+ ._toast-list_1rvsh_2{position:fixed;z-index:15000;width:100vw;max-width:515px;max-height:100vh;padding:var(--space-m);overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._toast-list_1rvsh_2::-webkit-scrollbar{display:none}._toast-list_1rvsh_2::-webkit-scrollbar-track{background-color:transparent}._toast-list_1rvsh_2::-webkit-scrollbar-thumb{background-color:transparent}._toast-list_1rvsh_2::-webkit-scrollbar-thumb:window-inactive{background-color:transparent}._toast-wrapper_1rvsh_24{position:relative;display:flex;flex-direction:column;padding:var(--space-m);background-color:var(--toast-bg-color);border-radius:var(--control-radius);transition:all .3s ease}._toast-wrapper_1rvsh_24:not(:last-child){margin-bottom:var(--space-s)}._title_1rvsh_37:not(:last-child){margin-bottom:var(--space-xs)}._timer_1rvsh_41{display:flex;justify-content:space-between}._timer_1rvsh_41:not(:last-child){margin-bottom:var(--space-2xs)}._timer-title_1rvsh_49,._title_1rvsh_37,._seconds_1rvsh_51{color:var(--black-60);font-size:var(--size-text-m);line-height:var(--line-height-text-xxs)}._seconds_1rvsh_51{color:var(--black-100)}._message_1rvsh_61{font-size:var(--size-text-l);line-height:var(--line-height-text-s1)}._message_1rvsh_61:not(:last-child){margin-bottom:var(--space-xs)}._progress_1rvsh_69{position:relative;width:100%;height:8px;overflow:hidden;background-color:var(--black-5);border-radius:var(--control-radius-xs)}._progress-bar_1rvsh_78{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;background-color:var(--progress-bg-color);border-radius:var(--control-radius-xs)}._close-button_1rvsh_89{position:absolute;top:var(--space-s);right:var(--space-s)}._slot_1rvsh_95{margin-top:var(--space-xl)}._default_1rvsh_99{--toast-bg-color: var(--white);--progress-bg-color: var(--sapphire-100)}._success_1rvsh_104{--toast-bg-color: var(--success-bg-active);--progress-bg-color: var(--success-normal)}._alarm_1rvsh_109{--toast-bg-color: var(--alarm-bg-active);--progress-bg-color: var(--alarm-normal)}._error_1rvsh_114{--toast-bg-color: var(--error-bg-active);--progress-bg-color: var(--error-normal)}._top-right_1rvsh_119{top:0;right:0;transition:all .3s ease}._top-center_1rvsh_125{top:0;right:50%;transform:translate(50%)}._top-left_1rvsh_131{top:0;left:0}._bottom-left_1rvsh_136{bottom:0;left:0}._bottom-center_1rvsh_141{right:50%;bottom:0;transform:translate(50%)}._bottom-right_1rvsh_147{right:0;bottom:0}@keyframes _toast-in_1rvsh_179{0%{transform:var(--elm-translate);opacity:.7}80%{transform:translate(0);opacity:.7}to{transform:scale(1);opacity:1}}@keyframes _toast-out_1rvsh_183{0%{opacity:1}20%{transform:translate(0);opacity:.7}to{transform:var(--elm-translate);opacity:.7}}._toast-in_1rvsh_179{animation:_toast-in_1rvsh_179 .3s both}._toast-out_1rvsh_183{animation:_toast-out_1rvsh_183 .8s both}
@@ -0,0 +1 @@
1
+ ._textarea_46c4k_2{min-height:var(--textarea-height);resize:none}._textarea_46c4k_2._s_46c4k_6{--top-space: var(--space-3xs);--textarea-height: 76px;--textarea-padding: var(--space-xs) var(--space-s)}._textarea_46c4k_2._m_46c4k_11{--top-space: var(--space-2xs);--textarea-height: 88px;--textarea-padding: var(--space-xs) var(--space-s)}._textarea_46c4k_2._l_46c4k_16{--top-space: var(--space-2xs);--textarea-height: 120px;--textarea-padding: var(--space-2m)}._textarea_46c4k_2._has-label_46c4k_21{padding-top:calc(var(--input-font-size) + var(--top-space))!important}
@@ -1,10 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
- import { EAccordionSize } from './constants';
2
+ import { EAccordionButtonType, EAccordionSize } from './constants';
3
3
 
4
4
  export type TAccordionProps = {
5
5
  title: string;
6
6
  children: ReactNode;
7
7
  size?: EAccordionSize;
8
8
  titleUppercase?: boolean;
9
+ buttonType?: EAccordionButtonType | `${EAccordionButtonType}`;
9
10
  };
10
11
  export declare const Accordion: import('react').ForwardRefExoticComponent<TAccordionProps & import('react').RefAttributes<HTMLElement>>;
@@ -2,8 +2,11 @@ import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
2
2
  import { c as classNames } from "../../index-CweZ_OcN.js";
3
3
  import React__default, { createContext, useRef, Fragment, useReducer, useMemo, useId, useEffect, useContext, forwardRef } from "react";
4
4
  import { AccordionItem } from "./AccordionItem/AccordionItem.js";
5
- import { EAccordionSize, EAccordionIconSize } from "./constants.js";
5
+ import { EAccordionButtonType, EAccordionSize, EAccordionButtonIconSize, EAccordionLinkIconSize } from "./constants.js";
6
+ import { useMediaQuery } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
+ import { EMediaQuery } from "../../hooks/useMediaQuery/constants.js";
6
8
  import { Icon } from "../../icons/Icon.js";
9
+ import { Link } from "../AnchorLink/AnchorLink.js";
7
10
  import { M as M$1, W, y, T, o, a as u$1, H as H$1, I, $ as $f7dceffc5ad7768b$export$4e328f61c538687f, b as $6179b936705e76d3$export$ae780daf29e6d456, D, u as u$3, c as o$1 } from "../../keyboard-B256ZoM-.js";
8
11
  import { w } from "../../use-active-press-B6yeSopF.js";
9
12
  import { T as T$1 } from "../../use-resolve-button-type-B6LE6gU3.js";
@@ -116,58 +119,96 @@ function Re(e2, n) {
116
119
  return React__default.createElement(s$1, null, React__default.createElement(H.Provider, { value: t2.panelId }, H$1({ mergeRefs: f, ourProps: g, theirProps: d, slot: D2, defaultTag: Se, features: be, visible: p, name: "Disclosure.Panel" })));
117
120
  }
118
121
  let Ae = W(me), Ce = W(ge), Ie = W(Re), We = Object.assign(Ae, { Button: Ce, Panel: Ie });
119
- const accordion = "_accordion_18wwx_2";
120
- const header = "_header_18wwx_10";
121
- const title = "_title_18wwx_23";
122
- const icon = "_icon_18wwx_30";
123
- const panel = "_panel_18wwx_44";
124
- const open = "_open_18wwx_48";
125
- const m = "_m_18wwx_55";
126
- const s = "_s_18wwx_63";
122
+ const accordion = "_accordion_11o2x_2";
123
+ const header = "_header_11o2x_13";
124
+ const title = "_title_11o2x_26";
125
+ const icon = "_icon_11o2x_33";
126
+ const panel = "_panel_11o2x_47";
127
+ const open = "_open_11o2x_54";
128
+ const m = "_m_11o2x_65";
129
+ const s = "_s_11o2x_73";
127
130
  const cls = {
128
131
  accordion,
132
+ "is-link": "_is-link_11o2x_9",
129
133
  header,
130
134
  title,
131
- "title-uppercase": "_title-uppercase_18wwx_26",
135
+ "title-uppercase": "_title-uppercase_11o2x_29",
132
136
  icon,
133
- "icon-container": "_icon-container_18wwx_33",
137
+ "icon-container": "_icon-container_11o2x_36",
134
138
  panel,
135
139
  open,
140
+ "link-open": "_link-open_11o2x_61",
136
141
  m,
137
142
  s
138
143
  };
139
144
  const Accordion = forwardRef(
140
- ({ title: title2, children, size = EAccordionSize.M, titleUppercase }, ref) => {
141
- return /* @__PURE__ */ jsx("div", { className: classNames(cls.accordion, cls[size]), children: /* @__PURE__ */ jsx(We, { ref, children: ({ open: open2 }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
142
- /* @__PURE__ */ jsxs(Ce, { className: cls.header, children: [
143
- /* @__PURE__ */ jsx(
144
- "span",
145
- {
146
- className: classNames(
147
- cls.title,
148
- titleUppercase && cls["title-uppercase"]
149
- ),
150
- children: title2
151
- }
152
- ),
153
- /* @__PURE__ */ jsx(
154
- "div",
155
- {
156
- className: classNames(
157
- cls["icon-container"],
158
- open2 && cls.open
145
+ ({
146
+ title: title2,
147
+ buttonType = EAccordionButtonType.BUTTON,
148
+ children,
149
+ size = EAccordionSize.M,
150
+ titleUppercase
151
+ }, ref) => {
152
+ const isMobile = useMediaQuery(EMediaQuery.XS1);
153
+ const isLink = buttonType === "link";
154
+ const linkClasses = {
155
+ [cls["is-link"]]: isLink
156
+ };
157
+ const renderButton = (open2) => {
158
+ const buttonIcon = size === EAccordionSize.S ? EAccordionButtonIconSize.S : EAccordionButtonIconSize.M;
159
+ const linkIcon = size === EAccordionSize.S ? EAccordionLinkIconSize.S : EAccordionLinkIconSize.M;
160
+ switch (buttonType) {
161
+ case "link": {
162
+ return /* @__PURE__ */ jsx(
163
+ Link,
164
+ {
165
+ size: isMobile ? "s" : "l",
166
+ rightIcon: {
167
+ iconName: linkIcon,
168
+ className: classNames({
169
+ [cls["link-open"]]: open2
170
+ })
171
+ },
172
+ children: title2
173
+ }
174
+ );
175
+ }
176
+ case "button": {
177
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
178
+ /* @__PURE__ */ jsx(
179
+ "span",
180
+ {
181
+ className: classNames(
182
+ cls.title,
183
+ titleUppercase && cls["title-uppercase"]
184
+ ),
185
+ children: title2
186
+ }
159
187
  ),
160
- children: /* @__PURE__ */ jsx(
161
- Icon,
188
+ /* @__PURE__ */ jsx(
189
+ "div",
162
190
  {
163
- iconName: size === EAccordionSize.S ? EAccordionIconSize.S : EAccordionIconSize.M,
164
- className: cls.icon
191
+ className: classNames(cls["icon-container"], open2 && cls.open),
192
+ children: /* @__PURE__ */ jsx(Icon, { iconName: buttonIcon, className: cls.icon })
165
193
  }
166
194
  )
167
- }
168
- )
169
- ] }),
170
- /* @__PURE__ */ jsx(Ie, { className: cls.panel, children: /* @__PURE__ */ jsx(AccordionItem, { size, children }) })
195
+ ] });
196
+ }
197
+ default: {
198
+ return null;
199
+ }
200
+ }
201
+ };
202
+ return /* @__PURE__ */ jsx("div", { className: classNames(cls.accordion, cls[size], linkClasses), children: /* @__PURE__ */ jsx(We, { ref, children: ({ open: open2 }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
203
+ /* @__PURE__ */ jsx(
204
+ Ce,
205
+ {
206
+ as: isLink ? Fragment : "button",
207
+ className: cls.header,
208
+ children: renderButton(open2)
209
+ }
210
+ ),
211
+ /* @__PURE__ */ jsx(Ie, { className: classNames(cls.panel, linkClasses), children: /* @__PURE__ */ jsx(AccordionItem, { size, children }) })
171
212
  ] }) }) });
172
213
  }
173
214
  );
@@ -2,7 +2,15 @@ export declare enum EAccordionSize {
2
2
  M = "m",
3
3
  S = "s"
4
4
  }
5
- export declare enum EAccordionIconSize {
5
+ export declare enum EAccordionButtonType {
6
+ BUTTON = "button",
7
+ LINK = "link"
8
+ }
9
+ export declare enum EAccordionButtonIconSize {
6
10
  M = "ArrowDown24px",
7
11
  S = "ArrowDown16px"
8
12
  }
13
+ export declare enum EAccordionLinkIconSize {
14
+ M = "DropdownArrowDown24px",
15
+ S = "DropdownArrowBottom16px"
16
+ }
@@ -3,12 +3,24 @@ var EAccordionSize = /* @__PURE__ */ ((EAccordionSize2) => {
3
3
  EAccordionSize2["S"] = "s";
4
4
  return EAccordionSize2;
5
5
  })(EAccordionSize || {});
6
- var EAccordionIconSize = /* @__PURE__ */ ((EAccordionIconSize2) => {
7
- EAccordionIconSize2["M"] = "ArrowDown24px";
8
- EAccordionIconSize2["S"] = "ArrowDown16px";
9
- return EAccordionIconSize2;
10
- })(EAccordionIconSize || {});
6
+ var EAccordionButtonType = /* @__PURE__ */ ((EAccordionButtonType2) => {
7
+ EAccordionButtonType2["BUTTON"] = "button";
8
+ EAccordionButtonType2["LINK"] = "link";
9
+ return EAccordionButtonType2;
10
+ })(EAccordionButtonType || {});
11
+ var EAccordionButtonIconSize = /* @__PURE__ */ ((EAccordionButtonIconSize2) => {
12
+ EAccordionButtonIconSize2["M"] = "ArrowDown24px";
13
+ EAccordionButtonIconSize2["S"] = "ArrowDown16px";
14
+ return EAccordionButtonIconSize2;
15
+ })(EAccordionButtonIconSize || {});
16
+ var EAccordionLinkIconSize = /* @__PURE__ */ ((EAccordionLinkIconSize2) => {
17
+ EAccordionLinkIconSize2["M"] = "DropdownArrowDown24px";
18
+ EAccordionLinkIconSize2["S"] = "DropdownArrowBottom16px";
19
+ return EAccordionLinkIconSize2;
20
+ })(EAccordionLinkIconSize || {});
11
21
  export {
12
- EAccordionIconSize,
22
+ EAccordionButtonIconSize,
23
+ EAccordionButtonType,
24
+ EAccordionLinkIconSize,
13
25
  EAccordionSize
14
26
  };
@@ -0,0 +1,13 @@
1
+ import { ComponentProps } from 'react';
2
+ import { ELinkSize, ELinkVariant } from './constants';
3
+ import { TIconProps } from '../../icons';
4
+
5
+ type TProps = ComponentProps<'button'> & {
6
+ variant?: ELinkVariant | `${ELinkVariant}`;
7
+ size?: ELinkSize | `${ELinkSize}`;
8
+ leftIcon?: TIconProps;
9
+ rightIcon?: TIconProps;
10
+ disabled?: boolean;
11
+ };
12
+ export declare const Link: import('react').ForwardRefExoticComponent<Omit<TProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
13
+ export {};