@handamade/psi-react 0.11.0 → 0.13.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/README.md +1 -1
- package/dist/Dialog/Dialog.d.ts +18 -3
- package/dist/Dialog/Dialog.d.ts.map +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 +722 -571
- package/dist/manifest.json +182 -2
- package/dist/patterns.json +55 -23
- package/dist/styles.css +1 -1
- package/docs/Dialog.md +4 -3
- 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 +13 -1
- package/package.json +2 -2
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,
|
|
@@ -39,60 +39,60 @@ function Me({
|
|
|
39
39
|
disabled: r,
|
|
40
40
|
className: o,
|
|
41
41
|
onClick: s,
|
|
42
|
-
ref:
|
|
43
|
-
...
|
|
42
|
+
ref: d,
|
|
43
|
+
...l
|
|
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(" ");
|
|
52
52
|
return i !== void 0 ? /* @__PURE__ */ n(
|
|
53
53
|
"a",
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
55
|
+
ref: d,
|
|
56
56
|
className: u,
|
|
57
57
|
href: r ? void 0 : i,
|
|
58
58
|
target: a,
|
|
59
59
|
rel: c,
|
|
60
60
|
"aria-disabled": r || void 0,
|
|
61
61
|
onClick: r ? void 0 : s,
|
|
62
|
-
...
|
|
62
|
+
...l
|
|
63
63
|
}
|
|
64
64
|
) : /* @__PURE__ */ n(
|
|
65
65
|
"button",
|
|
66
66
|
{
|
|
67
|
-
ref:
|
|
67
|
+
ref: d,
|
|
68
68
|
className: u,
|
|
69
69
|
disabled: r,
|
|
70
70
|
onClick: s,
|
|
71
|
-
...
|
|
71
|
+
...l
|
|
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",
|
|
@@ -103,48 +103,48 @@ function X({
|
|
|
103
103
|
disabled: r,
|
|
104
104
|
className: o,
|
|
105
105
|
onClick: s,
|
|
106
|
-
ref:
|
|
107
|
-
...
|
|
106
|
+
ref: d,
|
|
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(
|
|
117
117
|
"a",
|
|
118
118
|
{
|
|
119
|
-
ref:
|
|
119
|
+
ref: d,
|
|
120
120
|
className: u,
|
|
121
121
|
href: r ? void 0 : i,
|
|
122
122
|
target: a,
|
|
123
123
|
rel: c,
|
|
124
124
|
"aria-disabled": r || void 0,
|
|
125
125
|
onClick: r ? void 0 : s,
|
|
126
|
-
...
|
|
126
|
+
...l
|
|
127
127
|
}
|
|
128
128
|
) : /* @__PURE__ */ n(
|
|
129
129
|
"button",
|
|
130
130
|
{
|
|
131
|
-
ref:
|
|
131
|
+
ref: d,
|
|
132
132
|
className: u,
|
|
133
133
|
disabled: r,
|
|
134
134
|
onClick: s,
|
|
135
|
-
...
|
|
135
|
+
...l
|
|
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 po({
|
|
|
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,
|
|
@@ -210,102 +210,102 @@ function yo({
|
|
|
210
210
|
htmlFor: r,
|
|
211
211
|
className: o,
|
|
212
212
|
children: s,
|
|
213
|
-
ref:
|
|
214
|
-
...
|
|
213
|
+
ref: d,
|
|
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
|
-
ref:
|
|
227
|
+
ref: d,
|
|
228
228
|
className: j,
|
|
229
|
-
"aria-describedby":
|
|
230
|
-
...
|
|
231
|
-
children:
|
|
229
|
+
"aria-describedby": m,
|
|
230
|
+
...l,
|
|
231
|
+
children: b
|
|
232
232
|
}
|
|
233
|
-
) : /* @__PURE__ */ n("div", { ref:
|
|
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 Io({ 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,171 +325,180 @@ function To({ 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
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
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
|
|
390
397
|
};
|
|
391
|
-
function
|
|
398
|
+
function er({
|
|
392
399
|
open: e,
|
|
393
400
|
onClose: t,
|
|
394
401
|
title: i,
|
|
395
402
|
footer: a,
|
|
396
403
|
width: c = 560,
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
404
|
+
placement: r = "center",
|
|
405
|
+
dismissible: o = !0,
|
|
406
|
+
className: s,
|
|
407
|
+
children: d,
|
|
400
408
|
ref: l,
|
|
401
|
-
...
|
|
409
|
+
...u
|
|
402
410
|
}) {
|
|
403
|
-
const
|
|
404
|
-
|
|
411
|
+
const h = x(null), _ = H(), y = (b) => {
|
|
412
|
+
h.current = b, typeof l == "function" ? l(b) : l && (l.current = b);
|
|
405
413
|
};
|
|
406
414
|
N(() => {
|
|
407
|
-
const
|
|
408
|
-
|
|
415
|
+
const b = h.current;
|
|
416
|
+
b && (e && !b.open ? b.showModal() : !e && b.open && b.close());
|
|
409
417
|
}, [e]), N(() => {
|
|
410
418
|
if (!e) return;
|
|
411
|
-
const
|
|
419
|
+
const b = document.body.style.overflow;
|
|
412
420
|
return document.body.style.overflow = "hidden", () => {
|
|
413
|
-
document.body.style.overflow =
|
|
421
|
+
document.body.style.overflow = b;
|
|
414
422
|
};
|
|
415
423
|
}, [e]);
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
},
|
|
419
|
-
|
|
420
|
-
},
|
|
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(" ");
|
|
421
429
|
return /* @__PURE__ */ n(
|
|
422
430
|
"dialog",
|
|
423
431
|
{
|
|
424
|
-
ref:
|
|
425
|
-
className:
|
|
426
|
-
"
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
ref: y,
|
|
433
|
+
className: C,
|
|
434
|
+
"data-placement": r,
|
|
435
|
+
"aria-labelledby": i != null ? _ : void 0,
|
|
436
|
+
onCancel: m,
|
|
437
|
+
onClick: j,
|
|
438
|
+
...u,
|
|
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
|
+
o && /* @__PURE__ */ n(
|
|
434
443
|
X,
|
|
435
444
|
{
|
|
436
445
|
variant: "ghost",
|
|
437
446
|
size: 32,
|
|
438
447
|
"aria-label": "Close dialog",
|
|
439
448
|
onClick: () => t("close-button"),
|
|
440
|
-
children: /* @__PURE__ */ n(
|
|
449
|
+
children: /* @__PURE__ */ n(_e, { "aria-hidden": "true" })
|
|
441
450
|
}
|
|
442
451
|
)
|
|
443
452
|
] }),
|
|
444
|
-
|
|
445
|
-
a != null && /* @__PURE__ */ n("div", { className:
|
|
453
|
+
d,
|
|
454
|
+
a != null && /* @__PURE__ */ n("div", { className: L.footer, children: a })
|
|
446
455
|
] })
|
|
447
456
|
}
|
|
448
457
|
);
|
|
449
458
|
}
|
|
450
|
-
const
|
|
451
|
-
input:
|
|
452
|
-
size24:
|
|
453
|
-
size32:
|
|
454
|
-
size40:
|
|
455
|
-
size48:
|
|
456
|
-
error:
|
|
457
|
-
},
|
|
458
|
-
24:
|
|
459
|
-
32:
|
|
460
|
-
40:
|
|
461
|
-
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
|
|
462
471
|
};
|
|
463
|
-
function
|
|
464
|
-
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(" ");
|
|
465
474
|
return /* @__PURE__ */ n(
|
|
466
475
|
"input",
|
|
467
476
|
{
|
|
468
477
|
ref: c,
|
|
469
|
-
className:
|
|
478
|
+
className: l,
|
|
470
479
|
id: r.id ?? (o == null ? void 0 : o.id),
|
|
471
480
|
required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
|
|
472
481
|
"aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
|
|
473
482
|
type: i,
|
|
474
483
|
...r,
|
|
475
|
-
"aria-describedby":
|
|
484
|
+
"aria-describedby": d
|
|
476
485
|
}
|
|
477
486
|
);
|
|
478
487
|
}
|
|
479
|
-
const
|
|
480
|
-
select:
|
|
481
|
-
size24:
|
|
482
|
-
size32:
|
|
483
|
-
size40:
|
|
484
|
-
size48:
|
|
485
|
-
error:
|
|
486
|
-
},
|
|
487
|
-
24:
|
|
488
|
-
32:
|
|
489
|
-
40:
|
|
490
|
-
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
|
|
491
500
|
};
|
|
492
|
-
function
|
|
501
|
+
function nr({
|
|
493
502
|
size: e = 32,
|
|
494
503
|
error: t = !1,
|
|
495
504
|
className: i,
|
|
@@ -497,65 +506,65 @@ function Vo({
|
|
|
497
506
|
children: c,
|
|
498
507
|
...r
|
|
499
508
|
}) {
|
|
500
|
-
const o =
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
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,
|
|
504
513
|
i
|
|
505
514
|
].filter(Boolean).join(" ");
|
|
506
515
|
return /* @__PURE__ */ n(
|
|
507
516
|
"select",
|
|
508
517
|
{
|
|
509
518
|
ref: a,
|
|
510
|
-
className:
|
|
519
|
+
className: l,
|
|
511
520
|
id: r.id ?? (o == null ? void 0 : o.id),
|
|
512
521
|
required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
|
|
513
522
|
"aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
|
|
514
523
|
...r,
|
|
515
|
-
"aria-describedby":
|
|
524
|
+
"aria-describedby": d,
|
|
516
525
|
children: c
|
|
517
526
|
}
|
|
518
527
|
);
|
|
519
528
|
}
|
|
520
|
-
const
|
|
521
|
-
label:
|
|
522
|
-
disabled:
|
|
523
|
-
input:
|
|
524
|
-
indicator:
|
|
525
|
-
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
|
|
526
535
|
};
|
|
527
|
-
function
|
|
536
|
+
function fe({
|
|
528
537
|
children: e,
|
|
529
538
|
className: t,
|
|
530
539
|
disabled: i,
|
|
531
540
|
ref: a,
|
|
532
541
|
...c
|
|
533
542
|
}) {
|
|
534
|
-
const r = [
|
|
543
|
+
const r = [K.label, i && K.disabled, t].filter(Boolean).join(" ");
|
|
535
544
|
return /* @__PURE__ */ p("label", { className: r, children: [
|
|
536
545
|
/* @__PURE__ */ n(
|
|
537
546
|
"input",
|
|
538
547
|
{
|
|
539
548
|
ref: a,
|
|
540
549
|
type: "checkbox",
|
|
541
|
-
className:
|
|
550
|
+
className: K.input,
|
|
542
551
|
disabled: i,
|
|
543
552
|
...c
|
|
544
553
|
}
|
|
545
554
|
),
|
|
546
|
-
/* @__PURE__ */ n("span", { className:
|
|
547
|
-
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 })
|
|
548
557
|
] });
|
|
549
558
|
}
|
|
550
|
-
const
|
|
551
|
-
label:
|
|
552
|
-
disabled:
|
|
553
|
-
input:
|
|
554
|
-
track:
|
|
555
|
-
thumb:
|
|
556
|
-
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
|
|
557
566
|
};
|
|
558
|
-
function
|
|
567
|
+
function or({
|
|
559
568
|
children: e,
|
|
560
569
|
className: t,
|
|
561
570
|
disabled: i,
|
|
@@ -579,33 +588,33 @@ function qo({
|
|
|
579
588
|
e && /* @__PURE__ */ n("span", { className: M.text, children: e })
|
|
580
589
|
] });
|
|
581
590
|
}
|
|
582
|
-
const
|
|
583
|
-
tag:
|
|
584
|
-
dismiss:
|
|
585
|
-
neutral:
|
|
586
|
-
accent:
|
|
587
|
-
success:
|
|
588
|
-
warning:
|
|
589
|
-
danger:
|
|
590
|
-
neutralSubtle:
|
|
591
|
-
accentSubtle:
|
|
592
|
-
successSubtle:
|
|
593
|
-
warningSubtle:
|
|
594
|
-
dangerSubtle:
|
|
595
|
-
},
|
|
596
|
-
neutral:
|
|
597
|
-
accent:
|
|
598
|
-
success:
|
|
599
|
-
warning:
|
|
600
|
-
danger:
|
|
601
|
-
},
|
|
602
|
-
neutral:
|
|
603
|
-
accent:
|
|
604
|
-
success:
|
|
605
|
-
warning:
|
|
606
|
-
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
|
|
607
616
|
};
|
|
608
|
-
function
|
|
617
|
+
function rr({
|
|
609
618
|
variant: e = "neutral",
|
|
610
619
|
subtle: t = !1,
|
|
611
620
|
onDismiss: i,
|
|
@@ -614,14 +623,14 @@ function Fo({
|
|
|
614
623
|
ref: r,
|
|
615
624
|
...o
|
|
616
625
|
}) {
|
|
617
|
-
const s = t ?
|
|
618
|
-
return /* @__PURE__ */ p("span", { ref: r, className:
|
|
626
|
+
const s = t ? wn : mn, d = [B.tag, s[e], a].filter(Boolean).join(" ");
|
|
627
|
+
return /* @__PURE__ */ p("span", { ref: r, className: d, ...o, children: [
|
|
619
628
|
c,
|
|
620
629
|
i && /* @__PURE__ */ n(
|
|
621
630
|
"button",
|
|
622
631
|
{
|
|
623
632
|
type: "button",
|
|
624
|
-
className:
|
|
633
|
+
className: B.dismiss,
|
|
625
634
|
onClick: i,
|
|
626
635
|
"aria-label": "Dismiss",
|
|
627
636
|
children: /* @__PURE__ */ p(
|
|
@@ -646,53 +655,53 @@ function Fo({
|
|
|
646
655
|
)
|
|
647
656
|
] });
|
|
648
657
|
}
|
|
649
|
-
const
|
|
650
|
-
wrapper:
|
|
651
|
-
tooltip:
|
|
652
|
-
top:
|
|
653
|
-
bottom:
|
|
654
|
-
left:
|
|
655
|
-
right:
|
|
656
|
-
},
|
|
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 = {
|
|
657
666
|
top: D.top,
|
|
658
667
|
bottom: D.bottom,
|
|
659
668
|
left: D.left,
|
|
660
669
|
right: D.right
|
|
661
|
-
},
|
|
662
|
-
function
|
|
670
|
+
}, Sn = 150;
|
|
671
|
+
function ir({
|
|
663
672
|
content: e,
|
|
664
673
|
children: t,
|
|
665
674
|
placement: i = "top"
|
|
666
675
|
}) {
|
|
667
|
-
const [a, c] =
|
|
676
|
+
const [a, c] = he(!1), r = H(), o = x(void 0), s = g(() => {
|
|
668
677
|
o.current !== void 0 && (window.clearTimeout(o.current), o.current = void 0);
|
|
669
|
-
}, []),
|
|
678
|
+
}, []), d = g(() => c(!0), []), l = g(() => c(!1), []);
|
|
670
679
|
N(() => s, [s]), N(() => {
|
|
671
680
|
if (!a) return;
|
|
672
681
|
const h = (_) => {
|
|
673
|
-
_.key === "Escape" &&
|
|
682
|
+
_.key === "Escape" && l();
|
|
674
683
|
};
|
|
675
684
|
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
676
|
-
}, [a,
|
|
677
|
-
const u =
|
|
685
|
+
}, [a, l]);
|
|
686
|
+
const u = te(t, {
|
|
678
687
|
"aria-describedby": a ? r : void 0,
|
|
679
688
|
onMouseEnter: (h) => {
|
|
680
|
-
s(), o.current = window.setTimeout(
|
|
689
|
+
s(), o.current = window.setTimeout(d, Sn);
|
|
681
690
|
const _ = t.props.onMouseEnter;
|
|
682
691
|
_ == null || _(h);
|
|
683
692
|
},
|
|
684
693
|
onMouseLeave: (h) => {
|
|
685
|
-
s(),
|
|
694
|
+
s(), l();
|
|
686
695
|
const _ = t.props.onMouseLeave;
|
|
687
696
|
_ == null || _(h);
|
|
688
697
|
},
|
|
689
698
|
onFocus: (h) => {
|
|
690
|
-
|
|
699
|
+
d();
|
|
691
700
|
const _ = t.props.onFocus;
|
|
692
701
|
_ == null || _(h);
|
|
693
702
|
},
|
|
694
703
|
onBlur: (h) => {
|
|
695
|
-
s(),
|
|
704
|
+
s(), l();
|
|
696
705
|
const _ = t.props.onBlur;
|
|
697
706
|
_ == null || _(h);
|
|
698
707
|
}
|
|
@@ -704,114 +713,114 @@ function Oo({
|
|
|
704
713
|
{
|
|
705
714
|
id: r,
|
|
706
715
|
role: "tooltip",
|
|
707
|
-
className: [D.tooltip,
|
|
716
|
+
className: [D.tooltip, Ln[i]].filter(Boolean).join(" "),
|
|
708
717
|
children: e
|
|
709
718
|
}
|
|
710
719
|
)
|
|
711
720
|
] });
|
|
712
721
|
}
|
|
713
|
-
const
|
|
714
|
-
toolbar:
|
|
715
|
-
gap8:
|
|
716
|
-
gap12:
|
|
717
|
-
gap16:
|
|
718
|
-
},
|
|
719
|
-
function
|
|
720
|
-
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(" ");
|
|
721
730
|
return /* @__PURE__ */ n("div", { ref: a, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: i });
|
|
722
731
|
}
|
|
723
|
-
const
|
|
724
|
-
trigger:
|
|
725
|
-
menu:
|
|
726
|
-
item:
|
|
727
|
-
separator:
|
|
728
|
-
},
|
|
729
|
-
function
|
|
730
|
-
const c =
|
|
731
|
-
const
|
|
732
|
-
return
|
|
733
|
-
|
|
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
|
+
const l = e.current;
|
|
741
|
+
return l ? Array.from(
|
|
742
|
+
l.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
|
|
734
743
|
) : [];
|
|
735
|
-
}, [e]), s =
|
|
736
|
-
(
|
|
737
|
-
if (
|
|
738
|
-
for (const u of o()) u.tabIndex = u ===
|
|
739
|
-
|
|
744
|
+
}, [e]), s = g(
|
|
745
|
+
(l) => {
|
|
746
|
+
if (l) {
|
|
747
|
+
for (const u of o()) u.tabIndex = u === l ? 0 : -1;
|
|
748
|
+
l.focus();
|
|
740
749
|
}
|
|
741
750
|
},
|
|
742
751
|
[o]
|
|
743
|
-
),
|
|
752
|
+
), d = g(() => {
|
|
744
753
|
var u;
|
|
745
|
-
const
|
|
746
|
-
|
|
754
|
+
const l = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
|
|
755
|
+
l == null || l.focus();
|
|
747
756
|
}, [t]);
|
|
748
757
|
return N(() => {
|
|
749
758
|
if (!i) return;
|
|
750
|
-
const
|
|
751
|
-
return s(
|
|
759
|
+
const l = o();
|
|
760
|
+
return s(l[0]), () => {
|
|
752
761
|
var u;
|
|
753
|
-
(u = e.current) != null && u.contains(document.activeElement) &&
|
|
762
|
+
(u = e.current) != null && u.contains(document.activeElement) && d();
|
|
754
763
|
};
|
|
755
|
-
}, [i, e, o, s,
|
|
756
|
-
(
|
|
757
|
-
if (
|
|
758
|
-
|
|
764
|
+
}, [i, e, o, s, d]), g(
|
|
765
|
+
(l) => {
|
|
766
|
+
if (l.key === "Escape") {
|
|
767
|
+
l.preventDefault(), a();
|
|
759
768
|
return;
|
|
760
769
|
}
|
|
761
770
|
const u = o();
|
|
762
771
|
if (u.length === 0) return;
|
|
763
772
|
const h = u.indexOf(document.activeElement);
|
|
764
|
-
switch (
|
|
773
|
+
switch (l.key) {
|
|
765
774
|
case "ArrowDown":
|
|
766
|
-
|
|
775
|
+
l.preventDefault(), s(u[(h + 1 + u.length) % u.length]);
|
|
767
776
|
return;
|
|
768
777
|
case "ArrowUp":
|
|
769
|
-
|
|
778
|
+
l.preventDefault(), s(u[h <= 0 ? u.length - 1 : h - 1]);
|
|
770
779
|
return;
|
|
771
780
|
case "Home":
|
|
772
|
-
|
|
781
|
+
l.preventDefault(), s(u[0]);
|
|
773
782
|
return;
|
|
774
783
|
case "End":
|
|
775
|
-
|
|
784
|
+
l.preventDefault(), s(u[u.length - 1]);
|
|
776
785
|
return;
|
|
777
786
|
}
|
|
778
|
-
if (
|
|
787
|
+
if (l.key.length !== 1 || l.metaKey || l.ctrlKey || l.altKey) return;
|
|
779
788
|
const _ = Date.now();
|
|
780
|
-
c.current = _ - r.current >
|
|
781
|
-
const
|
|
782
|
-
(
|
|
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)
|
|
783
792
|
);
|
|
784
|
-
|
|
793
|
+
y && (l.preventDefault(), s(y));
|
|
785
794
|
},
|
|
786
795
|
[o, s, a]
|
|
787
796
|
);
|
|
788
797
|
}
|
|
789
|
-
function
|
|
798
|
+
function Hn() {
|
|
790
799
|
return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
|
|
791
800
|
}
|
|
792
|
-
function
|
|
801
|
+
function Vn({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c }) {
|
|
793
802
|
N(() => {
|
|
794
803
|
const r = t.current, o = e.current;
|
|
795
804
|
!r || !o || (r.style.setProperty("anchor-name", c), o.style.setProperty("position-anchor", c));
|
|
796
805
|
}, [e, t, c]), N(() => {
|
|
797
|
-
if (!i ||
|
|
806
|
+
if (!i || Hn()) return;
|
|
798
807
|
const r = t.current, o = e.current;
|
|
799
808
|
if (!r || !o) return;
|
|
800
809
|
const s = () => {
|
|
801
|
-
const
|
|
802
|
-
o.style.position = "fixed", o.style.top =
|
|
810
|
+
const d = r.getBoundingClientRect(), l = a.startsWith("bottom"), u = a.endsWith("end"), h = getComputedStyle(r).direction === "rtl", _ = u !== h;
|
|
811
|
+
o.style.position = "fixed", o.style.top = l ? `${d.bottom}px` : "", o.style.bottom = l ? "" : `${window.innerHeight - d.top}px`, o.style.left = _ ? "" : `${d.left}px`, o.style.right = _ ? `${window.innerWidth - d.right}px` : "";
|
|
803
812
|
};
|
|
804
813
|
return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
|
|
805
814
|
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
|
|
806
815
|
};
|
|
807
816
|
}, [i, a, e, t]);
|
|
808
817
|
}
|
|
809
|
-
const
|
|
818
|
+
const pe = R({ close: () => {
|
|
810
819
|
} });
|
|
811
|
-
function
|
|
820
|
+
function le(e) {
|
|
812
821
|
return e.hasAttribute("data-open") || e.matches(":popover-open");
|
|
813
822
|
}
|
|
814
|
-
function
|
|
823
|
+
function ar({
|
|
815
824
|
open: e,
|
|
816
825
|
onClose: t,
|
|
817
826
|
trigger: i,
|
|
@@ -821,45 +830,45 @@ function Uo({
|
|
|
821
830
|
ref: o,
|
|
822
831
|
...s
|
|
823
832
|
}) {
|
|
824
|
-
const
|
|
825
|
-
|
|
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 });
|
|
826
835
|
const _ = (f) => {
|
|
827
|
-
|
|
836
|
+
d.current = f, typeof o == "function" ? o(f) : o && (o.current = f);
|
|
828
837
|
};
|
|
829
838
|
N(() => {
|
|
830
|
-
const f =
|
|
839
|
+
const f = d.current;
|
|
831
840
|
if (!f) return;
|
|
832
|
-
const
|
|
833
|
-
e && !
|
|
841
|
+
const v = le(f);
|
|
842
|
+
e && !v ? f.showPopover() : !e && v && (u.current = !0, f.hidePopover());
|
|
834
843
|
}, [e]);
|
|
835
|
-
const
|
|
836
|
-
const f =
|
|
844
|
+
const y = g(() => {
|
|
845
|
+
const f = d.current;
|
|
837
846
|
if (f) {
|
|
838
847
|
if (u.current) {
|
|
839
848
|
u.current = !1;
|
|
840
849
|
return;
|
|
841
850
|
}
|
|
842
|
-
|
|
851
|
+
le(f) || e && t("outside");
|
|
843
852
|
}
|
|
844
|
-
}, [t, e]),
|
|
845
|
-
popoverRef:
|
|
846
|
-
triggerRef:
|
|
853
|
+
}, [t, e]), m = Rn({
|
|
854
|
+
popoverRef: d,
|
|
855
|
+
triggerRef: l,
|
|
847
856
|
open: e,
|
|
848
857
|
onEsc: () => t("esc")
|
|
849
|
-
}), j =
|
|
858
|
+
}), j = g(
|
|
850
859
|
(f) => {
|
|
851
860
|
t(f);
|
|
852
861
|
},
|
|
853
862
|
[t]
|
|
854
|
-
),
|
|
863
|
+
), C = U(i);
|
|
855
864
|
N(() => {
|
|
856
|
-
|
|
865
|
+
C || console.warn(
|
|
857
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."
|
|
858
867
|
);
|
|
859
|
-
}, [
|
|
860
|
-
const
|
|
868
|
+
}, [C]);
|
|
869
|
+
const b = C ? te(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
|
|
861
870
|
return /* @__PURE__ */ p(G, { children: [
|
|
862
|
-
/* @__PURE__ */ n("div", { ref:
|
|
871
|
+
/* @__PURE__ */ n("div", { ref: l, className: J.trigger, "data-psi-menu-trigger": !0, children: b }),
|
|
863
872
|
/* @__PURE__ */ n(
|
|
864
873
|
"div",
|
|
865
874
|
{
|
|
@@ -870,15 +879,15 @@ function Uo({
|
|
|
870
879
|
"data-psi-menu": !0,
|
|
871
880
|
"data-placement": a,
|
|
872
881
|
className: [J.menu, r].filter(Boolean).join(" "),
|
|
873
|
-
onToggle:
|
|
874
|
-
onKeyDown:
|
|
875
|
-
children: /* @__PURE__ */ n(
|
|
882
|
+
onToggle: y,
|
|
883
|
+
onKeyDown: m,
|
|
884
|
+
children: /* @__PURE__ */ n(pe.Provider, { value: { close: j }, children: c })
|
|
876
885
|
}
|
|
877
886
|
)
|
|
878
887
|
] });
|
|
879
888
|
}
|
|
880
|
-
function
|
|
881
|
-
const { close: c } =
|
|
889
|
+
function cr({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1 }) {
|
|
890
|
+
const { close: c } = S(pe);
|
|
882
891
|
return /* @__PURE__ */ n(
|
|
883
892
|
"button",
|
|
884
893
|
{
|
|
@@ -896,107 +905,107 @@ function Yo({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1
|
|
|
896
905
|
}
|
|
897
906
|
);
|
|
898
907
|
}
|
|
899
|
-
function
|
|
908
|
+
function lr() {
|
|
900
909
|
return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: J.separator });
|
|
901
910
|
}
|
|
902
|
-
const
|
|
903
|
-
table:
|
|
904
|
-
headerCell:
|
|
905
|
-
cell:
|
|
906
|
-
sortButton:
|
|
907
|
-
sortIndicator:
|
|
908
|
-
selectCell:
|
|
909
|
-
body:
|
|
910
|
-
row:
|
|
911
|
-
sticky:
|
|
912
|
-
},
|
|
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({
|
|
913
922
|
size: 40,
|
|
914
923
|
sortable: !1,
|
|
915
924
|
sort: null,
|
|
916
925
|
selectable: !1,
|
|
917
|
-
selected:
|
|
918
|
-
}),
|
|
919
|
-
function
|
|
926
|
+
selected: ve
|
|
927
|
+
}), be = R([]);
|
|
928
|
+
function Jn({ children: e, className: t }) {
|
|
920
929
|
return /* @__PURE__ */ n("tbody", { className: [k.body, t].filter(Boolean).join(" "), children: e });
|
|
921
930
|
}
|
|
922
|
-
function
|
|
931
|
+
function Qn(e) {
|
|
923
932
|
const t = [];
|
|
924
933
|
let i = !1, a = !1;
|
|
925
934
|
const c = (r) => {
|
|
926
|
-
|
|
927
|
-
if (!
|
|
928
|
-
if (s.type ===
|
|
929
|
-
|
|
935
|
+
A.forEach(r, function o(s) {
|
|
936
|
+
if (!U(s)) return;
|
|
937
|
+
if (s.type === ae) {
|
|
938
|
+
A.forEach(s.props.children, o);
|
|
930
939
|
return;
|
|
931
940
|
}
|
|
932
|
-
const
|
|
933
|
-
typeof
|
|
941
|
+
const d = s.props.rowId;
|
|
942
|
+
typeof d == "string" ? t.push(d) : a = !0;
|
|
934
943
|
});
|
|
935
944
|
};
|
|
936
|
-
return
|
|
937
|
-
if (
|
|
938
|
-
if (o.type ===
|
|
939
|
-
|
|
945
|
+
return A.forEach(e, function r(o) {
|
|
946
|
+
if (U(o)) {
|
|
947
|
+
if (o.type === ae) {
|
|
948
|
+
A.forEach(o.props.children, r);
|
|
940
949
|
return;
|
|
941
950
|
}
|
|
942
|
-
o.type ===
|
|
951
|
+
o.type === Jn && (i = !0, c(o.props.children));
|
|
943
952
|
}
|
|
944
953
|
}), { ids: t, sawBody: i, hasRowWithoutId: a };
|
|
945
954
|
}
|
|
946
|
-
function
|
|
955
|
+
function dr({
|
|
947
956
|
size: e = 40,
|
|
948
957
|
stickyHeader: t,
|
|
949
958
|
sortable: i = !1,
|
|
950
959
|
sort: a = null,
|
|
951
960
|
onSortChange: c,
|
|
952
961
|
selectable: r = !1,
|
|
953
|
-
selected: o =
|
|
962
|
+
selected: o = ve,
|
|
954
963
|
onSelectionChange: s,
|
|
955
|
-
children:
|
|
956
|
-
className:
|
|
964
|
+
children: d,
|
|
965
|
+
className: l,
|
|
957
966
|
ref: u
|
|
958
967
|
}) {
|
|
959
|
-
const h = [k.table, t && k.sticky,
|
|
960
|
-
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 }) }) });
|
|
961
970
|
}
|
|
962
|
-
function
|
|
963
|
-
const { selected: i, onSelectionChange: a } =
|
|
971
|
+
function eo({ rowId: e, label: t }) {
|
|
972
|
+
const { selected: i, onSelectionChange: a } = S(V), c = () => {
|
|
964
973
|
const r = new Set(i);
|
|
965
974
|
r.has(e) ? r.delete(e) : r.add(e), a == null || a(r);
|
|
966
975
|
};
|
|
967
|
-
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 }) });
|
|
968
977
|
}
|
|
969
|
-
function
|
|
970
|
-
const { selected: e, onSelectionChange: t } =
|
|
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));
|
|
971
980
|
N(() => {
|
|
972
981
|
a.current && (a.current.indeterminate = r && !c);
|
|
973
982
|
}, [r, c]);
|
|
974
983
|
const o = () => {
|
|
975
984
|
const s = new Set(e);
|
|
976
|
-
c ? i.forEach((
|
|
985
|
+
c ? i.forEach((d) => s.delete(d)) : i.forEach((d) => s.add(d)), t == null || t(s);
|
|
977
986
|
};
|
|
978
|
-
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 }) });
|
|
979
988
|
}
|
|
980
|
-
function
|
|
981
|
-
const { selectable: i } =
|
|
989
|
+
function ur({ children: e, className: t }) {
|
|
990
|
+
const { selectable: i } = S(V);
|
|
982
991
|
let a = !1;
|
|
983
|
-
const c = i ?
|
|
984
|
-
if (a || !
|
|
992
|
+
const c = i ? A.map(e, (r) => {
|
|
993
|
+
if (a || !U(r)) return r;
|
|
985
994
|
a = !0;
|
|
986
995
|
const o = r;
|
|
987
|
-
return
|
|
996
|
+
return te(
|
|
988
997
|
o,
|
|
989
998
|
void 0,
|
|
990
999
|
/* @__PURE__ */ p(G, { children: [
|
|
991
|
-
/* @__PURE__ */ n(
|
|
1000
|
+
/* @__PURE__ */ n(to, {}),
|
|
992
1001
|
o.props.children
|
|
993
1002
|
] })
|
|
994
1003
|
);
|
|
995
1004
|
}) : e;
|
|
996
1005
|
return /* @__PURE__ */ n("thead", { className: [k.head, t].filter(Boolean).join(" "), children: c });
|
|
997
1006
|
}
|
|
998
|
-
function
|
|
999
|
-
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);
|
|
1000
1009
|
return /* @__PURE__ */ p(
|
|
1001
1010
|
"tr",
|
|
1002
1011
|
{
|
|
@@ -1004,16 +1013,16 @@ function Jo({ rowId: e, selectLabel: t, children: i, className: a }) {
|
|
|
1004
1013
|
"data-row-id": e,
|
|
1005
1014
|
"data-selected": o || void 0,
|
|
1006
1015
|
children: [
|
|
1007
|
-
c && e !== void 0 && /* @__PURE__ */ n(
|
|
1016
|
+
c && e !== void 0 && /* @__PURE__ */ n(eo, { rowId: e, label: t ?? `Select row ${e}` }),
|
|
1008
1017
|
i
|
|
1009
1018
|
]
|
|
1010
1019
|
}
|
|
1011
1020
|
);
|
|
1012
1021
|
}
|
|
1013
|
-
function
|
|
1014
|
-
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 = () => {
|
|
1015
1024
|
if (!e) return;
|
|
1016
|
-
const h =
|
|
1025
|
+
const h = d && r.direction === "asc" ? "desc" : "asc";
|
|
1017
1026
|
o == null || o({ key: e, direction: h });
|
|
1018
1027
|
};
|
|
1019
1028
|
return /* @__PURE__ */ n(
|
|
@@ -1022,40 +1031,40 @@ function Qo({ sortKey: e, numeric: t, children: i, className: a }) {
|
|
|
1022
1031
|
scope: "col",
|
|
1023
1032
|
className: [k.headerCell, a].filter(Boolean).join(" "),
|
|
1024
1033
|
"data-numeric": t || void 0,
|
|
1025
|
-
"aria-sort":
|
|
1034
|
+
"aria-sort": l,
|
|
1026
1035
|
children: s ? /* @__PURE__ */ p("button", { type: "button", className: k.sortButton, onClick: u, children: [
|
|
1027
1036
|
i,
|
|
1028
|
-
/* @__PURE__ */ n("span", { className: k.sortIndicator, "aria-hidden": "true", children:
|
|
1037
|
+
/* @__PURE__ */ n("span", { className: k.sortIndicator, "aria-hidden": "true", children: d ? r.direction === "asc" ? "↑" : "↓" : "" })
|
|
1029
1038
|
] }) : i
|
|
1030
1039
|
}
|
|
1031
1040
|
);
|
|
1032
1041
|
}
|
|
1033
|
-
function
|
|
1042
|
+
function fr({ numeric: e, children: t, className: i }) {
|
|
1034
1043
|
return /* @__PURE__ */ n("td", { className: [k.cell, i].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
|
|
1035
1044
|
}
|
|
1036
|
-
const
|
|
1037
|
-
nav:
|
|
1038
|
-
ellipsis:
|
|
1045
|
+
const no = "_nav_166vs_6", oo = "_ellipsis_166vs_12", de = {
|
|
1046
|
+
nav: no,
|
|
1047
|
+
ellipsis: oo
|
|
1039
1048
|
};
|
|
1040
|
-
function
|
|
1049
|
+
function O(e, t) {
|
|
1041
1050
|
return Array.from({ length: t - e + 1 }, (i, a) => e + a);
|
|
1042
1051
|
}
|
|
1043
|
-
function
|
|
1052
|
+
function ro(e, t, i) {
|
|
1044
1053
|
const a = Math.max(0, i), c = a * 2 + 1, r = c + 4;
|
|
1045
1054
|
if (t <= r)
|
|
1046
|
-
return
|
|
1047
|
-
const o = Math.max(e - a, 1), s = Math.min(e + a, t),
|
|
1048
|
-
if (!
|
|
1055
|
+
return O(1, t);
|
|
1056
|
+
const o = Math.max(e - a, 1), s = Math.min(e + a, t), d = o > 3, l = s < t - 2;
|
|
1057
|
+
if (!d && l) {
|
|
1049
1058
|
const u = Math.max(s, c);
|
|
1050
|
-
return [...
|
|
1059
|
+
return [...O(1, u), "ellipsis", t];
|
|
1051
1060
|
}
|
|
1052
|
-
if (
|
|
1061
|
+
if (d && !l) {
|
|
1053
1062
|
const u = Math.min(o, t - c + 1);
|
|
1054
|
-
return [1, "ellipsis", ...
|
|
1063
|
+
return [1, "ellipsis", ...O(u, t)];
|
|
1055
1064
|
}
|
|
1056
|
-
return
|
|
1065
|
+
return d && l ? [1, "ellipsis", ...O(o, s), "ellipsis", t] : O(1, t);
|
|
1057
1066
|
}
|
|
1058
|
-
function
|
|
1067
|
+
function pr({
|
|
1059
1068
|
page: e,
|
|
1060
1069
|
pageCount: t,
|
|
1061
1070
|
onPageChange: i,
|
|
@@ -1063,8 +1072,8 @@ function tr({
|
|
|
1063
1072
|
"aria-label": c = "Pagination",
|
|
1064
1073
|
className: r
|
|
1065
1074
|
}) {
|
|
1066
|
-
const o =
|
|
1067
|
-
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: [
|
|
1068
1077
|
/* @__PURE__ */ n(
|
|
1069
1078
|
X,
|
|
1070
1079
|
{
|
|
@@ -1077,8 +1086,8 @@ function tr({
|
|
|
1077
1086
|
}
|
|
1078
1087
|
),
|
|
1079
1088
|
o.map(
|
|
1080
|
-
(s,
|
|
1081
|
-
|
|
1089
|
+
(s, d) => s === "ellipsis" ? /* @__PURE__ */ n("span", { className: de.ellipsis, "aria-hidden": "true", children: "…" }, `e${d}`) : /* @__PURE__ */ n(
|
|
1090
|
+
Re,
|
|
1082
1091
|
{
|
|
1083
1092
|
size: 32,
|
|
1084
1093
|
variant: s === e ? "accent-subtle" : "ghost",
|
|
@@ -1102,35 +1111,35 @@ function tr({
|
|
|
1102
1111
|
)
|
|
1103
1112
|
] });
|
|
1104
1113
|
}
|
|
1105
|
-
const
|
|
1106
|
-
toast:
|
|
1107
|
-
icon:
|
|
1108
|
-
iconNeutral:
|
|
1109
|
-
iconSuccess:
|
|
1110
|
-
iconWarning:
|
|
1111
|
-
iconDanger:
|
|
1112
|
-
body:
|
|
1113
|
-
action:
|
|
1114
|
-
srOnly:
|
|
1115
|
-
region:
|
|
1116
|
-
live:
|
|
1117
|
-
},
|
|
1118
|
-
neutral:
|
|
1119
|
-
success:
|
|
1120
|
-
warning:
|
|
1121
|
-
danger:
|
|
1122
|
-
},
|
|
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 = {
|
|
1123
1132
|
neutral: null,
|
|
1124
1133
|
success: "Success:",
|
|
1125
1134
|
warning: "Warning:",
|
|
1126
1135
|
danger: "Error:"
|
|
1127
|
-
},
|
|
1128
|
-
neutral:
|
|
1129
|
-
success:
|
|
1130
|
-
warning:
|
|
1131
|
-
danger:
|
|
1136
|
+
}, yo = {
|
|
1137
|
+
neutral: $.iconNeutral,
|
|
1138
|
+
success: $.iconSuccess,
|
|
1139
|
+
warning: $.iconWarning,
|
|
1140
|
+
danger: $.iconDanger
|
|
1132
1141
|
};
|
|
1133
|
-
function
|
|
1142
|
+
function ge({
|
|
1134
1143
|
variant: e = "neutral",
|
|
1135
1144
|
children: t,
|
|
1136
1145
|
action: i,
|
|
@@ -1138,14 +1147,14 @@ function ve({
|
|
|
1138
1147
|
className: c,
|
|
1139
1148
|
ref: r
|
|
1140
1149
|
}) {
|
|
1141
|
-
const o =
|
|
1142
|
-
return /* @__PURE__ */ p("div", { ref: r, className:
|
|
1143
|
-
/* @__PURE__ */ n("span", { className: [
|
|
1144
|
-
/* @__PURE__ */ p("div", { className:
|
|
1145
|
-
s && /* @__PURE__ */ n("span", { className:
|
|
1150
|
+
const o = bo[e], s = go[e], d = [$.toast, c].filter(Boolean).join(" ");
|
|
1151
|
+
return /* @__PURE__ */ p("div", { ref: r, className: d, "data-variant": e, "data-psi-toast": !0, children: [
|
|
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 }),
|
|
1146
1155
|
t
|
|
1147
1156
|
] }),
|
|
1148
|
-
i != null && /* @__PURE__ */ n("div", { className:
|
|
1157
|
+
i != null && /* @__PURE__ */ n("div", { className: $.action, children: i }),
|
|
1149
1158
|
a && /* @__PURE__ */ n(
|
|
1150
1159
|
X,
|
|
1151
1160
|
{
|
|
@@ -1153,25 +1162,25 @@ function ve({
|
|
|
1153
1162
|
size: 32,
|
|
1154
1163
|
"aria-label": "Dismiss notification",
|
|
1155
1164
|
onClick: a,
|
|
1156
|
-
children: /* @__PURE__ */ n(
|
|
1165
|
+
children: /* @__PURE__ */ n(_e, { "aria-hidden": "true" })
|
|
1157
1166
|
}
|
|
1158
1167
|
)
|
|
1159
1168
|
] });
|
|
1160
1169
|
}
|
|
1161
|
-
const
|
|
1162
|
-
function
|
|
1163
|
-
if (!
|
|
1170
|
+
const mo = /* @__PURE__ */ new Set(["warning", "danger"]);
|
|
1171
|
+
function ue(e) {
|
|
1172
|
+
if (!U(e) || e.type !== ge) return !1;
|
|
1164
1173
|
const { variant: t } = e.props;
|
|
1165
|
-
return
|
|
1174
|
+
return mo.has(t ?? "neutral");
|
|
1166
1175
|
}
|
|
1167
|
-
function
|
|
1176
|
+
function wo({
|
|
1168
1177
|
placement: e = "bottom-end",
|
|
1169
1178
|
"aria-label": t = "Notifications",
|
|
1170
1179
|
children: i,
|
|
1171
1180
|
className: a,
|
|
1172
1181
|
ref: c
|
|
1173
1182
|
}) {
|
|
1174
|
-
const r =
|
|
1183
|
+
const r = x(null), o = (u) => {
|
|
1175
1184
|
r.current = u, typeof c == "function" ? c(u) : c && (c.current = u);
|
|
1176
1185
|
};
|
|
1177
1186
|
N(() => {
|
|
@@ -1183,7 +1192,7 @@ function ho({
|
|
|
1183
1192
|
(_ = u.hidePopover) == null || _.call(u);
|
|
1184
1193
|
};
|
|
1185
1194
|
}, []);
|
|
1186
|
-
const s =
|
|
1195
|
+
const s = A.toArray(i), d = s.filter(ue), l = s.filter((u) => !ue(u));
|
|
1187
1196
|
return /* @__PURE__ */ p(
|
|
1188
1197
|
"div",
|
|
1189
1198
|
{
|
|
@@ -1192,77 +1201,77 @@ function ho({
|
|
|
1192
1201
|
"aria-label": t,
|
|
1193
1202
|
"data-placement": e,
|
|
1194
1203
|
"data-psi-toast-region": !0,
|
|
1195
|
-
className: [
|
|
1204
|
+
className: [$.region, a].filter(Boolean).join(" "),
|
|
1196
1205
|
children: [
|
|
1197
|
-
/* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className:
|
|
1198
|
-
/* @__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 })
|
|
1199
1208
|
]
|
|
1200
1209
|
}
|
|
1201
1210
|
);
|
|
1202
1211
|
}
|
|
1203
|
-
const
|
|
1204
|
-
function
|
|
1205
|
-
const e =
|
|
1212
|
+
const ye = R(null);
|
|
1213
|
+
function vr() {
|
|
1214
|
+
const e = S(ye);
|
|
1206
1215
|
if (!e)
|
|
1207
1216
|
throw new Error(
|
|
1208
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."
|
|
1209
1218
|
);
|
|
1210
1219
|
return e;
|
|
1211
1220
|
}
|
|
1212
|
-
function
|
|
1221
|
+
function br({
|
|
1213
1222
|
limit: e = 3,
|
|
1214
1223
|
duration: t = 5e3,
|
|
1215
1224
|
actionDuration: i = 1e4,
|
|
1216
1225
|
placement: a = "bottom-end",
|
|
1217
1226
|
children: c
|
|
1218
1227
|
}) {
|
|
1219
|
-
const [r, o] =
|
|
1220
|
-
const
|
|
1221
|
-
(
|
|
1222
|
-
}, []), _ =
|
|
1223
|
-
(f,
|
|
1224
|
-
const
|
|
1225
|
-
s.current.set(f,
|
|
1228
|
+
const [r, o] = he([]), s = x(/* @__PURE__ */ new Map()), d = x(!1), l = x(0), u = H(), h = g((f) => {
|
|
1229
|
+
const v = s.current.get(f);
|
|
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
|
+
(f, v) => {
|
|
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);
|
|
1226
1235
|
},
|
|
1227
1236
|
[h]
|
|
1228
|
-
),
|
|
1229
|
-
({ variant: f = "neutral", message:
|
|
1230
|
-
const
|
|
1231
|
-
return o((
|
|
1232
|
-
const
|
|
1233
|
-
for (;
|
|
1234
|
-
const
|
|
1235
|
-
(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);
|
|
1236
1245
|
}
|
|
1237
|
-
return
|
|
1238
|
-
}), _(
|
|
1246
|
+
return ee;
|
|
1247
|
+
}), _(q, ie), q;
|
|
1239
1248
|
},
|
|
1240
1249
|
[i, _, t, u, e]
|
|
1241
|
-
),
|
|
1250
|
+
), m = g(() => {
|
|
1242
1251
|
for (const f of s.current.values())
|
|
1243
1252
|
f.handle !== void 0 && clearTimeout(f.handle);
|
|
1244
1253
|
s.current.clear(), o([]);
|
|
1245
|
-
}, []), j =
|
|
1246
|
-
if (!
|
|
1247
|
-
|
|
1248
|
-
for (const [f,
|
|
1249
|
-
if (
|
|
1250
|
-
clearTimeout(
|
|
1251
|
-
const
|
|
1254
|
+
}, []), j = g(() => {
|
|
1255
|
+
if (!d.current) {
|
|
1256
|
+
d.current = !0;
|
|
1257
|
+
for (const [f, v] of s.current) {
|
|
1258
|
+
if (v.handle === void 0) continue;
|
|
1259
|
+
clearTimeout(v.handle);
|
|
1260
|
+
const T = v.startedAt === void 0 ? 0 : Date.now() - v.startedAt;
|
|
1252
1261
|
s.current.set(f, {
|
|
1253
1262
|
handle: void 0,
|
|
1254
|
-
remaining: Math.max(0,
|
|
1263
|
+
remaining: Math.max(0, v.remaining - T),
|
|
1255
1264
|
startedAt: void 0
|
|
1256
1265
|
});
|
|
1257
1266
|
}
|
|
1258
1267
|
}
|
|
1259
|
-
}, []),
|
|
1260
|
-
if (
|
|
1261
|
-
|
|
1262
|
-
for (const [f,
|
|
1263
|
-
|
|
1264
|
-
handle: setTimeout(() => h(f),
|
|
1265
|
-
remaining:
|
|
1268
|
+
}, []), C = g(() => {
|
|
1269
|
+
if (d.current) {
|
|
1270
|
+
d.current = !1;
|
|
1271
|
+
for (const [f, v] of s.current)
|
|
1272
|
+
v.handle === void 0 && s.current.set(f, {
|
|
1273
|
+
handle: setTimeout(() => h(f), v.remaining),
|
|
1274
|
+
remaining: v.remaining,
|
|
1266
1275
|
startedAt: Date.now()
|
|
1267
1276
|
});
|
|
1268
1277
|
}
|
|
@@ -1270,84 +1279,226 @@ function or({
|
|
|
1270
1279
|
N(() => {
|
|
1271
1280
|
const f = s.current;
|
|
1272
1281
|
return () => {
|
|
1273
|
-
for (const
|
|
1274
|
-
|
|
1282
|
+
for (const v of f.values())
|
|
1283
|
+
v.handle !== void 0 && clearTimeout(v.handle);
|
|
1275
1284
|
f.clear();
|
|
1276
1285
|
};
|
|
1277
1286
|
}, []);
|
|
1278
|
-
const
|
|
1279
|
-
() => ({ show:
|
|
1280
|
-
[
|
|
1287
|
+
const b = ne(
|
|
1288
|
+
() => ({ show: y, dismiss: h, clear: m }),
|
|
1289
|
+
[y, h, m]
|
|
1281
1290
|
);
|
|
1282
|
-
return /* @__PURE__ */ p(
|
|
1291
|
+
return /* @__PURE__ */ p(ye.Provider, { value: b, children: [
|
|
1283
1292
|
c,
|
|
1284
1293
|
/* @__PURE__ */ n(
|
|
1285
1294
|
"div",
|
|
1286
1295
|
{
|
|
1287
1296
|
onPointerEnter: j,
|
|
1288
|
-
onPointerLeave:
|
|
1297
|
+
onPointerLeave: C,
|
|
1289
1298
|
onFocusCapture: j,
|
|
1290
|
-
onBlurCapture:
|
|
1291
|
-
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)) })
|
|
1292
1301
|
}
|
|
1293
1302
|
)
|
|
1294
1303
|
] });
|
|
1295
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
|
+
}
|
|
1296
1442
|
export {
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
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,
|
|
1307
1453
|
X as IconButton,
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
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
|
-
|
|
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
|
|
1353
1504
|
};
|