mimir-ui-kit 1.37.14 → 1.37.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
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";
2
+ import { c as D } from "../../index-DIxK0V-G.js";
3
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
5
  import { EAccordionButtonType as g, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
@@ -7,10 +7,10 @@ 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 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";
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
14
  import { r as Ne } from "../../bugs-diTMAGNw.js";
15
15
  import '../../assets/Accordion.css';let Ce = M(() => {
16
16
  });
@@ -62,18 +62,18 @@ let He = re;
62
62
  function Ke(e, t) {
63
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: n, buttonId: r }, y] = a, l = D((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) => {
66
66
  y({ type: 1 });
67
- let f = $e(s);
67
+ let f = xe(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
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" })))));
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" })))));
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, [n, r] = z("Disclosure.Button"), y = Fe(), l = y === null ? !1 : y === n.panelId, v = oe(null), E = j(v, t, D((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, $((i) => {
77
77
  if (!l) return r({ type: 4, element: i });
78
78
  })), S = ce();
79
79
  se(() => {
@@ -81,7 +81,7 @@ function qe(e, t) {
81
81
  r({ type: 2, buttonId: null });
82
82
  };
83
83
  }, [p, r, l]);
84
- let c = D((i) => {
84
+ let c = $((i) => {
85
85
  var o;
86
86
  if (l) {
87
87
  if (n.disclosureState === 1) return;
@@ -97,28 +97,28 @@ function qe(e, t) {
97
97
  i.preventDefault(), i.stopPropagation(), r({ type: 0 });
98
98
  break;
99
99
  }
100
- }), f = D((i) => {
100
+ }), f = $((i) => {
101
101
  switch (i.key) {
102
102
  case T.Space:
103
103
  i.preventDefault();
104
104
  break;
105
105
  }
106
- }), _ = D((i) => {
106
+ }), _ = $((i) => {
107
107
  var o;
108
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);
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
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, n] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), y = ce(), [l, v] = ae(null), E = j(t, D((h) => {
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
115
  Be(() => n({ type: 5, element: h }));
116
116
  }), v);
117
117
  se(() => (n({ type: 3, panelId: p }), () => {
118
118
  n({ type: 3, panelId: null });
119
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" })));
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" })));
122
122
  }
123
123
  let Ve = q(Ke), ue = q(qe), de = q(Qe), ze = Object.assign(Ve, { Button: ue, Panel: de });
124
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 = {
@@ -157,7 +157,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
157
157
  subtitleNode: c,
158
158
  onlyOpenSubtitleNode: f,
159
159
  classNameSubtitleContainer: _
160
- }, $) => {
160
+ }, x) => {
161
161
  const [h, w] = ae(!1), N = ye(Ee.XS1), k = u === g.LINK, P = {
162
162
  [d["is-link"]]: k
163
163
  }, F = () => {
@@ -167,7 +167,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
167
167
  size: N ? "s" : "l",
168
168
  rightIcon: {
169
169
  iconName: C,
170
- className: x({
170
+ className: D({
171
171
  [d["link-open"]]: o
172
172
  })
173
173
  }
@@ -181,7 +181,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
181
181
  /* @__PURE__ */ I(
182
182
  "span",
183
183
  {
184
- className: x(
184
+ className: D(
185
185
  d.title,
186
186
  l,
187
187
  n && d["title-uppercase"]
@@ -192,7 +192,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
192
192
  /* @__PURE__ */ I(
193
193
  "div",
194
194
  {
195
- className: x(
195
+ className: D(
196
196
  d["icon-container"],
197
197
  o && d.open,
198
198
  t && d.disabled,
@@ -219,20 +219,20 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
219
219
  /* @__PURE__ */ I(
220
220
  "div",
221
221
  {
222
- className: x(
222
+ className: D(
223
223
  d.accordion,
224
224
  d[a],
225
225
  P,
226
226
  E
227
227
  ),
228
- children: /* @__PURE__ */ I(ze, { ref: $, children: ({ open: o, close: H }) => /* @__PURE__ */ A(K, { children: [
228
+ children: /* @__PURE__ */ I(ze, { ref: x, children: ({ open: o, close: H }) => /* @__PURE__ */ A(K, { children: [
229
229
  (!o || s) && /* @__PURE__ */ I(
230
230
  ue,
231
231
  {
232
232
  disabled: t,
233
233
  as: k ? ke : g.BUTTON,
234
234
  onClick: F,
235
- className: x({
235
+ className: D({
236
236
  [d.header]: !k,
237
237
  [d.disabled]: t,
238
238
  [m ?? ""]: k && m
@@ -245,7 +245,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
245
245
  de,
246
246
  {
247
247
  "data-testid": "accordion-panel",
248
- className: x(
248
+ className: D(
249
249
  d.panel,
250
250
  v,
251
251
  P
@@ -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-B0lm_zyn.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-mgWkd2Vh.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-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";
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";
6
6
  import { r as be } from "../../bugs-diTMAGNw.js";
7
- import { H as ue } from "../../field-FJ34aSs4.js";
7
+ import { H as ue } from "../../field-C1kt7aNM.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";
@@ -1,15 +1,15 @@
1
- import { jsxs as b, jsx as o, Fragment as P } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as o, Fragment as j } from "react/jsx-runtime";
2
2
  import { c as r } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as ce, useRef as F, useState as E, useEffect as L, useMemo as ae } from "react";
3
+ import { forwardRef as ce, useRef as P, useState as E, useEffect as L, useMemo as ae } from "react";
4
4
  import { EMultiSelectSearchSize as O } from "./constants.js";
5
- import { getInitialInputValue as j, MULTISELECT_OPEN_EVENT as G, mapSizeToInputSize as U, getDropdownArrowIcon as ue, dispatchMultiselectOpen as I, joinSelectedItems as W } from "./utils.js";
5
+ import { getInitialInputValue as F, MULTISELECT_OPEN_EVENT as G, mapSizeToInputSize as U, getDropdownArrowIcon as ue, dispatchMultiselectOpen as I, joinSelectedItems as H } from "./utils.js";
6
6
  import { Icon as de } from "../../icons/Icon.js";
7
7
  import { Button as pe } from "../Button/Button.js";
8
8
  import { CheckboxMimir as me } from "../CheckboxMimir/CheckboxMimir.js";
9
9
  import { Chip as _e } from "../Chip/Chip.js";
10
- import { I as H } from "../../Input-BYrIS5GU.js";
10
+ import { I as J } from "../../Input-BYrIS5GU.js";
11
11
  import { EInputVariant as he } from "../Input/constants.js";
12
- import { H as fe, U as J, G as K, K as ke, W as qe } from "../../combobox-CDU06zJj.js";
12
+ import { H as fe, U as K, G as W, K as ke, j as qe } from "../../combobox-BpYucpxz.js";
13
13
  import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve = "_container_17kql_9", be = "_full_17kql_27", Ie = "_button_17kql_39", we = "_options_17kql_53", Ne = "_top_17kql_64", Ce = "_bottom_17kql_69", Se = "_m_17kql_2", Me = "_l_17kql_111", Ee = "_focused_17kql_129", Le = "_option_17kql_53", Oe = "_chip_17kql_158", Te = "_clear_17kql_183", t = {
14
14
  "multi-select-search": "_multi-select-search_17kql_2",
15
15
  disabled: ge,
@@ -64,13 +64,13 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
64
64
  disableInput: f = !1,
65
65
  autocomplete: z = "on",
66
66
  id: m = `multiselect-${Math.random().toString(36).slice(2, 11)}`
67
- } = $, S = F(null), _ = F(null), [k, h] = E(!1), [q, g] = E(
68
- () => j(u, p)
67
+ } = $, S = P(null), _ = P(null), [k, h] = E(!1), [q, g] = E(
68
+ () => F(u, p)
69
69
  ), [l, v] = E(
70
70
  u || []
71
71
  );
72
72
  L(() => {
73
- u && (v(u), JSON.stringify(u) !== JSON.stringify(l) && g(j(u, p)));
73
+ u && (v(u), JSON.stringify(u) !== JSON.stringify(l) && g(F(u, p)));
74
74
  }, [u, p, l]);
75
75
  const V = ae(() => {
76
76
  var n;
@@ -81,7 +81,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
81
81
  );
82
82
  }, [x, d, q, l]), ne = (e) => {
83
83
  v(e), s == null || s(e);
84
- const n = W(e, p);
84
+ const n = H(e, p);
85
85
  g(n), h(!0), I(m), setTimeout(() => {
86
86
  if (_.current) {
87
87
  _.current.focus(), _.current.scrollLeft = _.current.scrollWidth;
@@ -101,7 +101,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
101
101
  const n = l.filter(
102
102
  (a) => a.id !== e.id
103
103
  );
104
- v(n), s == null || s(n), g(W(n, p));
104
+ v(n), s == null || s(n), g(H(n, p));
105
105
  }, B = () => {
106
106
  const e = !k;
107
107
  h(e), e && I(m);
@@ -160,15 +160,15 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
160
160
  children: [
161
161
  f && /* @__PURE__ */ b("div", { className: t["input-container"], children: [
162
162
  /* @__PURE__ */ o(
163
- J,
163
+ K,
164
164
  {
165
165
  disabled: c,
166
166
  style: { width: "100%" },
167
167
  onClick: B,
168
168
  children: /* @__PURE__ */ o(
169
- K,
169
+ W,
170
170
  {
171
- as: H,
171
+ as: J,
172
172
  label: T,
173
173
  size: U(i),
174
174
  className: r(t["multi-select-input"], {
@@ -212,9 +212,9 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
212
212
  )
213
213
  ] }),
214
214
  !f && /* @__PURE__ */ o(
215
- K,
215
+ W,
216
216
  {
217
- as: H,
217
+ as: J,
218
218
  label: T,
219
219
  size: U(i),
220
220
  className: t["multi-select-input"],
@@ -233,7 +233,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
233
233
  rightAddon: {
234
234
  addonType: "react-node",
235
235
  addonContent: Y && /* @__PURE__ */ o(
236
- J,
236
+ K,
237
237
  {
238
238
  className: r(t.button, {
239
239
  [t.disabled]: c
@@ -257,7 +257,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
257
257
  ...D
258
258
  }
259
259
  ),
260
- k && /* @__PURE__ */ o(P, { children: d.length ? V.length ? /* @__PURE__ */ o(
260
+ k && /* @__PURE__ */ o(j, { children: d.length ? V.length ? /* @__PURE__ */ o(
261
261
  ke,
262
262
  {
263
263
  className: r(
@@ -279,7 +279,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
279
279
  [t["option-active"]]: n
280
280
  }
281
281
  ),
282
- children: /* @__PURE__ */ b(P, { children: [
282
+ children: /* @__PURE__ */ b(j, { children: [
283
283
  /* @__PURE__ */ b("div", { className: t["option-inner"], children: [
284
284
  e.name,
285
285
  e.bottom && /* @__PURE__ */ o("div", { children: e.bottom })
@@ -1,10 +1,10 @@
1
1
  import { jsxs as ee, jsx as L, Fragment as _e } from "react/jsx-runtime";
2
- import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-y3ANLTNC.js";
3
- import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-B0lm_zyn.js";
2
+ import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-D4GFpe5F.js";
3
+ import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-mgWkd2Vh.js";
4
4
  import E, { createContext as ce, useId as q, useReducer as xe, useRef as B, useMemo as T, useCallback as Fe, useContext as pe, forwardRef as Ne } from "react";
5
5
  import { u as Ae } from "../../use-by-comparator-CVuf9KBq.js";
6
6
  import { r as fe } from "../../bugs-diTMAGNw.js";
7
- import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-XwV-9qkO.js";
7
+ import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-DOYCPyGg.js";
8
8
  import { c as M } from "../../index-DIxK0V-G.js";
9
9
  import '../../assets/RadioGroup.css';var Se = ((e) => (e[e.RegisterOption = 0] = "RegisterOption", e[e.UnregisterOption = 1] = "UnregisterOption", e))(Se || {});
10
10
  let Le = { 0(e, r) {