@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/dist/index.js CHANGED
@@ -1,52 +1,52 @@
1
- import { jsx as n, jsxs as h, Fragment as V } from "react/jsx-runtime";
2
- import { createContext as F, useId as H, useRef as z, useEffect as x, useContext as P, useState as Z, useCallback as k, cloneElement as U, isValidElement as G } from "react";
3
- const O = "_button_c94w9_3", X = "_disabled_c94w9_30", J = "_size24_c94w9_44", Q = "_size32_c94w9_54", ee = "_size40_c94w9_64", te = "_size48_c94w9_74", ne = "_accent_c94w9_87", oe = "_accentSubtle_c94w9_99", re = "_neutral_c94w9_111", ie = "_neutralSubtle_c94w9_123", se = "_ghost_c94w9_135", ae = "_danger_c94w9_147", ce = "_dangerSubtle_c94w9_159", le = "_outline_c94w9_171", f = {
4
- button: O,
5
- disabled: X,
6
- size24: J,
7
- size32: Q,
8
- size40: ee,
9
- size48: te,
10
- accent: ne,
11
- accentSubtle: oe,
12
- neutral: re,
13
- neutralSubtle: ie,
14
- ghost: se,
15
- danger: ae,
16
- dangerSubtle: ce,
17
- outline: le
18
- }, ue = {
19
- accent: f.accent,
20
- "accent-subtle": f.accentSubtle,
21
- neutral: f.neutral,
22
- "neutral-subtle": f.neutralSubtle,
23
- ghost: f.ghost,
24
- danger: f.danger,
25
- "danger-subtle": f.dangerSubtle,
26
- outline: f.outline
27
- }, de = {
28
- 24: f.size24,
29
- 32: f.size32,
30
- 40: f.size40,
31
- 48: f.size48
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 un({
33
+ function xe({
34
34
  variant: e = "neutral",
35
35
  size: t = 32,
36
36
  href: s,
37
- target: a,
37
+ target: i,
38
38
  rel: c,
39
39
  disabled: r,
40
40
  className: o,
41
- onClick: l,
41
+ onClick: a,
42
42
  ref: d,
43
- ...i
43
+ ...l
44
44
  }) {
45
45
  const u = [
46
- f.button,
47
- ue[e],
48
- de[t],
49
- s !== void 0 && r ? f.disabled : void 0,
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: a,
58
+ target: i,
59
59
  rel: c,
60
60
  "aria-disabled": r || void 0,
61
- onClick: r ? void 0 : l,
62
- ...i
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: l,
71
- ...i
70
+ onClick: a,
71
+ ...l
72
72
  }
73
73
  );
74
74
  }
75
- const _e = "_iconButton_129ca_3", he = "_disabled_129ca_29", pe = "_size24_129ca_37", ge = "_size32_129ca_42", fe = "_size40_129ca_47", ve = "_size48_129ca_52", ye = "_accent_129ca_60", be = "_neutral_129ca_72", me = "_ghost_129ca_84", we = "_danger_129ca_96", w = {
76
- iconButton: _e,
77
- disabled: he,
78
- size24: pe,
79
- size32: ge,
80
- size40: fe,
81
- size48: ve,
82
- accent: ye,
83
- neutral: be,
84
- ghost: me,
85
- danger: we
86
- }, ke = {
87
- accent: w.accent,
88
- neutral: w.neutral,
89
- ghost: w.ghost,
90
- danger: w.danger
91
- }, xe = {
92
- 24: w.size24,
93
- 32: w.size32,
94
- 40: w.size40,
95
- 48: w.size48
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 Ce({
97
+ function U({
98
98
  variant: e = "neutral",
99
99
  size: t = 32,
100
100
  href: s,
101
- target: a,
101
+ target: i,
102
102
  rel: c,
103
103
  disabled: r,
104
104
  className: o,
105
- onClick: l,
105
+ onClick: a,
106
106
  ref: d,
107
- ...i
107
+ ...l
108
108
  }) {
109
109
  const u = [
110
- w.iconButton,
111
- ke[e],
112
- xe[t],
113
- s !== void 0 && r ? w.disabled : void 0,
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: a,
122
+ target: i,
123
123
  rel: c,
124
124
  "aria-disabled": r || void 0,
125
- onClick: r ? void 0 : l,
126
- ...i
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: l,
135
- ...i
134
+ onClick: a,
135
+ ...l
136
136
  }
137
137
  );
138
138
  }
139
- const ze = "_card_1btb3_1", Le = "_stacked_1btb3_8", $e = "_featured_1btb3_10", je = "_media_1btb3_22", Be = "_body_1btb3_23", Se = "_hoverLift_1btb3_31", $ = {
140
- card: ze,
141
- stacked: Le,
142
- featured: $e,
143
- media: je,
144
- body: Be,
145
- hoverLift: Se
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 dn({
147
+ function An({
148
148
  variant: e = "stacked",
149
149
  media: t,
150
150
  hoverLift: s = !1,
151
- className: a,
151
+ className: i,
152
152
  children: c,
153
153
  ref: r,
154
154
  ...o
155
155
  }) {
156
- const l = [
157
- $.card,
158
- e === "featured" ? $.featured : $.stacked,
159
- s ? $.hoverLift : void 0,
160
- a
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__ */ h("div", { ref: r, className: l, ...o, children: [
163
- t != null && /* @__PURE__ */ n("div", { className: $.media, children: t }),
164
- /* @__PURE__ */ n("div", { className: $.body, children: c })
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 Ne = "_panel_jn8w4_1", Ie = "_padding16_jn8w4_8", q = {
168
- panel: Ne,
169
- padding16: Ie
167
+ const Ve = "_panel_jn8w4_1", qe = "_padding16_jn8w4_8", J = {
168
+ panel: Ve,
169
+ padding16: qe
170
170
  };
171
- function _n({ padding: e = 24, className: t, children: s, ref: a, ...c }) {
172
- const r = [q.panel, e === 16 ? q.padding16 : void 0, t].filter(Boolean).join(" ");
173
- return /* @__PURE__ */ n("div", { ref: a, className: r, ...c, children: s });
174
- }
175
- const Me = "_navbar_1gyow_1", Ee = "_inner_1gyow_12", We = "_brand_1gyow_19", Ae = "_links_1gyow_20", De = "_actions_1gyow_50", M = {
176
- navbar: Me,
177
- inner: Ee,
178
- brand: We,
179
- links: Ae,
180
- actions: De
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 hn({ brand: e, actions: t, children: s, className: a, ref: c, ...r }) {
183
- const o = [M.navbar, a].filter(Boolean).join(" ");
184
- return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ h("div", { className: `psi-container ${M.inner}`, children: [
185
- e != null && /* @__PURE__ */ n("div", { className: M.brand, children: e }),
186
- /* @__PURE__ */ n("nav", { className: M.links, children: s }),
187
- t != null && /* @__PURE__ */ n("div", { className: M.actions, children: t })
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 He = "_frame_et4fc_1", Ve = {
191
- frame: He
190
+ const Ze = "_frame_et4fc_1", Ge = {
191
+ frame: Ze
192
192
  };
193
- function pn({ ratio: e, className: t, style: s, children: a, ref: c, ...r }) {
194
- const o = [Ve.frame, t].filter(Boolean).join(" ");
195
- return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...s }, ...r, children: a });
196
- }
197
- const Pe = "_field_lplye_1", Te = "_label_lplye_10", Re = "_marker_lplye_16", qe = "_message_lplye_20", Ke = "_invalid_lplye_26", j = {
198
- field: Pe,
199
- label: Te,
200
- marker: Re,
201
- message: qe,
202
- invalid: Ke
203
- }, T = F(null);
204
- function gn({
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: a = !1,
208
+ required: i = !1,
209
209
  group: c = !1,
210
210
  htmlFor: r,
211
211
  className: o,
212
- children: l,
212
+ children: a,
213
213
  ref: d,
214
- ...i
214
+ ...l
215
215
  }) {
216
- const u = H(), p = r ?? u, _ = !!s, b = _ ? s : t, m = b != null && b !== !1 ? `${p}-message` : void 0, L = [j.field, _ && j.invalid, o].filter(Boolean).join(" "), g = e != null ? /* @__PURE__ */ h(V, { children: [
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
- a && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: j.marker, children: " *" })
219
- ] }) : null, W = /* @__PURE__ */ h(V, { children: [
220
- g != null && (c ? /* @__PURE__ */ n("legend", { className: j.label, children: g }) : /* @__PURE__ */ n("label", { className: j.label, htmlFor: p, children: g })),
221
- /* @__PURE__ */ n(T.Provider, { value: { id: p, describedBy: m, invalid: _, required: a }, children: l }),
222
- m && /* @__PURE__ */ n("p", { id: m, className: j.message, "aria-live": "polite", children: b })
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: L,
229
- "aria-describedby": m,
230
- ...i,
231
- children: W
228
+ className: j,
229
+ "aria-describedby": w,
230
+ ...l,
231
+ children: R
232
232
  }
233
- ) : /* @__PURE__ */ n("div", { ref: d, className: L, ...i, children: W });
233
+ ) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children: R });
234
234
  }
235
- function fn({ size: e = 20, ...t }) {
236
- return /* @__PURE__ */ h("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: [
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 vn({ size: e = 20, ...t }) {
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 Fe({ size: e = 20, ...t }) {
245
- return /* @__PURE__ */ h("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: [
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 yn({ size: e = 20, ...t }) {
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 bn({ size: e = 20, ...t }) {
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 mn({ size: e = 20, ...t }) {
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 wn({ size: e = 20, ...t }) {
260
- return /* @__PURE__ */ h("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: [
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 kn({ size: e = 20, ...t }) {
266
- return /* @__PURE__ */ h("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: [
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 xn({ size: e = 20, ...t }) {
272
- return /* @__PURE__ */ h("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: [
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 Cn({ size: e = 20, ...t }) {
278
- return /* @__PURE__ */ h("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: [
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 zn({ size: e = 20, ...t }) {
284
- return /* @__PURE__ */ h("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: [
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 Ln({ size: e = 20, ...t }) {
290
- return /* @__PURE__ */ h("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: [
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 $n({ size: e = 20, ...t }) {
296
- return /* @__PURE__ */ h("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: [
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 jn({ size: e = 20, ...t }) {
303
- return /* @__PURE__ */ h("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: [
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 Bn({ size: e = 20, ...t }) {
309
- return /* @__PURE__ */ h("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: [
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 Sn({ size: e = 20, ...t }) {
317
- return /* @__PURE__ */ h("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: [
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 Nn({ size: e = 20, ...t }) {
329
- return /* @__PURE__ */ h("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: [
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 In({ size: e = 20, ...t }) {
335
- return /* @__PURE__ */ h("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: [
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 Mn({ size: e = 20, ...t }) {
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 En({ size: e = 20, ...t }) {
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 Wn({ size: e = 20, ...t }) {
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 An({ size: e = 20, ...t }) {
350
- return /* @__PURE__ */ h("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: [
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 Ue = "_dialog_l23jf_2", Ye = "_w400_l23jf_31", Ze = "_w560_l23jf_32", Ge = "_w720_l23jf_33", Oe = "_panel_l23jf_35", Xe = "_header_l23jf_41", Je = "_title_l23jf_48", Qe = "_footer_l23jf_54", C = {
357
- dialog: Ue,
358
- w400: Ye,
359
- w560: Ze,
360
- w720: Ge,
361
- panel: Oe,
362
- header: Xe,
363
- title: Je,
364
- footer: Qe
365
- }, et = {
366
- 400: C.w400,
367
- 560: C.w560,
368
- 720: C.w720
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 Dn({
370
+ function lo({
371
371
  open: e,
372
372
  onClose: t,
373
373
  title: s,
374
- footer: a,
374
+ footer: i,
375
375
  width: c = 560,
376
376
  dismissible: r = !0,
377
377
  className: o,
378
- children: l,
378
+ children: a,
379
379
  ref: d,
380
- ...i
380
+ ...l
381
381
  }) {
382
- const u = z(null), p = H(), _ = (g) => {
383
- u.current = g, typeof d == "function" ? d(g) : d && (d.current = g);
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 g = u.current;
387
- g && (e && !g.open ? g.showModal() : !e && g.open && g.close());
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 g = document.body.style.overflow;
390
+ const p = document.body.style.overflow;
391
391
  return document.body.style.overflow = "hidden", () => {
392
- document.body.style.overflow = g;
392
+ document.body.style.overflow = p;
393
393
  };
394
394
  }, [e]);
395
- const b = (g) => {
396
- g.preventDefault(), r && t("esc");
397
- }, m = (g) => {
398
- r && g.target === u.current && t("backdrop");
399
- }, L = [C.dialog, et[c], o].filter(Boolean).join(" ");
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: L,
405
- "aria-labelledby": s != null ? p : void 0,
406
- onCancel: b,
407
- onClick: m,
408
- ...i,
409
- children: /* @__PURE__ */ h("div", { className: C.panel, children: [
410
- (s != null || r) && /* @__PURE__ */ h("div", { className: C.header, children: [
411
- s != null && /* @__PURE__ */ n("h2", { id: p, className: C.title, children: s }),
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
- Ce,
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(Fe, { "aria-hidden": "true" })
419
+ children: /* @__PURE__ */ n(nt, { "aria-hidden": "true" })
420
420
  }
421
421
  )
422
422
  ] }),
423
- l,
424
- a != null && /* @__PURE__ */ n("div", { className: C.footer, children: a })
423
+ a,
424
+ i != null && /* @__PURE__ */ n("div", { className: $.footer, children: i })
425
425
  ] })
426
426
  }
427
427
  );
428
428
  }
429
- const tt = "_input_hpei8_3", nt = "_size24_hpei8_37", ot = "_size32_hpei8_43", rt = "_size40_hpei8_49", it = "_size48_hpei8_55", st = "_error_hpei8_63", S = {
430
- input: tt,
431
- size24: nt,
432
- size32: ot,
433
- size40: rt,
434
- size48: it,
435
- error: st
436
- }, at = {
437
- 24: S.size24,
438
- 32: S.size32,
439
- 40: S.size40,
440
- 48: S.size48
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 Hn({ size: e = 32, error: t = !1, type: s = "text", className: a, ref: c, ...r }) {
443
- const o = P(T), l = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, i = [S.input, at[e], l && S.error, a].filter(Boolean).join(" ");
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: i,
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 ct = "_select_4x9ck_3", lt = "_size24_4x9ck_37", ut = "_size32_4x9ck_45", dt = "_size40_4x9ck_53", _t = "_size48_4x9ck_61", ht = "_error_4x9ck_71", N = {
459
- select: ct,
460
- size24: lt,
461
- size32: ut,
462
- size40: dt,
463
- size48: _t,
464
- error: ht
465
- }, pt = {
466
- 24: N.size24,
467
- 32: N.size32,
468
- 40: N.size40,
469
- 48: N.size48
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 Vn({
471
+ function ho({
472
472
  size: e = 32,
473
473
  error: t = !1,
474
474
  className: s,
475
- ref: a,
475
+ ref: i,
476
476
  children: c,
477
477
  ...r
478
478
  }) {
479
- const o = P(T), l = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, i = [
480
- N.select,
481
- pt[e],
482
- l && N.error,
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: a,
489
- className: i,
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 gt = "_label_1v4vv_3", ft = "_disabled_1v4vv_13", vt = "_input_1v4vv_20", yt = "_indicator_1v4vv_34", bt = "_text_1v4vv_75", E = {
500
- label: gt,
501
- disabled: ft,
502
- input: vt,
503
- indicator: yt,
504
- text: bt
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 Pn({
506
+ function te({
507
507
  children: e,
508
508
  className: t,
509
509
  disabled: s,
510
- ref: a,
510
+ ref: i,
511
511
  ...c
512
512
  }) {
513
- const r = [E.label, s && E.disabled, t].filter(Boolean).join(" ");
514
- return /* @__PURE__ */ h("label", { className: r, children: [
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: a,
518
+ ref: i,
519
519
  type: "checkbox",
520
- className: E.input,
520
+ className: A.input,
521
521
  disabled: s,
522
522
  ...c
523
523
  }
524
524
  ),
525
- /* @__PURE__ */ n("span", { className: E.indicator, "aria-hidden": "true" }),
526
- e && /* @__PURE__ */ n("span", { className: E.text, children: e })
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 mt = "_label_jru2c_3", wt = "_disabled_jru2c_13", kt = "_input_jru2c_20", xt = "_track_jru2c_34", Ct = "_thumb_jru2c_58", zt = "_text_jru2c_75", B = {
530
- label: mt,
531
- disabled: wt,
532
- input: kt,
533
- track: xt,
534
- thumb: Ct,
535
- text: zt
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 Tn({
537
+ function _o({
538
538
  children: e,
539
539
  className: t,
540
540
  disabled: s,
541
- ref: a,
541
+ ref: i,
542
542
  ...c
543
543
  }) {
544
- const r = [B.label, s && B.disabled, t].filter(Boolean).join(" ");
545
- return /* @__PURE__ */ h("label", { className: r, children: [
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: a,
549
+ ref: i,
550
550
  type: "checkbox",
551
551
  role: "switch",
552
- className: B.input,
552
+ className: S.input,
553
553
  disabled: s,
554
554
  ...c
555
555
  }
556
556
  ),
557
- /* @__PURE__ */ n("span", { className: B.track, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: B.thumb }) }),
558
- e && /* @__PURE__ */ n("span", { className: B.text, children: e })
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 Lt = "_tag_3oysa_3", $t = "_dismiss_3oysa_17", jt = "_neutral_3oysa_43", Bt = "_accent_3oysa_48", St = "_success_3oysa_53", Nt = "_warning_3oysa_58", It = "_danger_3oysa_63", Mt = "_neutralSubtle_3oysa_70", Et = "_accentSubtle_3oysa_75", Wt = "_successSubtle_3oysa_80", At = "_warningSubtle_3oysa_85", Dt = "_dangerSubtle_3oysa_90", y = {
562
- tag: Lt,
563
- dismiss: $t,
564
- neutral: jt,
565
- accent: Bt,
566
- success: St,
567
- warning: Nt,
568
- danger: It,
569
- neutralSubtle: Mt,
570
- accentSubtle: Et,
571
- successSubtle: Wt,
572
- warningSubtle: At,
573
- dangerSubtle: Dt
574
- }, Ht = {
575
- neutral: y.neutral,
576
- accent: y.accent,
577
- success: y.success,
578
- warning: y.warning,
579
- danger: y.danger
580
- }, Vt = {
581
- neutral: y.neutralSubtle,
582
- accent: y.accentSubtle,
583
- success: y.successSubtle,
584
- warning: y.warningSubtle,
585
- danger: y.dangerSubtle
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 Rn({
587
+ function fo({
588
588
  variant: e = "neutral",
589
589
  subtle: t = !1,
590
590
  onDismiss: s,
591
- className: a,
591
+ className: i,
592
592
  children: c,
593
593
  ref: r,
594
594
  ...o
595
595
  }) {
596
- const l = t ? Vt : Ht, d = [y.tag, l[e], a].filter(Boolean).join(" ");
597
- return /* @__PURE__ */ h("span", { ref: r, className: d, ...o, children: [
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: y.dismiss,
603
+ className: m.dismiss,
604
604
  onClick: s,
605
605
  "aria-label": "Dismiss",
606
- children: /* @__PURE__ */ h(
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 Pt = "_wrapper_1eu6z_3", Tt = "_tooltip_1eu6z_10", Rt = "_top_1eu6z_24", qt = "_bottom_1eu6z_31", Kt = "_left_1eu6z_38", Ft = "_right_1eu6z_45", I = {
629
- wrapper: Pt,
630
- tooltip: Tt,
631
- top: Rt,
632
- bottom: qt,
633
- left: Kt,
634
- right: Ft
635
- }, Ut = {
636
- top: I.top,
637
- bottom: I.bottom,
638
- left: I.left,
639
- right: I.right
640
- }, Yt = 150;
641
- function qn({
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 [a, c] = Z(!1), r = H(), o = z(void 0), l = k(() => {
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 = k(() => c(!0), []), i = k(() => c(!1), []);
649
- x(() => l, [l]), x(() => {
650
- if (!a) return;
651
- const p = (_) => {
652
- _.key === "Escape" && i();
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", p), () => document.removeEventListener("keydown", p);
655
- }, [a, i]);
656
- const u = U(t, {
657
- "aria-describedby": a ? r : void 0,
658
- onMouseEnter: (p) => {
659
- l(), o.current = window.setTimeout(d, Yt);
660
- const _ = t.props.onMouseEnter;
661
- _ == null || _(p);
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: (p) => {
664
- l(), i();
665
- const _ = t.props.onMouseLeave;
666
- _ == null || _(p);
663
+ onMouseLeave: (f) => {
664
+ a(), l();
665
+ const h = t.props.onMouseLeave;
666
+ h == null || h(f);
667
667
  },
668
- onFocus: (p) => {
668
+ onFocus: (f) => {
669
669
  d();
670
- const _ = t.props.onFocus;
671
- _ == null || _(p);
670
+ const h = t.props.onFocus;
671
+ h == null || h(f);
672
672
  },
673
- onBlur: (p) => {
674
- l(), i();
675
- const _ = t.props.onBlur;
676
- _ == null || _(p);
673
+ onBlur: (f) => {
674
+ a(), l();
675
+ const h = t.props.onBlur;
676
+ h == null || h(f);
677
677
  }
678
678
  });
679
- return /* @__PURE__ */ h("span", { className: I.wrapper, children: [
679
+ return /* @__PURE__ */ _("span", { className: E.wrapper, children: [
680
680
  u,
681
- a && /* @__PURE__ */ n(
681
+ i && /* @__PURE__ */ n(
682
682
  "span",
683
683
  {
684
684
  id: r,
685
685
  role: "tooltip",
686
- className: [I.tooltip, Ut[s]].filter(Boolean).join(" "),
686
+ className: [E.tooltip, on[s]].filter(Boolean).join(" "),
687
687
  children: e
688
688
  }
689
689
  )
690
690
  ] });
691
691
  }
692
- const Zt = "_toolbar_1i848_1", Gt = "_gap8_1i848_7", Ot = "_gap12_1i848_8", Xt = "_gap16_1i848_9", A = {
693
- toolbar: Zt,
694
- gap8: Gt,
695
- gap12: Ot,
696
- gap16: Xt
697
- }, Jt = { 8: A.gap8, 12: A.gap12, 16: A.gap16 };
698
- function Kn({ gap: e = 8, className: t, children: s, ref: a, ...c }) {
699
- const r = [A.toolbar, Jt[e], t].filter(Boolean).join(" ");
700
- return /* @__PURE__ */ n("div", { ref: a, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: s });
701
- }
702
- const Qt = "_trigger_vpa0u_4", en = "_menu_vpa0u_16", tn = "_item_vpa0u_37", nn = "_separator_vpa0u_74", D = {
703
- trigger: Qt,
704
- menu: en,
705
- item: tn,
706
- separator: nn
707
- }, on = 500;
708
- function rn({ popoverRef: e, triggerRef: t, open: s, onEsc: a }) {
709
- const c = z(""), r = z(0), o = k(() => {
710
- const i = e.current;
711
- return i ? Array.from(
712
- i.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
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]), l = k(
715
- (i) => {
716
- if (i) {
717
- for (const u of o()) u.tabIndex = u === i ? 0 : -1;
718
- i.focus();
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 = k(() => {
722
+ ), d = C(() => {
723
723
  var u;
724
- const i = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
725
- i == null || i.focus();
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 i = o();
730
- return l(i[0]), () => {
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, l, d]), k(
735
- (i) => {
736
- if (i.key === "Escape") {
737
- i.preventDefault(), a();
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 p = u.indexOf(document.activeElement);
743
- switch (i.key) {
742
+ const f = u.indexOf(document.activeElement);
743
+ switch (l.key) {
744
744
  case "ArrowDown":
745
- i.preventDefault(), l(u[(p + 1 + u.length) % u.length]);
745
+ l.preventDefault(), a(u[(f + 1 + u.length) % u.length]);
746
746
  return;
747
747
  case "ArrowUp":
748
- i.preventDefault(), l(u[p <= 0 ? u.length - 1 : p - 1]);
748
+ l.preventDefault(), a(u[f <= 0 ? u.length - 1 : f - 1]);
749
749
  return;
750
750
  case "Home":
751
- i.preventDefault(), l(u[0]);
751
+ l.preventDefault(), a(u[0]);
752
752
  return;
753
753
  case "End":
754
- i.preventDefault(), l(u[u.length - 1]);
754
+ l.preventDefault(), a(u[u.length - 1]);
755
755
  return;
756
756
  }
757
- if (i.key.length !== 1 || i.metaKey || i.ctrlKey || i.altKey) return;
758
- const _ = Date.now();
759
- c.current = _ - r.current > on ? i.key.toLowerCase() : c.current + i.key.toLowerCase(), r.current = _;
760
- const b = u.find(
761
- (m) => (m.textContent ?? "").trim().toLowerCase().startsWith(c.current)
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
- b && (i.preventDefault(), l(b));
763
+ y && (l.preventDefault(), a(y));
764
764
  },
765
- [o, l, a]
765
+ [o, a, i]
766
766
  );
767
767
  }
768
- function sn() {
768
+ function vn() {
769
769
  return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
770
770
  }
771
- function an({ popoverRef: e, triggerRef: t, open: s, placement: a, anchorName: c }) {
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 || sn()) return;
776
+ if (!s || vn()) return;
777
777
  const r = t.current, o = e.current;
778
778
  if (!r || !o) return;
779
- const l = () => {
780
- const d = r.getBoundingClientRect(), i = a.startsWith("bottom"), u = a.endsWith("end"), p = getComputedStyle(r).direction === "rtl", _ = u !== p;
781
- o.style.position = "fixed", o.style.top = i ? `${d.bottom}px` : "", o.style.bottom = i ? "" : `${window.innerHeight - d.top}px`, o.style.left = _ ? "" : `${d.left}px`, o.style.right = _ ? `${window.innerWidth - d.right}px` : "";
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 l(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
784
- window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
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, a, e, t]);
786
+ }, [s, i, e, t]);
787
787
  }
788
- const Y = F({ close: () => {
788
+ const ne = K({ close: () => {
789
789
  } });
790
- function K(e) {
790
+ function Q(e) {
791
791
  return e.hasAttribute("data-open") || e.matches(":popover-open");
792
792
  }
793
- function Fn({
793
+ function vo({
794
794
  open: e,
795
795
  onClose: t,
796
796
  trigger: s,
797
- placement: a = "bottom-start",
797
+ placement: i = "bottom-start",
798
798
  children: c,
799
799
  className: r,
800
800
  ref: o,
801
- ...l
801
+ ...a
802
802
  }) {
803
- const d = z(null), i = z(null), u = z(!1), p = `--psi-menu-${H().replace(/:/g, "")}`;
804
- an({ popoverRef: d, triggerRef: i, open: e, placement: a, anchorName: p });
805
- const _ = (v) => {
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 R = K(v);
812
- e && !R ? v.showPopover() : !e && R && (u.current = !0, v.hidePopover());
811
+ const G = Q(v);
812
+ e && !G ? v.showPopover() : !e && G && (u.current = !0, v.hidePopover());
813
813
  }, [e]);
814
- const b = k(() => {
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
- K(v) || e && t("outside");
821
+ Q(v) || e && t("outside");
822
822
  }
823
- }, [t, e]), m = rn({
823
+ }, [t, e]), w = bn({
824
824
  popoverRef: d,
825
- triggerRef: i,
825
+ triggerRef: l,
826
826
  open: e,
827
827
  onEsc: () => t("esc")
828
- }), L = k(
828
+ }), j = C(
829
829
  (v) => {
830
830
  t(v);
831
831
  },
832
832
  [t]
833
- ), g = G(s);
833
+ ), p = q(s);
834
834
  x(() => {
835
- g || console.warn(
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
- }, [g]);
839
- const W = g ? U(s, { "aria-haspopup": "menu", "aria-expanded": e }) : s;
840
- return /* @__PURE__ */ h(V, { children: [
841
- /* @__PURE__ */ n("div", { ref: i, className: D.trigger, "data-psi-menu-trigger": !0, children: W }),
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
- ...l,
846
- ref: _,
845
+ ...a,
846
+ ref: h,
847
847
  popover: "auto",
848
848
  role: "menu",
849
849
  "data-psi-menu": !0,
850
- "data-placement": a,
851
- className: [D.menu, r].filter(Boolean).join(" "),
852
- onToggle: b,
853
- onKeyDown: m,
854
- children: /* @__PURE__ */ n(Y.Provider, { value: { close: L }, children: c })
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 Un({ children: e, onSelect: t, variant: s = "neutral", disabled: a = !1 }) {
860
- const { close: c } = P(Y);
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": a || void 0,
868
+ "aria-disabled": i || void 0,
869
869
  tabIndex: -1,
870
- className: D.item,
870
+ className: F.item,
871
871
  onClick: () => {
872
- a || (t(), c("item-select"));
872
+ i || (t(), c("item-select"));
873
873
  },
874
874
  children: e
875
875
  }
876
876
  );
877
877
  }
878
- function Yn() {
879
- return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: D.separator });
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
- pn as AspectRatio,
883
- un as Button,
884
- dn as Card,
885
- Pn as Checkbox,
886
- Dn as Dialog,
887
- gn as Field,
888
- Nn as IconArrowDown,
889
- In as IconArrowUpRight,
890
- Ce as IconButton,
891
- yn as IconCheck,
892
- bn as IconChevronDown,
893
- mn as IconChevronRight,
894
- Fe as IconClose,
895
- Ln as IconCopy,
896
- Cn as IconEdit,
897
- $n as IconExternalLink,
898
- jn as IconEye,
899
- Bn as IconEyeOff,
900
- En as IconGitHub,
901
- An as IconInstagram,
902
- Mn as IconLinkedIn,
903
- Sn as IconLoader,
904
- vn as IconMinus,
905
- fn as IconPlus,
906
- wn as IconSearch,
907
- kn as IconSettings,
908
- zn as IconTrash,
909
- xn as IconUser,
910
- Wn as IconX,
911
- Hn as Input,
912
- Fn as Menu,
913
- Y as MenuContext,
914
- Un as MenuItem,
915
- Yn as MenuSeparator,
916
- hn as NavBar,
917
- _n as Panel,
918
- Vn as Select,
919
- Tn as Switch,
920
- Rn as Tag,
921
- Kn as Toolbar,
922
- qn as Tooltip
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
  };