mimir-ui-kit 1.37.12 → 1.37.14

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.
@@ -1,24 +1,24 @@
1
- import { jsxs as B, Fragment as K, jsx as b } from "react/jsx-runtime";
2
- import { c as $ } from "../../index-DIxK0V-G.js";
3
- import v, { createContext as M, useRef as ne, 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 K, jsx as I } from "react/jsx-runtime";
2
+ import { c as x } 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";
4
4
  import { AccordionItem as fe } from "./AccordionItem/AccordionItem.js";
5
- import { EAccordionButtonType as T, EAccordionSize as x, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
6
- import { useMediaQuery as Ee } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
- import { EMediaQuery as Se } from "../../hooks/useMediaQuery/constants.js";
8
- import { Icon as ke } from "../../icons/Icon.js";
9
- import { Link as Ie } from "../AnchorLink/Link.js";
10
- import { M as ee, W as q, y as j, T as be, o as P, a as W, H as Q, I as ce, $ as ve, b as ye, D as te, u as he, c as w } from "../../keyboard-mgWkd2Vh.js";
11
- import { w as De } from "../../use-active-press-CqLGIFz7.js";
12
- import { e as $e } from "../../use-resolve-button-type-DhFdPxnv.js";
13
- import { c as Pe, i as R, u as ge, x as Te, R as we, s as Ne } from "../../open-closed-D2VjDhAN.js";
14
- import { r as Ce } from "../../bugs-diTMAGNw.js";
15
- import '../../assets/Accordion.css';let Ae = M(() => {
5
+ import { EAccordionButtonType as g, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
6
+ import { useMediaQuery as ye } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
+ import { EMediaQuery as Ee } from "../../hooks/useMediaQuery/constants.js";
8
+ import { Icon as Se } from "../../icons/Icon.js";
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 D, a as W, H as Q, I as ce, $ as be, b as ve, D as te, u as $e, c as T } from "../../keyboard-B0lm_zyn.js";
11
+ import { w as he } from "../../use-active-press-86hajhdd.js";
12
+ import { e as xe } from "../../use-resolve-button-type-DhFdPxnv.js";
13
+ import { c as De, i as R, u as Pe, R as ge, H as Te, s as we } from "../../open-closed-CdldUPoq.js";
14
+ import { r as Ne } from "../../bugs-diTMAGNw.js";
15
+ import '../../assets/Accordion.css';let Ce = M(() => {
16
16
  });
17
- function Be({ value: e, children: t }) {
18
- return v.createElement(Ae.Provider, { value: e }, t);
17
+ function Ae({ value: e, children: t }) {
18
+ return b.createElement(Ce.Provider, { value: e }, t);
19
19
  }
20
- var oe;
21
- let xe = (oe = v.startTransition) != null ? oe : function(e) {
20
+ var ne;
21
+ let Be = (ne = b.startTransition) != null ? ne : function(e) {
22
22
  e();
23
23
  };
24
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 || {});
@@ -60,148 +60,148 @@ function Le(e, t) {
60
60
  }
61
61
  let He = re;
62
62
  function Ke(e, t) {
63
- let { defaultOpen: u = !1, ...p } = e, s = ne(null), m = j(t, be((c) => {
63
+ let { defaultOpen: u = !1, ...p } = e, s = oe(null), m = j(t, Ie((c) => {
64
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: o, buttonId: r }, E] = a, l = P((c) => {
66
- E({ type: 1 });
67
- let f = he(s);
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 = D((c) => {
66
+ y({ type: 1 });
67
+ let f = $e(s);
68
68
  if (!f || !r) return;
69
69
  let _ = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : f.getElementById(r) : f.getElementById(r);
70
70
  _ == null || _.focus();
71
- }), y = O(() => ({ close: l }), [l]), S = O(() => ({ open: o === 0, close: l }), [o, l]), k = { ref: m };
72
- return v.createElement(V.Provider, { value: a }, v.createElement(X.Provider, { value: y }, v.createElement(Be, { value: l }, v.createElement(Pe, { value: W(o, { 0: R.Open, 1: R.Closed }) }, Q({ ourProps: k, theirProps: p, slot: S, defaultTag: He, name: "Disclosure" })))));
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(De, { value: W(n, { 0: R.Open, 1: R.Closed }) }, Q({ ourProps: S, theirProps: p, slot: E, defaultTag: He, name: "Disclosure" })))));
73
73
  }
74
74
  let Ue = "button";
75
75
  function qe(e, t) {
76
- let u = le(), { id: p = `headlessui-disclosure-button-${u}`, disabled: s = !1, autoFocus: m = !1, ...a } = e, [o, r] = z("Disclosure.Button"), E = Fe(), l = E === null ? !1 : E === o.panelId, y = ne(null), S = j(y, t, P((i) => {
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, D((i) => {
77
77
  if (!l) return r({ type: 4, element: i });
78
- })), k = ce();
78
+ })), S = ce();
79
79
  se(() => {
80
80
  if (!l) return r({ type: 2, buttonId: p }), () => {
81
81
  r({ type: 2, buttonId: null });
82
82
  };
83
83
  }, [p, r, l]);
84
- let c = P((i) => {
85
- var n;
84
+ let c = D((i) => {
85
+ var o;
86
86
  if (l) {
87
- if (o.disclosureState === 1) return;
87
+ if (n.disclosureState === 1) return;
88
88
  switch (i.key) {
89
- case w.Space:
90
- case w.Enter:
91
- i.preventDefault(), i.stopPropagation(), r({ type: 0 }), (n = o.buttonElement) == null || n.focus();
89
+ case T.Space:
90
+ case T.Enter:
91
+ i.preventDefault(), i.stopPropagation(), r({ type: 0 }), (o = n.buttonElement) == null || o.focus();
92
92
  break;
93
93
  }
94
94
  } else switch (i.key) {
95
- case w.Space:
96
- case w.Enter:
95
+ case T.Space:
96
+ case T.Enter:
97
97
  i.preventDefault(), i.stopPropagation(), r({ type: 0 });
98
98
  break;
99
99
  }
100
- }), f = P((i) => {
100
+ }), f = D((i) => {
101
101
  switch (i.key) {
102
- case w.Space:
102
+ case T.Space:
103
103
  i.preventDefault();
104
104
  break;
105
105
  }
106
- }), _ = P((i) => {
107
- var n;
108
- Ce(i.currentTarget) || s || (l ? (r({ type: 0 }), (n = o.buttonElement) == null || n.focus()) : r({ type: 0 }));
109
- }), { isFocusVisible: h, focusProps: D } = ve({ autoFocus: m }), { isHovered: N, hoverProps: C } = ye({ isDisabled: s }), { pressed: I, pressProps: g } = De({ disabled: s }), F = O(() => ({ open: o.disclosureState === 0, hover: N, active: I, disabled: s, focus: h, autofocus: m }), [o, N, I, h, s, m]), A = $e(e, o.buttonElement), L = l ? te({ ref: S, type: A, disabled: s || void 0, autoFocus: m, onKeyDown: c, onClick: _ }, D, C, g) : te({ ref: S, id: p, type: A, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: s || void 0, autoFocus: m, onKeyDown: c, onKeyUp: f, onClick: _ }, D, C, g);
110
- return Q({ mergeRefs: k, ourProps: L, theirProps: a, slot: F, defaultTag: Ue, name: "Disclosure.Button" });
106
+ }), _ = D((i) => {
107
+ var o;
108
+ Ne(i.currentTarget) || s || (l ? (r({ type: 0 }), (o = n.buttonElement) == null || o.focus()) : r({ type: 0 }));
109
+ }), { isFocusVisible: $, 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: $, autofocus: m }), [n, w, k, $, s, m]), C = xe(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" });
111
111
  }
112
112
  let je = "div", We = ee.RenderStrategy | ee.Static;
113
113
  function Qe(e, t) {
114
- let u = le(), { id: p = `headlessui-disclosure-panel-${u}`, transition: s = !1, ...m } = e, [a, o] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), E = ce(), [l, y] = ae(null), S = j(t, P((D) => {
115
- xe(() => o({ type: 5, element: D }));
116
- }), y);
117
- se(() => (o({ type: 3, panelId: p }), () => {
118
- o({ type: 3, panelId: null });
119
- }), [p, o]);
120
- let k = ge(), [c, f] = Te(s, l, k !== null ? (k & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]), h = { ref: S, id: p, ...we(f) };
121
- return v.createElement(Ne, null, v.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: E, ourProps: h, theirProps: m, slot: _, defaultTag: je, features: We, visible: c, name: "Disclosure.Panel" })));
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, D((h) => {
115
+ Be(() => n({ type: 5, element: h }));
116
+ }), v);
117
+ se(() => (n({ type: 3, panelId: p }), () => {
118
+ n({ type: 3, panelId: null });
119
+ }), [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]), $ = { ref: E, id: p, ...Te(f) };
121
+ return b.createElement(we, null, b.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: y, ourProps: $, theirProps: m, slot: _, defaultTag: je, features: We, visible: c, name: "Disclosure.Panel" })));
122
122
  }
