@handamade/psi-react 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as n, jsxs as p, Fragment as G } from "react/jsx-runtime";
2
- import { createContext as K, useId as U, useRef as B, useEffect as N, useContext as L, useState as le, useCallback as m, cloneElement as ee, isValidElement as O, useMemo as de, Children as W, Fragment as re } from "react";
3
- const ye = "_button_c94w9_3", me = "_disabled_c94w9_30", we = "_size24_c94w9_44", ke = "_size32_c94w9_54", xe = "_size40_c94w9_64", Ce = "_size48_c94w9_74", Be = "_accent_c94w9_87", Ne = "_accentSubtle_c94w9_99", $e = "_neutral_c94w9_111", Le = "_neutralSubtle_c94w9_123", je = "_ghost_c94w9_135", Se = "_danger_c94w9_147", ze = "_dangerSubtle_c94w9_159", Ie = "_outline_c94w9_171", w = {
2
+ import { createContext as K, useId as U, useRef as N, useEffect as S, useContext as z, useState as le, useCallback as m, cloneElement as ee, isValidElement as O, useMemo as de, Children as W, Fragment as re } from "react";
3
+ const ye = "_button_c94w9_3", me = "_disabled_c94w9_30", we = "_size24_c94w9_44", ke = "_size32_c94w9_54", xe = "_size40_c94w9_64", Ce = "_size48_c94w9_74", Be = "_accent_c94w9_87", Ne = "_accentSubtle_c94w9_99", Se = "_neutral_c94w9_111", $e = "_neutralSubtle_c94w9_123", Le = "_ghost_c94w9_135", ze = "_danger_c94w9_147", je = "_dangerSubtle_c94w9_159", Ie = "_outline_c94w9_171", w = {
4
4
  button: ye,
5
5
  disabled: me,
6
6
  size24: we,
@@ -9,11 +9,11 @@ const ye = "_button_c94w9_3", me = "_disabled_c94w9_30", we = "_size24_c94w9_44"
9
9
  size48: Ce,
10
10
  accent: Be,
11
11
  accentSubtle: Ne,
12
- neutral: $e,
13
- neutralSubtle: Le,
14
- ghost: je,
15
- danger: Se,
16
- dangerSubtle: ze,
12
+ neutral: Se,
13
+ neutralSubtle: $e,
14
+ ghost: Le,
15
+ danger: ze,
16
+ dangerSubtle: je,
17
17
  outline: Ie
18
18
  }, Te = {
19
19
  accent: w.accent,
@@ -39,8 +39,8 @@ function Me({
39
39
  disabled: r,
40
40
  className: o,
41
41
  onClick: s,
42
- ref: l,
43
- ...d
42
+ ref: d,
43
+ ...l
44
44
  }) {
45
45
  const u = [
46
46
  w.button,
@@ -52,27 +52,27 @@ function Me({
52
52
  return i !== void 0 ? /* @__PURE__ */ n(
53
53
  "a",
54
54
  {
55
- ref: l,
55
+ ref: d,
56
56
  className: u,
57
57
  href: r ? void 0 : i,
58
58
  target: a,
59
59
  rel: c,
60
60
  "aria-disabled": r || void 0,
61
61
  onClick: r ? void 0 : s,
62
- ...d
62
+ ...l
63
63
  }
64
64
  ) : /* @__PURE__ */ n(
65
65
  "button",
66
66
  {
67
- ref: l,
67
+ ref: d,
68
68
  className: u,
69
69
  disabled: r,
70
70
  onClick: s,
71
- ...d
71
+ ...l
72
72
  }
73
73
  );
74
74
  }
75
- const We = "_iconButton_129ca_3", Ae = "_disabled_129ca_29", Pe = "_size24_129ca_37", De = "_size32_129ca_42", Re = "_size40_129ca_47", He = "_size48_129ca_52", Ve = "_accent_129ca_60", qe = "_neutral_129ca_72", Fe = "_ghost_129ca_84", Oe = "_danger_129ca_96", $ = {
75
+ const We = "_iconButton_129ca_3", Ae = "_disabled_129ca_29", Pe = "_size24_129ca_37", De = "_size32_129ca_42", Re = "_size40_129ca_47", He = "_size48_129ca_52", Ve = "_accent_129ca_60", qe = "_neutral_129ca_72", Fe = "_ghost_129ca_84", Oe = "_danger_129ca_96", L = {
76
76
  iconButton: We,
77
77
  disabled: Ae,
78
78
  size24: Pe,
@@ -84,15 +84,15 @@ const We = "_iconButton_129ca_3", Ae = "_disabled_129ca_29", Pe = "_size24_129ca
84
84
  ghost: Fe,
85
85
  danger: Oe
86
86
  }, Ke = {
87
- accent: $.accent,
88
- neutral: $.neutral,
89
- ghost: $.ghost,
90
- danger: $.danger
87
+ accent: L.accent,
88
+ neutral: L.neutral,
89
+ ghost: L.ghost,
90
+ danger: L.danger
91
91
  }, Ue = {
92
- 24: $.size24,
93
- 32: $.size32,
94
- 40: $.size40,
95
- 48: $.size48
92
+ 24: L.size24,
93
+ 32: L.size32,
94
+ 40: L.size40,
95
+ 48: L.size48
96
96
  };
97
97
  function X({
98
98
  variant: e = "neutral",
@@ -103,36 +103,36 @@ function X({
103
103
  disabled: r,
104
104
  className: o,
105
105
  onClick: s,
106
- ref: l,
107
- ...d
106
+ ref: d,
107
+ ...l
108
108
  }) {
109
109
  const u = [
110
- $.iconButton,
110
+ L.iconButton,
111
111
  Ke[e],
112
112
  Ue[t],
113
- i !== void 0 && r ? $.disabled : void 0,
113
+ i !== void 0 && r ? L.disabled : void 0,
114
114
  o
115
115
  ].filter(Boolean).join(" ");
116
116
  return i !== void 0 ? /* @__PURE__ */ n(
117
117
  "a",
118
118
  {
119
- ref: l,
119
+ ref: d,
120
120
  className: u,
121
121
  href: r ? void 0 : i,
122
122
  target: a,
123
123
  rel: c,
124
124
  "aria-disabled": r || void 0,
125
125
  onClick: r ? void 0 : s,
126
- ...d
126
+ ...l
127
127
  }
128
128
  ) : /* @__PURE__ */ n(
129
129
  "button",
130
130
  {
131
- ref: l,
131
+ ref: d,
132
132
  className: u,
133
133
  disabled: r,
134
134
  onClick: s,
135
- ...d
135
+ ...l
136
136
  }
137
137
  );
138
138
  }
@@ -144,7 +144,7 @@ const Ye = "_card_1btb3_1", Ze = "_stacked_1btb3_8", Ge = "_featured_1btb3_10",
144
144
  body: Je,
145
145
  hoverLift: Qe
146
146
  };
147
- function po({
147
+ function yo({
148
148
  variant: e = "stacked",
149
149
  media: t,
150
150
  hoverLift: i = !1,
@@ -168,7 +168,7 @@ const et = "_panel_jn8w4_1", tt = "_padding16_jn8w4_8", ie = {
168
168
  panel: et,
169
169
  padding16: tt
170
170
  };
171
- function vo({ padding: e = 24, className: t, children: i, ref: a, ...c }) {
171
+ function mo({ padding: e = 24, className: t, children: i, ref: a, ...c }) {
172
172
  const r = [ie.panel, e === 16 ? ie.padding16 : void 0, t].filter(Boolean).join(" ");
173
173
  return /* @__PURE__ */ n("div", { ref: a, className: r, ...c, children: i });
174
174
  }
@@ -179,7 +179,7 @@ const nt = "_navbar_1gyow_1", ot = "_inner_1gyow_12", rt = "_brand_1gyow_19", it
179
179
  links: it,
180
180
  actions: st
181
181
  };
182
- function go({ brand: e, actions: t, children: i, className: a, ref: c, ...r }) {
182
+ function wo({ brand: e, actions: t, children: i, className: a, ref: c, ...r }) {
183
183
  const o = [V.navbar, a].filter(Boolean).join(" ");
184
184
  return /* @__PURE__ */ n("header", { ref: c, className: o, ...r, children: /* @__PURE__ */ p("div", { className: `psi-container ${V.inner}`, children: [
185
185
  e != null && /* @__PURE__ */ n("div", { className: V.brand, children: e }),
@@ -190,7 +190,7 @@ function go({ brand: e, actions: t, children: i, className: a, ref: c, ...r }) {
190
190
  const at = "_frame_et4fc_1", ct = {
191
191
  frame: at
192
192
  };
193
- function bo({ ratio: e, className: t, style: i, children: a, ref: c, ...r }) {
193
+ function ko({ ratio: e, className: t, style: i, children: a, ref: c, ...r }) {
194
194
  const o = [ct.frame, t].filter(Boolean).join(" ");
195
195
  return /* @__PURE__ */ n("div", { ref: c, className: o, style: { aspectRatio: String(e), ...i }, ...r, children: a });
196
196
  }
@@ -201,7 +201,7 @@ const lt = "_field_lplye_1", dt = "_label_lplye_10", ut = "_marker_lplye_16", ht
201
201
  message: ht,
202
202
  invalid: _t
203
203
  }, te = K(null);
204
- function yo({
204
+ function xo({
205
205
  label: e,
206
206
  description: t,
207
207
  error: i,
@@ -210,35 +210,35 @@ function yo({
210
210
  htmlFor: r,
211
211
  className: o,
212
212
  children: s,
213
- ref: l,
214
- ...d
213
+ ref: d,
214
+ ...l
215
215
  }) {
216
- const u = U(), h = r ?? u, _ = !!i, b = _ ? i : t, y = b != null && b !== !1 ? `${h}-message` : void 0, j = [E.field, _ && E.invalid, o].filter(Boolean).join(" "), v = e != null ? /* @__PURE__ */ p(G, { children: [
216
+ const u = U(), h = r ?? u, _ = !!i, b = _ ? i : t, y = b != null && b !== !1 ? `${h}-message` : void 0, j = [E.field, _ && E.invalid, o].filter(Boolean).join(" "), x = e != null ? /* @__PURE__ */ p(G, { children: [
217
217
  e,
218
218
  a && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: E.marker, children: " *" })
219
- ] }) : null, I = /* @__PURE__ */ p(G, { children: [
220
- v != null && (c ? /* @__PURE__ */ n("legend", { className: E.label, children: v }) : /* @__PURE__ */ n("label", { className: E.label, htmlFor: h, children: v })),
219
+ ] }) : null, g = /* @__PURE__ */ p(G, { children: [
220
+ x != null && (c ? /* @__PURE__ */ n("legend", { className: E.label, children: x }) : /* @__PURE__ */ n("label", { className: E.label, htmlFor: h, children: x })),
221
221
  /* @__PURE__ */ n(te.Provider, { value: { id: h, describedBy: y, invalid: _, required: a }, children: s }),
222
222
  y && /* @__PURE__ */ n("p", { id: y, className: E.message, "aria-live": "polite", children: b })
223
223
  ] });
224
224
  return c ? /* @__PURE__ */ n(
225
225
  "fieldset",
226
226
  {
227
- ref: l,
227
+ ref: d,
228
228
  className: j,
229
229
  "aria-describedby": y,
230
- ...d,
231
- children: I
230
+ ...l,
231
+ children: g
232
232
  }
233
- ) : /* @__PURE__ */ n("div", { ref: l, className: j, ...d, children: I });
233
+ ) : /* @__PURE__ */ n("div", { ref: d, className: j, ...l, children: g });
234
234
  }
235
- function mo({ size: e = 20, ...t }) {
235
+ function Co({ size: e = 20, ...t }) {
236
236
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
237
237
  /* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
238
238
  /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
239
239
  ] });
240
240
  }
241
- function wo({ size: e = 20, ...t }) {
241
+ function Bo({ size: e = 20, ...t }) {
242
242
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
243
243
  }
244
244
  function ue({ size: e = 20, ...t }) {
@@ -250,62 +250,62 @@ function ue({ size: e = 20, ...t }) {
250
250
  function ft({ size: e = 20, ...t }) {
251
251
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "20 6 9 17 4 12" }) });
252
252
  }
253
- function ko({ size: e = 20, ...t }) {
253
+ function No({ size: e = 20, ...t }) {
254
254
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
255
255
  }
256
- function xo({ size: e = 20, ...t }) {
256
+ function So({ size: e = 20, ...t }) {
257
257
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("polyline", { points: "9 18 15 12 9 6" }) });
258
258
  }
259
- function Co({ size: e = 20, ...t }) {
259
+ function $o({ size: e = 20, ...t }) {
260
260
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
261
261
  /* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "8" }),
262
262
  /* @__PURE__ */ n("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
263
263
  ] });
264
264
  }
265
- function Bo({ size: e = 20, ...t }) {
265
+ function Lo({ size: e = 20, ...t }) {
266
266
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
267
267
  /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" }),
268
268
  /* @__PURE__ */ n("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
269
269
  ] });
270
270
  }
271
- function No({ size: e = 20, ...t }) {
271
+ function zo({ size: e = 20, ...t }) {
272
272
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
273
273
  /* @__PURE__ */ n("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
274
274
  /* @__PURE__ */ n("circle", { cx: "12", cy: "7", r: "4" })
275
275
  ] });
276
276
  }
277
- function $o({ size: e = 20, ...t }) {
277
+ function jo({ size: e = 20, ...t }) {
278
278
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
279
279
  /* @__PURE__ */ n("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
280
280
  /* @__PURE__ */ n("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
281
281
  ] });
282
282
  }
283
- function Lo({ size: e = 20, ...t }) {
283
+ function Io({ size: e = 20, ...t }) {
284
284
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
285
285
  /* @__PURE__ */ n("polyline", { points: "3 6 5 6 21 6" }),
286
286
  /* @__PURE__ */ n("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
287
287
  ] });
288
288
  }
289
- function jo({ size: e = 20, ...t }) {
289
+ function To({ size: e = 20, ...t }) {
290
290
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
291
291
  /* @__PURE__ */ n("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
292
292
  /* @__PURE__ */ n("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
293
293
  ] });
294
294
  }
295
- function So({ size: e = 20, ...t }) {
295
+ function Eo({ size: e = 20, ...t }) {
296
296
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
297
297
  /* @__PURE__ */ n("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
298
298
  /* @__PURE__ */ n("polyline", { points: "15 3 21 3 21 9" }),
299
299
  /* @__PURE__ */ n("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
300
300
  ] });
301
301
  }
302
- function zo({ size: e = 20, ...t }) {
302
+ function Mo({ size: e = 20, ...t }) {
303
303
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
304
304
  /* @__PURE__ */ n("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
305
305
  /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" })
306
306
  ] });
307
307
  }
308
- function Io({ size: e = 20, ...t }) {
308
+ function Wo({ size: e = 20, ...t }) {
309
309
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
310
310
  /* @__PURE__ */ n("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94" }),
311
311
  /* @__PURE__ */ n("path", { d: "M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19" }),
@@ -313,7 +313,7 @@ function Io({ size: e = 20, ...t }) {
313
313
  /* @__PURE__ */ n("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
314
314
  ] });
315
315
  }
316
- function To({ size: e = 20, ...t }) {
316
+ function Ao({ size: e = 20, ...t }) {
317
317
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
318
318
  /* @__PURE__ */ n("line", { x1: "12", y1: "2", x2: "12", y2: "6" }),
319
319
  /* @__PURE__ */ n("line", { x1: "12", y1: "18", x2: "12", y2: "22" }),
@@ -325,28 +325,28 @@ function To({ size: e = 20, ...t }) {
325
325
  /* @__PURE__ */ n("line", { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" })
326
326
  ] });
327
327
  }
328
- function Eo({ size: e = 20, ...t }) {
328
+ function Po({ size: e = 20, ...t }) {
329
329
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
330
330
  /* @__PURE__ */ n("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
331
331
  /* @__PURE__ */ n("polyline", { points: "19 12 12 19 5 12" })
332
332
  ] });
333
333
  }
334
- function Mo({ size: e = 20, ...t }) {
334
+ function Do({ size: e = 20, ...t }) {
335
335
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
336
336
  /* @__PURE__ */ n("line", { x1: "7", y1: "17", x2: "17", y2: "7" }),
337
337
  /* @__PURE__ */ n("polyline", { points: "7 7 17 7 17 17" })
338
338
  ] });
339
339
  }
340
- function Wo({ size: e = 20, ...t }) {
340
+ function Ro({ size: e = 20, ...t }) {
341
341
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) });
342
342
  }
343
- function Ao({ size: e = 20, ...t }) {
343
+ function Ho({ size: e = 20, ...t }) {
344
344
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) });
345
345
  }
346
- function Po({ size: e = 20, ...t }) {
346
+ function Vo({ size: e = 20, ...t }) {
347
347
  return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...t, children: /* @__PURE__ */ n("path", { d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" }) });
348
348
  }
349
- function Do({ size: e = 20, ...t }) {
349
+ function qo({ size: e = 20, ...t }) {
350
350
  return /* @__PURE__ */ p("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...t, children: [
351
351
  /* @__PURE__ */ n("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
352
352
  /* @__PURE__ */ n("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
@@ -374,63 +374,72 @@ function gt({ size: e = 20, ...t }) {
374
374
  /* @__PURE__ */ n("line", { x1: "12", y1: "16", x2: "12", y2: "16" })
375
375
  ] });
376
376
  }
377
- const bt = "_dialog_l23jf_2", yt = "_w400_l23jf_31", mt = "_w560_l23jf_32", wt = "_w720_l23jf_33", kt = "_panel_l23jf_35", xt = "_header_l23jf_41", Ct = "_title_l23jf_48", Bt = "_footer_l23jf_54", z = {
377
+ const bt = "_dialog_h5f0e_2", yt = "_center_h5f0e_32", mt = "_inlineStart_h5f0e_40", wt = "_inlineEnd_h5f0e_41", kt = "_w400_h5f0e_90", xt = "_w560_h5f0e_91", Ct = "_w720_h5f0e_92", Bt = "_panel_h5f0e_94", Nt = "_header_h5f0e_114", St = "_title_h5f0e_121", $t = "_footer_h5f0e_127", $ = {
378
378
  dialog: bt,
379
- w400: yt,
380
- w560: mt,
381
- w720: wt,
382
- panel: kt,
383
- header: xt,
384
- title: Ct,
385
- footer: Bt
386
- }, Nt = {
387
- 400: z.w400,
388
- 560: z.w560,
389
- 720: z.w720
379
+ center: yt,
380
+ inlineStart: mt,
381
+ inlineEnd: wt,
382
+ w400: kt,
383
+ w560: xt,
384
+ w720: Ct,
385
+ panel: Bt,
386
+ header: Nt,
387
+ title: St,
388
+ footer: $t
389
+ }, Lt = {
390
+ 400: $.w400,
391
+ 560: $.w560,
392
+ 720: $.w720
393
+ }, zt = {
394
+ center: $.center,
395
+ "inline-start": $.inlineStart,
396
+ "inline-end": $.inlineEnd
390
397
  };
391
- function Ro({
398
+ function Fo({
392
399
  open: e,
393
400
  onClose: t,
394
401
  title: i,
395
402
  footer: a,
396
403
  width: c = 560,
397
- dismissible: r = !0,
398
- className: o,
399
- children: s,
404
+ placement: r = "center",
405
+ dismissible: o = !0,
406
+ className: s,
407
+ children: d,
400
408
  ref: l,
401
- ...d
409
+ ...u
402
410
  }) {
403
- const u = B(null), h = U(), _ = (v) => {
404
- u.current = v, typeof l == "function" ? l(v) : l && (l.current = v);
411
+ const h = N(null), _ = U(), b = (g) => {
412
+ h.current = g, typeof l == "function" ? l(g) : l && (l.current = g);
405
413
  };
406
- N(() => {
407
- const v = u.current;
408
- v && (e && !v.open ? v.showModal() : !e && v.open && v.close());
409
- }, [e]), N(() => {
414
+ S(() => {
415
+ const g = h.current;
416
+ g && (e && !g.open ? g.showModal() : !e && g.open && g.close());
417
+ }, [e]), S(() => {
410
418
  if (!e) return;
411
- const v = document.body.style.overflow;
419
+ const g = document.body.style.overflow;
412
420
  return document.body.style.overflow = "hidden", () => {
413
- document.body.style.overflow = v;
421
+ document.body.style.overflow = g;
414
422
  };
415
423
  }, [e]);
416
- const b = (v) => {
417
- v.preventDefault(), r && t("esc");
418
- }, y = (v) => {
419
- r && v.target === u.current && t("backdrop");
420
- }, j = [z.dialog, Nt[c], o].filter(Boolean).join(" ");
424
+ const y = (g) => {
425
+ g.preventDefault(), o && t("esc");
426
+ }, j = (g) => {
427
+ o && g.target === h.current && t("backdrop");
428
+ }, x = [$.dialog, Lt[c], zt[r], s].filter(Boolean).join(" ");
421
429
  return /* @__PURE__ */ n(
422
430
  "dialog",
423
431
  {
424
- ref: _,
425
- className: j,
426
- "aria-labelledby": i != null ? h : void 0,
427
- onCancel: b,
428
- onClick: y,
429
- ...d,
430
- children: /* @__PURE__ */ p("div", { className: z.panel, children: [
431
- (i != null || r) && /* @__PURE__ */ p("div", { className: z.header, children: [
432
- i != null && /* @__PURE__ */ n("h2", { id: h, className: z.title, children: i }),
433
- r && /* @__PURE__ */ n(
432
+ ref: b,
433
+ className: x,
434
+ "data-placement": r,
435
+ "aria-labelledby": i != null ? _ : void 0,
436
+ onCancel: y,
437
+ onClick: j,
438
+ ...u,
439
+ children: /* @__PURE__ */ p("div", { className: $.panel, children: [
440
+ (i != null || o) && /* @__PURE__ */ p("div", { className: $.header, children: [
441
+ i != null && /* @__PURE__ */ n("h2", { id: _, className: $.title, children: i }),
442
+ o && /* @__PURE__ */ n(
434
443
  X,
435
444
  {
436
445
  variant: "ghost",
@@ -441,55 +450,55 @@ function Ro({
441
450
  }
442
451
  )
443
452
  ] }),
444
- s,
445
- a != null && /* @__PURE__ */ n("div", { className: z.footer, children: a })
453
+ d,
454
+ a != null && /* @__PURE__ */ n("div", { className: $.footer, children: a })
446
455
  ] })
447
456
  }
448
457
  );
449
458
  }
450
- const $t = "_input_hpei8_3", Lt = "_size24_hpei8_37", jt = "_size32_hpei8_43", St = "_size40_hpei8_49", zt = "_size48_hpei8_55", It = "_error_hpei8_63", A = {
451
- input: $t,
452
- size24: Lt,
453
- size32: jt,
454
- size40: St,
455
- size48: zt,
456
- error: It
457
- }, Tt = {
459
+ const jt = "_input_hpei8_3", It = "_size24_hpei8_37", Tt = "_size32_hpei8_43", Et = "_size40_hpei8_49", Mt = "_size48_hpei8_55", Wt = "_error_hpei8_63", A = {
460
+ input: jt,
461
+ size24: It,
462
+ size32: Tt,
463
+ size40: Et,
464
+ size48: Mt,
465
+ error: Wt
466
+ }, At = {
458
467
  24: A.size24,
459
468
  32: A.size32,
460
469
  40: A.size40,
461
470
  48: A.size48
462
471
  };
463
- function Ho({ size: e = 32, error: t = !1, type: i = "text", className: a, ref: c, ...r }) {
464
- const o = L(te), s = t || ((o == null ? void 0 : o.invalid) ?? !1), l = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, d = [A.input, Tt[e], s && A.error, a].filter(Boolean).join(" ");
472
+ function Oo({ size: e = 32, error: t = !1, type: i = "text", className: a, ref: c, ...r }) {
473
+ const o = z(te), s = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [A.input, At[e], s && A.error, a].filter(Boolean).join(" ");
465
474
  return /* @__PURE__ */ n(
466
475
  "input",
467
476
  {
468
477
  ref: c,
469
- className: d,
478
+ className: l,
470
479
  id: r.id ?? (o == null ? void 0 : o.id),
471
480
  required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
472
481
  "aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
473
482
  type: i,
474
483
  ...r,
475
- "aria-describedby": l
484
+ "aria-describedby": d
476
485
  }
477
486
  );
478
487
  }
479
- const Et = "_select_4x9ck_3", Mt = "_size24_4x9ck_37", Wt = "_size32_4x9ck_45", At = "_size40_4x9ck_53", Pt = "_size48_4x9ck_61", Dt = "_error_4x9ck_71", P = {
480
- select: Et,
481
- size24: Mt,
482
- size32: Wt,
483
- size40: At,
484
- size48: Pt,
485
- error: Dt
486
- }, Rt = {
488
+ const Pt = "_select_4x9ck_3", Dt = "_size24_4x9ck_37", Rt = "_size32_4x9ck_45", Ht = "_size40_4x9ck_53", Vt = "_size48_4x9ck_61", qt = "_error_4x9ck_71", P = {
489
+ select: Pt,
490
+ size24: Dt,
491
+ size32: Rt,
492
+ size40: Ht,
493
+ size48: Vt,
494
+ error: qt
495
+ }, Ft = {
487
496
  24: P.size24,
488
497
  32: P.size32,
489
498
  40: P.size40,
490
499
  48: P.size48
491
500
  };
492
- function Vo({
501
+ function Ko({
493
502
  size: e = 32,
494
503
  error: t = !1,
495
504
  className: i,
@@ -497,9 +506,9 @@ function Vo({
497
506
  children: c,
498
507
  ...r
499
508
  }) {
500
- const o = L(te), s = t || ((o == null ? void 0 : o.invalid) ?? !1), l = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, d = [
509
+ const o = z(te), s = t || ((o == null ? void 0 : o.invalid) ?? !1), d = [o == null ? void 0 : o.describedBy, r["aria-describedby"]].filter(Boolean).join(" ") || void 0, l = [
501
510
  P.select,
502
- Rt[e],
511
+ Ft[e],
503
512
  s && P.error,
504
513
  i
505
514
  ].filter(Boolean).join(" ");
@@ -507,22 +516,22 @@ function Vo({
507
516
  "select",
508
517
  {
509
518
  ref: a,
510
- className: d,
519
+ className: l,
511
520
  id: r.id ?? (o == null ? void 0 : o.id),
512
521
  required: r.required ?? ((o == null ? void 0 : o.required) || void 0),
513
522
  "aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
514
523
  ...r,
515
- "aria-describedby": l,
524
+ "aria-describedby": d,
516
525
  children: c
517
526
  }
518
527
  );
519
528
  }
520
- const Ht = "_label_1v4vv_3", Vt = "_disabled_1v4vv_13", qt = "_input_1v4vv_20", Ft = "_indicator_1v4vv_34", Ot = "_text_1v4vv_75", q = {
521
- label: Ht,
522
- disabled: Vt,
523
- input: qt,
524
- indicator: Ft,
525
- text: Ot
529
+ const Ot = "_label_1v4vv_3", Kt = "_disabled_1v4vv_13", Ut = "_input_1v4vv_20", Yt = "_indicator_1v4vv_34", Zt = "_text_1v4vv_75", q = {
530
+ label: Ot,
531
+ disabled: Kt,
532
+ input: Ut,
533
+ indicator: Yt,
534
+ text: Zt
526
535
  };
527
536
  function he({
528
537
  children: e,
@@ -547,15 +556,15 @@ function he({
547
556
  e && /* @__PURE__ */ n("span", { className: q.text, children: e })
548
557
  ] });
549
558
  }
550
- const Kt = "_label_jru2c_3", Ut = "_disabled_jru2c_13", Yt = "_input_jru2c_20", Zt = "_track_jru2c_34", Gt = "_thumb_jru2c_58", Xt = "_text_jru2c_75", M = {
551
- label: Kt,
552
- disabled: Ut,
553
- input: Yt,
554
- track: Zt,
555
- thumb: Gt,
556
- text: Xt
559
+ const Gt = "_label_jru2c_3", Xt = "_disabled_jru2c_13", Jt = "_input_jru2c_20", Qt = "_track_jru2c_34", en = "_thumb_jru2c_58", tn = "_text_jru2c_75", M = {
560
+ label: Gt,
561
+ disabled: Xt,
562
+ input: Jt,
563
+ track: Qt,
564
+ thumb: en,
565
+ text: tn
557
566
  };
558
- function qo({
567
+ function Uo({
559
568
  children: e,
560
569
  className: t,
561
570
  disabled: i,
@@ -579,33 +588,33 @@ function qo({
579
588
  e && /* @__PURE__ */ n("span", { className: M.text, children: e })
580
589
  ] });
581
590
  }
582
- const Jt = "_tag_3oysa_3", Qt = "_dismiss_3oysa_17", en = "_neutral_3oysa_43", tn = "_accent_3oysa_48", nn = "_success_3oysa_53", on = "_warning_3oysa_58", rn = "_danger_3oysa_63", sn = "_neutralSubtle_3oysa_70", an = "_accentSubtle_3oysa_75", cn = "_successSubtle_3oysa_80", ln = "_warningSubtle_3oysa_85", dn = "_dangerSubtle_3oysa_90", x = {
583
- tag: Jt,
584
- dismiss: Qt,
585
- neutral: en,
586
- accent: tn,
587
- success: nn,
588
- warning: on,
589
- danger: rn,
590
- neutralSubtle: sn,
591
- accentSubtle: an,
592
- successSubtle: cn,
593
- warningSubtle: ln,
594
- dangerSubtle: dn
595
- }, un = {
596
- neutral: x.neutral,
597
- accent: x.accent,
598
- success: x.success,
599
- warning: x.warning,
600
- danger: x.danger
601
- }, hn = {
602
- neutral: x.neutralSubtle,
603
- accent: x.accentSubtle,
604
- success: x.successSubtle,
605
- warning: x.warningSubtle,
606
- danger: x.dangerSubtle
591
+ const nn = "_tag_3oysa_3", on = "_dismiss_3oysa_17", rn = "_neutral_3oysa_43", sn = "_accent_3oysa_48", an = "_success_3oysa_53", cn = "_warning_3oysa_58", ln = "_danger_3oysa_63", dn = "_neutralSubtle_3oysa_70", un = "_accentSubtle_3oysa_75", hn = "_successSubtle_3oysa_80", _n = "_warningSubtle_3oysa_85", fn = "_dangerSubtle_3oysa_90", C = {
592
+ tag: nn,
593
+ dismiss: on,
594
+ neutral: rn,
595
+ accent: sn,
596
+ success: an,
597
+ warning: cn,
598
+ danger: ln,
599
+ neutralSubtle: dn,
600
+ accentSubtle: un,
601
+ successSubtle: hn,
602
+ warningSubtle: _n,
603
+ dangerSubtle: fn
604
+ }, pn = {
605
+ neutral: C.neutral,
606
+ accent: C.accent,
607
+ success: C.success,
608
+ warning: C.warning,
609
+ danger: C.danger
610
+ }, vn = {
611
+ neutral: C.neutralSubtle,
612
+ accent: C.accentSubtle,
613
+ success: C.successSubtle,
614
+ warning: C.warningSubtle,
615
+ danger: C.dangerSubtle
607
616
  };
608
- function Fo({
617
+ function Yo({
609
618
  variant: e = "neutral",
610
619
  subtle: t = !1,
611
620
  onDismiss: i,
@@ -614,14 +623,14 @@ function Fo({
614
623
  ref: r,
615
624
  ...o
616
625
  }) {
617
- const s = t ? hn : un, l = [x.tag, s[e], a].filter(Boolean).join(" ");
618
- return /* @__PURE__ */ p("span", { ref: r, className: l, ...o, children: [
626
+ const s = t ? vn : pn, d = [C.tag, s[e], a].filter(Boolean).join(" ");
627
+ return /* @__PURE__ */ p("span", { ref: r, className: d, ...o, children: [
619
628
  c,
620
629
  i && /* @__PURE__ */ n(
621
630
  "button",
622
631
  {
623
632
  type: "button",
624
- className: x.dismiss,
633
+ className: C.dismiss,
625
634
  onClick: i,
626
635
  "aria-label": "Dismiss",
627
636
  children: /* @__PURE__ */ p(
@@ -646,53 +655,53 @@ function Fo({
646
655
  )
647
656
  ] });
648
657
  }
649
- const _n = "_wrapper_1eu6z_3", fn = "_tooltip_1eu6z_10", pn = "_top_1eu6z_24", vn = "_bottom_1eu6z_31", gn = "_left_1eu6z_38", bn = "_right_1eu6z_45", D = {
650
- wrapper: _n,
651
- tooltip: fn,
652
- top: pn,
653
- bottom: vn,
654
- left: gn,
655
- right: bn
656
- }, yn = {
658
+ const gn = "_wrapper_1eu6z_3", bn = "_tooltip_1eu6z_10", yn = "_top_1eu6z_24", mn = "_bottom_1eu6z_31", wn = "_left_1eu6z_38", kn = "_right_1eu6z_45", D = {
659
+ wrapper: gn,
660
+ tooltip: bn,
661
+ top: yn,
662
+ bottom: mn,
663
+ left: wn,
664
+ right: kn
665
+ }, xn = {
657
666
  top: D.top,
658
667
  bottom: D.bottom,
659
668
  left: D.left,
660
669
  right: D.right
661
- }, mn = 150;
662
- function Oo({
670
+ }, Cn = 150;
671
+ function Zo({
663
672
  content: e,
664
673
  children: t,
665
674
  placement: i = "top"
666
675
  }) {
667
- const [a, c] = le(!1), r = U(), o = B(void 0), s = m(() => {
676
+ const [a, c] = le(!1), r = U(), o = N(void 0), s = m(() => {
668
677
  o.current !== void 0 && (window.clearTimeout(o.current), o.current = void 0);
669
- }, []), l = m(() => c(!0), []), d = m(() => c(!1), []);
670
- N(() => s, [s]), N(() => {
678
+ }, []), d = m(() => c(!0), []), l = m(() => c(!1), []);
679
+ S(() => s, [s]), S(() => {
671
680
  if (!a) return;
672
681
  const h = (_) => {
673
- _.key === "Escape" && d();
682
+ _.key === "Escape" && l();
674
683
  };
675
684
  return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
676
- }, [a, d]);
685
+ }, [a, l]);
677
686
  const u = ee(t, {
678
687
  "aria-describedby": a ? r : void 0,
679
688
  onMouseEnter: (h) => {
680
- s(), o.current = window.setTimeout(l, mn);
689
+ s(), o.current = window.setTimeout(d, Cn);
681
690
  const _ = t.props.onMouseEnter;
682
691
  _ == null || _(h);
683
692
  },
684
693
  onMouseLeave: (h) => {
685
- s(), d();
694
+ s(), l();
686
695
  const _ = t.props.onMouseLeave;
687
696
  _ == null || _(h);
688
697
  },
689
698
  onFocus: (h) => {
690
- l();
699
+ d();
691
700
  const _ = t.props.onFocus;
692
701
  _ == null || _(h);
693
702
  },
694
703
  onBlur: (h) => {
695
- s(), d();
704
+ s(), l();
696
705
  const _ = t.props.onBlur;
697
706
  _ == null || _(h);
698
707
  }
@@ -704,102 +713,102 @@ function Oo({
704
713
  {
705
714
  id: r,
706
715
  role: "tooltip",
707
- className: [D.tooltip, yn[i]].filter(Boolean).join(" "),
716
+ className: [D.tooltip, xn[i]].filter(Boolean).join(" "),
708
717
  children: e
709
718
  }
710
719
  )
711
720
  ] });
712
721
  }
713
- const wn = "_toolbar_1i848_1", kn = "_gap8_1i848_7", xn = "_gap12_1i848_8", Cn = "_gap16_1i848_9", Z = {
714
- toolbar: wn,
715
- gap8: kn,
716
- gap12: xn,
717
- gap16: Cn
718
- }, Bn = { 8: Z.gap8, 12: Z.gap12, 16: Z.gap16 };
719
- function Ko({ gap: e = 8, className: t, children: i, ref: a, ...c }) {
720
- const r = [Z.toolbar, Bn[e], t].filter(Boolean).join(" ");
722
+ const Bn = "_toolbar_1i848_1", Nn = "_gap8_1i848_7", Sn = "_gap12_1i848_8", $n = "_gap16_1i848_9", Z = {
723
+ toolbar: Bn,
724
+ gap8: Nn,
725
+ gap12: Sn,
726
+ gap16: $n
727
+ }, Ln = { 8: Z.gap8, 12: Z.gap12, 16: Z.gap16 };
728
+ function Go({ gap: e = 8, className: t, children: i, ref: a, ...c }) {
729
+ const r = [Z.toolbar, Ln[e], t].filter(Boolean).join(" ");
721
730
  return /* @__PURE__ */ n("div", { ref: a, role: c["aria-label"] != null ? "group" : void 0, className: r, ...c, children: i });
722
731
  }
723
- const Nn = "_trigger_vpa0u_4", $n = "_menu_vpa0u_16", Ln = "_item_vpa0u_37", jn = "_separator_vpa0u_74", J = {
724
- trigger: Nn,
725
- menu: $n,
726
- item: Ln,
727
- separator: jn
728
- }, Sn = 500;
729
- function zn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
730
- const c = B(""), r = B(0), o = m(() => {
731
- const d = e.current;
732
- return d ? Array.from(
733
- d.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
732
+ const zn = "_trigger_vpa0u_4", jn = "_menu_vpa0u_16", In = "_item_vpa0u_37", Tn = "_separator_vpa0u_74", J = {
733
+ trigger: zn,
734
+ menu: jn,
735
+ item: In,
736
+ separator: Tn
737
+ }, En = 500;
738
+ function Mn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
739
+ const c = N(""), r = N(0), o = m(() => {
740
+ const l = e.current;
741
+ return l ? Array.from(
742
+ l.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
734
743
  ) : [];
735
744
  }, [e]), s = m(
736
- (d) => {
737
- if (d) {
738
- for (const u of o()) u.tabIndex = u === d ? 0 : -1;
739
- d.focus();
745
+ (l) => {
746
+ if (l) {
747
+ for (const u of o()) u.tabIndex = u === l ? 0 : -1;
748
+ l.focus();
740
749
  }
741
750
  },
742
751
  [o]
743
- ), l = m(() => {
752
+ ), d = m(() => {
744
753
  var u;
745
- const d = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
746
- d == null || d.focus();
754
+ const l = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
755
+ l == null || l.focus();
747
756
  }, [t]);
748
- return N(() => {
757
+ return S(() => {
749
758
  if (!i) return;
750
- const d = o();
751
- return s(d[0]), () => {
759
+ const l = o();
760
+ return s(l[0]), () => {
752
761
  var u;
753
- (u = e.current) != null && u.contains(document.activeElement) && l();
762
+ (u = e.current) != null && u.contains(document.activeElement) && d();
754
763
  };
755
- }, [i, e, o, s, l]), m(
756
- (d) => {
757
- if (d.key === "Escape") {
758
- d.preventDefault(), a();
764
+ }, [i, e, o, s, d]), m(
765
+ (l) => {
766
+ if (l.key === "Escape") {
767
+ l.preventDefault(), a();
759
768
  return;
760
769
  }
761
770
  const u = o();
762
771
  if (u.length === 0) return;
763
772
  const h = u.indexOf(document.activeElement);
764
- switch (d.key) {
773
+ switch (l.key) {
765
774
  case "ArrowDown":
766
- d.preventDefault(), s(u[(h + 1 + u.length) % u.length]);
775
+ l.preventDefault(), s(u[(h + 1 + u.length) % u.length]);
767
776
  return;
768
777
  case "ArrowUp":
769
- d.preventDefault(), s(u[h <= 0 ? u.length - 1 : h - 1]);
778
+ l.preventDefault(), s(u[h <= 0 ? u.length - 1 : h - 1]);
770
779
  return;
771
780
  case "Home":
772
- d.preventDefault(), s(u[0]);
781
+ l.preventDefault(), s(u[0]);
773
782
  return;
774
783
  case "End":
775
- d.preventDefault(), s(u[u.length - 1]);
784
+ l.preventDefault(), s(u[u.length - 1]);
776
785
  return;
777
786
  }
778
- if (d.key.length !== 1 || d.metaKey || d.ctrlKey || d.altKey) return;
787
+ if (l.key.length !== 1 || l.metaKey || l.ctrlKey || l.altKey) return;
779
788
  const _ = Date.now();
780
- c.current = _ - r.current > Sn ? d.key.toLowerCase() : c.current + d.key.toLowerCase(), r.current = _;
789
+ c.current = _ - r.current > En ? l.key.toLowerCase() : c.current + l.key.toLowerCase(), r.current = _;
781
790
  const b = u.find(
782
791
  (y) => (y.textContent ?? "").trim().toLowerCase().startsWith(c.current)
783
792
  );
784
- b && (d.preventDefault(), s(b));
793
+ b && (l.preventDefault(), s(b));
785
794
  },
786
795
  [o, s, a]
787
796
  );
788
797
  }
789
- function In() {
798
+ function Wn() {
790
799
  return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
791
800
  }
792
- function Tn({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c }) {
793
- N(() => {
801
+ function An({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c }) {
802
+ S(() => {
794
803
  const r = t.current, o = e.current;
795
804
  !r || !o || (r.style.setProperty("anchor-name", c), o.style.setProperty("position-anchor", c));
796
- }, [e, t, c]), N(() => {
797
- if (!i || In()) return;
805
+ }, [e, t, c]), S(() => {
806
+ if (!i || Wn()) return;
798
807
  const r = t.current, o = e.current;
799
808
  if (!r || !o) return;
800
809
  const s = () => {
801
- const l = r.getBoundingClientRect(), d = a.startsWith("bottom"), u = a.endsWith("end"), h = getComputedStyle(r).direction === "rtl", _ = u !== h;
802
- o.style.position = "fixed", o.style.top = d ? `${l.bottom}px` : "", o.style.bottom = d ? "" : `${window.innerHeight - l.top}px`, o.style.left = _ ? "" : `${l.left}px`, o.style.right = _ ? `${window.innerWidth - l.right}px` : "";
810
+ const d = r.getBoundingClientRect(), l = a.startsWith("bottom"), u = a.endsWith("end"), h = getComputedStyle(r).direction === "rtl", _ = u !== h;
811
+ o.style.position = "fixed", o.style.top = l ? `${d.bottom}px` : "", o.style.bottom = l ? "" : `${window.innerHeight - d.top}px`, o.style.left = _ ? "" : `${d.left}px`, o.style.right = _ ? `${window.innerWidth - d.right}px` : "";
803
812
  };
804
813
  return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
805
814
  window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
@@ -811,7 +820,7 @@ const _e = K({ close: () => {
811
820
  function se(e) {
812
821
  return e.hasAttribute("data-open") || e.matches(":popover-open");
813
822
  }
814
- function Uo({
823
+ function Xo({
815
824
  open: e,
816
825
  onClose: t,
817
826
  trigger: i,
@@ -821,19 +830,19 @@ function Uo({
821
830
  ref: o,
822
831
  ...s
823
832
  }) {
824
- const l = B(null), d = B(null), u = B(!1), h = `--psi-menu-${U().replace(/:/g, "")}`;
825
- Tn({ popoverRef: l, triggerRef: d, open: e, placement: a, anchorName: h });
833
+ const d = N(null), l = N(null), u = N(!1), h = `--psi-menu-${U().replace(/:/g, "")}`;
834
+ An({ popoverRef: d, triggerRef: l, open: e, placement: a, anchorName: h });
826
835
  const _ = (f) => {
827
- l.current = f, typeof o == "function" ? o(f) : o && (o.current = f);
836
+ d.current = f, typeof o == "function" ? o(f) : o && (o.current = f);
828
837
  };
829
- N(() => {
830
- const f = l.current;
838
+ S(() => {
839
+ const f = d.current;
831
840
  if (!f) return;
832
- const g = se(f);
833
- e && !g ? f.showPopover() : !e && g && (u.current = !0, f.hidePopover());
841
+ const v = se(f);
842
+ e && !v ? f.showPopover() : !e && v && (u.current = !0, f.hidePopover());
834
843
  }, [e]);
835
844
  const b = m(() => {
836
- const f = l.current;
845
+ const f = d.current;
837
846
  if (f) {
838
847
  if (u.current) {
839
848
  u.current = !1;
@@ -841,9 +850,9 @@ function Uo({
841
850
  }
842
851
  se(f) || e && t("outside");
843
852
  }
844
- }, [t, e]), y = zn({
845
- popoverRef: l,
846
- triggerRef: d,
853
+ }, [t, e]), y = Mn({
854
+ popoverRef: d,
855
+ triggerRef: l,
847
856
  open: e,
848
857
  onEsc: () => t("esc")
849
858
  }), j = m(
@@ -851,15 +860,15 @@ function Uo({
851
860
  t(f);
852
861
  },
853
862
  [t]
854
- ), v = O(i);
855
- N(() => {
856
- v || console.warn(
863
+ ), x = O(i);
864
+ S(() => {
865
+ x || console.warn(
857
866
  "Psi Menu: `trigger` must be a single React element that forwards props to a focusable node. Menu clones it to attach aria-haspopup and aria-expanded; a string, fragment or array cannot carry them, so the menu renders without its trigger ARIA."
858
867
  );
859
- }, [v]);
860
- const I = v ? ee(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
868
+ }, [x]);
869
+ const g = x ? ee(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
861
870
  return /* @__PURE__ */ p(G, { children: [
862
- /* @__PURE__ */ n("div", { ref: d, className: J.trigger, "data-psi-menu-trigger": !0, children: I }),
871
+ /* @__PURE__ */ n("div", { ref: l, className: J.trigger, "data-psi-menu-trigger": !0, children: g }),
863
872
  /* @__PURE__ */ n(
864
873
  "div",
865
874
  {
@@ -877,8 +886,8 @@ function Uo({
877
886
  )
878
887
  ] });
879
888
  }
880
- function Yo({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1 }) {
881
- const { close: c } = L(_e);
889
+ function Jo({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1 }) {
890
+ const { close: c } = z(_e);
882
891
  return /* @__PURE__ */ n(
883
892
  "button",
884
893
  {
@@ -896,19 +905,19 @@ function Yo({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1
896
905
  }
897
906
  );
898
907
  }
899
- function Zo() {
908
+ function Qo() {
900
909
  return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: J.separator });
901
910
  }
902
- const En = "_table_146hc_3", Mn = "_headerCell_146hc_13", Wn = "_cell_146hc_19", An = "_sortButton_146hc_30", Pn = "_sortIndicator_146hc_47", Dn = "_selectCell_146hc_79", Rn = "_body_146hc_86", Hn = "_row_146hc_89", Vn = "_sticky_146hc_111", k = {
903
- table: En,
904
- headerCell: Mn,
905
- cell: Wn,
906
- sortButton: An,
907
- sortIndicator: Pn,
908
- selectCell: Dn,
909
- body: Rn,
910
- row: Hn,
911
- sticky: Vn
911
+ const Pn = "_table_146hc_3", Dn = "_headerCell_146hc_13", Rn = "_cell_146hc_19", Hn = "_sortButton_146hc_30", Vn = "_sortIndicator_146hc_47", qn = "_selectCell_146hc_79", Fn = "_body_146hc_86", On = "_row_146hc_89", Kn = "_sticky_146hc_111", k = {
912
+ table: Pn,
913
+ headerCell: Dn,
914
+ cell: Rn,
915
+ sortButton: Hn,
916
+ sortIndicator: Vn,
917
+ selectCell: qn,
918
+ body: Fn,
919
+ row: On,
920
+ sticky: Kn
912
921
  }, fe = /* @__PURE__ */ new Set(), R = K({
913
922
  size: 40,
914
923
  sortable: !1,
@@ -916,10 +925,10 @@ const En = "_table_146hc_3", Mn = "_headerCell_146hc_13", Wn = "_cell_146hc_19",
916
925
  selectable: !1,
917
926
  selected: fe
918
927
  }), pe = K([]);
919
- function qn({ children: e, className: t }) {
928
+ function Un({ children: e, className: t }) {
920
929
  return /* @__PURE__ */ n("tbody", { className: [k.body, t].filter(Boolean).join(" "), children: e });
921
930
  }
922
- function Fn(e) {
931
+ function Yn(e) {
923
932
  const t = [];
924
933
  let i = !1, a = !1;
925
934
  const c = (r) => {
@@ -929,8 +938,8 @@ function Fn(e) {
929
938
  W.forEach(s.props.children, o);
930
939
  return;
931
940
  }
932
- const l = s.props.rowId;
933
- typeof l == "string" ? t.push(l) : a = !0;
941
+ const d = s.props.rowId;
942
+ typeof d == "string" ? t.push(d) : a = !0;
934
943
  });
935
944
  };
936
945
  return W.forEach(e, function r(o) {
@@ -939,11 +948,11 @@ function Fn(e) {
939
948
  W.forEach(o.props.children, r);
940
949
  return;
941
950
  }
942
- o.type === qn && (i = !0, c(o.props.children));
951
+ o.type === Un && (i = !0, c(o.props.children));
943
952
  }
944
953
  }), { ids: t, sawBody: i, hasRowWithoutId: a };
945
954
  }
946
- function Go({
955
+ function er({
947
956
  size: e = 40,
948
957
  stickyHeader: t,
949
958
  sortable: i = !1,
@@ -952,33 +961,33 @@ function Go({
952
961
  selectable: r = !1,
953
962
  selected: o = fe,
954
963
  onSelectionChange: s,
955
- children: l,
956
- className: d,
964
+ children: d,
965
+ className: l,
957
966
  ref: u
958
967
  }) {
959
- const h = [k.table, t && k.sticky, d].filter(Boolean).join(" "), { ids: _, sawBody: b, hasRowWithoutId: y } = de(() => Fn(l), [l]);
960
- return process.env.NODE_ENV !== "production" && (i && !c && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !s && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !b && console.warn("Psi Table: `selectable` is set but no `TableBody` is visible to `Table`. Wrapping `TableBody` in a component other than a Fragment hides its rows, and select-all will clear the selection instead of filling it."), r && y && console.warn("Psi Table: `selectable` is set but a row in `TableBody` has no `rowId`. That row will render without a selection checkbox and select-all will not include it.")), /* @__PURE__ */ n(R.Provider, { value: { size: e, sortable: i, sort: a, onSortChange: c, selectable: r, selected: o, onSelectionChange: s }, children: /* @__PURE__ */ n(pe.Provider, { value: _, children: /* @__PURE__ */ n("table", { ref: u, className: h, "data-size": e, children: l }) }) });
968
+ const h = [k.table, t && k.sticky, l].filter(Boolean).join(" "), { ids: _, sawBody: b, hasRowWithoutId: y } = de(() => Yn(d), [d]);
969
+ return process.env.NODE_ENV !== "production" && (i && !c && console.warn("Psi Table: `sortable` is set without `onSortChange`; sorting will not respond."), r && !s && console.warn("Psi Table: `selectable` is set without `onSelectionChange`; selection will not respond."), r && !b && console.warn("Psi Table: `selectable` is set but no `TableBody` is visible to `Table`. Wrapping `TableBody` in a component other than a Fragment hides its rows, and select-all will clear the selection instead of filling it."), r && y && console.warn("Psi Table: `selectable` is set but a row in `TableBody` has no `rowId`. That row will render without a selection checkbox and select-all will not include it.")), /* @__PURE__ */ n(R.Provider, { value: { size: e, sortable: i, sort: a, onSortChange: c, selectable: r, selected: o, onSelectionChange: s }, children: /* @__PURE__ */ n(pe.Provider, { value: _, children: /* @__PURE__ */ n("table", { ref: u, className: h, "data-size": e, children: d }) }) });
961
970
  }
962
- function On({ rowId: e, label: t }) {
963
- const { selected: i, onSelectionChange: a } = L(R), c = () => {
971
+ function Zn({ rowId: e, label: t }) {
972
+ const { selected: i, onSelectionChange: a } = z(R), c = () => {
964
973
  const r = new Set(i);
965
974
  r.has(e) ? r.delete(e) : r.add(e), a == null || a(r);
966
975
  };
967
976
  return /* @__PURE__ */ n("td", { className: `${k.cell} ${k.selectCell}`, children: /* @__PURE__ */ n(he, { "aria-label": t, checked: i.has(e), onChange: c }) });
968
977
  }
969
- function Kn() {
970
- const { selected: e, onSelectionChange: t } = L(R), i = L(pe), a = B(null), c = i.length > 0 && i.every((s) => e.has(s)), r = i.some((s) => e.has(s));
971
- N(() => {
978
+ function Gn() {
979
+ const { selected: e, onSelectionChange: t } = z(R), i = z(pe), a = N(null), c = i.length > 0 && i.every((s) => e.has(s)), r = i.some((s) => e.has(s));
980
+ S(() => {
972
981
  a.current && (a.current.indeterminate = r && !c);
973
982
  }, [r, c]);
974
983
  const o = () => {
975
984
  const s = new Set(e);
976
- c ? i.forEach((l) => s.delete(l)) : i.forEach((l) => s.add(l)), t == null || t(s);
985
+ c ? i.forEach((d) => s.delete(d)) : i.forEach((d) => s.add(d)), t == null || t(s);
977
986
  };
978
987
  return /* @__PURE__ */ n("th", { scope: "col", className: `${k.headerCell} ${k.selectCell}`, children: /* @__PURE__ */ n(he, { ref: a, "aria-label": "Select all rows", checked: c, onChange: o }) });
979
988
  }
980
- function Xo({ children: e, className: t }) {
981
- const { selectable: i } = L(R);
989
+ function tr({ children: e, className: t }) {
990
+ const { selectable: i } = z(R);
982
991
  let a = !1;
983
992
  const c = i ? W.map(e, (r) => {
984
993
  if (a || !O(r)) return r;
@@ -988,15 +997,15 @@ function Xo({ children: e, className: t }) {
988
997
  o,
989
998
  void 0,
990
999
  /* @__PURE__ */ p(G, { children: [
991
- /* @__PURE__ */ n(Kn, {}),
1000
+ /* @__PURE__ */ n(Gn, {}),
992
1001
  o.props.children
993
1002
  ] })
994
1003
  );
995
1004
  }) : e;
996
1005
  return /* @__PURE__ */ n("thead", { className: [k.head, t].filter(Boolean).join(" "), children: c });
997
1006
  }
998
- function Jo({ rowId: e, selectLabel: t, children: i, className: a }) {
999
- const { selectable: c, selected: r } = L(R), o = e !== void 0 && r.has(e);
1007
+ function nr({ rowId: e, selectLabel: t, children: i, className: a }) {
1008
+ const { selectable: c, selected: r } = z(R), o = e !== void 0 && r.has(e);
1000
1009
  return /* @__PURE__ */ p(
1001
1010
  "tr",
1002
1011
  {
@@ -1004,16 +1013,16 @@ function Jo({ rowId: e, selectLabel: t, children: i, className: a }) {
1004
1013
  "data-row-id": e,
1005
1014
  "data-selected": o || void 0,
1006
1015
  children: [
1007
- c && e !== void 0 && /* @__PURE__ */ n(On, { rowId: e, label: t ?? `Select row ${e}` }),
1016
+ c && e !== void 0 && /* @__PURE__ */ n(Zn, { rowId: e, label: t ?? `Select row ${e}` }),
1008
1017
  i
1009
1018
  ]
1010
1019
  }
1011
1020
  );
1012
1021
  }
1013
- function Qo({ sortKey: e, numeric: t, children: i, className: a }) {
1014
- const { sortable: c, sort: r, onSortChange: o } = L(R), s = c && e !== void 0, l = s && (r == null ? void 0 : r.key) === e, d = s ? l ? r.direction === "asc" ? "ascending" : "descending" : "none" : void 0, u = () => {
1022
+ function or({ sortKey: e, numeric: t, children: i, className: a }) {
1023
+ const { sortable: c, sort: r, onSortChange: o } = z(R), s = c && e !== void 0, d = s && (r == null ? void 0 : r.key) === e, l = s ? d ? r.direction === "asc" ? "ascending" : "descending" : "none" : void 0, u = () => {
1015
1024
  if (!e) return;
1016
- const h = l && r.direction === "asc" ? "desc" : "asc";
1025
+ const h = d && r.direction === "asc" ? "desc" : "asc";
1017
1026
  o == null || o({ key: e, direction: h });
1018
1027
  };
1019
1028
  return /* @__PURE__ */ n(
@@ -1022,40 +1031,40 @@ function Qo({ sortKey: e, numeric: t, children: i, className: a }) {
1022
1031
  scope: "col",
1023
1032
  className: [k.headerCell, a].filter(Boolean).join(" "),
1024
1033
  "data-numeric": t || void 0,
1025
- "aria-sort": d,
1034
+ "aria-sort": l,
1026
1035
  children: s ? /* @__PURE__ */ p("button", { type: "button", className: k.sortButton, onClick: u, children: [
1027
1036
  i,
1028
- /* @__PURE__ */ n("span", { className: k.sortIndicator, "aria-hidden": "true", children: l ? r.direction === "asc" ? "↑" : "↓" : "" })
1037
+ /* @__PURE__ */ n("span", { className: k.sortIndicator, "aria-hidden": "true", children: d ? r.direction === "asc" ? "↑" : "↓" : "" })
1029
1038
  ] }) : i
1030
1039
  }
1031
1040
  );
1032
1041
  }
1033
- function er({ numeric: e, children: t, className: i }) {
1042
+ function rr({ numeric: e, children: t, className: i }) {
1034
1043
  return /* @__PURE__ */ n("td", { className: [k.cell, i].filter(Boolean).join(" "), "data-numeric": e || void 0, children: t });
1035
1044
  }
1036
- const Un = "_nav_166vs_6", Yn = "_ellipsis_166vs_12", ae = {
1037
- nav: Un,
1038
- ellipsis: Yn
1045
+ const Xn = "_nav_166vs_6", Jn = "_ellipsis_166vs_12", ae = {
1046
+ nav: Xn,
1047
+ ellipsis: Jn
1039
1048
  };
1040
1049
  function F(e, t) {
1041
1050
  return Array.from({ length: t - e + 1 }, (i, a) => e + a);
1042
1051
  }
1043
- function Zn(e, t, i) {
1052
+ function Qn(e, t, i) {
1044
1053
  const a = Math.max(0, i), c = a * 2 + 1, r = c + 4;
1045
1054
  if (t <= r)
1046
1055
  return F(1, t);
1047
- const o = Math.max(e - a, 1), s = Math.min(e + a, t), l = o > 3, d = s < t - 2;
1048
- if (!l && d) {
1056
+ const o = Math.max(e - a, 1), s = Math.min(e + a, t), d = o > 3, l = s < t - 2;
1057
+ if (!d && l) {
1049
1058
  const u = Math.max(s, c);
1050
1059
  return [...F(1, u), "ellipsis", t];
1051
1060
  }
1052
- if (l && !d) {
1061
+ if (d && !l) {
1053
1062
  const u = Math.min(o, t - c + 1);
1054
1063
  return [1, "ellipsis", ...F(u, t)];
1055
1064
  }
1056
- return l && d ? [1, "ellipsis", ...F(o, s), "ellipsis", t] : F(1, t);
1065
+ return d && l ? [1, "ellipsis", ...F(o, s), "ellipsis", t] : F(1, t);
1057
1066
  }
1058
- function tr({
1067
+ function ir({
1059
1068
  page: e,
1060
1069
  pageCount: t,
1061
1070
  onPageChange: i,
@@ -1063,7 +1072,7 @@ function tr({
1063
1072
  "aria-label": c = "Pagination",
1064
1073
  className: r
1065
1074
  }) {
1066
- const o = Zn(e, t, a);
1075
+ const o = Qn(e, t, a);
1067
1076
  return /* @__PURE__ */ p("nav", { "aria-label": c, className: [ae.nav, r].filter(Boolean).join(" "), children: [
1068
1077
  /* @__PURE__ */ n(
1069
1078
  X,
@@ -1077,7 +1086,7 @@ function tr({
1077
1086
  }
1078
1087
  ),
1079
1088
  o.map(
1080
- (s, l) => s === "ellipsis" ? /* @__PURE__ */ n("span", { className: ae.ellipsis, "aria-hidden": "true", children: "…" }, `e${l}`) : /* @__PURE__ */ n(
1089
+ (s, d) => s === "ellipsis" ? /* @__PURE__ */ n("span", { className: ae.ellipsis, "aria-hidden": "true", children: "…" }, `e${d}`) : /* @__PURE__ */ n(
1081
1090
  Me,
1082
1091
  {
1083
1092
  size: 32,
@@ -1102,33 +1111,33 @@ function tr({
1102
1111
  )
1103
1112
  ] });
1104
1113
  }
1105
- const Gn = "_toast_7toru_10", Xn = "_icon_7toru_39", Jn = "_iconNeutral_7toru_44", Qn = "_iconSuccess_7toru_45", eo = "_iconWarning_7toru_46", to = "_iconDanger_7toru_47", no = "_body_7toru_51", oo = "_action_7toru_55", ro = "_srOnly_7toru_60", io = "_region_7toru_74", so = "_live_7toru_104", C = {
1106
- toast: Gn,
1107
- icon: Xn,
1108
- iconNeutral: Jn,
1109
- iconSuccess: Qn,
1110
- iconWarning: eo,
1111
- iconDanger: to,
1112
- body: no,
1113
- action: oo,
1114
- srOnly: ro,
1115
- region: io,
1116
- live: so
1117
- }, ao = {
1114
+ const eo = "_toast_7toru_10", to = "_icon_7toru_39", no = "_iconNeutral_7toru_44", oo = "_iconSuccess_7toru_45", ro = "_iconWarning_7toru_46", io = "_iconDanger_7toru_47", so = "_body_7toru_51", ao = "_action_7toru_55", co = "_srOnly_7toru_60", lo = "_region_7toru_74", uo = "_live_7toru_104", B = {
1115
+ toast: eo,
1116
+ icon: to,
1117
+ iconNeutral: no,
1118
+ iconSuccess: oo,
1119
+ iconWarning: ro,
1120
+ iconDanger: io,
1121
+ body: so,
1122
+ action: ao,
1123
+ srOnly: co,
1124
+ region: lo,
1125
+ live: uo
1126
+ }, ho = {
1118
1127
  neutral: pt,
1119
1128
  success: ft,
1120
1129
  warning: vt,
1121
1130
  danger: gt
1122
- }, co = {
1131
+ }, _o = {
1123
1132
  neutral: null,
1124
1133
  success: "Success:",
1125
1134
  warning: "Warning:",
1126
1135
  danger: "Error:"
1127
- }, lo = {
1128
- neutral: C.iconNeutral,
1129
- success: C.iconSuccess,
1130
- warning: C.iconWarning,
1131
- danger: C.iconDanger
1136
+ }, fo = {
1137
+ neutral: B.iconNeutral,
1138
+ success: B.iconSuccess,
1139
+ warning: B.iconWarning,
1140
+ danger: B.iconDanger
1132
1141
  };
1133
1142
  function ve({
1134
1143
  variant: e = "neutral",
@@ -1138,14 +1147,14 @@ function ve({
1138
1147
  className: c,
1139
1148
  ref: r
1140
1149
  }) {
1141
- const o = ao[e], s = co[e], l = [C.toast, c].filter(Boolean).join(" ");
1142
- return /* @__PURE__ */ p("div", { ref: r, className: l, "data-variant": e, "data-psi-toast": !0, children: [
1143
- /* @__PURE__ */ n("span", { className: [C.icon, lo[e]].join(" "), children: /* @__PURE__ */ n(o, { size: 20, "aria-hidden": "true" }) }),
1144
- /* @__PURE__ */ p("div", { className: C.body, children: [
1145
- s && /* @__PURE__ */ n("span", { className: C.srOnly, children: s }),
1150
+ const o = ho[e], s = _o[e], d = [B.toast, c].filter(Boolean).join(" ");
1151
+ return /* @__PURE__ */ p("div", { ref: r, className: d, "data-variant": e, "data-psi-toast": !0, children: [
1152
+ /* @__PURE__ */ n("span", { className: [B.icon, fo[e]].join(" "), children: /* @__PURE__ */ n(o, { size: 20, "aria-hidden": "true" }) }),
1153
+ /* @__PURE__ */ p("div", { className: B.body, children: [
1154
+ s && /* @__PURE__ */ n("span", { className: B.srOnly, children: s }),
1146
1155
  t
1147
1156
  ] }),
1148
- i != null && /* @__PURE__ */ n("div", { className: C.action, children: i }),
1157
+ i != null && /* @__PURE__ */ n("div", { className: B.action, children: i }),
1149
1158
  a && /* @__PURE__ */ n(
1150
1159
  X,
1151
1160
  {
@@ -1158,23 +1167,23 @@ function ve({
1158
1167
  )
1159
1168
  ] });
1160
1169
  }
1161
- const uo = /* @__PURE__ */ new Set(["warning", "danger"]);
1170
+ const po = /* @__PURE__ */ new Set(["warning", "danger"]);
1162
1171
  function ce(e) {
1163
1172
  if (!O(e) || e.type !== ve) return !1;
1164
1173
  const { variant: t } = e.props;
1165
- return uo.has(t ?? "neutral");
1174
+ return po.has(t ?? "neutral");
1166
1175
  }
1167
- function ho({
1176
+ function vo({
1168
1177
  placement: e = "bottom-end",
1169
1178
  "aria-label": t = "Notifications",
1170
1179
  children: i,
1171
1180
  className: a,
1172
1181
  ref: c
1173
1182
  }) {
1174
- const r = B(null), o = (u) => {
1183
+ const r = N(null), o = (u) => {
1175
1184
  r.current = u, typeof c == "function" ? c(u) : c && (c.current = u);
1176
1185
  };
1177
- N(() => {
1186
+ S(() => {
1178
1187
  var h;
1179
1188
  const u = r.current;
1180
1189
  if (u)
@@ -1183,7 +1192,7 @@ function ho({
1183
1192
  (_ = u.hidePopover) == null || _.call(u);
1184
1193
  };
1185
1194
  }, []);
1186
- const s = W.toArray(i), l = s.filter(ce), d = s.filter((u) => !ce(u));
1195
+ const s = W.toArray(i), d = s.filter(ce), l = s.filter((u) => !ce(u));
1187
1196
  return /* @__PURE__ */ p(
1188
1197
  "div",
1189
1198
  {
@@ -1192,44 +1201,44 @@ function ho({
1192
1201
  "aria-label": t,
1193
1202
  "data-placement": e,
1194
1203
  "data-psi-toast-region": !0,
1195
- className: [C.region, a].filter(Boolean).join(" "),
1204
+ className: [B.region, a].filter(Boolean).join(" "),
1196
1205
  children: [
1197
- /* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className: C.live, children: d }),
1198
- /* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className: C.live, children: l })
1206
+ /* @__PURE__ */ n("div", { role: "status", "aria-live": "polite", className: B.live, children: l }),
1207
+ /* @__PURE__ */ n("div", { role: "alert", "aria-live": "assertive", className: B.live, children: d })
1199
1208
  ]
1200
1209
  }
1201
1210
  );
1202
1211
  }
1203
1212
  const ge = K(null);
1204
- function nr() {
1205
- const e = L(ge);
1213
+ function sr() {
1214
+ const e = z(ge);
1206
1215
  if (!e)
1207
1216
  throw new Error(
1208
1217
  "Psi useToast: no ToastProvider found. Wrap your app (or the subtree that raises toasts) in <ToastProvider> — it owns the queue, the auto-dismiss timers and the single ToastRegion."
1209
1218
  );
1210
1219
  return e;
1211
1220
  }
1212
- function or({
1221
+ function ar({
1213
1222
  limit: e = 3,
1214
1223
  duration: t = 5e3,
1215
1224
  actionDuration: i = 1e4,
1216
1225
  placement: a = "bottom-end",
1217
1226
  children: c
1218
1227
  }) {
1219
- const [r, o] = le([]), s = B(/* @__PURE__ */ new Map()), l = B(!1), d = B(0), u = U(), h = m((f) => {
1220
- const g = s.current.get(f);
1221
- (g == null ? void 0 : g.handle) !== void 0 && clearTimeout(g.handle), s.current.delete(f), o((S) => S.filter((H) => H.id !== f));
1228
+ const [r, o] = le([]), s = N(/* @__PURE__ */ new Map()), d = N(!1), l = N(0), u = U(), h = m((f) => {
1229
+ const v = s.current.get(f);
1230
+ (v == null ? void 0 : v.handle) !== void 0 && clearTimeout(v.handle), s.current.delete(f), o((I) => I.filter((H) => H.id !== f));
1222
1231
  }, []), _ = m(
1223
- (f, g) => {
1224
- const S = l.current ? { handle: void 0, remaining: g, startedAt: void 0 } : { handle: setTimeout(() => h(f), g), remaining: g, startedAt: Date.now() };
1225
- s.current.set(f, S);
1232
+ (f, v) => {
1233
+ const I = d.current ? { handle: void 0, remaining: v, startedAt: void 0 } : { handle: setTimeout(() => h(f), v), remaining: v, startedAt: Date.now() };
1234
+ s.current.set(f, I);
1226
1235
  },
1227
1236
  [h]
1228
1237
  ), b = m(
1229
- ({ variant: f = "neutral", message: g, action: S }) => {
1230
- const H = `${u}-${d.current++}`, ne = S != null ? i : t;
1238
+ ({ variant: f = "neutral", message: v, action: I }) => {
1239
+ const H = `${u}-${l.current++}`, ne = I != null ? i : t;
1231
1240
  return o((be) => {
1232
- const Q = [...be, { id: H, variant: f, message: g, action: S, duration: ne }];
1241
+ const Q = [...be, { id: H, variant: f, message: v, action: I, duration: ne }];
1233
1242
  for (; Q.length > e; ) {
1234
1243
  const oe = Q.shift(), Y = s.current.get(oe.id);
1235
1244
  (Y == null ? void 0 : Y.handle) !== void 0 && clearTimeout(Y.handle), s.current.delete(oe.id);
@@ -1243,111 +1252,111 @@ function or({
1243
1252
  f.handle !== void 0 && clearTimeout(f.handle);
1244
1253
  s.current.clear(), o([]);
1245
1254
  }, []), j = m(() => {
1246
- if (!l.current) {
1247
- l.current = !0;
1248
- for (const [f, g] of s.current) {
1249
- if (g.handle === void 0) continue;
1250
- clearTimeout(g.handle);
1251
- const S = g.startedAt === void 0 ? 0 : Date.now() - g.startedAt;
1255
+ if (!d.current) {
1256
+ d.current = !0;
1257
+ for (const [f, v] of s.current) {
1258
+ if (v.handle === void 0) continue;
1259
+ clearTimeout(v.handle);
1260
+ const I = v.startedAt === void 0 ? 0 : Date.now() - v.startedAt;
1252
1261
  s.current.set(f, {
1253
1262
  handle: void 0,
1254
- remaining: Math.max(0, g.remaining - S),
1263
+ remaining: Math.max(0, v.remaining - I),
1255
1264
  startedAt: void 0
1256
1265
  });
1257
1266
  }
1258
1267
  }
1259
- }, []), v = m(() => {
1260
- if (l.current) {
1261
- l.current = !1;
1262
- for (const [f, g] of s.current)
1263
- g.handle === void 0 && s.current.set(f, {
1264
- handle: setTimeout(() => h(f), g.remaining),
1265
- remaining: g.remaining,
1268
+ }, []), x = m(() => {
1269
+ if (d.current) {
1270
+ d.current = !1;
1271
+ for (const [f, v] of s.current)
1272
+ v.handle === void 0 && s.current.set(f, {
1273
+ handle: setTimeout(() => h(f), v.remaining),
1274
+ remaining: v.remaining,
1266
1275
  startedAt: Date.now()
1267
1276
  });
1268
1277
  }
1269
1278
  }, [h]);
1270
- N(() => {
1279
+ S(() => {
1271
1280
  const f = s.current;
1272
1281
  return () => {
1273
- for (const g of f.values())
1274
- g.handle !== void 0 && clearTimeout(g.handle);
1282
+ for (const v of f.values())
1283
+ v.handle !== void 0 && clearTimeout(v.handle);
1275
1284
  f.clear();
1276
1285
  };
1277
1286
  }, []);
1278
- const I = de(
1287
+ const g = de(
1279
1288
  () => ({ show: b, dismiss: h, clear: y }),
1280
1289
  [b, h, y]
1281
1290
  );
1282
- return /* @__PURE__ */ p(ge.Provider, { value: I, children: [
1291
+ return /* @__PURE__ */ p(ge.Provider, { value: g, children: [
1283
1292
  c,
1284
1293
  /* @__PURE__ */ n(
1285
1294
  "div",
1286
1295
  {
1287
1296
  onPointerEnter: j,
1288
- onPointerLeave: v,
1297
+ onPointerLeave: x,
1289
1298
  onFocusCapture: j,
1290
- onBlurCapture: v,
1291
- children: /* @__PURE__ */ n(ho, { placement: a, children: r.map((f) => /* @__PURE__ */ n(ve, { variant: f.variant, action: f.action, onDismiss: () => h(f.id), children: f.message }, f.id)) })
1299
+ onBlurCapture: x,
1300
+ children: /* @__PURE__ */ n(vo, { placement: a, children: r.map((f) => /* @__PURE__ */ n(ve, { variant: f.variant, action: f.action, onDismiss: () => h(f.id), children: f.message }, f.id)) })
1292
1301
  }
1293
1302
  )
1294
1303
  ] });
1295
1304
  }
1296
1305
  export {
1297
- bo as AspectRatio,
1306
+ ko as AspectRatio,
1298
1307
  Me as Button,
1299
- po as Card,
1308
+ yo as Card,
1300
1309
  he as Checkbox,
1301
- Ro as Dialog,
1302
- yo as Field,
1310
+ Fo as Dialog,
1311
+ xo as Field,
1303
1312
  gt as IconAlertCircle,
1304
1313
  vt as IconAlertTriangle,
1305
- Eo as IconArrowDown,
1306
- Mo as IconArrowUpRight,
1314
+ Po as IconArrowDown,
1315
+ Do as IconArrowUpRight,
1307
1316
  X as IconButton,
1308
1317
  ft as IconCheck,
1309
- ko as IconChevronDown,
1310
- xo as IconChevronRight,
1318
+ No as IconChevronDown,
1319
+ So as IconChevronRight,
1311
1320
  ue as IconClose,
1312
- jo as IconCopy,
1313
- $o as IconEdit,
1314
- So as IconExternalLink,
1315
- zo as IconEye,
1316
- Io as IconEyeOff,
1317
- Ao as IconGitHub,
1321
+ To as IconCopy,
1322
+ jo as IconEdit,
1323
+ Eo as IconExternalLink,
1324
+ Mo as IconEye,
1325
+ Wo as IconEyeOff,
1326
+ Ho as IconGitHub,
1318
1327
  pt as IconInfo,
1319
- Do as IconInstagram,
1320
- Wo as IconLinkedIn,
1321
- To as IconLoader,
1322
- wo as IconMinus,
1323
- mo as IconPlus,
1324
- Co as IconSearch,
1325
- Bo as IconSettings,
1326
- Lo as IconTrash,
1327
- No as IconUser,
1328
- Po as IconX,
1329
- Ho as Input,
1330
- Uo as Menu,
1328
+ qo as IconInstagram,
1329
+ Ro as IconLinkedIn,
1330
+ Ao as IconLoader,
1331
+ Bo as IconMinus,
1332
+ Co as IconPlus,
1333
+ $o as IconSearch,
1334
+ Lo as IconSettings,
1335
+ Io as IconTrash,
1336
+ zo as IconUser,
1337
+ Vo as IconX,
1338
+ Oo as Input,
1339
+ Xo as Menu,
1331
1340
  _e as MenuContext,
1332
- Yo as MenuItem,
1333
- Zo as MenuSeparator,
1334
- go as NavBar,
1335
- tr as Pagination,
1336
- vo as Panel,
1337
- Vo as Select,
1338
- qo as Switch,
1339
- Go as Table,
1340
- qn as TableBody,
1341
- er as TableCell,
1342
- Xo as TableHead,
1343
- Qo as TableHeaderCell,
1344
- Jo as TableRow,
1345
- Fo as Tag,
1341
+ Jo as MenuItem,
1342
+ Qo as MenuSeparator,
1343
+ wo as NavBar,
1344
+ ir as Pagination,
1345
+ mo as Panel,
1346
+ Ko as Select,
1347
+ Uo as Switch,
1348
+ er as Table,
1349
+ Un as TableBody,
1350
+ rr as TableCell,
1351
+ tr as TableHead,
1352
+ or as TableHeaderCell,
1353
+ nr as TableRow,
1354
+ Yo as Tag,
1346
1355
  ve as Toast,
1347
1356
  ge as ToastContext,
1348
- or as ToastProvider,
1349
- ho as ToastRegion,
1350
- Ko as Toolbar,
1351
- Oo as Tooltip,
1352
- nr as useToast
1357
+ ar as ToastProvider,
1358
+ vo as ToastRegion,
1359
+ Go as Toolbar,
1360
+ Zo as Tooltip,
1361
+ sr as useToast
1353
1362
  };