mimir-ui-kit 1.37.18 → 1.38.0

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.
Files changed (28) hide show
  1. package/dist/assets/Dropdown.css +1 -0
  2. package/dist/close-provider-CEutdhG8.js +9 -0
  3. package/dist/combobox-CVtJDVoZ.js +980 -0
  4. package/dist/components/Accordion/Accordion.js +91 -95
  5. package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
  6. package/dist/components/Dropdown/Dropdown.d.ts +45 -0
  7. package/dist/components/Dropdown/Dropdown.js +333 -0
  8. package/dist/components/Dropdown/index.d.ts +1 -0
  9. package/dist/components/Dropdown/index.js +4 -0
  10. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +18 -18
  11. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  12. package/dist/components/SelectSearch/SelectSearch.js +21 -21
  13. package/dist/components/Switcher/Switcher.js +4 -4
  14. package/dist/components/TabTrail/TabTrail.js +4 -4
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.js +117 -115
  17. package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
  18. package/dist/{focus-management-DOYCPyGg.js → focus-management-DE4t_lW3.js} +2 -1
  19. package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
  20. package/dist/index.js +141 -139
  21. package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
  22. package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
  23. package/dist/open-closed-CdldUPoq.js +86 -0
  24. package/dist/portal-WDFNoIMz.js +1908 -0
  25. package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
  26. package/package.json +1 -1
  27. package/dist/combobox-BpYucpxz.js +0 -2896
  28. package/dist/open-closed-D2VjDhAN.js +0 -86
