mimir-ui-kit 1.37.3 → 1.37.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/dist/assets/styles.css +1 -1
  2. package/dist/{combobox-BpYucpxz.js → combobox-CDU06zJj.js} +1080 -1121
  3. package/dist/components/Accordion/Accordion.d.ts +10 -3
  4. package/dist/components/Accordion/Accordion.js +144 -139
  5. package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
  6. package/dist/components/DatePicker/DatePicker.d.ts +4 -4
  7. package/dist/components/DatePicker/DatePicker.js +102 -99
  8. package/dist/components/DatePicker/DatePickerModal.js +1 -1
  9. package/dist/components/DatePicker/MonthPickerModal.js +1 -1
  10. package/dist/components/DatePicker/YearPickerModal.js +1 -1
  11. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +22 -22
  12. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  13. package/dist/components/SelectSearch/SelectSearch.js +24 -24
  14. package/dist/components/Switcher/Switcher.js +4 -4
  15. package/dist/components/TabTrail/TabTrail.js +4 -4
  16. package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
  17. package/dist/{focus-management-DOYCPyGg.js → focus-management-XwV-9qkO.js} +1 -1
  18. package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
  19. package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
  20. package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
  21. package/dist/open-closed-CdldUPoq.js +86 -0
  22. package/dist/styles.module-CPvzaOtD.js +27 -0
  23. package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
  24. package/package.json +1 -1
  25. package/dist/open-closed-D2VjDhAN.js +0 -86
  26. package/dist/styles.module-B3xL6-zc.js +0 -25
@@ -1,6 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { EAccordionButtonStyle, EAccordionButtonType, EAccordionIconType, EAccordionSize } from './constants';
3
3
 
4
+ type TChildrenProps = {
5
+ open?: boolean;
6
+ close?: () => void;
7
+ };
4
8
  export type TProps = {
5
9
  /** Заголовок аккордеона */
6
10
  title: string;
@@ -28,9 +32,12 @@ export type TProps = {
28
32
  onlyOpenSubtitleNode?: ReactNode;
29
33
  /** Дополнительный класс для контейнера subtitle */
30
34
  classNameSubtitleContainer?: string;
35
+ /** Дополнительный класс для аккордиона с типом link */
36
+ linkClassName?: string;
31
37
  /** Флаг, указывающий, отключен ли аккордеон. */
32
38
  disabled?: boolean;
39
+ /** Контент аккордеона. */
40
+ children?: ReactNode | ((props: TChildrenProps) => ReactNode);
33
41
  };
34
- export declare const Accordion: import('react').ForwardRefExoticComponent<TProps & {
35
- children?: ReactNode | undefined;
36
- } & import('react').RefAttributes<HTMLElement>>;
42
+ export declare const Accordion: import('react').ForwardRefExoticComponent<TProps & import('react').RefAttributes<HTMLElement>>;
43
+ export {};
@@ -1,28 +1,28 @@
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 H, forwardRef as pe } from "react";
1
+ import { jsxs as A, Fragment as L, jsx as b } from "react/jsx-runtime";
2
+ import { c as $ } from "../../index-DIxK0V-G.js";
3
+ import v, { createContext as M, useRef as oe, Fragment as ne, useReducer as de, useMemo as O, useId as re, useEffect as le, useState as se, useContext as K, forwardRef as pe } from "react";
4
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";
5
+ import { EAccordionButtonType as T, EAccordionSize as x, EAccordionLinkIconSize as G, EAccordionButtonStyle as fe, EAccordionIconType as J, EAccordionButtonIconSize as Y } from "./constants.js";
6
6
  import { useMediaQuery as _e } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
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-mgWkd2Vh.js";
11
- import { w as ye } from "../../use-active-press-CqLGIFz7.js";
8
+ import { Icon as Se } from "../../icons/Icon.js";
9
+ import { Link as ke } from "../AnchorLink/Link.js";
10
+ import { M as Z, W as U, y as q, T as Ie, o as P, a as j, H as W, I as ae, $ as be, b as ve, D as ee, u as ye, c as w } from "../../keyboard-B0lm_zyn.js";
11
+ import { w as he } from "../../use-active-press-86hajhdd.js";
12
12
  import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
