@handamade/psi-react 0.10.0 → 0.12.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/Toast/Toast.d.ts +29 -0
- package/dist/Toast/Toast.d.ts.map +1 -0
- package/dist/Toast/ToastProvider.d.ts +34 -0
- package/dist/Toast/ToastProvider.d.ts.map +1 -0
- package/dist/Toast/ToastRegion.d.ts +42 -0
- package/dist/Toast/ToastRegion.d.ts.map +1 -0
- package/dist/Toast/useToast.d.ts +27 -0
- package/dist/Toast/useToast.d.ts.map +1 -0
- package/dist/a11y-meta.d.ts.map +1 -1
- package/dist/icons/IconAlertCircle.d.ts +7 -0
- package/dist/icons/IconAlertCircle.d.ts.map +1 -0
- package/dist/icons/IconAlertTriangle.d.ts +7 -0
- package/dist/icons/IconAlertTriangle.d.ts.map +1 -0
- package/dist/icons/IconInfo.d.ts +7 -0
- package/dist/icons/IconInfo.d.ts.map +1 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +843 -614
- package/dist/manifest.json +162 -2
- package/dist/patterns.json +13 -16
- package/dist/styles.css +1 -1
- package/docs/Dialog.md +4 -3
- package/docs/Toast.md +51 -0
- package/docs/ToastProvider.md +39 -0
- package/docs/ToastRegion.md +39 -0
- package/llms.txt +14 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { createContext as K, useId 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
|
-
},
|
|
19
|
-
accent:
|
|
20
|
-
"accent-subtle":
|
|
21
|
-
neutral:
|
|
22
|
-
"neutral-subtle":
|
|
23
|
-
ghost:
|
|
24
|
-
danger:
|
|
25
|
-
"danger-subtle":
|
|
26
|
-
outline:
|
|
27
|
-
},
|
|
28
|
-
24:
|
|
29
|
-
32:
|
|
30
|
-
40:
|
|
31
|
-
48:
|
|
1
|
+
import { jsx as n, jsxs as p, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as K, useId as U, useRef as N, useEffect as S, useContext as z, useState as le, useCallback as m, cloneElement as ee, isValidElement as O, useMemo as de, Children as W, Fragment as re } from "react";
|
|
3
|
+
const ye = "_button_c94w9_3", me = "_disabled_c94w9_30", we = "_size24_c94w9_44", ke = "_size32_c94w9_54", xe = "_size40_c94w9_64", Ce = "_size48_c94w9_74", Be = "_accent_c94w9_87", Ne = "_accentSubtle_c94w9_99", Se = "_neutral_c94w9_111", $e = "_neutralSubtle_c94w9_123", Le = "_ghost_c94w9_135", ze = "_danger_c94w9_147", je = "_dangerSubtle_c94w9_159", Ie = "_outline_c94w9_171", w = {
|
|
4
|
+
button: ye,
|
|
5
|
+
disabled: me,
|
|
6
|
+
size24: we,
|
|
7
|
+
size32: ke,
|
|
8
|
+
size40: xe,
|
|
9
|
+
size48: Ce,
|
|
10
|
+
accent: Be,
|
|
11
|
+
accentSubtle: Ne,
|
|
12
|
+
neutral: Se,
|
|
13
|
+
neutralSubtle: $e,
|
|
14
|
+
ghost: Le,
|
|
15
|
+
danger: ze,
|
|
16
|
+
dangerSubtle: je,
|
|
17
|
+
outline: Ie
|
|
18
|
+
}, Te = {
|
|
19
|
+
accent: w.accent,
|
|
20
|
+
"accent-subtle": w.accentSubtle,
|
|
21
|
+
neutral: w.neutral,
|
|
22
|
+
"neutral-subtle": w.neutralSubtle,
|
|
23
|
+
ghost: w.ghost,
|
|
24
|
+
danger: w.danger,
|
|
25
|
+
"danger-subtle": w.dangerSubtle,
|
|
26
|
+
outline: w.outline
|
|
27
|
+
}, Ee = {
|
|
28
|
+
24: w.size24,
|
|
29
|
+
32: w.size32,
|
|
30
|
+
40: w.size40,
|
|
31
|
+
48: w.size48
|
|
32
32
|
};
|
|
33
|
-
function
|
|
33
|
+
function Me({
|
|
34
34
|
variant: e = "neutral",
|
|
35
35
|
size: t = 32,
|
|
36
|
-
href:
|
|
37
|
-
target:
|
|
36
|
+
href: i,
|
|
37
|
+
target: a,
|
|
38
38
|
rel: c,
|
|
39
39
|
disabled: r,
|
|
40
40
|
className: o,
|
|
41
|
-
onClick:
|
|
41
|
+
onClick: s,
|
|
42
42
|
ref: d,
|
|
43
43
|
...l
|
|
44
44
|
}) {
|
|
45
45
|
const u = [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
w.button,
|
|
47
|
+
Te[e],
|
|
48
|
+
Ee[t],
|
|
49
|
+
i !== void 0 && r ? w.disabled : void 0,
|
|
50
50
|
o
|
|
51
51
|
].filter(Boolean).join(" ");
|
|
52
|
-
return
|
|
52
|
+
return i !== void 0 ? /* @__PURE__ */ n(
|
|
53
53
|
"a",
|
|
54
54
|
{
|
|
55
55
|
ref: d,
|
|
56
56
|
className: u,
|
|
57
|
-
href: r ? void 0 :
|
|
58
|
-
target:
|
|
57
|
+
href: r ? void 0 : i,
|
|
58
|
+
target: a,
|
|
59
59
|
rel: c,
|
|
60
60
|
"aria-disabled": r || void 0,
|
|
61
|
-
onClick: r ? void 0 :
|
|
61
|
+
onClick: r ? void 0 : s,
|
|
62
62
|
...l
|
|
63
63
|
}
|
|
64
64
|
) : /* @__PURE__ */ n(
|
|
@@ -67,62 +67,62 @@ function xe({
|
|
|
67
67
|
ref: d,
|
|
68
68
|
className: u,
|
|
69
69
|
disabled: r,
|
|
70
|
-
onClick:
|
|
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 We = "_iconButton_129ca_3", Ae = "_disabled_129ca_29", Pe = "_size24_129ca_37", De = "_size32_129ca_42", Re = "_size40_129ca_47", He = "_size48_129ca_52", Ve = "_accent_129ca_60", qe = "_neutral_129ca_72", Fe = "_ghost_129ca_84", Oe = "_danger_129ca_96", L = {
|
|
76
|
+
iconButton: We,
|
|
77
|
+
disabled: Ae,
|
|
78
|
+
size24: Pe,
|
|
79
|
+
size32: De,
|
|
80
|
+
size40: Re,
|
|
81
|
+
size48: He,
|
|
82
|
+
accent: Ve,
|
|
83
|
+
neutral: qe,
|
|
84
|
+
ghost: Fe,
|
|
85
|
+
danger: Oe
|
|
86
|
+
}, Ke = {
|
|
87
|
+
accent: L.accent,
|
|
88
|
+
neutral: L.neutral,
|
|
89
|
+
ghost: L.ghost,
|
|
90
|
+
danger: L.danger
|
|
91
|
+
}, Ue = {
|
|
92
|
+
24: L.size24,
|
|
93
|
+
32: L.size32,
|
|
94
|
+
40: L.size40,
|
|
95
|
+
48: L.size48
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function X({
|
|
98
98
|
variant: e = "neutral",
|
|
99
99
|
size: t = 32,
|
|
100
|
-
href:
|
|
101
|
-
target:
|
|
100
|
+
href: i,
|
|
101
|
+
target: a,
|
|
102
102
|
rel: c,
|
|
103
103
|
disabled: r,
|
|
104
104
|
className: o,
|
|
105
|
-
onClick:
|
|
105
|
+
onClick: s,
|
|
106
106
|
ref: d,
|
|
107
107
|
...l
|
|
108
108
|
}) {
|
|
109
109
|
const u = [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
L.iconButton,
|
|
111
|
+
Ke[e],
|
|
112
|
+
Ue[t],
|
|
113
|
+
i !== void 0 && r ? L.disabled : void 0,
|
|
114
114
|
o
|
|
115
115
|
].filter(Boolean).join(" ");
|
|
116
|
-
return
|
|
116
|
+
return i !== void 0 ? /* @__PURE__ */ n(
|
|
117
117
|
"a",
|
|
118
118
|
{
|
|
119
119
|
ref: d,
|
|
120
120
|
className: u,
|
|
121
|
-
href: r ? void 0 :
|
|
122
|
-
target:
|
|
121
|
+
href: r ? void 0 : i,
|
|
122
|
+
target: a,
|
|
123
123
|
rel: c,
|
|
124
124
|
"aria-disabled": r || void 0,
|
|
125
|
-
onClick: r ? void 0 :
|
|
125
|
+
onClick: r ? void 0 : s,
|
|
126
126
|
...l
|
|
127
127
|
}
|
|
128
128
|
) : /* @__PURE__ */ n(
|
|
@@ -131,190 +131,190 @@ function U({
|
|
|
131
131
|
ref: d,
|
|
132
132
|
className: u,
|
|
133
133
|
disabled: r,
|
|
134
|
-
onClick:
|
|
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 Ye = "_card_1btb3_1", Ze = "_stacked_1btb3_8", Ge = "_featured_1btb3_10", Xe = "_media_1btb3_22", Je = "_body_1btb3_23", Qe = "_hoverLift_1btb3_31", T = {
|
|
140
|
+
card: Ye,
|
|
141
|
+
stacked: Ze,
|
|
142
|
+
featured: Ge,
|
|
143
|
+
media: Xe,
|
|
144
|
+
body: Je,
|
|
145
|
+
hoverLift: Qe
|
|
146
146
|
};
|
|
147
|
-
function
|
|
147
|
+
function yo({
|
|
148
148
|
variant: e = "stacked",
|
|
149
149
|
media: t,
|
|
150
|
-
hoverLift:
|
|
151
|
-
className:
|
|
150
|
+
hoverLift: i = !1,
|
|
151
|
+
className: a,
|
|
152
152
|
children: c,
|
|
153
153
|
ref: r,
|
|
154
154
|
...o
|
|
155
155
|
}) {
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
e === "featured" ?
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
const s = [
|
|
157
|
+
T.card,
|
|
158
|
+
e === "featured" ? T.featured : T.stacked,
|
|
159
|
+
i ? T.hoverLift : void 0,
|
|
160
|
+
a
|
|
161
161
|
].filter(Boolean).join(" ");
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
t != null && /* @__PURE__ */ n("div", { className:
|
|
164
|
-
/* @__PURE__ */ n("div", { className:
|
|
162
|
+
return /* @__PURE__ */ p("div", { ref: r, className: s, ...o, children: [
|
|
163
|
+
t != null && /* @__PURE__ */ n("div", { className: T.media, children: t }),
|
|
164
|
+
/* @__PURE__ */ n("div", { className: T.body, children: c })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
panel:
|
|
169
|
-
padding16:
|
|
167
|
+
const et = "_panel_jn8w4_1", tt = "_padding16_jn8w4_8", ie = {
|
|
168
|
+
panel: et,
|
|
169
|
+
padding16: tt
|
|
170
170
|
};
|
|
171
|
-
function
|
|
172
|
-
const r = [
|
|
173
|
-
return /* @__PURE__ */ n("div", { ref:
|
|
174
|
-
}
|
|
175
|
-
const
|
|
176
|
-
navbar:
|
|
177
|
-
inner:
|
|
178
|
-
brand:
|
|
179
|
-
links:
|
|
180
|
-
actions:
|
|
171
|
+
function mo({ padding: e = 24, className: t, children: i, ref: a, ...c }) {
|
|
172
|
+
const r = [ie.panel, e === 16 ? ie.padding16 : void 0, t].filter(Boolean).join(" ");
|
|
173
|
+
return /* @__PURE__ */ n("div", { ref: a, className: r, ...c, children: i });
|
|
174
|
+
}
|
|
175
|
+
const nt = "_navbar_1gyow_1", ot = "_inner_1gyow_12", rt = "_brand_1gyow_19", it = "_links_1gyow_20", st = "_actions_1gyow_50", V = {
|
|
176
|
+
navbar: nt,
|
|
177
|
+
inner: ot,
|
|
178
|
+
brand: rt,
|
|
179
|
+
links: it,
|
|
180
|
+
actions: st
|
|
181
181
|
};
|
|
182
|
-
function
|
|
183
|
-
const o = [
|
|
184
|
-
return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */
|
|
185
|
-
e != null && /* @__PURE__ */ n("div", { className:
|
|
186
|
-
/* @__PURE__ */ n("nav", { className:
|
|
187
|
-
t != null && /* @__PURE__ */ n("div", { className:
|
|
182
|
+
function wo({ brand: e, actions: t, children: i, className: a, ref: c, ...r }) {
|
|
183
|
+
const o = [V.navbar, a].filter(Boolean).join(" ");
|
|
184
|
+
return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ p("div", { className: `psi-container ${V.inner}`, children: [
|
|
185
|
+
e != null && /* @__PURE__ */ n("div", { className: V.brand, children: e }),
|
|
186
|
+
/* @__PURE__ */ n("nav", { className: V.links, children: i }),
|
|
187
|
+
t != null && /* @__PURE__ */ n("div", { className: V.actions, children: t })
|
|
188
188
|
] }) });
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
frame:
|
|
190
|
+
const at = "_frame_et4fc_1", ct = {
|
|
191
|
+
frame: at
|
|
192
192
|
};
|
|
193
|
-
function
|
|
194
|
-
const o = [
|
|
195
|
-
return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...
|
|
196
|
-
}
|
|
197
|
-
const
|
|
198
|
-
field:
|
|
199
|
-
label:
|
|
200
|
-
marker:
|
|
201
|
-
message:
|
|
202
|
-
invalid:
|
|
203
|
-
},
|
|
204
|
-
function
|
|
193
|
+
function ko({ ratio: e, className: t, style: i, children: a, ref: c, ...r }) {
|
|
194
|
+
const o = [ct.frame, t].filter(Boolean).join(" ");
|
|
195
|
+
return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...i }, ...r, children: a });
|
|
196
|
+
}
|
|
197
|
+
const lt = "_field_lplye_1", dt = "_label_lplye_10", ut = "_marker_lplye_16", ht = "_message_lplye_20", _t = "_invalid_lplye_26", E = {
|
|
198
|
+
field: lt,
|
|
199
|
+
label: dt,
|
|
200
|
+
marker: ut,
|
|
201
|
+
message: ht,
|
|
202
|
+
invalid: _t
|
|
203
|
+
}, te = K(null);
|
|
204
|
+
function xo({
|
|
205
205
|
label: e,
|
|
206
206
|
description: t,
|
|
207
|
-
error:
|
|
208
|
-
required:
|
|
207
|
+
error: i,
|
|
208
|
+
required: a = !1,
|
|
209
209
|
group: c = !1,
|
|
210
210
|
htmlFor: r,
|
|
211
211
|
className: o,
|
|
212
|
-
children:
|
|
212
|
+
children: s,
|
|
213
213
|
ref: d,
|
|
214
214
|
...l
|
|
215
215
|
}) {
|
|
216
|
-
const u =
|
|
216
|
+
const u = U(), h = r ?? u, _ = !!i, b = _ ? i : t, y = b != null && b !== !1 ? `${h}-message` : void 0, j = [E.field, _ && E.invalid, o].filter(Boolean).join(" "), x = e != null ? /* @__PURE__ */ p(G, { children: [
|
|
217
217
|
e,
|
|
218
|
-
|
|
219
|
-
] }) : null,
|
|
220
|
-
|
|
221
|
-
/* @__PURE__ */ n(
|
|
222
|
-
|
|
218
|
+
a && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: E.marker, children: " *" })
|
|
219
|
+
] }) : null, g = /* @__PURE__ */ p(G, { children: [
|
|
220
|
+
x != null && (c ? /* @__PURE__ */ n("legend", { className: E.label, children: x }) : /* @__PURE__ */ n("label", { className: E.label, htmlFor: h, children: x })),
|
|
221
|
+
/* @__PURE__ */ n(te.Provider, { value: { id: h, describedBy: y, invalid: _, required: a }, children: s }),
|
|
222
|
+
y && /* @__PURE__ */ n("p", { id: y, className: E.message, "aria-live": "polite", children: b })
|
|
223
223
|
] });
|
|
224
224
|
return c ? /* @__PURE__ */ n(
|
|
225
225
|
"fieldset",
|
|
226
226
|
{
|
|
227
227
|
ref: d,
|
|
228
228
|
className: j,
|
|
229
|
-
"aria-describedby":
|
|
229
|
+
"aria-describedby": y,
|
|
230
230
|
...l,
|
|
231
|
-
children:
|
|
231
|
+
children: g
|
|
232
232
|
}
|
|
233
|
-
) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children:
|
|
233
|
+
) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children: g });
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return /* @__PURE__ */
|
|
235
|
+
function Co({ size: e = 20, ...t }) {
|
|
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 Bo({ 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
|
|
245
|
-
return /* @__PURE__ */
|
|
244
|
+
function ue({ size: e = 20, ...t }) {
|
|
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 ft({ 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 No({ 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 So({ 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
|
|
260
|
-
return /* @__PURE__ */
|
|
259
|
+
function $o({ size: e = 20, ...t }) {
|
|
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
|
|
266
|
-
return /* @__PURE__ */
|
|
265
|
+
function Lo({ size: e = 20, ...t }) {
|
|
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
|
|
272
|
-
return /* @__PURE__ */
|
|
271
|
+
function zo({ size: e = 20, ...t }) {
|
|
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
|
|
278
|
-
return /* @__PURE__ */
|
|
277
|
+
function jo({ size: e = 20, ...t }) {
|
|
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
|
|
284
|
-
return /* @__PURE__ */
|
|
283
|
+
function Io({ size: e = 20, ...t }) {
|
|
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
|
|
290
|
-
return /* @__PURE__ */
|
|
289
|
+
function To({ size: e = 20, ...t }) {
|
|
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
|
|
296
|
-
return /* @__PURE__ */
|
|
295
|
+
function Eo({ size: e = 20, ...t }) {
|
|
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
|
|
303
|
-
return /* @__PURE__ */
|
|
302
|
+
function Mo({ size: e = 20, ...t }) {
|
|
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
|
|
309
|
-
return /* @__PURE__ */
|
|
308
|
+
function Wo({ size: e = 20, ...t }) {
|
|
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" }),
|
|
312
312
|
/* @__PURE__ */ n("path", { d: "M14.12 14.12a3 3 0 1 1-4.24-4.24" }),
|
|
313
313
|
/* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
|
314
314
|
] });
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return /* @__PURE__ */
|
|
316
|
+
function Ao({ size: e = 20, ...t }) {
|
|
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" }),
|
|
320
320
|
/* @__PURE__ */ n("line", { x1: "4.93", y1: "4.93", x2: "7.76", y2: "7.76" }),
|
|
@@ -325,122 +325,152 @@ function no({ 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
|
|
329
|
-
return /* @__PURE__ */
|
|
328
|
+
function Po({ size: e = 20, ...t }) {
|
|
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
|
|
335
|
-
return /* @__PURE__ */
|
|
334
|
+
function Do({ size: e = 20, ...t }) {
|
|
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 Ro({ 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 Ho({ 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 Vo({ 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
|
|
350
|
-
return /* @__PURE__ */
|
|
349
|
+
function qo({ size: e = 20, ...t }) {
|
|
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
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
356
|
+
function pt({ size: e = 20, ...t }) {
|
|
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
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
359
|
+
/* @__PURE__ */ n("line", { x1: "12", y1: "11", x2: "12", y2: "16" }),
|
|
360
|
+
/* @__PURE__ */ n("line", { x1: "12", y1: "8", x2: "12", y2: "8" })
|
|
361
|
+
] });
|
|
362
|
+
}
|
|
363
|
+
function vt({ size: e = 20, ...t }) {
|
|
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
|
+
/* @__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
|
+
/* @__PURE__ */ n("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
367
|
+
/* @__PURE__ */ n("line", { x1: "12", y1: "17", x2: "12", y2: "17" })
|
|
368
|
+
] });
|
|
369
|
+
}
|
|
370
|
+
function gt({ size: e = 20, ...t }) {
|
|
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
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
373
|
+
/* @__PURE__ */ n("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
374
|
+
/* @__PURE__ */ n("line", { x1: "12", y1: "16", x2: "12", y2: "16" })
|
|
375
|
+
] });
|
|
376
|
+
}
|
|
377
|
+
const bt = "_dialog_h5f0e_2", yt = "_center_h5f0e_32", mt = "_inlineStart_h5f0e_40", wt = "_inlineEnd_h5f0e_41", kt = "_w400_h5f0e_90", xt = "_w560_h5f0e_91", Ct = "_w720_h5f0e_92", Bt = "_panel_h5f0e_94", Nt = "_header_h5f0e_114", St = "_title_h5f0e_121", $t = "_footer_h5f0e_127", $ = {
|
|
378
|
+
dialog: bt,
|
|
379
|
+
center: yt,
|
|
380
|
+
inlineStart: mt,
|
|
381
|
+
inlineEnd: wt,
|
|
382
|
+
w400: kt,
|
|
383
|
+
w560: xt,
|
|
384
|
+
w720: Ct,
|
|
385
|
+
panel: Bt,
|
|
386
|
+
header: Nt,
|
|
387
|
+
title: St,
|
|
388
|
+
footer: $t
|
|
389
|
+
}, Lt = {
|
|
366
390
|
400: $.w400,
|
|
367
391
|
560: $.w560,
|
|
368
392
|
720: $.w720
|
|
393
|
+
}, zt = {
|
|
394
|
+
center: $.center,
|
|
395
|
+
"inline-start": $.inlineStart,
|
|
396
|
+
"inline-end": $.inlineEnd
|
|
369
397
|
};
|
|
370
|
-
function
|
|
398
|
+
function Fo({
|
|
371
399
|
open: e,
|
|
372
400
|
onClose: t,
|
|
373
|
-
title:
|
|
374
|
-
footer:
|
|
401
|
+
title: i,
|
|
402
|
+
footer: a,
|
|
375
403
|
width: c = 560,
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
404
|
+
placement: r = "center",
|
|
405
|
+
dismissible: o = !0,
|
|
406
|
+
className: s,
|
|
407
|
+
children: d,
|
|
408
|
+
ref: l,
|
|
409
|
+
...u
|
|
381
410
|
}) {
|
|
382
|
-
const
|
|
383
|
-
|
|
411
|
+
const h = N(null), _ = U(), b = (g) => {
|
|
412
|
+
h.current = g, typeof l == "function" ? l(g) : l && (l.current = g);
|
|
384
413
|
};
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
}, [e]),
|
|
414
|
+
S(() => {
|
|
415
|
+
const g = h.current;
|
|
416
|
+
g && (e && !g.open ? g.showModal() : !e && g.open && g.close());
|
|
417
|
+
}, [e]), S(() => {
|
|
389
418
|
if (!e) return;
|
|
390
|
-
const
|
|
419
|
+
const g = document.body.style.overflow;
|
|
391
420
|
return document.body.style.overflow = "hidden", () => {
|
|
392
|
-
document.body.style.overflow =
|
|
421
|
+
document.body.style.overflow = g;
|
|
393
422
|
};
|
|
394
423
|
}, [e]);
|
|
395
|
-
const y = (
|
|
396
|
-
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
},
|
|
424
|
+
const y = (g) => {
|
|
425
|
+
g.preventDefault(), o && t("esc");
|
|
426
|
+
}, j = (g) => {
|
|
427
|
+
o && g.target === h.current && t("backdrop");
|
|
428
|
+
}, x = [$.dialog, Lt[c], zt[r], s].filter(Boolean).join(" ");
|
|
400
429
|
return /* @__PURE__ */ n(
|
|
401
430
|
"dialog",
|
|
402
431
|
{
|
|
403
|
-
ref:
|
|
404
|
-
className:
|
|
405
|
-
"
|
|
432
|
+
ref: b,
|
|
433
|
+
className: x,
|
|
434
|
+
"data-placement": r,
|
|
435
|
+
"aria-labelledby": i != null ? _ : void 0,
|
|
406
436
|
onCancel: y,
|
|
407
|
-
onClick:
|
|
408
|
-
...
|
|
409
|
-
children: /* @__PURE__ */
|
|
410
|
-
(
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
437
|
+
onClick: j,
|
|
438
|
+
...u,
|
|
439
|
+
children: /* @__PURE__ */ p("div", { className: $.panel, children: [
|
|
440
|
+
(i != null || o) && /* @__PURE__ */ p("div", { className: $.header, children: [
|
|
441
|
+
i != null && /* @__PURE__ */ n("h2", { id: _, className: $.title, children: i }),
|
|
442
|
+
o && /* @__PURE__ */ n(
|
|
443
|
+
X,
|
|
414
444
|
{
|
|
415
445
|
variant: "ghost",
|
|
416
446
|
size: 32,
|
|
417
447
|
"aria-label": "Close dialog",
|
|
418
448
|
onClick: () => t("close-button"),
|
|
419
|
-
children: /* @__PURE__ */ n(
|
|
449
|
+
children: /* @__PURE__ */ n(ue, { "aria-hidden": "true" })
|
|
420
450
|
}
|
|
421
451
|
)
|
|
422
452
|
] }),
|
|
423
|
-
|
|
424
|
-
|
|
453
|
+
d,
|
|
454
|
+
a != null && /* @__PURE__ */ n("div", { className: $.footer, children: a })
|
|
425
455
|
] })
|
|
426
456
|
}
|
|
427
457
|
);
|
|
428
458
|
}
|
|
429
|
-
const
|
|
430
|
-
input:
|
|
431
|
-
size24:
|
|
432
|
-
size32:
|
|
433
|
-
size40:
|
|
434
|
-
size48:
|
|
435
|
-
error:
|
|
436
|
-
},
|
|
437
|
-
24:
|
|
438
|
-
32:
|
|
439
|
-
40:
|
|
440
|
-
48:
|
|
459
|
+
const jt = "_input_hpei8_3", It = "_size24_hpei8_37", Tt = "_size32_hpei8_43", Et = "_size40_hpei8_49", Mt = "_size48_hpei8_55", Wt = "_error_hpei8_63", A = {
|
|
460
|
+
input: jt,
|
|
461
|
+
size24: It,
|
|
462
|
+
size32: Tt,
|
|
463
|
+
size40: Et,
|
|
464
|
+
size48: Mt,
|
|
465
|
+
error: Wt
|
|
466
|
+
}, At = {
|
|
467
|
+
24: A.size24,
|
|
468
|
+
32: A.size32,
|
|
469
|
+
40: A.size40,
|
|
470
|
+
48: A.size48
|
|
441
471
|
};
|
|
442
|
-
function
|
|
443
|
-
const o =
|
|
472
|
+
function Oo({ size: e = 32, error: t = !1, type: i = "text", className: a, ref: c, ...r }) {
|
|
473
|
+
const o = z(te), 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 = [A.input, At[e], s && A.error, a].filter(Boolean).join(" ");
|
|
444
474
|
return /* @__PURE__ */ n(
|
|
445
475
|
"input",
|
|
446
476
|
{
|
|
@@ -449,43 +479,43 @@ function uo({ size: e = 32, error: t = !1, type: s = "text", className: i, ref:
|
|
|
449
479
|
id: r.id ?? (o == null ? void 0 : o.id),
|
|
450
480
|
required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
|
|
451
481
|
"aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
|
|
452
|
-
type:
|
|
482
|
+
type: i,
|
|
453
483
|
...r,
|
|
454
484
|
"aria-describedby": d
|
|
455
485
|
}
|
|
456
486
|
);
|
|
457
487
|
}
|
|
458
|
-
const
|
|
459
|
-
select:
|
|
460
|
-
size24:
|
|
461
|
-
size32:
|
|
462
|
-
size40:
|
|
463
|
-
size48:
|
|
464
|
-
error:
|
|
465
|
-
},
|
|
466
|
-
24:
|
|
467
|
-
32:
|
|
468
|
-
40:
|
|
469
|
-
48:
|
|
488
|
+
const Pt = "_select_4x9ck_3", Dt = "_size24_4x9ck_37", Rt = "_size32_4x9ck_45", Ht = "_size40_4x9ck_53", Vt = "_size48_4x9ck_61", qt = "_error_4x9ck_71", P = {
|
|
489
|
+
select: Pt,
|
|
490
|
+
size24: Dt,
|
|
491
|
+
size32: Rt,
|
|
492
|
+
size40: Ht,
|
|
493
|
+
size48: Vt,
|
|
494
|
+
error: qt
|
|
495
|
+
}, Ft = {
|
|
496
|
+
24: P.size24,
|
|
497
|
+
32: P.size32,
|
|
498
|
+
40: P.size40,
|
|
499
|
+
48: P.size48
|
|
470
500
|
};
|
|
471
|
-
function
|
|
501
|
+
function Ko({
|
|
472
502
|
size: e = 32,
|
|
473
503
|
error: t = !1,
|
|
474
|
-
className:
|
|
475
|
-
ref:
|
|
504
|
+
className: i,
|
|
505
|
+
ref: a,
|
|
476
506
|
children: c,
|
|
477
507
|
...r
|
|
478
508
|
}) {
|
|
479
|
-
const o =
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
509
|
+
const o = z(te), 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
|
+
P.select,
|
|
511
|
+
Ft[e],
|
|
512
|
+
s && P.error,
|
|
513
|
+
i
|
|
484
514
|
].filter(Boolean).join(" ");
|
|
485
515
|
return /* @__PURE__ */ n(
|
|
486
516
|
"select",
|
|
487
517
|
{
|
|
488
|
-
ref:
|
|
518
|
+
ref: a,
|
|
489
519
|
className: l,
|
|
490
520
|
id: r.id ?? (o == null ? void 0 : o.id),
|
|
491
521
|
required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
|
|
@@ -496,114 +526,114 @@ function ho({
|
|
|
496
526
|
}
|
|
497
527
|
);
|
|
498
528
|
}
|
|
499
|
-
const
|
|
500
|
-
label:
|
|
501
|
-
disabled:
|
|
502
|
-
input:
|
|
503
|
-
indicator:
|
|
504
|
-
text:
|
|
529
|
+
const Ot = "_label_1v4vv_3", Kt = "_disabled_1v4vv_13", Ut = "_input_1v4vv_20", Yt = "_indicator_1v4vv_34", Zt = "_text_1v4vv_75", q = {
|
|
530
|
+
label: Ot,
|
|
531
|
+
disabled: Kt,
|
|
532
|
+
input: Ut,
|
|
533
|
+
indicator: Yt,
|
|
534
|
+
text: Zt
|
|
505
535
|
};
|
|
506
|
-
function
|
|
536
|
+
function he({
|
|
507
537
|
children: e,
|
|
508
538
|
className: t,
|
|
509
|
-
disabled:
|
|
510
|
-
ref:
|
|
539
|
+
disabled: i,
|
|
540
|
+
ref: a,
|
|
511
541
|
...c
|
|
512
542
|
}) {
|
|
513
|
-
const r = [
|
|
514
|
-
return /* @__PURE__ */
|
|
543
|
+
const r = [q.label, i && q.disabled, t].filter(Boolean).join(" ");
|
|
544
|
+
return /* @__PURE__ */ p("label", { className: r, children: [
|
|
515
545
|
/* @__PURE__ */ n(
|
|
516
546
|
"input",
|
|
517
547
|
{
|
|
518
|
-
ref:
|
|
548
|
+
ref: a,
|
|
519
549
|
type: "checkbox",
|
|
520
|
-
className:
|
|
521
|
-
disabled:
|
|
550
|
+
className: q.input,
|
|
551
|
+
disabled: i,
|
|
522
552
|
...c
|
|
523
553
|
}
|
|
524
554
|
),
|
|
525
|
-
/* @__PURE__ */ n("span", { className:
|
|
526
|
-
e && /* @__PURE__ */ n("span", { className:
|
|
555
|
+
/* @__PURE__ */ n("span", { className: q.indicator, "aria-hidden": "true" }),
|
|
556
|
+
e && /* @__PURE__ */ n("span", { className: q.text, children: e })
|
|
527
557
|
] });
|
|
528
558
|
}
|
|
529
|
-
const
|
|
530
|
-
label:
|
|
531
|
-
disabled:
|
|
532
|
-
input:
|
|
533
|
-
track:
|
|
534
|
-
thumb:
|
|
535
|
-
text:
|
|
559
|
+
const Gt = "_label_jru2c_3", Xt = "_disabled_jru2c_13", Jt = "_input_jru2c_20", Qt = "_track_jru2c_34", en = "_thumb_jru2c_58", tn = "_text_jru2c_75", M = {
|
|
560
|
+
label: Gt,
|
|
561
|
+
disabled: Xt,
|
|
562
|
+
input: Jt,
|
|
563
|
+
track: Qt,
|
|
564
|
+
thumb: en,
|
|
565
|
+
text: tn
|
|
536
566
|
};
|
|
537
|
-
function
|
|
567
|
+
function Uo({
|
|
538
568
|
children: e,
|
|
539
569
|
className: t,
|
|
540
|
-
disabled:
|
|
541
|
-
ref:
|
|
570
|
+
disabled: i,
|
|
571
|
+
ref: a,
|
|
542
572
|
...c
|
|
543
573
|
}) {
|
|
544
|
-
const r = [
|
|
545
|
-
return /* @__PURE__ */
|
|
574
|
+
const r = [M.label, i && M.disabled, t].filter(Boolean).join(" ");
|
|
575
|
+
return /* @__PURE__ */ p("label", { className: r, children: [
|
|
546
576
|
/* @__PURE__ */ n(
|
|
547
577
|
"input",
|
|
548
578
|
{
|
|
549
|
-
ref:
|
|
579
|
+
ref: a,
|
|
550
580
|
type: "checkbox",
|
|
551
581
|
role: "switch",
|
|
552
|
-
className:
|
|
553
|
-
disabled:
|
|
582
|
+
className: M.input,
|
|
583
|
+
disabled: i,
|
|
554
584
|
...c
|
|
555
585
|
}
|
|
556
586
|
),
|
|
557
|
-
/* @__PURE__ */ n("span", { className:
|
|
558
|
-
e && /* @__PURE__ */ n("span", { className:
|
|
587
|
+
/* @__PURE__ */ n("span", { className: M.track, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: M.thumb }) }),
|
|
588
|
+
e && /* @__PURE__ */ n("span", { className: M.text, children: e })
|
|
559
589
|
] });
|
|
560
590
|
}
|
|
561
|
-
const
|
|
562
|
-
tag:
|
|
563
|
-
dismiss:
|
|
564
|
-
neutral:
|
|
565
|
-
accent:
|
|
566
|
-
success:
|
|
567
|
-
warning:
|
|
568
|
-
danger:
|
|
569
|
-
neutralSubtle:
|
|
570
|
-
accentSubtle:
|
|
571
|
-
successSubtle:
|
|
572
|
-
warningSubtle:
|
|
573
|
-
dangerSubtle:
|
|
574
|
-
},
|
|
575
|
-
neutral:
|
|
576
|
-
accent:
|
|
577
|
-
success:
|
|
578
|
-
warning:
|
|
579
|
-
danger:
|
|
580
|
-
},
|
|
581
|
-
neutral:
|
|
582
|
-
accent:
|
|
583
|
-
success:
|
|
584
|
-
warning:
|
|
585
|
-
danger:
|
|
591
|
+
const nn = "_tag_3oysa_3", on = "_dismiss_3oysa_17", rn = "_neutral_3oysa_43", sn = "_accent_3oysa_48", an = "_success_3oysa_53", cn = "_warning_3oysa_58", ln = "_danger_3oysa_63", dn = "_neutralSubtle_3oysa_70", un = "_accentSubtle_3oysa_75", hn = "_successSubtle_3oysa_80", _n = "_warningSubtle_3oysa_85", fn = "_dangerSubtle_3oysa_90", C = {
|
|
592
|
+
tag: nn,
|
|
593
|
+
dismiss: on,
|
|
594
|
+
neutral: rn,
|
|
595
|
+
accent: sn,
|
|
596
|
+
success: an,
|
|
597
|
+
warning: cn,
|
|
598
|
+
danger: ln,
|
|
599
|
+
neutralSubtle: dn,
|
|
600
|
+
accentSubtle: un,
|
|
601
|
+
successSubtle: hn,
|
|
602
|
+
warningSubtle: _n,
|
|
603
|
+
dangerSubtle: fn
|
|
604
|
+
}, pn = {
|
|
605
|
+
neutral: C.neutral,
|
|
606
|
+
accent: C.accent,
|
|
607
|
+
success: C.success,
|
|
608
|
+
warning: C.warning,
|
|
609
|
+
danger: C.danger
|
|
610
|
+
}, vn = {
|
|
611
|
+
neutral: C.neutralSubtle,
|
|
612
|
+
accent: C.accentSubtle,
|
|
613
|
+
success: C.successSubtle,
|
|
614
|
+
warning: C.warningSubtle,
|
|
615
|
+
danger: C.dangerSubtle
|
|
586
616
|
};
|
|
587
|
-
function
|
|
617
|
+
function Yo({
|
|
588
618
|
variant: e = "neutral",
|
|
589
619
|
subtle: t = !1,
|
|
590
|
-
onDismiss:
|
|
591
|
-
className:
|
|
620
|
+
onDismiss: i,
|
|
621
|
+
className: a,
|
|
592
622
|
children: c,
|
|
593
623
|
ref: r,
|
|
594
624
|
...o
|
|
595
625
|
}) {
|
|
596
|
-
const
|
|
597
|
-
return /* @__PURE__ */
|
|
626
|
+
const s = t ? vn : pn, d = [C.tag, s[e], a].filter(Boolean).join(" ");
|
|
627
|
+
return /* @__PURE__ */ p("span", { ref: r, className: d, ...o, children: [
|
|
598
628
|
c,
|
|
599
|
-
|
|
629
|
+
i && /* @__PURE__ */ n(
|
|
600
630
|
"button",
|
|
601
631
|
{
|
|
602
632
|
type: "button",
|
|
603
|
-
className:
|
|
604
|
-
onClick:
|
|
633
|
+
className: C.dismiss,
|
|
634
|
+
onClick: i,
|
|
605
635
|
"aria-label": "Dismiss",
|
|
606
|
-
children: /* @__PURE__ */
|
|
636
|
+
children: /* @__PURE__ */ p(
|
|
607
637
|
"svg",
|
|
608
638
|
{
|
|
609
639
|
width: "12",
|
|
@@ -625,93 +655,93 @@ function fo({
|
|
|
625
655
|
)
|
|
626
656
|
] });
|
|
627
657
|
}
|
|
628
|
-
const
|
|
629
|
-
wrapper:
|
|
630
|
-
tooltip:
|
|
631
|
-
top:
|
|
632
|
-
bottom:
|
|
633
|
-
left:
|
|
634
|
-
right:
|
|
635
|
-
},
|
|
636
|
-
top:
|
|
637
|
-
bottom:
|
|
638
|
-
left:
|
|
639
|
-
right:
|
|
640
|
-
},
|
|
641
|
-
function
|
|
658
|
+
const gn = "_wrapper_1eu6z_3", bn = "_tooltip_1eu6z_10", yn = "_top_1eu6z_24", mn = "_bottom_1eu6z_31", wn = "_left_1eu6z_38", kn = "_right_1eu6z_45", D = {
|
|
659
|
+
wrapper: gn,
|
|
660
|
+
tooltip: bn,
|
|
661
|
+
top: yn,
|
|
662
|
+
bottom: mn,
|
|
663
|
+
left: wn,
|
|
664
|
+
right: kn
|
|
665
|
+
}, xn = {
|
|
666
|
+
top: D.top,
|
|
667
|
+
bottom: D.bottom,
|
|
668
|
+
left: D.left,
|
|
669
|
+
right: D.right
|
|
670
|
+
}, Cn = 150;
|
|
671
|
+
function Zo({
|
|
642
672
|
content: e,
|
|
643
673
|
children: t,
|
|
644
|
-
placement:
|
|
674
|
+
placement: i = "top"
|
|
645
675
|
}) {
|
|
646
|
-
const [
|
|
676
|
+
const [a, c] = le(!1), r = U(), o = N(void 0), s = m(() => {
|
|
647
677
|
o.current !== void 0 && (window.clearTimeout(o.current), o.current = void 0);
|
|
648
|
-
}, []), d =
|
|
649
|
-
|
|
650
|
-
if (!
|
|
651
|
-
const
|
|
652
|
-
|
|
678
|
+
}, []), d = m(() => c(!0), []), l = m(() => c(!1), []);
|
|
679
|
+
S(() => s, [s]), S(() => {
|
|
680
|
+
if (!a) return;
|
|
681
|
+
const h = (_) => {
|
|
682
|
+
_.key === "Escape" && l();
|
|
653
683
|
};
|
|
654
|
-
return document.addEventListener("keydown",
|
|
655
|
-
}, [
|
|
656
|
-
const u =
|
|
657
|
-
"aria-describedby":
|
|
658
|
-
onMouseEnter: (
|
|
659
|
-
|
|
660
|
-
const
|
|
661
|
-
|
|
684
|
+
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
685
|
+
}, [a, l]);
|
|
686
|
+
const u = ee(t, {
|
|
687
|
+
"aria-describedby": a ? r : void 0,
|
|
688
|
+
onMouseEnter: (h) => {
|
|
689
|
+
s(), o.current = window.setTimeout(d, Cn);
|
|
690
|
+
const _ = t.props.onMouseEnter;
|
|
691
|
+
_ == null || _(h);
|
|
662
692
|
},
|
|
663
|
-
onMouseLeave: (
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
|
|
693
|
+
onMouseLeave: (h) => {
|
|
694
|
+
s(), l();
|
|
695
|
+
const _ = t.props.onMouseLeave;
|
|
696
|
+
_ == null || _(h);
|
|
667
697
|
},
|
|
668
|
-
onFocus: (
|
|
698
|
+
onFocus: (h) => {
|
|
669
699
|
d();
|
|
670
|
-
const
|
|
671
|
-
|
|
700
|
+
const _ = t.props.onFocus;
|
|
701
|
+
_ == null || _(h);
|
|
672
702
|
},
|
|
673
|
-
onBlur: (
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
|
|
703
|
+
onBlur: (h) => {
|
|
704
|
+
s(), l();
|
|
705
|
+
const _ = t.props.onBlur;
|
|
706
|
+
_ == null || _(h);
|
|
677
707
|
}
|
|
678
708
|
});
|
|
679
|
-
return /* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ p("span", { className: D.wrapper, children: [
|
|
680
710
|
u,
|
|
681
|
-
|
|
711
|
+
a && /* @__PURE__ */ n(
|
|
682
712
|
"span",
|
|
683
713
|
{
|
|
684
714
|
id: r,
|
|
685
715
|
role: "tooltip",
|
|
686
|
-
className: [
|
|
716
|
+
className: [D.tooltip, xn[i]].filter(Boolean).join(" "),
|
|
687
717
|
children: e
|
|
688
718
|
}
|
|
689
719
|
)
|
|
690
720
|
] });
|
|
691
721
|
}
|
|
692
|
-
const
|
|
693
|
-
toolbar:
|
|
694
|
-
gap8:
|
|
695
|
-
gap12:
|
|
696
|
-
gap16:
|
|
697
|
-
},
|
|
698
|
-
function
|
|
699
|
-
const r = [
|
|
700
|
-
return /* @__PURE__ */ n("div", { ref:
|
|
701
|
-
}
|
|
702
|
-
const
|
|
703
|
-
trigger:
|
|
704
|
-
menu:
|
|
705
|
-
item:
|
|
706
|
-
separator:
|
|
707
|
-
},
|
|
708
|
-
function
|
|
709
|
-
const c =
|
|
722
|
+
const Bn = "_toolbar_1i848_1", Nn = "_gap8_1i848_7", Sn = "_gap12_1i848_8", $n = "_gap16_1i848_9", Z = {
|
|
723
|
+
toolbar: Bn,
|
|
724
|
+
gap8: Nn,
|
|
725
|
+
gap12: Sn,
|
|
726
|
+
gap16: $n
|
|
727
|
+
}, Ln = { 8: Z.gap8, 12: Z.gap12, 16: Z.gap16 };
|
|
728
|
+
function Go({ gap: e = 8, className: t, children: i, ref: a, ...c }) {
|
|
729
|
+
const r = [Z.toolbar, Ln[e], t].filter(Boolean).join(" ");
|
|
730
|
+
return /* @__PURE__ */ n("div", { ref: a, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: i });
|
|
731
|
+
}
|
|
732
|
+
const zn = "_trigger_vpa0u_4", jn = "_menu_vpa0u_16", In = "_item_vpa0u_37", Tn = "_separator_vpa0u_74", J = {
|
|
733
|
+
trigger: zn,
|
|
734
|
+
menu: jn,
|
|
735
|
+
item: In,
|
|
736
|
+
separator: Tn
|
|
737
|
+
}, En = 500;
|
|
738
|
+
function Mn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
|
|
739
|
+
const c = N(""), r = N(0), o = m(() => {
|
|
710
740
|
const l = e.current;
|
|
711
741
|
return l ? Array.from(
|
|
712
742
|
l.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
|
|
713
743
|
) : [];
|
|
714
|
-
}, [e]),
|
|
744
|
+
}, [e]), s = m(
|
|
715
745
|
(l) => {
|
|
716
746
|
if (l) {
|
|
717
747
|
for (const u of o()) u.tabIndex = u === l ? 0 : -1;
|
|
@@ -719,415 +749,614 @@ function bn({ popoverRef: e, triggerRef: t, open: s, onEsc: i }) {
|
|
|
719
749
|
}
|
|
720
750
|
},
|
|
721
751
|
[o]
|
|
722
|
-
), d =
|
|
752
|
+
), d = m(() => {
|
|
723
753
|
var u;
|
|
724
754
|
const l = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
|
|
725
755
|
l == null || l.focus();
|
|
726
756
|
}, [t]);
|
|
727
|
-
return
|
|
728
|
-
if (!
|
|
757
|
+
return S(() => {
|
|
758
|
+
if (!i) return;
|
|
729
759
|
const l = o();
|
|
730
|
-
return
|
|
760
|
+
return s(l[0]), () => {
|
|
731
761
|
var u;
|
|
732
762
|
(u = e.current) != null && u.contains(document.activeElement) && d();
|
|
733
763
|
};
|
|
734
|
-
}, [
|
|
764
|
+
}, [i, e, o, s, d]), m(
|
|
735
765
|
(l) => {
|
|
736
766
|
if (l.key === "Escape") {
|
|
737
|
-
l.preventDefault(),
|
|
767
|
+
l.preventDefault(), a();
|
|
738
768
|
return;
|
|
739
769
|
}
|
|
740
770
|
const u = o();
|
|
741
771
|
if (u.length === 0) return;
|
|
742
|
-
const
|
|
772
|
+
const h = u.indexOf(document.activeElement);
|
|
743
773
|
switch (l.key) {
|
|
744
774
|
case "ArrowDown":
|
|
745
|
-
l.preventDefault(),
|
|
775
|
+
l.preventDefault(), s(u[(h + 1 + u.length) % u.length]);
|
|
746
776
|
return;
|
|
747
777
|
case "ArrowUp":
|
|
748
|
-
l.preventDefault(),
|
|
778
|
+
l.preventDefault(), s(u[h <= 0 ? u.length - 1 : h - 1]);
|
|
749
779
|
return;
|
|
750
780
|
case "Home":
|
|
751
|
-
l.preventDefault(),
|
|
781
|
+
l.preventDefault(), s(u[0]);
|
|
752
782
|
return;
|
|
753
783
|
case "End":
|
|
754
|
-
l.preventDefault(),
|
|
784
|
+
l.preventDefault(), s(u[u.length - 1]);
|
|
755
785
|
return;
|
|
756
786
|
}
|
|
757
787
|
if (l.key.length !== 1 || l.metaKey || l.ctrlKey || l.altKey) return;
|
|
758
|
-
const
|
|
759
|
-
c.current =
|
|
760
|
-
const
|
|
761
|
-
(
|
|
788
|
+
const _ = Date.now();
|
|
789
|
+
c.current = _ - r.current > En ? l.key.toLowerCase() : c.current + l.key.toLowerCase(), r.current = _;
|
|
790
|
+
const b = u.find(
|
|
791
|
+
(y) => (y.textContent ?? "").trim().toLowerCase().startsWith(c.current)
|
|
762
792
|
);
|
|
763
|
-
|
|
793
|
+
b && (l.preventDefault(), s(b));
|
|
764
794
|
},
|
|
765
|
-
[o,
|
|
795
|
+
[o, s, a]
|
|
766
796
|
);
|
|
767
797
|
}
|
|
768
|
-
function
|
|
798
|
+
function Wn() {
|
|
769
799
|
return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
|
|
770
800
|
}
|
|
771
|
-
function
|
|
772
|
-
|
|
801
|
+
function An({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c }) {
|
|
802
|
+
S(() => {
|
|
773
803
|
const r = t.current, o = e.current;
|
|
774
804
|
!r || !o || (r.style.setProperty("anchor-name", c), o.style.setProperty("position-anchor", c));
|
|
775
|
-
}, [e, t, c]),
|
|
776
|
-
if (!
|
|
805
|
+
}, [e, t, c]), S(() => {
|
|
806
|
+
if (!i || Wn()) return;
|
|
777
807
|
const r = t.current, o = e.current;
|
|
778
808
|
if (!r || !o) return;
|
|
779
|
-
const
|
|
780
|
-
const d = r.getBoundingClientRect(), l =
|
|
781
|
-
o.style.position = "fixed", o.style.top = l ? `${d.bottom}px` : "", o.style.bottom = l ? "" : `${window.innerHeight - d.top}px`, o.style.left =
|
|
809
|
+
const s = () => {
|
|
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` : "";
|
|
782
812
|
};
|
|
783
|
-
return
|
|
784
|
-
window.removeEventListener("scroll",
|
|
813
|
+
return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
|
|
814
|
+
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
|
|
785
815
|
};
|
|
786
|
-
}, [
|
|
816
|
+
}, [i, a, e, t]);
|
|
787
817
|
}
|
|
788
|
-
const
|
|
818
|
+
const _e = K({ close: () => {
|
|
789
819
|
} });
|
|
790
|
-
function
|
|
820
|
+
function se(e) {
|
|
791
821
|
return e.hasAttribute("data-open") || e.matches(":popover-open");
|
|
792
822
|
}
|
|
793
|
-
function
|
|
823
|
+
function Xo({
|
|
794
824
|
open: e,
|
|
795
825
|
onClose: t,
|
|
796
|
-
trigger:
|
|
797
|
-
placement:
|
|
826
|
+
trigger: i,
|
|
827
|
+
placement: a = "bottom-start",
|
|
798
828
|
children: c,
|
|
799
829
|
className: r,
|
|
800
830
|
ref: o,
|
|
801
|
-
...
|
|
831
|
+
...s
|
|
802
832
|
}) {
|
|
803
|
-
const d =
|
|
804
|
-
|
|
805
|
-
const
|
|
806
|
-
d.current =
|
|
833
|
+
const d = N(null), l = N(null), u = N(!1), h = `--psi-menu-${U().replace(/:/g, "")}`;
|
|
834
|
+
An({ popoverRef: d, triggerRef: l, open: e, placement: a, anchorName: h });
|
|
835
|
+
const _ = (f) => {
|
|
836
|
+
d.current = f, typeof o == "function" ? o(f) : o && (o.current = f);
|
|
807
837
|
};
|
|
808
|
-
|
|
809
|
-
const
|
|
810
|
-
if (!
|
|
811
|
-
const
|
|
812
|
-
e && !
|
|
838
|
+
S(() => {
|
|
839
|
+
const f = d.current;
|
|
840
|
+
if (!f) return;
|
|
841
|
+
const v = se(f);
|
|
842
|
+
e && !v ? f.showPopover() : !e && v && (u.current = !0, f.hidePopover());
|
|
813
843
|
}, [e]);
|
|
814
|
-
const
|
|
815
|
-
const
|
|
816
|
-
if (
|
|
844
|
+
const b = m(() => {
|
|
845
|
+
const f = d.current;
|
|
846
|
+
if (f) {
|
|
817
847
|
if (u.current) {
|
|
818
848
|
u.current = !1;
|
|
819
849
|
return;
|
|
820
850
|
}
|
|
821
|
-
|
|
851
|
+
se(f) || e && t("outside");
|
|
822
852
|
}
|
|
823
|
-
}, [t, e]),
|
|
853
|
+
}, [t, e]), y = Mn({
|
|
824
854
|
popoverRef: d,
|
|
825
855
|
triggerRef: l,
|
|
826
856
|
open: e,
|
|
827
857
|
onEsc: () => t("esc")
|
|
828
|
-
}), j =
|
|
829
|
-
(
|
|
830
|
-
t(
|
|
858
|
+
}), j = m(
|
|
859
|
+
(f) => {
|
|
860
|
+
t(f);
|
|
831
861
|
},
|
|
832
862
|
[t]
|
|
833
|
-
),
|
|
834
|
-
|
|
835
|
-
|
|
863
|
+
), x = O(i);
|
|
864
|
+
S(() => {
|
|
865
|
+
x || console.warn(
|
|
836
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."
|
|
837
867
|
);
|
|
838
|
-
}, [
|
|
839
|
-
const
|
|
840
|
-
return /* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */ n("div", { ref: l, className:
|
|
868
|
+
}, [x]);
|
|
869
|
+
const g = x ? ee(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
|
|
870
|
+
return /* @__PURE__ */ p(G, { children: [
|
|
871
|
+
/* @__PURE__ */ n("div", { ref: l, className: J.trigger, "data-psi-menu-trigger": !0, children: g }),
|
|
842
872
|
/* @__PURE__ */ n(
|
|
843
873
|
"div",
|
|
844
874
|
{
|
|
845
|
-
...
|
|
846
|
-
ref:
|
|
875
|
+
...s,
|
|
876
|
+
ref: _,
|
|
847
877
|
popover: "auto",
|
|
848
878
|
role: "menu",
|
|
849
879
|
"data-psi-menu": !0,
|
|
850
|
-
"data-placement":
|
|
851
|
-
className: [
|
|
852
|
-
onToggle:
|
|
853
|
-
onKeyDown:
|
|
854
|
-
children: /* @__PURE__ */ n(
|
|
880
|
+
"data-placement": a,
|
|
881
|
+
className: [J.menu, r].filter(Boolean).join(" "),
|
|
882
|
+
onToggle: b,
|
|
883
|
+
onKeyDown: y,
|
|
884
|
+
children: /* @__PURE__ */ n(_e.Provider, { value: { close: j }, children: c })
|
|
855
885
|
}
|
|
856
886
|
)
|
|
857
887
|
] });
|
|
858
888
|
}
|
|
859
|
-
function
|
|
860
|
-
const { close: c } =
|
|
889
|
+
function Jo({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1 }) {
|
|
890
|
+
const { close: c } = z(_e);
|
|
861
891
|
return /* @__PURE__ */ n(
|
|
862
892
|
"button",
|
|
863
893
|
{
|
|
864
894
|
type: "button",
|
|
865
895
|
role: "menuitem",
|
|
866
896
|
"data-psi-menu-item": !0,
|
|
867
|
-
"data-variant":
|
|
868
|
-
"aria-disabled":
|
|
897
|
+
"data-variant": i,
|
|
898
|
+
"aria-disabled": a || void 0,
|
|
869
899
|
tabIndex: -1,
|
|
870
|
-
className:
|
|
900
|
+
className: J.item,
|
|
871
901
|
onClick: () => {
|
|
872
|
-
|
|
902
|
+
a || (t(), c("item-select"));
|
|
873
903
|
},
|
|
874
904
|
children: e
|
|
875
905
|
}
|
|
876
906
|
);
|
|
877
907
|
}
|
|
878
|
-
function
|
|
879
|
-
return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className:
|
|
880
|
-
}
|
|
881
|
-
const
|
|
882
|
-
table:
|
|
883
|
-
headerCell:
|
|
884
|
-
cell:
|
|
885
|
-
sortButton:
|
|
886
|
-
sortIndicator:
|
|
887
|
-
selectCell:
|
|
888
|
-
body:
|
|
889
|
-
row:
|
|
890
|
-
sticky:
|
|
891
|
-
},
|
|
908
|
+
function Qo() {
|
|
909
|
+
return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: J.separator });
|
|
910
|
+
}
|
|
911
|
+
const Pn = "_table_146hc_3", Dn = "_headerCell_146hc_13", Rn = "_cell_146hc_19", Hn = "_sortButton_146hc_30", Vn = "_sortIndicator_146hc_47", qn = "_selectCell_146hc_79", Fn = "_body_146hc_86", On = "_row_146hc_89", Kn = "_sticky_146hc_111", k = {
|
|
912
|
+
table: Pn,
|
|
913
|
+
headerCell: Dn,
|
|
914
|
+
cell: Rn,
|
|
915
|
+
sortButton: Hn,
|
|
916
|
+
sortIndicator: Vn,
|
|
917
|
+
selectCell: qn,
|
|
918
|
+
body: Fn,
|
|
919
|
+
row: On,
|
|
920
|
+
sticky: Kn
|
|
921
|
+
}, fe = /* @__PURE__ */ new Set(), R = K({
|
|
892
922
|
size: 40,
|
|
893
923
|
sortable: !1,
|
|
894
924
|
sort: null,
|
|
895
925
|
selectable: !1,
|
|
896
|
-
selected:
|
|
897
|
-
}),
|
|
898
|
-
function
|
|
899
|
-
return /* @__PURE__ */ n("tbody", { className: [
|
|
926
|
+
selected: fe
|
|
927
|
+
}), pe = K([]);
|
|
928
|
+
function Un({ children: e, className: t }) {
|
|
929
|
+
return /* @__PURE__ */ n("tbody", { className: [k.body, t].filter(Boolean).join(" "), children: e });
|
|
900
930
|
}
|
|
901
|
-
function
|
|
931
|
+
function Yn(e) {
|
|
902
932
|
const t = [];
|
|
903
|
-
let
|
|
933
|
+
let i = !1, a = !1;
|
|
904
934
|
const c = (r) => {
|
|
905
|
-
|
|
906
|
-
if (!
|
|
907
|
-
if (
|
|
908
|
-
|
|
935
|
+
W.forEach(r, function o(s) {
|
|
936
|
+
if (!O(s)) return;
|
|
937
|
+
if (s.type === re) {
|
|
938
|
+
W.forEach(s.props.children, o);
|
|
909
939
|
return;
|
|
910
940
|
}
|
|
911
|
-
const d =
|
|
912
|
-
typeof d == "string" ? t.push(d) :
|
|
941
|
+
const d = s.props.rowId;
|
|
942
|
+
typeof d == "string" ? t.push(d) : a = !0;
|
|
913
943
|
});
|
|
914
944
|
};
|
|
915
|
-
return
|
|
916
|
-
if (
|
|
917
|
-
if (o.type ===
|
|
918
|
-
|
|
945
|
+
return W.forEach(e, function r(o) {
|
|
946
|
+
if (O(o)) {
|
|
947
|
+
if (o.type === re) {
|
|
948
|
+
W.forEach(o.props.children, r);
|
|
919
949
|
return;
|
|
920
950
|
}
|
|
921
|
-
o.type ===
|
|
951
|
+
o.type === Un && (i = !0, c(o.props.children));
|
|
922
952
|
}
|
|
923
|
-
}), { ids: t, sawBody:
|
|
953
|
+
}), { ids: t, sawBody: i, hasRowWithoutId: a };
|
|
924
954
|
}
|
|
925
|
-
function
|
|
955
|
+
function er({
|
|
926
956
|
size: e = 40,
|
|
927
957
|
stickyHeader: t,
|
|
928
|
-
sortable:
|
|
929
|
-
sort:
|
|
958
|
+
sortable: i = !1,
|
|
959
|
+
sort: a = null,
|
|
930
960
|
onSortChange: c,
|
|
931
961
|
selectable: r = !1,
|
|
932
|
-
selected: o =
|
|
933
|
-
onSelectionChange:
|
|
962
|
+
selected: o = fe,
|
|
963
|
+
onSelectionChange: s,
|
|
934
964
|
children: d,
|
|
935
965
|
className: l,
|
|
936
966
|
ref: u
|
|
937
967
|
}) {
|
|
938
|
-
const
|
|
939
|
-
return process.env.NODE_ENV !== "production" && (
|
|
968
|
+
const h = [k.table, t && k.sticky, l].filter(Boolean).join(" "), { ids: _, sawBody: b, hasRowWithoutId: y } = de(() => Yn(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 && !b && 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(R.Provider, { value: { size: e, sortable: i, sort: a, onSortChange: c, selectable: r, selected: o, onSelectionChange: s }, children: /* @__PURE__ */ n(pe.Provider, { value: _, children: /* @__PURE__ */ n("table", { ref: u, className: h, "data-size": e, children: d }) }) });
|
|
940
970
|
}
|
|
941
|
-
function
|
|
942
|
-
const { selected:
|
|
943
|
-
const r = new Set(
|
|
944
|
-
r.has(e) ? r.delete(e) : r.add(e),
|
|
971
|
+
function Zn({ rowId: e, label: t }) {
|
|
972
|
+
const { selected: i, onSelectionChange: a } = z(R), c = () => {
|
|
973
|
+
const r = new Set(i);
|
|
974
|
+
r.has(e) ? r.delete(e) : r.add(e), a == null || a(r);
|
|
945
975
|
};
|
|
946
|
-
return /* @__PURE__ */ n("td", { className: `${
|
|
976
|
+
return /* @__PURE__ */ n("td", { className: `${k.cell} ${k.selectCell}`, children: /* @__PURE__ */ n(he, { "aria-label": t, checked: i.has(e), onChange: c }) });
|
|
947
977
|
}
|
|
948
|
-
function
|
|
949
|
-
const { selected: e, onSelectionChange: t } =
|
|
950
|
-
|
|
951
|
-
|
|
978
|
+
function Gn() {
|
|
979
|
+
const { selected: e, onSelectionChange: t } = z(R), i = z(pe), a = N(null), c = i.length > 0 && i.every((s) => e.has(s)), r = i.some((s) => e.has(s));
|
|
980
|
+
S(() => {
|
|
981
|
+
a.current && (a.current.indeterminate = r && !c);
|
|
952
982
|
}, [r, c]);
|
|
953
983
|
const o = () => {
|
|
954
|
-
const
|
|
955
|
-
c ?
|
|
984
|
+
const s = new Set(e);
|
|
985
|
+
c ? i.forEach((d) => s.delete(d)) : i.forEach((d) => s.add(d)), t == null || t(s);
|
|
956
986
|
};
|
|
957
|
-
return /* @__PURE__ */ n("th", { scope: "col", className: `${
|
|
958
|
-
}
|
|
959
|
-
function
|
|
960
|
-
const { selectable:
|
|
961
|
-
let
|
|
962
|
-
const c =
|
|
963
|
-
if (
|
|
964
|
-
|
|
987
|
+
return /* @__PURE__ */ n("th", { scope: "col", className: `${k.headerCell} ${k.selectCell}`, children: /* @__PURE__ */ n(he, { ref: a, "aria-label": "Select all rows", checked: c, onChange: o }) });
|
|
988
|
+
}
|
|
989
|
+
function tr({ children: e, className: t }) {
|
|
990
|
+
const { selectable: i } = z(R);
|
|
991
|
+
let a = !1;
|
|
992
|
+
const c = i ? W.map(e, (r) => {
|
|
993
|
+
if (a || !O(r)) return r;
|
|
994
|
+
a = !0;
|
|
965
995
|
const o = r;
|
|
966
|
-
return
|
|
996
|
+
return ee(
|
|
967
997
|
o,
|
|
968
998
|
void 0,
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */ n(
|
|
999
|
+
/* @__PURE__ */ p(G, { children: [
|
|
1000
|
+
/* @__PURE__ */ n(Gn, {}),
|
|
971
1001
|
o.props.children
|
|
972
1002
|
] })
|
|
973
1003
|
);
|
|
974
1004
|
}) : e;
|
|
975
|
-
return /* @__PURE__ */ n("thead", { className: [
|
|
1005
|
+
return /* @__PURE__ */ n("thead", { className: [k.head, t].filter(Boolean).join(" "), children: c });
|
|
976
1006
|
}
|
|
977
|
-
function
|
|
978
|
-
const { selectable: c, selected: r } =
|
|
979
|
-
return /* @__PURE__ */
|
|
1007
|
+
function nr({ rowId: e, selectLabel: t, children: i, className: a }) {
|
|
1008
|
+
const { selectable: c, selected: r } = z(R), o = e !== void 0 && r.has(e);
|
|
1009
|
+
return /* @__PURE__ */ p(
|
|
980
1010
|
"tr",
|
|
981
1011
|
{
|
|
982
|
-
className: [
|
|
1012
|
+
className: [k.row, a].filter(Boolean).join(" "),
|
|
983
1013
|
"data-row-id": e,
|
|
984
1014
|
"data-selected": o || void 0,
|
|
985
1015
|
children: [
|
|
986
|
-
c && e !== void 0 && /* @__PURE__ */ n(
|
|
987
|
-
|
|
1016
|
+
c && e !== void 0 && /* @__PURE__ */ n(Zn, { rowId: e, label: t ?? `Select row ${e}` }),
|
|
1017
|
+
i
|
|
988
1018
|
]
|
|
989
1019
|
}
|
|
990
1020
|
);
|
|
991
1021
|
}
|
|
992
|
-
function
|
|
993
|
-
const { sortable: c, sort: r, onSortChange: o } =
|
|
1022
|
+
function or({ sortKey: e, numeric: t, children: i, className: a }) {
|
|
1023
|
+
const { sortable: c, sort: r, onSortChange: o } = z(R), 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 = () => {
|
|
994
1024
|
if (!e) return;
|
|
995
|
-
const
|
|
996
|
-
o == null || o({ key: e, direction:
|
|
1025
|
+
const h = d && r.direction === "asc" ? "desc" : "asc";
|
|
1026
|
+
o == null || o({ key: e, direction: h });
|
|
997
1027
|
};
|
|
998
1028
|
return /* @__PURE__ */ n(
|
|
999
1029
|
"th",
|
|
1000
1030
|
{
|
|
1001
1031
|
scope: "col",
|
|
1002
|
-
className: [
|
|
1032
|
+
className: [k.headerCell, a].filter(Boolean).join(" "),
|
|
1003
1033
|
"data-numeric": t || void 0,
|
|
1004
1034
|
"aria-sort": l,
|
|
1005
|
-
children:
|
|
1006
|
-
|
|
1007
|
-
/* @__PURE__ */ n("span", { className:
|
|
1008
|
-
] }) :
|
|
1035
|
+
children: s ? /* @__PURE__ */ p("button", { type: "button", className: k.sortButton, onClick: u, children: [
|
|
1036
|
+
i,
|
|
1037
|
+
/* @__PURE__ */ n("span", { className: k.sortIndicator, "aria-hidden": "true", children: d ? r.direction === "asc" ? "↑" : "↓" : "" })
|
|
1038
|
+
] }) : i
|
|
1009
1039
|
}
|
|
1010
1040
|
);
|
|
1011
1041
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return /* @__PURE__ */ n("td", { className: [
|
|
1042
|
+
function rr({ numeric: e, children: t, className: i }) {
|
|
1043
|
+
return /* @__PURE__ */ n("td", { className: [k.cell, i].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
|
|
1014
1044
|
}
|
|
1015
|
-
const
|
|
1016
|
-
nav:
|
|
1017
|
-
ellipsis:
|
|
1045
|
+
const Xn = "_nav_166vs_6", Jn = "_ellipsis_166vs_12", ae = {
|
|
1046
|
+
nav: Xn,
|
|
1047
|
+
ellipsis: Jn
|
|
1018
1048
|
};
|
|
1019
|
-
function
|
|
1020
|
-
return Array.from({ length: t - e + 1 }, (
|
|
1049
|
+
function F(e, t) {
|
|
1050
|
+
return Array.from({ length: t - e + 1 }, (i, a) => e + a);
|
|
1021
1051
|
}
|
|
1022
|
-
function
|
|
1023
|
-
const
|
|
1052
|
+
function Qn(e, t, i) {
|
|
1053
|
+
const a = Math.max(0, i), c = a * 2 + 1, r = c + 4;
|
|
1024
1054
|
if (t <= r)
|
|
1025
|
-
return
|
|
1026
|
-
const o = Math.max(e -
|
|
1055
|
+
return F(1, t);
|
|
1056
|
+
const o = Math.max(e - a, 1), s = Math.min(e + a, t), d = o > 3, l = s < t - 2;
|
|
1027
1057
|
if (!d && l) {
|
|
1028
|
-
const u = Math.max(
|
|
1029
|
-
return [...
|
|
1058
|
+
const u = Math.max(s, c);
|
|
1059
|
+
return [...F(1, u), "ellipsis", t];
|
|
1030
1060
|
}
|
|
1031
1061
|
if (d && !l) {
|
|
1032
1062
|
const u = Math.min(o, t - c + 1);
|
|
1033
|
-
return [1, "ellipsis", ...
|
|
1063
|
+
return [1, "ellipsis", ...F(u, t)];
|
|
1034
1064
|
}
|
|
1035
|
-
return d && l ? [1, "ellipsis", ...
|
|
1065
|
+
return d && l ? [1, "ellipsis", ...F(o, s), "ellipsis", t] : F(1, t);
|
|
1036
1066
|
}
|
|
1037
|
-
function
|
|
1067
|
+
function ir({
|
|
1038
1068
|
page: e,
|
|
1039
1069
|
pageCount: t,
|
|
1040
|
-
onPageChange:
|
|
1041
|
-
siblingCount:
|
|
1070
|
+
onPageChange: i,
|
|
1071
|
+
siblingCount: a = 1,
|
|
1042
1072
|
"aria-label": c = "Pagination",
|
|
1043
1073
|
className: r
|
|
1044
1074
|
}) {
|
|
1045
|
-
const o =
|
|
1046
|
-
return /* @__PURE__ */
|
|
1075
|
+
const o = Qn(e, t, a);
|
|
1076
|
+
return /* @__PURE__ */ p("nav", { "aria-label": c, className: [ae.nav, r].filter(Boolean).join(" "), children: [
|
|
1047
1077
|
/* @__PURE__ */ n(
|
|
1048
|
-
|
|
1078
|
+
X,
|
|
1049
1079
|
{
|
|
1050
1080
|
"aria-label": "Previous page",
|
|
1051
1081
|
size: 32,
|
|
1052
1082
|
variant: "ghost",
|
|
1053
1083
|
disabled: e <= 1,
|
|
1054
|
-
onClick: () =>
|
|
1084
|
+
onClick: () => i(e - 1),
|
|
1055
1085
|
children: /* @__PURE__ */ n("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", width: "16", height: "16", children: /* @__PURE__ */ n("path", { d: "M10 3 5 8l5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }) })
|
|
1056
1086
|
}
|
|
1057
1087
|
),
|
|
1058
1088
|
o.map(
|
|
1059
|
-
(
|
|
1060
|
-
|
|
1089
|
+
(s, d) => s === "ellipsis" ? /* @__PURE__ */ n("span", { className: ae.ellipsis, "aria-hidden": "true", children: "…" }, `e${d}`) : /* @__PURE__ */ n(
|
|
1090
|
+
Me,
|
|
1061
1091
|
{
|
|
1062
1092
|
size: 32,
|
|
1063
|
-
variant:
|
|
1064
|
-
"aria-current":
|
|
1065
|
-
onClick: () => s
|
|
1066
|
-
children: String(
|
|
1093
|
+
variant: s === e ? "accent-subtle" : "ghost",
|
|
1094
|
+
"aria-current": s === e ? "page" : void 0,
|
|
1095
|
+
onClick: () => i(s),
|
|
1096
|
+
children: String(s)
|
|
1067
1097
|
},
|
|
1068
|
-
|
|
1098
|
+
s
|
|
1069
1099
|
)
|
|
1070
1100
|
),
|
|
1071
1101
|
/* @__PURE__ */ n(
|
|
1072
|
-
|
|
1102
|
+
X,
|
|
1073
1103
|
{
|
|
1074
1104
|
"aria-label": "Next page",
|
|
1075
1105
|
size: 32,
|
|
1076
1106
|
variant: "ghost",
|
|
1077
1107
|
disabled: e >= t,
|
|
1078
|
-
onClick: () =>
|
|
1108
|
+
onClick: () => i(e + 1),
|
|
1079
1109
|
children: /* @__PURE__ */ n("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", width: "16", height: "16", children: /* @__PURE__ */ n("path", { d: "m6 3 5 5-5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }) })
|
|
1080
1110
|
}
|
|
1081
1111
|
)
|
|
1082
1112
|
] });
|
|
1083
1113
|
}
|
|
1114
|
+
const eo = "_toast_7toru_10", to = "_icon_7toru_39", no = "_iconNeutral_7toru_44", oo = "_iconSuccess_7toru_45", ro = "_iconWarning_7toru_46", io = "_iconDanger_7toru_47", so = "_body_7toru_51", ao = "_action_7toru_55", co = "_srOnly_7toru_60", lo = "_region_7toru_74", uo = "_live_7toru_104", B = {
|
|
1115
|
+
toast: eo,
|
|
1116
|
+
icon: to,
|
|
1117
|
+
iconNeutral: no,
|
|
1118
|
+
iconSuccess: oo,
|
|
1119
|
+
iconWarning: ro,
|
|
1120
|
+
iconDanger: io,
|
|
1121
|
+
body: so,
|
|
1122
|
+
action: ao,
|
|
1123
|
+
srOnly: co,
|
|
1124
|
+
region: lo,
|
|
1125
|
+
live: uo
|
|
1126
|
+
}, ho = {
|
|
1127
|
+
neutral: pt,
|
|
1128
|
+
success: ft,
|
|
1129
|
+
warning: vt,
|
|
1130
|
+
danger: gt
|
|
1131
|
+
}, _o = {
|
|
1132
|
+
neutral: null,
|
|
1133
|
+
success: "Success:",
|
|
1134
|
+
warning: "Warning:",
|
|
1135
|
+
danger: "Error:"
|
|
1136
|
+
}, fo = {
|
|
1137
|
+
neutral: B.iconNeutral,
|
|
1138
|
+
success: B.iconSuccess,
|
|
1139
|
+
warning: B.iconWarning,
|
|
1140
|
+
danger: B.iconDanger
|
|
1141
|
+
};
|
|
1142
|
+
function ve({
|
|
1143
|
+
variant: e = "neutral",
|
|
1144
|
+
children: t,
|
|
1145
|
+
action: i,
|
|
1146
|
+
onDismiss: a,
|
|
1147
|
+
className: c,
|
|
1148
|
+
ref: r
|
|
1149
|
+
}) {
|
|
1150
|
+
const o = ho[e], s = _o[e], d = [B.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: [B.icon, fo[e]].join(" "), children: /* @__PURE__ */ n(o, { size: 20, "aria-hidden": "true" }) }),
|
|
1153
|
+
/* @__PURE__ */ p("div", { className: B.body, children: [
|
|
1154
|
+
s && /* @__PURE__ */ n("span", { className: B.srOnly, children: s }),
|
|
1155
|
+
t
|
|
1156
|
+
] }),
|
|
1157
|
+
i != null && /* @__PURE__ */ n("div", { className: B.action, children: i }),
|
|
1158
|
+
a && /* @__PURE__ */ n(
|
|
1159
|
+
X,
|
|
1160
|
+
{
|
|
1161
|
+
variant: "ghost",
|
|
1162
|
+
size: 32,
|
|
1163
|
+
"aria-label": "Dismiss notification",
|
|
1164
|
+
onClick: a,
|
|
1165
|
+
children: /* @__PURE__ */ n(ue, { "aria-hidden": "true" })
|
|
1166
|
+
}
|
|
1167
|
+
)
|
|
1168
|
+
] });
|
|
1169
|
+
}
|
|
1170
|
+
const po = /* @__PURE__ */ new Set(["warning", "danger"]);
|
|
1171
|
+
function ce(e) {
|
|
1172
|
+
if (!O(e) || e.type !== ve) return !1;
|
|
1173
|
+
const { variant: t } = e.props;
|
|
1174
|
+
return po.has(t ?? "neutral");
|
|
1175
|
+
}
|
|
1176
|
+
function vo({
|
|
1177
|
+
placement: e = "bottom-end",
|
|
1178
|
+
"aria-label": t = "Notifications",
|
|
1179
|
+
children: i,
|
|
1180
|
+
className: a,
|
|
1181
|
+
ref: c
|
|
1182
|
+
}) {
|
|
1183
|
+
const r = N(null), o = (u) => {
|
|
1184
|
+
r.current = u, typeof c == "function" ? c(u) : c && (c.current = u);
|
|
1185
|
+
};
|
|
1186
|
+
S(() => {
|
|
1187
|
+
var h;
|
|
1188
|
+
const u = r.current;
|
|
1189
|
+
if (u)
|
|
1190
|
+
return (h = u.showPopover) == null || h.call(u), () => {
|
|
1191
|
+
var _;
|
|
1192
|
+
(_ = u.hidePopover) == null || _.call(u);
|
|
1193
|
+
};
|
|
1194
|
+
}, []);
|
|
1195
|
+
const s = W.toArray(i), d = s.filter(ce), l = s.filter((u) => !ce(u));
|
|
1196
|
+
return /* @__PURE__ */ p(
|
|
1197
|
+
"div",
|
|
1198
|
+
{
|
|
1199
|
+
ref: o,
|
|
1200
|
+
popover: "manual",
|
|
1201
|
+
"aria-label": t,
|
|
1202
|
+
"data-placement": e,
|
|
1203
|
+
"data-psi-toast-region": !0,
|
|
1204
|
+
className: [B.region, a].filter(Boolean).join(" "),
|
|
1205
|
+
children: [
|
|
1206
|
+
/* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className: B.live, children: l }),
|
|
1207
|
+
/* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className: B.live, children: d })
|
|
1208
|
+
]
|
|
1209
|
+
}
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
const ge = K(null);
|
|
1213
|
+
function sr() {
|
|
1214
|
+
const e = z(ge);
|
|
1215
|
+
if (!e)
|
|
1216
|
+
throw new Error(
|
|
1217
|
+
"Psi useToast: no ToastProvider found. Wrap your app (or the subtree that raises toasts) in <ToastProvider> — it owns the queue, the auto-dismiss timers and the single ToastRegion."
|
|
1218
|
+
);
|
|
1219
|
+
return e;
|
|
1220
|
+
}
|
|
1221
|
+
function ar({
|
|
1222
|
+
limit: e = 3,
|
|
1223
|
+
duration: t = 5e3,
|
|
1224
|
+
actionDuration: i = 1e4,
|
|
1225
|
+
placement: a = "bottom-end",
|
|
1226
|
+
children: c
|
|
1227
|
+
}) {
|
|
1228
|
+
const [r, o] = le([]), s = N(/* @__PURE__ */ new Map()), d = N(!1), l = N(0), u = U(), h = m((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((I) => I.filter((H) => H.id !== f));
|
|
1231
|
+
}, []), _ = m(
|
|
1232
|
+
(f, v) => {
|
|
1233
|
+
const I = 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, I);
|
|
1235
|
+
},
|
|
1236
|
+
[h]
|
|
1237
|
+
), b = m(
|
|
1238
|
+
({ variant: f = "neutral", message: v, action: I }) => {
|
|
1239
|
+
const H = `${u}-${l.current++}`, ne = I != null ? i : t;
|
|
1240
|
+
return o((be) => {
|
|
1241
|
+
const Q = [...be, { id: H, variant: f, message: v, action: I, duration: ne }];
|
|
1242
|
+
for (; Q.length > e; ) {
|
|
1243
|
+
const oe = Q.shift(), Y = s.current.get(oe.id);
|
|
1244
|
+
(Y == null ? void 0 : Y.handle) !== void 0 && clearTimeout(Y.handle), s.current.delete(oe.id);
|
|
1245
|
+
}
|
|
1246
|
+
return Q;
|
|
1247
|
+
}), _(H, ne), H;
|
|
1248
|
+
},
|
|
1249
|
+
[i, _, t, u, e]
|
|
1250
|
+
), y = m(() => {
|
|
1251
|
+
for (const f of s.current.values())
|
|
1252
|
+
f.handle !== void 0 && clearTimeout(f.handle);
|
|
1253
|
+
s.current.clear(), o([]);
|
|
1254
|
+
}, []), j = m(() => {
|
|
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 I = v.startedAt === void 0 ? 0 : Date.now() - v.startedAt;
|
|
1261
|
+
s.current.set(f, {
|
|
1262
|
+
handle: void 0,
|
|
1263
|
+
remaining: Math.max(0, v.remaining - I),
|
|
1264
|
+
startedAt: void 0
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}, []), x = m(() => {
|
|
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,
|
|
1275
|
+
startedAt: Date.now()
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
}, [h]);
|
|
1279
|
+
S(() => {
|
|
1280
|
+
const f = s.current;
|
|
1281
|
+
return () => {
|
|
1282
|
+
for (const v of f.values())
|
|
1283
|
+
v.handle !== void 0 && clearTimeout(v.handle);
|
|
1284
|
+
f.clear();
|
|
1285
|
+
};
|
|
1286
|
+
}, []);
|
|
1287
|
+
const g = de(
|
|
1288
|
+
() => ({ show: b, dismiss: h, clear: y }),
|
|
1289
|
+
[b, h, y]
|
|
1290
|
+
);
|
|
1291
|
+
return /* @__PURE__ */ p(ge.Provider, { value: g, children: [
|
|
1292
|
+
c,
|
|
1293
|
+
/* @__PURE__ */ n(
|
|
1294
|
+
"div",
|
|
1295
|
+
{
|
|
1296
|
+
onPointerEnter: j,
|
|
1297
|
+
onPointerLeave: x,
|
|
1298
|
+
onFocusCapture: j,
|
|
1299
|
+
onBlurCapture: x,
|
|
1300
|
+
children: /* @__PURE__ */ n(vo, { placement: a, children: r.map((f) => /* @__PURE__ */ n(ve, { variant: f.variant, action: f.action, onDismiss: () => h(f.id), children: f.message }, f.id)) })
|
|
1301
|
+
}
|
|
1302
|
+
)
|
|
1303
|
+
] });
|
|
1304
|
+
}
|
|
1084
1305
|
export {
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1306
|
+
ko as AspectRatio,
|
|
1307
|
+
Me as Button,
|
|
1308
|
+
yo as Card,
|
|
1309
|
+
he as Checkbox,
|
|
1310
|
+
Fo as Dialog,
|
|
1311
|
+
xo as Field,
|
|
1312
|
+
gt as IconAlertCircle,
|
|
1313
|
+
vt as IconAlertTriangle,
|
|
1314
|
+
Po as IconArrowDown,
|
|
1315
|
+
Do as IconArrowUpRight,
|
|
1316
|
+
X as IconButton,
|
|
1317
|
+
ft as IconCheck,
|
|
1318
|
+
No as IconChevronDown,
|
|
1319
|
+
So as IconChevronRight,
|
|
1320
|
+
ue as IconClose,
|
|
1321
|
+
To as IconCopy,
|
|
1322
|
+
jo as IconEdit,
|
|
1323
|
+
Eo as IconExternalLink,
|
|
1324
|
+
Mo as IconEye,
|
|
1325
|
+
Wo as IconEyeOff,
|
|
1326
|
+
Ho as IconGitHub,
|
|
1327
|
+
pt as IconInfo,
|
|
1328
|
+
qo as IconInstagram,
|
|
1329
|
+
Ro as IconLinkedIn,
|
|
1330
|
+
Ao as IconLoader,
|
|
1331
|
+
Bo as IconMinus,
|
|
1332
|
+
Co as IconPlus,
|
|
1333
|
+
$o as IconSearch,
|
|
1334
|
+
Lo as IconSettings,
|
|
1335
|
+
Io as IconTrash,
|
|
1336
|
+
zo as IconUser,
|
|
1337
|
+
Vo as IconX,
|
|
1338
|
+
Oo as Input,
|
|
1339
|
+
Xo as Menu,
|
|
1340
|
+
_e as MenuContext,
|
|
1341
|
+
Jo as MenuItem,
|
|
1342
|
+
Qo as MenuSeparator,
|
|
1343
|
+
wo as NavBar,
|
|
1344
|
+
ir as Pagination,
|
|
1345
|
+
mo as Panel,
|
|
1346
|
+
Ko as Select,
|
|
1347
|
+
Uo as Switch,
|
|
1348
|
+
er as Table,
|
|
1349
|
+
Un as TableBody,
|
|
1350
|
+
rr as TableCell,
|
|
1351
|
+
tr as TableHead,
|
|
1352
|
+
or as TableHeaderCell,
|
|
1353
|
+
nr as TableRow,
|
|
1354
|
+
Yo as Tag,
|
|
1355
|
+
ve as Toast,
|
|
1356
|
+
ge as ToastContext,
|
|
1357
|
+
ar as ToastProvider,
|
|
1358
|
+
vo as ToastRegion,
|
|
1359
|
+
Go as Toolbar,
|
|
1360
|
+
Zo as Tooltip,
|
|
1361
|
+
sr as useToast
|
|
1133
1362
|
};
|