@ohseungik/maru-ui 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +52 -2
- package/dist/components/Button/Button.d.ts +16 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +17 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +29 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Field/Field.d.ts +14 -0
- package/dist/components/Field/FieldContext.d.ts +12 -0
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/Heading/Heading.d.ts +12 -0
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +16 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +48 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +23 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +20 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Stack/Stack.d.ts +16 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +13 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +21 -0
- package/dist/components/Table/TableParts.d.ts +30 -0
- package/dist/components/Table/index.d.ts +4 -0
- package/dist/components/Tabs/Tab.d.ts +10 -0
- package/dist/components/Tabs/TabList.d.ts +8 -0
- package/dist/components/Tabs/TabPanel.d.ts +11 -0
- package/dist/components/Tabs/Tabs.d.ts +25 -0
- package/dist/components/Tabs/TabsContext.d.ts +16 -0
- package/dist/components/Tabs/index.d.ts +9 -0
- package/dist/components/Text/Text.d.ts +13 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +38 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +889 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/utils/cx.d.ts +4 -0
- package/dist/utils/position.d.ts +29 -0
- package/package.json +62 -3
package/dist/index.js
ADDED
|
@@ -0,0 +1,889 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as L, jsx as l, Fragment as j } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as E, useRef as S, useCallback as Q, useEffect as P, useId as O, createContext as re, useContext as se, useState as U, Children as ae, isValidElement as le, cloneElement as ie, useLayoutEffect as ce, useMemo as ye } from "react";
|
|
4
|
+
function T(...s) {
|
|
5
|
+
return s.filter(Boolean).join(" ");
|
|
6
|
+
}
|
|
7
|
+
const we = "maru-Button-module__root__Q2R8-", Te = "maru-Button-module__spinner__ZExvW", G = {
|
|
8
|
+
root: we,
|
|
9
|
+
spinner: Te
|
|
10
|
+
}, Lt = E(function({
|
|
11
|
+
variant: e = "primary",
|
|
12
|
+
size: t = "md",
|
|
13
|
+
loading: n = !1,
|
|
14
|
+
type: o = "button",
|
|
15
|
+
disabled: a = !1,
|
|
16
|
+
className: u,
|
|
17
|
+
children: i,
|
|
18
|
+
...c
|
|
19
|
+
}, d) {
|
|
20
|
+
return /* @__PURE__ */ L(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
...c,
|
|
24
|
+
ref: d,
|
|
25
|
+
type: o,
|
|
26
|
+
className: T(G.root, u),
|
|
27
|
+
"data-variant": e,
|
|
28
|
+
"data-size": t,
|
|
29
|
+
"data-loading": n ? "" : void 0,
|
|
30
|
+
disabled: a || n,
|
|
31
|
+
"aria-busy": n ? !0 : void 0,
|
|
32
|
+
children: [
|
|
33
|
+
n ? /* @__PURE__ */ l("span", { className: G.spinner, "aria-hidden": "true" }) : null,
|
|
34
|
+
i
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}), xe = "maru-Checkbox-module__root__mY3qk", Ee = "maru-Checkbox-module__control__PxoNk", ke = "maru-Checkbox-module__input__2kt-h", Ne = "maru-Checkbox-module__box__OCPee", A = {
|
|
39
|
+
root: xe,
|
|
40
|
+
control: Ee,
|
|
41
|
+
input: ke,
|
|
42
|
+
box: Ne
|
|
43
|
+
}, Ct = E(function({ size: e = "md", indeterminate: t = !1, invalid: n = !1, disabled: o, className: a, children: u, ...i }, c) {
|
|
44
|
+
const d = S(null), _ = Q(
|
|
45
|
+
(f) => {
|
|
46
|
+
d.current = f, typeof c == "function" ? c(f) : c && (c.current = f);
|
|
47
|
+
},
|
|
48
|
+
[c]
|
|
49
|
+
);
|
|
50
|
+
return P(() => {
|
|
51
|
+
d.current && (d.current.indeterminate = t);
|
|
52
|
+
}), /* @__PURE__ */ L(
|
|
53
|
+
"label",
|
|
54
|
+
{
|
|
55
|
+
className: T(A.root, a),
|
|
56
|
+
"data-size": e,
|
|
57
|
+
"data-disabled": o ? "" : void 0,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ L("span", { className: A.control, children: [
|
|
60
|
+
/* @__PURE__ */ l(
|
|
61
|
+
"input",
|
|
62
|
+
{
|
|
63
|
+
...i,
|
|
64
|
+
ref: _,
|
|
65
|
+
type: "checkbox",
|
|
66
|
+
className: A.input,
|
|
67
|
+
disabled: o,
|
|
68
|
+
"data-invalid": n ? "" : void 0,
|
|
69
|
+
"aria-invalid": n ? !0 : void 0
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ l("span", { className: A.box, "aria-hidden": "true" })
|
|
73
|
+
] }),
|
|
74
|
+
u ? /* @__PURE__ */ l("span", { className: A.label, children: u }) : null
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}), $e = "maru-Heading-module__root__-To4U", ge = {
|
|
79
|
+
root: $e
|
|
80
|
+
}, Le = {
|
|
81
|
+
1: "4xl",
|
|
82
|
+
2: "3xl",
|
|
83
|
+
3: "2xl",
|
|
84
|
+
4: "xl",
|
|
85
|
+
5: "lg",
|
|
86
|
+
6: "md"
|
|
87
|
+
}, Ce = E(function({ level: e, size: t, tone: n = "default", className: o, ...a }, u) {
|
|
88
|
+
const i = `h${e}`;
|
|
89
|
+
return /* @__PURE__ */ l(
|
|
90
|
+
i,
|
|
91
|
+
{
|
|
92
|
+
...a,
|
|
93
|
+
ref: u,
|
|
94
|
+
className: T(ge.root, o),
|
|
95
|
+
"data-size": t ?? Le[e],
|
|
96
|
+
"data-tone": n
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}), Ie = "maru-Dialog-module__root__tvkOF", Se = "maru-Dialog-module__panel__b2y0S", Pe = "maru-Dialog-module__header__bdJRp", Be = "maru-Dialog-module__title__glVA6", De = "maru-Dialog-module__description__6Bsa9", Re = "maru-Dialog-module__body__1ZbVo", Me = "maru-Dialog-module__actions__JRD2K", ze = "maru-Dialog-module__close__Zz2uv", z = {
|
|
100
|
+
root: Ie,
|
|
101
|
+
panel: Se,
|
|
102
|
+
header: Pe,
|
|
103
|
+
title: Be,
|
|
104
|
+
description: De,
|
|
105
|
+
body: Re,
|
|
106
|
+
actions: Me,
|
|
107
|
+
close: ze
|
|
108
|
+
};
|
|
109
|
+
let W = 0, de = "";
|
|
110
|
+
function Oe() {
|
|
111
|
+
W === 0 && (de = document.body.style.overflow, document.body.style.overflow = "hidden"), W += 1;
|
|
112
|
+
}
|
|
113
|
+
function Fe() {
|
|
114
|
+
W = Math.max(0, W - 1), W === 0 && (document.body.style.overflow = de);
|
|
115
|
+
}
|
|
116
|
+
const It = E(function({
|
|
117
|
+
open: e,
|
|
118
|
+
onClose: t,
|
|
119
|
+
title: n,
|
|
120
|
+
description: o,
|
|
121
|
+
actions: a,
|
|
122
|
+
size: u = "md",
|
|
123
|
+
closeOnBackdropClick: i = !0,
|
|
124
|
+
closeLabel: c = "Close",
|
|
125
|
+
initialFocusRef: d,
|
|
126
|
+
keepMounted: _ = !1,
|
|
127
|
+
className: f,
|
|
128
|
+
children: p,
|
|
129
|
+
...v
|
|
130
|
+
}, w) {
|
|
131
|
+
const y = O(), b = `${y}-title`, m = `${y}-description`, N = S(null), k = S(t), h = S(e), x = S(i);
|
|
132
|
+
P(() => {
|
|
133
|
+
k.current = t, h.current = e, x.current = i;
|
|
134
|
+
});
|
|
135
|
+
const R = Q(
|
|
136
|
+
(r) => {
|
|
137
|
+
N.current = r, typeof w == "function" ? w(r) : w && (w.current = r);
|
|
138
|
+
},
|
|
139
|
+
[w]
|
|
140
|
+
), D = e || _;
|
|
141
|
+
return P(() => {
|
|
142
|
+
const r = N.current;
|
|
143
|
+
if (!r || !e) return;
|
|
144
|
+
const $ = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
145
|
+
return r.open || r.showModal(), Oe(), d?.current && d.current.focus(), () => {
|
|
146
|
+
Fe(), r.open && r.close();
|
|
147
|
+
const C = document.activeElement, I = !C || C === document.body || r.contains(C);
|
|
148
|
+
$?.isConnected && I && $.focus();
|
|
149
|
+
};
|
|
150
|
+
}, [e]), P(() => {
|
|
151
|
+
const r = N.current;
|
|
152
|
+
if (!r) return;
|
|
153
|
+
const $ = (M) => {
|
|
154
|
+
M.preventDefault(), k.current();
|
|
155
|
+
}, C = () => {
|
|
156
|
+
h.current && !r.open && k.current();
|
|
157
|
+
};
|
|
158
|
+
let I = !1;
|
|
159
|
+
const F = (M) => {
|
|
160
|
+
I = M.target === r;
|
|
161
|
+
}, H = (M) => {
|
|
162
|
+
const g = I && M.target === r && x.current;
|
|
163
|
+
I = !1, g && k.current();
|
|
164
|
+
};
|
|
165
|
+
return r.addEventListener("cancel", $), r.addEventListener("close", C), r.addEventListener("mousedown", F), r.addEventListener("click", H), () => {
|
|
166
|
+
r.removeEventListener("cancel", $), r.removeEventListener("close", C), r.removeEventListener("mousedown", F), r.removeEventListener("click", H);
|
|
167
|
+
};
|
|
168
|
+
}, [D]), D ? /* @__PURE__ */ l(
|
|
169
|
+
"dialog",
|
|
170
|
+
{
|
|
171
|
+
...v,
|
|
172
|
+
ref: R,
|
|
173
|
+
className: T(z.root, f),
|
|
174
|
+
"data-size": u,
|
|
175
|
+
"aria-labelledby": b,
|
|
176
|
+
"aria-describedby": o ? m : void 0,
|
|
177
|
+
children: /* @__PURE__ */ L("div", { className: z.panel, children: [
|
|
178
|
+
/* @__PURE__ */ L("header", { className: z.header, children: [
|
|
179
|
+
/* @__PURE__ */ l(Ce, { level: 2, size: "lg", id: b, className: z.title, children: n }),
|
|
180
|
+
o ? /* @__PURE__ */ l("p", { id: m, className: z.description, children: o }) : null
|
|
181
|
+
] }),
|
|
182
|
+
/* @__PURE__ */ l("div", { className: z.body, children: p }),
|
|
183
|
+
a ? /* @__PURE__ */ l("footer", { className: z.actions, children: a }) : null,
|
|
184
|
+
/* @__PURE__ */ l("button", { type: "button", className: z.close, "aria-label": c, onClick: t, children: /* @__PURE__ */ l("svg", { viewBox: "0 0 16 16", width: "16", height: "16", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ l(
|
|
185
|
+
"path",
|
|
186
|
+
{
|
|
187
|
+
d: "M3 3l10 10M13 3L3 13",
|
|
188
|
+
fill: "none",
|
|
189
|
+
stroke: "currentColor",
|
|
190
|
+
strokeWidth: "1.5",
|
|
191
|
+
strokeLinecap: "round"
|
|
192
|
+
}
|
|
193
|
+
) }) })
|
|
194
|
+
] })
|
|
195
|
+
}
|
|
196
|
+
) : null;
|
|
197
|
+
}), ue = re(null);
|
|
198
|
+
function me() {
|
|
199
|
+
return se(ue);
|
|
200
|
+
}
|
|
201
|
+
const He = "maru-Field-module__root__OOI9-", Ae = "maru-Field-module__label__LAQio", qe = "maru-Field-module__required__8HCWC", Ke = "maru-Field-module__description__yqljW", We = "maru-Field-module__error__m0uol", q = {
|
|
202
|
+
root: He,
|
|
203
|
+
label: Ae,
|
|
204
|
+
required: qe,
|
|
205
|
+
description: Ke,
|
|
206
|
+
error: We
|
|
207
|
+
};
|
|
208
|
+
function ee(s) {
|
|
209
|
+
return s != null && s !== !1 && s !== "";
|
|
210
|
+
}
|
|
211
|
+
const St = E(function({ label: e, description: t, error: n, required: o = !1, disabled: a = !1, className: u, children: i, ...c }, d) {
|
|
212
|
+
const _ = O(), f = `${_}-control`, p = `${_}-description`, v = `${_}-error`, w = ee(t), y = ee(n), b = [w ? p : null, y ? v : null].filter(Boolean).join(" ") || void 0;
|
|
213
|
+
return /* @__PURE__ */ L(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
...c,
|
|
217
|
+
ref: d,
|
|
218
|
+
className: T(q.root, u),
|
|
219
|
+
"data-invalid": y ? "" : void 0,
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ L("label", { htmlFor: f, className: q.label, children: [
|
|
222
|
+
e,
|
|
223
|
+
o ? /* @__PURE__ */ l("span", { "aria-hidden": "true", className: q.required, children: " *" }) : null
|
|
224
|
+
] }),
|
|
225
|
+
w ? /* @__PURE__ */ l("p", { id: p, className: q.description, children: t }) : null,
|
|
226
|
+
/* @__PURE__ */ l(
|
|
227
|
+
ue.Provider,
|
|
228
|
+
{
|
|
229
|
+
value: { controlId: f, describedBy: b, invalid: y, required: o, disabled: a },
|
|
230
|
+
children: i
|
|
231
|
+
}
|
|
232
|
+
),
|
|
233
|
+
/* @__PURE__ */ l("div", { "aria-live": "polite", children: y ? /* @__PURE__ */ l("p", { id: v, className: q.error, children: n }) : null })
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
}), Ve = "maru-Input-module__root__KgYPo", je = {
|
|
238
|
+
root: Ve
|
|
239
|
+
}, Pt = E(function({
|
|
240
|
+
size: e = "md",
|
|
241
|
+
type: t = "text",
|
|
242
|
+
invalid: n,
|
|
243
|
+
id: o,
|
|
244
|
+
disabled: a,
|
|
245
|
+
required: u,
|
|
246
|
+
className: i,
|
|
247
|
+
"aria-describedby": c,
|
|
248
|
+
...d
|
|
249
|
+
}, _) {
|
|
250
|
+
const f = me(), p = n ?? f?.invalid ?? !1, v = [c, f?.describedBy].filter(Boolean).join(" ") || void 0;
|
|
251
|
+
return /* @__PURE__ */ l(
|
|
252
|
+
"input",
|
|
253
|
+
{
|
|
254
|
+
...d,
|
|
255
|
+
ref: _,
|
|
256
|
+
id: f?.controlId ?? o,
|
|
257
|
+
type: t,
|
|
258
|
+
className: T(je.root, i),
|
|
259
|
+
"data-size": e,
|
|
260
|
+
"data-invalid": p ? "" : void 0,
|
|
261
|
+
"aria-invalid": p ? !0 : void 0,
|
|
262
|
+
"aria-describedby": v,
|
|
263
|
+
disabled: a ?? f?.disabled,
|
|
264
|
+
required: u ?? f?.required
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
}), te = {
|
|
268
|
+
top: "bottom",
|
|
269
|
+
bottom: "top",
|
|
270
|
+
left: "right",
|
|
271
|
+
right: "left"
|
|
272
|
+
};
|
|
273
|
+
function fe(s, e, t, n, o = 8, a = 8) {
|
|
274
|
+
const u = {
|
|
275
|
+
top: s.top - o - e.height >= a,
|
|
276
|
+
bottom: s.bottom + o + e.height <= t.height - a,
|
|
277
|
+
left: s.left - o - e.width >= a,
|
|
278
|
+
right: s.right + o + e.width <= t.width - a
|
|
279
|
+
}, i = !u[n] && u[te[n]] ? te[n] : n, c = (f, p, v) => Math.max(a, Math.min(f, v - a - p)), d = (s.left + s.right) / 2 - e.width / 2, _ = (s.top + s.bottom) / 2 - e.height / 2;
|
|
280
|
+
switch (i) {
|
|
281
|
+
case "top":
|
|
282
|
+
return {
|
|
283
|
+
side: i,
|
|
284
|
+
x: c(d, e.width, t.width),
|
|
285
|
+
y: s.top - o - e.height
|
|
286
|
+
};
|
|
287
|
+
case "bottom":
|
|
288
|
+
return {
|
|
289
|
+
side: i,
|
|
290
|
+
x: c(d, e.width, t.width),
|
|
291
|
+
y: s.bottom + o
|
|
292
|
+
};
|
|
293
|
+
case "left":
|
|
294
|
+
return {
|
|
295
|
+
side: i,
|
|
296
|
+
x: s.left - o - e.width,
|
|
297
|
+
y: c(_, e.height, t.height)
|
|
298
|
+
};
|
|
299
|
+
case "right":
|
|
300
|
+
return {
|
|
301
|
+
side: i,
|
|
302
|
+
x: s.right + o,
|
|
303
|
+
y: c(_, e.height, t.height)
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
const Ue = "maru-Popover-module__root__vEMon", Ze = "maru-Popover-module__title__hAl5w", Ye = "maru-Popover-module__body__d6SIw", Y = {
|
|
308
|
+
root: Ue,
|
|
309
|
+
title: Ze,
|
|
310
|
+
body: Ye
|
|
311
|
+
}, oe = typeof document > "u" ? P : ce, Je = [
|
|
312
|
+
"a[href]",
|
|
313
|
+
"button:not([disabled])",
|
|
314
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
315
|
+
"select:not([disabled])",
|
|
316
|
+
"textarea:not([disabled])",
|
|
317
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
318
|
+
].join(",");
|
|
319
|
+
function Bt({
|
|
320
|
+
content: s,
|
|
321
|
+
children: e,
|
|
322
|
+
title: t,
|
|
323
|
+
"aria-label": n,
|
|
324
|
+
placement: o = "bottom",
|
|
325
|
+
open: a,
|
|
326
|
+
defaultOpen: u = !1,
|
|
327
|
+
onOpenChange: i,
|
|
328
|
+
disabled: c = !1,
|
|
329
|
+
className: d
|
|
330
|
+
}) {
|
|
331
|
+
const _ = O(), f = O(), p = S(null), [v, w] = U(u), y = a !== void 0, b = !c && (y ? a : v), m = S({ open: b, controlled: y, onOpenChange: i });
|
|
332
|
+
oe(() => {
|
|
333
|
+
m.current = { open: b, controlled: y, onOpenChange: i };
|
|
334
|
+
});
|
|
335
|
+
const N = (r) => {
|
|
336
|
+
const { open: $, controlled: C, onOpenChange: I } = m.current;
|
|
337
|
+
r !== $ && (C || w(r), I?.(r));
|
|
338
|
+
}, k = () => p.current?.previousElementSibling ?? null;
|
|
339
|
+
oe(() => {
|
|
340
|
+
const r = p.current;
|
|
341
|
+
if (!r || !b) return;
|
|
342
|
+
const $ = () => {
|
|
343
|
+
const g = k();
|
|
344
|
+
if (!g) return;
|
|
345
|
+
const { x: V, y: pe, side: ve } = fe(
|
|
346
|
+
g.getBoundingClientRect(),
|
|
347
|
+
{ width: r.offsetWidth, height: r.offsetHeight },
|
|
348
|
+
{
|
|
349
|
+
width: document.documentElement.clientWidth,
|
|
350
|
+
height: document.documentElement.clientHeight
|
|
351
|
+
},
|
|
352
|
+
o
|
|
353
|
+
);
|
|
354
|
+
r.style.left = `${V}px`, r.style.top = `${pe}px`, r.dataset.placement = ve;
|
|
355
|
+
};
|
|
356
|
+
let C = !1;
|
|
357
|
+
typeof r.showPopover == "function" && (r.showPopover(), C = !0), $();
|
|
358
|
+
const I = (g) => g instanceof Node && !r.contains(g) && !k()?.contains(g), F = (g) => {
|
|
359
|
+
if (g.key !== "Escape") return;
|
|
360
|
+
g.preventDefault(), g.stopPropagation(), N(!1);
|
|
361
|
+
const V = k();
|
|
362
|
+
V instanceof HTMLElement && V.focus();
|
|
363
|
+
}, H = (g) => {
|
|
364
|
+
I(g.target) && N(!1);
|
|
365
|
+
}, M = (g) => {
|
|
366
|
+
I(g.target) && N(!1);
|
|
367
|
+
};
|
|
368
|
+
return window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), document.addEventListener("keydown", F, !0), document.addEventListener("pointerdown", H, !0), document.addEventListener("focusin", M), () => {
|
|
369
|
+
window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $), document.removeEventListener("keydown", F, !0), document.removeEventListener("pointerdown", H, !0), document.removeEventListener("focusin", M), C && r.hidePopover();
|
|
370
|
+
};
|
|
371
|
+
}, [b, o]);
|
|
372
|
+
const h = S(b);
|
|
373
|
+
P(() => {
|
|
374
|
+
const r = p.current;
|
|
375
|
+
b && !h.current && r && (r.querySelector(Je) ?? r).focus(), h.current = b;
|
|
376
|
+
}, [b]);
|
|
377
|
+
const x = ae.only(e);
|
|
378
|
+
if (!le(x)) return /* @__PURE__ */ l(j, { children: e });
|
|
379
|
+
if (c) return x;
|
|
380
|
+
const R = x.props, D = ie(x, {
|
|
381
|
+
"aria-expanded": b,
|
|
382
|
+
"aria-controls": _,
|
|
383
|
+
"aria-haspopup": "dialog",
|
|
384
|
+
onClick: (r) => {
|
|
385
|
+
R.onClick?.(r), !r.defaultPrevented && N(!m.current.open);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
return /* @__PURE__ */ L(j, { children: [
|
|
389
|
+
D,
|
|
390
|
+
/* @__PURE__ */ L(
|
|
391
|
+
"div",
|
|
392
|
+
{
|
|
393
|
+
ref: p,
|
|
394
|
+
id: _,
|
|
395
|
+
role: "dialog",
|
|
396
|
+
popover: "manual",
|
|
397
|
+
"aria-labelledby": t ? f : void 0,
|
|
398
|
+
"aria-label": t ? void 0 : n,
|
|
399
|
+
tabIndex: -1,
|
|
400
|
+
className: T(Y.root, d),
|
|
401
|
+
"data-open": b ? "" : void 0,
|
|
402
|
+
"data-placement": o,
|
|
403
|
+
children: [
|
|
404
|
+
t ? /* @__PURE__ */ l("div", { id: f, className: Y.title, children: t }) : null,
|
|
405
|
+
b ? /* @__PURE__ */ l("div", { className: Y.body, children: s }) : null
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
)
|
|
409
|
+
] });
|
|
410
|
+
}
|
|
411
|
+
const Qe = "maru-Select-module__wrapper__KS2K3", Xe = "maru-Select-module__root__y0u6b", Ge = "maru-Select-module__chevron__PLUsh", J = {
|
|
412
|
+
wrapper: Qe,
|
|
413
|
+
root: Xe,
|
|
414
|
+
chevron: Ge
|
|
415
|
+
}, Dt = E(function({
|
|
416
|
+
size: e = "md",
|
|
417
|
+
invalid: t,
|
|
418
|
+
placeholder: n,
|
|
419
|
+
id: o,
|
|
420
|
+
disabled: a,
|
|
421
|
+
required: u,
|
|
422
|
+
value: i,
|
|
423
|
+
defaultValue: c,
|
|
424
|
+
className: d,
|
|
425
|
+
children: _,
|
|
426
|
+
"aria-describedby": f,
|
|
427
|
+
...p
|
|
428
|
+
}, v) {
|
|
429
|
+
const w = me(), y = t ?? w?.invalid ?? !1, b = a ?? w?.disabled ?? !1, m = [f, w?.describedBy].filter(Boolean).join(" ") || void 0, N = i !== void 0 ? { value: i } : { defaultValue: c ?? (n !== void 0 ? "" : void 0) };
|
|
430
|
+
return /* @__PURE__ */ L("span", { className: J.wrapper, "data-size": e, "data-disabled": b ? "" : void 0, children: [
|
|
431
|
+
/* @__PURE__ */ L(
|
|
432
|
+
"select",
|
|
433
|
+
{
|
|
434
|
+
...p,
|
|
435
|
+
...N,
|
|
436
|
+
ref: v,
|
|
437
|
+
id: w?.controlId ?? o,
|
|
438
|
+
className: T(J.root, d),
|
|
439
|
+
"data-invalid": y ? "" : void 0,
|
|
440
|
+
"aria-invalid": y ? !0 : void 0,
|
|
441
|
+
"aria-describedby": m,
|
|
442
|
+
disabled: b,
|
|
443
|
+
required: u ?? w?.required,
|
|
444
|
+
children: [
|
|
445
|
+
n !== void 0 ? /* @__PURE__ */ l("option", { value: "", disabled: !0, hidden: !0, children: n }) : null,
|
|
446
|
+
_
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
),
|
|
450
|
+
/* @__PURE__ */ l("svg", { className: J.chevron, viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ l(
|
|
451
|
+
"path",
|
|
452
|
+
{
|
|
453
|
+
d: "M4 6l4 4 4-4",
|
|
454
|
+
fill: "none",
|
|
455
|
+
stroke: "currentColor",
|
|
456
|
+
strokeWidth: "1.5",
|
|
457
|
+
strokeLinecap: "round",
|
|
458
|
+
strokeLinejoin: "round"
|
|
459
|
+
}
|
|
460
|
+
) })
|
|
461
|
+
] });
|
|
462
|
+
}), et = "maru-Skeleton-module__root__qaX19", tt = {
|
|
463
|
+
root: et
|
|
464
|
+
};
|
|
465
|
+
function ne(s) {
|
|
466
|
+
return typeof s == "number" ? `${s}px` : s;
|
|
467
|
+
}
|
|
468
|
+
const Rt = E(function({ variant: e = "text", width: t, height: n, lines: o = 1, className: a, style: u, ...i }, c) {
|
|
469
|
+
const d = e === "text" ? Math.max(1, Math.floor(o) || 1) : 1, _ = {
|
|
470
|
+
"--maru-skeleton-width": ne(t),
|
|
471
|
+
"--maru-skeleton-height": ne(n),
|
|
472
|
+
...u
|
|
473
|
+
};
|
|
474
|
+
return /* @__PURE__ */ l(
|
|
475
|
+
"div",
|
|
476
|
+
{
|
|
477
|
+
...i,
|
|
478
|
+
ref: c,
|
|
479
|
+
"aria-hidden": "true",
|
|
480
|
+
className: T(tt.root, a),
|
|
481
|
+
style: _,
|
|
482
|
+
"data-variant": e,
|
|
483
|
+
"data-lines": d > 1 ? d : void 0,
|
|
484
|
+
children: d > 1 ? Array.from({ length: d }, (f, p) => /* @__PURE__ */ l("span", {}, p)) : null
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
}), ot = "maru-Stack-module__root__NUN-x", nt = {
|
|
488
|
+
root: ot
|
|
489
|
+
}, Mt = E(function({
|
|
490
|
+
as: e = "div",
|
|
491
|
+
direction: t = "vertical",
|
|
492
|
+
gap: n = 4,
|
|
493
|
+
align: o,
|
|
494
|
+
justify: a,
|
|
495
|
+
wrap: u = !1,
|
|
496
|
+
className: i,
|
|
497
|
+
style: c,
|
|
498
|
+
...d
|
|
499
|
+
}, _) {
|
|
500
|
+
const f = e, p = {
|
|
501
|
+
"--maru-stack-gap": `var(--maru-space-${n})`,
|
|
502
|
+
...c
|
|
503
|
+
};
|
|
504
|
+
return /* @__PURE__ */ l(
|
|
505
|
+
f,
|
|
506
|
+
{
|
|
507
|
+
...d,
|
|
508
|
+
ref: _,
|
|
509
|
+
className: T(nt.root, i),
|
|
510
|
+
style: p,
|
|
511
|
+
"data-direction": t,
|
|
512
|
+
"data-align": o,
|
|
513
|
+
"data-justify": a,
|
|
514
|
+
"data-wrap": u ? "" : void 0
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
}), rt = "maru-Switch-module__root__Y5Ydi", st = "maru-Switch-module__control__HV3vX", at = "maru-Switch-module__input__5BPNu", lt = "maru-Switch-module__track__7ObdZ", K = {
|
|
518
|
+
root: rt,
|
|
519
|
+
control: st,
|
|
520
|
+
input: at,
|
|
521
|
+
track: lt
|
|
522
|
+
}, zt = E(function({ size: e = "md", disabled: t, className: n, children: o, ...a }, u) {
|
|
523
|
+
return /* @__PURE__ */ L(
|
|
524
|
+
"label",
|
|
525
|
+
{
|
|
526
|
+
className: T(K.root, n),
|
|
527
|
+
"data-size": e,
|
|
528
|
+
"data-disabled": t ? "" : void 0,
|
|
529
|
+
children: [
|
|
530
|
+
/* @__PURE__ */ L("span", { className: K.control, children: [
|
|
531
|
+
/* @__PURE__ */ l(
|
|
532
|
+
"input",
|
|
533
|
+
{
|
|
534
|
+
...a,
|
|
535
|
+
ref: u,
|
|
536
|
+
type: "checkbox",
|
|
537
|
+
role: "switch",
|
|
538
|
+
className: K.input,
|
|
539
|
+
disabled: t
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
/* @__PURE__ */ l("span", { className: K.track, "aria-hidden": "true" })
|
|
543
|
+
] }),
|
|
544
|
+
o ? /* @__PURE__ */ l("span", { className: K.label, children: o }) : null
|
|
545
|
+
]
|
|
546
|
+
}
|
|
547
|
+
);
|
|
548
|
+
}), it = "maru-Table-module__wrapper__Qd7Cl", ct = "maru-Table-module__root__aMWWS", dt = "maru-Table-module__caption__9vU1I", ut = "maru-Table-module__header__5ZCAk", mt = "maru-Table-module__cell__nJrDK", ft = "maru-Table-module__body__8JxwZ", ht = "maru-Table-module__row__DD8Km", _t = "maru-Table-module__sort__Oet49", bt = "maru-Table-module__sortIcon__V3-dH", B = {
|
|
549
|
+
wrapper: it,
|
|
550
|
+
root: ct,
|
|
551
|
+
caption: dt,
|
|
552
|
+
header: ut,
|
|
553
|
+
cell: mt,
|
|
554
|
+
body: ft,
|
|
555
|
+
row: ht,
|
|
556
|
+
sort: _t,
|
|
557
|
+
sortIcon: bt
|
|
558
|
+
}, Ot = E(function({ caption: e, hideCaption: t = !1, size: n = "md", striped: o = !1, className: a, children: u, ...i }, c) {
|
|
559
|
+
const d = O(), _ = S(null), [f, p] = U(!1);
|
|
560
|
+
P(() => {
|
|
561
|
+
const y = _.current;
|
|
562
|
+
if (!y) return;
|
|
563
|
+
const b = () => p(y.scrollWidth > y.clientWidth);
|
|
564
|
+
if (b(), typeof ResizeObserver > "u")
|
|
565
|
+
return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
566
|
+
const m = new ResizeObserver(b);
|
|
567
|
+
return m.observe(y), y.firstElementChild && m.observe(y.firstElementChild), () => m.disconnect();
|
|
568
|
+
}, []);
|
|
569
|
+
const v = e != null && e !== !1, w = i["aria-label"];
|
|
570
|
+
return /* @__PURE__ */ l(
|
|
571
|
+
"div",
|
|
572
|
+
{
|
|
573
|
+
ref: _,
|
|
574
|
+
className: B.wrapper,
|
|
575
|
+
...f ? {
|
|
576
|
+
role: "region",
|
|
577
|
+
tabIndex: 0,
|
|
578
|
+
"aria-labelledby": v ? d : void 0,
|
|
579
|
+
"aria-label": v ? void 0 : w
|
|
580
|
+
} : null,
|
|
581
|
+
children: /* @__PURE__ */ L(
|
|
582
|
+
"table",
|
|
583
|
+
{
|
|
584
|
+
...i,
|
|
585
|
+
ref: c,
|
|
586
|
+
className: T(B.root, a),
|
|
587
|
+
"data-size": n,
|
|
588
|
+
"data-striped": o ? "" : void 0,
|
|
589
|
+
children: [
|
|
590
|
+
v ? /* @__PURE__ */ l(
|
|
591
|
+
"caption",
|
|
592
|
+
{
|
|
593
|
+
id: d,
|
|
594
|
+
className: B.caption,
|
|
595
|
+
"data-hidden": t ? "" : void 0,
|
|
596
|
+
children: e
|
|
597
|
+
}
|
|
598
|
+
) : null,
|
|
599
|
+
u
|
|
600
|
+
]
|
|
601
|
+
}
|
|
602
|
+
)
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
}), Ft = E(function({ className: e, ...t }, n) {
|
|
606
|
+
return /* @__PURE__ */ l("thead", { ...t, ref: n, className: T(B.head, e) });
|
|
607
|
+
}), Ht = E(function({ className: e, ...t }, n) {
|
|
608
|
+
return /* @__PURE__ */ l("tbody", { ...t, ref: n, className: T(B.body, e) });
|
|
609
|
+
}), At = E(function({ className: e, ...t }, n) {
|
|
610
|
+
return /* @__PURE__ */ l("tr", { ...t, ref: n, className: T(B.row, e) });
|
|
611
|
+
}), qt = E(function({ scope: e = "col", numeric: t = !1, sort: n, onSort: o, className: a, children: u, ...i }, c) {
|
|
612
|
+
return /* @__PURE__ */ l(
|
|
613
|
+
"th",
|
|
614
|
+
{
|
|
615
|
+
...i,
|
|
616
|
+
ref: c,
|
|
617
|
+
scope: e,
|
|
618
|
+
"aria-sort": n,
|
|
619
|
+
className: T(B.header, a),
|
|
620
|
+
"data-numeric": t ? "" : void 0,
|
|
621
|
+
children: o ? /* @__PURE__ */ L("button", { type: "button", className: B.sort, onClick: o, "data-sort": n, children: [
|
|
622
|
+
u,
|
|
623
|
+
/* @__PURE__ */ l("span", { className: B.sortIcon, "aria-hidden": "true" })
|
|
624
|
+
] }) : u
|
|
625
|
+
}
|
|
626
|
+
);
|
|
627
|
+
}), Kt = E(function({ numeric: e = !1, className: t, ...n }, o) {
|
|
628
|
+
return /* @__PURE__ */ l(
|
|
629
|
+
"td",
|
|
630
|
+
{
|
|
631
|
+
...n,
|
|
632
|
+
ref: o,
|
|
633
|
+
className: T(B.cell, t),
|
|
634
|
+
"data-numeric": e ? "" : void 0
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
}), he = re(null);
|
|
638
|
+
function X(s) {
|
|
639
|
+
const e = se(he);
|
|
640
|
+
if (!e)
|
|
641
|
+
throw new Error(`<${s}> must be rendered inside <Tabs>.`);
|
|
642
|
+
return e;
|
|
643
|
+
}
|
|
644
|
+
function _e(s, e) {
|
|
645
|
+
return `${s}-tab-${encodeURIComponent(e)}`;
|
|
646
|
+
}
|
|
647
|
+
function be(s, e) {
|
|
648
|
+
return `${s}-panel-${encodeURIComponent(e)}`;
|
|
649
|
+
}
|
|
650
|
+
const pt = "maru-Tabs-module__root__-VKVI", vt = "maru-Tabs-module__list__qRVME", yt = "maru-Tabs-module__tab__IdDYc", wt = "maru-Tabs-module__panel__08i9c", Z = {
|
|
651
|
+
root: pt,
|
|
652
|
+
list: vt,
|
|
653
|
+
tab: yt,
|
|
654
|
+
panel: wt
|
|
655
|
+
}, Wt = E(function({ value: e, className: t, onClick: n, onFocus: o, onKeyDown: a, ...u }, i) {
|
|
656
|
+
const { baseId: c, value: d, select: _, orientation: f, activation: p } = X("Tab"), v = e === d;
|
|
657
|
+
function w(m) {
|
|
658
|
+
n?.(m), m.defaultPrevented || _(e);
|
|
659
|
+
}
|
|
660
|
+
function y(m) {
|
|
661
|
+
o?.(m), !m.defaultPrevented && p === "automatic" && _(e);
|
|
662
|
+
}
|
|
663
|
+
function b(m) {
|
|
664
|
+
if (a?.(m), m.defaultPrevented) return;
|
|
665
|
+
const N = m.currentTarget.closest('[role="tablist"]');
|
|
666
|
+
if (!N) return;
|
|
667
|
+
const k = Array.from(N.querySelectorAll('[role="tab"]:not(:disabled)')), h = k.indexOf(m.currentTarget);
|
|
668
|
+
if (h === -1) return;
|
|
669
|
+
const x = getComputedStyle(N).direction === "rtl", R = f === "vertical" ? "ArrowUp" : x ? "ArrowRight" : "ArrowLeft", D = f === "vertical" ? "ArrowDown" : x ? "ArrowLeft" : "ArrowRight";
|
|
670
|
+
let r;
|
|
671
|
+
if (m.key === D)
|
|
672
|
+
r = k[(h + 1) % k.length];
|
|
673
|
+
else if (m.key === R)
|
|
674
|
+
r = k[(h - 1 + k.length) % k.length];
|
|
675
|
+
else if (m.key === "Home")
|
|
676
|
+
r = k[0];
|
|
677
|
+
else if (m.key === "End")
|
|
678
|
+
r = k[k.length - 1];
|
|
679
|
+
else
|
|
680
|
+
return;
|
|
681
|
+
m.preventDefault(), r?.focus();
|
|
682
|
+
}
|
|
683
|
+
return /* @__PURE__ */ l(
|
|
684
|
+
"button",
|
|
685
|
+
{
|
|
686
|
+
...u,
|
|
687
|
+
ref: i,
|
|
688
|
+
type: "button",
|
|
689
|
+
role: "tab",
|
|
690
|
+
id: _e(c, e),
|
|
691
|
+
"aria-selected": v,
|
|
692
|
+
"aria-controls": be(c, e),
|
|
693
|
+
tabIndex: v ? 0 : -1,
|
|
694
|
+
className: T(Z.tab, t),
|
|
695
|
+
"data-selected": v ? "" : void 0,
|
|
696
|
+
"data-orientation": f,
|
|
697
|
+
onClick: w,
|
|
698
|
+
onFocus: y,
|
|
699
|
+
onKeyDown: b
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
}), Vt = E(function({ className: e, ...t }, n) {
|
|
703
|
+
const { orientation: o } = X("TabList");
|
|
704
|
+
return /* @__PURE__ */ l(
|
|
705
|
+
"div",
|
|
706
|
+
{
|
|
707
|
+
...t,
|
|
708
|
+
ref: n,
|
|
709
|
+
role: "tablist",
|
|
710
|
+
"aria-orientation": o,
|
|
711
|
+
className: T(Z.list, e),
|
|
712
|
+
"data-orientation": o
|
|
713
|
+
}
|
|
714
|
+
);
|
|
715
|
+
}), jt = E(function({ value: e, keepMounted: t = !1, className: n, children: o, ...a }, u) {
|
|
716
|
+
const { baseId: i, value: c } = X("TabPanel"), d = e === c;
|
|
717
|
+
return /* @__PURE__ */ l(
|
|
718
|
+
"div",
|
|
719
|
+
{
|
|
720
|
+
...a,
|
|
721
|
+
ref: u,
|
|
722
|
+
role: "tabpanel",
|
|
723
|
+
id: be(i, e),
|
|
724
|
+
"aria-labelledby": _e(i, e),
|
|
725
|
+
tabIndex: 0,
|
|
726
|
+
hidden: !d,
|
|
727
|
+
className: T(Z.panel, n),
|
|
728
|
+
children: d || t ? o : null
|
|
729
|
+
}
|
|
730
|
+
);
|
|
731
|
+
}), Ut = E(function({
|
|
732
|
+
value: e,
|
|
733
|
+
defaultValue: t,
|
|
734
|
+
onValueChange: n,
|
|
735
|
+
orientation: o = "horizontal",
|
|
736
|
+
activation: a = "automatic",
|
|
737
|
+
className: u,
|
|
738
|
+
children: i,
|
|
739
|
+
...c
|
|
740
|
+
}, d) {
|
|
741
|
+
const _ = O(), [f, p] = U(t ?? ""), v = e !== void 0, w = v ? e : f, y = Q(
|
|
742
|
+
(m) => {
|
|
743
|
+
m !== w && (v || p(m), n?.(m));
|
|
744
|
+
},
|
|
745
|
+
[w, v, n]
|
|
746
|
+
), b = ye(
|
|
747
|
+
() => ({ baseId: _, value: w, select: y, orientation: o, activation: a }),
|
|
748
|
+
[_, w, y, o, a]
|
|
749
|
+
);
|
|
750
|
+
return /* @__PURE__ */ l(he.Provider, { value: b, children: /* @__PURE__ */ l(
|
|
751
|
+
"div",
|
|
752
|
+
{
|
|
753
|
+
...c,
|
|
754
|
+
ref: d,
|
|
755
|
+
className: T(Z.root, u),
|
|
756
|
+
"data-orientation": o,
|
|
757
|
+
children: i
|
|
758
|
+
}
|
|
759
|
+
) });
|
|
760
|
+
}), Tt = "maru-Text-module__root__rsBo7", xt = {
|
|
761
|
+
root: Tt
|
|
762
|
+
}, Zt = E(function({ as: e = "p", size: t = "md", tone: n = "default", weight: o = "regular", className: a, ...u }, i) {
|
|
763
|
+
return /* @__PURE__ */ l(
|
|
764
|
+
e,
|
|
765
|
+
{
|
|
766
|
+
...u,
|
|
767
|
+
ref: i,
|
|
768
|
+
className: T(xt.root, a),
|
|
769
|
+
"data-size": t,
|
|
770
|
+
"data-tone": n,
|
|
771
|
+
"data-weight": o
|
|
772
|
+
}
|
|
773
|
+
);
|
|
774
|
+
}), Et = "maru-Tooltip-module__root__U84l8", kt = {
|
|
775
|
+
root: Et
|
|
776
|
+
}, Nt = typeof document > "u" ? P : ce;
|
|
777
|
+
function Yt({
|
|
778
|
+
content: s,
|
|
779
|
+
children: e,
|
|
780
|
+
placement: t = "top",
|
|
781
|
+
openDelay: n = 300,
|
|
782
|
+
closeDelay: o = 100,
|
|
783
|
+
disabled: a = !1,
|
|
784
|
+
className: u
|
|
785
|
+
}) {
|
|
786
|
+
const i = O(), [c, d] = U(!1), _ = S(null), f = S(null), p = S(void 0), v = () => {
|
|
787
|
+
clearTimeout(p.current), p.current = void 0;
|
|
788
|
+
}, w = (h, x) => {
|
|
789
|
+
_.current = h, v(), x > 0 ? p.current = setTimeout(() => d(!0), x) : d(!0);
|
|
790
|
+
}, y = (h) => {
|
|
791
|
+
v(), h > 0 ? p.current = setTimeout(() => d(!1), h) : d(!1);
|
|
792
|
+
};
|
|
793
|
+
P(() => v, []), P(() => {
|
|
794
|
+
a && (v(), d(!1));
|
|
795
|
+
}, [a]), Nt(() => {
|
|
796
|
+
const h = f.current;
|
|
797
|
+
if (!h || !c) return;
|
|
798
|
+
const x = () => {
|
|
799
|
+
const r = _.current;
|
|
800
|
+
if (!r) return;
|
|
801
|
+
const { x: $, y: C, side: I } = fe(
|
|
802
|
+
r.getBoundingClientRect(),
|
|
803
|
+
{ width: h.offsetWidth, height: h.offsetHeight },
|
|
804
|
+
{
|
|
805
|
+
width: document.documentElement.clientWidth,
|
|
806
|
+
height: document.documentElement.clientHeight
|
|
807
|
+
},
|
|
808
|
+
t
|
|
809
|
+
);
|
|
810
|
+
h.style.left = `${$}px`, h.style.top = `${C}px`, h.dataset.placement = I;
|
|
811
|
+
};
|
|
812
|
+
let R = !1;
|
|
813
|
+
typeof h.showPopover == "function" && (h.showPopover(), R = !0), x();
|
|
814
|
+
const D = (r) => {
|
|
815
|
+
r.key === "Escape" && (r.preventDefault(), r.stopPropagation(), d(!1));
|
|
816
|
+
};
|
|
817
|
+
return window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), document.addEventListener("keydown", D, !0), () => {
|
|
818
|
+
window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x), document.removeEventListener("keydown", D, !0), R && h.hidePopover();
|
|
819
|
+
};
|
|
820
|
+
}, [c, t]);
|
|
821
|
+
const b = ae.only(e);
|
|
822
|
+
if (!le(b)) return /* @__PURE__ */ l(j, { children: e });
|
|
823
|
+
if (a) return b;
|
|
824
|
+
const m = b.props, N = [m["aria-describedby"], i].filter(Boolean).join(" "), k = ie(b, {
|
|
825
|
+
"aria-describedby": N,
|
|
826
|
+
onMouseEnter: (h) => {
|
|
827
|
+
m.onMouseEnter?.(h), w(h.currentTarget, n);
|
|
828
|
+
},
|
|
829
|
+
onMouseLeave: (h) => {
|
|
830
|
+
m.onMouseLeave?.(h), y(o);
|
|
831
|
+
},
|
|
832
|
+
onFocus: (h) => {
|
|
833
|
+
m.onFocus?.(h);
|
|
834
|
+
let x = !0;
|
|
835
|
+
try {
|
|
836
|
+
x = h.currentTarget.matches(":focus-visible");
|
|
837
|
+
} catch {
|
|
838
|
+
}
|
|
839
|
+
x && w(h.currentTarget, 0);
|
|
840
|
+
},
|
|
841
|
+
onBlur: (h) => {
|
|
842
|
+
m.onBlur?.(h), y(0);
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
return /* @__PURE__ */ L(j, { children: [
|
|
846
|
+
k,
|
|
847
|
+
/* @__PURE__ */ l(
|
|
848
|
+
"span",
|
|
849
|
+
{
|
|
850
|
+
ref: f,
|
|
851
|
+
id: i,
|
|
852
|
+
role: "tooltip",
|
|
853
|
+
popover: "manual",
|
|
854
|
+
className: T(kt.root, u),
|
|
855
|
+
"data-open": c ? "" : void 0,
|
|
856
|
+
"data-placement": t,
|
|
857
|
+
onMouseEnter: v,
|
|
858
|
+
onMouseLeave: () => y(o),
|
|
859
|
+
children: s
|
|
860
|
+
}
|
|
861
|
+
)
|
|
862
|
+
] });
|
|
863
|
+
}
|
|
864
|
+
export {
|
|
865
|
+
Lt as Button,
|
|
866
|
+
Ct as Checkbox,
|
|
867
|
+
It as Dialog,
|
|
868
|
+
St as Field,
|
|
869
|
+
Ce as Heading,
|
|
870
|
+
Pt as Input,
|
|
871
|
+
Bt as Popover,
|
|
872
|
+
Dt as Select,
|
|
873
|
+
Rt as Skeleton,
|
|
874
|
+
Mt as Stack,
|
|
875
|
+
zt as Switch,
|
|
876
|
+
Wt as Tab,
|
|
877
|
+
Vt as TabList,
|
|
878
|
+
jt as TabPanel,
|
|
879
|
+
Ot as Table,
|
|
880
|
+
Ht as TableBody,
|
|
881
|
+
Kt as TableCell,
|
|
882
|
+
Ft as TableHead,
|
|
883
|
+
qt as TableHeader,
|
|
884
|
+
At as TableRow,
|
|
885
|
+
Ut as Tabs,
|
|
886
|
+
Zt as Text,
|
|
887
|
+
Yt as Tooltip
|
|
888
|
+
};
|
|
889
|
+
//# sourceMappingURL=index.js.map
|