mimir-ui-kit 1.38.6 → 1.38.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{combobox-DgSZTriw.js → combobox-CVtJDVoZ.js} +251 -254
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.js +3 -3
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/Dropdown/Dropdown.js +32 -32
- package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +1 -0
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +175 -157
- package/dist/components/MultiSelectSearch/constants.d.ts +3 -0
- package/dist/components/MultiSelectSearch/constants.js +6 -2
- package/dist/components/MultiSelectSearch/types.d.ts +4 -0
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -0
- package/dist/components/MultiSelectSearch/utils.js +19 -14
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.js +21 -21
- package/dist/components/Slider/Slider.d.ts +21 -8
- package/dist/components/Slider/Slider.js +388 -383
- package/dist/components/Switcher/Switcher.js +4 -4
- package/dist/components/TabTrail/TabTrail.js +4 -4
- package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
- package/dist/{focus-management-BtPpk3D1.js → focus-management-DE4t_lW3.js} +1 -1
- package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
- package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
- package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
- package/dist/open-closed-CdldUPoq.js +86 -0
- package/dist/portal-WDFNoIMz.js +1908 -0
- package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
- package/package.json +1 -1
- package/dist/open-closed-D2VjDhAN.js +0 -86
- package/dist/portal-DPqg52FR.js +0 -1946
@@ -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 $, 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-
|
11
|
-
import { w as he } from "../../use-active-press-
|
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
12
|
import { e as ve } from "../../use-resolve-button-type-DhFdPxnv.js";
|
13
|
-
import { c as $e, i as R, u as ge,
|
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
14
|
import { C as Ne } from "../../close-provider-CEutdhG8.js";
|
15
15
|
import { r as Ce } from "../../bugs-diTMAGNw.js";
|
16
16
|
import '../../assets/Accordion.css';var ne;
|
@@ -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-
|
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-
|
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-
|
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-
|
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";
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { jsx as le, jsxs as
|
1
|
+
import { jsx as le, jsxs as Ae, Fragment as Le } from "react/jsx-runtime";
|
2
2
|
import { c as ae } from "../../index-DIxK0V-G.js";
|
3
3
|
import S, { createContext as te, useState as ne, useContext as oe, useRef as Q, useReducer as Ge, createRef as Pe, useMemo as R, useEffect as se, useId as ie, memo as Ke } from "react";
|
4
|
-
import { o as E, u as we, M as ce, W as z, y as V, T as Ue, s as Te, a as q, H as re, $ as je, b as qe, D as ye, I as Je, n as We, c as U } from "../../keyboard-
|
5
|
-
import { w as Xe } from "../../use-active-press-
|
6
|
-
import { n as fe, s as Ze, e as Qe, E as Ve, R as Ye,
|
4
|
+
import { o as E, u as we, M as ce, W as z, y as V, T as Ue, s as Te, a as q, H as re, $ as je, b as qe, D as ye, I as Je, n as We, c as U } from "../../keyboard-B0lm_zyn.js";
|
5
|
+
import { w as Xe } from "../../use-active-press-86hajhdd.js";
|
6
|
+
import { n as fe, s as Ze, e as Qe, E as Ve, R as Ye, v as ze, y as et, x as tt, a as nt, b as ot, m as rt, f as lt, d as at, t as ut } from "../../portal-WDFNoIMz.js";
|
7
7
|
import { e as st } from "../../use-resolve-button-type-DhFdPxnv.js";
|
8
|
-
import { T as pe, s as de } from "../../hidden-
|
9
|
-
import { c as it, i as Y, u as _e,
|
8
|
+
import { T as pe, s as de } from "../../hidden-DbgtYPOH.js";
|
9
|
+
import { c as it, i as Y, u as _e, R as Be, H as Fe, s as ct } from "../../open-closed-CdldUPoq.js";
|
10
10
|
import { C as pt } from "../../close-provider-CEutdhG8.js";
|
11
11
|
import { r as ke } from "../../bugs-diTMAGNw.js";
|
12
|
-
import { b as Se, P as j, F as
|
12
|
+
import { b as Se, P as j, F as H, A as dt, h as ft, T as $e } from "../../focus-management-DE4t_lW3.js";
|
13
13
|
import '../../assets/Dropdown.css';function vt({ defaultContainers: e = [], portals: n, mainTreeNode: s } = {}) {
|
14
14
|
let P = fe(s), i = E(() => {
|
15
15
|
var c, d;
|
@@ -23,7 +23,7 @@ import '../../assets/Dropdown.css';function vt({ defaultContainers: e = [], port
|
|
23
23
|
}
|
24
24
|
let Ce = te(null);
|
25
25
|
function xe({ children: e, node: n }) {
|
26
|
-
let [s, P] = ne(null), i =
|
26
|
+
let [s, P] = ne(null), i = Oe(n ?? s);
|
27
27
|
return S.createElement(Ce.Provider, { value: i }, e, i === null && S.createElement(pe, { features: de.Hidden, ref: (c) => {
|
28
28
|
var d, r;
|
29
29
|
if (c) {
|
@@ -34,12 +34,12 @@ function xe({ children: e, node: n }) {
|
|
34
34
|
}
|
35
35
|
} }));
|
36
36
|
}
|
37
|
-
function
|
37
|
+
function Oe(e = null) {
|
38
38
|
var n;
|
39
39
|
return (n = oe(Ce)) != null ? n : e;
|
40
40
|
}
|
41
41
|
var D = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(D || {});
|
42
|
-
function
|
42
|
+
function Me() {
|
43
43
|
let e = Q(0);
|
44
44
|
return Ze(!0, "keydown", (n) => {
|
45
45
|
n.key === "Tab" && (e.current = n.shiftKey ? 1 : 0);
|
@@ -104,19 +104,19 @@ function ht(e, n) {
|
|
104
104
|
return (u = x == null ? void 0 : x.isFocusWithinPopoverGroup()) != null ? u : (T == null ? void 0 : T.activeElement) && ((t == null ? void 0 : t.contains(T.activeElement)) || (h == null ? void 0 : h.contains(T.activeElement)));
|
105
105
|
});
|
106
106
|
se(() => w == null ? void 0 : w(W), [w, W]);
|
107
|
-
let [
|
107
|
+
let [A, B] = Qe(), L = Oe(t), O = vt({ mainTreeNode: L, portals: A, defaultContainers: [t, h] });
|
108
108
|
Ve(T == null ? void 0 : T.defaultView, "focus", (u) => {
|
109
109
|
var l, a, m, v, F, _;
|
110
|
-
u.target !== window && u.target instanceof HTMLElement && y === 0 && (X() || t && h && (
|
111
|
-
}, !0), Ye(y === 0,
|
110
|
+
u.target !== window && u.target instanceof HTMLElement && y === 0 && (X() || t && h && (O.contains(u.target) || (a = (l = f.current) == null ? void 0 : l.contains) != null && a.call(l, u.target) || (v = (m = b.current) == null ? void 0 : m.contains) != null && v.call(m, u.target) || (_ = (F = p.current) == null ? void 0 : F.contains) != null && _.call(F, u.target) || $({ type: 1 })));
|
111
|
+
}, !0), Ye(y === 0, O.resolveContainers, (u, l) => {
|
112
112
|
$({ type: 1 }), dt(l, ft.Loose) || (u.preventDefault(), t == null || t.focus());
|
113
113
|
});
|
114
|
-
let
|
114
|
+
let M = E((u) => {
|
115
115
|
$({ type: 1 });
|
116
116
|
let l = u ? u instanceof HTMLElement ? u : "current" in u && u.current instanceof HTMLElement ? u.current : t : t;
|
117
117
|
l == null || l.focus();
|
118
|
-
}), Z = R(() => ({ close:
|
119
|
-
return S.createElement(xe, { node:
|
118
|
+
}), Z = R(() => ({ close: M, isPortalled: k }), [M, k]), ee = R(() => ({ open: y === 0, close: M }), [y, M]), G = { ref: d };
|
119
|
+
return S.createElement(xe, { node: L }, S.createElement(ze, null, S.createElement(be.Provider, { value: null }, S.createElement(he.Provider, { value: o }, S.createElement(me.Provider, { value: Z }, S.createElement(pt, { value: M }, S.createElement(it, { value: q(y, { 0: Y.Open, 1: Y.Closed }) }, S.createElement(B, null, re({ ourProps: G, theirProps: i, slot: ee, defaultTag: St, name: "Popover" })))))))));
|
120
120
|
}
|
121
121
|
let Et = "button";
|
122
122
|
function gt(e, n) {
|
@@ -163,15 +163,15 @@ function gt(e, n) {
|
|
163
163
|
ke(l.currentTarget) || i || (f ? (o({ type: 1 }), (a = r.button) == null || a.focus()) : (l.preventDefault(), l.stopPropagation(), r.popoverState === 1 && (I == null || I(r.buttonId)), o({ type: 0 }), (m = r.button) == null || m.focus()));
|
164
164
|
}), W = E((l) => {
|
165
165
|
l.preventDefault(), l.stopPropagation();
|
166
|
-
}), { isFocusVisible: x, focusProps: w } = je({ autoFocus: c }), { isHovered: X, hoverProps:
|
166
|
+
}), { isFocusVisible: x, focusProps: w } = je({ autoFocus: c }), { isHovered: X, hoverProps: A } = qe({ isDisabled: i }), { pressed: B, pressProps: L } = Xe({ disabled: i }), O = r.popoverState === 0, M = R(() => ({ open: O, active: B || O, disabled: i, hover: X, focus: x, autofocus: c }), [O, X, x, B, i, c]), Z = st(e, r.button), ee = f ? ye({ ref: $, type: Z, onKeyDown: k, onClick: C, disabled: i || void 0, autoFocus: c }, w, A, L) : ye({ ref: p, id: r.buttonId, type: Z, "aria-expanded": r.popoverState === 0, "aria-controls": r.panel ? r.panelId : void 0, disabled: i || void 0, autoFocus: c, onKeyDown: k, onKeyUp: J, onClick: C, onMouseDown: W }, w, A, L), G = Me(), u = E(() => {
|
167
167
|
let l = r.panel;
|
168
168
|
if (!l) return;
|
169
169
|
function a() {
|
170
|
-
q(G.current, { [D.Forwards]: () => j(l,
|
170
|
+
q(G.current, { [D.Forwards]: () => j(l, H.First), [D.Backwards]: () => j(l, H.Last) }) === $e.Error && j(Se().filter((m) => m.dataset.headlessuiFocusGuard !== "true"), q(G.current, { [D.Forwards]: H.Next, [D.Backwards]: H.Previous }), { relativeTo: r.button });
|
171
171
|
}
|
172
172
|
a();
|
173
173
|
});
|
174
|
-
return S.createElement(S.Fragment, null, re({ ourProps: ee, theirProps: d, slot:
|
174
|
+
return S.createElement(S.Fragment, null, re({ ourProps: ee, theirProps: d, slot: M, defaultTag: Et, name: "Popover.Button" }), O && !f && y && S.createElement(pe, { id: g, ref: r.afterButtonSentinel, features: de.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: u }));
|
175
175
|
}
|
176
176
|
let It = "div", Tt = ce.RenderStrategy | ce.Static;
|
177
177
|
function Re(e, n) {
|
@@ -189,13 +189,13 @@ function Bt(e, n) {
|
|
189
189
|
We(() => (g({ type: 5, panelId: P }), () => {
|
190
190
|
g({ type: 5, panelId: null });
|
191
191
|
}), [P, g]);
|
192
|
-
let
|
192
|
+
let A = _e(), [B, L] = Be(o, C, A !== null ? (A & Y.Open) === Y.Open : t.popoverState === 0);
|
193
193
|
rt(B, t.button, () => {
|
194
194
|
g({ type: 1 });
|
195
195
|
});
|
196
|
-
let
|
197
|
-
lt(
|
198
|
-
let
|
196
|
+
let O = t.__demoMode ? !1 : r && B;
|
197
|
+
lt(O, w);
|
198
|
+
let M = E((a) => {
|
199
199
|
var m;
|
200
200
|
switch (a.key) {
|
201
201
|
case U.Escape:
|
@@ -210,19 +210,19 @@ function Bt(e, n) {
|
|
210
210
|
}, [t.popoverState, e.unmount, e.static, g]), se(() => {
|
211
211
|
if (t.__demoMode || !i || t.popoverState !== 0 || !p.current) return;
|
212
212
|
let a = w == null ? void 0 : w.activeElement;
|
213
|
-
p.current.contains(a) || j(p.current,
|
213
|
+
p.current.contains(a) || j(p.current, H.First);
|
214
214
|
}, [t.__demoMode, i, p.current, t.popoverState]);
|
215
|
-
let Z = R(() => ({ open: t.popoverState === 0, close: h }), [t.popoverState, h]), ee = ye($ ? J() : {}, { ref: x, id: P, onKeyDown:
|
215
|
+
let Z = R(() => ({ open: t.popoverState === 0, close: h }), [t.popoverState, h]), ee = ye($ ? J() : {}, { ref: x, id: P, onKeyDown: M, onBlur: i && t.popoverState === 0 ? (a) => {
|
216
216
|
var m, v, F, _, K;
|
217
217
|
let N = a.relatedTarget;
|
218
218
|
N && p.current && ((m = p.current) != null && m.contains(N) || (g({ type: 1 }), ((F = (v = t.beforePanelSentinel.current) == null ? void 0 : v.contains) != null && F.call(v, N) || (K = (_ = t.afterPanelSentinel.current) == null ? void 0 : _.contains) != null && K.call(_, N)) && N.focus({ preventScroll: !0 })));
|
219
|
-
} : void 0, tabIndex: -1, style: { ...y.style, ...k, "--button-width": at(t.button, !0).width }, ...Fe(
|
219
|
+
} : void 0, tabIndex: -1, style: { ...y.style, ...k, "--button-width": at(t.button, !0).width }, ...Fe(L) }), G = Me(), u = E(() => {
|
220
220
|
let a = p.current;
|
221
221
|
if (!a) return;
|
222
222
|
function m() {
|
223
223
|
q(G.current, { [D.Forwards]: () => {
|
224
224
|
var v;
|
225
|
-
j(a,
|
225
|
+
j(a, H.First) === $e.Error && ((v = t.afterPanelSentinel.current) == null || v.focus());
|
226
226
|
}, [D.Backwards]: () => {
|
227
227
|
var v;
|
228
228
|
(v = t.button) == null || v.focus({ preventScroll: !0 });
|
@@ -240,10 +240,10 @@ function Bt(e, n) {
|
|
240
240
|
let Ie = K.indexOf(N);
|
241
241
|
Ie !== -1 && K.splice(Ie, 1);
|
242
242
|
}
|
243
|
-
j(K,
|
243
|
+
j(K, H.First, { sorted: !1 });
|
244
244
|
}, [D.Backwards]: () => {
|
245
245
|
var v;
|
246
|
-
j(a,
|
246
|
+
j(a, H.Previous) === $e.Error && ((v = t.button) == null || v.focus());
|
247
247
|
} });
|
248
248
|
}
|
249
249
|
m();
|
@@ -275,7 +275,7 @@ function kt(e, n) {
|
|
275
275
|
}), t = R(() => ({ registerPopover: r, unregisterPopover: d, isFocusWithinPopoverGroup: o, closeOthers: y }), [r, d, o, y]), g = R(() => ({}), []), h = e, I = { ref: P };
|
276
276
|
return S.createElement(xe, null, S.createElement(ge.Provider, { value: t }, re({ ourProps: I, theirProps: h, slot: g, defaultTag: Ft, name: "Popover.Group" })));
|
277
277
|
}
|
278
|
-
let Ct = z(ht), De = z(gt), xt = z(Re),
|
278
|
+
let Ct = z(ht), De = z(gt), xt = z(Re), Ot = z(Re), He = z(Bt), Mt = z(kt), Nt = Object.assign(Ct, { Button: De, Backdrop: Ot, Overlay: xt, Panel: He, Group: Mt });
|
279
279
|
const Rt = "_menu_1tfih_3", ue = {
|
280
280
|
menu: Rt,
|
281
281
|
"menu-button": "_menu-button_1tfih_6",
|
@@ -297,7 +297,7 @@ const Rt = "_menu_1tfih_3", ue = {
|
|
297
297
|
as: "div",
|
298
298
|
className: ae(ue.menu, P),
|
299
299
|
...s,
|
300
|
-
children: ({ close: o }) => /* @__PURE__ */ Le
|
300
|
+
children: ({ close: o }) => /* @__PURE__ */ Ae(Le, { children: [
|
301
301
|
/* @__PURE__ */ le(
|
302
302
|
De,
|
303
303
|
{
|
@@ -307,7 +307,7 @@ const Rt = "_menu_1tfih_3", ue = {
|
|
307
307
|
}
|
308
308
|
),
|
309
309
|
/* @__PURE__ */ le(
|
310
|
-
|
310
|
+
He,
|
311
311
|
{
|
312
312
|
anchor: n,
|
313
313
|
className: ae(ue["menu-items"], c),
|