mimir-ui-kit 1.41.4 → 1.41.6
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.
- package/dist/{Input-DAmc_HxO.js → Input-BU_6U1CW.js} +63 -63
- package/dist/assets/CardTrail.css +1 -1
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/Dropdown.css +1 -1
- package/dist/assets/Image.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/RadioGroup.css +1 -1
- package/dist/assets/ScrollBar.css +1 -0
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Timer.css +1 -1
- package/dist/assets/stories.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/components/CardTrail/CardTrail.d.ts +8 -0
- package/dist/components/CardTrail/CardTrail.js +82 -80
- package/dist/components/CardTrail/constants.d.ts +2 -0
- package/dist/components/CardTrail/constants.js +4 -2
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.js +74 -74
- package/dist/components/Dropdown/Dropdown.js +121 -121
- package/dist/components/Image/Image.js +12 -12
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +28 -28
- package/dist/components/Pagination/Pagination.js +28 -28
- package/dist/components/RadioGroup/RadioGroup.js +79 -79
- package/dist/components/ScrollBar/ScrollBar.d.ts +17 -0
- package/dist/components/ScrollBar/ScrollBar.js +22 -0
- package/dist/components/ScrollBar/constants.d.ts +8 -0
- package/dist/components/ScrollBar/constants.js +5 -0
- package/dist/components/SelectSearch/SelectSearch.js +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Slider/Slider.js +40 -40
- package/dist/components/Table/ColumnOrderSettings.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCard.js +1 -1
- package/dist/components/Table/TableCardsView.js +1 -1
- package/dist/components/Table/TableFilters.js +1 -1
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Table/TableScrollButtons.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/Timer/Timer.js +6 -6
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stories.module-DBGkpJ-O.js +29 -0
- package/dist/styles.module-9m98aUhp.js +36 -0
- package/package.json +6 -2
- package/src/assets/styles/mixins/animations.scss +3 -0
- package/src/assets/styles/mixins/index.scss +3 -0
- package/src/assets/styles/mixins/media.scss +21 -0
- package/src/assets/styles/mixins/scrollbar.scss +43 -0
- package/dist/stories.module-fud786VB.js +0 -29
- package/dist/styles.module--QBQYoA9.js +0 -36
@@ -1,19 +1,19 @@
|
|
1
1
|
import { jsx as de, jsxs as Ae, Fragment as nt } from "react/jsx-runtime";
|
2
2
|
import { c as ve } from "../../index-DIxK0V-G.js";
|
3
|
-
import
|
3
|
+
import $, { createContext as ae, useState as X, useContext as ee, useRef as k, useEffect as ie, useMemo as U, Fragment as pe, useReducer as rt, createRef as Ie, useId as be, memo as ot, useCallback as me } from "react";
|
4
4
|
import { Button as lt } from "../Button/Button.js";
|
5
5
|
import { o as S, u as He, M as fe, W as V, y as z, O as oe, n as se, m as at, e as ut, H as ue, s as Fe, p as st, a as Q, T as it, $ as ct, b as dt, D as Ce, I as pt, c as re } from "../../keyboard-CUMsrFX1.js";
|
6
6
|
import { w as ft } from "../../use-active-press-BVQqDQ3V.js";
|
7
|
-
import { n as
|
7
|
+
import { n as ye, s as vt, l as De, e as mt, E as bt, R as ht, v as Pt, y as yt, x as gt, a as $t, b as Et, m as St, f as Tt, d as _t, t as wt } from "../../portal-C_u5auU1.js";
|
8
8
|
import { e as It } from "../../use-resolve-button-type-DhFdPxnv.js";
|
9
9
|
import { T as he, s as Pe } from "../../hidden-Dn4lM6EL.js";
|
10
|
-
import { R as Oe, H as Me, i as
|
10
|
+
import { R as Oe, H as Me, i as G, c as je, u as ge, s as Ft } from "../../open-closed-CkTbpRyi.js";
|
11
11
|
import { C as Ct } from "../../close-provider-CEutdhG8.js";
|
12
|
-
import { r as
|
12
|
+
import { r as Ge } from "../../bugs-diTMAGNw.js";
|
13
13
|
import { b as xe, P as le, F as Y, A as Bt, h as kt, T as Be } from "../../focus-management-Dp2_vbQ3.js";
|
14
14
|
import { f as Ot } from "../../use-is-mounted-D7cq4xsa.js";
|
15
15
|
import '../../assets/Dropdown.css';function Mt({ defaultContainers: e = [], portals: t, mainTreeNode: o } = {}) {
|
16
|
-
let d =
|
16
|
+
let d = ye(o), v = S(() => {
|
17
17
|
var b, m;
|
18
18
|
let l = [];
|
19
19
|
for (let r of e) r !== null && (r instanceof HTMLElement ? l.push(r) : "current" in r && r.current instanceof HTMLElement && l.push(r.current));
|
@@ -23,10 +23,10 @@ import '../../assets/Dropdown.css';function Mt({ defaultContainers: e = [], port
|
|
23
23
|
});
|
24
24
|
return { resolveContainers: v, contains: S((b) => v().some((m) => m.contains(b))) };
|
25
25
|
}
|
26
|
-
let
|
27
|
-
function
|
26
|
+
let Ke = ae(null);
|
27
|
+
function Ue({ children: e, node: t }) {
|
28
28
|
let [o, d] = X(null), v = Xe(t ?? o);
|
29
|
-
return
|
29
|
+
return $.createElement(Ke.Provider, { value: v }, e, v === null && $.createElement(he, { features: Pe.Hidden, ref: (b) => {
|
30
30
|
var m, l;
|
31
31
|
if (b) {
|
32
32
|
for (let r of (l = (m = He(b)) == null ? void 0 : m.querySelectorAll("html > *, body > *")) != null ? l : []) if (r !== document.body && r !== document.head && r instanceof HTMLElement && r != null && r.contains(b)) {
|
@@ -38,7 +38,7 @@ function je({ children: e, node: t }) {
|
|
38
38
|
}
|
39
39
|
function Xe(e = null) {
|
40
40
|
var t;
|
41
|
-
return (t = ee(
|
41
|
+
return (t = ee(Ke)) != null ? t : e;
|
42
42
|
}
|
43
43
|
var J = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(J || {});
|
44
44
|
function We() {
|
@@ -49,23 +49,23 @@ function We() {
|
|
49
49
|
}
|
50
50
|
function Ze(e) {
|
51
51
|
var t;
|
52
|
-
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : Je) !== pe ||
|
52
|
+
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : Je) !== pe || $.Children.count(e.children) === 1;
|
53
53
|
}
|
54
|
-
let
|
55
|
-
|
54
|
+
let $e = ae(null);
|
55
|
+
$e.displayName = "TransitionContext";
|
56
56
|
var xt = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(xt || {});
|
57
57
|
function Nt() {
|
58
|
-
let e = ee(
|
58
|
+
let e = ee($e);
|
59
59
|
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
60
60
|
return e;
|
61
61
|
}
|
62
62
|
function Rt() {
|
63
|
-
let e = ee(
|
63
|
+
let e = ee(Ee);
|
64
64
|
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
65
65
|
return e;
|
66
66
|
}
|
67
|
-
let
|
68
|
-
|
67
|
+
let Ee = ae(null);
|
68
|
+
Ee.displayName = "NestingContext";
|
69
69
|
function Se(e) {
|
70
70
|
return "children" in e ? Se(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
|
71
71
|
}
|
@@ -83,88 +83,88 @@ function qe(e, t) {
|
|
83
83
|
}), l = S((c) => {
|
84
84
|
let a = d.current.find(({ el: i }) => i === c);
|
85
85
|
return a ? a.state !== "visible" && (a.state = "visible") : d.current.push({ el: c, state: "visible" }), () => m(c, oe.Unmount);
|
86
|
-
}), r = k([]), h = k(Promise.resolve()), n = k({ enter: [], leave: [] }),
|
86
|
+
}), r = k([]), h = k(Promise.resolve()), n = k({ enter: [], leave: [] }), g = S((c, a, i) => {
|
87
87
|
r.current.splice(0), t && (t.chains.current[a] = t.chains.current[a].filter(([u]) => u !== c)), t == null || t.chains.current[a].push([c, new Promise((u) => {
|
88
88
|
r.current.push(u);
|
89
89
|
})]), t == null || t.chains.current[a].push([c, new Promise((u) => {
|
90
|
-
Promise.all(n.current[a].map(([
|
90
|
+
Promise.all(n.current[a].map(([y, I]) => I)).then(() => u());
|
91
91
|
})]), a === "enter" ? h.current = h.current.then(() => t == null ? void 0 : t.wait.current).then(() => i(a)) : i(a);
|
92
92
|
}), P = S((c, a, i) => {
|
93
|
-
Promise.all(n.current[a].splice(0).map(([u,
|
93
|
+
Promise.all(n.current[a].splice(0).map(([u, y]) => y)).then(() => {
|
94
94
|
var u;
|
95
95
|
(u = r.current.shift()) == null || u();
|
96
96
|
}).then(() => i(a));
|
97
97
|
});
|
98
|
-
return
|
98
|
+
return U(() => ({ children: d, register: l, unregister: m, onStart: g, onStop: P, wait: h, chains: n }), [l, m, d, g, P, n, h]);
|
99
99
|
}
|
100
100
|
let Je = pe, Qe = fe.RenderStrategy;
|
101
101
|
function Lt(e, t) {
|
102
102
|
var o, d;
|
103
|
-
let { transition: v = !0, beforeEnter: b, afterEnter: m, beforeLeave: l, afterLeave: r, enter: h, enterFrom: n, enterTo:
|
104
|
-
se(() => R(
|
105
|
-
if (D === oe.Hidden &&
|
103
|
+
let { transition: v = !0, beforeEnter: b, afterEnter: m, beforeLeave: l, afterLeave: r, enter: h, enterFrom: n, enterTo: g, entered: P, leave: c, leaveFrom: a, leaveTo: i, ...u } = e, [y, I] = X(null), E = k(null), C = Ze(e), N = z(...C ? [E, t, I] : t === null ? [] : [t]), D = (o = u.unmount) == null || o ? oe.Unmount : oe.Hidden, { show: F, appear: B, initial: j } = Nt(), [O, M] = X(F ? "visible" : "hidden"), W = Rt(), { register: R, unregister: L } = W;
|
104
|
+
se(() => R(E), [R, E]), se(() => {
|
105
|
+
if (D === oe.Hidden && E.current) {
|
106
106
|
if (F && O !== "visible") {
|
107
107
|
M("visible");
|
108
108
|
return;
|
109
109
|
}
|
110
|
-
return Q(O, { hidden: () => L(
|
110
|
+
return Q(O, { hidden: () => L(E), visible: () => R(E) });
|
111
111
|
}
|
112
|
-
}, [O,
|
112
|
+
}, [O, E, R, L, F, D]);
|
113
113
|
let Z = De();
|
114
114
|
se(() => {
|
115
|
-
if (C && Z && O === "visible" &&
|
116
|
-
}, [
|
117
|
-
let te =
|
118
|
-
f.current || (M("hidden"), L(
|
115
|
+
if (C && Z && O === "visible" && E.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
116
|
+
}, [E, O, Z, C]);
|
117
|
+
let te = j && !B, q = B && F && j, f = k(!1), s = qe(() => {
|
118
|
+
f.current || (M("hidden"), L(E));
|
119
119
|
}, W), p = S((H) => {
|
120
120
|
f.current = !0;
|
121
121
|
let ne = H ? "enter" : "leave";
|
122
|
-
s.onStart(
|
122
|
+
s.onStart(E, ne, (ce) => {
|
123
123
|
ce === "enter" ? b == null || b() : ce === "leave" && (l == null || l());
|
124
124
|
});
|
125
125
|
}), T = S((H) => {
|
126
126
|
let ne = H ? "enter" : "leave";
|
127
|
-
f.current = !1, s.onStop(
|
127
|
+
f.current = !1, s.onStop(E, ne, (ce) => {
|
128
128
|
ce === "enter" ? m == null || m() : ce === "leave" && (r == null || r());
|
129
|
-
}), ne === "leave" && !Se(s) && (M("hidden"), L(
|
129
|
+
}), ne === "leave" && !Se(s) && (M("hidden"), L(E));
|
130
130
|
});
|
131
131
|
ie(() => {
|
132
132
|
C && v || (p(F), T(F));
|
133
133
|
}, [F, C, v]);
|
134
|
-
let _ = !(!v || !C || !Z || te), [, w] = Oe(_,
|
135
|
-
return O === "visible" && (A |=
|
134
|
+
let _ = !(!v || !C || !Z || te), [, w] = Oe(_, y, F, { start: p, end: T }), x = at({ ref: N, className: ((d = ut(u.className, q && h, q && n, w.enter && h, w.enter && w.closed && n, w.enter && !w.closed && g, w.leave && c, w.leave && !w.closed && a, w.leave && w.closed && i, !w.transition && F && P)) == null ? void 0 : d.trim()) || void 0, ...Me(w) }), A = 0;
|
135
|
+
return O === "visible" && (A |= G.Open), O === "hidden" && (A |= G.Closed), w.enter && (A |= G.Opening), w.leave && (A |= G.Closing), $.createElement(Ee.Provider, { value: s }, $.createElement(je, { value: A }, ue({ ourProps: x, theirProps: u, defaultTag: Je, features: Qe, visible: O === "visible", name: "Transition.Child" })));
|
136
136
|
}
|
137
137
|
function At(e, t) {
|
138
138
|
let { show: o, appear: d = !1, unmount: v = !0, ...b } = e, m = k(null), l = Ze(e), r = z(...l ? [m, t] : t === null ? [] : [t]);
|
139
139
|
De();
|
140
|
-
let h =
|
141
|
-
if (o === void 0 && h !== null && (o = (h &
|
142
|
-
let [n,
|
143
|
-
o ||
|
140
|
+
let h = ge();
|
141
|
+
if (o === void 0 && h !== null && (o = (h & G.Open) === G.Open), o === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
142
|
+
let [n, g] = X(o ? "visible" : "hidden"), P = qe(() => {
|
143
|
+
o || g("hidden");
|
144
144
|
}), [c, a] = X(!0), i = k([o]);
|
145
145
|
se(() => {
|
146
146
|
c !== !1 && i.current[i.current.length - 1] !== o && (i.current.push(o), a(!1));
|
147
147
|
}, [i, o]);
|
148
|
-
let u =
|
148
|
+
let u = U(() => ({ show: o, appear: d, initial: c }), [o, d, c]);
|
149
149
|
se(() => {
|
150
|
-
o ?
|
150
|
+
o ? g("visible") : !Se(P) && m.current !== null && g("hidden");
|
151
151
|
}, [o, P]);
|
152
|
-
let
|
152
|
+
let y = { unmount: v }, I = S(() => {
|
153
153
|
var C;
|
154
154
|
c && a(!1), (C = e.beforeEnter) == null || C.call(e);
|
155
|
-
}),
|
155
|
+
}), E = S(() => {
|
156
156
|
var C;
|
157
157
|
c && a(!1), (C = e.beforeLeave) == null || C.call(e);
|
158
158
|
});
|
159
|
-
return
|
159
|
+
return $.createElement(Ee.Provider, { value: P }, $.createElement($e.Provider, { value: u }, ue({ ourProps: { ...y, as: pe, children: $.createElement(Ve, { ref: r, ...y, ...b, beforeEnter: I, beforeLeave: E }) }, theirProps: {}, defaultTag: pe, features: Qe, visible: n === "visible", name: "Transition" })));
|
160
160
|
}
|
161
161
|
function Ht(e, t) {
|
162
|
-
let o = ee(
|
163
|
-
return
|
162
|
+
let o = ee($e) !== null, d = ge() !== null;
|
163
|
+
return $.createElement($.Fragment, null, !o && d ? $.createElement(ke, { ref: t, ...e }) : $.createElement(Ve, { ref: t, ...e }));
|
164
164
|
}
|
165
|
-
let ke = V(At), Ve = V(Lt), Dt = V(Ht),
|
166
|
-
var
|
167
|
-
let
|
165
|
+
let ke = V(At), Ve = V(Lt), Dt = V(Ht), jt = Object.assign(ke, { Child: Dt, Root: ke });
|
166
|
+
var Gt = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Gt || {}), Kt = ((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))(Kt || {});
|
167
|
+
let Ut = { 0: (e) => ({ ...e, popoverState: Q(e.popoverState, { 0: 1, 1: 0 }), __demoMode: !1 }), 1(e) {
|
168
168
|
return e.popoverState === 1 ? e : { ...e, popoverState: 1, __demoMode: !1 };
|
169
169
|
}, 2(e, t) {
|
170
170
|
return e.button === t.button ? e : { ...e, button: t.button };
|
@@ -205,19 +205,19 @@ function Xt() {
|
|
205
205
|
return ee(we);
|
206
206
|
}
|
207
207
|
function Wt(e, t) {
|
208
|
-
return Q(t.type,
|
208
|
+
return Q(t.type, Ut, e, t);
|
209
209
|
}
|
210
210
|
let Zt = "div";
|
211
211
|
function qt(e, t) {
|
212
212
|
var o;
|
213
213
|
let { __demoMode: d = !1, ...v } = e, b = k(null), m = z(t, it((f) => {
|
214
214
|
b.current = f;
|
215
|
-
})), l = k([]), r = rt(Wt, { __demoMode: d, popoverState: d ? 0 : 1, buttons: l, button: null, buttonId: null, panel: null, panelId: null, beforePanelSentinel: Ie(), afterPanelSentinel: Ie(), afterButtonSentinel: Ie() }), [{ popoverState: h, button: n, buttonId:
|
215
|
+
})), l = k([]), r = rt(Wt, { __demoMode: d, popoverState: d ? 0 : 1, buttons: l, button: null, buttonId: null, panel: null, panelId: null, beforePanelSentinel: Ie(), afterPanelSentinel: Ie(), afterButtonSentinel: Ie() }), [{ popoverState: h, button: n, buttonId: g, panel: P, panelId: c, beforePanelSentinel: a, afterPanelSentinel: i, afterButtonSentinel: u }, y] = r, I = ye((o = b.current) != null ? o : n), E = U(() => {
|
216
216
|
if (!n || !P) return !1;
|
217
217
|
for (let x of document.querySelectorAll("body > *")) if (Number(x == null ? void 0 : x.contains(n)) ^ Number(x == null ? void 0 : x.contains(P))) return !0;
|
218
218
|
let f = xe(), s = f.indexOf(n), p = (s + f.length - 1) % f.length, T = (s + 1) % f.length, _ = f[p], w = f[T];
|
219
219
|
return !P.contains(_) && !P.contains(w);
|
220
|
-
}, [n, P]), C = Fe(
|
220
|
+
}, [n, P]), C = Fe(g), N = Fe(c), D = U(() => ({ buttonId: C, panelId: N, close: () => y({ type: 1 }) }), [C, N, y]), F = Ye(), B = F == null ? void 0 : F.registerPopover, j = S(() => {
|
221
221
|
var f;
|
222
222
|
return (f = F == null ? void 0 : F.isFocusWithinPopoverGroup()) != null ? f : (I == null ? void 0 : I.activeElement) && ((n == null ? void 0 : n.contains(I.activeElement)) || (P == null ? void 0 : P.contains(I.activeElement)));
|
223
223
|
});
|
@@ -225,26 +225,26 @@ function qt(e, t) {
|
|
225
225
|
let [O, M] = mt(), W = Xe(n), R = Mt({ mainTreeNode: W, portals: O, defaultContainers: [n, P] });
|
226
226
|
bt(I == null ? void 0 : I.defaultView, "focus", (f) => {
|
227
227
|
var s, p, T, _, w, x;
|
228
|
-
f.target !== window && f.target instanceof HTMLElement && h === 0 && (
|
228
|
+
f.target !== window && f.target instanceof HTMLElement && h === 0 && (j() || n && P && (R.contains(f.target) || (p = (s = a.current) == null ? void 0 : s.contains) != null && p.call(s, f.target) || (_ = (T = i.current) == null ? void 0 : T.contains) != null && _.call(T, f.target) || (x = (w = u.current) == null ? void 0 : w.contains) != null && x.call(w, f.target) || y({ type: 1 })));
|
229
229
|
}, !0), ht(h === 0, R.resolveContainers, (f, s) => {
|
230
|
-
|
230
|
+
y({ type: 1 }), Bt(s, kt.Loose) || (f.preventDefault(), n == null || n.focus());
|
231
231
|
});
|
232
232
|
let L = S((f) => {
|
233
|
-
|
233
|
+
y({ type: 1 });
|
234
234
|
let s = f ? f instanceof HTMLElement ? f : "current" in f && f.current instanceof HTMLElement ? f.current : n : n;
|
235
235
|
s == null || s.focus();
|
236
|
-
}), Z =
|
237
|
-
return
|
236
|
+
}), Z = U(() => ({ close: L, isPortalled: E }), [L, E]), te = U(() => ({ open: h === 0, close: L }), [h, L]), q = { ref: m };
|
237
|
+
return $.createElement(Ue, { node: W }, $.createElement(Pt, null, $.createElement(we.Provider, { value: null }, $.createElement(Ne.Provider, { value: r }, $.createElement(_e.Provider, { value: Z }, $.createElement(Ct, { value: L }, $.createElement(je, { value: Q(h, { 0: G.Open, 1: G.Closed }) }, $.createElement(M, null, ue({ ourProps: q, theirProps: v, slot: te, defaultTag: Zt, name: "Popover" })))))))));
|
238
238
|
}
|
239
239
|
let Jt = "button";
|
240
240
|
function Qt(e, t) {
|
241
|
-
let o = be(), { id: d = `headlessui-popover-button-${o}`, disabled: v = !1, autoFocus: b = !1, ...m } = e, [l, r] = Te("Popover.Button"), { isPortalled: h } = Re("Popover.Button"), n = k(null),
|
241
|
+
let o = be(), { id: d = `headlessui-popover-button-${o}`, disabled: v = !1, autoFocus: b = !1, ...m } = e, [l, r] = Te("Popover.Button"), { isPortalled: h } = Re("Popover.Button"), n = k(null), g = `headlessui-focus-sentinel-${be()}`, P = Ye(), c = P == null ? void 0 : P.closeOthers, a = Xt() !== null;
|
242
242
|
ie(() => {
|
243
243
|
if (!a) return r({ type: 3, buttonId: d }), () => {
|
244
244
|
r({ type: 3, buttonId: null });
|
245
245
|
};
|
246
246
|
}, [a, d, r]);
|
247
|
-
let [i] = X(() => Symbol()), u = z(n, t,
|
247
|
+
let [i] = X(() => Symbol()), u = z(n, t, yt(), S((s) => {
|
248
248
|
if (!a) {
|
249
249
|
if (s) l.buttons.current.push(i);
|
250
250
|
else {
|
@@ -253,7 +253,7 @@ function Qt(e, t) {
|
|
253
253
|
}
|
254
254
|
l.buttons.current.length > 1 && console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."), s && r({ type: 2, button: s });
|
255
255
|
}
|
256
|
-
})),
|
256
|
+
})), y = z(n, t), I = ye(n), E = S((s) => {
|
257
257
|
var p, T, _;
|
258
258
|
if (a) {
|
259
259
|
if (l.popoverState === 1) return;
|
@@ -278,10 +278,10 @@ function Qt(e, t) {
|
|
278
278
|
a || s.key === re.Space && s.preventDefault();
|
279
279
|
}), N = S((s) => {
|
280
280
|
var p, T;
|
281
|
-
|
281
|
+
Ge(s.currentTarget) || v || (a ? (r({ type: 1 }), (p = l.button) == null || p.focus()) : (s.preventDefault(), s.stopPropagation(), l.popoverState === 1 && (c == null || c(l.buttonId)), r({ type: 0 }), (T = l.button) == null || T.focus()));
|
282
282
|
}), D = S((s) => {
|
283
283
|
s.preventDefault(), s.stopPropagation();
|
284
|
-
}), { isFocusVisible: F, focusProps: B } = ct({ autoFocus: b }), { isHovered:
|
284
|
+
}), { isFocusVisible: F, focusProps: B } = ct({ autoFocus: b }), { isHovered: j, hoverProps: O } = dt({ isDisabled: v }), { pressed: M, pressProps: W } = ft({ disabled: v }), R = l.popoverState === 0, L = U(() => ({ open: R, active: M || R, disabled: v, hover: j, focus: F, autofocus: b }), [R, j, F, M, v, b]), Z = It(e, l.button), te = a ? Ce({ ref: y, type: Z, onKeyDown: E, onClick: N, disabled: v || void 0, autoFocus: b }, B, O, W) : Ce({ ref: u, id: l.buttonId, type: Z, "aria-expanded": l.popoverState === 0, "aria-controls": l.panel ? l.panelId : void 0, disabled: v || void 0, autoFocus: b, onKeyDown: E, onKeyUp: C, onClick: N, onMouseDown: D }, B, O, W), q = We(), f = S(() => {
|
285
285
|
let s = l.panel;
|
286
286
|
if (!s) return;
|
287
287
|
function p() {
|
@@ -289,27 +289,27 @@ function Qt(e, t) {
|
|
289
289
|
}
|
290
290
|
p();
|
291
291
|
});
|
292
|
-
return
|
292
|
+
return $.createElement($.Fragment, null, ue({ ourProps: te, theirProps: m, slot: L, defaultTag: Jt, name: "Popover.Button" }), R && !a && h && $.createElement(he, { id: g, ref: l.afterButtonSentinel, features: Pe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: f }));
|
293
293
|
}
|
294
294
|
let Vt = "div", Yt = fe.RenderStrategy | fe.Static;
|
295
295
|
function ze(e, t) {
|
296
|
-
let o = be(), { id: d = `headlessui-popover-backdrop-${o}`, transition: v = !1, ...b } = e, [{ popoverState: m }, l] = Te("Popover.Backdrop"), [r, h] = X(null), n = z(t, h),
|
297
|
-
if (
|
296
|
+
let o = be(), { id: d = `headlessui-popover-backdrop-${o}`, transition: v = !1, ...b } = e, [{ popoverState: m }, l] = Te("Popover.Backdrop"), [r, h] = X(null), n = z(t, h), g = ge(), [P, c] = Oe(v, r, g !== null ? (g & G.Open) === G.Open : m === 0), a = S((y) => {
|
297
|
+
if (Ge(y.currentTarget)) return y.preventDefault();
|
298
298
|
l({ type: 1 });
|
299
|
-
}), i =
|
299
|
+
}), i = U(() => ({ open: m === 0 }), [m]), u = { ref: n, id: d, "aria-hidden": !0, onClick: a, ...Me(c) };
|
300
300
|
return ue({ ourProps: u, theirProps: b, slot: i, defaultTag: Vt, features: Yt, visible: P, name: "Popover.Backdrop" });
|
301
301
|
}
|
302
302
|
let zt = "div", en = fe.RenderStrategy | fe.Static;
|
303
303
|
function tn(e, t) {
|
304
|
-
let o = be(), { id: d = `headlessui-popover-panel-${o}`, focus: v = !1, anchor: b, portal: m = !1, modal: l = !1, transition: r = !1, ...h } = e, [n,
|
305
|
-
|
306
|
-
let [N, D] = X(null), F = z(u, t,
|
307
|
-
se(() => (
|
308
|
-
|
309
|
-
}), [d,
|
310
|
-
let O =
|
304
|
+
let o = be(), { id: d = `headlessui-popover-panel-${o}`, focus: v = !1, anchor: b, portal: m = !1, modal: l = !1, transition: r = !1, ...h } = e, [n, g] = Te("Popover.Panel"), { close: P, isPortalled: c } = Re("Popover.Panel"), a = `headlessui-focus-sentinel-before-${o}`, i = `headlessui-focus-sentinel-after-${o}`, u = k(null), y = gt(b), [I, E] = $t(y), C = Et();
|
305
|
+
y && (m = !0);
|
306
|
+
let [N, D] = X(null), F = z(u, t, y ? I : null, S((p) => g({ type: 4, panel: p })), D), B = ye(u), j = pt();
|
307
|
+
se(() => (g({ type: 5, panelId: d }), () => {
|
308
|
+
g({ type: 5, panelId: null });
|
309
|
+
}), [d, g]);
|
310
|
+
let O = ge(), [M, W] = Oe(r, N, O !== null ? (O & G.Open) === G.Open : n.popoverState === 0);
|
311
311
|
St(M, n.button, () => {
|
312
|
-
|
312
|
+
g({ type: 1 });
|
313
313
|
});
|
314
314
|
let R = n.__demoMode ? !1 : l && M;
|
315
315
|
Tt(R, B);
|
@@ -318,23 +318,23 @@ function tn(e, t) {
|
|
318
318
|
switch (p.key) {
|
319
319
|
case re.Escape:
|
320
320
|
if (n.popoverState !== 0 || !u.current || B != null && B.activeElement && !u.current.contains(B.activeElement)) return;
|
321
|
-
p.preventDefault(), p.stopPropagation(),
|
321
|
+
p.preventDefault(), p.stopPropagation(), g({ type: 1 }), (T = n.button) == null || T.focus();
|
322
322
|
break;
|
323
323
|
}
|
324
324
|
});
|
325
325
|
ie(() => {
|
326
326
|
var p;
|
327
|
-
e.static || n.popoverState === 1 && ((p = e.unmount) == null || p) &&
|
328
|
-
}, [n.popoverState, e.unmount, e.static,
|
327
|
+
e.static || n.popoverState === 1 && ((p = e.unmount) == null || p) && g({ type: 4, panel: null });
|
328
|
+
}, [n.popoverState, e.unmount, e.static, g]), ie(() => {
|
329
329
|
if (n.__demoMode || !v || n.popoverState !== 0 || !u.current) return;
|
330
330
|
let p = B == null ? void 0 : B.activeElement;
|
331
331
|
u.current.contains(p) || le(u.current, Y.First);
|
332
332
|
}, [n.__demoMode, v, u.current, n.popoverState]);
|
333
|
-
let Z =
|
333
|
+
let Z = U(() => ({ open: n.popoverState === 0, close: P }), [n.popoverState, P]), te = Ce(y ? C() : {}, { ref: F, id: d, onKeyDown: L, onBlur: v && n.popoverState === 0 ? (p) => {
|
334
334
|
var T, _, w, x, A;
|
335
335
|
let H = p.relatedTarget;
|
336
|
-
H && u.current && ((T = u.current) != null && T.contains(H) || (
|
337
|
-
} : void 0, tabIndex: -1, style: { ...h.style, ...
|
336
|
+
H && u.current && ((T = u.current) != null && T.contains(H) || (g({ type: 1 }), ((w = (_ = n.beforePanelSentinel.current) == null ? void 0 : _.contains) != null && w.call(_, H) || (A = (x = n.afterPanelSentinel.current) == null ? void 0 : x.contains) != null && A.call(x, H)) && H.focus({ preventScroll: !0 })));
|
337
|
+
} : void 0, tabIndex: -1, style: { ...h.style, ...E, "--button-width": _t(n.button, !0).width }, ...Me(W) }), q = We(), f = S(() => {
|
338
338
|
let p = u.current;
|
339
339
|
if (!p) return;
|
340
340
|
function T() {
|
@@ -366,7 +366,7 @@ function tn(e, t) {
|
|
366
366
|
}
|
367
367
|
T();
|
368
368
|
});
|
369
|
-
return
|
369
|
+
return $.createElement(Ft, null, $.createElement(we.Provider, { value: d }, $.createElement(_e.Provider, { value: { close: P, isPortalled: c } }, $.createElement(wt, { enabled: m ? e.static || M : !1 }, M && c && $.createElement(he, { id: a, ref: n.beforePanelSentinel, features: Pe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: f }), ue({ mergeRefs: j, ourProps: te, theirProps: h, slot: Z, defaultTag: zt, features: en, visible: M, name: "Popover.Panel" }), M && c && $.createElement(he, { id: i, ref: n.afterPanelSentinel, features: Pe.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: s })))));
|
370
370
|
}
|
371
371
|
let nn = "div";
|
372
372
|
function rn(e, t) {
|
@@ -374,8 +374,8 @@ function rn(e, t) {
|
|
374
374
|
b((i) => {
|
375
375
|
let u = i.indexOf(a);
|
376
376
|
if (u !== -1) {
|
377
|
-
let
|
378
|
-
return
|
377
|
+
let y = i.slice();
|
378
|
+
return y.splice(u, 1), y;
|
379
379
|
}
|
380
380
|
return i;
|
381
381
|
});
|
@@ -384,28 +384,28 @@ function rn(e, t) {
|
|
384
384
|
let i = He(o);
|
385
385
|
if (!i) return !1;
|
386
386
|
let u = i.activeElement;
|
387
|
-
return (a = o.current) != null && a.contains(u) ? !0 : v.some((
|
388
|
-
var I,
|
389
|
-
return ((I = i.getElementById(
|
387
|
+
return (a = o.current) != null && a.contains(u) ? !0 : v.some((y) => {
|
388
|
+
var I, E;
|
389
|
+
return ((I = i.getElementById(y.buttonId.current)) == null ? void 0 : I.contains(u)) || ((E = i.getElementById(y.panelId.current)) == null ? void 0 : E.contains(u));
|
390
390
|
});
|
391
391
|
}), h = S((a) => {
|
392
392
|
for (let i of v) i.buttonId.current !== a && i.close();
|
393
|
-
}), n =
|
394
|
-
return
|
393
|
+
}), n = U(() => ({ registerPopover: l, unregisterPopover: m, isFocusWithinPopoverGroup: r, closeOthers: h }), [l, m, r, h]), g = U(() => ({}), []), P = e, c = { ref: d };
|
394
|
+
return $.createElement(Ue, null, $.createElement(Le.Provider, { value: n }, ue({ ourProps: c, theirProps: P, slot: g, defaultTag: nn, name: "Popover.Group" })));
|
395
395
|
}
|
396
396
|
let on = V(qt), et = V(Qt), ln = V(ze), an = V(ze), tt = V(tn), un = V(rn), sn = Object.assign(on, { Button: et, Backdrop: an, Overlay: ln, Panel: tt, Group: un });
|
397
|
-
const cn = "
|
397
|
+
const cn = "_menu_dgjyl_2", dn = "_enter_dgjyl_33", pn = "_leave_dgjyl_47", K = {
|
398
398
|
menu: cn,
|
399
|
-
"menu-button": "_menu-
|
400
|
-
"menu-items": "_menu-
|
401
|
-
"menu-items-container": "_menu-items-
|
402
|
-
"close-button": "_close-
|
399
|
+
"menu-button": "_menu-button_dgjyl_5",
|
400
|
+
"menu-items": "_menu-items_dgjyl_10",
|
401
|
+
"menu-items-container": "_menu-items-container_dgjyl_21",
|
402
|
+
"close-button": "_close-button_dgjyl_27",
|
403
403
|
enter: dn,
|
404
|
-
"enter-from": "_enter-
|
405
|
-
"enter-to": "_enter-
|
404
|
+
"enter-from": "_enter-from_dgjyl_37",
|
405
|
+
"enter-to": "_enter-to_dgjyl_42",
|
406
406
|
leave: pn,
|
407
|
-
"leave-from": "_leave-
|
408
|
-
"leave-to": "_leave-
|
407
|
+
"leave-from": "_leave-from_dgjyl_51",
|
408
|
+
"leave-to": "_leave-to_dgjyl_56"
|
409
409
|
}, In = 300, Fn = ot(
|
410
410
|
({
|
411
411
|
children: e,
|
@@ -419,25 +419,25 @@ const cn = "_menu_1o2uo_3", dn = "_enter_1o2uo_34", pn = "_leave_1o2uo_48", U =
|
|
419
419
|
needCloseButton: r,
|
420
420
|
openOnHover: h = !1,
|
421
421
|
isOpen: n = !1,
|
422
|
-
autoCloseTimeout:
|
422
|
+
autoCloseTimeout: g = 0
|
423
423
|
}) => {
|
424
|
-
const [P, c] = X(n), [a, i] = X(!1), u = k(null),
|
424
|
+
const [P, c] = X(n), [a, i] = X(!1), u = k(null), y = k(null), I = k(null), E = me(() => {
|
425
425
|
u.current && clearTimeout(u.current);
|
426
426
|
}, []), C = me(() => {
|
427
|
-
|
427
|
+
g > 0 && !a && (u.current = setTimeout(() => {
|
428
428
|
c(!1), i(!0);
|
429
|
-
},
|
430
|
-
}, [
|
431
|
-
ie(() => (P ? C() :
|
432
|
-
|
433
|
-
}), [P, C,
|
429
|
+
}, g));
|
430
|
+
}, [g, a]);
|
431
|
+
ie(() => (P ? C() : E(), () => {
|
432
|
+
E();
|
433
|
+
}), [P, C, E]);
|
434
434
|
const N = me(() => {
|
435
435
|
h && c(!0);
|
436
436
|
}, [h]), D = me(
|
437
437
|
(F) => {
|
438
438
|
if (h) {
|
439
439
|
const B = F.relatedTarget;
|
440
|
-
|
440
|
+
y.current && !y.current.contains(B) && I.current && !I.current.contains(B) && c(!1);
|
441
441
|
}
|
442
442
|
},
|
443
443
|
[h]
|
@@ -446,34 +446,34 @@ const cn = "_menu_1o2uo_3", dn = "_enter_1o2uo_34", pn = "_leave_1o2uo_48", U =
|
|
446
446
|
sn,
|
447
447
|
{
|
448
448
|
as: "div",
|
449
|
-
className: ve(
|
449
|
+
className: ve(K.menu, d),
|
450
450
|
...o,
|
451
451
|
children: ({ open: F, close: B }) => {
|
452
|
-
const
|
452
|
+
const j = () => {
|
453
453
|
B(), c(!1);
|
454
454
|
};
|
455
455
|
return /* @__PURE__ */ Ae(nt, { children: [
|
456
456
|
/* @__PURE__ */ de(
|
457
457
|
et,
|
458
458
|
{
|
459
|
-
ref:
|
459
|
+
ref: y,
|
460
460
|
onMouseEnter: N,
|
461
461
|
onMouseLeave: D,
|
462
|
-
className: ve(
|
462
|
+
className: ve(K["menu-button"], v),
|
463
463
|
children: l
|
464
464
|
}
|
465
465
|
),
|
466
466
|
/* @__PURE__ */ de(
|
467
|
-
|
467
|
+
jt,
|
468
468
|
{
|
469
469
|
show: P || F,
|
470
470
|
as: pe,
|
471
|
-
enter:
|
472
|
-
enterFrom:
|
473
|
-
enterTo:
|
474
|
-
leave:
|
475
|
-
leaveFrom:
|
476
|
-
leaveTo:
|
471
|
+
enter: K.enter,
|
472
|
+
enterFrom: K["enter-from"],
|
473
|
+
enterTo: K["enter-to"],
|
474
|
+
leave: K.leave,
|
475
|
+
leaveFrom: K["leave-from"],
|
476
|
+
leaveTo: K["leave-to"],
|
477
477
|
children: /* @__PURE__ */ Ae(
|
478
478
|
tt,
|
479
479
|
{
|
@@ -481,26 +481,26 @@ const cn = "_menu_1o2uo_3", dn = "_enter_1o2uo_34", pn = "_leave_1o2uo_48", U =
|
|
481
481
|
anchor: t,
|
482
482
|
onMouseEnter: N,
|
483
483
|
onMouseLeave: D,
|
484
|
-
className: ve(
|
484
|
+
className: ve(K["menu-items"], b),
|
485
485
|
children: [
|
486
486
|
r && /* @__PURE__ */ de(
|
487
487
|
lt,
|
488
488
|
{
|
489
489
|
isIconButton: !0,
|
490
490
|
iconName: "Close16px",
|
491
|
-
onClick:
|
491
|
+
onClick: j,
|
492
492
|
clear: !0,
|
493
|
-
className:
|
493
|
+
className: K["close-button"]
|
494
494
|
}
|
495
495
|
),
|
496
496
|
/* @__PURE__ */ de(
|
497
497
|
"div",
|
498
498
|
{
|
499
499
|
className: ve(
|
500
|
-
|
500
|
+
K["menu-items-container"],
|
501
501
|
m
|
502
502
|
),
|
503
|
-
children: typeof e == "function" ? e({ close:
|
503
|
+
children: typeof e == "function" ? e({ close: j }) : e
|
504
504
|
}
|
505
505
|
)
|
506
506
|
]
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { jsxs as E, jsx as i } from "react/jsx-runtime";
|
2
2
|
import { c as l } from "../../index-DIxK0V-G.js";
|
3
3
|
import { memo as I, useState as g, useLayoutEffect as N } from "react";
|
4
|
-
import { EMediaQuery as S, EMinMediaQuery as
|
5
|
-
import '../../assets/Image.css';const
|
6
|
-
picture:
|
4
|
+
import { EMediaQuery as S, EMinMediaQuery as y } from "../../hooks/useMediaQuery/constants.js";
|
5
|
+
import '../../assets/Image.css';const b = "_picture_1hx49_2", k = "_image_1hx49_3", L = "_loading_1hx49_10", r = {
|
6
|
+
picture: b,
|
7
7
|
image: k,
|
8
|
-
loading:
|
9
|
-
},
|
8
|
+
loading: L
|
9
|
+
}, z = I((u) => {
|
10
10
|
const {
|
11
11
|
className: d,
|
12
12
|
src: s,
|
@@ -14,18 +14,18 @@ import '../../assets/Image.css';const h = "_picture_1jvym_2", k = "_image_1jvym_
|
|
14
14
|
desktopImage: e,
|
15
15
|
mobileImage: a,
|
16
16
|
pictureClassName: f,
|
17
|
-
errorFallback:
|
18
|
-
fallback:
|
17
|
+
errorFallback: c,
|
18
|
+
fallback: m,
|
19
19
|
..._
|
20
|
-
} = u, [o, n] = g(!0), [
|
20
|
+
} = u, [o, n] = g(!0), [h, x] = g(!1);
|
21
21
|
return N(() => {
|
22
22
|
const t = new Image();
|
23
23
|
t.src = s ?? e ?? a ?? "", t.onload = () => {
|
24
24
|
n(!1);
|
25
25
|
}, t.onerror = () => {
|
26
|
-
n(!1),
|
26
|
+
n(!1), x(!0);
|
27
27
|
};
|
28
|
-
}, [s, e, a]), o &&
|
28
|
+
}, [s, e, a]), o && m ? m : h && c ? c : /* @__PURE__ */ E(
|
29
29
|
"picture",
|
30
30
|
{
|
31
31
|
className: l(r.picture, f, {
|
@@ -33,7 +33,7 @@ import '../../assets/Image.css';const h = "_picture_1jvym_2", k = "_image_1jvym_
|
|
33
33
|
}),
|
34
34
|
children: [
|
35
35
|
a && /* @__PURE__ */ i("source", { srcSet: a, media: S.XS1 }),
|
36
|
-
e && /* @__PURE__ */ i("source", { srcSet: e, media:
|
36
|
+
e && /* @__PURE__ */ i("source", { srcSet: e, media: y.S }),
|
37
37
|
/* @__PURE__ */ i(
|
38
38
|
"img",
|
39
39
|
{
|
@@ -51,5 +51,5 @@ import '../../assets/Image.css';const h = "_picture_1jvym_2", k = "_image_1jvym_
|
|
51
51
|
);
|
52
52
|
});
|
53
53
|
export {
|
54
|
-
|
54
|
+
z as AppImage
|
55
55
|
};
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
2
2
|
import "../../index-DIxK0V-G.js";
|
3
3
|
import "react";
|
4
4
|
import "./constants.js";
|
5
|
-
import { I as f } from "../../Input-
|
5
|
+
import { I as f } from "../../Input-BU_6U1CW.js";
|
6
6
|
import "../../hooks/useMergeRefs/useMergeRefs.js";
|
7
7
|
import "../../icons/Icon.js";
|
8
8
|
import "../Button/Button.js";
|
@@ -3,7 +3,7 @@ import { c } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { memo as w, forwardRef as u, useState as m } from "react";
|
4
4
|
import { Icon as d } from "../../icons/Icon.js";
|
5
5
|
import { Button as _ } from "../Button/Button.js";
|
6
|
-
import { I as l } from "../../Input-
|
6
|
+
import { I as l } from "../../Input-BU_6U1CW.js";
|
7
7
|
import '../../assets/InputPassword.css';const b = "_input_7b9x2_2", x = "_wrapper_7b9x2_6", h = "_button_7b9x2_17", f = "_icon_7b9x2_33", N = "_show_7b9x2_38", t = {
|
8
8
|
input: b,
|
9
9
|
wrapper: x,
|