@vmscloud/moz-ui-components-react 0.1.47 → 0.1.49

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