@handamade/psi-react 0.9.0 → 0.10.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/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +700 -490
- package/dist/manifest.json +250 -0
- package/dist/patterns.json +80 -16
- 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/llms.txt +10 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
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 _, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as K, useId as O, useRef as z, useEffect as x, useContext as B, useState as se, useCallback as C, cloneElement as Y, isValidElement as q, useMemo as ie, Children as H, Fragment as X } from "react";
|
|
3
|
+
const ae = "_button_c94w9_3", ce = "_disabled_c94w9_30", le = "_size24_c94w9_44", de = "_size32_c94w9_54", ue = "_size40_c94w9_64", he = "_size48_c94w9_74", _e = "_accent_c94w9_87", fe = "_accentSubtle_c94w9_99", pe = "_neutral_c94w9_111", be = "_neutralSubtle_c94w9_123", ve = "_ghost_c94w9_135", ge = "_danger_c94w9_147", ye = "_dangerSubtle_c94w9_159", we = "_outline_c94w9_171", b = {
|
|
4
|
+
button: ae,
|
|
5
|
+
disabled: ce,
|
|
6
|
+
size24: le,
|
|
7
|
+
size32: de,
|
|
8
|
+
size40: ue,
|
|
9
|
+
size48: he,
|
|
10
|
+
accent: _e,
|
|
11
|
+
accentSubtle: fe,
|
|
12
|
+
neutral: pe,
|
|
13
|
+
neutralSubtle: be,
|
|
14
|
+
ghost: ve,
|
|
15
|
+
danger: ge,
|
|
16
|
+
dangerSubtle: ye,
|
|
17
|
+
outline: we
|
|
18
|
+
}, me = {
|
|
19
|
+
accent: b.accent,
|
|
20
|
+
"accent-subtle": b.accentSubtle,
|
|
21
|
+
neutral: b.neutral,
|
|
22
|
+
"neutral-subtle": b.neutralSubtle,
|
|
23
|
+
ghost: b.ghost,
|
|
24
|
+
danger: b.danger,
|
|
25
|
+
"danger-subtle": b.dangerSubtle,
|
|
26
|
+
outline: b.outline
|
|
27
|
+
}, ke = {
|
|
28
|
+
24: b.size24,
|
|
29
|
+
32: b.size32,
|
|
30
|
+
40: b.size40,
|
|
31
|
+
48: b.size48
|
|
32
32
|
};
|
|
33
|
-
function
|
|
33
|
+
function xe({
|
|
34
34
|
variant: e = "neutral",
|
|
35
35
|
size: t = 32,
|
|
36
36
|
href: s,
|
|
37
|
-
target:
|
|
37
|
+
target: i,
|
|
38
38
|
rel: c,
|
|
39
39
|
disabled: r,
|
|
40
40
|
className: o,
|
|
41
|
-
onClick:
|
|
41
|
+
onClick: a,
|
|
42
42
|
ref: d,
|
|
43
|
-
...
|
|
43
|
+
...l
|
|
44
44
|
}) {
|
|
45
45
|
const u = [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
s !== void 0 && r ?
|
|
46
|
+
b.button,
|
|
47
|
+
me[e],
|
|
48
|
+
ke[t],
|
|
49
|
+
s !== void 0 && r ? b.disabled : void 0,
|
|
50
50
|
o
|
|
51
51
|
].filter(Boolean).join(" ");
|
|
52
52
|
return s !== void 0 ? /* @__PURE__ */ n(
|
|
@@ -55,11 +55,11 @@ function un({
|
|
|
55
55
|
ref: d,
|
|
56
56
|
className: u,
|
|
57
57
|
href: r ? void 0 : s,
|
|
58
|
-
target:
|
|
58
|
+
target: i,
|
|
59
59
|
rel: c,
|
|
60
60
|
"aria-disabled": r || void 0,
|
|
61
|
-
onClick: r ? void 0 :
|
|
62
|
-
...
|
|
61
|
+
onClick: r ? void 0 : a,
|
|
62
|
+
...l
|
|
63
63
|
}
|
|
64
64
|
) : /* @__PURE__ */ n(
|
|
65
65
|
"button",
|
|
@@ -67,50 +67,50 @@ function un({
|
|
|
67
67
|
ref: d,
|
|
68
68
|
className: u,
|
|
69
69
|
disabled: r,
|
|
70
|
-
onClick:
|
|
71
|
-
...
|
|
70
|
+
onClick: a,
|
|
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 Ce = "_iconButton_129ca_3", Be = "_disabled_129ca_29", $e = "_size24_129ca_37", ze = "_size32_129ca_42", je = "_size40_129ca_47", Le = "_size48_129ca_52", Ne = "_accent_129ca_60", Se = "_neutral_129ca_72", Ie = "_ghost_129ca_84", Me = "_danger_129ca_96", k = {
|
|
76
|
+
iconButton: Ce,
|
|
77
|
+
disabled: Be,
|
|
78
|
+
size24: $e,
|
|
79
|
+
size32: ze,
|
|
80
|
+
size40: je,
|
|
81
|
+
size48: Le,
|
|
82
|
+
accent: Ne,
|
|
83
|
+
neutral: Se,
|
|
84
|
+
ghost: Ie,
|
|
85
|
+
danger: Me
|
|
86
|
+
}, Ee = {
|
|
87
|
+
accent: k.accent,
|
|
88
|
+
neutral: k.neutral,
|
|
89
|
+
ghost: k.ghost,
|
|
90
|
+
danger: k.danger
|
|
91
|
+
}, Te = {
|
|
92
|
+
24: k.size24,
|
|
93
|
+
32: k.size32,
|
|
94
|
+
40: k.size40,
|
|
95
|
+
48: k.size48
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function U({
|
|
98
98
|
variant: e = "neutral",
|
|
99
99
|
size: t = 32,
|
|
100
100
|
href: s,
|
|
101
|
-
target:
|
|
101
|
+
target: i,
|
|
102
102
|
rel: c,
|
|
103
103
|
disabled: r,
|
|
104
104
|
className: o,
|
|
105
|
-
onClick:
|
|
105
|
+
onClick: a,
|
|
106
106
|
ref: d,
|
|
107
|
-
...
|
|
107
|
+
...l
|
|
108
108
|
}) {
|
|
109
109
|
const u = [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
s !== void 0 && r ?
|
|
110
|
+
k.iconButton,
|
|
111
|
+
Ee[e],
|
|
112
|
+
Te[t],
|
|
113
|
+
s !== void 0 && r ? k.disabled : void 0,
|
|
114
114
|
o
|
|
115
115
|
].filter(Boolean).join(" ");
|
|
116
116
|
return s !== void 0 ? /* @__PURE__ */ n(
|
|
@@ -119,11 +119,11 @@ function Ce({
|
|
|
119
119
|
ref: d,
|
|
120
120
|
className: u,
|
|
121
121
|
href: r ? void 0 : s,
|
|
122
|
-
target:
|
|
122
|
+
target: i,
|
|
123
123
|
rel: c,
|
|
124
124
|
"aria-disabled": r || void 0,
|
|
125
|
-
onClick: r ? void 0 :
|
|
126
|
-
...
|
|
125
|
+
onClick: r ? void 0 : a,
|
|
126
|
+
...l
|
|
127
127
|
}
|
|
128
128
|
) : /* @__PURE__ */ n(
|
|
129
129
|
"button",
|
|
@@ -131,190 +131,190 @@ function Ce({
|
|
|
131
131
|
ref: d,
|
|
132
132
|
className: u,
|
|
133
133
|
disabled: r,
|
|
134
|
-
onClick:
|
|
135
|
-
...
|
|
134
|
+
onClick: a,
|
|
135
|
+
...l
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
const
|
|
140
|
-
card:
|
|
141
|
-
stacked:
|
|
142
|
-
featured:
|
|
143
|
-
media:
|
|
144
|
-
body:
|
|
145
|
-
hoverLift:
|
|
139
|
+
const We = "_card_1btb3_1", Ae = "_stacked_1btb3_8", Pe = "_featured_1btb3_10", He = "_media_1btb3_22", Re = "_body_1btb3_23", De = "_hoverLift_1btb3_31", L = {
|
|
140
|
+
card: We,
|
|
141
|
+
stacked: Ae,
|
|
142
|
+
featured: Pe,
|
|
143
|
+
media: He,
|
|
144
|
+
body: Re,
|
|
145
|
+
hoverLift: De
|
|
146
146
|
};
|
|
147
|
-
function
|
|
147
|
+
function An({
|
|
148
148
|
variant: e = "stacked",
|
|
149
149
|
media: t,
|
|
150
150
|
hoverLift: s = !1,
|
|
151
|
-
className:
|
|
151
|
+
className: i,
|
|
152
152
|
children: c,
|
|
153
153
|
ref: r,
|
|
154
154
|
...o
|
|
155
155
|
}) {
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
e === "featured" ?
|
|
159
|
-
s ?
|
|
160
|
-
|
|
156
|
+
const a = [
|
|
157
|
+
L.card,
|
|
158
|
+
e === "featured" ? L.featured : L.stacked,
|
|
159
|
+
s ? L.hoverLift : void 0,
|
|
160
|
+
i
|
|
161
161
|
].filter(Boolean).join(" ");
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
t != null && /* @__PURE__ */ n("div", { className:
|
|
164
|
-
/* @__PURE__ */ n("div", { className:
|
|
162
|
+
return /* @__PURE__ */ _("div", { ref: r, className: a, ...o, children: [
|
|
163
|
+
t != null && /* @__PURE__ */ n("div", { className: L.media, children: t }),
|
|
164
|
+
/* @__PURE__ */ n("div", { className: L.body, children: c })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
panel:
|
|
169
|
-
padding16:
|
|
167
|
+
const Ve = "_panel_jn8w4_1", qe = "_padding16_jn8w4_8", J = {
|
|
168
|
+
panel: Ve,
|
|
169
|
+
padding16: qe
|
|
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 Pn({ padding: e = 24, className: t, children: s, ref: i, ...c }) {
|
|
172
|
+
const r = [J.panel, e === 16 ? J.padding16 : void 0, t].filter(Boolean).join(" ");
|
|
173
|
+
return /* @__PURE__ */ n("div", { ref: i, className: r, ...c, children: s });
|
|
174
|
+
}
|
|
175
|
+
const Fe = "_navbar_1gyow_1", Ke = "_inner_1gyow_12", Oe = "_brand_1gyow_19", Ue = "_links_1gyow_20", Ye = "_actions_1gyow_50", W = {
|
|
176
|
+
navbar: Fe,
|
|
177
|
+
inner: Ke,
|
|
178
|
+
brand: Oe,
|
|
179
|
+
links: Ue,
|
|
180
|
+
actions: Ye
|
|
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 Hn({ brand: e, actions: t, children: s, className: i, ref: c, ...r }) {
|
|
183
|
+
const o = [W.navbar, i].filter(Boolean).join(" ");
|
|
184
|
+
return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ _("div", { className: `psi-container ${W.inner}`, children: [
|
|
185
|
+
e != null && /* @__PURE__ */ n("div", { className: W.brand, children: e }),
|
|
186
|
+
/* @__PURE__ */ n("nav", { className: W.links, children: s }),
|
|
187
|
+
t != null && /* @__PURE__ */ n("div", { className: W.actions, children: t })
|
|
188
188
|
] }) });
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
frame:
|
|
190
|
+
const Ze = "_frame_et4fc_1", Ge = {
|
|
191
|
+
frame: Ze
|
|
192
192
|
};
|
|
193
|
-
function
|
|
194
|
-
const o = [
|
|
195
|
-
return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...s }, ...r, children:
|
|
196
|
-
}
|
|
197
|
-
const
|
|
198
|
-
field:
|
|
199
|
-
label:
|
|
200
|
-
marker:
|
|
201
|
-
message:
|
|
202
|
-
invalid:
|
|
203
|
-
},
|
|
204
|
-
function
|
|
193
|
+
function Rn({ ratio: e, className: t, style: s, children: i, ref: c, ...r }) {
|
|
194
|
+
const o = [Ge.frame, t].filter(Boolean).join(" ");
|
|
195
|
+
return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...s }, ...r, children: i });
|
|
196
|
+
}
|
|
197
|
+
const Xe = "_field_lplye_1", Je = "_label_lplye_10", Qe = "_marker_lplye_16", et = "_message_lplye_20", tt = "_invalid_lplye_26", N = {
|
|
198
|
+
field: Xe,
|
|
199
|
+
label: Je,
|
|
200
|
+
marker: Qe,
|
|
201
|
+
message: et,
|
|
202
|
+
invalid: tt
|
|
203
|
+
}, Z = K(null);
|
|
204
|
+
function Dn({
|
|
205
205
|
label: e,
|
|
206
206
|
description: t,
|
|
207
207
|
error: s,
|
|
208
|
-
required:
|
|
208
|
+
required: i = !1,
|
|
209
209
|
group: c = !1,
|
|
210
210
|
htmlFor: r,
|
|
211
211
|
className: o,
|
|
212
|
-
children:
|
|
212
|
+
children: a,
|
|
213
213
|
ref: d,
|
|
214
|
-
...
|
|
214
|
+
...l
|
|
215
215
|
}) {
|
|
216
|
-
const u =
|
|
216
|
+
const u = O(), f = r ?? u, h = !!s, y = h ? s : t, w = y != null && y !== !1 ? `${f}-message` : void 0, j = [N.field, h && N.invalid, o].filter(Boolean).join(" "), p = e != null ? /* @__PURE__ */ _(V, { children: [
|
|
217
217
|
e,
|
|
218
|
-
|
|
219
|
-
] }) : null,
|
|
220
|
-
|
|
221
|
-
/* @__PURE__ */ n(
|
|
222
|
-
|
|
218
|
+
i && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: N.marker, children: " *" })
|
|
219
|
+
] }) : null, R = /* @__PURE__ */ _(V, { children: [
|
|
220
|
+
p != null && (c ? /* @__PURE__ */ n("legend", { className: N.label, children: p }) : /* @__PURE__ */ n("label", { className: N.label, htmlFor: f, children: p })),
|
|
221
|
+
/* @__PURE__ */ n(Z.Provider, { value: { id: f, describedBy: w, invalid: h, required: i }, children: a }),
|
|
222
|
+
w && /* @__PURE__ */ n("p", { id: w, className: N.message, "aria-live": "polite", children: y })
|
|
223
223
|
] });
|
|
224
224
|
return c ? /* @__PURE__ */ n(
|
|
225
225
|
"fieldset",
|
|
226
226
|
{
|
|
227
227
|
ref: d,
|
|
228
|
-
className:
|
|
229
|
-
"aria-describedby":
|
|
230
|
-
...
|
|
231
|
-
children:
|
|
228
|
+
className: j,
|
|
229
|
+
"aria-describedby": w,
|
|
230
|
+
...l,
|
|
231
|
+
children: R
|
|
232
232
|
}
|
|
233
|
-
) : /* @__PURE__ */ n("div", { ref: d, className:
|
|
233
|
+
) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children: R });
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return /* @__PURE__ */
|
|
235
|
+
function Vn({ size: e = 20, ...t }) {
|
|
236
|
+
return /* @__PURE__ */ _("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 qn({ 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 nt({ size: e = 20, ...t }) {
|
|
245
|
+
return /* @__PURE__ */ _("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 Fn({ 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 Kn({ 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 On({ 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 Un({ size: e = 20, ...t }) {
|
|
260
|
+
return /* @__PURE__ */ _("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 Yn({ size: e = 20, ...t }) {
|
|
266
|
+
return /* @__PURE__ */ _("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 Zn({ size: e = 20, ...t }) {
|
|
272
|
+
return /* @__PURE__ */ _("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 Gn({ size: e = 20, ...t }) {
|
|
278
|
+
return /* @__PURE__ */ _("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 Xn({ size: e = 20, ...t }) {
|
|
284
|
+
return /* @__PURE__ */ _("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 Jn({ size: e = 20, ...t }) {
|
|
290
|
+
return /* @__PURE__ */ _("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 Qn({ size: e = 20, ...t }) {
|
|
296
|
+
return /* @__PURE__ */ _("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 eo({ size: e = 20, ...t }) {
|
|
303
|
+
return /* @__PURE__ */ _("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 to({ size: e = 20, ...t }) {
|
|
309
|
+
return /* @__PURE__ */ _("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 no({ size: e = 20, ...t }) {
|
|
317
|
+
return /* @__PURE__ */ _("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,127 +325,127 @@ 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 oo({ size: e = 20, ...t }) {
|
|
329
|
+
return /* @__PURE__ */ _("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 ro({ size: e = 20, ...t }) {
|
|
335
|
+
return /* @__PURE__ */ _("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 so({ 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 io({ 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 ao({ 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 co({ size: e = 20, ...t }) {
|
|
350
|
+
return /* @__PURE__ */ _("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
|
-
const
|
|
357
|
-
dialog:
|
|
358
|
-
w400:
|
|
359
|
-
w560:
|
|
360
|
-
w720:
|
|
361
|
-
panel:
|
|
362
|
-
header:
|
|
363
|
-
title:
|
|
364
|
-
footer:
|
|
365
|
-
},
|
|
366
|
-
400:
|
|
367
|
-
560:
|
|
368
|
-
720:
|
|
356
|
+
const ot = "_dialog_l23jf_2", rt = "_w400_l23jf_31", st = "_w560_l23jf_32", it = "_w720_l23jf_33", at = "_panel_l23jf_35", ct = "_header_l23jf_41", lt = "_title_l23jf_48", dt = "_footer_l23jf_54", $ = {
|
|
357
|
+
dialog: ot,
|
|
358
|
+
w400: rt,
|
|
359
|
+
w560: st,
|
|
360
|
+
w720: it,
|
|
361
|
+
panel: at,
|
|
362
|
+
header: ct,
|
|
363
|
+
title: lt,
|
|
364
|
+
footer: dt
|
|
365
|
+
}, ut = {
|
|
366
|
+
400: $.w400,
|
|
367
|
+
560: $.w560,
|
|
368
|
+
720: $.w720
|
|
369
369
|
};
|
|
370
|
-
function
|
|
370
|
+
function lo({
|
|
371
371
|
open: e,
|
|
372
372
|
onClose: t,
|
|
373
373
|
title: s,
|
|
374
|
-
footer:
|
|
374
|
+
footer: i,
|
|
375
375
|
width: c = 560,
|
|
376
376
|
dismissible: r = !0,
|
|
377
377
|
className: o,
|
|
378
|
-
children:
|
|
378
|
+
children: a,
|
|
379
379
|
ref: d,
|
|
380
|
-
...
|
|
380
|
+
...l
|
|
381
381
|
}) {
|
|
382
|
-
const u = z(null),
|
|
383
|
-
u.current =
|
|
382
|
+
const u = z(null), f = O(), h = (p) => {
|
|
383
|
+
u.current = p, typeof d == "function" ? d(p) : d && (d.current = p);
|
|
384
384
|
};
|
|
385
385
|
x(() => {
|
|
386
|
-
const
|
|
387
|
-
|
|
386
|
+
const p = u.current;
|
|
387
|
+
p && (e && !p.open ? p.showModal() : !e && p.open && p.close());
|
|
388
388
|
}, [e]), x(() => {
|
|
389
389
|
if (!e) return;
|
|
390
|
-
const
|
|
390
|
+
const p = document.body.style.overflow;
|
|
391
391
|
return document.body.style.overflow = "hidden", () => {
|
|
392
|
-
document.body.style.overflow =
|
|
392
|
+
document.body.style.overflow = p;
|
|
393
393
|
};
|
|
394
394
|
}, [e]);
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
},
|
|
398
|
-
r &&
|
|
399
|
-
},
|
|
395
|
+
const y = (p) => {
|
|
396
|
+
p.preventDefault(), r && t("esc");
|
|
397
|
+
}, w = (p) => {
|
|
398
|
+
r && p.target === u.current && t("backdrop");
|
|
399
|
+
}, j = [$.dialog, ut[c], o].filter(Boolean).join(" ");
|
|
400
400
|
return /* @__PURE__ */ n(
|
|
401
401
|
"dialog",
|
|
402
402
|
{
|
|
403
|
-
ref:
|
|
404
|
-
className:
|
|
405
|
-
"aria-labelledby": s != null ?
|
|
406
|
-
onCancel:
|
|
407
|
-
onClick:
|
|
408
|
-
...
|
|
409
|
-
children: /* @__PURE__ */
|
|
410
|
-
(s != null || r) && /* @__PURE__ */
|
|
411
|
-
s != null && /* @__PURE__ */ n("h2", { id:
|
|
403
|
+
ref: h,
|
|
404
|
+
className: j,
|
|
405
|
+
"aria-labelledby": s != null ? f : void 0,
|
|
406
|
+
onCancel: y,
|
|
407
|
+
onClick: w,
|
|
408
|
+
...l,
|
|
409
|
+
children: /* @__PURE__ */ _("div", { className: $.panel, children: [
|
|
410
|
+
(s != null || r) && /* @__PURE__ */ _("div", { className: $.header, children: [
|
|
411
|
+
s != null && /* @__PURE__ */ n("h2", { id: f, className: $.title, children: s }),
|
|
412
412
|
r && /* @__PURE__ */ n(
|
|
413
|
-
|
|
413
|
+
U,
|
|
414
414
|
{
|
|
415
415
|
variant: "ghost",
|
|
416
416
|
size: 32,
|
|
417
417
|
"aria-label": "Close dialog",
|
|
418
418
|
onClick: () => t("close-button"),
|
|
419
|
-
children: /* @__PURE__ */ n(
|
|
419
|
+
children: /* @__PURE__ */ n(nt, { "aria-hidden": "true" })
|
|
420
420
|
}
|
|
421
421
|
)
|
|
422
422
|
] }),
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
a,
|
|
424
|
+
i != null && /* @__PURE__ */ n("div", { className: $.footer, children: i })
|
|
425
425
|
] })
|
|
426
426
|
}
|
|
427
427
|
);
|
|
428
428
|
}
|
|
429
|
-
const
|
|
430
|
-
input:
|
|
431
|
-
size24:
|
|
432
|
-
size32:
|
|
433
|
-
size40:
|
|
434
|
-
size48:
|
|
435
|
-
error:
|
|
436
|
-
},
|
|
437
|
-
24:
|
|
438
|
-
32:
|
|
439
|
-
40:
|
|
440
|
-
48:
|
|
429
|
+
const ht = "_input_hpei8_3", _t = "_size24_hpei8_37", ft = "_size32_hpei8_43", pt = "_size40_hpei8_49", bt = "_size48_hpei8_55", vt = "_error_hpei8_63", I = {
|
|
430
|
+
input: ht,
|
|
431
|
+
size24: _t,
|
|
432
|
+
size32: ft,
|
|
433
|
+
size40: pt,
|
|
434
|
+
size48: bt,
|
|
435
|
+
error: vt
|
|
436
|
+
}, gt = {
|
|
437
|
+
24: I.size24,
|
|
438
|
+
32: I.size32,
|
|
439
|
+
40: I.size40,
|
|
440
|
+
48: I.size48
|
|
441
441
|
};
|
|
442
|
-
function
|
|
443
|
-
const o =
|
|
442
|
+
function uo({ size: e = 32, error: t = !1, type: s = "text", className: i, ref: c, ...r }) {
|
|
443
|
+
const o = B(Z), a = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [I.input, gt[e], a && I.error, i].filter(Boolean).join(" ");
|
|
444
444
|
return /* @__PURE__ */ n(
|
|
445
445
|
"input",
|
|
446
446
|
{
|
|
447
447
|
ref: c,
|
|
448
|
-
className:
|
|
448
|
+
className: l,
|
|
449
449
|
id: r.id ?? (o == null ? void 0 : o.id),
|
|
450
450
|
required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
|
|
451
451
|
"aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
|
|
@@ -455,38 +455,38 @@ function Hn({ size: e = 32, error: t = !1, type: s = "text", className: a, ref:
|
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
}
|
|
458
|
-
const
|
|
459
|
-
select:
|
|
460
|
-
size24:
|
|
461
|
-
size32:
|
|
462
|
-
size40:
|
|
463
|
-
size48:
|
|
464
|
-
error:
|
|
465
|
-
},
|
|
466
|
-
24:
|
|
467
|
-
32:
|
|
468
|
-
40:
|
|
469
|
-
48:
|
|
458
|
+
const yt = "_select_4x9ck_3", wt = "_size24_4x9ck_37", mt = "_size32_4x9ck_45", kt = "_size40_4x9ck_53", xt = "_size48_4x9ck_61", Ct = "_error_4x9ck_71", M = {
|
|
459
|
+
select: yt,
|
|
460
|
+
size24: wt,
|
|
461
|
+
size32: mt,
|
|
462
|
+
size40: kt,
|
|
463
|
+
size48: xt,
|
|
464
|
+
error: Ct
|
|
465
|
+
}, Bt = {
|
|
466
|
+
24: M.size24,
|
|
467
|
+
32: M.size32,
|
|
468
|
+
40: M.size40,
|
|
469
|
+
48: M.size48
|
|
470
470
|
};
|
|
471
|
-
function
|
|
471
|
+
function ho({
|
|
472
472
|
size: e = 32,
|
|
473
473
|
error: t = !1,
|
|
474
474
|
className: s,
|
|
475
|
-
ref:
|
|
475
|
+
ref: i,
|
|
476
476
|
children: c,
|
|
477
477
|
...r
|
|
478
478
|
}) {
|
|
479
|
-
const o =
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
479
|
+
const o = B(Z), a = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [
|
|
480
|
+
M.select,
|
|
481
|
+
Bt[e],
|
|
482
|
+
a && M.error,
|
|
483
483
|
s
|
|
484
484
|
].filter(Boolean).join(" ");
|
|
485
485
|
return /* @__PURE__ */ n(
|
|
486
486
|
"select",
|
|
487
487
|
{
|
|
488
|
-
ref:
|
|
489
|
-
className:
|
|
488
|
+
ref: i,
|
|
489
|
+
className: l,
|
|
490
490
|
id: r.id ?? (o == null ? void 0 : o.id),
|
|
491
491
|
required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
|
|
492
492
|
"aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
|
|
@@ -496,114 +496,114 @@ function Vn({
|
|
|
496
496
|
}
|
|
497
497
|
);
|
|
498
498
|
}
|
|
499
|
-
const
|
|
500
|
-
label:
|
|
501
|
-
disabled:
|
|
502
|
-
input:
|
|
503
|
-
indicator:
|
|
504
|
-
text:
|
|
499
|
+
const $t = "_label_1v4vv_3", zt = "_disabled_1v4vv_13", jt = "_input_1v4vv_20", Lt = "_indicator_1v4vv_34", Nt = "_text_1v4vv_75", A = {
|
|
500
|
+
label: $t,
|
|
501
|
+
disabled: zt,
|
|
502
|
+
input: jt,
|
|
503
|
+
indicator: Lt,
|
|
504
|
+
text: Nt
|
|
505
505
|
};
|
|
506
|
-
function
|
|
506
|
+
function te({
|
|
507
507
|
children: e,
|
|
508
508
|
className: t,
|
|
509
509
|
disabled: s,
|
|
510
|
-
ref:
|
|
510
|
+
ref: i,
|
|
511
511
|
...c
|
|
512
512
|
}) {
|
|
513
|
-
const r = [
|
|
514
|
-
return /* @__PURE__ */
|
|
513
|
+
const r = [A.label, s && A.disabled, t].filter(Boolean).join(" ");
|
|
514
|
+
return /* @__PURE__ */ _("label", { className: r, children: [
|
|
515
515
|
/* @__PURE__ */ n(
|
|
516
516
|
"input",
|
|
517
517
|
{
|
|
518
|
-
ref:
|
|
518
|
+
ref: i,
|
|
519
519
|
type: "checkbox",
|
|
520
|
-
className:
|
|
520
|
+
className: A.input,
|
|
521
521
|
disabled: s,
|
|
522
522
|
...c
|
|
523
523
|
}
|
|
524
524
|
),
|
|
525
|
-
/* @__PURE__ */ n("span", { className:
|
|
526
|
-
e && /* @__PURE__ */ n("span", { className:
|
|
525
|
+
/* @__PURE__ */ n("span", { className: A.indicator, "aria-hidden": "true" }),
|
|
526
|
+
e && /* @__PURE__ */ n("span", { className: A.text, children: e })
|
|
527
527
|
] });
|
|
528
528
|
}
|
|
529
|
-
const
|
|
530
|
-
label:
|
|
531
|
-
disabled:
|
|
532
|
-
input:
|
|
533
|
-
track:
|
|
534
|
-
thumb:
|
|
535
|
-
text:
|
|
529
|
+
const St = "_label_jru2c_3", It = "_disabled_jru2c_13", Mt = "_input_jru2c_20", Et = "_track_jru2c_34", Tt = "_thumb_jru2c_58", Wt = "_text_jru2c_75", S = {
|
|
530
|
+
label: St,
|
|
531
|
+
disabled: It,
|
|
532
|
+
input: Mt,
|
|
533
|
+
track: Et,
|
|
534
|
+
thumb: Tt,
|
|
535
|
+
text: Wt
|
|
536
536
|
};
|
|
537
|
-
function
|
|
537
|
+
function _o({
|
|
538
538
|
children: e,
|
|
539
539
|
className: t,
|
|
540
540
|
disabled: s,
|
|
541
|
-
ref:
|
|
541
|
+
ref: i,
|
|
542
542
|
...c
|
|
543
543
|
}) {
|
|
544
|
-
const r = [
|
|
545
|
-
return /* @__PURE__ */
|
|
544
|
+
const r = [S.label, s && S.disabled, t].filter(Boolean).join(" ");
|
|
545
|
+
return /* @__PURE__ */ _("label", { className: r, children: [
|
|
546
546
|
/* @__PURE__ */ n(
|
|
547
547
|
"input",
|
|
548
548
|
{
|
|
549
|
-
ref:
|
|
549
|
+
ref: i,
|
|
550
550
|
type: "checkbox",
|
|
551
551
|
role: "switch",
|
|
552
|
-
className:
|
|
552
|
+
className: S.input,
|
|
553
553
|
disabled: s,
|
|
554
554
|
...c
|
|
555
555
|
}
|
|
556
556
|
),
|
|
557
|
-
/* @__PURE__ */ n("span", { className:
|
|
558
|
-
e && /* @__PURE__ */ n("span", { className:
|
|
557
|
+
/* @__PURE__ */ n("span", { className: S.track, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: S.thumb }) }),
|
|
558
|
+
e && /* @__PURE__ */ n("span", { className: S.text, children: e })
|
|
559
559
|
] });
|
|
560
560
|
}
|
|
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:
|
|
561
|
+
const At = "_tag_3oysa_3", Pt = "_dismiss_3oysa_17", Ht = "_neutral_3oysa_43", Rt = "_accent_3oysa_48", Dt = "_success_3oysa_53", Vt = "_warning_3oysa_58", qt = "_danger_3oysa_63", Ft = "_neutralSubtle_3oysa_70", Kt = "_accentSubtle_3oysa_75", Ot = "_successSubtle_3oysa_80", Ut = "_warningSubtle_3oysa_85", Yt = "_dangerSubtle_3oysa_90", m = {
|
|
562
|
+
tag: At,
|
|
563
|
+
dismiss: Pt,
|
|
564
|
+
neutral: Ht,
|
|
565
|
+
accent: Rt,
|
|
566
|
+
success: Dt,
|
|
567
|
+
warning: Vt,
|
|
568
|
+
danger: qt,
|
|
569
|
+
neutralSubtle: Ft,
|
|
570
|
+
accentSubtle: Kt,
|
|
571
|
+
successSubtle: Ot,
|
|
572
|
+
warningSubtle: Ut,
|
|
573
|
+
dangerSubtle: Yt
|
|
574
|
+
}, Zt = {
|
|
575
|
+
neutral: m.neutral,
|
|
576
|
+
accent: m.accent,
|
|
577
|
+
success: m.success,
|
|
578
|
+
warning: m.warning,
|
|
579
|
+
danger: m.danger
|
|
580
|
+
}, Gt = {
|
|
581
|
+
neutral: m.neutralSubtle,
|
|
582
|
+
accent: m.accentSubtle,
|
|
583
|
+
success: m.successSubtle,
|
|
584
|
+
warning: m.warningSubtle,
|
|
585
|
+
danger: m.dangerSubtle
|
|
586
586
|
};
|
|
587
|
-
function
|
|
587
|
+
function fo({
|
|
588
588
|
variant: e = "neutral",
|
|
589
589
|
subtle: t = !1,
|
|
590
590
|
onDismiss: s,
|
|
591
|
-
className:
|
|
591
|
+
className: i,
|
|
592
592
|
children: c,
|
|
593
593
|
ref: r,
|
|
594
594
|
...o
|
|
595
595
|
}) {
|
|
596
|
-
const
|
|
597
|
-
return /* @__PURE__ */
|
|
596
|
+
const a = t ? Gt : Zt, d = [m.tag, a[e], i].filter(Boolean).join(" ");
|
|
597
|
+
return /* @__PURE__ */ _("span", { ref: r, className: d, ...o, children: [
|
|
598
598
|
c,
|
|
599
599
|
s && /* @__PURE__ */ n(
|
|
600
600
|
"button",
|
|
601
601
|
{
|
|
602
602
|
type: "button",
|
|
603
|
-
className:
|
|
603
|
+
className: m.dismiss,
|
|
604
604
|
onClick: s,
|
|
605
605
|
"aria-label": "Dismiss",
|
|
606
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ _(
|
|
607
607
|
"svg",
|
|
608
608
|
{
|
|
609
609
|
width: "12",
|
|
@@ -625,239 +625,239 @@ function Rn({
|
|
|
625
625
|
)
|
|
626
626
|
] });
|
|
627
627
|
}
|
|
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
|
|
628
|
+
const Xt = "_wrapper_1eu6z_3", Jt = "_tooltip_1eu6z_10", Qt = "_top_1eu6z_24", en = "_bottom_1eu6z_31", tn = "_left_1eu6z_38", nn = "_right_1eu6z_45", E = {
|
|
629
|
+
wrapper: Xt,
|
|
630
|
+
tooltip: Jt,
|
|
631
|
+
top: Qt,
|
|
632
|
+
bottom: en,
|
|
633
|
+
left: tn,
|
|
634
|
+
right: nn
|
|
635
|
+
}, on = {
|
|
636
|
+
top: E.top,
|
|
637
|
+
bottom: E.bottom,
|
|
638
|
+
left: E.left,
|
|
639
|
+
right: E.right
|
|
640
|
+
}, rn = 150;
|
|
641
|
+
function po({
|
|
642
642
|
content: e,
|
|
643
643
|
children: t,
|
|
644
644
|
placement: s = "top"
|
|
645
645
|
}) {
|
|
646
|
-
const [
|
|
646
|
+
const [i, c] = se(!1), r = O(), o = z(void 0), a = C(() => {
|
|
647
647
|
o.current !== void 0 && (window.clearTimeout(o.current), o.current = void 0);
|
|
648
|
-
}, []), d =
|
|
649
|
-
x(() =>
|
|
650
|
-
if (!
|
|
651
|
-
const
|
|
652
|
-
|
|
648
|
+
}, []), d = C(() => c(!0), []), l = C(() => c(!1), []);
|
|
649
|
+
x(() => a, [a]), x(() => {
|
|
650
|
+
if (!i) return;
|
|
651
|
+
const f = (h) => {
|
|
652
|
+
h.key === "Escape" && l();
|
|
653
653
|
};
|
|
654
|
-
return document.addEventListener("keydown",
|
|
655
|
-
}, [
|
|
656
|
-
const u =
|
|
657
|
-
"aria-describedby":
|
|
658
|
-
onMouseEnter: (
|
|
659
|
-
|
|
660
|
-
const
|
|
661
|
-
|
|
654
|
+
return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
|
|
655
|
+
}, [i, l]);
|
|
656
|
+
const u = Y(t, {
|
|
657
|
+
"aria-describedby": i ? r : void 0,
|
|
658
|
+
onMouseEnter: (f) => {
|
|
659
|
+
a(), o.current = window.setTimeout(d, rn);
|
|
660
|
+
const h = t.props.onMouseEnter;
|
|
661
|
+
h == null || h(f);
|
|
662
662
|
},
|
|
663
|
-
onMouseLeave: (
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
|
|
663
|
+
onMouseLeave: (f) => {
|
|
664
|
+
a(), l();
|
|
665
|
+
const h = t.props.onMouseLeave;
|
|
666
|
+
h == null || h(f);
|
|
667
667
|
},
|
|
668
|
-
onFocus: (
|
|
668
|
+
onFocus: (f) => {
|
|
669
669
|
d();
|
|
670
|
-
const
|
|
671
|
-
|
|
670
|
+
const h = t.props.onFocus;
|
|
671
|
+
h == null || h(f);
|
|
672
672
|
},
|
|
673
|
-
onBlur: (
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
|
|
673
|
+
onBlur: (f) => {
|
|
674
|
+
a(), l();
|
|
675
|
+
const h = t.props.onBlur;
|
|
676
|
+
h == null || h(f);
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ _("span", { className: E.wrapper, children: [
|
|
680
680
|
u,
|
|
681
|
-
|
|
681
|
+
i && /* @__PURE__ */ n(
|
|
682
682
|
"span",
|
|
683
683
|
{
|
|
684
684
|
id: r,
|
|
685
685
|
role: "tooltip",
|
|
686
|
-
className: [
|
|
686
|
+
className: [E.tooltip, on[s]].filter(Boolean).join(" "),
|
|
687
687
|
children: e
|
|
688
688
|
}
|
|
689
689
|
)
|
|
690
690
|
] });
|
|
691
691
|
}
|
|
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 = z(""), r = z(0), o =
|
|
710
|
-
const
|
|
711
|
-
return
|
|
712
|
-
|
|
692
|
+
const sn = "_toolbar_1i848_1", an = "_gap8_1i848_7", cn = "_gap12_1i848_8", ln = "_gap16_1i848_9", D = {
|
|
693
|
+
toolbar: sn,
|
|
694
|
+
gap8: an,
|
|
695
|
+
gap12: cn,
|
|
696
|
+
gap16: ln
|
|
697
|
+
}, dn = { 8: D.gap8, 12: D.gap12, 16: D.gap16 };
|
|
698
|
+
function bo({ gap: e = 8, className: t, children: s, ref: i, ...c }) {
|
|
699
|
+
const r = [D.toolbar, dn[e], t].filter(Boolean).join(" ");
|
|
700
|
+
return /* @__PURE__ */ n("div", { ref: i, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: s });
|
|
701
|
+
}
|
|
702
|
+
const un = "_trigger_vpa0u_4", hn = "_menu_vpa0u_16", _n = "_item_vpa0u_37", fn = "_separator_vpa0u_74", F = {
|
|
703
|
+
trigger: un,
|
|
704
|
+
menu: hn,
|
|
705
|
+
item: _n,
|
|
706
|
+
separator: fn
|
|
707
|
+
}, pn = 500;
|
|
708
|
+
function bn({ popoverRef: e, triggerRef: t, open: s, onEsc: i }) {
|
|
709
|
+
const c = z(""), r = z(0), o = C(() => {
|
|
710
|
+
const l = e.current;
|
|
711
|
+
return l ? Array.from(
|
|
712
|
+
l.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
|
|
713
713
|
) : [];
|
|
714
|
-
}, [e]),
|
|
715
|
-
(
|
|
716
|
-
if (
|
|
717
|
-
for (const u of o()) u.tabIndex = u ===
|
|
718
|
-
|
|
714
|
+
}, [e]), a = C(
|
|
715
|
+
(l) => {
|
|
716
|
+
if (l) {
|
|
717
|
+
for (const u of o()) u.tabIndex = u === l ? 0 : -1;
|
|
718
|
+
l.focus();
|
|
719
719
|
}
|
|
720
720
|
},
|
|
721
721
|
[o]
|
|
722
|
-
), d =
|
|
722
|
+
), d = C(() => {
|
|
723
723
|
var u;
|
|
724
|
-
const
|
|
725
|
-
|
|
724
|
+
const l = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
|
|
725
|
+
l == null || l.focus();
|
|
726
726
|
}, [t]);
|
|
727
727
|
return x(() => {
|
|
728
728
|
if (!s) return;
|
|
729
|
-
const
|
|
730
|
-
return l
|
|
729
|
+
const l = o();
|
|
730
|
+
return a(l[0]), () => {
|
|
731
731
|
var u;
|
|
732
732
|
(u = e.current) != null && u.contains(document.activeElement) && d();
|
|
733
733
|
};
|
|
734
|
-
}, [s, e, o,
|
|
735
|
-
(
|
|
736
|
-
if (
|
|
737
|
-
|
|
734
|
+
}, [s, e, o, a, d]), C(
|
|
735
|
+
(l) => {
|
|
736
|
+
if (l.key === "Escape") {
|
|
737
|
+
l.preventDefault(), i();
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
740
|
const u = o();
|
|
741
741
|
if (u.length === 0) return;
|
|
742
|
-
const
|
|
743
|
-
switch (
|
|
742
|
+
const f = u.indexOf(document.activeElement);
|
|
743
|
+
switch (l.key) {
|
|
744
744
|
case "ArrowDown":
|
|
745
|
-
|
|
745
|
+
l.preventDefault(), a(u[(f + 1 + u.length) % u.length]);
|
|
746
746
|
return;
|
|
747
747
|
case "ArrowUp":
|
|
748
|
-
|
|
748
|
+
l.preventDefault(), a(u[f <= 0 ? u.length - 1 : f - 1]);
|
|
749
749
|
return;
|
|
750
750
|
case "Home":
|
|
751
|
-
|
|
751
|
+
l.preventDefault(), a(u[0]);
|
|
752
752
|
return;
|
|
753
753
|
case "End":
|
|
754
|
-
|
|
754
|
+
l.preventDefault(), a(u[u.length - 1]);
|
|
755
755
|
return;
|
|
756
756
|
}
|
|
757
|
-
if (
|
|
758
|
-
const
|
|
759
|
-
c.current =
|
|
760
|
-
const
|
|
761
|
-
(
|
|
757
|
+
if (l.key.length !== 1 || l.metaKey || l.ctrlKey || l.altKey) return;
|
|
758
|
+
const h = Date.now();
|
|
759
|
+
c.current = h - r.current > pn ? l.key.toLowerCase() : c.current + l.key.toLowerCase(), r.current = h;
|
|
760
|
+
const y = u.find(
|
|
761
|
+
(w) => (w.textContent ?? "").trim().toLowerCase().startsWith(c.current)
|
|
762
762
|
);
|
|
763
|
-
|
|
763
|
+
y && (l.preventDefault(), a(y));
|
|
764
764
|
},
|
|
765
|
-
[o,
|
|
765
|
+
[o, a, i]
|
|
766
766
|
);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function vn() {
|
|
769
769
|
return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function gn({ popoverRef: e, triggerRef: t, open: s, placement: i, anchorName: c }) {
|
|
772
772
|
x(() => {
|
|
773
773
|
const r = t.current, o = e.current;
|
|
774
774
|
!r || !o || (r.style.setProperty("anchor-name", c), o.style.setProperty("position-anchor", c));
|
|
775
775
|
}, [e, t, c]), x(() => {
|
|
776
|
-
if (!s ||
|
|
776
|
+
if (!s || vn()) return;
|
|
777
777
|
const r = t.current, o = e.current;
|
|
778
778
|
if (!r || !o) return;
|
|
779
|
-
const
|
|
780
|
-
const d = r.getBoundingClientRect(),
|
|
781
|
-
o.style.position = "fixed", o.style.top =
|
|
779
|
+
const a = () => {
|
|
780
|
+
const d = r.getBoundingClientRect(), l = i.startsWith("bottom"), u = i.endsWith("end"), f = getComputedStyle(r).direction === "rtl", h = u !== f;
|
|
781
|
+
o.style.position = "fixed", o.style.top = l ? `${d.bottom}px` : "", o.style.bottom = l ? "" : `${window.innerHeight - d.top}px`, o.style.left = h ? "" : `${d.left}px`, o.style.right = h ? `${window.innerWidth - d.right}px` : "";
|
|
782
782
|
};
|
|
783
|
-
return
|
|
784
|
-
window.removeEventListener("scroll",
|
|
783
|
+
return a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
|
|
784
|
+
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
|
|
785
785
|
};
|
|
786
|
-
}, [s,
|
|
786
|
+
}, [s, i, e, t]);
|
|
787
787
|
}
|
|
788
|
-
const
|
|
788
|
+
const ne = K({ close: () => {
|
|
789
789
|
} });
|
|
790
|
-
function
|
|
790
|
+
function Q(e) {
|
|
791
791
|
return e.hasAttribute("data-open") || e.matches(":popover-open");
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function vo({
|
|
794
794
|
open: e,
|
|
795
795
|
onClose: t,
|
|
796
796
|
trigger: s,
|
|
797
|
-
placement:
|
|
797
|
+
placement: i = "bottom-start",
|
|
798
798
|
children: c,
|
|
799
799
|
className: r,
|
|
800
800
|
ref: o,
|
|
801
|
-
...
|
|
801
|
+
...a
|
|
802
802
|
}) {
|
|
803
|
-
const d = z(null),
|
|
804
|
-
|
|
805
|
-
const
|
|
803
|
+
const d = z(null), l = z(null), u = z(!1), f = `--psi-menu-${O().replace(/:/g, "")}`;
|
|
804
|
+
gn({ popoverRef: d, triggerRef: l, open: e, placement: i, anchorName: f });
|
|
805
|
+
const h = (v) => {
|
|
806
806
|
d.current = v, typeof o == "function" ? o(v) : o && (o.current = v);
|
|
807
807
|
};
|
|
808
808
|
x(() => {
|
|
809
809
|
const v = d.current;
|
|
810
810
|
if (!v) return;
|
|
811
|
-
const
|
|
812
|
-
e && !
|
|
811
|
+
const G = Q(v);
|
|
812
|
+
e && !G ? v.showPopover() : !e && G && (u.current = !0, v.hidePopover());
|
|
813
813
|
}, [e]);
|
|
814
|
-
const
|
|
814
|
+
const y = C(() => {
|
|
815
815
|
const v = d.current;
|
|
816
816
|
if (v) {
|
|
817
817
|
if (u.current) {
|
|
818
818
|
u.current = !1;
|
|
819
819
|
return;
|
|
820
820
|
}
|
|
821
|
-
|
|
821
|
+
Q(v) || e && t("outside");
|
|
822
822
|
}
|
|
823
|
-
}, [t, e]),
|
|
823
|
+
}, [t, e]), w = bn({
|
|
824
824
|
popoverRef: d,
|
|
825
|
-
triggerRef:
|
|
825
|
+
triggerRef: l,
|
|
826
826
|
open: e,
|
|
827
827
|
onEsc: () => t("esc")
|
|
828
|
-
}),
|
|
828
|
+
}), j = C(
|
|
829
829
|
(v) => {
|
|
830
830
|
t(v);
|
|
831
831
|
},
|
|
832
832
|
[t]
|
|
833
|
-
),
|
|
833
|
+
), p = q(s);
|
|
834
834
|
x(() => {
|
|
835
|
-
|
|
835
|
+
p || console.warn(
|
|
836
836
|
"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
837
|
);
|
|
838
|
-
}, [
|
|
839
|
-
const
|
|
840
|
-
return /* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */ n("div", { ref:
|
|
838
|
+
}, [p]);
|
|
839
|
+
const R = p ? Y(s, { "aria-haspopup": "menu", "aria-expanded": e }) : s;
|
|
840
|
+
return /* @__PURE__ */ _(V, { children: [
|
|
841
|
+
/* @__PURE__ */ n("div", { ref: l, className: F.trigger, "data-psi-menu-trigger": !0, children: R }),
|
|
842
842
|
/* @__PURE__ */ n(
|
|
843
843
|
"div",
|
|
844
844
|
{
|
|
845
|
-
...
|
|
846
|
-
ref:
|
|
845
|
+
...a,
|
|
846
|
+
ref: h,
|
|
847
847
|
popover: "auto",
|
|
848
848
|
role: "menu",
|
|
849
849
|
"data-psi-menu": !0,
|
|
850
|
-
"data-placement":
|
|
851
|
-
className: [
|
|
852
|
-
onToggle:
|
|
853
|
-
onKeyDown:
|
|
854
|
-
children: /* @__PURE__ */ n(
|
|
850
|
+
"data-placement": i,
|
|
851
|
+
className: [F.menu, r].filter(Boolean).join(" "),
|
|
852
|
+
onToggle: y,
|
|
853
|
+
onKeyDown: w,
|
|
854
|
+
children: /* @__PURE__ */ n(ne.Provider, { value: { close: j }, children: c })
|
|
855
855
|
}
|
|
856
856
|
)
|
|
857
857
|
] });
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
const { close: c } =
|
|
859
|
+
function go({ children: e, onSelect: t, variant: s = "neutral", disabled: i = !1 }) {
|
|
860
|
+
const { close: c } = B(ne);
|
|
861
861
|
return /* @__PURE__ */ n(
|
|
862
862
|
"button",
|
|
863
863
|
{
|
|
@@ -865,59 +865,269 @@ function Un({ children: e, onSelect: t, variant: s = "neutral", disabled: a = !1
|
|
|
865
865
|
role: "menuitem",
|
|
866
866
|
"data-psi-menu-item": !0,
|
|
867
867
|
"data-variant": s,
|
|
868
|
-
"aria-disabled":
|
|
868
|
+
"aria-disabled": i || void 0,
|
|
869
869
|
tabIndex: -1,
|
|
870
|
-
className:
|
|
870
|
+
className: F.item,
|
|
871
871
|
onClick: () => {
|
|
872
|
-
|
|
872
|
+
i || (t(), c("item-select"));
|
|
873
873
|
},
|
|
874
874
|
children: e
|
|
875
875
|
}
|
|
876
876
|
);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className:
|
|
878
|
+
function yo() {
|
|
879
|
+
return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: F.separator });
|
|
880
|
+
}
|
|
881
|
+
const yn = "_table_146hc_3", wn = "_headerCell_146hc_13", mn = "_cell_146hc_19", kn = "_sortButton_146hc_30", xn = "_sortIndicator_146hc_47", Cn = "_selectCell_146hc_79", Bn = "_body_146hc_86", $n = "_row_146hc_89", zn = "_sticky_146hc_111", g = {
|
|
882
|
+
table: yn,
|
|
883
|
+
headerCell: wn,
|
|
884
|
+
cell: mn,
|
|
885
|
+
sortButton: kn,
|
|
886
|
+
sortIndicator: xn,
|
|
887
|
+
selectCell: Cn,
|
|
888
|
+
body: Bn,
|
|
889
|
+
row: $n,
|
|
890
|
+
sticky: zn
|
|
891
|
+
}, oe = /* @__PURE__ */ new Set(), T = K({
|
|
892
|
+
size: 40,
|
|
893
|
+
sortable: !1,
|
|
894
|
+
sort: null,
|
|
895
|
+
selectable: !1,
|
|
896
|
+
selected: oe
|
|
897
|
+
}), re = K([]);
|
|
898
|
+
function jn({ children: e, className: t }) {
|
|
899
|
+
return /* @__PURE__ */ n("tbody", { className: [g.body, t].filter(Boolean).join(" "), children: e });
|
|
900
|
+
}
|
|
901
|
+
function Ln(e) {
|
|
902
|
+
const t = [];
|
|
903
|
+
let s = !1, i = !1;
|
|
904
|
+
const c = (r) => {
|
|
905
|
+
H.forEach(r, function o(a) {
|
|
906
|
+
if (!q(a)) return;
|
|
907
|
+
if (a.type === X) {
|
|
908
|
+
H.forEach(a.props.children, o);
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
const d = a.props.rowId;
|
|
912
|
+
typeof d == "string" ? t.push(d) : i = !0;
|
|
913
|
+
});
|
|
914
|
+
};
|
|
915
|
+
return H.forEach(e, function r(o) {
|
|
916
|
+
if (q(o)) {
|
|
917
|
+
if (o.type === X) {
|
|
918
|
+
H.forEach(o.props.children, r);
|
|
919
|
+
return;
|
|
920
|
+
}
|
|
921
|
+
o.type === jn && (s = !0, c(o.props.children));
|
|
922
|
+
}
|
|
923
|
+
}), { ids: t, sawBody: s, hasRowWithoutId: i };
|
|
924
|
+
}
|
|
925
|
+
function wo({
|
|
926
|
+
size: e = 40,
|
|
927
|
+
stickyHeader: t,
|
|
928
|
+
sortable: s = !1,
|
|
929
|
+
sort: i = null,
|
|
930
|
+
onSortChange: c,
|
|
931
|
+
selectable: r = !1,
|
|
932
|
+
selected: o = oe,
|
|
933
|
+
onSelectionChange: a,
|
|
934
|
+
children: d,
|
|
935
|
+
className: l,
|
|
936
|
+
ref: u
|
|
937
|
+
}) {
|
|
938
|
+
const f = [g.table, t && g.sticky, l].filter(Boolean).join(" "), { ids: h, sawBody: y, hasRowWithoutId: w } = ie(() => Ln(d), [d]);
|
|
939
|
+
return process.env.NODE_ENV !== "production" && (s && !c && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !a && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !y && console.warn("Psi Table: `selectable` is set but no `TableBody` is visible to `Table`. Wrapping `TableBody` in a component other than a Fragment hides its rows, and select-all will clear the selection instead of filling it."), r && w && 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(T.Provider, { value: { size: e, sortable: s, sort: i, onSortChange: c, selectable: r, selected: o, onSelectionChange: a }, children: /* @__PURE__ */ n(re.Provider, { value: h, children: /* @__PURE__ */ n("table", { ref: u, className: f, "data-size": e, children: d }) }) });
|
|
940
|
+
}
|
|
941
|
+
function Nn({ rowId: e, label: t }) {
|
|
942
|
+
const { selected: s, onSelectionChange: i } = B(T), c = () => {
|
|
943
|
+
const r = new Set(s);
|
|
944
|
+
r.has(e) ? r.delete(e) : r.add(e), i == null || i(r);
|
|
945
|
+
};
|
|
946
|
+
return /* @__PURE__ */ n("td", { className: `${g.cell} ${g.selectCell}`, children: /* @__PURE__ */ n(te, { "aria-label": t, checked: s.has(e), onChange: c }) });
|
|
947
|
+
}
|
|
948
|
+
function Sn() {
|
|
949
|
+
const { selected: e, onSelectionChange: t } = B(T), s = B(re), i = z(null), c = s.length > 0 && s.every((a) => e.has(a)), r = s.some((a) => e.has(a));
|
|
950
|
+
x(() => {
|
|
951
|
+
i.current && (i.current.indeterminate = r && !c);
|
|
952
|
+
}, [r, c]);
|
|
953
|
+
const o = () => {
|
|
954
|
+
const a = new Set(e);
|
|
955
|
+
c ? s.forEach((d) => a.delete(d)) : s.forEach((d) => a.add(d)), t == null || t(a);
|
|
956
|
+
};
|
|
957
|
+
return /* @__PURE__ */ n("th", { scope: "col", className: `${g.headerCell} ${g.selectCell}`, children: /* @__PURE__ */ n(te, { ref: i, "aria-label": "Select all rows", checked: c, onChange: o }) });
|
|
958
|
+
}
|
|
959
|
+
function mo({ children: e, className: t }) {
|
|
960
|
+
const { selectable: s } = B(T);
|
|
961
|
+
let i = !1;
|
|
962
|
+
const c = s ? H.map(e, (r) => {
|
|
963
|
+
if (i || !q(r)) return r;
|
|
964
|
+
i = !0;
|
|
965
|
+
const o = r;
|
|
966
|
+
return Y(
|
|
967
|
+
o,
|
|
968
|
+
void 0,
|
|
969
|
+
/* @__PURE__ */ _(V, { children: [
|
|
970
|
+
/* @__PURE__ */ n(Sn, {}),
|
|
971
|
+
o.props.children
|
|
972
|
+
] })
|
|
973
|
+
);
|
|
974
|
+
}) : e;
|
|
975
|
+
return /* @__PURE__ */ n("thead", { className: [g.head, t].filter(Boolean).join(" "), children: c });
|
|
976
|
+
}
|
|
977
|
+
function ko({ rowId: e, selectLabel: t, children: s, className: i }) {
|
|
978
|
+
const { selectable: c, selected: r } = B(T), o = e !== void 0 && r.has(e);
|
|
979
|
+
return /* @__PURE__ */ _(
|
|
980
|
+
"tr",
|
|
981
|
+
{
|
|
982
|
+
className: [g.row, i].filter(Boolean).join(" "),
|
|
983
|
+
"data-row-id": e,
|
|
984
|
+
"data-selected": o || void 0,
|
|
985
|
+
children: [
|
|
986
|
+
c && e !== void 0 && /* @__PURE__ */ n(Nn, { rowId: e, label: t ?? `Select row ${e}` }),
|
|
987
|
+
s
|
|
988
|
+
]
|
|
989
|
+
}
|
|
990
|
+
);
|
|
991
|
+
}
|
|
992
|
+
function xo({ sortKey: e, numeric: t, children: s, className: i }) {
|
|
993
|
+
const { sortable: c, sort: r, onSortChange: o } = B(T), a = c && e !== void 0, d = a && (r == null ? void 0 : r.key) === e, l = a ? d ? r.direction === "asc" ? "ascending" : "descending" : "none" : void 0, u = () => {
|
|
994
|
+
if (!e) return;
|
|
995
|
+
const f = d && r.direction === "asc" ? "desc" : "asc";
|
|
996
|
+
o == null || o({ key: e, direction: f });
|
|
997
|
+
};
|
|
998
|
+
return /* @__PURE__ */ n(
|
|
999
|
+
"th",
|
|
1000
|
+
{
|
|
1001
|
+
scope: "col",
|
|
1002
|
+
className: [g.headerCell, i].filter(Boolean).join(" "),
|
|
1003
|
+
"data-numeric": t || void 0,
|
|
1004
|
+
"aria-sort": l,
|
|
1005
|
+
children: a ? /* @__PURE__ */ _("button", { type: "button", className: g.sortButton, onClick: u, children: [
|
|
1006
|
+
s,
|
|
1007
|
+
/* @__PURE__ */ n("span", { className: g.sortIndicator, "aria-hidden": "true", children: d ? r.direction === "asc" ? "↑" : "↓" : "" })
|
|
1008
|
+
] }) : s
|
|
1009
|
+
}
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
1012
|
+
function Co({ numeric: e, children: t, className: s }) {
|
|
1013
|
+
return /* @__PURE__ */ n("td", { className: [g.cell, s].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
|
|
1014
|
+
}
|
|
1015
|
+
const In = "_nav_166vs_6", Mn = "_ellipsis_166vs_12", ee = {
|
|
1016
|
+
nav: In,
|
|
1017
|
+
ellipsis: Mn
|
|
1018
|
+
};
|
|
1019
|
+
function P(e, t) {
|
|
1020
|
+
return Array.from({ length: t - e + 1 }, (s, i) => e + i);
|
|
1021
|
+
}
|
|
1022
|
+
function En(e, t, s) {
|
|
1023
|
+
const i = Math.max(0, s), c = i * 2 + 1, r = c + 4;
|
|
1024
|
+
if (t <= r)
|
|
1025
|
+
return P(1, t);
|
|
1026
|
+
const o = Math.max(e - i, 1), a = Math.min(e + i, t), d = o > 3, l = a < t - 2;
|
|
1027
|
+
if (!d && l) {
|
|
1028
|
+
const u = Math.max(a, c);
|
|
1029
|
+
return [...P(1, u), "ellipsis", t];
|
|
1030
|
+
}
|
|
1031
|
+
if (d && !l) {
|
|
1032
|
+
const u = Math.min(o, t - c + 1);
|
|
1033
|
+
return [1, "ellipsis", ...P(u, t)];
|
|
1034
|
+
}
|
|
1035
|
+
return d && l ? [1, "ellipsis", ...P(o, a), "ellipsis", t] : P(1, t);
|
|
1036
|
+
}
|
|
1037
|
+
function Bo({
|
|
1038
|
+
page: e,
|
|
1039
|
+
pageCount: t,
|
|
1040
|
+
onPageChange: s,
|
|
1041
|
+
siblingCount: i = 1,
|
|
1042
|
+
"aria-label": c = "Pagination",
|
|
1043
|
+
className: r
|
|
1044
|
+
}) {
|
|
1045
|
+
const o = En(e, t, i);
|
|
1046
|
+
return /* @__PURE__ */ _("nav", { "aria-label": c, className: [ee.nav, r].filter(Boolean).join(" "), children: [
|
|
1047
|
+
/* @__PURE__ */ n(
|
|
1048
|
+
U,
|
|
1049
|
+
{
|
|
1050
|
+
"aria-label": "Previous page",
|
|
1051
|
+
size: 32,
|
|
1052
|
+
variant: "ghost",
|
|
1053
|
+
disabled: e <= 1,
|
|
1054
|
+
onClick: () => s(e - 1),
|
|
1055
|
+
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
|
+
}
|
|
1057
|
+
),
|
|
1058
|
+
o.map(
|
|
1059
|
+
(a, d) => a === "ellipsis" ? /* @__PURE__ */ n("span", { className: ee.ellipsis, "aria-hidden": "true", children: "…" }, `e${d}`) : /* @__PURE__ */ n(
|
|
1060
|
+
xe,
|
|
1061
|
+
{
|
|
1062
|
+
size: 32,
|
|
1063
|
+
variant: a === e ? "accent-subtle" : "ghost",
|
|
1064
|
+
"aria-current": a === e ? "page" : void 0,
|
|
1065
|
+
onClick: () => s(a),
|
|
1066
|
+
children: String(a)
|
|
1067
|
+
},
|
|
1068
|
+
a
|
|
1069
|
+
)
|
|
1070
|
+
),
|
|
1071
|
+
/* @__PURE__ */ n(
|
|
1072
|
+
U,
|
|
1073
|
+
{
|
|
1074
|
+
"aria-label": "Next page",
|
|
1075
|
+
size: 32,
|
|
1076
|
+
variant: "ghost",
|
|
1077
|
+
disabled: e >= t,
|
|
1078
|
+
onClick: () => s(e + 1),
|
|
1079
|
+
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
|
+
}
|
|
1081
|
+
)
|
|
1082
|
+
] });
|
|
880
1083
|
}
|
|
881
1084
|
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
|
-
|
|
1085
|
+
Rn as AspectRatio,
|
|
1086
|
+
xe as Button,
|
|
1087
|
+
An as Card,
|
|
1088
|
+
te as Checkbox,
|
|
1089
|
+
lo as Dialog,
|
|
1090
|
+
Dn as Field,
|
|
1091
|
+
oo as IconArrowDown,
|
|
1092
|
+
ro as IconArrowUpRight,
|
|
1093
|
+
U as IconButton,
|
|
1094
|
+
Fn as IconCheck,
|
|
1095
|
+
Kn as IconChevronDown,
|
|
1096
|
+
On as IconChevronRight,
|
|
1097
|
+
nt as IconClose,
|
|
1098
|
+
Jn as IconCopy,
|
|
1099
|
+
Gn as IconEdit,
|
|
1100
|
+
Qn as IconExternalLink,
|
|
1101
|
+
eo as IconEye,
|
|
1102
|
+
to as IconEyeOff,
|
|
1103
|
+
io as IconGitHub,
|
|
1104
|
+
co as IconInstagram,
|
|
1105
|
+
so as IconLinkedIn,
|
|
1106
|
+
no as IconLoader,
|
|
1107
|
+
qn as IconMinus,
|
|
1108
|
+
Vn as IconPlus,
|
|
1109
|
+
Un as IconSearch,
|
|
1110
|
+
Yn as IconSettings,
|
|
1111
|
+
Xn as IconTrash,
|
|
1112
|
+
Zn as IconUser,
|
|
1113
|
+
ao as IconX,
|
|
1114
|
+
uo as Input,
|
|
1115
|
+
vo as Menu,
|
|
1116
|
+
ne as MenuContext,
|
|
1117
|
+
go as MenuItem,
|
|
1118
|
+
yo as MenuSeparator,
|
|
1119
|
+
Hn as NavBar,
|
|
1120
|
+
Bo as Pagination,
|
|
1121
|
+
Pn as Panel,
|
|
1122
|
+
ho as Select,
|
|
1123
|
+
_o as Switch,
|
|
1124
|
+
wo as Table,
|
|
1125
|
+
jn as TableBody,
|
|
1126
|
+
Co as TableCell,
|
|
1127
|
+
mo as TableHead,
|
|
1128
|
+
xo as TableHeaderCell,
|
|
1129
|
+
ko as TableRow,
|
|
1130
|
+
fo as Tag,
|
|
1131
|
+
bo as Toolbar,
|
|
1132
|
+
po as Tooltip
|
|
923
1133
|
};
|