mimir-ui-kit 1.37.16 → 1.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/dist/assets/Dropdown.css +1 -0
  2. package/dist/assets/Slider.css +1 -1
  3. package/dist/close-provider-CEutdhG8.js +9 -0
  4. package/dist/combobox-CVtJDVoZ.js +980 -0
  5. package/dist/components/Accordion/Accordion.js +91 -95
  6. package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
  7. package/dist/components/Drawer/Drawer.d.ts +5 -1
  8. package/dist/components/Drawer/Drawer.js +45 -44
  9. package/dist/components/Dropdown/Dropdown.d.ts +45 -0
  10. package/dist/components/Dropdown/Dropdown.js +333 -0
  11. package/dist/components/Dropdown/index.d.ts +1 -0
  12. package/dist/components/Dropdown/index.js +4 -0
  13. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +18 -18
  14. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  15. package/dist/components/SelectSearch/SelectSearch.js +21 -21
  16. package/dist/components/Slider/Slider.d.ts +19 -1
  17. package/dist/components/Slider/Slider.js +570 -533
  18. package/dist/components/Slider/constants.d.ts +4 -0
  19. package/dist/components/Slider/constants.js +4 -0
  20. package/dist/components/Slider/index.d.ts +1 -0
  21. package/dist/components/Slider/index.js +2 -0
  22. package/dist/components/Switcher/Switcher.js +4 -4
  23. package/dist/components/TabTrail/TabTrail.js +4 -4
  24. package/dist/components/index.d.ts +2 -1
  25. package/dist/components/index.js +121 -117
  26. package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
  27. package/dist/{focus-management-DOYCPyGg.js → focus-management-DE4t_lW3.js} +2 -1
  28. package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
  29. package/dist/index.js +149 -145
  30. package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
  31. package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
  32. package/dist/open-closed-CdldUPoq.js +86 -0
  33. package/dist/portal-WDFNoIMz.js +1908 -0
  34. package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
  35. package/package.json +1 -1
  36. package/dist/combobox-BpYucpxz.js +0 -2896
  37. package/dist/open-closed-D2VjDhAN.js +0 -86
@@ -1,28 +1,24 @@
1
- import { jsxs as A, Fragment as K, jsx as I } from "react/jsx-runtime";
2
- import { c as D } from "../../index-DIxK0V-G.js";
3
- import b, { createContext as M, useRef as oe, Fragment as re, useReducer as pe, useMemo as O, useId as le, useEffect as se, useState as ae, useContext as U, forwardRef as me } from "react";
1
+ import { jsxs as A, Fragment as H, jsx as I } from "react/jsx-runtime";
2
+ import { c as v } from "../../index-DIxK0V-G.js";
3
+ import x, { createContext as K, useRef as oe, Fragment as re, useReducer as pe, useMemo as O, useId as se, useEffect as le, useState as ae, useContext as U, forwardRef as me } from "react";
4
4
  import { AccordionItem as fe } from "./AccordionItem/AccordionItem.js";