13
- import { c as $e, i as M, u as Pe, x as ge, R as Te, s as we } from "../../open-closed-D2VjDhAN.js";
13
+ import { c as $e, i as R, 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 Ce = F(() => {
15
+ import '../../assets/Accordion.css';let Be = M(() => {
16
16
  });
17
- function Be({ value: e, children: t }) {
18
- return S.createElement(Ce.Provider, { value: e }, t);
17
+ function Ce({ value: e, children: t }) {
18
+ return v.createElement(Be.Provider, { value: e }, t);
19
19
  }
20
20
  var te;
21
- let Ae = (te = S.startTransition) != null ? te : function(e) {
21
+ let Ae = (te = v.startTransition) != null ? te : function(e) {
22
22
  e();
23
23
  };
24
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) {
25
+ let Re = { 0: (e) => ({ ...e, disclosureState: j(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 2(e, t) {
26
26
  return e.buttonId === t.buttonId ? e : { ...e, buttonId: t.buttonId };
27
27
  }, 3(e, t) {
28
28
  return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
@@ -30,98 +30,98 @@ let Re = { 0: (e) => ({ ...e, disclosureState: q(e.disclosureState, { 0: 1, 1: 0
30
30
  return e.buttonElement === t.element ? e : { ...e, buttonElement: t.element };
31
31
  }, 5(e, t) {
32
32
  return e.panelElement === t.element ? e : { ...e, panelElement: t.element };
33
- } }, W = F(null);
34
- W.displayName = "DisclosureContext";
35
- function Q(e) {
36
- let t = H(W);
33
+ } }, Q = M(null);
34
+ Q.displayName = "DisclosureContext";
35
+ function V(e) {
36
+ let t = K(Q);
37
37
  if (t === null) {
38
- let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
39
- throw Error.captureStackTrace && Error.captureStackTrace(a, Q), a;
38
+ let i = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
39
+ throw Error.captureStackTrace && Error.captureStackTrace(i, V), i;
40
40
  }
41
41
  return t;
42
42
  }
43
- let V = F(null);
44
- V.displayName = "DisclosureAPIContext";
43
+ let z = M(null);
44
+ z.displayName = "DisclosureAPIContext";
45
45
  function ce(e) {
46
- let t = H(V);
46
+ let t = K(z);
47
47
  if (t === null) {
48
- let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
49
- throw Error.captureStackTrace && Error.captureStackTrace(a, ce), a;
48
+ let i = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
49
+ throw Error.captureStackTrace && Error.captureStackTrace(i, ce), i;
50
50
  }
51
51
  return t;
52
52
  }
53
- let z = F(null);
54
- z.displayName = "DisclosurePanelContext";
53
+ let X = M(null);
54
+ X.displayName = "DisclosurePanelContext";
55
55
  function Me() {
56
- return H(z);
56
+ return K(X);
57
57
  }
58
58
  function Fe(e, t) {
59
- return q(t.type, Re, e, t);
59
+ return j(t.type, Re, e, t);
60
60
  }
61
- let Le = ne;
62
- function He(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
- k({ type: 1 });
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: Le, name: "Disclosure" })))));
61
+ let He = ne;
62
+ function Le(e, t) {
63
+ let { defaultOpen: i = !1, ...d } = e, s = oe(null), a = q(t, Ie((c) => {
64
+ s.current = c;
65
+ }, e.as === void 0 || e.as === ne)), p = de(Fe, { disclosureState: i ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o, buttonId: r }, S] = p, l = P((c) => {
66
+ S({ type: 1 });
67
+ let f = ye(s);
68
+ if (!f || !r) return;
69
+ let _ = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : f.getElementById(r) : f.getElementById(r);
70
+ _ == null || _.focus();
71
+ }), y = O(() => ({ close: l }), [l]), k = O(() => ({ open: o === 0, close: l }), [o, l]), m = { ref: a };
72
+ return v.createElement(Q.Provider, { value: p }, v.createElement(z.Provider, { value: y }, v.createElement(Ce, { value: l }, v.createElement($e, { value: j(o, { 0: R.Open, 1: R.Closed }) }, W({ ourProps: m, theirProps: d, slot: k, defaultTag: He, name: "Disclosure" })))));
73
73
  }
74
74
  let Ke = "button";
75
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();
76
+ let i = re(), { id: d = `headlessui-disclosure-button-${i}`, disabled: s = !1, autoFocus: a = !1, ...p } = e, [o, r] = V("Disclosure.Button"), S = Me(), l = S === null ? !1 : S === o.panelId, y = oe(null), k = q(y, t, P((n) => {
77
+ if (!l) return r({ type: 4, element: n });
78
+ })), m = ae();
79
79
  le(() => {
80
80
  if (!l) return r({ type: 2, buttonId: d }), () => {
81
81
  r({ type: 2, buttonId: null });
82
82
  };
83
83
  }, [d, r, l]);
84
- let c = $((s) => {
85
- var T;
84
+ let c = P((n) => {
85
+ var E;
86
86
  if (l) {
87
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();
88
+ switch (n.key) {
89
+ case w.Space:
90
+ case w.Enter:
91
+ n.preventDefault(), n.stopPropagation(), r({ type: 0 }), (E = o.buttonElement) == null || E.focus();
92
92
  break;
93
93
  }
94
- } else switch (s.key) {
95
- case N.Space:
96
- case N.Enter:
97
- s.preventDefault(), s.stopPropagation(), r({ type: 0 });
94
+ } else switch (n.key) {
95
+ case w.Space:
96
+ case w.Enter:
97
+ n.preventDefault(), n.stopPropagation(), r({ type: 0 });
98
98
  break;
99
99
  }
100
- }), E = $((s) => {
101
- switch (s.key) {
102
- case N.Space:
103
- s.preventDefault();
100
+ }), f = P((n) => {
101
+ switch (n.key) {
102
+ case w.Space:
103
+ n.preventDefault();
104
104
  break;
105
105
  }
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 }), L = 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: L, defaultTag: Ke, name: "Disclosure.Button" });
106
+ }), _ = P((n) => {
107
+ var E;
108
+ Ne(n.currentTarget) || s || (l ? (r({ type: 0 }), (E = o.buttonElement) == null || E.focus()) : r({ type: 0 }));
109
+ }), { isFocusVisible: h, focusProps: D } = be({ autoFocus: a }), { isHovered: N, hoverProps: I } = ve({ isDisabled: s }), { pressed: g, pressProps: B } = he({ disabled: s }), F = O(() => ({ open: o.disclosureState === 0, hover: N, active: g, disabled: s, focus: h, autofocus: a }), [o, N, g, h, s, a]), C = De(e, o.buttonElement), H = l ? ee({ ref: k, type: C, disabled: s || void 0, autoFocus: a, onKeyDown: c, onClick: _ }, D, I, B) : ee({ ref: k, id: d, type: C, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: s || void 0, autoFocus: a, onKeyDown: c, onKeyUp: f, onClick: _ }, D, I, B);
110
+ return W({ mergeRefs: m, ourProps: H, theirProps: p, slot: F, defaultTag: Ke, name: "Disclosure.Button" });
111
111
  }
112
112
  let qe = "div", je = Z.RenderStrategy | Z.Static;
113
113
  function We(e, t) {
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);
114
+ let i = re(), { id: d = `headlessui-disclosure-panel-${i}`, transition: s = !1, ...a } = e, [p, o] = V("Disclosure.Panel"), { close: r } = ce("Disclosure.Panel"), S = ae(), [l, y] = se(null), k = q(t, P((D) => {
115
+ Ae(() => o({ type: 5, element: D }));
116
+ }), y);
117
117
  le(() => (o({ type: 3, panelId: d }), () => {
118
118
  o({ type: 3, panelId: null });
119
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
+ let m = Pe(), [c, f] = ge(s, l, m !== null ? (m & R.Open) === R.Open : p.disclosureState === 0), _ = O(() => ({ open: p.disclosureState === 0, close: r }), [p.disclosureState, r]), h = { ref: k, id: d, ...Te(f) };
121
+ return v.createElement(we, null, v.createElement(X.Provider, { value: p.panelId }, W({ mergeRefs: S, ourProps: h, theirProps: a, slot: _, defaultTag: qe, features: je, visible: c, name: "Disclosure.Panel" })));
122
122
  }
123
- let Qe = K(He), 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
+ let Qe = U(Le), ie = U(Ue), ue = U(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", u = {
125
125
  accordion: ze,
126
126
  "is-link": "_is-link_1k9to_9",
127
127
  header: Xe,
@@ -142,67 +142,68 @@ const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_
142
142
  ({
143
143
  title: e,
144
144
  disabled: t,
145
- buttonType: a = w.BUTTON,
145
+ buttonType: i = T.BUTTON,
146
146
  children: d,
147
- size: n = O.M,
147
+ linkClassName: s,
148
+ size: a = x.M,
148
149
  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,
156
- onlyOpenSubtitleNode: _,
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, L = {
150
+ buttonStyle: o = fe.CIRCLE,
151
+ iconType: r = J.ARROW,
152
+ classNameTitle: S,
153
+ classNameContent: l,
154
+ classNameAccordion: y,
155
+ classNameIconButton: k,
156
+ subtitleNode: m,
157
+ onlyOpenSubtitleNode: c,
158
+ classNameSubtitleContainer: f
159
+ }, _) => {
160
+ const [h, D] = se(!1), N = _e(Ee.XS1), I = i === T.LINK, g = {
161
+ [u["is-link"]]: I
162
+ }, B = () => {
163
+ t || D((n) => !n);
164
+ }, F = a === x.S ? G.S : G.M, C = {
164
165
  variant: "anchor",
165
- size: y ? "s" : "l",
166
+ size: N ? "s" : "l",
166
167
  rightIcon: {
167
- iconName: B,
168
- className: D({
169
- [i["link-open"]]: u
168
+ iconName: F,
169
+ className: $({
170
+ [u["link-open"]]: h
170
171
  })
171
172
  }
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:
173
+ }, H = (n) => {
174
+ const E = () => r === J.DROPDOWN ? a === x.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : a === x.S ? Y.S : Y.M;
175
+ switch (i) {
176
+ case T.LINK:
176
177
  return e;
177
- case w.BUTTON:
178
- return /* @__PURE__ */ x(X, { children: [
179
- /* @__PURE__ */ v(
178
+ case T.BUTTON:
179
+ return /* @__PURE__ */ A(L, { children: [
180
+ /* @__PURE__ */ b(
180
181
  "span",
181
182
  {
182
- className: D(
183
- i.title,
184
- r,
185
- p && i["title-uppercase"]
183
+ className: $(
184
+ u.title,
185
+ S,
186
+ p && u["title-uppercase"]
186
187
  ),
187
188
  children: e
188
189
  }
189
190
  ),
190
- /* @__PURE__ */ v(
191
+ /* @__PURE__ */ b(
191
192
  "div",
192
193
  {
193
- className: D(
194
- i["icon-container"],
195
- g && i.open,
196
- t && i.disabled,
197
- i[m],
198
- I
194
+ className: $(
195
+ u["icon-container"],
196
+ n && u.open,
197
+ t && u.disabled,
198
+ u[o],
199
+ k
199
200
  ),
200
201
  "data-testid": "accordion-icon-container",
201
- children: /* @__PURE__ */ v(
202
- ke,
202
+ children: /* @__PURE__ */ b(
203
+ Se,
203
204
  {
204
- iconName: s(),
205
- className: i.icon,
205
+ iconName: E(),
206
+ className: u.icon,
206
207
  "data-testid": "accordion-icon"
207
208
  }
208
209
  )
@@ -213,49 +214,53 @@ const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_
213
214
  return null;
214
215
  }
215
216
  };
216
- return /* @__PURE__ */ x(X, { children: [
217
- /* @__PURE__ */ v(
217
+ return /* @__PURE__ */ A(L, { children: [
218
+ /* @__PURE__ */ b(
218
219
  "div",
219
220
  {
220
- className: D(
221
- i.accordion,
222
- i[n],
223
- P,
224
- l
221
+ className: $(
222
+ u.accordion,
223
+ u[a],
224
+ g,
225
+ y
225
226
  ),
226
- children: /* @__PURE__ */ x(Ve, { ref: E, children: [
227
- /* @__PURE__ */ v(
227
+ children: /* @__PURE__ */ b(Ve, { ref: _, children: ({ open: n, close: E }) => /* @__PURE__ */ A(L, { children: [
228
+ /* @__PURE__ */ b(
228
229
  ie,
229
230
  {
230
231
  disabled: t,
231
- as: b ? Se : w.BUTTON,
232
- onClick: C,
233
- className: D({
234
- [i.header]: !b,
235
- [i.disabled]: t
232
+ as: I ? ke : T.BUTTON,
233
+ onClick: B,
234
+ className: $({
235
+ [u.header]: !I,
236
+ [u.disabled]: t,
237
+ [s ?? ""]: I && s
236
238
  }),
237
- ...b ? L : {},
238
- children: A(u)
239
+ ...I ? C : {},
240
+ children: H(n)
239
241
  }
240
242
  ),
241
- u && /* @__PURE__ */ v(
243
+ n && /* @__PURE__ */ b(
242
244
  ue,
243
245
  {
244
246
  "data-testid": "accordion-panel",
245
- className: D(
246
- i.panel,
247
- k,
248
- P
247
+ className: $(
248
+ u.panel,
249
+ l,
250
+ g
249
251
  ),
250
- children: /* @__PURE__ */ v(me, { size: n, children: d })
252
+ children: /* @__PURE__ */ b(me, { size: a, children: typeof d == "function" ? d({
253
+ open: n,
254
+ close: E
255
+ }) : d })
251
256
  }
252
257
  )
253
- ] })
258
+ ] }) })
254
259
  }
255
260
  ),
256
- (f || _) && /* @__PURE__ */ x("div", { className: c, children: [
257
- f,
258
- u && _
261
+ (m || c) && /* @__PURE__ */ A("div", { className: f, children: [
262
+ m,
263
+ h && c
259
264
  ] })
260
265
  ] });
261
266
  }
@@ -1,10 +1,10 @@
1
1
  import { jsxs as O, jsx as x } from "react/jsx-runtime";
2
- import { W as V, p as W, o as m, $ as X, b as q, D as z, H as J, c as y } from "../../keyboard-mgWkd2Vh.js";
2
+ import { W as V, p as W, o as m, $ as X, b as q, D as z, H as J, c as y } from "../../keyboard-B0lm_zyn.js";
3
3
  import $, { useId as Q, useState as F, useMemo as Y, useCallback as Z, forwardRef as ee, useEffect as ae } from "react";
4
- import { w as re } from "../../use-active-press-CqLGIFz7.js";
5
- import { u as oe, a as te, b as ce, T as se, I as ne, G as ie, j as de, p as le, K as be } from "../../label-D4GFpe5F.js";
4
+ import { w as re } from "../../use-active-press-86hajhdd.js";
5
+ import { u as oe, a as te, b as ce, T as se, I as ne, G as ie, j as de, p as le, K as be } from "../../label-y3ANLTNC.js";
6
6
  import { r as ue } from "../../bugs-diTMAGNw.js";
7
- import { H as fe } from "../../field-C1kt7aNM.js";
7
+ import { H as fe } from "../../field-FJ34aSs4.js";
8
8
  import { c as me } from "../../index-DIxK0V-G.js";
9
9
  import { Icon as pe } from "../../icons/Icon.js";
10
10
  import '../../assets/CheckboxMimir.css';let he = "span";
@@ -30,9 +30,9 @@ export type TProps = {
30
30
  */
31
31
  disabled?: boolean;
32
32
  /**
33
- * Флаг наличия ошибки
33
+ * Флаг наличия ошибки или текст ошибки
34
34
  */
35
- error?: boolean;
35
+ error?: boolean | string;
36
36
  /**
37
37
  * Флаг немедленной валидации при вводе
38
38
  */
@@ -84,9 +84,9 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
84
84
  */
85
85
  disabled?: boolean;
86
86
  /**
87
- * Флаг наличия ошибки
87
+ * Флаг наличия ошибки или текст ошибки
88
88
  */
89
- error?: boolean;
89
+ error?: boolean | string;
90
90
  /**
91
91
  * Флаг немедленной валидации при вводе
92
92
  */