@handamade/psi-react 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +287 -288
- package/dist/styles.css +1 -1
- package/docs/Toolbar.md +1 -1
- package/llms.txt +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as n, jsxs as f, Fragment as X } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as R, useId as H, useRef as
|
|
3
|
-
const Be = "_button_c94w9_3", $e = "_disabled_c94w9_30", Ne = "_size24_c94w9_44", Le = "_size32_c94w9_54", Se = "_size40_c94w9_64",
|
|
2
|
+
import { createContext as R, useId as H, useRef as x, useEffect as $, useContext as S, useState as _e, useCallback as b, cloneElement as ne, isValidElement as U, useMemo as oe, Children as P, Fragment as ce } from "react";
|
|
3
|
+
const Be = "_button_c94w9_3", $e = "_disabled_c94w9_30", Ne = "_size24_c94w9_44", Le = "_size32_c94w9_54", Se = "_size40_c94w9_64", ze = "_size48_c94w9_74", Te = "_accent_c94w9_87", je = "_accentSubtle_c94w9_99", Ie = "_neutral_c94w9_111", Ee = "_neutralSubtle_c94w9_123", Me = "_ghost_c94w9_135", Pe = "_danger_c94w9_147", Ae = "_dangerSubtle_c94w9_159", We = "_outline_c94w9_171", w = {
|
|
4
4
|
button: Be,
|
|
5
5
|
disabled: $e,
|
|
6
6
|
size24: Ne,
|
|
7
7
|
size32: Le,
|
|
8
8
|
size40: Se,
|
|
9
|
-
size48:
|
|
10
|
-
accent:
|
|
11
|
-
accentSubtle:
|
|
9
|
+
size48: ze,
|
|
10
|
+
accent: Te,
|
|
11
|
+
accentSubtle: je,
|
|
12
12
|
neutral: Ie,
|
|
13
13
|
neutralSubtle: Ee,
|
|
14
14
|
ghost: Me,
|
|
@@ -72,7 +72,7 @@ function He({
|
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
const qe = "_iconButton_129ca_3", Ve = "_disabled_129ca_29", Fe = "_size24_129ca_37", Ke = "_size32_129ca_42", Oe = "_size40_129ca_47", Ue = "_size48_129ca_52", Ye = "_accent_129ca_60", Ze = "_neutral_129ca_72", Ge = "_ghost_129ca_84", Xe = "_danger_129ca_96",
|
|
75
|
+
const qe = "_iconButton_129ca_3", Ve = "_disabled_129ca_29", Fe = "_size24_129ca_37", Ke = "_size32_129ca_42", Oe = "_size40_129ca_47", Ue = "_size48_129ca_52", Ye = "_accent_129ca_60", Ze = "_neutral_129ca_72", Ge = "_ghost_129ca_84", Xe = "_danger_129ca_96", z = {
|
|
76
76
|
iconButton: qe,
|
|
77
77
|
disabled: Ve,
|
|
78
78
|
size24: Fe,
|
|
@@ -84,15 +84,15 @@ const qe = "_iconButton_129ca_3", Ve = "_disabled_129ca_29", Fe = "_size24_129ca
|
|
|
84
84
|
ghost: Ge,
|
|
85
85
|
danger: Xe
|
|
86
86
|
}, Je = {
|
|
87
|
-
accent:
|
|
88
|
-
neutral:
|
|
89
|
-
ghost:
|
|
90
|
-
danger:
|
|
87
|
+
accent: z.accent,
|
|
88
|
+
neutral: z.neutral,
|
|
89
|
+
ghost: z.ghost,
|
|
90
|
+
danger: z.danger
|
|
91
91
|
}, Qe = {
|
|
92
|
-
24:
|
|
93
|
-
32:
|
|
94
|
-
40:
|
|
95
|
-
48:
|
|
92
|
+
24: z.size24,
|
|
93
|
+
32: z.size32,
|
|
94
|
+
40: z.size40,
|
|
95
|
+
48: z.size48
|
|
96
96
|
};
|
|
97
97
|
function J({
|
|
98
98
|
variant: e = "neutral",
|
|
@@ -107,10 +107,10 @@ function J({
|
|
|
107
107
|
...l
|
|
108
108
|
}) {
|
|
109
109
|
const u = [
|
|
110
|
-
|
|
110
|
+
z.iconButton,
|
|
111
111
|
Je[e],
|
|
112
112
|
Qe[t],
|
|
113
|
-
i !== void 0 && r ?
|
|
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(
|
|
@@ -144,7 +144,7 @@ const et = "_card_1btb3_1", tt = "_stacked_1btb3_8", nt = "_featured_1btb3_10",
|
|
|
144
144
|
body: rt,
|
|
145
145
|
hoverLift: it
|
|
146
146
|
};
|
|
147
|
-
function
|
|
147
|
+
function Io({
|
|
148
148
|
variant: e = "stacked",
|
|
149
149
|
media: t,
|
|
150
150
|
hoverLift: i = !1,
|
|
@@ -168,7 +168,7 @@ const st = "_panel_jn8w4_1", at = "_padding16_jn8w4_8", le = {
|
|
|
168
168
|
panel: st,
|
|
169
169
|
padding16: at
|
|
170
170
|
};
|
|
171
|
-
function
|
|
171
|
+
function Eo({ padding: e = 24, className: t, children: i, ref: s, ...a }) {
|
|
172
172
|
const r = [le.panel, e === 16 ? le.padding16 : void 0, t].filter(Boolean).join(" ");
|
|
173
173
|
return /* @__PURE__ */ n("div", { ref: s, className: r, ...a, children: i });
|
|
174
174
|
}
|
|
@@ -178,7 +178,7 @@ const ct = "_list_1lh3q_8", lt = "_item_1lh3q_26", dt = "_term_1lh3q_44", ut = "
|
|
|
178
178
|
term: dt,
|
|
179
179
|
value: ut
|
|
180
180
|
};
|
|
181
|
-
function
|
|
181
|
+
function Mo({
|
|
182
182
|
layout: e = "stacked",
|
|
183
183
|
gap: t = 12,
|
|
184
184
|
className: i,
|
|
@@ -198,20 +198,20 @@ function Po({
|
|
|
198
198
|
}
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Po({ term: e, className: t, children: i, ref: s, ...a }) {
|
|
202
202
|
return /* @__PURE__ */ f("div", { ref: s, className: [Z.item, t].filter(Boolean).join(" "), ...a, children: [
|
|
203
203
|
/* @__PURE__ */ n("dt", { className: Z.term, children: e }),
|
|
204
204
|
/* @__PURE__ */ n("dd", { className: Z.value, children: i })
|
|
205
205
|
] });
|
|
206
206
|
}
|
|
207
|
-
const ht = "_navbar_1gyow_1", _t = "_inner_1gyow_12", ft = "_brand_1gyow_19", pt = "_links_1gyow_20",
|
|
207
|
+
const ht = "_navbar_1gyow_1", _t = "_inner_1gyow_12", ft = "_brand_1gyow_19", pt = "_links_1gyow_20", gt = "_actions_1gyow_50", F = {
|
|
208
208
|
navbar: ht,
|
|
209
209
|
inner: _t,
|
|
210
210
|
brand: ft,
|
|
211
211
|
links: pt,
|
|
212
|
-
actions:
|
|
212
|
+
actions: gt
|
|
213
213
|
};
|
|
214
|
-
function
|
|
214
|
+
function Ao({ brand: e, actions: t, children: i, className: s, ref: a, ...r }) {
|
|
215
215
|
const o = [F.navbar, s].filter(Boolean).join(" ");
|
|
216
216
|
return /* @__PURE__ */ n("header", { ref: a, className: o, ...r, children: /* @__PURE__ */ f("div", { className: `psi-container ${F.inner}`, children: [
|
|
217
217
|
e != null && /* @__PURE__ */ n("div", { className: F.brand, children: e }),
|
|
@@ -219,21 +219,21 @@ function Wo({ brand: e, actions: t, children: i, className: s, ref: a, ...r }) {
|
|
|
219
219
|
t != null && /* @__PURE__ */ n("div", { className: F.actions, children: t })
|
|
220
220
|
] }) });
|
|
221
221
|
}
|
|
222
|
-
const
|
|
223
|
-
frame:
|
|
222
|
+
const vt = "_frame_et4fc_1", bt = {
|
|
223
|
+
frame: vt
|
|
224
224
|
};
|
|
225
|
-
function
|
|
226
|
-
const o = [
|
|
225
|
+
function Wo({ ratio: e, className: t, style: i, children: s, ref: a, ...r }) {
|
|
226
|
+
const o = [bt.frame, t].filter(Boolean).join(" ");
|
|
227
227
|
return /* @__PURE__ */ n("div", { ref: a, className: o, style: { aspectRatio: String(e), ...i }, ...r, children: s });
|
|
228
228
|
}
|
|
229
|
-
const mt = "_field_lplye_1", yt = "_label_lplye_10", wt = "_marker_lplye_16",
|
|
229
|
+
const mt = "_field_lplye_1", yt = "_label_lplye_10", wt = "_marker_lplye_16", xt = "_message_lplye_20", kt = "_invalid_lplye_26", E = {
|
|
230
230
|
field: mt,
|
|
231
231
|
label: yt,
|
|
232
232
|
marker: wt,
|
|
233
|
-
message:
|
|
234
|
-
invalid:
|
|
233
|
+
message: xt,
|
|
234
|
+
invalid: kt
|
|
235
235
|
}, re = R(null);
|
|
236
|
-
function
|
|
236
|
+
function Do({
|
|
237
237
|
label: e,
|
|
238
238
|
description: t,
|
|
239
239
|
error: i,
|
|
@@ -245,10 +245,10 @@ function Ro({
|
|
|
245
245
|
ref: d,
|
|
246
246
|
...l
|
|
247
247
|
}) {
|
|
248
|
-
const u = H(), h = r ?? u, _ = !!i, m = _ ? i : t, y = m != null && m !== !1 ? `${h}-message` : void 0,
|
|
248
|
+
const u = H(), h = r ?? u, _ = !!i, m = _ ? i : t, y = m != null && m !== !1 ? `${h}-message` : void 0, T = [E.field, _ && E.invalid, o].filter(Boolean).join(" "), C = e != null ? /* @__PURE__ */ f(X, { children: [
|
|
249
249
|
e,
|
|
250
250
|
s && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: E.marker, children: " *" })
|
|
251
|
-
] }) : null,
|
|
251
|
+
] }) : null, v = /* @__PURE__ */ f(X, { children: [
|
|
252
252
|
C != null && (a ? /* @__PURE__ */ n("legend", { className: E.label, children: C }) : /* @__PURE__ */ n("label", { className: E.label, htmlFor: h, children: C })),
|
|
253
253
|
/* @__PURE__ */ n(re.Provider, { value: { id: h, describedBy: y, invalid: _, required: s }, children: c }),
|
|
254
254
|
y && /* @__PURE__ */ n("p", { id: y, className: E.message, "aria-live": "polite", children: m })
|
|
@@ -257,20 +257,20 @@ function Ro({
|
|
|
257
257
|
"fieldset",
|
|
258
258
|
{
|
|
259
259
|
ref: d,
|
|
260
|
-
className:
|
|
260
|
+
className: T,
|
|
261
261
|
"aria-describedby": y,
|
|
262
262
|
...l,
|
|
263
|
-
children:
|
|
263
|
+
children: v
|
|
264
264
|
}
|
|
265
|
-
) : /* @__PURE__ */ n("div", { ref: d, className:
|
|
265
|
+
) : /* @__PURE__ */ n("div", { ref: d, className: T, ...l, children: v });
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Ro({ size: e = 20, ...t }) {
|
|
268
268
|
return /* @__PURE__ */ f("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: [
|
|
269
269
|
/* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
270
270
|
/* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
271
271
|
] });
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Ho({ size: e = 20, ...t }) {
|
|
274
274
|
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" }) });
|
|
275
275
|
}
|
|
276
276
|
function fe({ size: e = 20, ...t }) {
|
|
@@ -282,62 +282,62 @@ function fe({ size: e = 20, ...t }) {
|
|
|
282
282
|
function Ct({ size: e = 20, ...t }) {
|
|
283
283
|
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" }) });
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function qo({ size: e = 20, ...t }) {
|
|
286
286
|
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" }) });
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Vo({ size: e = 20, ...t }) {
|
|
289
289
|
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" }) });
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Fo({ size: e = 20, ...t }) {
|
|
292
292
|
return /* @__PURE__ */ f("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: [
|
|
293
293
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
|
|
294
294
|
/* @__PURE__ */ n("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
295
295
|
] });
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Ko({ size: e = 20, ...t }) {
|
|
298
298
|
return /* @__PURE__ */ f("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: [
|
|
299
299
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" }),
|
|
300
300
|
/* @__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" })
|
|
301
301
|
] });
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Oo({ size: e = 20, ...t }) {
|
|
304
304
|
return /* @__PURE__ */ f("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: [
|
|
305
305
|
/* @__PURE__ */ n("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
|
|
306
306
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "7", r: "4" })
|
|
307
307
|
] });
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Uo({ size: e = 20, ...t }) {
|
|
310
310
|
return /* @__PURE__ */ f("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: [
|
|
311
311
|
/* @__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" }),
|
|
312
312
|
/* @__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" })
|
|
313
313
|
] });
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Yo({ size: e = 20, ...t }) {
|
|
316
316
|
return /* @__PURE__ */ f("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: [
|
|
317
317
|
/* @__PURE__ */ n("polyline", { points: "3 6 5 6 21 6" }),
|
|
318
318
|
/* @__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" })
|
|
319
319
|
] });
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Zo({ size: e = 20, ...t }) {
|
|
322
322
|
return /* @__PURE__ */ f("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: [
|
|
323
323
|
/* @__PURE__ */ n("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
324
324
|
/* @__PURE__ */ n("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
325
325
|
] });
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Go({ size: e = 20, ...t }) {
|
|
328
328
|
return /* @__PURE__ */ f("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: [
|
|
329
329
|
/* @__PURE__ */ n("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
330
330
|
/* @__PURE__ */ n("polyline", { points: "15 3 21 3 21 9" }),
|
|
331
331
|
/* @__PURE__ */ n("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
332
332
|
] });
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Xo({ size: e = 20, ...t }) {
|
|
335
335
|
return /* @__PURE__ */ f("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("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
337
337
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" })
|
|
338
338
|
] });
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function Jo({ size: e = 20, ...t }) {
|
|
341
341
|
return /* @__PURE__ */ f("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: [
|
|
342
342
|
/* @__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" }),
|
|
343
343
|
/* @__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" }),
|
|
@@ -345,7 +345,7 @@ function Qo({ size: e = 20, ...t }) {
|
|
|
345
345
|
/* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
346
346
|
] });
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Qo({ size: e = 20, ...t }) {
|
|
349
349
|
return /* @__PURE__ */ f("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: [
|
|
350
350
|
/* @__PURE__ */ n("line", { x1: "12", y1: "2", x2: "12", y2: "6" }),
|
|
351
351
|
/* @__PURE__ */ n("line", { x1: "12", y1: "18", x2: "12", y2: "22" }),
|
|
@@ -357,28 +357,28 @@ function er({ size: e = 20, ...t }) {
|
|
|
357
357
|
/* @__PURE__ */ n("line", { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" })
|
|
358
358
|
] });
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function er({ size: e = 20, ...t }) {
|
|
361
361
|
return /* @__PURE__ */ f("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: [
|
|
362
362
|
/* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
363
363
|
/* @__PURE__ */ n("polyline", { points: "19 12 12 19 5 12" })
|
|
364
364
|
] });
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function tr({ size: e = 20, ...t }) {
|
|
367
367
|
return /* @__PURE__ */ f("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: [
|
|
368
368
|
/* @__PURE__ */ n("line", { x1: "7", y1: "17", x2: "17", y2: "7" }),
|
|
369
369
|
/* @__PURE__ */ n("polyline", { points: "7 7 17 7 17 17" })
|
|
370
370
|
] });
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function nr({ size: e = 20, ...t }) {
|
|
373
373
|
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" }) });
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function or({ size: e = 20, ...t }) {
|
|
376
376
|
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" }) });
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function rr({ size: e = 20, ...t }) {
|
|
379
379
|
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" }) });
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function ir({ size: e = 20, ...t }) {
|
|
382
382
|
return /* @__PURE__ */ f("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: [
|
|
383
383
|
/* @__PURE__ */ n("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
|
|
384
384
|
/* @__PURE__ */ n("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
|
|
@@ -406,19 +406,19 @@ function Nt({ size: e = 20, ...t }) {
|
|
|
406
406
|
/* @__PURE__ */ n("line", { x1: "12", y1: "16", x2: "12", y2: "16" })
|
|
407
407
|
] });
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function sr({ size: e = 20, ...t }) {
|
|
410
410
|
return /* @__PURE__ */ f("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: [
|
|
411
411
|
/* @__PURE__ */ n("circle", { cx: "5", cy: "12", r: "1.5", fill: "currentColor", stroke: "none" }),
|
|
412
412
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "1.5", fill: "currentColor", stroke: "none" }),
|
|
413
413
|
/* @__PURE__ */ n("circle", { cx: "19", cy: "12", r: "1.5", fill: "currentColor", stroke: "none" })
|
|
414
414
|
] });
|
|
415
415
|
}
|
|
416
|
-
const Lt = "_dialog_h5f0e_2", St = "_center_h5f0e_32",
|
|
416
|
+
const Lt = "_dialog_h5f0e_2", St = "_center_h5f0e_32", zt = "_inlineStart_h5f0e_40", Tt = "_inlineEnd_h5f0e_41", jt = "_w400_h5f0e_90", It = "_w560_h5f0e_91", Et = "_w720_h5f0e_92", Mt = "_panel_h5f0e_94", Pt = "_header_h5f0e_114", At = "_title_h5f0e_121", Wt = "_footer_h5f0e_127", N = {
|
|
417
417
|
dialog: Lt,
|
|
418
418
|
center: St,
|
|
419
|
-
inlineStart:
|
|
420
|
-
inlineEnd:
|
|
421
|
-
w400:
|
|
419
|
+
inlineStart: zt,
|
|
420
|
+
inlineEnd: Tt,
|
|
421
|
+
w400: jt,
|
|
422
422
|
w560: It,
|
|
423
423
|
w720: Et,
|
|
424
424
|
panel: Mt,
|
|
@@ -426,15 +426,15 @@ const Lt = "_dialog_h5f0e_2", St = "_center_h5f0e_32", jt = "_inlineStart_h5f0e_
|
|
|
426
426
|
title: At,
|
|
427
427
|
footer: Wt
|
|
428
428
|
}, Dt = {
|
|
429
|
-
400:
|
|
430
|
-
560:
|
|
431
|
-
720:
|
|
429
|
+
400: N.w400,
|
|
430
|
+
560: N.w560,
|
|
431
|
+
720: N.w720
|
|
432
432
|
}, Rt = {
|
|
433
|
-
center:
|
|
434
|
-
"inline-start":
|
|
435
|
-
"inline-end":
|
|
433
|
+
center: N.center,
|
|
434
|
+
"inline-start": N.inlineStart,
|
|
435
|
+
"inline-end": N.inlineEnd
|
|
436
436
|
};
|
|
437
|
-
function
|
|
437
|
+
function ar({
|
|
438
438
|
open: e,
|
|
439
439
|
onClose: t,
|
|
440
440
|
title: i,
|
|
@@ -447,24 +447,24 @@ function cr({
|
|
|
447
447
|
ref: l,
|
|
448
448
|
...u
|
|
449
449
|
}) {
|
|
450
|
-
const h =
|
|
451
|
-
h.current =
|
|
450
|
+
const h = x(null), _ = H(), m = (v) => {
|
|
451
|
+
h.current = v, typeof l == "function" ? l(v) : l && (l.current = v);
|
|
452
452
|
};
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
}, [e]),
|
|
453
|
+
$(() => {
|
|
454
|
+
const v = h.current;
|
|
455
|
+
v && (e && !v.open ? v.showModal() : !e && v.open && v.close());
|
|
456
|
+
}, [e]), $(() => {
|
|
457
457
|
if (!e) return;
|
|
458
|
-
const
|
|
458
|
+
const v = document.body.style.overflow;
|
|
459
459
|
return document.body.style.overflow = "hidden", () => {
|
|
460
|
-
document.body.style.overflow =
|
|
460
|
+
document.body.style.overflow = v;
|
|
461
461
|
};
|
|
462
462
|
}, [e]);
|
|
463
|
-
const y = (
|
|
464
|
-
|
|
465
|
-
},
|
|
466
|
-
o &&
|
|
467
|
-
}, C = [
|
|
463
|
+
const y = (v) => {
|
|
464
|
+
v.preventDefault(), o && t("esc");
|
|
465
|
+
}, T = (v) => {
|
|
466
|
+
o && v.target === h.current && t("backdrop");
|
|
467
|
+
}, C = [N.dialog, Dt[a], Rt[r], c].filter(Boolean).join(" ");
|
|
468
468
|
return /* @__PURE__ */ n(
|
|
469
469
|
"dialog",
|
|
470
470
|
{
|
|
@@ -473,11 +473,11 @@ function cr({
|
|
|
473
473
|
"data-placement": r,
|
|
474
474
|
"aria-labelledby": i != null ? _ : void 0,
|
|
475
475
|
onCancel: y,
|
|
476
|
-
onClick:
|
|
476
|
+
onClick: T,
|
|
477
477
|
...u,
|
|
478
|
-
children: /* @__PURE__ */ f("div", { className:
|
|
479
|
-
(i != null || o) && /* @__PURE__ */ f("div", { className:
|
|
480
|
-
i != null && /* @__PURE__ */ n("h2", { id: _, className:
|
|
478
|
+
children: /* @__PURE__ */ f("div", { className: N.panel, children: [
|
|
479
|
+
(i != null || o) && /* @__PURE__ */ f("div", { className: N.header, children: [
|
|
480
|
+
i != null && /* @__PURE__ */ n("h2", { id: _, className: N.title, children: i }),
|
|
481
481
|
o && /* @__PURE__ */ n(
|
|
482
482
|
J,
|
|
483
483
|
{
|
|
@@ -490,7 +490,7 @@ function cr({
|
|
|
490
490
|
)
|
|
491
491
|
] }),
|
|
492
492
|
d,
|
|
493
|
-
s != null && /* @__PURE__ */ n("div", { className:
|
|
493
|
+
s != null && /* @__PURE__ */ n("div", { className: N.footer, children: s })
|
|
494
494
|
] })
|
|
495
495
|
}
|
|
496
496
|
);
|
|
@@ -508,7 +508,7 @@ const Ht = "_input_hpei8_3", qt = "_size24_hpei8_37", Vt = "_size32_hpei8_43", F
|
|
|
508
508
|
40: A.size40,
|
|
509
509
|
48: A.size48
|
|
510
510
|
};
|
|
511
|
-
function
|
|
511
|
+
function cr({ size: e = 32, error: t = !1, type: i = "text", className: s, ref: a, ...r }) {
|
|
512
512
|
const o = S(re), c = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [A.input, Ut[e], c && A.error, s].filter(Boolean).join(" ");
|
|
513
513
|
return /* @__PURE__ */ n(
|
|
514
514
|
"input",
|
|
@@ -537,7 +537,7 @@ const Yt = "_select_4x9ck_3", Zt = "_size24_4x9ck_37", Gt = "_size32_4x9ck_45",
|
|
|
537
537
|
40: W.size40,
|
|
538
538
|
48: W.size48
|
|
539
539
|
};
|
|
540
|
-
function
|
|
540
|
+
function lr({
|
|
541
541
|
size: e = 32,
|
|
542
542
|
error: t = !1,
|
|
543
543
|
className: i,
|
|
@@ -565,11 +565,11 @@ function dr({
|
|
|
565
565
|
}
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
|
-
const tn = "
|
|
568
|
+
const tn = "_label_f9su6_3", nn = "_disabled_f9su6_13", on = "_indicator_f9su6_26", rn = "_input_f9su6_42", sn = "_text_f9su6_67", K = {
|
|
569
569
|
label: tn,
|
|
570
570
|
disabled: nn,
|
|
571
|
-
|
|
572
|
-
|
|
571
|
+
indicator: on,
|
|
572
|
+
input: rn,
|
|
573
573
|
text: sn
|
|
574
574
|
};
|
|
575
575
|
function pe({
|
|
@@ -586,7 +586,7 @@ function pe({
|
|
|
586
586
|
{
|
|
587
587
|
ref: s,
|
|
588
588
|
type: "checkbox",
|
|
589
|
-
className: K.input
|
|
589
|
+
className: `psi-sr-only ${K.input}`,
|
|
590
590
|
disabled: i,
|
|
591
591
|
...a
|
|
592
592
|
}
|
|
@@ -595,15 +595,15 @@ function pe({
|
|
|
595
595
|
e && /* @__PURE__ */ n("span", { className: K.text, children: e })
|
|
596
596
|
] });
|
|
597
597
|
}
|
|
598
|
-
const an = "
|
|
598
|
+
const an = "_label_16roc_3", cn = "_disabled_16roc_13", ln = "_track_16roc_26", dn = "_input_16roc_38", un = "_thumb_16roc_50", hn = "_text_16roc_67", M = {
|
|
599
599
|
label: an,
|
|
600
600
|
disabled: cn,
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
track: ln,
|
|
602
|
+
input: dn,
|
|
603
603
|
thumb: un,
|
|
604
604
|
text: hn
|
|
605
605
|
};
|
|
606
|
-
function
|
|
606
|
+
function dr({
|
|
607
607
|
children: e,
|
|
608
608
|
className: t,
|
|
609
609
|
disabled: i,
|
|
@@ -618,7 +618,7 @@ function ur({
|
|
|
618
618
|
ref: s,
|
|
619
619
|
type: "checkbox",
|
|
620
620
|
role: "switch",
|
|
621
|
-
className: M.input
|
|
621
|
+
className: `psi-sr-only ${M.input}`,
|
|
622
622
|
disabled: i,
|
|
623
623
|
...a
|
|
624
624
|
}
|
|
@@ -627,18 +627,18 @@ function ur({
|
|
|
627
627
|
e && /* @__PURE__ */ n("span", { className: M.text, children: e })
|
|
628
628
|
] });
|
|
629
629
|
}
|
|
630
|
-
const _n = "_tag_3oysa_3", fn = "_dismiss_3oysa_17", pn = "_neutral_3oysa_43",
|
|
630
|
+
const _n = "_tag_3oysa_3", fn = "_dismiss_3oysa_17", pn = "_neutral_3oysa_43", gn = "_accent_3oysa_48", vn = "_success_3oysa_53", bn = "_warning_3oysa_58", mn = "_danger_3oysa_63", yn = "_neutralSubtle_3oysa_70", wn = "_accentSubtle_3oysa_75", xn = "_successSubtle_3oysa_80", kn = "_warningSubtle_3oysa_85", Cn = "_dangerSubtle_3oysa_90", B = {
|
|
631
631
|
tag: _n,
|
|
632
632
|
dismiss: fn,
|
|
633
633
|
neutral: pn,
|
|
634
|
-
accent:
|
|
635
|
-
success:
|
|
636
|
-
warning:
|
|
634
|
+
accent: gn,
|
|
635
|
+
success: vn,
|
|
636
|
+
warning: bn,
|
|
637
637
|
danger: mn,
|
|
638
638
|
neutralSubtle: yn,
|
|
639
639
|
accentSubtle: wn,
|
|
640
|
-
successSubtle:
|
|
641
|
-
warningSubtle:
|
|
640
|
+
successSubtle: xn,
|
|
641
|
+
warningSubtle: kn,
|
|
642
642
|
dangerSubtle: Cn
|
|
643
643
|
}, Bn = {
|
|
644
644
|
neutral: B.neutral,
|
|
@@ -653,7 +653,7 @@ const _n = "_tag_3oysa_3", fn = "_dismiss_3oysa_17", pn = "_neutral_3oysa_43", v
|
|
|
653
653
|
warning: B.warningSubtle,
|
|
654
654
|
danger: B.dangerSubtle
|
|
655
655
|
};
|
|
656
|
-
function
|
|
656
|
+
function ur({
|
|
657
657
|
variant: e = "neutral",
|
|
658
658
|
subtle: t = !1,
|
|
659
659
|
onDismiss: i,
|
|
@@ -694,28 +694,28 @@ function hr({
|
|
|
694
694
|
)
|
|
695
695
|
] });
|
|
696
696
|
}
|
|
697
|
-
const Nn = "_wrapper_1eu6z_3", Ln = "_tooltip_1eu6z_10", Sn = "_top_1eu6z_24",
|
|
697
|
+
const Nn = "_wrapper_1eu6z_3", Ln = "_tooltip_1eu6z_10", Sn = "_top_1eu6z_24", zn = "_bottom_1eu6z_31", Tn = "_left_1eu6z_38", jn = "_right_1eu6z_45", D = {
|
|
698
698
|
wrapper: Nn,
|
|
699
699
|
tooltip: Ln,
|
|
700
700
|
top: Sn,
|
|
701
|
-
bottom:
|
|
702
|
-
left:
|
|
703
|
-
right:
|
|
701
|
+
bottom: zn,
|
|
702
|
+
left: Tn,
|
|
703
|
+
right: jn
|
|
704
704
|
}, In = {
|
|
705
705
|
top: D.top,
|
|
706
706
|
bottom: D.bottom,
|
|
707
707
|
left: D.left,
|
|
708
708
|
right: D.right
|
|
709
709
|
}, En = 150;
|
|
710
|
-
function
|
|
710
|
+
function hr({
|
|
711
711
|
content: e,
|
|
712
712
|
children: t,
|
|
713
713
|
placement: i = "top"
|
|
714
714
|
}) {
|
|
715
|
-
const [s, a] = _e(!1), r = H(), o =
|
|
715
|
+
const [s, a] = _e(!1), r = H(), o = x(void 0), c = b(() => {
|
|
716
716
|
o.current !== void 0 && (window.clearTimeout(o.current), o.current = void 0);
|
|
717
|
-
}, []), d =
|
|
718
|
-
|
|
717
|
+
}, []), d = b(() => a(!0), []), l = b(() => a(!1), []);
|
|
718
|
+
$(() => c, [c]), $(() => {
|
|
719
719
|
if (!s) return;
|
|
720
720
|
const h = (_) => {
|
|
721
721
|
_.key === "Escape" && l();
|
|
@@ -758,13 +758,13 @@ function _r({
|
|
|
758
758
|
)
|
|
759
759
|
] });
|
|
760
760
|
}
|
|
761
|
-
const Mn = "
|
|
761
|
+
const Mn = "_toolbar_16192_1", Pn = "_gap8_16192_7", An = "_gap12_16192_8", Wn = "_gap16_16192_9", G = {
|
|
762
762
|
toolbar: Mn,
|
|
763
763
|
gap8: Pn,
|
|
764
764
|
gap12: An,
|
|
765
765
|
gap16: Wn
|
|
766
766
|
}, Dn = { 8: G.gap8, 12: G.gap12, 16: G.gap16 };
|
|
767
|
-
function
|
|
767
|
+
function _r({ gap: e = 8, className: t, children: i, ref: s, ...a }) {
|
|
768
768
|
const r = [G.toolbar, Dn[e], t].filter(Boolean).join(" ");
|
|
769
769
|
return /* @__PURE__ */ n("div", { ref: s, role: a["aria-label"] != null ? "group" : void 0, className: r, ...a, children: i });
|
|
770
770
|
}
|
|
@@ -775,12 +775,12 @@ const Rn = "_trigger_vpa0u_4", Hn = "_menu_vpa0u_16", qn = "_item_vpa0u_37", Vn
|
|
|
775
775
|
separator: Vn
|
|
776
776
|
}, Fn = 500;
|
|
777
777
|
function Kn({ popoverRef: e, triggerRef: t, open: i, onEsc: s }) {
|
|
778
|
-
const a =
|
|
778
|
+
const a = x(""), r = x(0), o = b(() => {
|
|
779
779
|
const l = e.current;
|
|
780
780
|
return l ? Array.from(
|
|
781
781
|
l.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
|
|
782
782
|
) : [];
|
|
783
|
-
}, [e]), c =
|
|
783
|
+
}, [e]), c = b(
|
|
784
784
|
(l) => {
|
|
785
785
|
if (l) {
|
|
786
786
|
for (const u of o()) u.tabIndex = u === l ? 0 : -1;
|
|
@@ -788,19 +788,19 @@ function Kn({ popoverRef: e, triggerRef: t, open: i, onEsc: s }) {
|
|
|
788
788
|
}
|
|
789
789
|
},
|
|
790
790
|
[o]
|
|
791
|
-
), d =
|
|
791
|
+
), d = b(() => {
|
|
792
792
|
var u;
|
|
793
793
|
const l = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
|
|
794
794
|
l == null || l.focus();
|
|
795
795
|
}, [t]);
|
|
796
|
-
return
|
|
796
|
+
return $(() => {
|
|
797
797
|
if (!i) return;
|
|
798
798
|
const l = o();
|
|
799
799
|
return c(l[0]), () => {
|
|
800
800
|
var u;
|
|
801
801
|
(u = e.current) != null && u.contains(document.activeElement) && d();
|
|
802
802
|
};
|
|
803
|
-
}, [i, e, o, c, d]),
|
|
803
|
+
}, [i, e, o, c, d]), b(
|
|
804
804
|
(l) => {
|
|
805
805
|
if (l.key === "Escape") {
|
|
806
806
|
l.preventDefault(), s();
|
|
@@ -838,10 +838,10 @@ function On() {
|
|
|
838
838
|
return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
|
|
839
839
|
}
|
|
840
840
|
function Un({ popoverRef: e, triggerRef: t, open: i, placement: s, anchorName: a }) {
|
|
841
|
-
|
|
841
|
+
$(() => {
|
|
842
842
|
const r = t.current, o = e.current;
|
|
843
843
|
!r || !o || (r.style.setProperty("anchor-name", a), o.style.setProperty("position-anchor", a));
|
|
844
|
-
}, [e, t, a]),
|
|
844
|
+
}, [e, t, a]), $(() => {
|
|
845
845
|
if (!i || On()) return;
|
|
846
846
|
const r = t.current, o = e.current;
|
|
847
847
|
if (!r || !o) return;
|
|
@@ -854,12 +854,12 @@ function Un({ popoverRef: e, triggerRef: t, open: i, placement: s, anchorName: a
|
|
|
854
854
|
};
|
|
855
855
|
}, [i, s, e, t]);
|
|
856
856
|
}
|
|
857
|
-
const
|
|
857
|
+
const ge = R({ close: () => {
|
|
858
858
|
} });
|
|
859
859
|
function de(e) {
|
|
860
860
|
return e.hasAttribute("data-open") || e.matches(":popover-open");
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function fr({
|
|
863
863
|
open: e,
|
|
864
864
|
onClose: t,
|
|
865
865
|
trigger: i,
|
|
@@ -869,18 +869,18 @@ function pr({
|
|
|
869
869
|
ref: o,
|
|
870
870
|
...c
|
|
871
871
|
}) {
|
|
872
|
-
const d =
|
|
872
|
+
const d = x(null), l = x(null), u = x(!1), h = `--psi-menu-${H().replace(/:/g, "")}`;
|
|
873
873
|
Un({ popoverRef: d, triggerRef: l, open: e, placement: s, anchorName: h });
|
|
874
874
|
const _ = (p) => {
|
|
875
875
|
d.current = p, typeof o == "function" ? o(p) : o && (o.current = p);
|
|
876
876
|
};
|
|
877
|
-
|
|
877
|
+
$(() => {
|
|
878
878
|
const p = d.current;
|
|
879
879
|
if (!p) return;
|
|
880
|
-
const
|
|
881
|
-
e && !
|
|
880
|
+
const g = de(p);
|
|
881
|
+
e && !g ? p.showPopover() : !e && g && (u.current = !0, p.hidePopover());
|
|
882
882
|
}, [e]);
|
|
883
|
-
const m =
|
|
883
|
+
const m = b(() => {
|
|
884
884
|
const p = d.current;
|
|
885
885
|
if (p) {
|
|
886
886
|
if (u.current) {
|
|
@@ -894,20 +894,20 @@ function pr({
|
|
|
894
894
|
triggerRef: l,
|
|
895
895
|
open: e,
|
|
896
896
|
onEsc: () => t("esc")
|
|
897
|
-
}),
|
|
897
|
+
}), T = b(
|
|
898
898
|
(p) => {
|
|
899
899
|
t(p);
|
|
900
900
|
},
|
|
901
901
|
[t]
|
|
902
902
|
), C = U(i);
|
|
903
|
-
|
|
903
|
+
$(() => {
|
|
904
904
|
C || console.warn(
|
|
905
905
|
"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."
|
|
906
906
|
);
|
|
907
907
|
}, [C]);
|
|
908
|
-
const
|
|
908
|
+
const v = C ? ne(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
|
|
909
909
|
return /* @__PURE__ */ f(X, { children: [
|
|
910
|
-
/* @__PURE__ */ n("div", { ref: l, className: Q.trigger, "data-psi-menu-trigger": !0, children:
|
|
910
|
+
/* @__PURE__ */ n("div", { ref: l, className: Q.trigger, "data-psi-menu-trigger": !0, children: v }),
|
|
911
911
|
/* @__PURE__ */ n(
|
|
912
912
|
"div",
|
|
913
913
|
{
|
|
@@ -920,13 +920,13 @@ function pr({
|
|
|
920
920
|
className: [Q.menu, r].filter(Boolean).join(" "),
|
|
921
921
|
onToggle: m,
|
|
922
922
|
onKeyDown: y,
|
|
923
|
-
children: /* @__PURE__ */ n(
|
|
923
|
+
children: /* @__PURE__ */ n(ge.Provider, { value: { close: T }, children: a })
|
|
924
924
|
}
|
|
925
925
|
)
|
|
926
926
|
] });
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
const { close: a } = S(
|
|
928
|
+
function pr({ children: e, onSelect: t, variant: i = "neutral", disabled: s = !1 }) {
|
|
929
|
+
const { close: a } = S(ge);
|
|
930
930
|
return /* @__PURE__ */ n(
|
|
931
931
|
"button",
|
|
932
932
|
{
|
|
@@ -944,10 +944,10 @@ function vr({ children: e, onSelect: t, variant: i = "neutral", disabled: s = !1
|
|
|
944
944
|
}
|
|
945
945
|
);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function gr() {
|
|
948
948
|
return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: Q.separator });
|
|
949
949
|
}
|
|
950
|
-
const Yn = "_table_146hc_3", Zn = "_headerCell_146hc_13", Gn = "_cell_146hc_19", Xn = "_sortButton_146hc_30", Jn = "_sortIndicator_146hc_47", Qn = "_selectCell_146hc_79", eo = "_body_146hc_86", to = "_row_146hc_89", no = "_sticky_146hc_111",
|
|
950
|
+
const Yn = "_table_146hc_3", Zn = "_headerCell_146hc_13", Gn = "_cell_146hc_19", Xn = "_sortButton_146hc_30", Jn = "_sortIndicator_146hc_47", Qn = "_selectCell_146hc_79", eo = "_body_146hc_86", to = "_row_146hc_89", no = "_sticky_146hc_111", k = {
|
|
951
951
|
table: Yn,
|
|
952
952
|
headerCell: Zn,
|
|
953
953
|
cell: Gn,
|
|
@@ -957,15 +957,15 @@ const Yn = "_table_146hc_3", Zn = "_headerCell_146hc_13", Gn = "_cell_146hc_19",
|
|
|
957
957
|
body: eo,
|
|
958
958
|
row: to,
|
|
959
959
|
sticky: no
|
|
960
|
-
},
|
|
960
|
+
}, ve = /* @__PURE__ */ new Set(), q = R({
|
|
961
961
|
size: 40,
|
|
962
962
|
sortable: !1,
|
|
963
963
|
sort: null,
|
|
964
964
|
selectable: !1,
|
|
965
|
-
selected:
|
|
966
|
-
}),
|
|
965
|
+
selected: ve
|
|
966
|
+
}), be = R([]);
|
|
967
967
|
function oo({ children: e, className: t }) {
|
|
968
|
-
return /* @__PURE__ */ n("tbody", { className: [
|
|
968
|
+
return /* @__PURE__ */ n("tbody", { className: [k.body, t].filter(Boolean).join(" "), children: e });
|
|
969
969
|
}
|
|
970
970
|
function ro(e) {
|
|
971
971
|
const t = [];
|
|
@@ -991,41 +991,41 @@ function ro(e) {
|
|
|
991
991
|
}
|
|
992
992
|
}), { ids: t, sawBody: i, hasRowWithoutId: s };
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function vr({
|
|
995
995
|
size: e = 40,
|
|
996
996
|
stickyHeader: t,
|
|
997
997
|
sortable: i = !1,
|
|
998
998
|
sort: s = null,
|
|
999
999
|
onSortChange: a,
|
|
1000
1000
|
selectable: r = !1,
|
|
1001
|
-
selected: o =
|
|
1001
|
+
selected: o = ve,
|
|
1002
1002
|
onSelectionChange: c,
|
|
1003
1003
|
children: d,
|
|
1004
1004
|
className: l,
|
|
1005
1005
|
ref: u
|
|
1006
1006
|
}) {
|
|
1007
|
-
const h = [
|
|
1008
|
-
return process.env.NODE_ENV !== "production" && (i && !a && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !c && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !m && 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 && y && 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(q.Provider, { value: { size: e, sortable: i, sort: s, onSortChange: a, selectable: r, selected: o, onSelectionChange: c }, children: /* @__PURE__ */ n(
|
|
1007
|
+
const h = [k.table, t && k.sticky, l].filter(Boolean).join(" "), { ids: _, sawBody: m, hasRowWithoutId: y } = oe(() => ro(d), [d]);
|
|
1008
|
+
return process.env.NODE_ENV !== "production" && (i && !a && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !c && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !m && 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 && y && 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(q.Provider, { value: { size: e, sortable: i, sort: s, onSortChange: a, selectable: r, selected: o, onSelectionChange: c }, children: /* @__PURE__ */ n(be.Provider, { value: _, children: /* @__PURE__ */ n("table", { ref: u, className: h, "data-size": e, children: d }) }) });
|
|
1009
1009
|
}
|
|
1010
1010
|
function io({ rowId: e, label: t }) {
|
|
1011
1011
|
const { selected: i, onSelectionChange: s } = S(q), a = () => {
|
|
1012
1012
|
const r = new Set(i);
|
|
1013
1013
|
r.has(e) ? r.delete(e) : r.add(e), s == null || s(r);
|
|
1014
1014
|
};
|
|
1015
|
-
return /* @__PURE__ */ n("td", { className: `${
|
|
1015
|
+
return /* @__PURE__ */ n("td", { className: `${k.cell} ${k.selectCell}`, children: /* @__PURE__ */ n(pe, { "aria-label": t, checked: i.has(e), onChange: a }) });
|
|
1016
1016
|
}
|
|
1017
1017
|
function so() {
|
|
1018
|
-
const { selected: e, onSelectionChange: t } = S(q), i = S(
|
|
1019
|
-
|
|
1018
|
+
const { selected: e, onSelectionChange: t } = S(q), i = S(be), s = x(null), a = i.length > 0 && i.every((c) => e.has(c)), r = i.some((c) => e.has(c));
|
|
1019
|
+
$(() => {
|
|
1020
1020
|
s.current && (s.current.indeterminate = r && !a);
|
|
1021
1021
|
}, [r, a]);
|
|
1022
1022
|
const o = () => {
|
|
1023
1023
|
const c = new Set(e);
|
|
1024
1024
|
a ? i.forEach((d) => c.delete(d)) : i.forEach((d) => c.add(d)), t == null || t(c);
|
|
1025
1025
|
};
|
|
1026
|
-
return /* @__PURE__ */ n("th", { scope: "col", className: `${
|
|
1026
|
+
return /* @__PURE__ */ n("th", { scope: "col", className: `${k.headerCell} ${k.selectCell}`, children: /* @__PURE__ */ n(pe, { ref: s, "aria-label": "Select all rows", checked: a, onChange: o }) });
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function br({ children: e, className: t }) {
|
|
1029
1029
|
const { selectable: i } = S(q);
|
|
1030
1030
|
let s = !1;
|
|
1031
1031
|
const a = i ? P.map(e, (r) => {
|
|
@@ -1041,14 +1041,14 @@ function mr({ children: e, className: t }) {
|
|
|
1041
1041
|
] })
|
|
1042
1042
|
);
|
|
1043
1043
|
}) : e;
|
|
1044
|
-
return /* @__PURE__ */ n("thead", { className: [
|
|
1044
|
+
return /* @__PURE__ */ n("thead", { className: [k.head, t].filter(Boolean).join(" "), children: a });
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1046
|
+
function mr({ rowId: e, selectLabel: t, children: i, className: s }) {
|
|
1047
1047
|
const { selectable: a, selected: r } = S(q), o = e !== void 0 && r.has(e);
|
|
1048
1048
|
return /* @__PURE__ */ f(
|
|
1049
1049
|
"tr",
|
|
1050
1050
|
{
|
|
1051
|
-
className: [
|
|
1051
|
+
className: [k.row, s].filter(Boolean).join(" "),
|
|
1052
1052
|
"data-row-id": e,
|
|
1053
1053
|
"data-selected": o || void 0,
|
|
1054
1054
|
children: [
|
|
@@ -1058,7 +1058,7 @@ function yr({ rowId: e, selectLabel: t, children: i, className: s }) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
);
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function yr({ sortKey: e, numeric: t, children: i, className: s }) {
|
|
1062
1062
|
const { sortable: a, sort: r, onSortChange: o } = S(q), c = a && e !== void 0, d = c && (r == null ? void 0 : r.key) === e, l = c ? d ? r.direction === "asc" ? "ascending" : "descending" : "none" : void 0, u = () => {
|
|
1063
1063
|
if (!e) return;
|
|
1064
1064
|
const h = d && r.direction === "asc" ? "desc" : "asc";
|
|
@@ -1068,18 +1068,18 @@ function wr({ sortKey: e, numeric: t, children: i, className: s }) {
|
|
|
1068
1068
|
"th",
|
|
1069
1069
|
{
|
|
1070
1070
|
scope: "col",
|
|
1071
|
-
className: [
|
|
1071
|
+
className: [k.headerCell, s].filter(Boolean).join(" "),
|
|
1072
1072
|
"data-numeric": t || void 0,
|
|
1073
1073
|
"aria-sort": l,
|
|
1074
|
-
children: c ? /* @__PURE__ */ f("button", { type: "button", className:
|
|
1074
|
+
children: c ? /* @__PURE__ */ f("button", { type: "button", className: k.sortButton, onClick: u, children: [
|
|
1075
1075
|
i,
|
|
1076
|
-
/* @__PURE__ */ n("span", { className:
|
|
1076
|
+
/* @__PURE__ */ n("span", { className: k.sortIndicator, "aria-hidden": "true", children: d ? r.direction === "asc" ? "↑" : "↓" : "" })
|
|
1077
1077
|
] }) : i
|
|
1078
1078
|
}
|
|
1079
1079
|
);
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return /* @__PURE__ */ n("td", { className: [
|
|
1081
|
+
function wr({ numeric: e, children: t, className: i }) {
|
|
1082
|
+
return /* @__PURE__ */ n("td", { className: [k.cell, i].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
|
|
1083
1083
|
}
|
|
1084
1084
|
const ao = "_nav_166vs_6", co = "_ellipsis_166vs_12", ue = {
|
|
1085
1085
|
nav: ao,
|
|
@@ -1154,19 +1154,18 @@ function xr({
|
|
|
1154
1154
|
)
|
|
1155
1155
|
] });
|
|
1156
1156
|
}
|
|
1157
|
-
const uo = "
|
|
1157
|
+
const uo = "_toast_1gxg8_10", ho = "_icon_1gxg8_39", _o = "_iconNeutral_1gxg8_44", fo = "_iconSuccess_1gxg8_45", po = "_iconWarning_1gxg8_46", go = "_iconDanger_1gxg8_47", vo = "_body_1gxg8_51", bo = "_action_1gxg8_55", mo = "_region_1gxg8_61", yo = "_live_1gxg8_91", L = {
|
|
1158
1158
|
toast: uo,
|
|
1159
1159
|
icon: ho,
|
|
1160
1160
|
iconNeutral: _o,
|
|
1161
1161
|
iconSuccess: fo,
|
|
1162
1162
|
iconWarning: po,
|
|
1163
|
-
iconDanger:
|
|
1164
|
-
body:
|
|
1165
|
-
action:
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
}, ko = {
|
|
1163
|
+
iconDanger: go,
|
|
1164
|
+
body: vo,
|
|
1165
|
+
action: bo,
|
|
1166
|
+
region: mo,
|
|
1167
|
+
live: yo
|
|
1168
|
+
}, wo = {
|
|
1170
1169
|
neutral: Bt,
|
|
1171
1170
|
success: Ct,
|
|
1172
1171
|
warning: $t,
|
|
@@ -1176,11 +1175,11 @@ const uo = "_toast_7toru_10", ho = "_icon_7toru_39", _o = "_iconNeutral_7toru_44
|
|
|
1176
1175
|
success: "Success:",
|
|
1177
1176
|
warning: "Warning:",
|
|
1178
1177
|
danger: "Error:"
|
|
1179
|
-
},
|
|
1180
|
-
neutral:
|
|
1181
|
-
success:
|
|
1182
|
-
warning:
|
|
1183
|
-
danger:
|
|
1178
|
+
}, ko = {
|
|
1179
|
+
neutral: L.iconNeutral,
|
|
1180
|
+
success: L.iconSuccess,
|
|
1181
|
+
warning: L.iconWarning,
|
|
1182
|
+
danger: L.iconDanger
|
|
1184
1183
|
};
|
|
1185
1184
|
function me({
|
|
1186
1185
|
variant: e = "neutral",
|
|
@@ -1190,14 +1189,14 @@ function me({
|
|
|
1190
1189
|
className: a,
|
|
1191
1190
|
ref: r
|
|
1192
1191
|
}) {
|
|
1193
|
-
const o =
|
|
1192
|
+
const o = wo[e], c = xo[e], d = [L.toast, a].filter(Boolean).join(" ");
|
|
1194
1193
|
return /* @__PURE__ */ f("div", { ref: r, className: d, "data-variant": e, "data-psi-toast": !0, children: [
|
|
1195
|
-
/* @__PURE__ */ n("span", { className: [
|
|
1196
|
-
/* @__PURE__ */ f("div", { className:
|
|
1197
|
-
c && /* @__PURE__ */ n("span", { className:
|
|
1194
|
+
/* @__PURE__ */ n("span", { className: [L.icon, ko[e]].join(" "), children: /* @__PURE__ */ n(o, { size: 20, "aria-hidden": "true" }) }),
|
|
1195
|
+
/* @__PURE__ */ f("div", { className: L.body, children: [
|
|
1196
|
+
c && /* @__PURE__ */ n("span", { className: "psi-sr-only", children: c }),
|
|
1198
1197
|
t
|
|
1199
1198
|
] }),
|
|
1200
|
-
i != null && /* @__PURE__ */ n("div", { className:
|
|
1199
|
+
i != null && /* @__PURE__ */ n("div", { className: L.action, children: i }),
|
|
1201
1200
|
s && /* @__PURE__ */ n(
|
|
1202
1201
|
J,
|
|
1203
1202
|
{
|
|
@@ -1210,23 +1209,23 @@ function me({
|
|
|
1210
1209
|
)
|
|
1211
1210
|
] });
|
|
1212
1211
|
}
|
|
1213
|
-
const
|
|
1212
|
+
const Co = /* @__PURE__ */ new Set(["warning", "danger"]);
|
|
1214
1213
|
function he(e) {
|
|
1215
1214
|
if (!U(e) || e.type !== me) return !1;
|
|
1216
1215
|
const { variant: t } = e.props;
|
|
1217
|
-
return
|
|
1216
|
+
return Co.has(t ?? "neutral");
|
|
1218
1217
|
}
|
|
1219
|
-
function
|
|
1218
|
+
function Bo({
|
|
1220
1219
|
placement: e = "bottom-end",
|
|
1221
1220
|
"aria-label": t = "Notifications",
|
|
1222
1221
|
children: i,
|
|
1223
1222
|
className: s,
|
|
1224
1223
|
ref: a
|
|
1225
1224
|
}) {
|
|
1226
|
-
const r =
|
|
1225
|
+
const r = x(null), o = (u) => {
|
|
1227
1226
|
r.current = u, typeof a == "function" ? a(u) : a && (a.current = u);
|
|
1228
1227
|
};
|
|
1229
|
-
|
|
1228
|
+
$(() => {
|
|
1230
1229
|
var h;
|
|
1231
1230
|
const u = r.current;
|
|
1232
1231
|
if (u)
|
|
@@ -1244,16 +1243,16 @@ function $o({
|
|
|
1244
1243
|
"aria-label": t,
|
|
1245
1244
|
"data-placement": e,
|
|
1246
1245
|
"data-psi-toast-region": !0,
|
|
1247
|
-
className: [
|
|
1246
|
+
className: [L.region, s].filter(Boolean).join(" "),
|
|
1248
1247
|
children: [
|
|
1249
|
-
/* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className:
|
|
1250
|
-
/* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className:
|
|
1248
|
+
/* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className: L.live, children: l }),
|
|
1249
|
+
/* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className: L.live, children: d })
|
|
1251
1250
|
]
|
|
1252
1251
|
}
|
|
1253
1252
|
);
|
|
1254
1253
|
}
|
|
1255
1254
|
const ye = R(null);
|
|
1256
|
-
function
|
|
1255
|
+
function kr() {
|
|
1257
1256
|
const e = S(ye);
|
|
1258
1257
|
if (!e)
|
|
1259
1258
|
throw new Error(
|
|
@@ -1261,27 +1260,27 @@ function Cr() {
|
|
|
1261
1260
|
);
|
|
1262
1261
|
return e;
|
|
1263
1262
|
}
|
|
1264
|
-
function
|
|
1263
|
+
function Cr({
|
|
1265
1264
|
limit: e = 3,
|
|
1266
1265
|
duration: t = 5e3,
|
|
1267
1266
|
actionDuration: i = 1e4,
|
|
1268
1267
|
placement: s = "bottom-end",
|
|
1269
1268
|
children: a
|
|
1270
1269
|
}) {
|
|
1271
|
-
const [r, o] = _e([]), c =
|
|
1272
|
-
const
|
|
1273
|
-
(
|
|
1274
|
-
}, []), _ =
|
|
1275
|
-
(p,
|
|
1276
|
-
const
|
|
1277
|
-
c.current.set(p,
|
|
1270
|
+
const [r, o] = _e([]), c = x(/* @__PURE__ */ new Map()), d = x(!1), l = x(0), u = H(), h = b((p) => {
|
|
1271
|
+
const g = c.current.get(p);
|
|
1272
|
+
(g == null ? void 0 : g.handle) !== void 0 && clearTimeout(g.handle), c.current.delete(p), o((j) => j.filter((V) => V.id !== p));
|
|
1273
|
+
}, []), _ = b(
|
|
1274
|
+
(p, g) => {
|
|
1275
|
+
const j = d.current ? { handle: void 0, remaining: g, startedAt: void 0 } : { handle: setTimeout(() => h(p), g), remaining: g, startedAt: Date.now() };
|
|
1276
|
+
c.current.set(p, j);
|
|
1278
1277
|
},
|
|
1279
1278
|
[h]
|
|
1280
|
-
), m =
|
|
1281
|
-
({ variant: p = "neutral", message:
|
|
1282
|
-
const V = `${u}-${l.current++}`, se =
|
|
1279
|
+
), m = b(
|
|
1280
|
+
({ variant: p = "neutral", message: g, action: j }) => {
|
|
1281
|
+
const V = `${u}-${l.current++}`, se = j != null ? i : t;
|
|
1283
1282
|
return o((Ce) => {
|
|
1284
|
-
const te = [...Ce, { id: V, variant: p, message:
|
|
1283
|
+
const te = [...Ce, { id: V, variant: p, message: g, action: j, duration: se }];
|
|
1285
1284
|
for (; te.length > e; ) {
|
|
1286
1285
|
const ae = te.shift(), Y = c.current.get(ae.id);
|
|
1287
1286
|
(Y == null ? void 0 : Y.handle) !== void 0 && clearTimeout(Y.handle), c.current.delete(ae.id);
|
|
@@ -1290,66 +1289,66 @@ function Br({
|
|
|
1290
1289
|
}), _(V, se), V;
|
|
1291
1290
|
},
|
|
1292
1291
|
[i, _, t, u, e]
|
|
1293
|
-
), y =
|
|
1292
|
+
), y = b(() => {
|
|
1294
1293
|
for (const p of c.current.values())
|
|
1295
1294
|
p.handle !== void 0 && clearTimeout(p.handle);
|
|
1296
1295
|
c.current.clear(), o([]);
|
|
1297
|
-
}, []),
|
|
1296
|
+
}, []), T = b(() => {
|
|
1298
1297
|
if (!d.current) {
|
|
1299
1298
|
d.current = !0;
|
|
1300
|
-
for (const [p,
|
|
1301
|
-
if (
|
|
1302
|
-
clearTimeout(
|
|
1303
|
-
const
|
|
1299
|
+
for (const [p, g] of c.current) {
|
|
1300
|
+
if (g.handle === void 0) continue;
|
|
1301
|
+
clearTimeout(g.handle);
|
|
1302
|
+
const j = g.startedAt === void 0 ? 0 : Date.now() - g.startedAt;
|
|
1304
1303
|
c.current.set(p, {
|
|
1305
1304
|
handle: void 0,
|
|
1306
|
-
remaining: Math.max(0,
|
|
1305
|
+
remaining: Math.max(0, g.remaining - j),
|
|
1307
1306
|
startedAt: void 0
|
|
1308
1307
|
});
|
|
1309
1308
|
}
|
|
1310
1309
|
}
|
|
1311
|
-
}, []), C =
|
|
1310
|
+
}, []), C = b(() => {
|
|
1312
1311
|
if (d.current) {
|
|
1313
1312
|
d.current = !1;
|
|
1314
|
-
for (const [p,
|
|
1315
|
-
|
|
1316
|
-
handle: setTimeout(() => h(p),
|
|
1317
|
-
remaining:
|
|
1313
|
+
for (const [p, g] of c.current)
|
|
1314
|
+
g.handle === void 0 && c.current.set(p, {
|
|
1315
|
+
handle: setTimeout(() => h(p), g.remaining),
|
|
1316
|
+
remaining: g.remaining,
|
|
1318
1317
|
startedAt: Date.now()
|
|
1319
1318
|
});
|
|
1320
1319
|
}
|
|
1321
1320
|
}, [h]);
|
|
1322
|
-
|
|
1321
|
+
$(() => {
|
|
1323
1322
|
const p = c.current;
|
|
1324
1323
|
return () => {
|
|
1325
|
-
for (const
|
|
1326
|
-
|
|
1324
|
+
for (const g of p.values())
|
|
1325
|
+
g.handle !== void 0 && clearTimeout(g.handle);
|
|
1327
1326
|
p.clear();
|
|
1328
1327
|
};
|
|
1329
1328
|
}, []);
|
|
1330
|
-
const
|
|
1329
|
+
const v = oe(
|
|
1331
1330
|
() => ({ show: m, dismiss: h, clear: y }),
|
|
1332
1331
|
[m, h, y]
|
|
1333
1332
|
);
|
|
1334
|
-
return /* @__PURE__ */ f(ye.Provider, { value:
|
|
1333
|
+
return /* @__PURE__ */ f(ye.Provider, { value: v, children: [
|
|
1335
1334
|
a,
|
|
1336
1335
|
/* @__PURE__ */ n(
|
|
1337
1336
|
"div",
|
|
1338
1337
|
{
|
|
1339
|
-
onPointerEnter:
|
|
1338
|
+
onPointerEnter: T,
|
|
1340
1339
|
onPointerLeave: C,
|
|
1341
|
-
onFocusCapture:
|
|
1340
|
+
onFocusCapture: T,
|
|
1342
1341
|
onBlurCapture: C,
|
|
1343
|
-
children: /* @__PURE__ */ n(
|
|
1342
|
+
children: /* @__PURE__ */ n(Bo, { placement: s, children: r.map((p) => /* @__PURE__ */ n(me, { variant: p.variant, action: p.action, onDismiss: () => h(p.id), children: p.message }, p.id)) })
|
|
1344
1343
|
}
|
|
1345
1344
|
)
|
|
1346
1345
|
] });
|
|
1347
1346
|
}
|
|
1348
|
-
const
|
|
1349
|
-
tabs:
|
|
1350
|
-
list:
|
|
1351
|
-
tab:
|
|
1352
|
-
panel:
|
|
1347
|
+
const $o = "_tabs_17vw6_8", No = "_list_17vw6_21", Lo = "_tab_17vw6_8", So = "_panel_17vw6_97", ee = {
|
|
1348
|
+
tabs: $o,
|
|
1349
|
+
list: No,
|
|
1350
|
+
tab: Lo,
|
|
1351
|
+
panel: So
|
|
1353
1352
|
}, we = R(null);
|
|
1354
1353
|
function ie(e) {
|
|
1355
1354
|
const t = S(we);
|
|
@@ -1359,7 +1358,7 @@ function ie(e) {
|
|
|
1359
1358
|
);
|
|
1360
1359
|
return t;
|
|
1361
1360
|
}
|
|
1362
|
-
function
|
|
1361
|
+
function Br({
|
|
1363
1362
|
value: e,
|
|
1364
1363
|
onValueChange: t,
|
|
1365
1364
|
orientation: i = "horizontal",
|
|
@@ -1381,19 +1380,19 @@ function $r({
|
|
|
1381
1380
|
}
|
|
1382
1381
|
) });
|
|
1383
1382
|
}
|
|
1384
|
-
function
|
|
1383
|
+
function xe(e, t) {
|
|
1385
1384
|
return `${e}tab-${t}`;
|
|
1386
1385
|
}
|
|
1387
|
-
function
|
|
1386
|
+
function ke(e, t) {
|
|
1388
1387
|
return `${e}panel-${t}`;
|
|
1389
1388
|
}
|
|
1390
1389
|
function zo({ listRef: e, orientation: t, onValueChange: i }) {
|
|
1391
|
-
const s =
|
|
1390
|
+
const s = b(() => {
|
|
1392
1391
|
const r = e.current;
|
|
1393
1392
|
return r ? Array.from(
|
|
1394
1393
|
r.querySelectorAll('[data-psi-tab]:not([aria-disabled="true"])')
|
|
1395
1394
|
) : [];
|
|
1396
|
-
}, [e]), a =
|
|
1395
|
+
}, [e]), a = b(
|
|
1397
1396
|
(r) => {
|
|
1398
1397
|
if (!r) return;
|
|
1399
1398
|
for (const c of s()) c.tabIndex = c === r ? 0 : -1;
|
|
@@ -1403,7 +1402,7 @@ function zo({ listRef: e, orientation: t, onValueChange: i }) {
|
|
|
1403
1402
|
},
|
|
1404
1403
|
[s, i]
|
|
1405
1404
|
);
|
|
1406
|
-
return
|
|
1405
|
+
return b(
|
|
1407
1406
|
(r) => {
|
|
1408
1407
|
const o = s();
|
|
1409
1408
|
if (o.length === 0) return;
|
|
@@ -1426,8 +1425,8 @@ function zo({ listRef: e, orientation: t, onValueChange: i }) {
|
|
|
1426
1425
|
[a, s, t]
|
|
1427
1426
|
);
|
|
1428
1427
|
}
|
|
1429
|
-
function
|
|
1430
|
-
const { orientation: a, onValueChange: r } = ie("TabList"), o =
|
|
1428
|
+
function $r({ "aria-label": e, children: t, className: i, ref: s }) {
|
|
1429
|
+
const { orientation: a, onValueChange: r } = ie("TabList"), o = x(null), c = (l) => {
|
|
1431
1430
|
o.current = l, typeof s == "function" ? s(l) : s && (s.current = l);
|
|
1432
1431
|
}, d = zo({ listRef: o, orientation: a, onValueChange: r });
|
|
1433
1432
|
return /* @__PURE__ */ n(
|
|
@@ -1443,7 +1442,7 @@ function Nr({ "aria-label": e, children: t, className: i, ref: s }) {
|
|
|
1443
1442
|
}
|
|
1444
1443
|
);
|
|
1445
1444
|
}
|
|
1446
|
-
function
|
|
1445
|
+
function Nr({ value: e, children: t, disabled: i = !1, className: s, ref: a }) {
|
|
1447
1446
|
const r = ie("Tab"), o = r.value === e;
|
|
1448
1447
|
return /* @__PURE__ */ n(
|
|
1449
1448
|
"button",
|
|
@@ -1451,11 +1450,11 @@ function Lr({ value: e, children: t, disabled: i = !1, className: s, ref: a }) {
|
|
|
1451
1450
|
ref: a,
|
|
1452
1451
|
type: "button",
|
|
1453
1452
|
role: "tab",
|
|
1454
|
-
id:
|
|
1453
|
+
id: xe(r.idPrefix, e),
|
|
1455
1454
|
"data-psi-tab": !0,
|
|
1456
1455
|
"data-value": e,
|
|
1457
1456
|
"aria-selected": o,
|
|
1458
|
-
"aria-controls":
|
|
1457
|
+
"aria-controls": ke(r.idPrefix, e),
|
|
1459
1458
|
"aria-disabled": i || void 0,
|
|
1460
1459
|
tabIndex: o ? 0 : -1,
|
|
1461
1460
|
className: [ee.tab, s].filter(Boolean).join(" "),
|
|
@@ -1466,15 +1465,15 @@ function Lr({ value: e, children: t, disabled: i = !1, className: s, ref: a }) {
|
|
|
1466
1465
|
}
|
|
1467
1466
|
);
|
|
1468
1467
|
}
|
|
1469
|
-
function
|
|
1468
|
+
function Lr({ value: e, children: t, className: i, ref: s }) {
|
|
1470
1469
|
const a = ie("TabPanel"), r = a.value === e;
|
|
1471
1470
|
return /* @__PURE__ */ n(
|
|
1472
1471
|
"div",
|
|
1473
1472
|
{
|
|
1474
1473
|
ref: s,
|
|
1475
1474
|
role: "tabpanel",
|
|
1476
|
-
id:
|
|
1477
|
-
"aria-labelledby":
|
|
1475
|
+
id: ke(a.idPrefix, e),
|
|
1476
|
+
"aria-labelledby": xe(a.idPrefix, e),
|
|
1478
1477
|
hidden: !r,
|
|
1479
1478
|
tabIndex: 0,
|
|
1480
1479
|
className: [ee.panel, i].filter(Boolean).join(" "),
|
|
@@ -1483,68 +1482,68 @@ function Sr({ value: e, children: t, className: i, ref: s }) {
|
|
|
1483
1482
|
);
|
|
1484
1483
|
}
|
|
1485
1484
|
export {
|
|
1486
|
-
|
|
1485
|
+
Wo as AspectRatio,
|
|
1487
1486
|
He as Button,
|
|
1488
|
-
|
|
1487
|
+
Io as Card,
|
|
1489
1488
|
pe as Checkbox,
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1489
|
+
Po as DescriptionItem,
|
|
1490
|
+
Mo as DescriptionList,
|
|
1491
|
+
ar as Dialog,
|
|
1492
|
+
Do as Field,
|
|
1494
1493
|
Nt as IconAlertCircle,
|
|
1495
1494
|
$t as IconAlertTriangle,
|
|
1496
|
-
|
|
1497
|
-
|
|
1495
|
+
er as IconArrowDown,
|
|
1496
|
+
tr as IconArrowUpRight,
|
|
1498
1497
|
J as IconButton,
|
|
1499
1498
|
Ct as IconCheck,
|
|
1500
|
-
|
|
1501
|
-
|
|
1499
|
+
qo as IconChevronDown,
|
|
1500
|
+
Vo as IconChevronRight,
|
|
1502
1501
|
fe as IconClose,
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1502
|
+
Zo as IconCopy,
|
|
1503
|
+
Uo as IconEdit,
|
|
1504
|
+
Go as IconExternalLink,
|
|
1505
|
+
Xo as IconEye,
|
|
1506
|
+
Jo as IconEyeOff,
|
|
1507
|
+
or as IconGitHub,
|
|
1509
1508
|
Bt as IconInfo,
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1509
|
+
ir as IconInstagram,
|
|
1510
|
+
nr as IconLinkedIn,
|
|
1511
|
+
Qo as IconLoader,
|
|
1512
|
+
Ho as IconMinus,
|
|
1513
|
+
sr as IconMoreHorizontal,
|
|
1514
|
+
Ro as IconPlus,
|
|
1515
|
+
Fo as IconSearch,
|
|
1516
|
+
Ko as IconSettings,
|
|
1517
|
+
Yo as IconTrash,
|
|
1518
|
+
Oo as IconUser,
|
|
1519
|
+
rr as IconX,
|
|
1520
|
+
cr as Input,
|
|
1521
|
+
fr as Menu,
|
|
1522
|
+
ge as MenuContext,
|
|
1523
|
+
pr as MenuItem,
|
|
1524
|
+
gr as MenuSeparator,
|
|
1525
|
+
Ao as NavBar,
|
|
1527
1526
|
xr as Pagination,
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1527
|
+
Eo as Panel,
|
|
1528
|
+
lr as Select,
|
|
1529
|
+
dr as Switch,
|
|
1530
|
+
Nr as Tab,
|
|
1531
|
+
$r as TabList,
|
|
1532
|
+
Lr as TabPanel,
|
|
1533
|
+
vr as Table,
|
|
1535
1534
|
oo as TableBody,
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1535
|
+
wr as TableCell,
|
|
1536
|
+
br as TableHead,
|
|
1537
|
+
yr as TableHeaderCell,
|
|
1538
|
+
mr as TableRow,
|
|
1539
|
+
Br as Tabs,
|
|
1541
1540
|
we as TabsContext,
|
|
1542
|
-
|
|
1541
|
+
ur as Tag,
|
|
1543
1542
|
me as Toast,
|
|
1544
1543
|
ye as ToastContext,
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1544
|
+
Cr as ToastProvider,
|
|
1545
|
+
Bo as ToastRegion,
|
|
1546
|
+
_r as Toolbar,
|
|
1547
|
+
hr as Tooltip,
|
|
1548
|
+
kr as useToast
|
|
1550
1549
|
};
|