5
- import { EAccordionButtonType as g, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
5
+ import { EAccordionButtonType as P, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
6
6
  import { useMediaQuery as ye } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
7
  import { EMediaQuery as Ee } from "../../hooks/useMediaQuery/constants.js";
8
8
  import { Icon as Se } from "../../icons/Icon.js";
9
9
  import { Link as ke } from "../AnchorLink/Link.js";
10
- import { M as ee, W as q, y as j, T as Ie, o as $, a as W, H as Q, I as ce, $ as be, b as ve, D as te, u as xe, c as T } from "../../keyboard-mgWkd2Vh.js";
11
- import { w as he } from "../../use-active-press-CqLGIFz7.js";
12
- import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
13
- import { c as $e, i as R, u as Pe, x as ge, R as Te, s as we } from "../../open-closed-D2VjDhAN.js";
14
- import { r as Ne } from "../../bugs-diTMAGNw.js";
15
- import '../../assets/Accordion.css';let Ce = M(() => {
16
- });
17
- function Ae({ value: e, children: t }) {
18
- return b.createElement(Ce.Provider, { value: e }, t);
19
- }
20
- var ne;
21
- let Be = (ne = b.startTransition) != null ? ne : function(e) {
10
+ import { M as ee, W as q, y as j, T as Ie, o as $, a as W, H as Q, I as ce, $ as be, b as xe, D as te, u as De, c as T } from "../../keyboard-B0lm_zyn.js";
11
+ import { w as he } from "../../use-active-press-86hajhdd.js";
12
+ import { e as ve } from "../../use-resolve-button-type-DhFdPxnv.js";
13
+ import { c as $e, i as R, u as ge, R as Pe, H as Te, s as we } from "../../open-closed-CdldUPoq.js";
14
+ import { C as Ne } from "../../close-provider-CEutdhG8.js";
15
+ import { r as Ce } from "../../bugs-diTMAGNw.js";
16
+ import '../../assets/Accordion.css';var ne;
17
+ let Ae = (ne = x.startTransition) != null ? ne : function(e) {
22
18
  e();
23
19
  };
24
- var Oe = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Oe || {}), Re = ((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))(Re || {});
25
- let Me = { 0: (e) => ({ ...e, disclosureState: W(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 2(e, t) {
20
+ 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.SetButtonElement = 4] = "SetButtonElement", e[e.SetPanelElement = 5] = "SetPanelElement", e))(Oe || {});
21
+ let Re = { 0: (e) => ({ ...e, disclosureState: W(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 2(e, t) {
26
22
  return e.buttonId === t.buttonId ? e : { ...e, buttonId: t.buttonId };
27
23
  }, 3(e, t) {
28
24
  return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
@@ -30,7 +26,7 @@ let Me = { 0: (e) => ({ ...e, disclosureState: W(e.disclosureState, { 0: 1, 1: 0
30
26
  return e.buttonElement === t.element ? e : { ...e, buttonElement: t.element };
31
27
  }, 5(e, t) {
32
28
  return e.panelElement === t.element ? e : { ...e, panelElement: t.element };
33
- } }, V = M(null);
29
+ } }, V = K(null);
34
30
  V.displayName = "DisclosureContext";
35
31
  function z(e) {
36
32
  let t = U(V);
@@ -40,7 +36,7 @@ function z(e) {
40
36
  }
41
37
  return t;
42
38
  }
43
- let X = M(null);
39
+ let X = K(null);
44
40
  X.displayName = "DisclosureAPIContext";
45
41
  function ie(e) {
46
42
  let t = U(X);
@@ -50,40 +46,40 @@ function ie(e) {
50
46
  }
51
47
  return t;
52
48
  }
53
- let G = M(null);
49
+ let G = K(null);
54
50
  G.displayName = "DisclosurePanelContext";
55
- function Fe() {
51
+ function Me() {
56
52
  return U(G);
57
53
  }
58
- function Le(e, t) {
59
- return W(t.type, Me, e, t);
54
+ function Fe(e, t) {
55
+ return W(t.type, Re, e, t);
60
56
  }
61
- let He = re;
62
- function Ke(e, t) {
63
- let { defaultOpen: u = !1, ...p } = e, s = oe(null), m = j(t, Ie((c) => {
64
- s.current = c;
65
- }, e.as === void 0 || e.as === re)), a = pe(Le, { disclosureState: u ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: n, buttonId: r }, y] = a, l = $((c) => {
57
+ let Le = re;
58
+ function He(e, t) {
59
+ let { defaultOpen: u = !1, ...p } = e, l = oe(null), m = j(t, Ie((c) => {
60
+ l.current = c;
61
+ }, e.as === void 0 || e.as === re)), a = pe(Fe, { disclosureState: u ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: n, buttonId: r }, y] = a, s = $((c) => {
66
62
  y({ type: 1 });
67
- let f = xe(s);
63
+ let f = De(l);
68
64
  if (!f || !r) return;
69
65
  let _ = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : f.getElementById(r) : f.getElementById(r);
70
66
  _ == null || _.focus();
71
- }), v = O(() => ({ close: l }), [l]), E = O(() => ({ open: n === 0, close: l }), [n, l]), S = { ref: m };
72
- return b.createElement(V.Provider, { value: a }, b.createElement(X.Provider, { value: v }, b.createElement(Ae, { value: l }, b.createElement($e, { value: W(n, { 0: R.Open, 1: R.Closed }) }, Q({ ourProps: S, theirProps: p, slot: E, defaultTag: He, name: "Disclosure" })))));
67
+ }), b = O(() => ({ close: s }), [s]), E = O(() => ({ open: n === 0, close: s }), [n, s]), S = { ref: m };
68
+ return x.createElement(V.Provider, { value: a }, x.createElement(X.Provider, { value: b }, x.createElement(Ne, { value: s }, x.createElement($e, { value: W(n, { 0: R.Open, 1: R.Closed }) }, Q({ ourProps: S, theirProps: p, slot: E, defaultTag: Le, name: "Disclosure" })))));
73
69
  }
74
- let Ue = "button";
75
- function qe(e, t) {
76
- let u = le(), { id: p = `headlessui-disclosure-button-${u}`, disabled: s = !1, autoFocus: m = !1, ...a } = e, [n, r] = z("Disclosure.Button"), y = Fe(), l = y === null ? !1 : y === n.panelId, v = oe(null), E = j(v, t, $((i) => {
77
- if (!l) return r({ type: 4, element: i });
70
+ let Ke = "button";
71
+ function Ue(e, t) {
72
+ let u = se(), { id: p = `headlessui-disclosure-button-${u}`, disabled: l = !1, autoFocus: m = !1, ...a } = e, [n, r] = z("Disclosure.Button"), y = Me(), s = y === null ? !1 : y === n.panelId, b = oe(null), E = j(b, t, $((i) => {
73
+ if (!s) return r({ type: 4, element: i });
78
74
  })), S = ce();
79
- se(() => {
80
- if (!l) return r({ type: 2, buttonId: p }), () => {
75
+ le(() => {
76
+ if (!s) return r({ type: 2, buttonId: p }), () => {
81
77
  r({ type: 2, buttonId: null });
82
78
  };
83
- }, [p, r, l]);
79
+ }, [p, r, s]);
84
80
  let c = $((i) => {
85
81
  var o;
86
- if (l) {
82
+ if (s) {
87
83
  if (n.disclosureState === 1) return;
88
84
  switch (i.key) {
89
85
  case T.Space:
@@ -105,85 +101,85 @@ function qe(e, t) {
105
101
  }
106
102
  }), _ = $((i) => {
107
103
  var o;
108
- Ne(i.currentTarget) || s || (l ? (r({ type: 0 }), (o = n.buttonElement) == null || o.focus()) : r({ type: 0 }));
109
- }), { isFocusVisible: x, focusProps: h } = be({ autoFocus: m }), { isHovered: w, hoverProps: N } = ve({ isDisabled: s }), { pressed: k, pressProps: P } = he({ disabled: s }), F = O(() => ({ open: n.disclosureState === 0, hover: w, active: k, disabled: s, focus: x, autofocus: m }), [n, w, k, x, s, m]), C = De(e, n.buttonElement), L = l ? te({ ref: E, type: C, disabled: s || void 0, autoFocus: m, onKeyDown: c, onClick: _ }, h, N, P) : te({ ref: E, id: p, type: C, "aria-expanded": n.disclosureState === 0, "aria-controls": n.panelElement ? n.panelId : void 0, disabled: s || void 0, autoFocus: m, onKeyDown: c, onKeyUp: f, onClick: _ }, h, N, P);
110
- return Q({ mergeRefs: S, ourProps: L, theirProps: a, slot: F, defaultTag: Ue, name: "Disclosure.Button" });
104
+ Ce(i.currentTarget) || l || (s ? (r({ type: 0 }), (o = n.buttonElement) == null || o.focus()) : r({ type: 0 }));
105
+ }), { isFocusVisible: D, focusProps: h } = be({ autoFocus: m }), { isHovered: w, hoverProps: N } = xe({ isDisabled: l }), { pressed: k, pressProps: g } = he({ disabled: l }), M = O(() => ({ open: n.disclosureState === 0, hover: w, active: k, disabled: l, focus: D, autofocus: m }), [n, w, k, D, l, m]), C = ve(e, n.buttonElement), F = s ? te({ ref: E, type: C, disabled: l || void 0, autoFocus: m, onKeyDown: c, onClick: _ }, h, N, g) : te({ ref: E, id: p, type: C, "aria-expanded": n.disclosureState === 0, "aria-controls": n.panelElement ? n.panelId : void 0, disabled: l || void 0, autoFocus: m, onKeyDown: c, onKeyUp: f, onClick: _ }, h, N, g);
106
+ return Q({ mergeRefs: S, ourProps: F, theirProps: a, slot: M, defaultTag: Ke, name: "Disclosure.Button" });
111
107
  }
112
- let je = "div", We = ee.RenderStrategy | ee.Static;
113
- function Qe(e, t) {
114
- let u = le(), { id: p = `headlessui-disclosure-panel-${u}`, transition: s = !1, ...m } = e, [a, n] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), y = ce(), [l, v] = ae(null), E = j(t, $((h) => {
115
- Be(() => n({ type: 5, element: h }));
116
- }), v);
117
- se(() => (n({ type: 3, panelId: p }), () => {
108
+ let qe = "div", je = ee.RenderStrategy | ee.Static;
109
+ function We(e, t) {
110
+ let u = se(), { id: p = `headlessui-disclosure-panel-${u}`, transition: l = !1, ...m } = e, [a, n] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), y = ce(), [s, b] = ae(null), E = j(t, $((h) => {
111
+ Ae(() => n({ type: 5, element: h }));
112
+ }), b);
113
+ le(() => (n({ type: 3, panelId: p }), () => {
118
114
  n({ type: 3, panelId: null });
119
115
  }), [p, n]);
120
- let S = Pe(), [c, f] = ge(s, l, S !== null ? (S & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]), x = { ref: E, id: p, ...Te(f) };
121
- return b.createElement(we, null, b.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: y, ourProps: x, theirProps: m, slot: _, defaultTag: je, features: We, visible: c, name: "Disclosure.Panel" })));
116
+ let S = ge(), [c, f] = Pe(l, s, S !== null ? (S & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]), D = { ref: E, id: p, ...Te(f) };
117
+ return x.createElement(we, null, x.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: y, ourProps: D, theirProps: m, slot: _, defaultTag: qe, features: je, visible: c, name: "Disclosure.Panel" })));
122
118
  }
123
- let Ve = q(Ke), ue = q(qe), de = q(Qe), ze = Object.assign(Ve, { Button: ue, Panel: de });
124
- const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye = "_circle_1yk0x_23", Ze = "_disabled_1yk0x_23", et = "_accordion_1yk0x_37", tt = "_header_1yk0x_45", nt = "_title_1yk0x_61", ot = "_panel_1yk0x_88", rt = "_m_1yk0x_112", lt = "_s_1yk0x_19", d = {
125
- icon: Xe,
119
+ let Qe = q(He), ue = q(Ue), de = q(We), Ve = Object.assign(Qe, { Button: ue, Panel: de });
120
+ const ze = "_icon_1yk0x_2", Xe = "_open_1yk0x_15", Ge = "_square_1yk0x_19", Je = "_circle_1yk0x_23", Ye = "_disabled_1yk0x_23", Ze = "_accordion_1yk0x_37", et = "_header_1yk0x_45", tt = "_title_1yk0x_61", nt = "_panel_1yk0x_88", ot = "_m_1yk0x_112", rt = "_s_1yk0x_19", d = {
121
+ icon: ze,
126
122
  "icon-container": "_icon-container_1yk0x_8",
127
- open: Ge,
128
- square: Je,
129
- circle: Ye,
130
- disabled: Ze,
131
- accordion: et,
123
+ open: Xe,
124
+ square: Ge,
125
+ circle: Je,
126
+ disabled: Ye,
127
+ accordion: Ze,
132
128
  "is-link": "_is-link_1yk0x_41",
133
- header: tt,
134
- title: nt,
129
+ header: et,
130
+ title: tt,
135
131
  "title-uppercase": "_title-uppercase_1yk0x_64",
136
- panel: ot,
132
+ panel: nt,
137
133
  "link-open": "_link-open_1yk0x_108",
138
- m: rt,
139
- s: lt,
134
+ m: ot,
135
+ s: rt,
140
136
  "wrapper-button": "_wrapper-button_1yk0x_140"
141
137
  }, It = me(
142
138
  ({
143
139
  title: e,
144
140
  disabled: t,
145
- buttonType: u = g.BUTTON,
141
+ buttonType: u = P.BUTTON,
146
142
  children: p,
147
- showTitleByDefault: s = !0,
143
+ showTitleByDefault: l = !0,
148
144
  linkClassName: m,
149
145
  size: a = B.M,
150
146
  titleUppercase: n,
151
147
  buttonStyle: r = _e.CIRCLE,
152
148
  iconType: y = Y.ARROW,
153
- classNameTitle: l,
154
- classNameContent: v,
149
+ classNameTitle: s,
150
+ classNameContent: b,
155
151
  classNameAccordion: E,
156
152
  classNameIconButton: S,
157
153
  subtitleNode: c,
158
154
  onlyOpenSubtitleNode: f,
159
155
  classNameSubtitleContainer: _
160
- }, x) => {
161
- const [h, w] = ae(!1), N = ye(Ee.XS1), k = u === g.LINK, P = {
156
+ }, D) => {
157
+ const [h, w] = ae(!1), N = ye(Ee.XS1), k = u === P.LINK, g = {
162
158
  [d["is-link"]]: k
163
- }, F = () => {
159
+ }, M = () => {
164
160
  t || w((o) => !o);
165
- }, C = a === B.S ? J.S : J.M, L = (o) => ({
161
+ }, C = a === B.S ? J.S : J.M, F = (o) => ({
166
162
  variant: "anchor",
167
163
  size: N ? "s" : "l",
168
164
  rightIcon: {
169
165
  iconName: C,
170
- className: D({
166
+ className: v({
171
167
  [d["link-open"]]: o
172
168
  })
173
169
  }
174
170
  }), i = (o) => {
175
- const H = () => y === Y.DROPDOWN ? a === B.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : a === B.S ? Z.S : Z.M;
171
+ const L = () => y === Y.DROPDOWN ? a === B.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : a === B.S ? Z.S : Z.M;
176
172
  switch (u) {
177
- case g.LINK:
173
+ case P.LINK:
178
174
  return e;
179
- case g.BUTTON:
180
- return /* @__PURE__ */ A(K, { children: [
175
+ case P.BUTTON:
176
+ return /* @__PURE__ */ A(H, { children: [
181
177
  /* @__PURE__ */ I(
182
178
  "span",
183
179
  {
184
- className: D(
180
+ className: v(
185
181
  d.title,
186
- l,
182
+ s,
187
183
  n && d["title-uppercase"]
188
184
  ),
189
185
  children: e
@@ -192,7 +188,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
192
188
  /* @__PURE__ */ I(
193
189
  "div",
194
190
  {
195
- className: D(
191
+ className: v(
196
192
  d["icon-container"],
197
193
  o && d.open,
198
194
  t && d.disabled,
@@ -203,7 +199,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
203
199
  children: /* @__PURE__ */ I(
204
200
  Se,
205
201
  {
206
- iconName: H(),
202
+ iconName: L(),
207
203
  className: d.icon,
208
204
  "data-testid": "accordion-icon"
209
205
  }
@@ -215,44 +211,44 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
215
211
  return null;
216
212
  }
217
213
  };
218
- return /* @__PURE__ */ A(K, { children: [
214
+ return /* @__PURE__ */ A(H, { children: [
219
215
  /* @__PURE__ */ I(
220
216
  "div",
221
217
  {
222
- className: D(
218
+ className: v(
223
219
  d.accordion,
224
220
  d[a],
225
- P,
221
+ g,
226
222
  E
227
223
  ),
228
- children: /* @__PURE__ */ I(ze, { ref: x, children: ({ open: o, close: H }) => /* @__PURE__ */ A(K, { children: [
229
- (!o || s) && /* @__PURE__ */ I(
224
+ children: /* @__PURE__ */ I(Ve, { ref: D, children: ({ open: o, close: L }) => /* @__PURE__ */ A(H, { children: [
225
+ (!o || l) && /* @__PURE__ */ I(
230
226
  ue,
231
227
  {
232
228
  disabled: t,
233
- as: k ? ke : g.BUTTON,
234
- onClick: F,
235
- className: D({
229
+ as: k ? ke : P.BUTTON,
230
+ onClick: M,
231
+ className: v({
236
232
  [d.header]: !k,
237
233
  [d.disabled]: t,
238
234
  [m ?? ""]: k && m
239
235
  }),
240
- ...k ? L(o) : {},
241
- children: (!o || s) && i(o)
236
+ ...k ? F(o) : {},
237
+ children: (!o || l) && i(o)
242
238
  }
243
239
  ),
244
240
  o && /* @__PURE__ */ I(
245
241
  de,
246
242
  {
247
243
  "data-testid": "accordion-panel",
248
- className: D(
244
+ className: v(
249
245
  d.panel,
250
- v,
251
- P
246
+ b,
247
+ g
252
248
  ),
253
249
  children: /* @__PURE__ */ I(fe, { size: a, children: typeof p == "function" ? p({
254
250
  open: o,
255
- close: H
251
+ close: L
256
252
  }) : p })
257
253
  }
258
254
  )
@@ -1,10 +1,10 @@
1
1
  import { jsxs as L, jsx as p } from "react/jsx-runtime";
2
- import { W as O, p as V, o as d, $ as W, b as X, D as q, H as z, c as D } from "../../keyboard-mgWkd2Vh.js";
2
+ import { W as O, p as V, o as d, $ as W, b as X, D as q, H as z, c as D } from "../../keyboard-B0lm_zyn.js";
3
3
  import h, { useId as J, useState as Q, useMemo as Y, useCallback as Z, forwardRef as ee } from "react";
4
- import { w as re } from "../../use-active-press-CqLGIFz7.js";
5
- import { u as ae, a as oe, b as te, T as ce, I as ne, G as se, j as ie, p as le, K as de } from "../../label-D4GFpe5F.js";
4
+ import { w as re } from "../../use-active-press-86hajhdd.js";
5
+ import { u as ae, a as oe, b as te, T as ce, I as ne, G as se, j as ie, p as le, K as de } from "../../label-y3ANLTNC.js";
6
6
  import { r as be } from "../../bugs-diTMAGNw.js";
7
- import { H as ue } from "../../field-C1kt7aNM.js";
7
+ import { H as ue } from "../../field-FJ34aSs4.js";
8
8
  import { c as me } from "../../index-DIxK0V-G.js";
9
9
  import { Icon as fe } from "../../icons/Icon.js";
10
10
  import '../../assets/CheckboxMimir.css';let pe = "span";
@@ -57,6 +57,10 @@ type TProps = {
57
57
  * Дополнительный класс для header.
58
58
  */
59
59
  classNameHeader?: string;
60
+ /**
61
+ * Дополнительный класс для content.
62
+ */
63
+ classNameContent?: string;
60
64
  /**
61
65
  * Дополнительный класс для inner.
62
66
  */
@@ -77,5 +81,5 @@ type TProps = {
77
81
  /**
78
82
  * Компонент шторки, который может выезжать слева, справа или внизу.
79
83
  */
80
- export declare const Drawer: ({ isOpen, onClose, title, className, unmount, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, footer, children, classNameTitle, classNameHeader, classNameInner, classNameFooter, closeOnClickOutside, showCloseButton }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
84
+ export declare const Drawer: ({ isOpen, onClose, title, className, unmount, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, footer, children, classNameTitle, classNameHeader, classNameInner, classNameContent, classNameFooter, closeOnClickOutside, showCloseButton }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
81
85
  export {};
@@ -1,37 +1,37 @@
1
- import { jsxs as m, jsx as t, Fragment as P } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as t, Fragment as Q } from "react/jsx-runtime";
2
2
  import { c as s } from "../../index-DIxK0V-G.js";
3
- import { useState as N, useRef as Q, useCallback as u, useEffect as F } from "react";
3
+ import { useState as N, useRef as F, useCallback as u, useEffect as G } from "react";
4
4
  import { EDrawerPosition as w } from "./constants.js";
5
- import { useMediaQuery as G } from "../../hooks/useMediaQuery/useMediaQuery.js";
6
- import { EMediaQuery as H } from "../../hooks/useMediaQuery/constants.js";
7
- import { useLockBodyScroll as K } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
8
- import { useResizeObserver as V } from "../../hooks/useResizeObserver/useResizeObserver.js";
5
+ import { useMediaQuery as H } from "../../hooks/useMediaQuery/useMediaQuery.js";
6
+ import { EMediaQuery as K } from "../../hooks/useMediaQuery/constants.js";
7
+ import { useLockBodyScroll as V } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
8
+ import { useResizeObserver as W } from "../../hooks/useResizeObserver/useResizeObserver.js";
9
9
  import { Button as k } from "../Button/Button.js";
10
- import { EButtonVariantDefault as W, EButtonSize as n } from "../Button/constants.js";
11
- import { Loader as Y } from "../Loader/Loader.js";
12
- import { Portal as q } from "../Portal/Portal.js";
13
- import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4d_27", Z = "_header_1xs4d_45", $ = "_title_1xs4d_59", O = "_space_1xs4d_73", ee = "_inner_1xs4d_84", te = "_button_1xs4d_87", oe = "_footer_1xs4d_92", se = "_left_1xs4d_105", re = "_right_1xs4d_109", ne = "_full_1xs4d_113", ae = "_bottom_1xs4d_123", ie = "_opened_1xs4d_140", le = "_overlay_1xs4d_196", ce = "_unmount_1xs4d_212", e = {
14
- drawer: J,
15
- content: U,
10
+ import { EButtonVariantDefault as Y, EButtonSize as n } from "../Button/constants.js";
11
+ import { Loader as q } from "../Loader/Loader.js";
12
+ import { Portal as J } from "../Portal/Portal.js";
13
+ import '../../assets/Drawer.css';const U = "_drawer_1xs4d_3", Z = "_content_1xs4d_27", $ = "_header_1xs4d_45", O = "_title_1xs4d_59", ee = "_space_1xs4d_73", te = "_inner_1xs4d_84", oe = "_button_1xs4d_87", se = "_footer_1xs4d_92", re = "_left_1xs4d_105", ne = "_right_1xs4d_109", ae = "_full_1xs4d_113", ie = "_bottom_1xs4d_123", le = "_opened_1xs4d_140", ce = "_overlay_1xs4d_196", de = "_unmount_1xs4d_212", e = {
14
+ drawer: U,
15
+ content: Z,
16
16
  "is-loading": "_is-loading_1xs4d_41",
17
- header: Z,
17
+ header: $,
18
18
  "sticky-header": "_sticky-header_1xs4d_53",
19
- title: $,
20
- space: O,
21
- inner: ee,
22
- button: te,
23
- footer: oe,
19
+ title: O,
20
+ space: ee,
21
+ inner: te,
22
+ button: oe,
23
+ footer: se,
24
24
  "footer-button": "_footer-button_1xs4d_101",
25
- left: se,
26
- right: re,
27
- full: ne,
28
- bottom: ae,
25
+ left: re,
26
+ right: ne,
27
+ full: ae,
28
+ bottom: ie,
29
29
  "full-bottom-height": "_full-bottom-height_1xs4d_134",
30
- opened: ie,
30
+ opened: le,
31
31
  "is-closing": "_is-closing_1xs4d_159",
32
- overlay: le,
33
- unmount: ce
34
- }, de = 300, we = ({
32
+ overlay: ce,
33
+ unmount: de
34
+ }, _e = 300, ke = ({
35
35
  isOpen: r,
36
36
  onClose: a,
37
37
  title: E,
@@ -47,39 +47,40 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
47
47
  classNameTitle: C,
48
48
  classNameHeader: D,
49
49
  classNameInner: z,
50
- classNameFooter: L,
50
+ classNameContent: L,
51
+ classNameFooter: R,
51
52
  closeOnClickOutside: h = !0,
52
53
  showCloseButton: x = !0
53
54
  }) => {
54
- const [p, y] = N(!1), [R, b] = N(!1), g = Q(), d = G(H.XS1), { ref: A } = V({
55
+ const [p, y] = N(!1), [A, b] = N(!1), g = F(), d = H(K.XS1), { ref: X } = W({
55
56
  enabled: l === w.BOTTOM
56
57
  });
57
- K({
58
+ V({
58
59
  on: r && !p,
59
60
  paddingRight: S
60
61
  });
61
62
  const o = u(() => {
62
63
  a && (y(!0), g.current = setTimeout(() => {
63
64
  a(), y(!1);
64
- }, de));
65
- }, [a]), X = u(() => {
65
+ }, _e));
66
+ }, [a]), j = u(() => {
66
67
  h && o();
67
68
  }, [h, o]), _ = u(
68
- (j) => {
69
- j.key === "Escape" && o();
69
+ (P) => {
70
+ P.key === "Escape" && o();
70
71
  },
71
72
  [o]
72
73
  );
73
- F(() => (r && (b(!0), window.addEventListener("keydown", _)), () => {
74
+ G(() => (r && (b(!0), window.addEventListener("keydown", _)), () => {
74
75
  b(!1), clearTimeout(g.current), window.removeEventListener("keydown", _);
75
76
  }), [r, _]);
76
77
  const v = {
77
- [e.opened]: R,
78
+ [e.opened]: A,
78
79
  [e["is-closing"]]: p,
79
80
  [e["full-bottom-height"]]: I,
80
81
  [e["is-loading"]]: i
81
82
  };
82
- return !r && f ? null : /* @__PURE__ */ m(q, { children: [
83
+ return !r && f ? null : /* @__PURE__ */ m(J, { children: [
83
84
  /* @__PURE__ */ t(
84
85
  "div",
85
86
  {
@@ -89,11 +90,11 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
89
90
  children: /* @__PURE__ */ t(
90
91
  "section",
91
92
  {
92
- ref: A,
93
- className: s(e.content, e[l], {
93
+ ref: X,
94
+ className: s(e.content, L, e[l], {
94
95
  [e["is-loading"]]: !!i
95
96
  }),
96
- children: i ? /* @__PURE__ */ t(Y, {}) : /* @__PURE__ */ m(P, { children: [
97
+ children: i ? /* @__PURE__ */ t(q, {}) : /* @__PURE__ */ m(Q, { children: [
97
98
  /* @__PURE__ */ m(
98
99
  "header",
99
100
  {
@@ -105,7 +106,7 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
105
106
  /* @__PURE__ */ t("div", { className: e.space, children: x && /* @__PURE__ */ t(
106
107
  k,
107
108
  {
108
- variant: W.SecondaryWhite,
109
+ variant: Y.SecondaryWhite,
109
110
  isIconButton: !0,
110
111
  size: d ? n.S : n.M,
111
112
  iconName: "Close16px",
@@ -117,7 +118,7 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
117
118
  }
118
119
  ),
119
120
  /* @__PURE__ */ t("div", { className: s(e.inner, z), children: T }),
120
- /* @__PURE__ */ t("footer", { className: s(e.footer, L), children: typeof c == "function" ? c({ handleClose: o }) : c || x && /* @__PURE__ */ t(
121
+ /* @__PURE__ */ t("footer", { className: s(e.footer, R), children: typeof c == "function" ? c({ handleClose: o }) : c || x && /* @__PURE__ */ t(
121
122
  k,
122
123
  {
123
124
  size: d ? n.M : n.XXL,
@@ -143,12 +144,12 @@ import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4
143
144
  v
144
145
  ),
145
146
  "data-testid": "drawer-overlay",
146
- onClick: X
147
+ onClick: j
147
148
  }
148
149
  )
149
150
  ] });
150
151
  };
151
152
  export {
152
- de as ANIMATION_DELAY,
153
- we as Drawer
153
+ _e as ANIMATION_DELAY,
154
+ ke as Drawer
154
155
  };
@@ -0,0 +1,45 @@
1
+ import { PopoverProps, PopoverPanelProps } from '@headlessui/react';
2
+ import { ReactNode } from 'react';
3
+
4
+ export declare const ANIMATION_DELAY = 300;
5
+ type TProps = {
6
+ /**
7
+ * Пропсы для Popover
8
+ */
9
+ popoverProps?: PopoverProps;
10
+ /**
11
+ * Позиция выпадающего меню относительно кнопки.
12
+ */
13
+ position?: PopoverPanelProps['anchor'];
14
+ /**
15
+ * Компонент при клике на который выпадающее меню открывается.
16
+ */
17
+ buttonContent?: ReactNode;
18
+ /**
19
+ * Компонент выпадающего меню.
20
+ */
21
+ children?: ReactNode | ((props: {
22
+ close: VoidFunction;
23
+ }) => JSX.Element);
24
+ /**
25
+ * Дополнительный класс для компонента.
26
+ */
27
+ className?: string;
28
+ /**
29
+ * Дополнительный класс для кнопки.
30
+ */
31
+ buttonClassName?: string;
32
+ /**
33
+ * Дополнительный класс для панели.
34
+ */
35
+ panelClassName?: string;
36
+ /**
37
+ * Дополнительный класс для меню.
38
+ */
39
+ menuItemsClassName?: string;
40
+ };
41
+ /**
42
+ * Компонент Dropdown, содержит в себе кнопку и панель выпадающего меню
43
+ */
44
+ export declare const Dropdown: import('react').MemoExoticComponent<({ children, position, popoverProps, className, buttonClassName, panelClassName, menuItemsClassName, buttonContent }: TProps) => import("react/jsx-runtime").JSX.Element>;
45
+ export {};