@@ -0,0 +1,333 @@
1
+ import { jsx as le, jsxs as Ae, Fragment as Le } from "react/jsx-runtime";
2
+ import { c as ae } from "../../index-DIxK0V-G.js";
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-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
+ import { e as st } from "../../use-resolve-button-type-DhFdPxnv.js";
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
+ import { C as pt } from "../../close-provider-CEutdhG8.js";
11
+ import { r as ke } from "../../bugs-diTMAGNw.js";
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
+ import '../../assets/Dropdown.css';function vt({ defaultContainers: e = [], portals: n, mainTreeNode: s } = {}) {
14
+ let P = fe(s), i = E(() => {
15
+ var c, d;
16
+ let r = [];
17
+ for (let o of e) o !== null && (o instanceof HTMLElement ? r.push(o) : "current" in o && o.current instanceof HTMLElement && r.push(o.current));
18
+ if (n != null && n.current) for (let o of n.current) r.push(o);
19
+ for (let o of (c = P == null ? void 0 : P.querySelectorAll("html > *, body > *")) != null ? c : []) o !== document.body && o !== document.head && o instanceof HTMLElement && o.id !== "headlessui-portal-root" && (s && (o.contains(s) || o.contains((d = s == null ? void 0 : s.getRootNode()) == null ? void 0 : d.host)) || r.some((y) => o.contains(y)) || r.push(o));
20
+ return r;
21
+ });
22
+ return { resolveContainers: i, contains: E((c) => i().some((d) => d.contains(c))) };
23
+ }
24
+ let Ce = te(null);
25
+ function xe({ children: e, node: n }) {
26
+ let [s, P] = ne(null), i = Oe(n ?? s);
27
+ return S.createElement(Ce.Provider, { value: i }, e, i === null && S.createElement(pe, { features: de.Hidden, ref: (c) => {
28
+ var d, r;
29
+ if (c) {
30
+ for (let o of (r = (d = we(c)) == null ? void 0 : d.querySelectorAll("html > *, body > *")) != null ? r : []) if (o !== document.body && o !== document.head && o instanceof HTMLElement && o != null && o.contains(c)) {
31
+ P(o);
32
+ break;
33
+ }
34
+ }
35
+ } }));
36
+ }
37
+ function Oe(e = null) {
38
+ var n;
39
+ return (n = oe(Ce)) != null ? n : e;
40
+ }
41
+ var D = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(D || {});
42
+ function Me() {
43
+ let e = Q(0);
44
+ return Ze(!0, "keydown", (n) => {
45
+ n.key === "Tab" && (e.current = n.shiftKey ? 1 : 0);
46
+ }, !0), e;
47
+ }
48
+ var mt = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(mt || {}), bt = ((e) => (e[e.TogglePopover = 0] = "TogglePopover", e[e.ClosePopover = 1] = "ClosePopover", e[e.SetButton = 2] = "SetButton", e[e.SetButtonId = 3] = "SetButtonId", e[e.SetPanel = 4] = "SetPanel", e[e.SetPanelId = 5] = "SetPanelId", e))(bt || {});
49
+ let Pt = { 0: (e) => ({ ...e, popoverState: q(e.popoverState, { 0: 1, 1: 0 }), __demoMode: !1 }), 1(e) {
50
+ return e.popoverState === 1 ? e : { ...e, popoverState: 1, __demoMode: !1 };
51
+ }, 2(e, n) {
52
+ return e.button === n.button ? e : { ...e, button: n.button };
53
+ }, 3(e, n) {
54
+ return e.buttonId === n.buttonId ? e : { ...e, buttonId: n.buttonId };
55
+ }, 4(e, n) {
56
+ return e.panel === n.panel ? e : { ...e, panel: n.panel };
57
+ }, 5(e, n) {
58
+ return e.panelId === n.panelId ? e : { ...e, panelId: n.panelId };
59
+ } }, he = te(null);
60
+ he.displayName = "PopoverContext";
61
+ function ve(e) {
62
+ let n = oe(he);
63
+ if (n === null) {
64
+ let s = new Error(`<${e} /> is missing a parent <Popover /> component.`);
65
+ throw Error.captureStackTrace && Error.captureStackTrace(s, ve), s;
66
+ }
67
+ return n;
68
+ }
69
+ let me = te(null);
70
+ me.displayName = "PopoverAPIContext";
71
+ function Ee(e) {
72
+ let n = oe(me);
73
+ if (n === null) {
74
+ let s = new Error(`<${e} /> is missing a parent <Popover /> component.`);
75
+ throw Error.captureStackTrace && Error.captureStackTrace(s, Ee), s;
76
+ }
77
+ return n;
78
+ }
79
+ let ge = te(null);
80
+ ge.displayName = "PopoverGroupContext";
81
+ function Ne() {
82
+ return oe(ge);
83
+ }
84
+ let be = te(null);
85
+ be.displayName = "PopoverPanelContext";
86
+ function yt() {
87
+ return oe(be);
88
+ }
89
+ function $t(e, n) {
90
+ return q(n.type, Pt, e, n);
91
+ }
92
+ let St = "div";
93
+ function ht(e, n) {
94
+ var s;
95
+ let { __demoMode: P = !1, ...i } = e, c = Q(null), d = V(n, Ue((u) => {
96
+ c.current = u;
97
+ })), r = Q([]), o = Ge($t, { __demoMode: P, popoverState: P ? 0 : 1, buttons: r, button: null, buttonId: null, panel: null, panelId: null, beforePanelSentinel: Pe(), afterPanelSentinel: Pe(), afterButtonSentinel: Pe() }), [{ popoverState: y, button: t, buttonId: g, panel: h, panelId: I, beforePanelSentinel: f, afterPanelSentinel: b, afterButtonSentinel: p }, $] = o, T = fe((s = c.current) != null ? s : t), k = R(() => {
98
+ if (!t || !h) return !1;
99
+ for (let _ of document.querySelectorAll("body > *")) if (Number(_ == null ? void 0 : _.contains(t)) ^ Number(_ == null ? void 0 : _.contains(h))) return !0;
100
+ let u = Se(), l = u.indexOf(t), a = (l + u.length - 1) % u.length, m = (l + 1) % u.length, v = u[a], F = u[m];
101
+ return !h.contains(v) && !h.contains(F);
102
+ }, [t, h]), J = Te(g), C = Te(I), W = R(() => ({ buttonId: J, panelId: C, close: () => $({ type: 1 }) }), [J, C, $]), x = Ne(), w = x == null ? void 0 : x.registerPopover, X = E(() => {
103
+ var u;
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
+ });
106
+ se(() => w == null ? void 0 : w(W), [w, W]);
107
+ let [A, B] = Qe(), L = Oe(t), O = vt({ mainTreeNode: L, portals: A, defaultContainers: [t, h] });
108
+ Ve(T == null ? void 0 : T.defaultView, "focus", (u) => {
109
+ var l, a, m, v, F, _;
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
+ $({ type: 1 }), dt(l, ft.Loose) || (u.preventDefault(), t == null || t.focus());
113
+ });
114
+ let M = E((u) => {
115
+ $({ type: 1 });
116
+ let l = u ? u instanceof HTMLElement ? u : "current" in u && u.current instanceof HTMLElement ? u.current : t : t;
117
+ l == null || l.focus();
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
+ }
121
+ let Et = "button";
122
+ function gt(e, n) {
123
+ let s = ie(), { id: P = `headlessui-popover-button-${s}`, disabled: i = !1, autoFocus: c = !1, ...d } = e, [r, o] = ve("Popover.Button"), { isPortalled: y } = Ee("Popover.Button"), t = Q(null), g = `headlessui-focus-sentinel-${ie()}`, h = Ne(), I = h == null ? void 0 : h.closeOthers, f = yt() !== null;
124
+ se(() => {
125
+ if (!f) return o({ type: 3, buttonId: P }), () => {
126
+ o({ type: 3, buttonId: null });
127
+ };
128
+ }, [f, P, o]);
129
+ let [b] = ne(() => Symbol()), p = V(t, n, et(), E((l) => {
130
+ if (!f) {
131
+ if (l) r.buttons.current.push(b);
132
+ else {
133
+ let a = r.buttons.current.indexOf(b);
134
+ a !== -1 && r.buttons.current.splice(a, 1);
135
+ }
136
+ r.buttons.current.length > 1 && console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."), l && o({ type: 2, button: l });
137
+ }
138
+ })), $ = V(t, n), T = fe(t), k = E((l) => {
139
+ var a, m, v;
140
+ if (f) {
141
+ if (r.popoverState === 1) return;
142
+ switch (l.key) {
143
+ case U.Space:
144
+ case U.Enter:
145
+ l.preventDefault(), (m = (a = l.target).click) == null || m.call(a), o({ type: 1 }), (v = r.button) == null || v.focus();
146
+ break;
147
+ }
148
+ } else switch (l.key) {
149
+ case U.Space:
150
+ case U.Enter:
151
+ l.preventDefault(), l.stopPropagation(), r.popoverState === 1 && (I == null || I(r.buttonId)), o({ type: 0 });
152
+ break;
153
+ case U.Escape:
154
+ if (r.popoverState !== 0) return I == null ? void 0 : I(r.buttonId);
155
+ if (!t.current || T != null && T.activeElement && !t.current.contains(T.activeElement)) return;
156
+ l.preventDefault(), l.stopPropagation(), o({ type: 1 });
157
+ break;
158
+ }
159
+ }), J = E((l) => {
160
+ f || l.key === U.Space && l.preventDefault();
161
+ }), C = E((l) => {
162
+ var a, m;
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
+ }), W = E((l) => {
165
+ l.preventDefault(), l.stopPropagation();
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
+ let l = r.panel;
168
+ if (!l) return;
169
+ function a() {
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
+ }
172
+ a();
173
+ });
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
+ }
176
+ let It = "div", Tt = ce.RenderStrategy | ce.Static;
177
+ function Re(e, n) {
178
+ let s = ie(), { id: P = `headlessui-popover-backdrop-${s}`, transition: i = !1, ...c } = e, [{ popoverState: d }, r] = ve("Popover.Backdrop"), [o, y] = ne(null), t = V(n, y), g = _e(), [h, I] = Be(i, o, g !== null ? (g & Y.Open) === Y.Open : d === 0), f = E(($) => {
179
+ if (ke($.currentTarget)) return $.preventDefault();
180
+ r({ type: 1 });
181
+ }), b = R(() => ({ open: d === 0 }), [d]), p = { ref: t, id: P, "aria-hidden": !0, onClick: f, ...Fe(I) };
182
+ return re({ ourProps: p, theirProps: c, slot: b, defaultTag: It, features: Tt, visible: h, name: "Popover.Backdrop" });
183
+ }
184
+ let wt = "div", _t = ce.RenderStrategy | ce.Static;
185
+ function Bt(e, n) {
186
+ let s = ie(), { id: P = `headlessui-popover-panel-${s}`, focus: i = !1, anchor: c, portal: d = !1, modal: r = !1, transition: o = !1, ...y } = e, [t, g] = ve("Popover.Panel"), { close: h, isPortalled: I } = Ee("Popover.Panel"), f = `headlessui-focus-sentinel-before-${s}`, b = `headlessui-focus-sentinel-after-${s}`, p = Q(null), $ = tt(c), [T, k] = nt($), J = ot();
187
+ $ && (d = !0);
188
+ let [C, W] = ne(null), x = V(p, n, $ ? T : null, E((a) => g({ type: 4, panel: a })), W), w = fe(p), X = Je();
189
+ We(() => (g({ type: 5, panelId: P }), () => {
190
+ g({ type: 5, panelId: null });
191
+ }), [P, g]);
192
+ let A = _e(), [B, L] = Be(o, C, A !== null ? (A & Y.Open) === Y.Open : t.popoverState === 0);
193
+ rt(B, t.button, () => {
194
+ g({ type: 1 });
195
+ });
196
+ let O = t.__demoMode ? !1 : r && B;
197
+ lt(O, w);
198
+ let M = E((a) => {
199
+ var m;
200
+ switch (a.key) {
201
+ case U.Escape:
202
+ if (t.popoverState !== 0 || !p.current || w != null && w.activeElement && !p.current.contains(w.activeElement)) return;
203
+ a.preventDefault(), a.stopPropagation(), g({ type: 1 }), (m = t.button) == null || m.focus();
204
+ break;
205
+ }
206
+ });
207
+ se(() => {
208
+ var a;
209
+ e.static || t.popoverState === 1 && ((a = e.unmount) == null || a) && g({ type: 4, panel: null });
210
+ }, [t.popoverState, e.unmount, e.static, g]), se(() => {
211
+ if (t.__demoMode || !i || t.popoverState !== 0 || !p.current) return;
212
+ let a = w == null ? void 0 : w.activeElement;
213
+ p.current.contains(a) || j(p.current, H.First);
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: M, onBlur: i && t.popoverState === 0 ? (a) => {
216
+ var m, v, F, _, K;
217
+ let N = a.relatedTarget;
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(L) }), G = Me(), u = E(() => {
220
+ let a = p.current;
221
+ if (!a) return;
222
+ function m() {
223
+ q(G.current, { [D.Forwards]: () => {
224
+ var v;
225
+ j(a, H.First) === $e.Error && ((v = t.afterPanelSentinel.current) == null || v.focus());
226
+ }, [D.Backwards]: () => {
227
+ var v;
228
+ (v = t.button) == null || v.focus({ preventScroll: !0 });
229
+ } });
230
+ }
231
+ m();
232
+ }), l = E(() => {
233
+ let a = p.current;
234
+ if (!a) return;
235
+ function m() {
236
+ q(G.current, { [D.Forwards]: () => {
237
+ if (!t.button) return;
238
+ let v = Se(), F = v.indexOf(t.button), _ = v.slice(0, F + 1), K = [...v.slice(F + 1), ..._];
239
+ for (let N of K.slice()) if (N.dataset.headlessuiFocusGuard === "true" || C != null && C.contains(N)) {
240
+ let Ie = K.indexOf(N);
241
+ Ie !== -1 && K.splice(Ie, 1);
242
+ }
243
+ j(K, H.First, { sorted: !1 });
244
+ }, [D.Backwards]: () => {
245
+ var v;
246
+ j(a, H.Previous) === $e.Error && ((v = t.button) == null || v.focus());
247
+ } });
248
+ }
249
+ m();
250
+ });
251
+ return S.createElement(ct, null, S.createElement(be.Provider, { value: P }, S.createElement(me.Provider, { value: { close: h, isPortalled: I } }, S.createElement(ut, { enabled: d ? e.static || B : !1 }, B && I && S.createElement(pe, { id: f, ref: t.beforePanelSentinel, features: de.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: u }), re({ mergeRefs: X, ourProps: ee, theirProps: y, slot: Z, defaultTag: wt, features: _t, visible: B, name: "Popover.Panel" }), B && I && S.createElement(pe, { id: b, ref: t.afterPanelSentinel, features: de.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: l })))));
252
+ }
253
+ let Ft = "div";
254
+ function kt(e, n) {
255
+ let s = Q(null), P = V(s, n), [i, c] = ne([]), d = E((f) => {
256
+ c((b) => {
257
+ let p = b.indexOf(f);
258
+ if (p !== -1) {
259
+ let $ = b.slice();
260
+ return $.splice(p, 1), $;
261
+ }
262
+ return b;
263
+ });
264
+ }), r = E((f) => (c((b) => [...b, f]), () => d(f))), o = E(() => {
265
+ var f;
266
+ let b = we(s);
267
+ if (!b) return !1;
268
+ let p = b.activeElement;
269
+ return (f = s.current) != null && f.contains(p) ? !0 : i.some(($) => {
270
+ var T, k;
271
+ return ((T = b.getElementById($.buttonId.current)) == null ? void 0 : T.contains(p)) || ((k = b.getElementById($.panelId.current)) == null ? void 0 : k.contains(p));
272
+ });
273
+ }), y = E((f) => {
274
+ for (let b of i) b.buttonId.current !== f && b.close();
275
+ }), t = R(() => ({ registerPopover: r, unregisterPopover: d, isFocusWithinPopoverGroup: o, closeOthers: y }), [r, d, o, y]), g = R(() => ({}), []), h = e, I = { ref: P };
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
+ }
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
+ const Rt = "_menu_1tfih_3", ue = {
280
+ menu: Rt,
281
+ "menu-button": "_menu-button_1tfih_6",
282
+ "menu-items": "_menu-items_1tfih_11",
283
+ "menu-items-container": "_menu-items-container_1tfih_22"
284
+ }, Zt = 300, Qt = Ke(
285
+ ({
286
+ children: e,
287
+ position: n = "bottom end",
288
+ popoverProps: s,
289
+ className: P,
290
+ buttonClassName: i,
291
+ panelClassName: c,
292
+ menuItemsClassName: d,
293
+ buttonContent: r
294
+ }) => /* @__PURE__ */ le(
295
+ Nt,
296
+ {
297
+ as: "div",
298
+ className: ae(ue.menu, P),
299
+ ...s,
300
+ children: ({ close: o }) => /* @__PURE__ */ Ae(Le, { children: [
301
+ /* @__PURE__ */ le(
302
+ De,
303
+ {
304
+ onClick: (y) => y == null ? void 0 : y.stopPropagation(),
305
+ className: ae(ue["menu-button"], i),
306
+ children: r
307
+ }
308
+ ),
309
+ /* @__PURE__ */ le(
310
+ He,
311
+ {
312
+ anchor: n,
313
+ className: ae(ue["menu-items"], c),
314
+ children: /* @__PURE__ */ le(
315
+ "div",
316
+ {
317
+ className: ae(
318
+ ue["menu-items-container"],
319
+ d
320
+ ),
321
+ children: typeof e == "function" ? e({ close: o }) : e
322
+ }
323
+ )
324
+ }
325
+ )
326
+ ] })
327
+ }
328
+ )
329
+ );
330
+ export {
331
+ Zt as ANIMATION_DELAY,
332
+ Qt as Dropdown
333
+ };
@@ -0,0 +1 @@
1
+ export { Dropdown } from './Dropdown';
@@ -0,0 +1,4 @@
1
+ import { Dropdown as p } from "./Dropdown.js";
2
+ export {
3
+ p as Dropdown
4
+ };
@@ -1,15 +1,15 @@
1
- import { jsxs as b, jsx as o, Fragment as j } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as o, Fragment as P } from "react/jsx-runtime";
2
2
  import { c as r } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as ce, useRef as P, useState as E, useEffect as L, useMemo as ae } from "react";
3
+ import { forwardRef as ce, useRef as F, useState as E, useEffect as L, useMemo as ae } from "react";
4
4
  import { EMultiSelectSearchSize as O } from "./constants.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";
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";
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 J } from "../../Input-BYrIS5GU.js";
10
+ import { I as H } from "../../Input-BYrIS5GU.js";
11
11
  import { EInputVariant as he } from "../Input/constants.js";
