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