123
123
  let Ve = q(Ke), ue = q(qe), de = q(Qe), ze = Object.assign(Ve, { Button: ue, Panel: de });
124
- const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_25", Ye = "_title_1k9to_29", Ze = "_icon_1k9to_36", et = "_circle_1k9to_46", tt = "_square_1k9to_53", ot = "_panel_1k9to_73", nt = "_open_1k9to_80", rt = "_m_1k9to_106", lt = "_s_1k9to_53", d = {
125
- accordion: Xe,
126
- "is-link": "_is-link_1k9to_9",
127
- header: Ge,
128
- disabled: Je,
129
- title: Ye,
130
- "title-uppercase": "_title-uppercase_1k9to_32",
131
- icon: Ze,
132
- "icon-container": "_icon-container_1k9to_39",
133
- circle: et,
134
- square: tt,
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,
126
+ "icon-container": "_icon-container_1yk0x_8",
127
+ open: Ge,
128
+ square: Je,
129
+ circle: Ye,
130
+ disabled: Ze,
131
+ accordion: et,
132
+ "is-link": "_is-link_1yk0x_41",
133
+ header: tt,
134
+ title: nt,
135
+ "title-uppercase": "_title-uppercase_1yk0x_64",
135
136
  panel: ot,
136
- open: nt,
137
- "link-open": "_link-open_1k9to_102",
137
+ "link-open": "_link-open_1yk0x_108",
138
138
  m: rt,