12
- import { H as fe, U as K, G as W, K as ke, j as qe } from "../../combobox-BpYucpxz.js";
12
+ import { H as fe, U as J, G as K, K as ke, W as qe } from "../../combobox-CVtJDVoZ.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 = P(null), _ = P(null), [k, h] = E(!1), [q, g] = E(
68
- () => F(u, p)
67
+ } = $, S = F(null), _ = F(null), [k, h] = E(!1), [q, g] = E(
68
+ () => j(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(F(u, p)));
73
+ u && (v(u), JSON.stringify(u) !== JSON.stringify(l) && g(j(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 = H(e, p);
84
+ const n = W(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(H(n, p));
104
+ v(n), s == null || s(n), g(W(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
- K,
163
+ J,
164
164
  {
165
165
  disabled: c,
166
166
  style: { width: "100%" },
167
167
  onClick: B,
168
168
  children: /* @__PURE__ */ o(
169
- W,
169
+ K,
170
170
  {
171
- as: J,
171
+ as: H,
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
- W,
215
+ K,
216
216
  {
217
- as: J,
217
+ as: H,
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
- K,
236
+ J,
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(j, { children: d.length ? V.length ? /* @__PURE__ */ o(
260
+ k && /* @__PURE__ */ o(P, { 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(j, { children: [
282
+ children: /* @__PURE__ */ b(P, { 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-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";
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";
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-DOYCPyGg.js";
7
+ import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-DE4t_lW3.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) {
@@ -1,13 +1,13 @@
1
1
  import { jsx as a, jsxs as u, Fragment as z } from "react/jsx-runtime";
2
2
  import { c } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as U, useState as D, useMemo as R, useCallback as $, useEffect as J } from "react";
3
+ import { forwardRef as U, useState as D, useMemo as W, useCallback as R, useEffect as $ } from "react";
4
4
  import { ESelectSearchSize as v } from "./constants.js";
5
- import { mapSizeToInputSize as j, getDropdownArrowIcon as Q } from "./utils.js";
6
- import { Icon as A } from "../../icons/Icon.js";
7
- import { Button as W } from "../Button/Button.js";
8
- import { I as O } from "../../Input-BYrIS5GU.js";
5
+ import { mapSizeToInputSize as A, getDropdownArrowIcon as J } from "./utils.js";
6
+ import { Icon as O } from "../../icons/Icon.js";
7
+ import { Button as Q } from "../Button/Button.js";
8
+ import { I as B } from "../../Input-BYrIS5GU.js";
9
9
  import { EInputVariant as X } from "../Input/constants.js";
10
- import { H as Y, U as B, G as M, K as Z, j as ee } from "../../combobox-BpYucpxz.js";
10
+ import { H as Y, U as M, G as j, K as Z, W as ee } from "../../combobox-CVtJDVoZ.js";
11
11
  import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_container_5nqc2_13", ne = "_full_5nqc2_28", se = "_button_5nqc2_40", ae = "_options_5nqc2_54", ie = "_top_5nqc2_65", ce = "_bottom_5nqc2_71", le = "_m_5nqc2_98", re = "_l_5nqc2_113", de = "_option_5nqc2_54", pe = "_clear_5nqc2_167", e = {
12
12
  "select-search": "_select-search_5nqc2_2",
13
13
  disabled: te,
@@ -55,11 +55,11 @@ import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_co
55
55
  disableInput: r = !1,
56
56
  autocomplete: y = "on",
57
57
  immediate: P = !1
58
- } = E, q = String((n == null ? void 0 : n[G]) || ""), [d, m] = D(q), [N, h] = D(n), k = R(() => !C || n && (n.id || n.name) ? p : d.trim().toLowerCase() ? p.filter(
58
+ } = E, q = String((n == null ? void 0 : n[G]) || ""), [d, m] = D(q), [N, h] = D(n), k = W(() => !C || n && (n.id || n.name) ? p : d.trim().toLowerCase() ? p.filter(
59
59
  (o) => o.name.toLowerCase().includes(d.toLowerCase())
60
60
  ) : p, [d, p, n, C]), T = (o) => {
61
61
  o ? (m(o.name), h(o), s == null || s(o)) : (m(""), h(null), s == null || s({ id: "", name: "" }));
62
- }, x = $(
62
+ }, x = R(
63
63
  (o) => {
64
64
  if (r) return;
65
65
  const t = o.target.value;
@@ -69,7 +69,7 @@ import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_co
69
69
  ), H = () => {
70
70
  m(""), h(null), s == null || s({ id: "", name: "" });
71
71
  };
72
- return J(() => {
72
+ return $(() => {
73
73
  const o = !n || typeof n == "object" && !Object.keys(n).length;
74
74
  m(o ? "" : q), h(o ? null : n);
75
75
  }, [n, q]), /* @__PURE__ */ a(
@@ -95,12 +95,12 @@ import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_co
95
95
  }),
96
96
  children: [
97
97
  r && /* @__PURE__ */ u("div", { style: { position: "relative", width: "100%" }, children: [
98
- /* @__PURE__ */ a(B, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ a(
99
- M,
98
+ /* @__PURE__ */ a(M, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ a(
99
+ j,
100
100
  {
101
- as: O,
101
+ as: B,
102
102
  label: g,
103
- size: j(i),
103
+ size: A(i),
104
104
  className: c(e["select-input"], {
105
105
  [e["select-input-disabled"]]: r && b
106
106
  }),
@@ -116,14 +116,14 @@ import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_co
116
116
  },
117
117
  rightAddon: {
118
118
  addonType: "icon",
119
- addonContent: Q(o, i)
119
+ addonContent: J(o, i)
120
120
  },
121
121
  autocomplete: y,
122
122
  ...S
123
123
  }
124
124
  ) }),
125
125
  b && d && /* @__PURE__ */ a(
126
- W,
126
+ Q,
127
127
  {
128
128
  tabIndex: -1,
129
129
  className: c(e.clear, {
@@ -144,11 +144,11 @@ import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_co
144
144
  )
145
145
  ] }),
146
146
  !r && /* @__PURE__ */ a(
147
- M,
147
+ j,
148
148
  {
149
- as: O,
149
+ as: B,
150
150
  label: g,
151
- size: j(i),
151
+ size: A(i),
152
152
  className: e["select-input"],
153
153
  onChange: x,
154
154
  value: d,
@@ -161,14 +161,14 @@ import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_co
161
161
  rightAddon: w ? {
162
162
  addonType: "react-node",
163
163
  addonContent: w && /* @__PURE__ */ a(
164
- B,
164
+ M,
165
165
  {
166
166
  className: c(e.button, {
167
167
  [e.disabled]: l
168
168
  }),
169
169
  disabled: l,
170
170
  children: /* @__PURE__ */ a(
171
- A,
171
+ O,
172
172
  {
173
173
  iconName: i == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
174
174
  className: c(e["selector-icon"], {
@@ -217,7 +217,7 @@ import '../../assets/SelectSearch.css';const te = "_disabled_5nqc2_6", oe = "_co
217
217
  t.bottom && /* @__PURE__ */ a("div", { children: t.bottom })
218
218
  ] }),
219
219
  N && N.id === t.id && /* @__PURE__ */ a(
220
- A,
220
+ O,
221
221
  {
222
222
  iconName: i === v.M ? "Done16px" : "Done24px",
223
223
  className: e["selected-icon"]
@@ -1,9 +1,9 @@
1
1
  import { jsxs as L, jsx as N } from "react/jsx-runtime";
2
- import { H as te } from "../../field-C1kt7aNM.js";
3
- import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-D4GFpe5F.js";
4
- import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-mgWkd2Vh.js";
2
+ import { H as te } from "../../field-FJ34aSs4.js";
3
+ import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-y3ANLTNC.js";
4
+ import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-B0lm_zyn.js";
5
5
  import u, { createContext as $e, useState as x, useMemo as G, useId as ge, useContext as ve, useRef as ke, useCallback as xe, Fragment as ye, forwardRef as Pe } from "react";
6
- import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
6
+ import { w as Ce } from "../../use-active-press-86hajhdd.js";
7
7
  import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
8
8
  import { r as Fe } from "../../bugs-diTMAGNw.js";
9
9
  import { c as g } from "../../index-DIxK0V-G.js";
@@ -6,11 +6,11 @@ import { ETabTrailSize as Ae } from "./constants.js";
6
6
  import { TabButtons as Se } from "./TabButtons/TabButtons.js";
7
7
  import { ETabTrailButtonVariant as Fe } from "./TabButtons/constants.js";
8
8
  import { NotificationBadge as De } from "../NotificationBadge/NotificationBadge.js";
9
- import { n as W, M as se, W as V, s as j, y as q, o as A, H as z, $ as ce, b as Ne, D as de, a as G, u as Re, c as T, t as Me } from "../../keyboard-mgWkd2Vh.js";
10
- import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
9
+ import { n as W, M as se, W as V, s as j, y as q, o as A, H as z, $ as ce, b as Ne, D as de, a as G, u as Re, c as T, t as Me } from "../../keyboard-B0lm_zyn.js";
10
+ import { w as Ce } from "../../use-active-press-86hajhdd.js";
11
11
  import { e as Le } from "../../use-resolve-button-type-DhFdPxnv.js";
12
- import { T as pe, s as Oe } from "../../hidden-PvGXrYUY.js";
13
- import { _ as B, T as J, P as N, F as I } from "../../focus-management-DOYCPyGg.js";
12
+ import { T as pe, s as Oe } from "../../hidden-DbgtYPOH.js";
13
+ import { _ as B, T as J, P as N, F as I } from "../../focus-management-DE4t_lW3.js";
14
14
  import '../../assets/TabTrail.css';function Be() {
15
15
  let e = U(!1);
16
16
  return W(() => (e.current = !0, () => {
@@ -19,6 +19,7 @@ export { Loader } from './Loader';
19
19
  export { Slider, EProgressBarPosition } from './Slider';
20
20
  export { Drawer } from './Drawer';
21
21
  export { EDrawerPosition } from './Drawer';
22
+ export { Dropdown } from './Dropdown';
22
23
  export { Steps, EStepsSize, EStepColor, type TCommonStepsProps } from './Steps';
23
24
  export { Vote, EVoteSize, type TCommonVoteProps, type TProps } from './Vote';
24
25
  export { SelectSearch, ESelectSearchSize } from './SelectSearch';