@handamade/psi-react 0.12.0 → 0.13.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/README.md +1 -1
- package/dist/Tabs/Tab.d.ts +19 -0
- package/dist/Tabs/Tab.d.ts.map +1 -0
- package/dist/Tabs/TabList.d.ts +19 -0
- package/dist/Tabs/TabList.d.ts.map +1 -0
- package/dist/Tabs/TabPanel.d.ts +23 -0
- package/dist/Tabs/TabPanel.d.ts.map +1 -0
- package/dist/Tabs/Tabs.d.ts +45 -0
- package/dist/Tabs/Tabs.d.ts.map +1 -0
- package/dist/Tabs/useTabsKeyboard.d.ts +21 -0
- package/dist/Tabs/useTabsKeyboard.d.ts.map +1 -0
- package/dist/a11y-meta.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +640 -498
- package/dist/manifest.json +173 -0
- package/dist/patterns.json +46 -12
- package/dist/styles.css +1 -1
- package/dist/styles.d.ts +1 -0
- package/docs/Tab.md +39 -0
- package/docs/TabList.md +40 -0
- package/docs/TabPanel.md +38 -0
- package/docs/Tabs.md +40 -0
- package/llms.txt +8 -1
- package/package.json +11 -5
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as n, jsxs as p, Fragment as G } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
button:
|
|
5
|
-
disabled:
|
|
6
|
-
size24:
|
|
7
|
-
size32:
|
|
8
|
-
size40:
|
|
9
|
-
size48:
|
|
10
|
-
accent:
|
|
11
|
-
accentSubtle:
|
|
12
|
-
neutral:
|
|
13
|
-
neutralSubtle:
|
|
14
|
-
ghost:
|
|
15
|
-
danger:
|
|
16
|
-
dangerSubtle:
|
|
17
|
-
outline:
|
|
18
|
-
},
|
|
2
|
+
import { createContext as R, useId as H, useRef as x, useEffect as N, useContext as S, useState as he, useCallback as g, cloneElement as te, isValidElement as U, useMemo as ne, Children as A, Fragment as ae } from "react";
|
|
3
|
+
const Ce = "_button_c94w9_3", Be = "_disabled_c94w9_30", $e = "_size24_c94w9_44", Ne = "_size32_c94w9_54", Le = "_size40_c94w9_64", Se = "_size48_c94w9_74", ze = "_accent_c94w9_87", je = "_accentSubtle_c94w9_99", Te = "_neutral_c94w9_111", Ie = "_neutralSubtle_c94w9_123", Ee = "_ghost_c94w9_135", Me = "_danger_c94w9_147", Ae = "_dangerSubtle_c94w9_159", Pe = "_outline_c94w9_171", w = {
|
|
4
|
+
button: Ce,
|
|
5
|
+
disabled: Be,
|
|
6
|
+
size24: $e,
|
|
7
|
+
size32: Ne,
|
|
8
|
+
size40: Le,
|
|
9
|
+
size48: Se,
|
|
10
|
+
accent: ze,
|
|
11
|
+
accentSubtle: je,
|
|
12
|
+
neutral: Te,
|
|
13
|
+
neutralSubtle: Ie,
|
|
14
|
+
ghost: Ee,
|
|
15
|
+
danger: Me,
|
|
16
|
+
dangerSubtle: Ae,
|
|
17
|
+
outline: Pe
|
|
18
|
+
}, We = {
|
|
19
19
|
accent: w.accent,
|
|
20
20
|
"accent-subtle": w.accentSubtle,
|
|
21
21
|
neutral: w.neutral,
|
|
@@ -24,13 +24,13 @@ const ye = "_button_c94w9_3", me = "_disabled_c94w9_30", we = "_size24_c94w9_44"
|
|
|
24
24
|
danger: w.danger,
|
|
25
25
|
"danger-subtle": w.dangerSubtle,
|
|
26
26
|
outline: w.outline
|
|
27
|
-
},
|
|
27
|
+
}, De = {
|
|
28
28
|
24: w.size24,
|
|
29
29
|
32: w.size32,
|
|
30
30
|
40: w.size40,
|
|
31
31
|
48: w.size48
|
|
32
32
|
};
|
|
33
|
-
function
|
|
33
|
+
function Re({
|
|
34
34
|
variant: e = "neutral",
|
|
35
35
|
size: t = 32,
|
|
36
36
|
href: i,
|
|
@@ -44,8 +44,8 @@ function Me({
|
|
|
44
44
|
}) {
|
|
45
45
|
const u = [
|
|
46
46
|
w.button,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
We[e],
|
|
48
|
+
De[t],
|
|
49
49
|
i !== void 0 && r ? w.disabled : void 0,
|
|
50
50
|
o
|
|
51
51
|
].filter(Boolean).join(" ");
|
|
@@ -72,27 +72,27 @@ function Me({
|
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
iconButton:
|
|
77
|
-
disabled:
|
|
78
|
-
size24:
|
|
79
|
-
size32:
|
|
80
|
-
size40:
|
|
81
|
-
size48:
|
|
82
|
-
accent:
|
|
83
|
-
neutral:
|
|
84
|
-
ghost:
|
|
85
|
-
danger:
|
|
86
|
-
},
|
|
87
|
-
accent:
|
|
88
|
-
neutral:
|
|
89
|
-
ghost:
|
|
90
|
-
danger:
|
|
91
|
-
},
|
|
92
|
-
24:
|
|
93
|
-
32:
|
|
94
|
-
40:
|
|
95
|
-
48:
|
|
75
|
+
const He = "_iconButton_129ca_3", Ve = "_disabled_129ca_29", qe = "_size24_129ca_37", Fe = "_size32_129ca_42", Ke = "_size40_129ca_47", Oe = "_size48_129ca_52", Ue = "_accent_129ca_60", Ye = "_neutral_129ca_72", Ze = "_ghost_129ca_84", Ge = "_danger_129ca_96", z = {
|
|
76
|
+
iconButton: He,
|
|
77
|
+
disabled: Ve,
|
|
78
|
+
size24: qe,
|
|
79
|
+
size32: Fe,
|
|
80
|
+
size40: Ke,
|
|
81
|
+
size48: Oe,
|
|
82
|
+
accent: Ue,
|
|
83
|
+
neutral: Ye,
|
|
84
|
+
ghost: Ze,
|
|
85
|
+
danger: Ge
|
|
86
|
+
}, Xe = {
|
|
87
|
+
accent: z.accent,
|
|
88
|
+
neutral: z.neutral,
|
|
89
|
+
ghost: z.ghost,
|
|
90
|
+
danger: z.danger
|
|
91
|
+
}, Je = {
|
|
92
|
+
24: z.size24,
|
|
93
|
+
32: z.size32,
|
|
94
|
+
40: z.size40,
|
|
95
|
+
48: z.size48
|
|
96
96
|
};
|
|
97
97
|
function X({
|
|
98
98
|
variant: e = "neutral",
|
|
@@ -107,10 +107,10 @@ function X({
|
|
|
107
107
|
...l
|
|
108
108
|
}) {
|
|
109
109
|
const u = [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
i !== void 0 && r ?
|
|
110
|
+
z.iconButton,
|
|
111
|
+
Xe[e],
|
|
112
|
+
Je[t],
|
|
113
|
+
i !== void 0 && r ? z.disabled : void 0,
|
|
114
114
|
o
|
|
115
115
|
].filter(Boolean).join(" ");
|
|
116
116
|
return i !== void 0 ? /* @__PURE__ */ n(
|
|
@@ -136,15 +136,15 @@ function X({
|
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
const
|
|
140
|
-
card:
|
|
141
|
-
stacked:
|
|
142
|
-
featured:
|
|
143
|
-
media:
|
|
144
|
-
body:
|
|
145
|
-
hoverLift:
|
|
139
|
+
const Qe = "_card_1btb3_1", et = "_stacked_1btb3_8", tt = "_featured_1btb3_10", nt = "_media_1btb3_22", ot = "_body_1btb3_23", rt = "_hoverLift_1btb3_31", I = {
|
|
140
|
+
card: Qe,
|
|
141
|
+
stacked: et,
|
|
142
|
+
featured: tt,
|
|
143
|
+
media: nt,
|
|
144
|
+
body: ot,
|
|
145
|
+
hoverLift: rt
|
|
146
146
|
};
|
|
147
|
-
function
|
|
147
|
+
function So({
|
|
148
148
|
variant: e = "stacked",
|
|
149
149
|
media: t,
|
|
150
150
|
hoverLift: i = !1,
|
|
@@ -154,54 +154,54 @@ function yo({
|
|
|
154
154
|
...o
|
|
155
155
|
}) {
|
|
156
156
|
const s = [
|
|
157
|
-
|
|
158
|
-
e === "featured" ?
|
|
159
|
-
i ?
|
|
157
|
+
I.card,
|
|
158
|
+
e === "featured" ? I.featured : I.stacked,
|
|
159
|
+
i ? I.hoverLift : void 0,
|
|
160
160
|
a
|
|
161
161
|
].filter(Boolean).join(" ");
|
|
162
162
|
return /* @__PURE__ */ p("div", { ref: r, className: s, ...o, children: [
|
|
163
|
-
t != null && /* @__PURE__ */ n("div", { className:
|
|
164
|
-
/* @__PURE__ */ n("div", { className:
|
|
163
|
+
t != null && /* @__PURE__ */ n("div", { className: I.media, children: t }),
|
|
164
|
+
/* @__PURE__ */ n("div", { className: I.body, children: c })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
panel:
|
|
169
|
-
padding16:
|
|
167
|
+
const it = "_panel_jn8w4_1", st = "_padding16_jn8w4_8", ce = {
|
|
168
|
+
panel: it,
|
|
169
|
+
padding16: st
|
|
170
170
|
};
|
|
171
|
-
function
|
|
172
|
-
const r = [
|
|
171
|
+
function zo({ padding: e = 24, className: t, children: i, ref: a, ...c }) {
|
|
172
|
+
const r = [ce.panel, e === 16 ? ce.padding16 : void 0, t].filter(Boolean).join(" ");
|
|
173
173
|
return /* @__PURE__ */ n("div", { ref: a, className: r, ...c, children: i });
|
|
174
174
|
}
|
|
175
|
-
const
|
|
176
|
-
navbar:
|
|
177
|
-
inner:
|
|
178
|
-
brand:
|
|
179
|
-
links:
|
|
180
|
-
actions:
|
|
175
|
+
const at = "_navbar_1gyow_1", ct = "_inner_1gyow_12", lt = "_brand_1gyow_19", dt = "_links_1gyow_20", ut = "_actions_1gyow_50", F = {
|
|
176
|
+
navbar: at,
|
|
177
|
+
inner: ct,
|
|
178
|
+
brand: lt,
|
|
179
|
+
links: dt,
|
|
180
|
+
actions: ut
|
|
181
181
|
};
|
|
182
|
-
function
|
|
183
|
-
const o = [
|
|
184
|
-
return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ p("div", { className: `psi-container ${
|
|
185
|
-
e != null && /* @__PURE__ */ n("div", { className:
|
|
186
|
-
/* @__PURE__ */ n("nav", { className:
|
|
187
|
-
t != null && /* @__PURE__ */ n("div", { className:
|
|
182
|
+
function jo({ brand: e, actions: t, children: i, className: a, ref: c, ...r }) {
|
|
183
|
+
const o = [F.navbar, a].filter(Boolean).join(" ");
|
|
184
|
+
return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ p("div", { className: `psi-container ${F.inner}`, children: [
|
|
185
|
+
e != null && /* @__PURE__ */ n("div", { className: F.brand, children: e }),
|
|
186
|
+
/* @__PURE__ */ n("nav", { className: F.links, children: i }),
|
|
187
|
+
t != null && /* @__PURE__ */ n("div", { className: F.actions, children: t })
|
|
188
188
|
] }) });
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
frame:
|
|
190
|
+
const ht = "_frame_et4fc_1", _t = {
|
|
191
|
+
frame: ht
|
|
192
192
|
};
|
|
193
|
-
function
|
|
194
|
-
const o = [
|
|
193
|
+
function To({ ratio: e, className: t, style: i, children: a, ref: c, ...r }) {
|
|
194
|
+
const o = [_t.frame, t].filter(Boolean).join(" ");
|
|
195
195
|
return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...i }, ...r, children: a });
|
|
196
196
|
}
|
|
197
|
-
const
|
|
198
|
-
field:
|
|
199
|
-
label:
|
|
200
|
-
marker:
|
|
201
|
-
message:
|
|
202
|
-
invalid:
|
|
203
|
-
},
|
|
204
|
-
function
|
|
197
|
+
const ft = "_field_lplye_1", pt = "_label_lplye_10", vt = "_marker_lplye_16", bt = "_message_lplye_20", gt = "_invalid_lplye_26", E = {
|
|
198
|
+
field: ft,
|
|
199
|
+
label: pt,
|
|
200
|
+
marker: vt,
|
|
201
|
+
message: bt,
|
|
202
|
+
invalid: gt
|
|
203
|
+
}, oe = R(null);
|
|
204
|
+
function Io({
|
|
205
205
|
label: e,
|
|
206
206
|
description: t,
|
|
207
207
|
error: i,
|
|
@@ -213,99 +213,99 @@ function xo({
|
|
|
213
213
|
ref: d,
|
|
214
214
|
...l
|
|
215
215
|
}) {
|
|
216
|
-
const u =
|
|
216
|
+
const u = H(), h = r ?? u, _ = !!i, y = _ ? i : t, m = y != null && y !== !1 ? `${h}-message` : void 0, j = [E.field, _ && E.invalid, o].filter(Boolean).join(" "), C = e != null ? /* @__PURE__ */ p(G, { children: [
|
|
217
217
|
e,
|
|
218
218
|
a && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: E.marker, children: " *" })
|
|
219
|
-
] }) : null,
|
|
220
|
-
|
|
221
|
-
/* @__PURE__ */ n(
|
|
222
|
-
|
|
219
|
+
] }) : null, b = /* @__PURE__ */ p(G, { children: [
|
|
220
|
+
C != null && (c ? /* @__PURE__ */ n("legend", { className: E.label, children: C }) : /* @__PURE__ */ n("label", { className: E.label, htmlFor: h, children: C })),
|
|
221
|
+
/* @__PURE__ */ n(oe.Provider, { value: { id: h, describedBy: m, invalid: _, required: a }, children: s }),
|
|
222
|
+
m && /* @__PURE__ */ n("p", { id: m, className: E.message, "aria-live": "polite", children: y })
|
|
223
223
|
] });
|
|
224
224
|
return c ? /* @__PURE__ */ n(
|
|
225
225
|
"fieldset",
|
|
226
226
|
{
|
|
227
227
|
ref: d,
|
|
228
228
|
className: j,
|
|
229
|
-
"aria-describedby":
|
|
229
|
+
"aria-describedby": m,
|
|
230
230
|
...l,
|
|
231
|
-
children:
|
|
231
|
+
children: b
|
|
232
232
|
}
|
|
233
|
-
) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children:
|
|
233
|
+
) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children: b });
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Eo({ size: e = 20, ...t }) {
|
|
236
236
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
237
237
|
/* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
238
238
|
/* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
239
239
|
] });
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Mo({ size: e = 20, ...t }) {
|
|
242
242
|
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function _e({ size: e = 20, ...t }) {
|
|
245
245
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
246
246
|
/* @__PURE__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
247
247
|
/* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
248
248
|
] });
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function yt({ size: e = 20, ...t }) {
|
|
251
251
|
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "20 6 9 17 4 12" }) });
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function Ao({ size: e = 20, ...t }) {
|
|
254
254
|
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function Po({ size: e = 20, ...t }) {
|
|
257
257
|
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "9 18 15 12 9 6" }) });
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Wo({ size: e = 20, ...t }) {
|
|
260
260
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
261
261
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
262
262
|
/* @__PURE__ */ n("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
263
263
|
] });
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Do({ size: e = 20, ...t }) {
|
|
266
266
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
267
267
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" }),
|
|
268
268
|
/* @__PURE__ */ n("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
269
269
|
] });
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function Ro({ size: e = 20, ...t }) {
|
|
272
272
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
273
273
|
/* @__PURE__ */ n("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
|
|
274
274
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "7", r: "4" })
|
|
275
275
|
] });
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Ho({ size: e = 20, ...t }) {
|
|
278
278
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
279
279
|
/* @__PURE__ */ n("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
280
280
|
/* @__PURE__ */ n("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
281
281
|
] });
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Vo({ size: e = 20, ...t }) {
|
|
284
284
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
285
285
|
/* @__PURE__ */ n("polyline", { points: "3 6 5 6 21 6" }),
|
|
286
286
|
/* @__PURE__ */ n("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
287
287
|
] });
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function qo({ size: e = 20, ...t }) {
|
|
290
290
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
291
291
|
/* @__PURE__ */ n("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
292
292
|
/* @__PURE__ */ n("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
293
293
|
] });
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Fo({ size: e = 20, ...t }) {
|
|
296
296
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
297
297
|
/* @__PURE__ */ n("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
298
298
|
/* @__PURE__ */ n("polyline", { points: "15 3 21 3 21 9" }),
|
|
299
299
|
/* @__PURE__ */ n("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
300
300
|
] });
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Ko({ size: e = 20, ...t }) {
|
|
303
303
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
304
304
|
/* @__PURE__ */ n("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
305
305
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" })
|
|
306
306
|
] });
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Oo({ size: e = 20, ...t }) {
|
|
309
309
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
310
310
|
/* @__PURE__ */ n("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
|
|
311
311
|
/* @__PURE__ */ n("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" }),
|
|
@@ -313,7 +313,7 @@ function Wo({ size: e = 20, ...t }) {
|
|
|
313
313
|
/* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
314
314
|
] });
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Uo({ size: e = 20, ...t }) {
|
|
317
317
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
318
318
|
/* @__PURE__ */ n("line", { x1: "12", y1: "2", x2: "12", y2: "6" }),
|
|
319
319
|
/* @__PURE__ */ n("line", { x1: "12", y1: "18", x2: "12", y2: "22" }),
|
|
@@ -325,77 +325,77 @@ function Ao({ size: e = 20, ...t }) {
|
|
|
325
325
|
/* @__PURE__ */ n("line", { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" })
|
|
326
326
|
] });
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Yo({ size: e = 20, ...t }) {
|
|
329
329
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
330
330
|
/* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
331
331
|
/* @__PURE__ */ n("polyline", { points: "19 12 12 19 5 12" })
|
|
332
332
|
] });
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Zo({ size: e = 20, ...t }) {
|
|
335
335
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
336
336
|
/* @__PURE__ */ n("line", { x1: "7", y1: "17", x2: "17", y2: "7" }),
|
|
337
337
|
/* @__PURE__ */ n("polyline", { points: "7 7 17 7 17 17" })
|
|
338
338
|
] });
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function Go({ size: e = 20, ...t }) {
|
|
341
341
|
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) });
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Xo({ size: e = 20, ...t }) {
|
|
344
344
|
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) });
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Jo({ size: e = 20, ...t }) {
|
|
347
347
|
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" }) });
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Qo({ size: e = 20, ...t }) {
|
|
350
350
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
351
351
|
/* @__PURE__ */ n("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
|
|
352
352
|
/* @__PURE__ */ n("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
|
|
353
353
|
/* @__PURE__ */ n("line", { x1: "17.5", y1: "6.5", x2: "17.51", y2: "6.5" })
|
|
354
354
|
] });
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function mt({ size: e = 20, ...t }) {
|
|
357
357
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
358
358
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
359
359
|
/* @__PURE__ */ n("line", { x1: "12", y1: "11", x2: "12", y2: "16" }),
|
|
360
360
|
/* @__PURE__ */ n("line", { x1: "12", y1: "8", x2: "12", y2: "8" })
|
|
361
361
|
] });
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function wt({ size: e = 20, ...t }) {
|
|
364
364
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
365
365
|
/* @__PURE__ */ n("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }),
|
|
366
366
|
/* @__PURE__ */ n("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
367
367
|
/* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "17" })
|
|
368
368
|
] });
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function xt({ size: e = 20, ...t }) {
|
|
371
371
|
return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
|
|
372
372
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
373
373
|
/* @__PURE__ */ n("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
374
374
|
/* @__PURE__ */ n("line", { x1: "12", y1: "16", x2: "12", y2: "16" })
|
|
375
375
|
] });
|
|
376
376
|
}
|
|
377
|
-
const
|
|
378
|
-
dialog:
|
|
379
|
-
center:
|
|
380
|
-
inlineStart:
|
|
381
|
-
inlineEnd:
|
|
382
|
-
w400:
|
|
383
|
-
w560:
|
|
384
|
-
w720:
|
|
385
|
-
panel:
|
|
386
|
-
header:
|
|
387
|
-
title:
|
|
388
|
-
footer:
|
|
389
|
-
},
|
|
390
|
-
400:
|
|
391
|
-
560:
|
|
392
|
-
720:
|
|
393
|
-
},
|
|
394
|
-
center:
|
|
395
|
-
"inline-start":
|
|
396
|
-
"inline-end":
|
|
377
|
+
const kt = "_dialog_h5f0e_2", Ct = "_center_h5f0e_32", Bt = "_inlineStart_h5f0e_40", $t = "_inlineEnd_h5f0e_41", Nt = "_w400_h5f0e_90", Lt = "_w560_h5f0e_91", St = "_w720_h5f0e_92", zt = "_panel_h5f0e_94", jt = "_header_h5f0e_114", Tt = "_title_h5f0e_121", It = "_footer_h5f0e_127", L = {
|
|
378
|
+
dialog: kt,
|
|
379
|
+
center: Ct,
|
|
380
|
+
inlineStart: Bt,
|
|
381
|
+
inlineEnd: $t,
|
|
382
|
+
w400: Nt,
|
|
383
|
+
w560: Lt,
|
|
384
|
+
w720: St,
|
|
385
|
+
panel: zt,
|
|
386
|
+
header: jt,
|
|
387
|
+
title: Tt,
|
|
388
|
+
footer: It
|
|
389
|
+
}, Et = {
|
|
390
|
+
400: L.w400,
|
|
391
|
+
560: L.w560,
|
|
392
|
+
720: L.w720
|
|
393
|
+
}, Mt = {
|
|
394
|
+
center: L.center,
|
|
395
|
+
"inline-start": L.inlineStart,
|
|
396
|
+
"inline-end": L.inlineEnd
|
|
397
397
|
};
|
|
398
|
-
function
|
|
398
|
+
function er({
|
|
399
399
|
open: e,
|
|
400
400
|
onClose: t,
|
|
401
401
|
title: i,
|
|
@@ -408,37 +408,37 @@ function Fo({
|
|
|
408
408
|
ref: l,
|
|
409
409
|
...u
|
|
410
410
|
}) {
|
|
411
|
-
const h =
|
|
412
|
-
h.current =
|
|
411
|
+
const h = x(null), _ = H(), y = (b) => {
|
|
412
|
+
h.current = b, typeof l == "function" ? l(b) : l && (l.current = b);
|
|
413
413
|
};
|
|
414
|
-
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
}, [e]),
|
|
414
|
+
N(() => {
|
|
415
|
+
const b = h.current;
|
|
416
|
+
b && (e && !b.open ? b.showModal() : !e && b.open && b.close());
|
|
417
|
+
}, [e]), N(() => {
|
|
418
418
|
if (!e) return;
|
|
419
|
-
const
|
|
419
|
+
const b = document.body.style.overflow;
|
|
420
420
|
return document.body.style.overflow = "hidden", () => {
|
|
421
|
-
document.body.style.overflow =
|
|
421
|
+
document.body.style.overflow = b;
|
|
422
422
|
};
|
|
423
423
|
}, [e]);
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
}, j = (
|
|
427
|
-
o &&
|
|
428
|
-
},
|
|
424
|
+
const m = (b) => {
|
|
425
|
+
b.preventDefault(), o && t("esc");
|
|
426
|
+
}, j = (b) => {
|
|
427
|
+
o && b.target === h.current && t("backdrop");
|
|
428
|
+
}, C = [L.dialog, Et[c], Mt[r], s].filter(Boolean).join(" ");
|
|
429
429
|
return /* @__PURE__ */ n(
|
|
430
430
|
"dialog",
|
|
431
431
|
{
|
|
432
|
-
ref:
|
|
433
|
-
className:
|
|
432
|
+
ref: y,
|
|
433
|
+
className: C,
|
|
434
434
|
"data-placement": r,
|
|
435
435
|
"aria-labelledby": i != null ? _ : void 0,
|
|
436
|
-
onCancel:
|
|
436
|
+
onCancel: m,
|
|
437
437
|
onClick: j,
|
|
438
438
|
...u,
|
|
439
|
-
children: /* @__PURE__ */ p("div", { className:
|
|
440
|
-
(i != null || o) && /* @__PURE__ */ p("div", { className:
|
|
441
|
-
i != null && /* @__PURE__ */ n("h2", { id: _, className:
|
|
439
|
+
children: /* @__PURE__ */ p("div", { className: L.panel, children: [
|
|
440
|
+
(i != null || o) && /* @__PURE__ */ p("div", { className: L.header, children: [
|
|
441
|
+
i != null && /* @__PURE__ */ n("h2", { id: _, className: L.title, children: i }),
|
|
442
442
|
o && /* @__PURE__ */ n(
|
|
443
443
|
X,
|
|
444
444
|
{
|
|
@@ -446,31 +446,31 @@ function Fo({
|
|
|
446
446
|
size: 32,
|
|
447
447
|
"aria-label": "Close dialog",
|
|
448
448
|
onClick: () => t("close-button"),
|
|
449
|
-
children: /* @__PURE__ */ n(
|
|
449
|
+
children: /* @__PURE__ */ n(_e, { "aria-hidden": "true" })
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
452
|
] }),
|
|
453
453
|
d,
|
|
454
|
-
a != null && /* @__PURE__ */ n("div", { className:
|
|
454
|
+
a != null && /* @__PURE__ */ n("div", { className: L.footer, children: a })
|
|
455
455
|
] })
|
|
456
456
|
}
|
|
457
457
|
);
|
|
458
458
|
}
|
|
459
|
-
const
|
|
460
|
-
input:
|
|
461
|
-
size24:
|
|
462
|
-
size32:
|
|
463
|
-
size40:
|
|
464
|
-
size48:
|
|
465
|
-
error:
|
|
466
|
-
},
|
|
467
|
-
24:
|
|
468
|
-
32:
|
|
469
|
-
40:
|
|
470
|
-
48:
|
|
459
|
+
const At = "_input_hpei8_3", Pt = "_size24_hpei8_37", Wt = "_size32_hpei8_43", Dt = "_size40_hpei8_49", Rt = "_size48_hpei8_55", Ht = "_error_hpei8_63", P = {
|
|
460
|
+
input: At,
|
|
461
|
+
size24: Pt,
|
|
462
|
+
size32: Wt,
|
|
463
|
+
size40: Dt,
|
|
464
|
+
size48: Rt,
|
|
465
|
+
error: Ht
|
|
466
|
+
}, Vt = {
|
|
467
|
+
24: P.size24,
|
|
468
|
+
32: P.size32,
|
|
469
|
+
40: P.size40,
|
|
470
|
+
48: P.size48
|
|
471
471
|
};
|
|
472
|
-
function
|
|
473
|
-
const o =
|
|
472
|
+
function tr({ size: e = 32, error: t = !1, type: i = "text", className: a, ref: c, ...r }) {
|
|
473
|
+
const o = S(oe), s = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [P.input, Vt[e], s && P.error, a].filter(Boolean).join(" ");
|
|
474
474
|
return /* @__PURE__ */ n(
|
|
475
475
|
"input",
|
|
476
476
|
{
|
|
@@ -485,20 +485,20 @@ function Oo({ size: e = 32, error: t = !1, type: i = "text", className: a, ref:
|
|
|
485
485
|
}
|
|
486
486
|
);
|
|
487
487
|
}
|
|
488
|
-
const
|
|
489
|
-
select:
|
|
490
|
-
size24:
|
|
491
|
-
size32:
|
|
492
|
-
size40:
|
|
493
|
-
size48:
|
|
494
|
-
error:
|
|
495
|
-
},
|
|
496
|
-
24:
|
|
497
|
-
32:
|
|
498
|
-
40:
|
|
499
|
-
48:
|
|
488
|
+
const qt = "_select_4x9ck_3", Ft = "_size24_4x9ck_37", Kt = "_size32_4x9ck_45", Ot = "_size40_4x9ck_53", Ut = "_size48_4x9ck_61", Yt = "_error_4x9ck_71", W = {
|
|
489
|
+
select: qt,
|
|
490
|
+
size24: Ft,
|
|
491
|
+
size32: Kt,
|
|
492
|
+
size40: Ot,
|
|
493
|
+
size48: Ut,
|
|
494
|
+
error: Yt
|
|
495
|
+
}, Zt = {
|
|
496
|
+
24: W.size24,
|
|
497
|
+
32: W.size32,
|
|
498
|
+
40: W.size40,
|
|
499
|
+
48: W.size48
|
|
500
500
|
};
|
|
501
|
-
function
|
|
501
|
+
function nr({
|
|
502
502
|
size: e = 32,
|
|
503
503
|
error: t = !1,
|
|
504
504
|
className: i,
|
|
@@ -506,10 +506,10 @@ function Ko({
|
|
|
506
506
|
children: c,
|
|
507
507
|
...r
|
|
508
508
|
}) {
|
|
509
|
-
const o =
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
s &&
|
|
509
|
+
const o = S(oe), s = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [
|
|
510
|
+
W.select,
|
|
511
|
+
Zt[e],
|
|
512
|
+
s && W.error,
|
|
513
513
|
i
|
|
514
514
|
].filter(Boolean).join(" ");
|
|
515
515
|
return /* @__PURE__ */ n(
|
|
@@ -526,45 +526,45 @@ function Ko({
|
|
|
526
526
|
}
|
|
527
527
|
);
|
|
528
528
|
}
|
|
529
|
-
const
|
|
530
|
-
label:
|
|
531
|
-
disabled:
|
|
532
|
-
input:
|
|
533
|
-
indicator:
|
|
534
|
-
text:
|
|
529
|
+
const Gt = "_label_1v4vv_3", Xt = "_disabled_1v4vv_13", Jt = "_input_1v4vv_20", Qt = "_indicator_1v4vv_34", en = "_text_1v4vv_75", K = {
|
|
530
|
+
label: Gt,
|
|
531
|
+
disabled: Xt,
|
|
532
|
+
input: Jt,
|
|
533
|
+
indicator: Qt,
|
|
534
|
+
text: en
|
|
535
535
|
};
|
|
536
|
-
function
|
|
536
|
+
function fe({
|
|
537
537
|
children: e,
|
|
538
538
|
className: t,
|
|
539
539
|
disabled: i,
|
|
540
540
|
ref: a,
|
|
541
541
|
...c
|
|
542
542
|
}) {
|
|
543
|
-
const r = [
|
|
543
|
+
const r = [K.label, i && K.disabled, t].filter(Boolean).join(" ");
|
|
544
544
|
return /* @__PURE__ */ p("label", { className: r, children: [
|
|
545
545
|
/* @__PURE__ */ n(
|
|
546
546
|
"input",
|
|
547
547
|
{
|
|
548
548
|
ref: a,
|
|
549
549
|
type: "checkbox",
|
|
550
|
-
className:
|
|
550
|
+
className: K.input,
|
|
551
551
|
disabled: i,
|
|
552
552
|
...c
|
|
553
553
|
}
|
|
554
554
|
),
|
|
555
|
-
/* @__PURE__ */ n("span", { className:
|
|
556
|
-
e && /* @__PURE__ */ n("span", { className:
|
|
555
|
+
/* @__PURE__ */ n("span", { className: K.indicator, "aria-hidden": "true" }),
|
|
556
|
+
e && /* @__PURE__ */ n("span", { className: K.text, children: e })
|
|
557
557
|
] });
|
|
558
558
|
}
|
|
559
|
-
const
|
|
560
|
-
label:
|
|
561
|
-
disabled:
|
|
562
|
-
input:
|
|
563
|
-
track:
|
|
564
|
-
thumb:
|
|
565
|
-
text:
|
|
559
|
+
const tn = "_label_jru2c_3", nn = "_disabled_jru2c_13", on = "_input_jru2c_20", rn = "_track_jru2c_34", sn = "_thumb_jru2c_58", an = "_text_jru2c_75", M = {
|
|
560
|
+
label: tn,
|
|
561
|
+
disabled: nn,
|
|
562
|
+
input: on,
|
|
563
|
+
track: rn,
|
|
564
|
+
thumb: sn,
|
|
565
|
+
text: an
|
|
566
566
|
};
|
|
567
|
-
function
|
|
567
|
+
function or({
|
|
568
568
|
children: e,
|
|
569
569
|
className: t,
|
|
570
570
|
disabled: i,
|
|
@@ -588,33 +588,33 @@ function Uo({
|
|
|
588
588
|
e && /* @__PURE__ */ n("span", { className: M.text, children: e })
|
|
589
589
|
] });
|
|
590
590
|
}
|
|
591
|
-
const
|
|
592
|
-
tag:
|
|
593
|
-
dismiss:
|
|
594
|
-
neutral:
|
|
595
|
-
accent:
|
|
596
|
-
success:
|
|
597
|
-
warning:
|
|
598
|
-
danger:
|
|
599
|
-
neutralSubtle:
|
|
600
|
-
accentSubtle:
|
|
601
|
-
successSubtle:
|
|
602
|
-
warningSubtle:
|
|
603
|
-
dangerSubtle:
|
|
604
|
-
},
|
|
605
|
-
neutral:
|
|
606
|
-
accent:
|
|
607
|
-
success:
|
|
608
|
-
warning:
|
|
609
|
-
danger:
|
|
610
|
-
},
|
|
611
|
-
neutral:
|
|
612
|
-
accent:
|
|
613
|
-
success:
|
|
614
|
-
warning:
|
|
615
|
-
danger:
|
|
591
|
+
const cn = "_tag_3oysa_3", ln = "_dismiss_3oysa_17", dn = "_neutral_3oysa_43", un = "_accent_3oysa_48", hn = "_success_3oysa_53", _n = "_warning_3oysa_58", fn = "_danger_3oysa_63", pn = "_neutralSubtle_3oysa_70", vn = "_accentSubtle_3oysa_75", bn = "_successSubtle_3oysa_80", gn = "_warningSubtle_3oysa_85", yn = "_dangerSubtle_3oysa_90", B = {
|
|
592
|
+
tag: cn,
|
|
593
|
+
dismiss: ln,
|
|
594
|
+
neutral: dn,
|
|
595
|
+
accent: un,
|
|
596
|
+
success: hn,
|
|
597
|
+
warning: _n,
|
|
598
|
+
danger: fn,
|
|
599
|
+
neutralSubtle: pn,
|
|
600
|
+
accentSubtle: vn,
|
|
601
|
+
successSubtle: bn,
|
|
602
|
+
warningSubtle: gn,
|
|
603
|
+
dangerSubtle: yn
|
|
604
|
+
}, mn = {
|
|
605
|
+
neutral: B.neutral,
|
|
606
|
+
accent: B.accent,
|
|
607
|
+
success: B.success,
|
|
608
|
+
warning: B.warning,
|
|
609
|
+
danger: B.danger
|
|
610
|
+
}, wn = {
|
|
611
|
+
neutral: B.neutralSubtle,
|
|
612
|
+
accent: B.accentSubtle,
|
|
613
|
+
success: B.successSubtle,
|
|
614
|
+
warning: B.warningSubtle,
|
|
615
|
+
danger: B.dangerSubtle
|
|
616
616
|
};
|
|
617
|
-
function
|
|
617
|
+
function rr({
|
|
618
618
|
variant: e = "neutral",
|
|
619
619
|
subtle: t = !1,
|
|
620
620
|
onDismiss: i,
|
|
@@ -623,14 +623,14 @@ function Yo({
|
|
|
623
623
|
ref: r,
|
|
624
624
|
...o
|
|
625
625
|
}) {
|
|
626
|
-
const s = t ?
|
|
626
|
+
const s = t ? wn : mn, d = [B.tag, s[e], a].filter(Boolean).join(" ");
|
|
627
627
|
return /* @__PURE__ */ p("span", { ref: r, className: d, ...o, children: [
|
|
628
628
|
c,
|
|
629
629
|
i && /* @__PURE__ */ n(
|
|
630
630
|
"button",
|
|
631
631
|
{
|
|
632
632
|
type: "button",
|
|
633
|
-
className:
|
|
633
|
+
className: B.dismiss,
|
|
634
634
|
onClick: i,
|
|
635
635
|
"aria-label": "Dismiss",
|
|
636
636
|
children: /* @__PURE__ */ p(
|
|
@@ -655,38 +655,38 @@ function Yo({
|
|
|
655
655
|
)
|
|
656
656
|
] });
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
wrapper:
|
|
660
|
-
tooltip:
|
|
661
|
-
top:
|
|
662
|
-
bottom:
|
|
663
|
-
left:
|
|
664
|
-
right:
|
|
665
|
-
},
|
|
658
|
+
const xn = "_wrapper_1eu6z_3", kn = "_tooltip_1eu6z_10", Cn = "_top_1eu6z_24", Bn = "_bottom_1eu6z_31", $n = "_left_1eu6z_38", Nn = "_right_1eu6z_45", D = {
|
|
659
|
+
wrapper: xn,
|
|
660
|
+
tooltip: kn,
|
|
661
|
+
top: Cn,
|
|
662
|
+
bottom: Bn,
|
|
663
|
+
left: $n,
|
|
664
|
+
right: Nn
|
|
665
|
+
}, Ln = {
|
|
666
666
|
top: D.top,
|
|
667
667
|
bottom: D.bottom,
|
|
668
668
|
left: D.left,
|
|
669
669
|
right: D.right
|
|
670
|
-
},
|
|
671
|
-
function
|
|
670
|
+
}, Sn = 150;
|
|
671
|
+
function ir({
|
|
672
672
|
content: e,
|
|
673
673
|
children: t,
|
|
674
674
|
placement: i = "top"
|
|
675
675
|
}) {
|
|
676
|
-
const [a, c] =
|
|
676
|
+
const [a, c] = he(!1), r = H(), o = x(void 0), s = g(() => {
|
|
677
677
|
o.current !== void 0 && (window.clearTimeout(o.current), o.current = void 0);
|
|
678
|
-
}, []), d =
|
|
679
|
-
|
|
678
|
+
}, []), d = g(() => c(!0), []), l = g(() => c(!1), []);
|
|
679
|
+
N(() => s, [s]), N(() => {
|
|
680
680
|
if (!a) return;
|
|
681
681
|
const h = (_) => {
|
|
682
682
|
_.key === "Escape" && l();
|
|
683
683
|
};
|
|
684
684
|
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
685
685
|
}, [a, l]);
|
|
686
|
-
const u =
|
|
686
|
+
const u = te(t, {
|
|
687
687
|
"aria-describedby": a ? r : void 0,
|
|
688
688
|
onMouseEnter: (h) => {
|
|
689
|
-
s(), o.current = window.setTimeout(d,
|
|
689
|
+
s(), o.current = window.setTimeout(d, Sn);
|
|
690
690
|
const _ = t.props.onMouseEnter;
|
|
691
691
|
_ == null || _(h);
|
|
692
692
|
},
|
|
@@ -713,35 +713,35 @@ function Zo({
|
|
|
713
713
|
{
|
|
714
714
|
id: r,
|
|
715
715
|
role: "tooltip",
|
|
716
|
-
className: [D.tooltip,
|
|
716
|
+
className: [D.tooltip, Ln[i]].filter(Boolean).join(" "),
|
|
717
717
|
children: e
|
|
718
718
|
}
|
|
719
719
|
)
|
|
720
720
|
] });
|
|
721
721
|
}
|
|
722
|
-
const
|
|
723
|
-
toolbar:
|
|
724
|
-
gap8:
|
|
725
|
-
gap12:
|
|
726
|
-
gap16:
|
|
727
|
-
},
|
|
728
|
-
function
|
|
729
|
-
const r = [Z.toolbar,
|
|
722
|
+
const zn = "_toolbar_1i848_1", jn = "_gap8_1i848_7", Tn = "_gap12_1i848_8", In = "_gap16_1i848_9", Z = {
|
|
723
|
+
toolbar: zn,
|
|
724
|
+
gap8: jn,
|
|
725
|
+
gap12: Tn,
|
|
726
|
+
gap16: In
|
|
727
|
+
}, En = { 8: Z.gap8, 12: Z.gap12, 16: Z.gap16 };
|
|
728
|
+
function sr({ gap: e = 8, className: t, children: i, ref: a, ...c }) {
|
|
729
|
+
const r = [Z.toolbar, En[e], t].filter(Boolean).join(" ");
|
|
730
730
|
return /* @__PURE__ */ n("div", { ref: a, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: i });
|
|
731
731
|
}
|
|
732
|
-
const
|
|
733
|
-
trigger:
|
|
734
|
-
menu:
|
|
735
|
-
item:
|
|
736
|
-
separator:
|
|
737
|
-
},
|
|
738
|
-
function
|
|
739
|
-
const c =
|
|
732
|
+
const Mn = "_trigger_vpa0u_4", An = "_menu_vpa0u_16", Pn = "_item_vpa0u_37", Wn = "_separator_vpa0u_74", J = {
|
|
733
|
+
trigger: Mn,
|
|
734
|
+
menu: An,
|
|
735
|
+
item: Pn,
|
|
736
|
+
separator: Wn
|
|
737
|
+
}, Dn = 500;
|
|
738
|
+
function Rn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
|
|
739
|
+
const c = x(""), r = x(0), o = g(() => {
|
|
740
740
|
const l = e.current;
|
|
741
741
|
return l ? Array.from(
|
|
742
742
|
l.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
|
|
743
743
|
) : [];
|
|
744
|
-
}, [e]), s =
|
|
744
|
+
}, [e]), s = g(
|
|
745
745
|
(l) => {
|
|
746
746
|
if (l) {
|
|
747
747
|
for (const u of o()) u.tabIndex = u === l ? 0 : -1;
|
|
@@ -749,19 +749,19 @@ function Mn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
|
|
|
749
749
|
}
|
|
750
750
|
},
|
|
751
751
|
[o]
|
|
752
|
-
), d =
|
|
752
|
+
), d = g(() => {
|
|
753
753
|
var u;
|
|
754
754
|
const l = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
|
|
755
755
|
l == null || l.focus();
|
|
756
756
|
}, [t]);
|
|
757
|
-
return
|
|
757
|
+
return N(() => {
|
|
758
758
|
if (!i) return;
|
|
759
759
|
const l = o();
|
|
760
760
|
return s(l[0]), () => {
|
|
761
761
|
var u;
|
|
762
762
|
(u = e.current) != null && u.contains(document.activeElement) && d();
|
|
763
763
|
};
|
|
764
|
-
}, [i, e, o, s, d]),
|
|
764
|
+
}, [i, e, o, s, d]), g(
|
|
765
765
|
(l) => {
|
|
766
766
|
if (l.key === "Escape") {
|
|
767
767
|
l.preventDefault(), a();
|
|
@@ -786,24 +786,24 @@ function Mn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
|
|
|
786
786
|
}
|
|
787
787
|
if (l.key.length !== 1 || l.metaKey || l.ctrlKey || l.altKey) return;
|
|
788
788
|
const _ = Date.now();
|
|
789
|
-
c.current = _ - r.current >
|
|
790
|
-
const
|
|
791
|
-
(
|
|
789
|
+
c.current = _ - r.current > Dn ? l.key.toLowerCase() : c.current + l.key.toLowerCase(), r.current = _;
|
|
790
|
+
const y = u.find(
|
|
791
|
+
(m) => (m.textContent ?? "").trim().toLowerCase().startsWith(c.current)
|
|
792
792
|
);
|
|
793
|
-
|
|
793
|
+
y && (l.preventDefault(), s(y));
|
|
794
794
|
},
|
|
795
795
|
[o, s, a]
|
|
796
796
|
);
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function Hn() {
|
|
799
799
|
return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
|
|
801
|
+
function Vn({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c }) {
|
|
802
|
+
N(() => {
|
|
803
803
|
const r = t.current, o = e.current;
|
|
804
804
|
!r || !o || (r.style.setProperty("anchor-name", c), o.style.setProperty("position-anchor", c));
|
|
805
|
-
}, [e, t, c]),
|
|
806
|
-
if (!i ||
|
|
805
|
+
}, [e, t, c]), N(() => {
|
|
806
|
+
if (!i || Hn()) return;
|
|
807
807
|
const r = t.current, o = e.current;
|
|
808
808
|
if (!r || !o) return;
|
|
809
809
|
const s = () => {
|
|
@@ -815,12 +815,12 @@ function An({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c
|
|
|
815
815
|
};
|
|
816
816
|
}, [i, a, e, t]);
|
|
817
817
|
}
|
|
818
|
-
const
|
|
818
|
+
const pe = R({ close: () => {
|
|
819
819
|
} });
|
|
820
|
-
function
|
|
820
|
+
function le(e) {
|
|
821
821
|
return e.hasAttribute("data-open") || e.matches(":popover-open");
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function ar({
|
|
824
824
|
open: e,
|
|
825
825
|
onClose: t,
|
|
826
826
|
trigger: i,
|
|
@@ -830,45 +830,45 @@ function Xo({
|
|
|
830
830
|
ref: o,
|
|
831
831
|
...s
|
|
832
832
|
}) {
|
|
833
|
-
const d =
|
|
834
|
-
|
|
833
|
+
const d = x(null), l = x(null), u = x(!1), h = `--psi-menu-${H().replace(/:/g, "")}`;
|
|
834
|
+
Vn({ popoverRef: d, triggerRef: l, open: e, placement: a, anchorName: h });
|
|
835
835
|
const _ = (f) => {
|
|
836
836
|
d.current = f, typeof o == "function" ? o(f) : o && (o.current = f);
|
|
837
837
|
};
|
|
838
|
-
|
|
838
|
+
N(() => {
|
|
839
839
|
const f = d.current;
|
|
840
840
|
if (!f) return;
|
|
841
|
-
const v =
|
|
841
|
+
const v = le(f);
|
|
842
842
|
e && !v ? f.showPopover() : !e && v && (u.current = !0, f.hidePopover());
|
|
843
843
|
}, [e]);
|
|
844
|
-
const
|
|
844
|
+
const y = g(() => {
|
|
845
845
|
const f = d.current;
|
|
846
846
|
if (f) {
|
|
847
847
|
if (u.current) {
|
|
848
848
|
u.current = !1;
|
|
849
849
|
return;
|
|
850
850
|
}
|
|
851
|
-
|
|
851
|
+
le(f) || e && t("outside");
|
|
852
852
|
}
|
|
853
|
-
}, [t, e]),
|
|
853
|
+
}, [t, e]), m = Rn({
|
|
854
854
|
popoverRef: d,
|
|
855
855
|
triggerRef: l,
|
|
856
856
|
open: e,
|
|
857
857
|
onEsc: () => t("esc")
|
|
858
|
-
}), j =
|
|
858
|
+
}), j = g(
|
|
859
859
|
(f) => {
|
|
860
860
|
t(f);
|
|
861
861
|
},
|
|
862
862
|
[t]
|
|
863
|
-
),
|
|
864
|
-
|
|
865
|
-
|
|
863
|
+
), C = U(i);
|
|
864
|
+
N(() => {
|
|
865
|
+
C || console.warn(
|
|
866
866
|
"Psi Menu: `trigger` must be a single React element that forwards props to a focusable node. Menu clones it to attach aria-haspopup and aria-expanded; a string, fragment or array cannot carry them, so the menu renders without its trigger ARIA."
|
|
867
867
|
);
|
|
868
|
-
}, [
|
|
869
|
-
const
|
|
868
|
+
}, [C]);
|
|
869
|
+
const b = C ? te(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
|
|
870
870
|
return /* @__PURE__ */ p(G, { children: [
|
|
871
|
-
/* @__PURE__ */ n("div", { ref: l, className: J.trigger, "data-psi-menu-trigger": !0, children:
|
|
871
|
+
/* @__PURE__ */ n("div", { ref: l, className: J.trigger, "data-psi-menu-trigger": !0, children: b }),
|
|
872
872
|
/* @__PURE__ */ n(
|
|
873
873
|
"div",
|
|
874
874
|
{
|
|
@@ -879,15 +879,15 @@ function Xo({
|
|
|
879
879
|
"data-psi-menu": !0,
|
|
880
880
|
"data-placement": a,
|
|
881
881
|
className: [J.menu, r].filter(Boolean).join(" "),
|
|
882
|
-
onToggle:
|
|
883
|
-
onKeyDown:
|
|
884
|
-
children: /* @__PURE__ */ n(
|
|
882
|
+
onToggle: y,
|
|
883
|
+
onKeyDown: m,
|
|
884
|
+
children: /* @__PURE__ */ n(pe.Provider, { value: { close: j }, children: c })
|
|
885
885
|
}
|
|
886
886
|
)
|
|
887
887
|
] });
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
const { close: c } =
|
|
889
|
+
function cr({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1 }) {
|
|
890
|
+
const { close: c } = S(pe);
|
|
891
891
|
return /* @__PURE__ */ n(
|
|
892
892
|
"button",
|
|
893
893
|
{
|
|
@@ -905,107 +905,107 @@ function Jo({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1
|
|
|
905
905
|
}
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function lr() {
|
|
909
909
|
return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: J.separator });
|
|
910
910
|
}
|
|
911
|
-
const
|
|
912
|
-
table:
|
|
913
|
-
headerCell:
|
|
914
|
-
cell:
|
|
915
|
-
sortButton:
|
|
916
|
-
sortIndicator:
|
|
917
|
-
selectCell:
|
|
918
|
-
body:
|
|
919
|
-
row:
|
|
920
|
-
sticky:
|
|
921
|
-
},
|
|
911
|
+
const qn = "_table_146hc_3", Fn = "_headerCell_146hc_13", Kn = "_cell_146hc_19", On = "_sortButton_146hc_30", Un = "_sortIndicator_146hc_47", Yn = "_selectCell_146hc_79", Zn = "_body_146hc_86", Gn = "_row_146hc_89", Xn = "_sticky_146hc_111", k = {
|
|
912
|
+
table: qn,
|
|
913
|
+
headerCell: Fn,
|
|
914
|
+
cell: Kn,
|
|
915
|
+
sortButton: On,
|
|
916
|
+
sortIndicator: Un,
|
|
917
|
+
selectCell: Yn,
|
|
918
|
+
body: Zn,
|
|
919
|
+
row: Gn,
|
|
920
|
+
sticky: Xn
|
|
921
|
+
}, ve = /* @__PURE__ */ new Set(), V = R({
|
|
922
922
|
size: 40,
|
|
923
923
|
sortable: !1,
|
|
924
924
|
sort: null,
|
|
925
925
|
selectable: !1,
|
|
926
|
-
selected:
|
|
927
|
-
}),
|
|
928
|
-
function
|
|
926
|
+
selected: ve
|
|
927
|
+
}), be = R([]);
|
|
928
|
+
function Jn({ children: e, className: t }) {
|
|
929
929
|
return /* @__PURE__ */ n("tbody", { className: [k.body, t].filter(Boolean).join(" "), children: e });
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function Qn(e) {
|
|
932
932
|
const t = [];
|
|
933
933
|
let i = !1, a = !1;
|
|
934
934
|
const c = (r) => {
|
|
935
|
-
|
|
936
|
-
if (!
|
|
937
|
-
if (s.type ===
|
|
938
|
-
|
|
935
|
+
A.forEach(r, function o(s) {
|
|
936
|
+
if (!U(s)) return;
|
|
937
|
+
if (s.type === ae) {
|
|
938
|
+
A.forEach(s.props.children, o);
|
|
939
939
|
return;
|
|
940
940
|
}
|
|
941
941
|
const d = s.props.rowId;
|
|
942
942
|
typeof d == "string" ? t.push(d) : a = !0;
|
|
943
943
|
});
|
|
944
944
|
};
|
|
945
|
-
return
|
|
946
|
-
if (
|
|
947
|
-
if (o.type ===
|
|
948
|
-
|
|
945
|
+
return A.forEach(e, function r(o) {
|
|
946
|
+
if (U(o)) {
|
|
947
|
+
if (o.type === ae) {
|
|
948
|
+
A.forEach(o.props.children, r);
|
|
949
949
|
return;
|
|
950
950
|
}
|
|
951
|
-
o.type ===
|
|
951
|
+
o.type === Jn && (i = !0, c(o.props.children));
|
|
952
952
|
}
|
|
953
953
|
}), { ids: t, sawBody: i, hasRowWithoutId: a };
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function dr({
|
|
956
956
|
size: e = 40,
|
|
957
957
|
stickyHeader: t,
|
|
958
958
|
sortable: i = !1,
|
|
959
959
|
sort: a = null,
|
|
960
960
|
onSortChange: c,
|
|
961
961
|
selectable: r = !1,
|
|
962
|
-
selected: o =
|
|
962
|
+
selected: o = ve,
|
|
963
963
|
onSelectionChange: s,
|
|
964
964
|
children: d,
|
|
965
965
|
className: l,
|
|
966
966
|
ref: u
|
|
967
967
|
}) {
|
|
968
|
-
const h = [k.table, t && k.sticky, l].filter(Boolean).join(" "), { ids: _, sawBody:
|
|
969
|
-
return process.env.NODE_ENV !== "production" && (i && !c && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !s && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !
|
|
968
|
+
const h = [k.table, t && k.sticky, l].filter(Boolean).join(" "), { ids: _, sawBody: y, hasRowWithoutId: m } = ne(() => Qn(d), [d]);
|
|
969
|
+
return process.env.NODE_ENV !== "production" && (i && !c && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !s && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !y && console.warn("Psi Table: `selectable` is set but no `TableBody` is visible to `Table`. Wrapping `TableBody` in a component other than a Fragment hides its rows, and select-all will clear the selection instead of filling it."), r && m && console.warn("Psi Table: `selectable` is set but a row in `TableBody` has no `rowId`. That row will render without a selection checkbox and select-all will not include it.")), /* @__PURE__ */ n(V.Provider, { value: { size: e, sortable: i, sort: a, onSortChange: c, selectable: r, selected: o, onSelectionChange: s }, children: /* @__PURE__ */ n(be.Provider, { value: _, children: /* @__PURE__ */ n("table", { ref: u, className: h, "data-size": e, children: d }) }) });
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
const { selected: i, onSelectionChange: a } =
|
|
971
|
+
function eo({ rowId: e, label: t }) {
|
|
972
|
+
const { selected: i, onSelectionChange: a } = S(V), c = () => {
|
|
973
973
|
const r = new Set(i);
|
|
974
974
|
r.has(e) ? r.delete(e) : r.add(e), a == null || a(r);
|
|
975
975
|
};
|
|
976
|
-
return /* @__PURE__ */ n("td", { className: `${k.cell} ${k.selectCell}`, children: /* @__PURE__ */ n(
|
|
976
|
+
return /* @__PURE__ */ n("td", { className: `${k.cell} ${k.selectCell}`, children: /* @__PURE__ */ n(fe, { "aria-label": t, checked: i.has(e), onChange: c }) });
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
const { selected: e, onSelectionChange: t } =
|
|
980
|
-
|
|
978
|
+
function to() {
|
|
979
|
+
const { selected: e, onSelectionChange: t } = S(V), i = S(be), a = x(null), c = i.length > 0 && i.every((s) => e.has(s)), r = i.some((s) => e.has(s));
|
|
980
|
+
N(() => {
|
|
981
981
|
a.current && (a.current.indeterminate = r && !c);
|
|
982
982
|
}, [r, c]);
|
|
983
983
|
const o = () => {
|
|
984
984
|
const s = new Set(e);
|
|
985
985
|
c ? i.forEach((d) => s.delete(d)) : i.forEach((d) => s.add(d)), t == null || t(s);
|
|
986
986
|
};
|
|
987
|
-
return /* @__PURE__ */ n("th", { scope: "col", className: `${k.headerCell} ${k.selectCell}`, children: /* @__PURE__ */ n(
|
|
987
|
+
return /* @__PURE__ */ n("th", { scope: "col", className: `${k.headerCell} ${k.selectCell}`, children: /* @__PURE__ */ n(fe, { ref: a, "aria-label": "Select all rows", checked: c, onChange: o }) });
|
|
988
988
|
}
|
|
989
|
-
function
|
|
990
|
-
const { selectable: i } =
|
|
989
|
+
function ur({ children: e, className: t }) {
|
|
990
|
+
const { selectable: i } = S(V);
|
|
991
991
|
let a = !1;
|
|
992
|
-
const c = i ?
|
|
993
|
-
if (a || !
|
|
992
|
+
const c = i ? A.map(e, (r) => {
|
|
993
|
+
if (a || !U(r)) return r;
|
|
994
994
|
a = !0;
|
|
995
995
|
const o = r;
|
|
996
|
-
return
|
|
996
|
+
return te(
|
|
997
997
|
o,
|
|
998
998
|
void 0,
|
|
999
999
|
/* @__PURE__ */ p(G, { children: [
|
|
1000
|
-
/* @__PURE__ */ n(
|
|
1000
|
+
/* @__PURE__ */ n(to, {}),
|
|
1001
1001
|
o.props.children
|
|
1002
1002
|
] })
|
|
1003
1003
|
);
|
|
1004
1004
|
}) : e;
|
|
1005
1005
|
return /* @__PURE__ */ n("thead", { className: [k.head, t].filter(Boolean).join(" "), children: c });
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1008
|
-
const { selectable: c, selected: r } =
|
|
1007
|
+
function hr({ rowId: e, selectLabel: t, children: i, className: a }) {
|
|
1008
|
+
const { selectable: c, selected: r } = S(V), o = e !== void 0 && r.has(e);
|
|
1009
1009
|
return /* @__PURE__ */ p(
|
|
1010
1010
|
"tr",
|
|
1011
1011
|
{
|
|
@@ -1013,14 +1013,14 @@ function nr({ rowId: e, selectLabel: t, children: i, className: a }) {
|
|
|
1013
1013
|
"data-row-id": e,
|
|
1014
1014
|
"data-selected": o || void 0,
|
|
1015
1015
|
children: [
|
|
1016
|
-
c && e !== void 0 && /* @__PURE__ */ n(
|
|
1016
|
+
c && e !== void 0 && /* @__PURE__ */ n(eo, { rowId: e, label: t ?? `Select row ${e}` }),
|
|
1017
1017
|
i
|
|
1018
1018
|
]
|
|
1019
1019
|
}
|
|
1020
1020
|
);
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1023
|
-
const { sortable: c, sort: r, onSortChange: o } =
|
|
1022
|
+
function _r({ sortKey: e, numeric: t, children: i, className: a }) {
|
|
1023
|
+
const { sortable: c, sort: r, onSortChange: o } = S(V), s = c && e !== void 0, d = s && (r == null ? void 0 : r.key) === e, l = s ? d ? r.direction === "asc" ? "ascending" : "descending" : "none" : void 0, u = () => {
|
|
1024
1024
|
if (!e) return;
|
|
1025
1025
|
const h = d && r.direction === "asc" ? "desc" : "asc";
|
|
1026
1026
|
o == null || o({ key: e, direction: h });
|
|
@@ -1039,32 +1039,32 @@ function or({ sortKey: e, numeric: t, children: i, className: a }) {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
);
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function fr({ numeric: e, children: t, className: i }) {
|
|
1043
1043
|
return /* @__PURE__ */ n("td", { className: [k.cell, i].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1046
|
-
nav:
|
|
1047
|
-
ellipsis:
|
|
1045
|
+
const no = "_nav_166vs_6", oo = "_ellipsis_166vs_12", de = {
|
|
1046
|
+
nav: no,
|
|
1047
|
+
ellipsis: oo
|
|
1048
1048
|
};
|
|
1049
|
-
function
|
|
1049
|
+
function O(e, t) {
|
|
1050
1050
|
return Array.from({ length: t - e + 1 }, (i, a) => e + a);
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function ro(e, t, i) {
|
|
1053
1053
|
const a = Math.max(0, i), c = a * 2 + 1, r = c + 4;
|
|
1054
1054
|
if (t <= r)
|
|
1055
|
-
return
|
|
1055
|
+
return O(1, t);
|
|
1056
1056
|
const o = Math.max(e - a, 1), s = Math.min(e + a, t), d = o > 3, l = s < t - 2;
|
|
1057
1057
|
if (!d && l) {
|
|
1058
1058
|
const u = Math.max(s, c);
|
|
1059
|
-
return [...
|
|
1059
|
+
return [...O(1, u), "ellipsis", t];
|
|
1060
1060
|
}
|
|
1061
1061
|
if (d && !l) {
|
|
1062
1062
|
const u = Math.min(o, t - c + 1);
|
|
1063
|
-
return [1, "ellipsis", ...
|
|
1063
|
+
return [1, "ellipsis", ...O(u, t)];
|
|
1064
1064
|
}
|
|
1065
|
-
return d && l ? [1, "ellipsis", ...
|
|
1065
|
+
return d && l ? [1, "ellipsis", ...O(o, s), "ellipsis", t] : O(1, t);
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function pr({
|
|
1068
1068
|
page: e,
|
|
1069
1069
|
pageCount: t,
|
|
1070
1070
|
onPageChange: i,
|
|
@@ -1072,8 +1072,8 @@ function ir({
|
|
|
1072
1072
|
"aria-label": c = "Pagination",
|
|
1073
1073
|
className: r
|
|
1074
1074
|
}) {
|
|
1075
|
-
const o =
|
|
1076
|
-
return /* @__PURE__ */ p("nav", { "aria-label": c, className: [
|
|
1075
|
+
const o = ro(e, t, a);
|
|
1076
|
+
return /* @__PURE__ */ p("nav", { "aria-label": c, className: [de.nav, r].filter(Boolean).join(" "), children: [
|
|
1077
1077
|
/* @__PURE__ */ n(
|
|
1078
1078
|
X,
|
|
1079
1079
|
{
|
|
@@ -1086,8 +1086,8 @@ function ir({
|
|
|
1086
1086
|
}
|
|
1087
1087
|
),
|
|
1088
1088
|
o.map(
|
|
1089
|
-
(s, d) => s === "ellipsis" ? /* @__PURE__ */ n("span", { className:
|
|
1090
|
-
|
|
1089
|
+
(s, d) => s === "ellipsis" ? /* @__PURE__ */ n("span", { className: de.ellipsis, "aria-hidden": "true", children: "…" }, `e${d}`) : /* @__PURE__ */ n(
|
|
1090
|
+
Re,
|
|
1091
1091
|
{
|
|
1092
1092
|
size: 32,
|
|
1093
1093
|
variant: s === e ? "accent-subtle" : "ghost",
|
|
@@ -1111,35 +1111,35 @@ function ir({
|
|
|
1111
1111
|
)
|
|
1112
1112
|
] });
|
|
1113
1113
|
}
|
|
1114
|
-
const
|
|
1115
|
-
toast:
|
|
1116
|
-
icon:
|
|
1117
|
-
iconNeutral:
|
|
1118
|
-
iconSuccess:
|
|
1119
|
-
iconWarning:
|
|
1120
|
-
iconDanger:
|
|
1121
|
-
body:
|
|
1122
|
-
action:
|
|
1123
|
-
srOnly:
|
|
1124
|
-
region:
|
|
1125
|
-
live:
|
|
1126
|
-
},
|
|
1127
|
-
neutral:
|
|
1128
|
-
success:
|
|
1129
|
-
warning:
|
|
1130
|
-
danger:
|
|
1131
|
-
},
|
|
1114
|
+
const io = "_toast_7toru_10", so = "_icon_7toru_39", ao = "_iconNeutral_7toru_44", co = "_iconSuccess_7toru_45", lo = "_iconWarning_7toru_46", uo = "_iconDanger_7toru_47", ho = "_body_7toru_51", _o = "_action_7toru_55", fo = "_srOnly_7toru_60", po = "_region_7toru_74", vo = "_live_7toru_104", $ = {
|
|
1115
|
+
toast: io,
|
|
1116
|
+
icon: so,
|
|
1117
|
+
iconNeutral: ao,
|
|
1118
|
+
iconSuccess: co,
|
|
1119
|
+
iconWarning: lo,
|
|
1120
|
+
iconDanger: uo,
|
|
1121
|
+
body: ho,
|
|
1122
|
+
action: _o,
|
|
1123
|
+
srOnly: fo,
|
|
1124
|
+
region: po,
|
|
1125
|
+
live: vo
|
|
1126
|
+
}, bo = {
|
|
1127
|
+
neutral: mt,
|
|
1128
|
+
success: yt,
|
|
1129
|
+
warning: wt,
|
|
1130
|
+
danger: xt
|
|
1131
|
+
}, go = {
|
|
1132
1132
|
neutral: null,
|
|
1133
1133
|
success: "Success:",
|
|
1134
1134
|
warning: "Warning:",
|
|
1135
1135
|
danger: "Error:"
|
|
1136
|
-
},
|
|
1137
|
-
neutral:
|
|
1138
|
-
success:
|
|
1139
|
-
warning:
|
|
1140
|
-
danger:
|
|
1136
|
+
}, yo = {
|
|
1137
|
+
neutral: $.iconNeutral,
|
|
1138
|
+
success: $.iconSuccess,
|
|
1139
|
+
warning: $.iconWarning,
|
|
1140
|
+
danger: $.iconDanger
|
|
1141
1141
|
};
|
|
1142
|
-
function
|
|
1142
|
+
function ge({
|
|
1143
1143
|
variant: e = "neutral",
|
|
1144
1144
|
children: t,
|
|
1145
1145
|
action: i,
|
|
@@ -1147,14 +1147,14 @@ function ve({
|
|
|
1147
1147
|
className: c,
|
|
1148
1148
|
ref: r
|
|
1149
1149
|
}) {
|
|
1150
|
-
const o =
|
|
1150
|
+
const o = bo[e], s = go[e], d = [$.toast, c].filter(Boolean).join(" ");
|
|
1151
1151
|
return /* @__PURE__ */ p("div", { ref: r, className: d, "data-variant": e, "data-psi-toast": !0, children: [
|
|
1152
|
-
/* @__PURE__ */ n("span", { className: [
|
|
1153
|
-
/* @__PURE__ */ p("div", { className:
|
|
1154
|
-
s && /* @__PURE__ */ n("span", { className:
|
|
1152
|
+
/* @__PURE__ */ n("span", { className: [$.icon, yo[e]].join(" "), children: /* @__PURE__ */ n(o, { size: 20, "aria-hidden": "true" }) }),
|
|
1153
|
+
/* @__PURE__ */ p("div", { className: $.body, children: [
|
|
1154
|
+
s && /* @__PURE__ */ n("span", { className: $.srOnly, children: s }),
|
|
1155
1155
|
t
|
|
1156
1156
|
] }),
|
|
1157
|
-
i != null && /* @__PURE__ */ n("div", { className:
|
|
1157
|
+
i != null && /* @__PURE__ */ n("div", { className: $.action, children: i }),
|
|
1158
1158
|
a && /* @__PURE__ */ n(
|
|
1159
1159
|
X,
|
|
1160
1160
|
{
|
|
@@ -1162,28 +1162,28 @@ function ve({
|
|
|
1162
1162
|
size: 32,
|
|
1163
1163
|
"aria-label": "Dismiss notification",
|
|
1164
1164
|
onClick: a,
|
|
1165
|
-
children: /* @__PURE__ */ n(
|
|
1165
|
+
children: /* @__PURE__ */ n(_e, { "aria-hidden": "true" })
|
|
1166
1166
|
}
|
|
1167
1167
|
)
|
|
1168
1168
|
] });
|
|
1169
1169
|
}
|
|
1170
|
-
const
|
|
1171
|
-
function
|
|
1172
|
-
if (!
|
|
1170
|
+
const mo = /* @__PURE__ */ new Set(["warning", "danger"]);
|
|
1171
|
+
function ue(e) {
|
|
1172
|
+
if (!U(e) || e.type !== ge) return !1;
|
|
1173
1173
|
const { variant: t } = e.props;
|
|
1174
|
-
return
|
|
1174
|
+
return mo.has(t ?? "neutral");
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function wo({
|
|
1177
1177
|
placement: e = "bottom-end",
|
|
1178
1178
|
"aria-label": t = "Notifications",
|
|
1179
1179
|
children: i,
|
|
1180
1180
|
className: a,
|
|
1181
1181
|
ref: c
|
|
1182
1182
|
}) {
|
|
1183
|
-
const r =
|
|
1183
|
+
const r = x(null), o = (u) => {
|
|
1184
1184
|
r.current = u, typeof c == "function" ? c(u) : c && (c.current = u);
|
|
1185
1185
|
};
|
|
1186
|
-
|
|
1186
|
+
N(() => {
|
|
1187
1187
|
var h;
|
|
1188
1188
|
const u = r.current;
|
|
1189
1189
|
if (u)
|
|
@@ -1192,7 +1192,7 @@ function vo({
|
|
|
1192
1192
|
(_ = u.hidePopover) == null || _.call(u);
|
|
1193
1193
|
};
|
|
1194
1194
|
}, []);
|
|
1195
|
-
const s =
|
|
1195
|
+
const s = A.toArray(i), d = s.filter(ue), l = s.filter((u) => !ue(u));
|
|
1196
1196
|
return /* @__PURE__ */ p(
|
|
1197
1197
|
"div",
|
|
1198
1198
|
{
|
|
@@ -1201,71 +1201,71 @@ function vo({
|
|
|
1201
1201
|
"aria-label": t,
|
|
1202
1202
|
"data-placement": e,
|
|
1203
1203
|
"data-psi-toast-region": !0,
|
|
1204
|
-
className: [
|
|
1204
|
+
className: [$.region, a].filter(Boolean).join(" "),
|
|
1205
1205
|
children: [
|
|
1206
|
-
/* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className:
|
|
1207
|
-
/* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className:
|
|
1206
|
+
/* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className: $.live, children: l }),
|
|
1207
|
+
/* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className: $.live, children: d })
|
|
1208
1208
|
]
|
|
1209
1209
|
}
|
|
1210
1210
|
);
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1214
|
-
const e =
|
|
1212
|
+
const ye = R(null);
|
|
1213
|
+
function vr() {
|
|
1214
|
+
const e = S(ye);
|
|
1215
1215
|
if (!e)
|
|
1216
1216
|
throw new Error(
|
|
1217
1217
|
"Psi useToast: no ToastProvider found. Wrap your app (or the subtree that raises toasts) in <ToastProvider> — it owns the queue, the auto-dismiss timers and the single ToastRegion."
|
|
1218
1218
|
);
|
|
1219
1219
|
return e;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function br({
|
|
1222
1222
|
limit: e = 3,
|
|
1223
1223
|
duration: t = 5e3,
|
|
1224
1224
|
actionDuration: i = 1e4,
|
|
1225
1225
|
placement: a = "bottom-end",
|
|
1226
1226
|
children: c
|
|
1227
1227
|
}) {
|
|
1228
|
-
const [r, o] =
|
|
1228
|
+
const [r, o] = he([]), s = x(/* @__PURE__ */ new Map()), d = x(!1), l = x(0), u = H(), h = g((f) => {
|
|
1229
1229
|
const v = s.current.get(f);
|
|
1230
|
-
(v == null ? void 0 : v.handle) !== void 0 && clearTimeout(v.handle), s.current.delete(f), o((
|
|
1231
|
-
}, []), _ =
|
|
1230
|
+
(v == null ? void 0 : v.handle) !== void 0 && clearTimeout(v.handle), s.current.delete(f), o((T) => T.filter((q) => q.id !== f));
|
|
1231
|
+
}, []), _ = g(
|
|
1232
1232
|
(f, v) => {
|
|
1233
|
-
const
|
|
1234
|
-
s.current.set(f,
|
|
1233
|
+
const T = d.current ? { handle: void 0, remaining: v, startedAt: void 0 } : { handle: setTimeout(() => h(f), v), remaining: v, startedAt: Date.now() };
|
|
1234
|
+
s.current.set(f, T);
|
|
1235
1235
|
},
|
|
1236
1236
|
[h]
|
|
1237
|
-
),
|
|
1238
|
-
({ variant: f = "neutral", message: v, action:
|
|
1239
|
-
const
|
|
1240
|
-
return o((
|
|
1241
|
-
const
|
|
1242
|
-
for (;
|
|
1243
|
-
const
|
|
1244
|
-
(Y == null ? void 0 : Y.handle) !== void 0 && clearTimeout(Y.handle), s.current.delete(
|
|
1237
|
+
), y = g(
|
|
1238
|
+
({ variant: f = "neutral", message: v, action: T }) => {
|
|
1239
|
+
const q = `${u}-${l.current++}`, ie = T != null ? i : t;
|
|
1240
|
+
return o((ke) => {
|
|
1241
|
+
const ee = [...ke, { id: q, variant: f, message: v, action: T, duration: ie }];
|
|
1242
|
+
for (; ee.length > e; ) {
|
|
1243
|
+
const se = ee.shift(), Y = s.current.get(se.id);
|
|
1244
|
+
(Y == null ? void 0 : Y.handle) !== void 0 && clearTimeout(Y.handle), s.current.delete(se.id);
|
|
1245
1245
|
}
|
|
1246
|
-
return
|
|
1247
|
-
}), _(
|
|
1246
|
+
return ee;
|
|
1247
|
+
}), _(q, ie), q;
|
|
1248
1248
|
},
|
|
1249
1249
|
[i, _, t, u, e]
|
|
1250
|
-
),
|
|
1250
|
+
), m = g(() => {
|
|
1251
1251
|
for (const f of s.current.values())
|
|
1252
1252
|
f.handle !== void 0 && clearTimeout(f.handle);
|
|
1253
1253
|
s.current.clear(), o([]);
|
|
1254
|
-
}, []), j =
|
|
1254
|
+
}, []), j = g(() => {
|
|
1255
1255
|
if (!d.current) {
|
|
1256
1256
|
d.current = !0;
|
|
1257
1257
|
for (const [f, v] of s.current) {
|
|
1258
1258
|
if (v.handle === void 0) continue;
|
|
1259
1259
|
clearTimeout(v.handle);
|
|
1260
|
-
const
|
|
1260
|
+
const T = v.startedAt === void 0 ? 0 : Date.now() - v.startedAt;
|
|
1261
1261
|
s.current.set(f, {
|
|
1262
1262
|
handle: void 0,
|
|
1263
|
-
remaining: Math.max(0, v.remaining -
|
|
1263
|
+
remaining: Math.max(0, v.remaining - T),
|
|
1264
1264
|
startedAt: void 0
|
|
1265
1265
|
});
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
|
-
}, []),
|
|
1268
|
+
}, []), C = g(() => {
|
|
1269
1269
|
if (d.current) {
|
|
1270
1270
|
d.current = !1;
|
|
1271
1271
|
for (const [f, v] of s.current)
|
|
@@ -1276,7 +1276,7 @@ function ar({
|
|
|
1276
1276
|
});
|
|
1277
1277
|
}
|
|
1278
1278
|
}, [h]);
|
|
1279
|
-
|
|
1279
|
+
N(() => {
|
|
1280
1280
|
const f = s.current;
|
|
1281
1281
|
return () => {
|
|
1282
1282
|
for (const v of f.values())
|
|
@@ -1284,79 +1284,221 @@ function ar({
|
|
|
1284
1284
|
f.clear();
|
|
1285
1285
|
};
|
|
1286
1286
|
}, []);
|
|
1287
|
-
const
|
|
1288
|
-
() => ({ show:
|
|
1289
|
-
[
|
|
1287
|
+
const b = ne(
|
|
1288
|
+
() => ({ show: y, dismiss: h, clear: m }),
|
|
1289
|
+
[y, h, m]
|
|
1290
1290
|
);
|
|
1291
|
-
return /* @__PURE__ */ p(
|
|
1291
|
+
return /* @__PURE__ */ p(ye.Provider, { value: b, children: [
|
|
1292
1292
|
c,
|
|
1293
1293
|
/* @__PURE__ */ n(
|
|
1294
1294
|
"div",
|
|
1295
1295
|
{
|
|
1296
1296
|
onPointerEnter: j,
|
|
1297
|
-
onPointerLeave:
|
|
1297
|
+
onPointerLeave: C,
|
|
1298
1298
|
onFocusCapture: j,
|
|
1299
|
-
onBlurCapture:
|
|
1300
|
-
children: /* @__PURE__ */ n(
|
|
1299
|
+
onBlurCapture: C,
|
|
1300
|
+
children: /* @__PURE__ */ n(wo, { placement: a, children: r.map((f) => /* @__PURE__ */ n(ge, { variant: f.variant, action: f.action, onDismiss: () => h(f.id), children: f.message }, f.id)) })
|
|
1301
1301
|
}
|
|
1302
1302
|
)
|
|
1303
1303
|
] });
|
|
1304
1304
|
}
|
|
1305
|
+
const xo = "_tabs_17vw6_8", ko = "_list_17vw6_21", Co = "_tab_17vw6_8", Bo = "_panel_17vw6_97", Q = {
|
|
1306
|
+
tabs: xo,
|
|
1307
|
+
list: ko,
|
|
1308
|
+
tab: Co,
|
|
1309
|
+
panel: Bo
|
|
1310
|
+
}, me = R(null);
|
|
1311
|
+
function re(e) {
|
|
1312
|
+
const t = S(me);
|
|
1313
|
+
if (!t)
|
|
1314
|
+
throw new Error(
|
|
1315
|
+
`Psi ${e}: must be rendered inside <Tabs>. Tabs owns the selected value, the orientation and the ids that wire aria-controls and aria-labelledby together.`
|
|
1316
|
+
);
|
|
1317
|
+
return t;
|
|
1318
|
+
}
|
|
1319
|
+
function gr({
|
|
1320
|
+
value: e,
|
|
1321
|
+
onValueChange: t,
|
|
1322
|
+
orientation: i = "horizontal",
|
|
1323
|
+
children: a,
|
|
1324
|
+
className: c,
|
|
1325
|
+
ref: r
|
|
1326
|
+
}) {
|
|
1327
|
+
const o = H(), s = ne(
|
|
1328
|
+
() => ({ value: e, onValueChange: t, orientation: i, idPrefix: o }),
|
|
1329
|
+
[e, t, i, o]
|
|
1330
|
+
);
|
|
1331
|
+
return /* @__PURE__ */ n(me.Provider, { value: s, children: /* @__PURE__ */ n(
|
|
1332
|
+
"div",
|
|
1333
|
+
{
|
|
1334
|
+
ref: r,
|
|
1335
|
+
className: [Q.tabs, c].filter(Boolean).join(" "),
|
|
1336
|
+
"data-orientation": i,
|
|
1337
|
+
children: a
|
|
1338
|
+
}
|
|
1339
|
+
) });
|
|
1340
|
+
}
|
|
1341
|
+
function we(e, t) {
|
|
1342
|
+
return `${e}tab-${t}`;
|
|
1343
|
+
}
|
|
1344
|
+
function xe(e, t) {
|
|
1345
|
+
return `${e}panel-${t}`;
|
|
1346
|
+
}
|
|
1347
|
+
function $o({ listRef: e, orientation: t, onValueChange: i }) {
|
|
1348
|
+
const a = g(() => {
|
|
1349
|
+
const r = e.current;
|
|
1350
|
+
return r ? Array.from(
|
|
1351
|
+
r.querySelectorAll('[data-psi-tab]:not([aria-disabled="true"])')
|
|
1352
|
+
) : [];
|
|
1353
|
+
}, [e]), c = g(
|
|
1354
|
+
(r) => {
|
|
1355
|
+
if (!r) return;
|
|
1356
|
+
for (const s of a()) s.tabIndex = s === r ? 0 : -1;
|
|
1357
|
+
r.focus();
|
|
1358
|
+
const o = r.dataset.value;
|
|
1359
|
+
o != null && i(o);
|
|
1360
|
+
},
|
|
1361
|
+
[a, i]
|
|
1362
|
+
);
|
|
1363
|
+
return g(
|
|
1364
|
+
(r) => {
|
|
1365
|
+
const o = a();
|
|
1366
|
+
if (o.length === 0) return;
|
|
1367
|
+
const [s, d] = t === "vertical" ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"], l = o.indexOf(document.activeElement);
|
|
1368
|
+
switch (r.key) {
|
|
1369
|
+
case d:
|
|
1370
|
+
r.preventDefault(), c(o[(l + 1 + o.length) % o.length]);
|
|
1371
|
+
break;
|
|
1372
|
+
case s:
|
|
1373
|
+
r.preventDefault(), c(o[(l - 1 + o.length) % o.length]);
|
|
1374
|
+
break;
|
|
1375
|
+
case "Home":
|
|
1376
|
+
r.preventDefault(), c(o[0]);
|
|
1377
|
+
break;
|
|
1378
|
+
case "End":
|
|
1379
|
+
r.preventDefault(), c(o[o.length - 1]);
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
[c, a, t]
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1386
|
+
function yr({ "aria-label": e, children: t, className: i, ref: a }) {
|
|
1387
|
+
const { orientation: c, onValueChange: r } = re("TabList"), o = x(null), s = (l) => {
|
|
1388
|
+
o.current = l, typeof a == "function" ? a(l) : a && (a.current = l);
|
|
1389
|
+
}, d = $o({ listRef: o, orientation: c, onValueChange: r });
|
|
1390
|
+
return /* @__PURE__ */ n(
|
|
1391
|
+
"div",
|
|
1392
|
+
{
|
|
1393
|
+
ref: s,
|
|
1394
|
+
role: "tablist",
|
|
1395
|
+
"aria-label": e,
|
|
1396
|
+
"aria-orientation": c,
|
|
1397
|
+
className: [Q.list, i].filter(Boolean).join(" "),
|
|
1398
|
+
onKeyDown: d,
|
|
1399
|
+
children: t
|
|
1400
|
+
}
|
|
1401
|
+
);
|
|
1402
|
+
}
|
|
1403
|
+
function mr({ value: e, children: t, disabled: i = !1, className: a, ref: c }) {
|
|
1404
|
+
const r = re("Tab"), o = r.value === e;
|
|
1405
|
+
return /* @__PURE__ */ n(
|
|
1406
|
+
"button",
|
|
1407
|
+
{
|
|
1408
|
+
ref: c,
|
|
1409
|
+
type: "button",
|
|
1410
|
+
role: "tab",
|
|
1411
|
+
id: we(r.idPrefix, e),
|
|
1412
|
+
"data-psi-tab": !0,
|
|
1413
|
+
"data-value": e,
|
|
1414
|
+
"aria-selected": o,
|
|
1415
|
+
"aria-controls": xe(r.idPrefix, e),
|
|
1416
|
+
"aria-disabled": i || void 0,
|
|
1417
|
+
tabIndex: o ? 0 : -1,
|
|
1418
|
+
className: [Q.tab, a].filter(Boolean).join(" "),
|
|
1419
|
+
onClick: () => {
|
|
1420
|
+
i || r.onValueChange(e);
|
|
1421
|
+
},
|
|
1422
|
+
children: t
|
|
1423
|
+
}
|
|
1424
|
+
);
|
|
1425
|
+
}
|
|
1426
|
+
function wr({ value: e, children: t, className: i, ref: a }) {
|
|
1427
|
+
const c = re("TabPanel"), r = c.value === e;
|
|
1428
|
+
return /* @__PURE__ */ n(
|
|
1429
|
+
"div",
|
|
1430
|
+
{
|
|
1431
|
+
ref: a,
|
|
1432
|
+
role: "tabpanel",
|
|
1433
|
+
id: xe(c.idPrefix, e),
|
|
1434
|
+
"aria-labelledby": we(c.idPrefix, e),
|
|
1435
|
+
hidden: !r,
|
|
1436
|
+
tabIndex: 0,
|
|
1437
|
+
className: [Q.panel, i].filter(Boolean).join(" "),
|
|
1438
|
+
children: t
|
|
1439
|
+
}
|
|
1440
|
+
);
|
|
1441
|
+
}
|
|
1305
1442
|
export {
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1443
|
+
To as AspectRatio,
|
|
1444
|
+
Re as Button,
|
|
1445
|
+
So as Card,
|
|
1446
|
+
fe as Checkbox,
|
|
1447
|
+
er as Dialog,
|
|
1448
|
+
Io as Field,
|
|
1449
|
+
xt as IconAlertCircle,
|
|
1450
|
+
wt as IconAlertTriangle,
|
|
1451
|
+
Yo as IconArrowDown,
|
|
1452
|
+
Zo as IconArrowUpRight,
|
|
1316
1453
|
X as IconButton,
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1454
|
+
yt as IconCheck,
|
|
1455
|
+
Ao as IconChevronDown,
|
|
1456
|
+
Po as IconChevronRight,
|
|
1457
|
+
_e as IconClose,
|
|
1458
|
+
qo as IconCopy,
|
|
1459
|
+
Ho as IconEdit,
|
|
1460
|
+
Fo as IconExternalLink,
|
|
1461
|
+
Ko as IconEye,
|
|
1462
|
+
Oo as IconEyeOff,
|
|
1463
|
+
Xo as IconGitHub,
|
|
1464
|
+
mt as IconInfo,
|
|
1465
|
+
Qo as IconInstagram,
|
|
1466
|
+
Go as IconLinkedIn,
|
|
1467
|
+
Uo as IconLoader,
|
|
1468
|
+
Mo as IconMinus,
|
|
1469
|
+
Eo as IconPlus,
|
|
1470
|
+
Wo as IconSearch,
|
|
1471
|
+
Do as IconSettings,
|
|
1472
|
+
Vo as IconTrash,
|
|
1473
|
+
Ro as IconUser,
|
|
1474
|
+
Jo as IconX,
|
|
1475
|
+
tr as Input,
|
|
1476
|
+
ar as Menu,
|
|
1477
|
+
pe as MenuContext,
|
|
1478
|
+
cr as MenuItem,
|
|
1479
|
+
lr as MenuSeparator,
|
|
1480
|
+
jo as NavBar,
|
|
1481
|
+
pr as Pagination,
|
|
1482
|
+
zo as Panel,
|
|
1483
|
+
nr as Select,
|
|
1484
|
+
or as Switch,
|
|
1485
|
+
mr as Tab,
|
|
1486
|
+
yr as TabList,
|
|
1487
|
+
wr as TabPanel,
|
|
1488
|
+
dr as Table,
|
|
1489
|
+
Jn as TableBody,
|
|
1490
|
+
fr as TableCell,
|
|
1491
|
+
ur as TableHead,
|
|
1492
|
+
_r as TableHeaderCell,
|
|
1493
|
+
hr as TableRow,
|
|
1494
|
+
gr as Tabs,
|
|
1495
|
+
me as TabsContext,
|
|
1496
|
+
rr as Tag,
|
|
1497
|
+
ge as Toast,
|
|
1498
|
+
ye as ToastContext,
|
|
1499
|
+
br as ToastProvider,
|
|
1500
|
+
wo as ToastRegion,
|
|
1501
|
+
sr as Toolbar,
|
|
1502
|
+
ir as Tooltip,
|
|
1503
|
+
vr as useToast
|
|
1362
1504
|
};
|