mimir-ui-kit 1.35.4 → 1.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{Input-B-gKQ9FT.js → Input-DlGNMuUD.js} +67 -64
  2. package/dist/assets/Input.css +1 -1
  3. package/dist/assets/ListPhotos.css +1 -1
  4. package/dist/assets/MultiSelectSearch.css +1 -0
  5. package/dist/assets/SelectSearch.css +1 -1
  6. package/dist/combobox-CDU06zJj.js +2855 -0
  7. package/dist/components/Accordion/Accordion.js +168 -166
  8. package/dist/components/Button/Button.d.ts +36 -0
  9. package/dist/components/Button/Button.js +44 -43
  10. package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +2 -0
  11. package/dist/components/CheckboxMimir/CheckboxMimir.js +37 -30
  12. package/dist/components/Chip/Chip.d.ts +5 -1
  13. package/dist/components/Chip/Chip.js +23 -22
  14. package/dist/components/DatePicker/DatePicker.js +1 -1
  15. package/dist/components/Input/Input.js +1 -1
  16. package/dist/components/Input/index.js +1 -1
  17. package/dist/components/InputPassword/InputPassword.js +1 -1
  18. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  19. package/dist/components/ListPhotos/ListPhotos.js +4 -4
  20. package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +22 -0
  21. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +318 -0
  22. package/dist/components/MultiSelectSearch/constants.d.ts +4 -0
  23. package/dist/components/MultiSelectSearch/constants.js +4 -0
  24. package/dist/components/MultiSelectSearch/index.d.ts +3 -0
  25. package/dist/components/MultiSelectSearch/index.js +6 -0
  26. package/dist/components/MultiSelectSearch/types.d.ts +60 -0
  27. package/dist/components/MultiSelectSearch/utils.d.ts +8 -0
  28. package/dist/components/MultiSelectSearch/utils.js +19 -0
  29. package/dist/components/OtpInput/OtpInput.js +1 -1
  30. package/dist/components/SelectSearch/SelectSearch.js +172 -3017
  31. package/dist/components/SelectSearch/utils.d.ts +5 -0
  32. package/dist/components/SelectSearch/utils.js +17 -0
  33. package/dist/components/Switcher/Switcher.js +48 -48
  34. package/dist/components/TabTrail/TabTrail.js +171 -171
  35. package/dist/components/TextArea/TextArea.js +1 -1
  36. package/dist/components/index.d.ts +3 -0
  37. package/dist/components/index.js +48 -44
  38. package/dist/index.js +50 -46
  39. package/dist/open-closed-CdldUPoq.js +86 -0
  40. package/dist/use-resolve-button-type-DhFdPxnv.js +12 -0
  41. package/package.json +3 -2
  42. package/dist/open-closed-Cy6VDfYc.js +0 -93
  43. package/dist/use-resolve-button-type-BAxjHhds.js +0 -19
