@vmscloud/moz-ui-components-react 0.1.54 → 0.1.56
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/components.d.ts +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +378 -354
- package/dist/index.js.map +1 -1
- package/dist/useNotification.d.ts +31 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var q = (e, t, o) =>
|
|
4
|
-
import { createElement as $, createContext as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { createRoot as
|
|
7
|
-
import { koKR as lt, createValidator as
|
|
8
|
-
import { createValidator as
|
|
9
|
-
import { jsx as x, jsxs as
|
|
1
|
+
var At = Object.defineProperty;
|
|
2
|
+
var ht = (e, t, o) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var q = (e, t, o) => ht(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { createElement as $, createContext as K, useContext as D, useRef as I, forwardRef as gt, useState as U, useLayoutEffect as st, useEffect as Q, useImperativeHandle as Ot, Fragment as _t, useMemo as z, Children as ct, isValidElement as W, useId as Z, useCallback as R, cloneElement as V } from "react";
|
|
5
|
+
import { createPortal as Rt } from "react-dom";
|
|
6
|
+
import { createRoot as It } from "react-dom/client";
|
|
7
|
+
import { koKR as lt, createValidator as Lt, useNotification as xt, SPLITPANE_SPEC as Mt, TOOLTIP_SPEC as Nt, POPOVER_SPEC as kt, COLLAPSIBLE_SPEC as wt, AVATAR_SPEC as zt, SCROLLAREA_SPEC as jt, BUTTON_SPEC as Bt, LABEL_SPEC as Ut, BADGE_SPEC as Dt, CHIP_SPEC as Wt, CALLOUT_SPEC as Ft, TOGGLE_SPEC as Kt, BREADCRUMB_SPEC as $t, EMPTYSTATE_SPEC as Vt, CHECKBOX_SPEC as Ht, RADIO_SPEC as Gt, INPUT_SPEC as qt, PASSWORDINPUT_SPEC as Xt, TEXTAREA_SPEC as Yt, NUMBERINPUT_SPEC as Jt, TAB_SPEC as Qt, SLIDER_SPEC as Zt, CALENDAR_SPEC as te, DATEINPUT_SPEC as ee, POPUP_SPEC as oe, SELECT_SPEC as ne, MULTISELECT_SPEC as re, TIMEPICKER_SPEC as se, TAGINPUT_SPEC as ce, CONTEXTMENU_SPEC as le, TABLESELECT_SPEC as ue, TREESELECT_SPEC as ae, CONTROLLER_SPEC as ie, TOAST_SPEC as pe, NOTIFICATION_CARD_SPEC as fe, NOTIFICATION_ITEM_SPEC as de } from "@vmscloud/moz-ui-components-core";
|
|
8
|
+
import { createValidator as Mo, enUS as No, jaJP as ko, koKR as wo, useToast as zo, zhCN as jo } from "@vmscloud/moz-ui-components-core";
|
|
9
|
+
import { jsx as x, jsxs as Ce } from "react/jsx-runtime";
|
|
10
10
|
const X = /* @__PURE__ */ new Set();
|
|
11
11
|
let Y = null;
|
|
12
12
|
function et(e) {
|
|
@@ -17,7 +17,7 @@ function et(e) {
|
|
|
17
17
|
for (const o of t) o.unmount();
|
|
18
18
|
}, 0));
|
|
19
19
|
}
|
|
20
|
-
class
|
|
20
|
+
class ut {
|
|
21
21
|
constructor() {
|
|
22
22
|
q(this, "contextWrapper", null);
|
|
23
23
|
q(this, "roots", /* @__PURE__ */ new Set());
|
|
@@ -31,7 +31,7 @@ class ae {
|
|
|
31
31
|
* component(props) 를 컨테이너에 렌더하고, update(props) 로 갱신, destroy() 로 정리한다.
|
|
32
32
|
*/
|
|
33
33
|
mountInstance(t, o, r) {
|
|
34
|
-
const n =
|
|
34
|
+
const n = It(t);
|
|
35
35
|
this.roots.add(n);
|
|
36
36
|
const c = (s) => {
|
|
37
37
|
const l = $(o, s);
|
|
@@ -53,34 +53,34 @@ class ae {
|
|
|
53
53
|
return this.roots.size;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
function
|
|
56
|
+
const at = K(lt), it = K(null);
|
|
57
|
+
function ke({
|
|
58
58
|
locale: e = lt,
|
|
59
59
|
contextWrapper: t,
|
|
60
60
|
children: o
|
|
61
61
|
}) {
|
|
62
62
|
return $(
|
|
63
|
-
|
|
63
|
+
at.Provider,
|
|
64
64
|
{ value: e },
|
|
65
65
|
$(
|
|
66
|
-
|
|
66
|
+
it.Provider,
|
|
67
67
|
{ value: t ?? null },
|
|
68
68
|
o
|
|
69
69
|
)
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return D(ut);
|
|
74
|
-
}
|
|
75
|
-
function pe() {
|
|
72
|
+
function pt() {
|
|
76
73
|
return D(at);
|
|
77
74
|
}
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
function ft() {
|
|
76
|
+
return D(it);
|
|
77
|
+
}
|
|
78
|
+
const tt = K(null);
|
|
79
|
+
function we({
|
|
80
80
|
children: e
|
|
81
81
|
}) {
|
|
82
82
|
const t = I();
|
|
83
|
-
t.current || (t.current =
|
|
83
|
+
t.current || (t.current = Lt());
|
|
84
84
|
const o = { validate: t.current.validate, initValidator: t.current.initValidator };
|
|
85
85
|
return $(
|
|
86
86
|
tt.Provider,
|
|
@@ -88,13 +88,13 @@ function xe({
|
|
|
88
88
|
typeof e == "function" ? e(o) : e
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function ze() {
|
|
92
92
|
return D(tt);
|
|
93
93
|
}
|
|
94
94
|
function H(e) {
|
|
95
95
|
return e.startsWith("update:") ? "on" + e.slice(7).charAt(0).toUpperCase() + e.slice(8) + "Change" : "on" + e.charAt(0).toUpperCase() + e.slice(1);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Ee(e, t) {
|
|
98
98
|
if (Object.is(e, t)) return !0;
|
|
99
99
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null) return !1;
|
|
100
100
|
const o = Object.keys(e), r = Object.keys(t);
|
|
@@ -126,106 +126,106 @@ function p(e) {
|
|
|
126
126
|
// slots 를 전부 등록하지만 React 는 스펙의 정적 목록만 알았다. 이름이 데이터에서 파생되는
|
|
127
127
|
// 코어(Tab)는 이 통로 없이는 React 에서 콘텐츠를 받을 수 없었다.
|
|
128
128
|
"slots"
|
|
129
|
-
]), r =
|
|
130
|
-
const s = I(null), l = I(void 0), f = I(void 0), [
|
|
129
|
+
]), r = gt((n, c) => {
|
|
130
|
+
const s = I(null), l = I(void 0), f = I(void 0), [E, P] = U(() => /* @__PURE__ */ new Map());
|
|
131
131
|
if (!f.current) {
|
|
132
|
-
const
|
|
133
|
-
Object.defineProperty(
|
|
132
|
+
const S = {};
|
|
133
|
+
Object.defineProperty(S, "el", {
|
|
134
134
|
get: () => {
|
|
135
|
-
var
|
|
136
|
-
return ((
|
|
135
|
+
var C;
|
|
136
|
+
return ((C = l.current) == null ? void 0 : C.el) ?? null;
|
|
137
137
|
},
|
|
138
138
|
enumerable: !0
|
|
139
|
-
}), f.current =
|
|
139
|
+
}), f.current = S;
|
|
140
140
|
}
|
|
141
141
|
const u = I();
|
|
142
|
-
u.current || (u.current = new
|
|
143
|
-
const
|
|
144
|
-
u.current.setContextWrapper(
|
|
145
|
-
const a =
|
|
142
|
+
u.current || (u.current = new ut());
|
|
143
|
+
const i = ft();
|
|
144
|
+
u.current.setContextWrapper(i);
|
|
145
|
+
const a = pt(), d = D(tt), T = I(n);
|
|
146
146
|
T.current = n;
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
typeof
|
|
150
|
-
}),
|
|
151
|
-
const
|
|
152
|
-
for (const
|
|
153
|
-
o.has(
|
|
154
|
-
for (const
|
|
155
|
-
for (const
|
|
156
|
-
return
|
|
147
|
+
const v = ((S, ...C) => {
|
|
148
|
+
const b = H(String(S)), A = T.current[b];
|
|
149
|
+
typeof A == "function" && A(...C);
|
|
150
|
+
}), m = () => {
|
|
151
|
+
const S = T.current, C = {};
|
|
152
|
+
for (const b of Object.keys(S))
|
|
153
|
+
o.has(b) || (C[b] = S[b]);
|
|
154
|
+
for (const b of e.props) C[b] = S[b];
|
|
155
|
+
for (const b of Object.keys(t)) C[t[b].prop] = S[b];
|
|
156
|
+
return S.className != null && (C.class = S.className), S.style != null && (C.style = S.style), S.id != null && (C.id = S.id), C;
|
|
157
157
|
};
|
|
158
158
|
st(() => {
|
|
159
|
-
const
|
|
160
|
-
for (const
|
|
161
|
-
const
|
|
162
|
-
T.current[
|
|
163
|
-
const M = ({ scope:
|
|
164
|
-
const j = T.current[
|
|
165
|
-
return (typeof j == "function" ? j(
|
|
166
|
-
},
|
|
167
|
-
return { update: (
|
|
159
|
+
const S = u.current, C = {};
|
|
160
|
+
for (const y of e.slots ?? []) {
|
|
161
|
+
const _ = y === "default" ? "children" : y;
|
|
162
|
+
T.current[_] != null && (C[y] = (h, w) => {
|
|
163
|
+
const M = ({ scope: k }) => {
|
|
164
|
+
const j = T.current[_];
|
|
165
|
+
return (typeof j == "function" ? j(k) : j) ?? null;
|
|
166
|
+
}, N = S.mountInstance(h, M, { scope: w });
|
|
167
|
+
return { update: (k) => N.update({ scope: k }), dispose: N.destroy };
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
if (!(
|
|
173
|
-
return (
|
|
174
|
-
const M =
|
|
175
|
-
return
|
|
170
|
+
const b = (y) => {
|
|
171
|
+
const _ = T.current.slots;
|
|
172
|
+
if (!(_ == null || _[y] == null))
|
|
173
|
+
return (h, w) => {
|
|
174
|
+
const M = h.getAttribute("data-moz-slot-id") ?? y;
|
|
175
|
+
return P((N) => new Map(N).set(M, { name: y, el: h, scope: w })), {
|
|
176
176
|
// scope 가 값까지 같으면 state 를 건드리지 않는다. 코어는 렌더마다 scope 객체를 새로
|
|
177
177
|
// 만들어 fill 하므로, 무조건 setState 하면 브릿지 재렌더 → core.update → 다시 fill →
|
|
178
178
|
// setState … 로 끝나지 않는 비동기 루프가 된다(소비처 실측: 페이지 테스트 타임아웃).
|
|
179
|
-
update: (
|
|
180
|
-
const j =
|
|
181
|
-
return !j ||
|
|
179
|
+
update: (N) => P((k) => {
|
|
180
|
+
const j = k.get(M);
|
|
181
|
+
return !j || Ee(j.scope, N) ? k : new Map(k).set(M, { ...j, scope: N });
|
|
182
182
|
}),
|
|
183
|
-
dispose: () =>
|
|
184
|
-
if (!
|
|
185
|
-
const
|
|
186
|
-
return
|
|
183
|
+
dispose: () => P((N) => {
|
|
184
|
+
if (!N.has(M)) return N;
|
|
185
|
+
const k = new Map(N);
|
|
186
|
+
return k.delete(M), k;
|
|
187
187
|
})
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
};
|
|
191
|
-
l.current = e.core(s.current,
|
|
192
|
-
slots:
|
|
193
|
-
slotResolver:
|
|
191
|
+
l.current = e.core(s.current, m(), v, {
|
|
192
|
+
slots: C,
|
|
193
|
+
slotResolver: b,
|
|
194
194
|
locale: a,
|
|
195
|
-
validator:
|
|
195
|
+
validator: d ?? void 0,
|
|
196
196
|
// 소비자가 실제로 넘긴 prop 키 (controlled 판별)
|
|
197
197
|
providedKeys: Object.keys(T.current)
|
|
198
198
|
});
|
|
199
|
-
const
|
|
200
|
-
if (
|
|
201
|
-
for (const
|
|
202
|
-
|
|
199
|
+
const A = l.current.api;
|
|
200
|
+
if (A)
|
|
201
|
+
for (const y of Object.keys(A))
|
|
202
|
+
y !== "el" && (f.current[y] = A[y]);
|
|
203
203
|
return () => {
|
|
204
|
-
var
|
|
205
|
-
(
|
|
204
|
+
var y;
|
|
205
|
+
(y = l.current) == null || y.destroy(), S.unmountAll(), l.current = void 0;
|
|
206
206
|
};
|
|
207
207
|
}, []);
|
|
208
208
|
const g = () => {
|
|
209
|
-
const
|
|
210
|
-
for (const
|
|
211
|
-
const
|
|
212
|
-
|
|
209
|
+
const S = T.current, C = {};
|
|
210
|
+
for (const A of e.slots ?? []) {
|
|
211
|
+
const y = A === "default" ? "children" : A;
|
|
212
|
+
C[y] = S[y];
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
return
|
|
216
|
-
},
|
|
214
|
+
const b = S.slots;
|
|
215
|
+
return C.__dynamicSlotKeys = b ? Object.keys(b).sort().join("\0") : "", C;
|
|
216
|
+
}, O = I(null);
|
|
217
217
|
Q(() => {
|
|
218
|
-
const
|
|
219
|
-
if (!
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
}),
|
|
223
|
-
const L = n.slots, B = Array.from(
|
|
224
|
-
const
|
|
225
|
-
return
|
|
218
|
+
const S = l.current;
|
|
219
|
+
if (!S) return;
|
|
220
|
+
const C = m(), b = g(), A = O.current;
|
|
221
|
+
A && A.locale === a && ot(A.props, C) && ot(A.slots, b) || (O.current = { props: C, slots: b, locale: a }, (!A || A.locale !== a) && S.setLocale(a), S.update(C, { replace: !0, sync: e.syncUpdate }));
|
|
222
|
+
}), Ot(c, () => f.current, []);
|
|
223
|
+
const L = n.slots, B = Array.from(E, ([S, C]) => {
|
|
224
|
+
const b = L == null ? void 0 : L[C.name], A = (typeof b == "function" ? b(C.scope) : b) ?? null;
|
|
225
|
+
return Rt(A, C.el, S);
|
|
226
226
|
});
|
|
227
227
|
return $(
|
|
228
|
-
|
|
228
|
+
_t,
|
|
229
229
|
null,
|
|
230
230
|
$("div", { ref: s, style: { display: "contents" } }),
|
|
231
231
|
...B
|
|
@@ -233,9 +233,30 @@ function p(e) {
|
|
|
233
233
|
});
|
|
234
234
|
return r.displayName = e.name, r;
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const Pe = ["avatar", "heading", "description", "actions"];
|
|
237
|
+
function je(e = {}) {
|
|
238
|
+
const t = ft(), o = pt(), r = I({ contextWrapper: t, locale: o, globalOptions: e });
|
|
239
|
+
return r.current = { contextWrapper: t, locale: o, globalOptions: e }, z(() => {
|
|
240
|
+
const n = xt();
|
|
241
|
+
return { open: (s = {}) => {
|
|
242
|
+
const { contextWrapper: l, locale: f, globalOptions: E } = r.current, P = { ...E, ...s }, u = { ...P }, i = new ut();
|
|
243
|
+
i.setContextWrapper(l);
|
|
244
|
+
const a = {};
|
|
245
|
+
for (const d of Pe) {
|
|
246
|
+
const T = P[d];
|
|
247
|
+
delete u[d], !(T == null || T === !1) && (a[d] = (v) => ({ dispose: i.mountInstance(v, () => T, {}).destroy }));
|
|
248
|
+
}
|
|
249
|
+
return n.open(u, {
|
|
250
|
+
slots: a,
|
|
251
|
+
locale: f,
|
|
252
|
+
onRemoved: () => i.unmountAll()
|
|
253
|
+
});
|
|
254
|
+
}, close: n.close, closeAll: n.closeAll };
|
|
255
|
+
}, []);
|
|
256
|
+
}
|
|
257
|
+
const me = p(Mt), Se = (e) => null, Be = ({ horizontal: e, children: t }) => {
|
|
237
258
|
const o = ct.toArray(t).filter(
|
|
238
|
-
(c) =>
|
|
259
|
+
(c) => W(c) && c.type === Se
|
|
239
260
|
), r = o.map((c) => ({
|
|
240
261
|
size: c.props.size,
|
|
241
262
|
minSize: c.props.minSize,
|
|
@@ -244,29 +265,29 @@ const de = p(_t), Ce = (e) => null, ke = ({ horizontal: e, children: t }) => {
|
|
|
244
265
|
})), n = {};
|
|
245
266
|
return o.forEach((c, s) => {
|
|
246
267
|
n[`pane-${s}`] = c.props.children;
|
|
247
|
-
}), /* @__PURE__ */ x(
|
|
248
|
-
},
|
|
249
|
-
delayDuration:
|
|
268
|
+
}), /* @__PURE__ */ x(me, { panes: r, horizontal: e, ...n });
|
|
269
|
+
}, ye = p(Nt), J = /* @__PURE__ */ new Set(), dt = 200, Te = 100, Ct = K({
|
|
270
|
+
delayDuration: dt,
|
|
250
271
|
disableHoverableContent: !1
|
|
251
272
|
});
|
|
252
|
-
function
|
|
253
|
-
delayDuration: e =
|
|
273
|
+
function Ue({
|
|
274
|
+
delayDuration: e = dt,
|
|
254
275
|
disableHoverableContent: t = !1,
|
|
255
276
|
children: o
|
|
256
277
|
}) {
|
|
257
|
-
const r =
|
|
278
|
+
const r = z(
|
|
258
279
|
() => ({ delayDuration: e, disableHoverableContent: t }),
|
|
259
280
|
[e, t]
|
|
260
281
|
);
|
|
261
|
-
return /* @__PURE__ */ x(
|
|
282
|
+
return /* @__PURE__ */ x(Ct.Provider, { value: r, children: o });
|
|
262
283
|
}
|
|
263
|
-
const
|
|
264
|
-
function
|
|
265
|
-
const t = D(
|
|
284
|
+
const Et = K(null);
|
|
285
|
+
function Pt(e) {
|
|
286
|
+
const t = D(Et);
|
|
266
287
|
if (!t) throw new Error(`${e} 는 <Tooltip> 안에서만 쓸 수 있습니다.`);
|
|
267
288
|
return t;
|
|
268
289
|
}
|
|
269
|
-
function
|
|
290
|
+
function De({
|
|
270
291
|
open: e,
|
|
271
292
|
defaultOpen: t = !1,
|
|
272
293
|
onOpenChange: o,
|
|
@@ -274,73 +295,73 @@ function ze({
|
|
|
274
295
|
disableHoverableContent: n,
|
|
275
296
|
children: c
|
|
276
297
|
}) {
|
|
277
|
-
const s = D(
|
|
298
|
+
const s = D(Ct), l = r ?? s.delayDuration, f = !(n ?? s.disableHoverableContent), [E, P] = U(t), u = e !== void 0, i = u ? !!e : E, [a, d] = U(null), T = `moz-tooltip-${Z()}`, v = I(null), m = I(null), g = I(o);
|
|
278
299
|
g.current = o;
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
}, []), L =
|
|
282
|
-
(
|
|
283
|
-
var
|
|
284
|
-
u ||
|
|
300
|
+
const O = R(() => {
|
|
301
|
+
v.current && clearTimeout(v.current), m.current && clearTimeout(m.current), v.current = null, m.current = null;
|
|
302
|
+
}, []), L = R(
|
|
303
|
+
(h) => {
|
|
304
|
+
var w;
|
|
305
|
+
u || P(h), (w = g.current) == null || w.call(g, h);
|
|
285
306
|
},
|
|
286
307
|
[u]
|
|
287
|
-
), B =
|
|
288
|
-
|
|
289
|
-
}, [
|
|
290
|
-
if (
|
|
308
|
+
), B = R(() => {
|
|
309
|
+
O(), L(!0);
|
|
310
|
+
}, [O, L]), S = R(() => {
|
|
311
|
+
if (m.current && (clearTimeout(m.current), m.current = null), !v.current) {
|
|
291
312
|
if (l <= 0) {
|
|
292
313
|
L(!0);
|
|
293
314
|
return;
|
|
294
315
|
}
|
|
295
|
-
|
|
296
|
-
|
|
316
|
+
v.current = setTimeout(() => {
|
|
317
|
+
v.current = null, L(!0);
|
|
297
318
|
}, l);
|
|
298
319
|
}
|
|
299
|
-
}, [l, L]),
|
|
300
|
-
|
|
301
|
-
}, [
|
|
302
|
-
if (
|
|
320
|
+
}, [l, L]), C = R(() => {
|
|
321
|
+
O(), L(!1);
|
|
322
|
+
}, [O, L]), b = R(() => {
|
|
323
|
+
if (v.current && (clearTimeout(v.current), v.current = null), !f) {
|
|
303
324
|
L(!1);
|
|
304
325
|
return;
|
|
305
326
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
},
|
|
309
|
-
}, [f, L]),
|
|
310
|
-
|
|
327
|
+
m.current || (m.current = setTimeout(() => {
|
|
328
|
+
m.current = null, L(!1);
|
|
329
|
+
}, Te));
|
|
330
|
+
}, [f, L]), A = R(() => {
|
|
331
|
+
m.current && (clearTimeout(m.current), m.current = null);
|
|
311
332
|
}, []);
|
|
312
|
-
Q(() =>
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
if (!
|
|
316
|
-
const
|
|
333
|
+
Q(() => O, [O]);
|
|
334
|
+
const y = I(C);
|
|
335
|
+
y.current = C, Q(() => {
|
|
336
|
+
if (!i) return;
|
|
337
|
+
const h = () => y.current();
|
|
317
338
|
for (const M of Array.from(J)) M();
|
|
318
|
-
J.add(
|
|
319
|
-
const
|
|
320
|
-
M.key === "Escape" &&
|
|
339
|
+
J.add(h);
|
|
340
|
+
const w = (M) => {
|
|
341
|
+
M.key === "Escape" && y.current();
|
|
321
342
|
};
|
|
322
|
-
return document.addEventListener("keydown",
|
|
323
|
-
J.delete(
|
|
343
|
+
return document.addEventListener("keydown", w), () => {
|
|
344
|
+
J.delete(h), document.removeEventListener("keydown", w);
|
|
324
345
|
};
|
|
325
|
-
}, [
|
|
326
|
-
const
|
|
346
|
+
}, [i]);
|
|
347
|
+
const _ = z(
|
|
327
348
|
() => ({
|
|
328
|
-
open:
|
|
349
|
+
open: i,
|
|
329
350
|
contentId: T,
|
|
330
351
|
anchor: a,
|
|
331
|
-
setAnchor:
|
|
352
|
+
setAnchor: d,
|
|
332
353
|
hoverable: f,
|
|
333
354
|
openNow: B,
|
|
334
|
-
openDelayed:
|
|
335
|
-
closeNow:
|
|
336
|
-
closeSoon:
|
|
337
|
-
cancelClose:
|
|
355
|
+
openDelayed: S,
|
|
356
|
+
closeNow: C,
|
|
357
|
+
closeSoon: b,
|
|
358
|
+
cancelClose: A
|
|
338
359
|
}),
|
|
339
|
-
[
|
|
360
|
+
[i, T, a, f, B, S, C, b, A]
|
|
340
361
|
);
|
|
341
|
-
return /* @__PURE__ */ x(
|
|
362
|
+
return /* @__PURE__ */ x(Et.Provider, { value: _, children: c });
|
|
342
363
|
}
|
|
343
|
-
function
|
|
364
|
+
function F(e, t) {
|
|
344
365
|
return (o) => {
|
|
345
366
|
typeof e == "function" && e(o), t();
|
|
346
367
|
};
|
|
@@ -348,39 +369,39 @@ function V(e, t) {
|
|
|
348
369
|
function nt(e, t) {
|
|
349
370
|
e && (typeof e == "function" ? e(t) : e.current = t);
|
|
350
371
|
}
|
|
351
|
-
function
|
|
352
|
-
const o =
|
|
353
|
-
a.current =
|
|
354
|
-
const
|
|
372
|
+
function We({ asChild: e = !1, children: t }) {
|
|
373
|
+
const o = Pt("TooltipTrigger"), { open: r, contentId: n, setAnchor: c, openNow: s, openDelayed: l, closeNow: f, closeSoon: E } = o, P = W(t) ? t : null, u = (P == null ? void 0 : P.props) ?? {}, i = P == null ? void 0 : P.ref, a = I(i);
|
|
374
|
+
a.current = i;
|
|
375
|
+
const d = I(null), T = R(
|
|
355
376
|
(g) => {
|
|
356
|
-
|
|
377
|
+
d.current = g, c(g), nt(a.current, g);
|
|
357
378
|
},
|
|
358
379
|
[c]
|
|
359
|
-
),
|
|
380
|
+
), v = I(i);
|
|
360
381
|
st(() => {
|
|
361
|
-
|
|
382
|
+
v.current !== i && (v.current = i, nt(i, d.current));
|
|
362
383
|
});
|
|
363
|
-
const
|
|
384
|
+
const m = {
|
|
364
385
|
ref: T,
|
|
365
386
|
// pointermove·mouseenter 둘 다 받는다 — 포인터 종류·테스트 도구에 따라 어느 하나만 오는
|
|
366
387
|
// 경우가 있어(예: fireEvent.pointerMove / fireEvent.mouseOver) 한쪽만 걸면 조용히 안 열린다.
|
|
367
|
-
onPointerMove:
|
|
368
|
-
onMouseEnter:
|
|
369
|
-
onPointerLeave:
|
|
370
|
-
onMouseLeave:
|
|
388
|
+
onPointerMove: F(u.onPointerMove, l),
|
|
389
|
+
onMouseEnter: F(u.onMouseEnter, l),
|
|
390
|
+
onPointerLeave: F(u.onPointerLeave, E),
|
|
391
|
+
onMouseLeave: F(u.onMouseLeave, E),
|
|
371
392
|
// 클릭하러 온 것이므로 즉시 치운다(누른 순간 가려지지 않게).
|
|
372
|
-
onPointerDown:
|
|
393
|
+
onPointerDown: F(u.onPointerDown, f),
|
|
373
394
|
// 포커스는 지연 없이 — 버블링된 focus 도 받는다(트리거가 감싼 span 인 경우).
|
|
374
|
-
onFocus:
|
|
375
|
-
onBlur:
|
|
395
|
+
onFocus: F(u.onFocus, s),
|
|
396
|
+
onBlur: F(u.onBlur, f),
|
|
376
397
|
"aria-describedby": r ? n : u["aria-describedby"],
|
|
377
398
|
// 트리거는 열림 상태를 attribute 로도 노출한다 — 소비처가 열려 있는 동안의 트리거 스타일을
|
|
378
399
|
// CSS 만으로 걸 수 있고(`[data-state='open']`), "툴팁이 배선됐는가" 를 DOM 에서 확인할 수 있다.
|
|
379
400
|
"data-state": r ? "open" : "closed"
|
|
380
401
|
};
|
|
381
|
-
return e &&
|
|
402
|
+
return e && P ? V(P, m) : /* @__PURE__ */ x("span", { ...m, children: t });
|
|
382
403
|
}
|
|
383
|
-
function
|
|
404
|
+
function Fe({
|
|
384
405
|
side: e = "top",
|
|
385
406
|
align: t = "center",
|
|
386
407
|
sideOffset: o = 8,
|
|
@@ -391,90 +412,90 @@ function Ne({
|
|
|
391
412
|
children: l,
|
|
392
413
|
...f
|
|
393
414
|
}) {
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
const
|
|
415
|
+
const E = Pt("TooltipContent"), { open: P, anchor: u, contentId: i, hoverable: a, cancelClose: d, closeSoon: T } = E, v = I({ cancelClose: d, closeSoon: T });
|
|
416
|
+
v.current = { cancelClose: d, closeSoon: T };
|
|
417
|
+
const m = R(() => v.current.cancelClose(), []), g = R(() => v.current.closeSoon(), []), O = z(() => ({ content: l }), [l]);
|
|
397
418
|
return /* @__PURE__ */ x(
|
|
398
|
-
|
|
419
|
+
ye,
|
|
399
420
|
{
|
|
400
|
-
open:
|
|
421
|
+
open: P,
|
|
401
422
|
anchor: u,
|
|
402
423
|
side: e,
|
|
403
424
|
align: t,
|
|
404
425
|
sideOffset: o,
|
|
405
426
|
collisionPadding: r,
|
|
406
427
|
arrow: n,
|
|
407
|
-
tooltipId:
|
|
428
|
+
tooltipId: i,
|
|
408
429
|
className: c,
|
|
409
430
|
style: s,
|
|
410
|
-
slots:
|
|
431
|
+
slots: O,
|
|
411
432
|
"data-hoverable": a ? "true" : void 0,
|
|
412
|
-
onPointerEnter: a ?
|
|
433
|
+
onPointerEnter: a ? m : void 0,
|
|
413
434
|
onPointerLeave: a ? g : void 0,
|
|
414
435
|
...f
|
|
415
436
|
}
|
|
416
437
|
);
|
|
417
438
|
}
|
|
418
|
-
const
|
|
439
|
+
const ve = p(kt), mt = K(null);
|
|
419
440
|
function G(e) {
|
|
420
|
-
const t = D(
|
|
441
|
+
const t = D(mt);
|
|
421
442
|
if (!t) throw new Error(`${e} 는 <Popover> 안에서만 쓸 수 있습니다.`);
|
|
422
443
|
return t;
|
|
423
444
|
}
|
|
424
|
-
function
|
|
445
|
+
function St(...e) {
|
|
425
446
|
return (t) => {
|
|
426
447
|
for (const o of e)
|
|
427
448
|
o && (typeof o == "function" ? o(t) : o.current = t);
|
|
428
449
|
};
|
|
429
450
|
}
|
|
430
|
-
function
|
|
451
|
+
function yt(e, t) {
|
|
431
452
|
return (o) => {
|
|
432
453
|
typeof e == "function" && e(o), t(o);
|
|
433
454
|
};
|
|
434
455
|
}
|
|
435
|
-
function
|
|
436
|
-
const [n, c] = U(t), s = e !== void 0, l = s ? !!e : n, [f,
|
|
456
|
+
function Ke({ open: e, defaultOpen: t = !1, onOpenChange: o, children: r }) {
|
|
457
|
+
const [n, c] = U(t), s = e !== void 0, l = s ? !!e : n, [f, E] = U(null), [P, u] = U(null), i = `moz-popover-${Z()}`, a = I(o);
|
|
437
458
|
a.current = o;
|
|
438
|
-
const
|
|
439
|
-
(
|
|
440
|
-
var
|
|
441
|
-
s || c(
|
|
459
|
+
const d = R(
|
|
460
|
+
(v) => {
|
|
461
|
+
var m;
|
|
462
|
+
s || c(v), (m = a.current) == null || m.call(a, v);
|
|
442
463
|
},
|
|
443
464
|
[s]
|
|
444
|
-
), T =
|
|
445
|
-
() => ({ open: l, setOpen:
|
|
446
|
-
[l,
|
|
465
|
+
), T = z(
|
|
466
|
+
() => ({ open: l, setOpen: d, contentId: i, triggerEl: f, anchorEl: P, setTriggerEl: E, setAnchorEl: u }),
|
|
467
|
+
[l, d, i, f, P]
|
|
447
468
|
);
|
|
448
|
-
return /* @__PURE__ */ x(
|
|
469
|
+
return /* @__PURE__ */ x(mt.Provider, { value: T, children: r });
|
|
449
470
|
}
|
|
450
|
-
function
|
|
451
|
-
const { open: o, setOpen: r, contentId: n, setTriggerEl: c } = G("PopoverTrigger"), s =
|
|
452
|
-
ref:
|
|
453
|
-
() =>
|
|
471
|
+
function $e({ asChild: e = !1, children: t }) {
|
|
472
|
+
const { open: o, setOpen: r, contentId: n, setTriggerEl: c } = G("PopoverTrigger"), s = W(t) ? t : null, l = (s == null ? void 0 : s.props) ?? {}, E = {
|
|
473
|
+
ref: z(
|
|
474
|
+
() => St(c, s == null ? void 0 : s.ref),
|
|
454
475
|
[c, s]
|
|
455
476
|
),
|
|
456
|
-
onClick:
|
|
477
|
+
onClick: yt(l.onClick, () => r(!o)),
|
|
457
478
|
"aria-haspopup": "dialog",
|
|
458
479
|
"aria-expanded": o,
|
|
459
480
|
"aria-controls": o ? n : void 0,
|
|
460
481
|
"data-state": o ? "open" : "closed"
|
|
461
482
|
};
|
|
462
|
-
return e && s ?
|
|
483
|
+
return e && s ? V(s, E) : /* @__PURE__ */ x("span", { ...E, children: t });
|
|
463
484
|
}
|
|
464
|
-
function
|
|
465
|
-
const { setAnchorEl: o } = G("PopoverAnchor"), r =
|
|
466
|
-
() =>
|
|
485
|
+
function Ve({ asChild: e = !1, children: t }) {
|
|
486
|
+
const { setAnchorEl: o } = G("PopoverAnchor"), r = W(t) ? t : null, n = z(
|
|
487
|
+
() => St(o, r == null ? void 0 : r.ref),
|
|
467
488
|
[o, r]
|
|
468
489
|
);
|
|
469
|
-
return e && r ?
|
|
490
|
+
return e && r ? V(r, { ref: n }) : /* @__PURE__ */ x("span", { ref: n, children: t });
|
|
470
491
|
}
|
|
471
|
-
function
|
|
472
|
-
const { setOpen: o } = G("PopoverClose"), r =
|
|
473
|
-
onClick:
|
|
492
|
+
function He({ asChild: e = !1, children: t }) {
|
|
493
|
+
const { setOpen: o } = G("PopoverClose"), r = W(t) ? t : null, n = (r == null ? void 0 : r.props) ?? {}, c = {
|
|
494
|
+
onClick: yt(n.onClick, () => o(!1))
|
|
474
495
|
};
|
|
475
|
-
return e && r ?
|
|
496
|
+
return e && r ? V(r, c) : /* @__PURE__ */ x("button", { type: "button", ...c, children: t });
|
|
476
497
|
}
|
|
477
|
-
function
|
|
498
|
+
function Ge({
|
|
478
499
|
side: e = "bottom",
|
|
479
500
|
align: t = "start",
|
|
480
501
|
sideOffset: o = 4,
|
|
@@ -484,65 +505,65 @@ function Ve({
|
|
|
484
505
|
className: s,
|
|
485
506
|
style: l,
|
|
486
507
|
onOpenAutoFocus: f,
|
|
487
|
-
onCloseAutoFocus:
|
|
488
|
-
onEscapeKeyDown:
|
|
508
|
+
onCloseAutoFocus: E,
|
|
509
|
+
onEscapeKeyDown: P,
|
|
489
510
|
onInteractOutside: u,
|
|
490
|
-
children:
|
|
511
|
+
children: i,
|
|
491
512
|
...a
|
|
492
513
|
}) {
|
|
493
|
-
const { open:
|
|
494
|
-
|
|
495
|
-
const L =
|
|
496
|
-
|
|
497
|
-
}, []), B =
|
|
498
|
-
var
|
|
499
|
-
(
|
|
500
|
-
}, []),
|
|
501
|
-
var M,
|
|
502
|
-
const
|
|
503
|
-
if (
|
|
504
|
-
|
|
514
|
+
const { open: d, setOpen: T, contentId: v, triggerEl: m, anchorEl: g } = G("PopoverContent"), O = I({ setOpen: T, triggerEl: m, anchorEl: g, onOpenAutoFocus: f, onCloseAutoFocus: E, onEscapeKeyDown: P, onInteractOutside: u });
|
|
515
|
+
O.current = { setOpen: T, triggerEl: m, anchorEl: g, onOpenAutoFocus: f, onCloseAutoFocus: E, onEscapeKeyDown: P, onInteractOutside: u };
|
|
516
|
+
const L = R((y) => {
|
|
517
|
+
O.current.setOpen(!1);
|
|
518
|
+
}, []), B = R((y) => {
|
|
519
|
+
var _, h;
|
|
520
|
+
(h = (_ = O.current).onEscapeKeyDown) == null || h.call(_, y);
|
|
521
|
+
}, []), S = R((y) => {
|
|
522
|
+
var M, N, k, j;
|
|
523
|
+
const _ = (N = (M = y.detail) == null ? void 0 : M.originalEvent) == null ? void 0 : N.target, { triggerEl: h, anchorEl: w } = O.current;
|
|
524
|
+
if (_ && (h && h.contains(_) || w && w.contains(_))) {
|
|
525
|
+
y.preventDefault();
|
|
505
526
|
return;
|
|
506
527
|
}
|
|
507
|
-
(j = (
|
|
508
|
-
}, []),
|
|
509
|
-
var
|
|
510
|
-
(
|
|
511
|
-
}, []),
|
|
512
|
-
var
|
|
513
|
-
(
|
|
514
|
-
}, []),
|
|
528
|
+
(j = (k = O.current).onInteractOutside) == null || j.call(k, y);
|
|
529
|
+
}, []), C = R((y) => {
|
|
530
|
+
var _, h;
|
|
531
|
+
(h = (_ = O.current).onOpenAutoFocus) == null || h.call(_, y);
|
|
532
|
+
}, []), b = R((y) => {
|
|
533
|
+
var _, h;
|
|
534
|
+
(h = (_ = O.current).onCloseAutoFocus) == null || h.call(_, y);
|
|
535
|
+
}, []), A = z(() => ({ content: i }), [i]);
|
|
515
536
|
return /* @__PURE__ */ x(
|
|
516
|
-
|
|
537
|
+
ve,
|
|
517
538
|
{
|
|
518
|
-
open:
|
|
519
|
-
anchor: g ??
|
|
539
|
+
open: d,
|
|
540
|
+
anchor: g ?? m,
|
|
520
541
|
side: e,
|
|
521
542
|
align: t,
|
|
522
543
|
sideOffset: o,
|
|
523
544
|
collisionPadding: r,
|
|
524
545
|
matchTriggerWidth: n,
|
|
525
546
|
trapFocus: c,
|
|
526
|
-
popoverId:
|
|
547
|
+
popoverId: v,
|
|
527
548
|
className: s,
|
|
528
549
|
style: l,
|
|
529
|
-
slots:
|
|
550
|
+
slots: A,
|
|
530
551
|
onRequestClose: L,
|
|
531
552
|
onEscapeKeyDown: B,
|
|
532
|
-
onInteractOutside:
|
|
533
|
-
onOpenAutoFocus:
|
|
534
|
-
onCloseAutoFocus:
|
|
553
|
+
onInteractOutside: S,
|
|
554
|
+
onOpenAutoFocus: C,
|
|
555
|
+
onCloseAutoFocus: b,
|
|
535
556
|
...a
|
|
536
557
|
}
|
|
537
558
|
);
|
|
538
559
|
}
|
|
539
|
-
const
|
|
540
|
-
function
|
|
541
|
-
const t = D(
|
|
560
|
+
const be = p(wt), Tt = K(null);
|
|
561
|
+
function vt(e) {
|
|
562
|
+
const t = D(Tt);
|
|
542
563
|
if (!t) throw new Error(`${e} 는 <Collapsible> 안에서만 쓸 수 있습니다.`);
|
|
543
564
|
return t;
|
|
544
565
|
}
|
|
545
|
-
function
|
|
566
|
+
function Ae(...e) {
|
|
546
567
|
return (t) => {
|
|
547
568
|
for (const o of e)
|
|
548
569
|
o && (typeof o == "function" ? o(t) : o.current = t);
|
|
@@ -553,11 +574,11 @@ function rt(e, t) {
|
|
|
553
574
|
typeof e == "function" && e(o), t(o);
|
|
554
575
|
};
|
|
555
576
|
}
|
|
556
|
-
function
|
|
577
|
+
function bt(e, t) {
|
|
557
578
|
const o = [e, t].filter((r) => typeof r == "string" && r.length > 0).join(" ");
|
|
558
579
|
return o.length > 0 ? o : void 0;
|
|
559
580
|
}
|
|
560
|
-
function
|
|
581
|
+
function qe({
|
|
561
582
|
open: e,
|
|
562
583
|
defaultOpen: t = !1,
|
|
563
584
|
onOpenChange: o,
|
|
@@ -568,29 +589,29 @@ function We({
|
|
|
568
589
|
children: l,
|
|
569
590
|
...f
|
|
570
591
|
}) {
|
|
571
|
-
const [
|
|
572
|
-
|
|
573
|
-
const T =
|
|
592
|
+
const [E, P] = U(t), u = e !== void 0, i = u ? !!e : E, a = `moz-collapsible-${Z()}`, d = I(o);
|
|
593
|
+
d.current = o;
|
|
594
|
+
const T = R(
|
|
574
595
|
(L) => {
|
|
575
596
|
var B;
|
|
576
|
-
u ||
|
|
597
|
+
u || P(L), (B = d.current) == null || B.call(d, L);
|
|
577
598
|
},
|
|
578
599
|
[u]
|
|
579
|
-
),
|
|
580
|
-
() => ({ open:
|
|
581
|
-
[
|
|
582
|
-
),
|
|
583
|
-
"data-state":
|
|
600
|
+
), v = z(
|
|
601
|
+
() => ({ open: i, setOpen: T, contentId: a, disabled: r }),
|
|
602
|
+
[i, T, a, r]
|
|
603
|
+
), m = {
|
|
604
|
+
"data-state": i ? "open" : "closed",
|
|
584
605
|
"data-disabled": r ? "" : void 0,
|
|
585
606
|
...f
|
|
586
|
-
}, g =
|
|
587
|
-
...
|
|
588
|
-
className:
|
|
607
|
+
}, g = W(l) ? l : null, O = n && g ? V(g, {
|
|
608
|
+
...m,
|
|
609
|
+
className: bt(g.props.className, c),
|
|
589
610
|
style: s ?? g.props.style
|
|
590
|
-
}) : /* @__PURE__ */ x("div", { ...
|
|
591
|
-
return /* @__PURE__ */ x(
|
|
611
|
+
}) : /* @__PURE__ */ x("div", { ...m, className: c, style: s, children: l });
|
|
612
|
+
return /* @__PURE__ */ x(Tt.Provider, { value: v, children: O });
|
|
592
613
|
}
|
|
593
|
-
function
|
|
614
|
+
function Xe({
|
|
594
615
|
asChild: e = !1,
|
|
595
616
|
disabled: t,
|
|
596
617
|
className: o,
|
|
@@ -599,26 +620,26 @@ function $e({
|
|
|
599
620
|
children: c,
|
|
600
621
|
...s
|
|
601
622
|
}) {
|
|
602
|
-
const { open: l, setOpen: f, contentId:
|
|
623
|
+
const { open: l, setOpen: f, contentId: E, disabled: P } = vt("CollapsibleTrigger"), u = t ?? P, i = R(() => {
|
|
603
624
|
u || f(!l);
|
|
604
|
-
}, [u, l, f]), a =
|
|
625
|
+
}, [u, l, f]), a = W(c) ? c : null, d = (a == null ? void 0 : a.props) ?? {}, T = {
|
|
605
626
|
"aria-expanded": l,
|
|
606
|
-
"aria-controls":
|
|
627
|
+
"aria-controls": E,
|
|
607
628
|
"data-state": l ? "open" : "closed",
|
|
608
629
|
"data-disabled": u ? "" : void 0,
|
|
609
630
|
...s
|
|
610
631
|
};
|
|
611
632
|
if (e && a) {
|
|
612
|
-
const
|
|
613
|
-
return
|
|
633
|
+
const v = Ae(a.ref);
|
|
634
|
+
return V(a, {
|
|
614
635
|
...T,
|
|
615
|
-
ref:
|
|
616
|
-
className:
|
|
617
|
-
style: r ??
|
|
636
|
+
ref: v,
|
|
637
|
+
className: bt(d.className, o),
|
|
638
|
+
style: r ?? d.style,
|
|
618
639
|
// 소비처 onClick 을 먼저 돌리고 토글한다 — 소비처가 stopPropagation 을 걸어도
|
|
619
640
|
// 토글 의미는 유지된다(Radix 와 같은 순서).
|
|
620
|
-
onClick: rt(
|
|
621
|
-
n == null || n(
|
|
641
|
+
onClick: rt(d.onClick, (m) => {
|
|
642
|
+
n == null || n(m), i();
|
|
622
643
|
}),
|
|
623
644
|
disabled: u || void 0
|
|
624
645
|
});
|
|
@@ -631,12 +652,12 @@ function $e({
|
|
|
631
652
|
className: o,
|
|
632
653
|
style: r,
|
|
633
654
|
disabled: u || void 0,
|
|
634
|
-
onClick: rt(n,
|
|
655
|
+
onClick: rt(n, i),
|
|
635
656
|
children: c
|
|
636
657
|
}
|
|
637
658
|
);
|
|
638
659
|
}
|
|
639
|
-
function
|
|
660
|
+
function Ye({
|
|
640
661
|
forceMount: e = !1,
|
|
641
662
|
className: t,
|
|
642
663
|
style: o,
|
|
@@ -644,14 +665,14 @@ function Fe({
|
|
|
644
665
|
children: n,
|
|
645
666
|
...c
|
|
646
667
|
}) {
|
|
647
|
-
const { open: s, contentId: l, disabled: f } =
|
|
648
|
-
|
|
649
|
-
const
|
|
650
|
-
var a,
|
|
651
|
-
(
|
|
652
|
-
}, []), u =
|
|
668
|
+
const { open: s, contentId: l, disabled: f } = vt("CollapsibleContent"), E = I({ onHeightChange: r });
|
|
669
|
+
E.current = { onHeightChange: r };
|
|
670
|
+
const P = R((i) => {
|
|
671
|
+
var a, d;
|
|
672
|
+
(d = (a = E.current).onHeightChange) == null || d.call(a, i);
|
|
673
|
+
}, []), u = z(() => ({ content: n }), [n]);
|
|
653
674
|
return /* @__PURE__ */ x(
|
|
654
|
-
|
|
675
|
+
be,
|
|
655
676
|
{
|
|
656
677
|
open: s,
|
|
657
678
|
forceMount: e,
|
|
@@ -660,26 +681,26 @@ function Fe({
|
|
|
660
681
|
className: t,
|
|
661
682
|
style: o,
|
|
662
683
|
slots: u,
|
|
663
|
-
onHeightChange:
|
|
684
|
+
onHeightChange: P,
|
|
664
685
|
...c
|
|
665
686
|
}
|
|
666
687
|
);
|
|
667
688
|
}
|
|
668
|
-
const
|
|
669
|
-
function
|
|
689
|
+
const he = p(zt);
|
|
690
|
+
function ge(e) {
|
|
670
691
|
return null;
|
|
671
692
|
}
|
|
672
|
-
function
|
|
693
|
+
function Oe(e) {
|
|
673
694
|
return null;
|
|
674
695
|
}
|
|
675
|
-
function
|
|
696
|
+
function Je({ className: e, style: t, onLoadingStatusChange: o, children: r, ...n }) {
|
|
676
697
|
let c, s;
|
|
677
|
-
ct.forEach(r, (
|
|
678
|
-
|
|
698
|
+
ct.forEach(r, (E) => {
|
|
699
|
+
W(E) && (E.type === ge ? c = E.props : E.type === Oe && (s = E.props));
|
|
679
700
|
});
|
|
680
|
-
const l = s == null ? void 0 : s.children, f =
|
|
701
|
+
const l = s == null ? void 0 : s.children, f = z(() => ({ fallback: l }), [l]);
|
|
681
702
|
return /* @__PURE__ */ x(
|
|
682
|
-
|
|
703
|
+
he,
|
|
683
704
|
{
|
|
684
705
|
src: c == null ? void 0 : c.src,
|
|
685
706
|
alt: c == null ? void 0 : c.alt,
|
|
@@ -694,8 +715,8 @@ function He({ className: e, style: t, onLoadingStatusChange: o, children: r, ...
|
|
|
694
715
|
}
|
|
695
716
|
);
|
|
696
717
|
}
|
|
697
|
-
const
|
|
698
|
-
function
|
|
718
|
+
const _e = p(jt);
|
|
719
|
+
function Qe({
|
|
699
720
|
orientation: e = "vertical",
|
|
700
721
|
scrollbarVisibility: t = "always",
|
|
701
722
|
className: o,
|
|
@@ -705,27 +726,27 @@ function Ge({
|
|
|
705
726
|
viewportRef: s,
|
|
706
727
|
style: l,
|
|
707
728
|
onScroll: f,
|
|
708
|
-
children:
|
|
709
|
-
...
|
|
729
|
+
children: E,
|
|
730
|
+
...P
|
|
710
731
|
}) {
|
|
711
|
-
const [u,
|
|
712
|
-
(
|
|
713
|
-
d
|
|
732
|
+
const [u, i] = U(null), a = R(
|
|
733
|
+
(d) => {
|
|
734
|
+
i(d), typeof s == "function" ? s(d) : s && (s.current = d);
|
|
714
735
|
},
|
|
715
736
|
[s]
|
|
716
737
|
);
|
|
717
|
-
return /* @__PURE__ */
|
|
738
|
+
return /* @__PURE__ */ Ce("div", { className: ["moz-scroll-area", o].filter(Boolean).join(" "), style: l, ...P, children: [
|
|
718
739
|
/* @__PURE__ */ x(
|
|
719
740
|
"div",
|
|
720
741
|
{
|
|
721
742
|
ref: a,
|
|
722
743
|
className: ["moz-scroll-area-viewport", r].filter(Boolean).join(" "),
|
|
723
744
|
"data-moz-scroll-area-viewport": "",
|
|
724
|
-
children:
|
|
745
|
+
children: E
|
|
725
746
|
}
|
|
726
747
|
),
|
|
727
748
|
/* @__PURE__ */ x(
|
|
728
|
-
|
|
749
|
+
_e,
|
|
729
750
|
{
|
|
730
751
|
viewport: u,
|
|
731
752
|
interactionRoot: u == null ? void 0 : u.parentElement,
|
|
@@ -738,69 +759,72 @@ function Ge({
|
|
|
738
759
|
)
|
|
739
760
|
] });
|
|
740
761
|
}
|
|
741
|
-
const
|
|
762
|
+
const Ze = p(Bt), to = p(Ut), eo = p(Dt), oo = p(Wt), no = p(Ft), ro = p(Kt), so = p($t), co = p(Vt), lo = p(Ht), uo = p(Gt), ao = p(qt), io = p(Xt), po = p(Yt), fo = p(Jt), Co = p(Qt), Eo = p(Zt), Po = p(te), mo = p(ee), So = p(oe), yo = p(ne), To = p(re), vo = p(se), bo = p(ce), Ao = p(le), ho = p(ue), go = p(ae), Oo = p(ie), _o = p(pe), Ro = p(fe), Io = p(de);
|
|
742
763
|
export {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
Ke as
|
|
772
|
-
Ve as
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
764
|
+
Je as Avatar,
|
|
765
|
+
Oe as AvatarFallback,
|
|
766
|
+
ge as AvatarImage,
|
|
767
|
+
eo as Badge,
|
|
768
|
+
so as BreadCrumb,
|
|
769
|
+
Ze as Button,
|
|
770
|
+
Po as Calendar,
|
|
771
|
+
no as Callout,
|
|
772
|
+
lo as CheckBox,
|
|
773
|
+
oo as Chip,
|
|
774
|
+
qe as Collapsible,
|
|
775
|
+
Ye as CollapsibleContent,
|
|
776
|
+
Xe as CollapsibleTrigger,
|
|
777
|
+
Ao as ContextMenu,
|
|
778
|
+
Oo as Controller,
|
|
779
|
+
mo as DateInput,
|
|
780
|
+
co as EmptyState,
|
|
781
|
+
ao as Input,
|
|
782
|
+
to as Label,
|
|
783
|
+
at as MozComponentLocaleContext,
|
|
784
|
+
ke as MozComponentLocaleProvider,
|
|
785
|
+
it as MozContextWrapperContext,
|
|
786
|
+
To as MultiSelect,
|
|
787
|
+
Ro as NotificationCard,
|
|
788
|
+
Io as NotificationItem,
|
|
789
|
+
fo as NumberInput,
|
|
790
|
+
Se as Pane,
|
|
791
|
+
io as PasswordInput,
|
|
792
|
+
Ke as Popover,
|
|
793
|
+
Ve as PopoverAnchor,
|
|
794
|
+
He as PopoverClose,
|
|
795
|
+
Ge as PopoverContent,
|
|
796
|
+
$e as PopoverTrigger,
|
|
797
|
+
So as Popup,
|
|
798
|
+
uo as Radio,
|
|
799
|
+
ut as ReactRenderer,
|
|
800
|
+
Qe as ScrollArea,
|
|
801
|
+
yo as Select,
|
|
802
|
+
Eo as Slider,
|
|
803
|
+
Be as SplitPane,
|
|
804
|
+
Co as Tab,
|
|
805
|
+
ho as TableSelect,
|
|
806
|
+
bo as TagInput,
|
|
807
|
+
po as TextArea,
|
|
808
|
+
vo as TimePicker,
|
|
809
|
+
_o as Toast,
|
|
810
|
+
ro as Toggle,
|
|
811
|
+
De as Tooltip,
|
|
812
|
+
Fe as TooltipContent,
|
|
813
|
+
Ue as TooltipProvider,
|
|
814
|
+
We as TooltipTrigger,
|
|
815
|
+
go as TreeSelect,
|
|
816
|
+
we as Validator,
|
|
794
817
|
tt as ValidatorReactContext,
|
|
795
818
|
p as createMozComponent,
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
819
|
+
Mo as createValidator,
|
|
820
|
+
No as enUS,
|
|
821
|
+
ko as jaJP,
|
|
822
|
+
wo as koKR,
|
|
823
|
+
pt as useMozComponentLocale,
|
|
824
|
+
ft as useMozContextWrapper,
|
|
825
|
+
je as useNotification,
|
|
826
|
+
zo as useToast,
|
|
827
|
+
ze as useValidatorContext,
|
|
828
|
+
jo as zhCN
|
|
805
829
|
};
|
|
806
830
|
//# sourceMappingURL=index.js.map
|