139
139
  s: lt,
140
- "wrapper-button": "_wrapper-button_1k9to_134"
141
- }, bt = me(
140
+ "wrapper-button": "_wrapper-button_1yk0x_140"
141
+ }, It = me(
142
142
  ({
143
143
  title: e,
144
144
  disabled: t,
145
- buttonType: u = T.BUTTON,
145
+ buttonType: u = g.BUTTON,
146
146
  children: p,
147
147
  showTitleByDefault: s = !0,
148
148
  linkClassName: m,
149
- size: a = x.M,
150
- titleUppercase: o,
149
+ size: a = B.M,
150
+ titleUppercase: n,
151
151
  buttonStyle: r = _e.CIRCLE,
152
- iconType: E = Y.ARROW,
152
+ iconType: y = Y.ARROW,
153
153
  classNameTitle: l,
154
- classNameContent: y,
155
- classNameAccordion: S,
156
- classNameIconButton: k,
154
+ classNameContent: v,
155
+ classNameAccordion: E,
156
+ classNameIconButton: S,
157
157
  subtitleNode: c,
158
158
  onlyOpenSubtitleNode: f,
159
159
  classNameSubtitleContainer: _
160
- }, h) => {
161
- const [D, N] = ae(!1), C = Ee(Se.XS1), I = u === T.LINK, g = {
162
- [d["is-link"]]: I
160
+ }, $) => {
161
+ const [h, w] = ae(!1), N = ye(Ee.XS1), k = u === g.LINK, P = {
162
+ [d["is-link"]]: k
163
163
  }, F = () => {
164
- t || N((n) => !n);
165
- }, A = a === x.S ? J.S : J.M, L = (n) => ({
164
+ t || w((o) => !o);
165
+ }, C = a === B.S ? J.S : J.M, L = (o) => ({
166
166
  variant: "anchor",
167
- size: C ? "s" : "l",
167
+ size: N ? "s" : "l",
168
168
  rightIcon: {
169
- iconName: A,
170
- className: $({
171
- [d["link-open"]]: n
169
+ iconName: C,
170
+ className: x({
171
+ [d["link-open"]]: o
172
172
  })
173
173
  }
174
- }), i = (n) => {
175
- const H = () => E === Y.DROPDOWN ? a === x.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : a === x.S ? Z.S : Z.M;
174
+ }), i = (o) => {
175
+ const H = () => y === Y.DROPDOWN ? a === B.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px" : a === B.S ? Z.S : Z.M;
176
176
  switch (u) {
177
- case T.LINK:
177
+ case g.LINK:
178
178
  return e;
179
- case T.BUTTON:
180
- return /* @__PURE__ */ B(K, { children: [
181
- /* @__PURE__ */ b(
179
+ case g.BUTTON:
180
+ return /* @__PURE__ */ A(K, { children: [
181
+ /* @__PURE__ */ I(
182
182
  "span",
183
183
  {
184
- className: $(
184
+ className: x(
185
185
  d.title,
186
186
  l,
187
- o && d["title-uppercase"]
187
+ n && d["title-uppercase"]
188
188
  ),
189
189
  children: e
190
190
  }
191
191
  ),
192
- /* @__PURE__ */ b(
192
+ /* @__PURE__ */ I(
193
193
  "div",
194
194
  {
195
- className: $(
195
+ className: x(
196
196
  d["icon-container"],
197
- n && d.open,
197
+ o && d.open,
198
198
  t && d.disabled,
199
199
  d[r],
200
- k
200
+ S
201
201
  ),
202
202
  "data-testid": "accordion-icon-container",
203
- children: /* @__PURE__ */ b(
204
- ke,
203
+ children: /* @__PURE__ */ I(
204
+ Se,
205
205
  {
206
206
  iconName: H(),
207
207
  className: d.icon,
@@ -215,43 +215,43 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
215
215
  return null;
216
216
  }
217
217
  };
218
- return /* @__PURE__ */ B(K, { children: [
219
- /* @__PURE__ */ b(
218
+ return /* @__PURE__ */ A(K, { children: [
219
+ /* @__PURE__ */ I(
220
220
  "div",
221
221
  {
222
- className: $(
222
+ className: x(
223
223
  d.accordion,
224
224
  d[a],
225
- g,
226
- S
225
+ P,
226
+ E
227
227
  ),
228
- children: /* @__PURE__ */ b(ze, { ref: h, children: ({ open: n, close: H }) => /* @__PURE__ */ B(K, { children: [
229
- (!n || s) && /* @__PURE__ */ b(
228
+ children: /* @__PURE__ */ I(ze, { ref: $, children: ({ open: o, close: H }) => /* @__PURE__ */ A(K, { children: [
229
+ (!o || s) && /* @__PURE__ */ I(
230
230
  ue,
231
231
  {
232
232
  disabled: t,
233
- as: I ? Ie : T.BUTTON,
233
+ as: k ? ke : g.BUTTON,
234
234
  onClick: F,
235
- className: $({
236
- [d.header]: !I,
235
+ className: x({
236
+ [d.header]: !k,
237
237
  [d.disabled]: t,
238
- [m ?? ""]: I && m
238
+ [m ?? ""]: k && m
239
239
  }),
240
- ...I ? L(n) : {},
241
- children: (!n || s) && i(n)
240
+ ...k ? L(o) : {},
241
+ children: (!o || s) && i(o)
242
242
  }
243
243
  ),
244
- n && /* @__PURE__ */ b(
244
+ o && /* @__PURE__ */ I(
245
245
  de,
246
246
  {
247
247
  "data-testid": "accordion-panel",
248
- className: $(
248
+ className: x(
249
249
  d.panel,
250
- y,
251
- g
250
+ v,
251
+ P
252
252
  ),
253
- children: /* @__PURE__ */ b(fe, { size: a, children: typeof p == "function" ? p({
254
- open: n,
253
+ children: /* @__PURE__ */ I(fe, { size: a, children: typeof p == "function" ? p({
254
+ open: o,
255
255
  close: H
256
256
  }) : p })
257
257
  }
@@ -259,13 +259,13 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
259
259
  ] }) })
260
260
  }
261
261
  ),
262
- (c || f) && /* @__PURE__ */ B("div", { className: _, children: [
262
+ (c || f) && /* @__PURE__ */ A("div", { className: _, children: [
263
263
  c,
264
- D && f
264
+ h && f
265
265
  ] })
266
266
  ] });
267
267
  }
268
268
  );
269
269
  export {
270
- bt as Accordion
270
+ It as Accordion
271
271
  };
@@ -1,64 +1,60 @@
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";
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";
6
- import { r as ue } from "../../bugs-diTMAGNw.js";
7
- import { H as fe } from "../../field-C1kt7aNM.js";
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-B0lm_zyn.js";
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-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
+ import { r as be } from "../../bugs-diTMAGNw.js";
7
+ import { H as ue } from "../../field-FJ34aSs4.js";
8
8
  import { c as me } from "../../index-DIxK0V-G.js";
9
- import { Icon as pe } from "../../icons/Icon.js";
10
- import '../../assets/CheckboxMimir.css';let he = "span";
11
- function ke(h, k) {
12
- let r = Q(), o = oe(), d = te(), { id: l = o || `headlessui-checkbox-${r}`, disabled: e = d || !1, autoFocus: t = !1, checked: b, defaultChecked: u, onChange: v, name: c, value: E, form: I, indeterminate: f = !1, ...H } = h, s = ce(u), [n, i] = se(b, v, s ?? !1), N = ne(), R = ie(), K = W(), [_, g] = F(!1), C = m(() => {
13
- g(!0), i == null || i(!n), K.nextFrame(() => {
14
- g(!1);
9
+ import { Icon as fe } from "../../icons/Icon.js";
10
+ import '../../assets/CheckboxMimir.css';let pe = "span";
11
+ function he(u, m) {
12
+ let n = J(), f = ae(), s = oe(), { id: i = f || `headlessui-checkbox-${n}`, disabled: e = s || !1, autoFocus: a = !1, checked: P, defaultChecked: j, onChange: y, name: v, value: F, form: I, indeterminate: l = !1, ...H } = u, o = te(j), [t, c] = ce(P, y, o ?? !1), N = ne(), R = se(), E = V(), [k, x] = Q(!1), $ = d(() => {
13
+ x(!0), c == null || c(!t), E.nextFrame(() => {
14
+ x(!1);
15
15
  });
16
- }), T = m((a) => {
17
- if (ue(a.currentTarget)) return a.preventDefault();
18
- a.preventDefault(), C();
19
- }), M = m((a) => {
20
- a.key === y.Space ? (a.preventDefault(), C()) : a.key === y.Enter && le(a.currentTarget);
21
- }), w = m((a) => a.preventDefault()), { isFocusVisible: D, focusProps: G } = X({ autoFocus: t }), { isHovered: P, hoverProps: S } = q({ isDisabled: e }), { pressed: j, pressProps: U } = re({ disabled: e }), A = z({ ref: k, id: l, role: "checkbox", "aria-checked": f ? "mixed" : n ? "true" : "false", "aria-labelledby": N, "aria-describedby": R, "aria-disabled": e ? !0 : void 0, indeterminate: f ? "true" : void 0, tabIndex: e ? void 0 : 0, onKeyUp: e ? void 0 : M, onKeyPress: e ? void 0 : w, onClick: e ? void 0 : T }, G, S, U), B = Y(() => ({ checked: n, disabled: e, hover: P, focus: D, active: j, indeterminate: f, changing: _, autofocus: t }), [n, f, e, P, D, j, _, t]), L = Z(() => {
22
- if (s !== void 0) return i == null ? void 0 : i(s);
23
- }, [i, s]);
24
- return $.createElement($.Fragment, null, c != null && $.createElement(de, { disabled: e, data: { [c]: E || "on" }, overrides: { type: "checkbox", checked: n }, form: I, onReset: L }), J({ ourProps: A, theirProps: H, slot: B, defaultTag: he, name: "Checkbox" }));
16
+ }), K = d((r) => {
17
+ if (be(r.currentTarget)) return r.preventDefault();
18
+ r.preventDefault(), $();
19
+ }), T = d((r) => {
20
+ r.key === D.Space ? (r.preventDefault(), $()) : r.key === D.Enter && le(r.currentTarget);
21
+ }), M = d((r) => r.preventDefault()), { isFocusVisible: _, focusProps: w } = W({ autoFocus: a }), { isHovered: g, hoverProps: G } = X({ isDisabled: e }), { pressed: C, pressProps: S } = re({ disabled: e }), U = q({ ref: m, id: i, role: "checkbox", "aria-checked": l ? "mixed" : t ? "true" : "false", "aria-labelledby": N, "aria-describedby": R, "aria-disabled": e ? !0 : void 0, indeterminate: l ? "true" : void 0, tabIndex: e ? void 0 : 0, onKeyUp: e ? void 0 : T, onKeyPress: e ? void 0 : M, onClick: e ? void 0 : K }, w, G, S), A = Y(() => ({ checked: t, disabled: e, hover: g, focus: _, active: C, indeterminate: l, changing: k, autofocus: a }), [t, l, e, g, _, C, k, a]), B = Z(() => {
22
+ if (o !== void 0) return c == null ? void 0 : c(o);
23
+ }, [c, o]);
24
+ return h.createElement(h.Fragment, null, v != null && h.createElement(ie, { disabled: e, data: { [v]: F || "on" }, overrides: { type: "checkbox", checked: t }, form: I, onReset: B }), z({ ourProps: U, theirProps: H, slot: A, defaultTag: pe, name: "Checkbox" }));
25
25
  }
26
- let ve = V(ke);
27
- const xe = "_container_13bjb_2", $e = "_checkbox_13bjb_8", _e = "_label_13bjb_27", ge = "_enabled_13bjb_31", p = {
28
- container: xe,
29
- checkbox: $e,
30
- label: _e,
31
- enabled: ge
26
+ let ve = O(he);
27
+ const ke = "_container_13bjb_2", xe = "_checkbox_13bjb_8", $e = "_label_13bjb_27", _e = "_enabled_13bjb_31", b = {
28
+ container: ke,
29
+ checkbox: xe,
30
+ label: $e,
31
+ enabled: _e
32
32
  }, Ne = ee(
33
- (h, k) => {
33
+ (u, m) => {
34
34
  const {
35
- checked: r,
36
- onChange: o,
37
- children: d,
38
- id: l,
35
+ checked: n,
36
+ onChange: f,
37
+ children: s,
38
+ id: i,
39
39
  isInteractive: e = !0,
40
- ...t
41
- } = h, [b, u] = F(r), v = (c) => {
42
- e && (u(c), o == null || o(c));
43
- };
44
- return ae(() => {
45
- r !== void 0 && u(r);
46
- }, [r]), /* @__PURE__ */ O(fe, { className: p.container, children: [
47
- /* @__PURE__ */ x(
40
+ ...a
41
+ } = u;
42
+ return /* @__PURE__ */ L(ue, { className: b.container, children: [
43
+ /* @__PURE__ */ p(
48
44
  ve,
49
45
  {
50
- id: l,
51
- ref: k,
52
- checked: b,
53
- onChange: v,
54
- className: me(p.checkbox, {
55
- [p.enabled]: b
46
+ id: i,
47
+ ref: m,
48
+ checked: n,
49
+ onChange: e ? f : void 0,
50
+ className: me(b.checkbox, {
51
+ [b.enabled]: n
56
52
  }),
57
- ...t,
58
- children: /* @__PURE__ */ x(pe, { iconName: "Done16px" })
53
+ ...a,
54
+ children: /* @__PURE__ */ p(fe, { iconName: "Done16px" })
59
55
  }
60
56
  ),
61
- d && /* @__PURE__ */ x(be, { htmlFor: l, className: p.label, children: d })
57
+ s && /* @__PURE__ */ p(de, { htmlFor: i, className: b.label, children: s })
62
58
  ] });
63
59
  }
64
60
  );
@@ -49,6 +49,14 @@ type TProps = {
49
49
  footer?: ReactNode | ((props: {
50
50
  handleClose: VoidFunction;
51
51
  }) => JSX.Element);
52
+ /**
53
+ * Дополнительный класс для title.
54
+ */
55
+ classNameTitle?: string;
56
+ /**
57
+ * Дополнительный класс для header.
58
+ */
59
+ classNameHeader?: string;
52
60
  /**
53
61
  * Дополнительный класс для inner.
54
62
  */
@@ -69,5 +77,5 @@ type TProps = {
69
77
  /**
70
78
  * Компонент шторки, который может выезжать слева, справа или внизу.
71
79
  */
72
- export declare const Drawer: ({ isOpen, onClose, title, className, unmount, isLoading, stickyHeader, fullBottomHeight, position, paddingRight, footer, children, classNameInner, classNameFooter, closeOnClickOutside, showCloseButton }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element | null;
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;
73
81
  export {};