@@ -1,129 +1,131 @@
1
- import { jsxs as A, Fragment as X, jsx as E } from "react/jsx-runtime";
2
- import { c as h } from "../../index-DIxK0V-G.js";
3
- import S, { createContext as F, useRef as O, Fragment as oe, useReducer as ue, useMemo as M, useId as re, useEffect as le, useContext as H, forwardRef as de, useState as pe } from "react";
4
- import { AccordionItem as fe } from "./AccordionItem/AccordionItem.js";
5
- import { EAccordionButtonType as T, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as me, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
6
- import { useMediaQuery as ke } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
- import { EMediaQuery as _e } from "../../hooks/useMediaQuery/constants.js";
8
- import { Icon as Ie } from "../../icons/Icon.js";
9
- import { Link as Pe } from "../AnchorLink/Link.js";
10
- import { M as ee, W as K, y as q, T as Se, o as x, a as V, H as W, I as se, $ as be, b as ve, D as te, u as ye, c as w } from "../../keyboard-B0lm_zyn.js";
11
- import { w as Ee } from "../../use-active-press-86hajhdd.js";
12
- import { T as he } from "../../use-resolve-button-type-BAxjHhds.js";
13
- import { c as De, i as L, u as $e, V as ge, A as Te, s as we } from "../../open-closed-Cy6VDfYc.js";
1
+ import { jsxs as x, Fragment as X, jsx as v } from "react/jsx-runtime";
2
+ import { c as D } from "../../index-DIxK0V-G.js";
3
+ import S, { createContext as F, useRef as oe, Fragment as ne, useReducer as de, useMemo as R, useId as re, useEffect as le, useState as se, useContext as L, forwardRef as pe } from "react";
4
+ import { AccordionItem as me } from "./AccordionItem/AccordionItem.js";
5
+ import { EAccordionButtonType as w, EAccordionSize as O, EAccordionLinkIconSize as G, EAccordionButtonStyle as fe, EAccordionIconType as J, EAccordionButtonIconSize as Y } from "./constants.js";
6
+ import { useMediaQuery as _e } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
+ import { EMediaQuery as Ee } from "../../hooks/useMediaQuery/constants.js";
8
+ import { Icon as ke } from "../../icons/Icon.js";
9
+ import { Link as Se } from "../AnchorLink/Link.js";
10
+ import { M as Z, W as K, y as U, T as Ie, o as $, a as q, H as j, I as ae, $ as be, b as ve, D as ee, u as he, c as N } from "../../keyboard-B0lm_zyn.js";
11
+ import { w as ye } from "../../use-active-press-86hajhdd.js";
12
+ import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
13
+ import { c as $e, i as M, u as Pe, R as ge, H as Te, s as we } from "../../open-closed-CdldUPoq.js";
14
14
  import { r as Ne } from "../../bugs-diTMAGNw.js";
15
- import '../../assets/Accordion.css';let Re = F(() => {
15
+ import '../../assets/Accordion.css';let Ce = F(() => {
16
16
  });
17
- function Ce({ value: e, children: t }) {
18
- return S.createElement(Re.Provider, { value: e }, t);
17
+ function Be({ value: e, children: t }) {
18
+ return S.createElement(Ce.Provider, { value: e }, t);
19
19
  }
20
- var ne;
21
- let Ae = (ne = S.startTransition) != null ? ne : function(e) {
20
+ var te;
21
+ let Ae = (te = S.startTransition) != null ? te : function(e) {
22
22
  e();
23
23
  };
24
- var Be = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Be || {}), Oe = ((e) => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.LinkPanel = 4] = "LinkPanel", e[e.UnlinkPanel = 5] = "UnlinkPanel", e))(Oe || {});
25
- let xe = { 0: (e) => ({ ...e, disclosureState: V(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 4(e) {
26
- return e.linkedPanel === !0 ? e : { ...e, linkedPanel: !0 };
27
- }, 5(e) {
28
- return e.linkedPanel === !1 ? e : { ...e, linkedPanel: !1 };
29
- }, 2(e, t) {
24
+ var xe = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(xe || {}), Oe = ((e) => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.SetButtonElement = 4] = "SetButtonElement", e[e.SetPanelElement = 5] = "SetPanelElement", e))(Oe || {});
25
+ let Re = { 0: (e) => ({ ...e, disclosureState: q(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 2(e, t) {
30
26
  return e.buttonId === t.buttonId ? e : { ...e, buttonId: t.buttonId };
31
27
  }, 3(e, t) {
32
28
  return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
33
- } }, j = F(null);
34
- j.displayName = "DisclosureContext";
29
+ }, 4(e, t) {
30
+ return e.buttonElement === t.element ? e : { ...e, buttonElement: t.element };
31
+ }, 5(e, t) {
32
+ return e.panelElement === t.element ? e : { ...e, panelElement: t.element };
33
+ } }, W = F(null);
34
+ W.displayName = "DisclosureContext";
35
35
  function Q(e) {
36
- let t = H(j);
36
+ let t = L(W);
37
37
  if (t === null) {
38
- let s = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
39
- throw Error.captureStackTrace && Error.captureStackTrace(s, Q), s;
38
+ let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
39
+ throw Error.captureStackTrace && Error.captureStackTrace(a, Q), a;
40
40
  }
41
41
  return t;
42
42
  }
43
- let z = F(null);
44
- z.displayName = "DisclosureAPIContext";
45
- function ae(e) {
46
- let t = H(z);
43
+ let V = F(null);
44
+ V.displayName = "DisclosureAPIContext";
45
+ function ce(e) {
46
+ let t = L(V);
47
47
  if (t === null) {
48
- let s = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
49
- throw Error.captureStackTrace && Error.captureStackTrace(s, ae), s;
48
+ let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
49
+ throw Error.captureStackTrace && Error.captureStackTrace(a, ce), a;
50
50
  }
51
51
  return t;
52
52
  }
53
- let G = F(null);
54
- G.displayName = "DisclosurePanelContext";
53
+ let z = F(null);
54
+ z.displayName = "DisclosurePanelContext";
55
55
  function Me() {
56
- return H(G);
56
+ return L(z);
57
57
  }
58
- function Le(e, t) {
59
- return V(t.type, xe, e, t);
58
+ function Fe(e, t) {
59
+ return q(t.type, Re, e, t);
60
60
  }
61
- let Fe = oe;
62
- function Ue(e, t) {
63
- let { defaultOpen: s = !1, ...p } = e, o = O(null), f = q(t, Se((r) => {
64
- o.current = r;
65
- }, e.as === void 0 || e.as === oe)), d = O(null), n = O(null), l = ue(Le, { disclosureState: s ? 0 : 1, linkedPanel: !1, buttonRef: n, panelRef: d, buttonId: null, panelId: null }), [{ disclosureState: m, buttonId: a }, k] = l, i = x((r) => {
61
+ let He = ne;
62
+ function Le(e, t) {
63
+ let { defaultOpen: a = !1, ...d } = e, n = oe(null), p = U(t, Ie((c) => {
64
+ n.current = c;
65
+ }, e.as === void 0 || e.as === ne)), m = de(Fe, { disclosureState: a ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o, buttonId: r }, k] = m, l = $((c) => {
66
66
  k({ type: 1 });
67
- let P = ye(o);
68
- if (!P || !a) return;
69
- let v = r ? r instanceof HTMLElement ? r : r.current instanceof HTMLElement ? r.current : P.getElementById(a) : P.getElementById(a);
70
- v == null || v.focus();
71
- }), _ = M(() => ({ close: i }), [i]), I = M(() => ({ open: m === 0, close: i }), [m, i]), b = { ref: f };
72
- return S.createElement(j.Provider, { value: l }, S.createElement(z.Provider, { value: _ }, S.createElement(Ce, { value: i }, S.createElement(De, { value: V(m, { 0: L.Open, 1: L.Closed }) }, W({ ourProps: b, theirProps: p, slot: I, defaultTag: Fe, name: "Disclosure" })))));
67
+ let E = he(n);
68
+ if (!E || !r) return;
69
+ let u = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : E.getElementById(r) : E.getElementById(r);
70
+ u == null || u.focus();
71
+ }), I = R(() => ({ close: l }), [l]), f = R(() => ({ open: o === 0, close: l }), [o, l]), _ = { ref: p };
72
+ return S.createElement(W.Provider, { value: m }, S.createElement(V.Provider, { value: I }, S.createElement(Be, { value: l }, S.createElement($e, { value: q(o, { 0: M.Open, 1: M.Closed }) }, j({ ourProps: _, theirProps: d, slot: f, defaultTag: He, name: "Disclosure" })))));
73
73
  }
74
- let He = "button";
75
- function Ke(e, t) {
76
- let s = re(), { id: p = `headlessui-disclosure-button-${s}`, disabled: o = !1, autoFocus: f = !1, ...d } = e, [n, l] = Q("Disclosure.Button"), m = Me(), a = m === null ? !1 : m === n.panelId, k = O(null), i = q(k, t, a ? null : n.buttonRef), _ = se();
74
+ let Ke = "button";
75
+ function Ue(e, t) {
76
+ let a = re(), { id: d = `headlessui-disclosure-button-${a}`, disabled: n = !1, autoFocus: p = !1, ...m } = e, [o, r] = Q("Disclosure.Button"), k = Me(), l = k === null ? !1 : k === o.panelId, I = oe(null), f = U(I, t, $((s) => {
77
+ if (!l) return r({ type: 4, element: s });
78
+ })), _ = ae();
77
79
  le(() => {
78
- if (!a) return l({ type: 2, buttonId: p }), () => {
79
- l({ type: 2, buttonId: null });
80
+ if (!l) return r({ type: 2, buttonId: d }), () => {
81
+ r({ type: 2, buttonId: null });
80
82
  };
81
- }, [p, l, a]);
82
- let I = x((u) => {
83
- var g;
84
- if (a) {
85
- if (n.disclosureState === 1) return;
86
- switch (u.key) {
87
- case w.Space:
88
- case w.Enter:
89
- u.preventDefault(), u.stopPropagation(), l({ type: 0 }), (g = n.buttonRef.current) == null || g.focus();
83
+ }, [d, r, l]);
84
+ let c = $((s) => {
85
+ var T;
86
+ if (l) {
87
+ if (o.disclosureState === 1) return;
88
+ switch (s.key) {
89
+ case N.Space:
90
+ case N.Enter:
91
+ s.preventDefault(), s.stopPropagation(), r({ type: 0 }), (T = o.buttonElement) == null || T.focus();
90
92
  break;
91
93
  }
92
- } else switch (u.key) {
93
- case w.Space:
94
- case w.Enter:
95
- u.preventDefault(), u.stopPropagation(), l({ type: 0 });
94
+ } else switch (s.key) {
95
+ case N.Space:
96
+ case N.Enter:
97
+ s.preventDefault(), s.stopPropagation(), r({ type: 0 });
96
98
  break;
97
99
  }
98
- }), b = x((u) => {
99
- switch (u.key) {
100
- case w.Space:
101
- u.preventDefault();
100
+ }), E = $((s) => {
101
+ switch (s.key) {
102
+ case N.Space:
103
+ s.preventDefault();
102
104
  break;
103
105
  }
104
- }), r = x((u) => {
105
- var g;
106
- Ne(u.currentTarget) || o || (a ? (l({ type: 0 }), (g = n.buttonRef.current) == null || g.focus()) : l({ type: 0 }));
107
- }), { isFocusVisible: P, focusProps: v } = be({ autoFocus: f }), { isHovered: y, hoverProps: D } = ve({ isDisabled: o }), { pressed: N, pressProps: R } = Ee({ disabled: o }), U = M(() => ({ open: n.disclosureState === 0, hover: y, active: N, disabled: o, focus: P, autofocus: f }), [n, y, N, P, o, f]), C = he(e, k), $ = a ? te({ ref: i, type: C, disabled: o || void 0, autoFocus: f, onKeyDown: I, onClick: r }, v, D, R) : te({ ref: i, id: p, type: C, "aria-expanded": n.disclosureState === 0, "aria-controls": n.linkedPanel ? n.panelId : void 0, disabled: o || void 0, autoFocus: f, onKeyDown: I, onKeyUp: b, onClick: r }, v, D, R);
108
- return W({ mergeRefs: _, ourProps: $, theirProps: d, slot: U, defaultTag: He, name: "Disclosure.Button" });
106
+ }), u = $((s) => {
107
+ var T;
108
+ Ne(s.currentTarget) || n || (l ? (r({ type: 0 }), (T = o.buttonElement) == null || T.focus()) : r({ type: 0 }));
109
+ }), { isFocusVisible: h, focusProps: y } = be({ autoFocus: p }), { isHovered: b, hoverProps: P } = ve({ isDisabled: n }), { pressed: C, pressProps: B } = ye({ disabled: n }), H = R(() => ({ open: o.disclosureState === 0, hover: b, active: C, disabled: n, focus: h, autofocus: p }), [o, b, C, h, n, p]), A = De(e, o.buttonElement), g = l ? ee({ ref: f, type: A, disabled: n || void 0, autoFocus: p, onKeyDown: c, onClick: u }, y, P, B) : ee({ ref: f, id: d, type: A, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: n || void 0, autoFocus: p, onKeyDown: c, onKeyUp: E, onClick: u }, y, P, B);
110
+ return j({ mergeRefs: _, ourProps: g, theirProps: m, slot: H, defaultTag: Ke, name: "Disclosure.Button" });
109
111
  }
110
- let qe = "div", Ve = ee.RenderStrategy | ee.Static;
112
+ let qe = "div", je = Z.RenderStrategy | Z.Static;
111
113
  function We(e, t) {
112
- let s = re(), { id: p = `headlessui-disclosure-panel-${s}`, transition: o = !1, ...f } = e, [d, n] = Q("Disclosure.Panel"), { close: l } = ae("Disclosure.Panel"), m = se(), a = q(t, d.panelRef, (r) => {
113
- Ae(() => n({ type: r ? 4 : 5 }));
114
- });
115
- le(() => (n({ type: 3, panelId: p }), () => {
116
- n({ type: 3, panelId: null });
117
- }), [p, n]);
118
- let k = $e(), [i, _] = ge(o, d.panelRef, k !== null ? (k & L.Open) === L.Open : d.disclosureState === 0), I = M(() => ({ open: d.disclosureState === 0, close: l }), [d.disclosureState, l]), b = { ref: a, id: p, ...Te(_) };
119
- return S.createElement(we, null, S.createElement(G.Provider, { value: d.panelId }, W({ mergeRefs: m, ourProps: b, theirProps: f, slot: I, defaultTag: qe, features: Ve, visible: i, name: "Disclosure.Panel" })));
114
+ let a = re(), { id: d = `headlessui-disclosure-panel-${a}`, transition: n = !1, ...p } = e, [m, o] = Q("Disclosure.Panel"), { close: r } = ce("Disclosure.Panel"), k = ae(), [l, I] = se(null), f = U(t, $((y) => {
115
+ Ae(() => o({ type: 5, element: y }));
116
+ }), I);
117
+ le(() => (o({ type: 3, panelId: d }), () => {
118
+ o({ type: 3, panelId: null });
119
+ }), [d, o]);
120
+ let _ = Pe(), [c, E] = ge(n, l, _ !== null ? (_ & M.Open) === M.Open : m.disclosureState === 0), u = R(() => ({ open: m.disclosureState === 0, close: r }), [m.disclosureState, r]), h = { ref: f, id: d, ...Te(E) };
121
+ return S.createElement(we, null, S.createElement(z.Provider, { value: m.panelId }, j({ mergeRefs: k, ourProps: h, theirProps: p, slot: u, defaultTag: qe, features: je, visible: c, name: "Disclosure.Panel" })));
120
122
  }
121
- let je = K(Ue), ce = K(Ke), ie = K(We), Qe = Object.assign(je, { Button: ce, Panel: ie });
122
- const ze = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Xe = "_disabled_1k9to_25", Je = "_title_1k9to_29", Ye = "_icon_1k9to_36", Ze = "_circle_1k9to_46", et = "_square_1k9to_53", tt = "_panel_1k9to_73", nt = "_open_1k9to_80", ot = "_m_1k9to_106", rt = "_s_1k9to_53", c = {
123
+ let Qe = K(Le), ie = K(Ue), ue = K(We), Ve = Object.assign(Qe, { Button: ie, Panel: ue });
124
+ const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_25", Je = "_title_1k9to_29", Ye = "_icon_1k9to_36", Ze = "_circle_1k9to_46", et = "_square_1k9to_53", tt = "_panel_1k9to_73", ot = "_open_1k9to_80", nt = "_m_1k9to_106", rt = "_s_1k9to_53", i = {
123
125
  accordion: ze,
124
126
  "is-link": "_is-link_1k9to_9",
125
- header: Ge,
126
- disabled: Xe,
127
+ header: Xe,
128
+ disabled: Ge,
127
129
  title: Je,
128
130
  "title-uppercase": "_title-uppercase_1k9to_32",
129
131
  icon: Ye,
@@ -131,76 +133,76 @@ const ze = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Xe = "_disabled_1k9to_
131
133
  circle: Ze,
132
134
  square: et,
133
135
  panel: tt,
134
- open: nt,
136
+ open: ot,
135
137
  "link-open": "_link-open_1k9to_102",
136
- m: ot,
138
+ m: nt,
137
139
  s: rt,
138
140
  "wrapper-button": "_wrapper-button_1k9to_134"
139
- }, St = de(
141
+ }, It = pe(
140
142
  ({
141
143
  title: e,
142
144
  disabled: t,
143
- buttonType: s = T.BUTTON,
144
- children: p,
145
- size: o = B.M,
146
- titleUppercase: f,
147
- buttonStyle: d = me.CIRCLE,
148
- iconType: n = Y.ARROW,
149
- classNameTitle: l,
150
- classNameContent: m,
151
- classNameAccordion: a,
152
- classNameIconButton: k,
153
- subtitleNode: i,
145
+ buttonType: a = w.BUTTON,
146
+ children: d,
147
+ size: n = O.M,
148
+ titleUppercase: p,
149
+ buttonStyle: m = fe.CIRCLE,
150
+ iconType: o = J.ARROW,
151
+ classNameTitle: r,
152
+ classNameContent: k,
153
+ classNameAccordion: l,
154
+ classNameIconButton: I,
155
+ subtitleNode: f,
154
156
  onlyOpenSubtitleNode: _,
155
- classNameSubtitleContainer: I
156
- }, b) => {
157
- const [r, P] = pe(!1), v = ke(_e.XS1), y = s === T.LINK, D = {
158
- [c["is-link"]]: y
159
- }, N = () => {
160
- t || P(($) => !$);
161
- }, R = o === B.S ? J.S : J.M, U = {
157
+ classNameSubtitleContainer: c
158
+ }, E) => {
159
+ const [u, h] = se(!1), y = _e(Ee.XS1), b = a === w.LINK, P = {
160
+ [i["is-link"]]: b
161
+ }, C = () => {
162
+ t || h((g) => !g);
163
+ }, B = n === O.S ? G.S : G.M, H = {
162
164
  variant: "anchor",
163
- size: v ? "s" : "l",
165
+ size: y ? "s" : "l",
164
166
  rightIcon: {
165
- iconName: R,
166
- className: h({
167
- [c["link-open"]]: r
167
+ iconName: B,
168
+ className: D({
169
+ [i["link-open"]]: u
168
170
  })
169
171
  }
170
- }, C = ($) => {
171
- const u = () => n === Y.DROPDOWN ? o === B.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : o === B.S ? Z.S : Z.M;
172
- switch (s) {
173
- case T.LINK:
172
+ }, A = (g) => {
173
+ const s = () => o === J.DROPDOWN ? n === O.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : n === O.S ? Y.S : Y.M;
174
+ switch (a) {
175
+ case w.LINK:
174
176
  return e;
175
- case T.BUTTON:
176
- return /* @__PURE__ */ A(X, { children: [
177
- /* @__PURE__ */ E(
177
+ case w.BUTTON:
178
+ return /* @__PURE__ */ x(X, { children: [
179
+ /* @__PURE__ */ v(
178
180
  "span",
179
181
  {
180
- className: h(
181
- c.title,
182
- l,
183
- f && c["title-uppercase"]
182
+ className: D(
183
+ i.title,
184
+ r,
185
+ p && i["title-uppercase"]
184
186
  ),
185
187
  children: e
186
188
  }
187
189
  ),
188
- /* @__PURE__ */ E(
190
+ /* @__PURE__ */ v(
189
191
  "div",
190
192
  {
191
- className: h(
192
- c["icon-container"],
193
- $ && c.open,
194
- t && c.disabled,
195
- c[d],
196
- k
193
+ className: D(
194
+ i["icon-container"],
195
+ g && i.open,
196
+ t && i.disabled,
197
+ i[m],
198
+ I
197
199
  ),
198
200
  "data-testid": "accordion-icon-container",
199
- children: /* @__PURE__ */ E(
200
- Ie,
201
+ children: /* @__PURE__ */ v(
202
+ ke,
201
203
  {
202
- iconName: u(),
203
- className: c.icon,
204
+ iconName: s(),
205
+ className: i.icon,
204
206
  "data-testid": "accordion-icon"
205
207
  }
206
208
  )
@@ -211,53 +213,53 @@ const ze = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Xe = "_disabled_1k9to_
211
213
  return null;
212
214
  }
213
215
  };
214
- return /* @__PURE__ */ A(X, { children: [
215
- /* @__PURE__ */ E(
216
+ return /* @__PURE__ */ x(X, { children: [
217
+ /* @__PURE__ */ v(
216
218
  "div",
217
219
  {
218
- className: h(
219
- c.accordion,
220
- c[o],
221
- D,
222
- a
220
+ className: D(
221
+ i.accordion,
222
+ i[n],
223
+ P,
224
+ l
223
225
  ),
224
- children: /* @__PURE__ */ A(Qe, { ref: b, children: [
225
- /* @__PURE__ */ E(
226
- ce,
226
+ children: /* @__PURE__ */ x(Ve, { ref: E, children: [
227
+ /* @__PURE__ */ v(
228
+ ie,
227
229
  {
228
230
  disabled: t,
229
- as: y ? Pe : T.BUTTON,
230
- onClick: N,
231
- className: h({
232
- [c.header]: !y,
233
- [c.disabled]: t
231
+ as: b ? Se : w.BUTTON,
232
+ onClick: C,
233
+ className: D({
234
+ [i.header]: !b,
235
+ [i.disabled]: t
234
236
  }),
235
- ...y ? U : {},
236
- children: C(r)
237
+ ...b ? H : {},
238
+ children: A(u)
237
239
  }
238
240
  ),
239
- r && /* @__PURE__ */ E(
240
- ie,
241
+ u && /* @__PURE__ */ v(
242
+ ue,
241
243
  {
242
244
  "data-testid": "accordion-panel",
243
- className: h(
244
- c.panel,
245
- m,
246
- D
245
+ className: D(
246
+ i.panel,
247
+ k,
248
+ P
247
249
  ),
248
- children: /* @__PURE__ */ E(fe, { size: o, children: p })
250
+ children: /* @__PURE__ */ v(me, { size: n, children: d })
249
251
  }
250
252
  )
251
253
  ] })
252
254
  }
253
255
  ),
254
- (i || _) && /* @__PURE__ */ A("div", { className: I, children: [
255
- i,
256
- r && _
256
+ (f || _) && /* @__PURE__ */ x("div", { className: c, children: [
257
+ f,
258
+ u && _
257
259
  ] })
258
260
  ] });
259
261
  }
260
262
  );
261
263
  export {
262
- St as Accordion
264
+ It as Accordion
263
265
  };
@@ -7,6 +7,10 @@ export type TProps = TCommonButtonProps & ComponentProps<'button'> & {
7
7
  * Класс, применяемый к корневому элементу кнопки.
8
8
  */
9
9
  className?: string;
10
+ /**
11
+ * Класс, применяемый к иконке.
12
+ */
13
+ iconButtonClassName?: string;
10
14
  /**
11
15
  * Флаг, указывающий, отключена ли кнопка.
12
16
  */
@@ -41,6 +45,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
41
45
  * Класс, применяемый к корневому элементу кнопки.
42
46
  */
43
47
  className?: string;
48
+ /**
49
+ * Класс, применяемый к иконке.
50
+ */
51
+ iconButtonClassName?: string;
44
52
  /**
45
53
  * Флаг, указывающий, отключена ли кнопка.
46
54
  */
@@ -71,6 +79,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
71
79
  * Класс, применяемый к корневому элементу кнопки.
72
80
  */
73
81
  className?: string;
82
+ /**
83
+ * Класс, применяемый к иконке.
84
+ */
85
+ iconButtonClassName?: string;
74
86
  /**
75
87
  * Флаг, указывающий, отключена ли кнопка.
76
88
  */
@@ -101,6 +113,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
101
113
  * Класс, применяемый к корневому элементу кнопки.
102
114
  */
103
115
  className?: string;
116
+ /**
117
+ * Класс, применяемый к иконке.
118
+ */
119
+ iconButtonClassName?: string;
104
120
  /**
105
121
  * Флаг, указывающий, отключена ли кнопка.
106
122
  */
@@ -131,6 +147,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
131
147
  * Класс, применяемый к корневому элементу кнопки.
132
148
  */
133
149
  className?: string;
150
+ /**
151
+ * Класс, применяемый к иконке.
152
+ */
153
+ iconButtonClassName?: string;
134
154
  /**
135
155
  * Флаг, указывающий, отключена ли кнопка.
136
156
  */
@@ -161,6 +181,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
161
181
  * Класс, применяемый к корневому элементу кнопки.
162
182
  */
163
183
  className?: string;
184
+ /**
185
+ * Класс, применяемый к иконке.
186
+ */
187
+ iconButtonClassName?: string;
164
188
  /**
165
189
  * Флаг, указывающий, отключена ли кнопка.
166
190
  */
@@ -191,6 +215,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
191
215
  * Класс, применяемый к корневому элементу кнопки.
192
216
  */
193
217
  className?: string;
218
+ /**
219
+ * Класс, применяемый к иконке.
220
+ */
221
+ iconButtonClassName?: string;
194
222
  /**
195
223
  * Флаг, указывающий, отключена ли кнопка.
196
224
  */
@@ -221,6 +249,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
221
249
  * Класс, применяемый к корневому элементу кнопки.
222
250
  */
223
251
  className?: string;
252
+ /**
253
+ * Класс, применяемый к иконке.
254
+ */
255
+ iconButtonClassName?: string;
224
256
  /**
225
257
  * Флаг, указывающий, отключена ли кнопка.
226
258
  */
@@ -251,6 +283,10 @@ export declare const Button: import('react').ForwardRefExoticComponent<(Omit<imp
251
283
  * Класс, применяемый к корневому элементу кнопки.
252
284
  */
253
285
  className?: string;
286
+ /**
287
+ * Класс, применяемый к иконке.
288
+ */
289
+ iconButtonClassName?: string;
254
290
  /**
255
291
  * Флаг, указывающий, отключена ли кнопка.
256
292
  */