@handamade/psi-react 0.7.2 → 0.8.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,320 +1,320 @@
1
- import { jsx as n, jsxs as c, Fragment as E } from "react/jsx-runtime";
2
- import { createContext as T, useId as W, useRef as q, useEffect as I, useContext as R, useState as D, useCallback as M, cloneElement as F } from "react";
3
- const P = "_button_m8fis_3", U = "_disabled_m8fis_31", Z = "_size24_m8fis_39", G = "_size32_m8fis_45", K = "_size40_m8fis_51", X = "_size48_m8fis_57", Y = "_accent_m8fis_66", J = "_accentSubtle_m8fis_78", Q = "_neutral_m8fis_90", O = "_neutralSubtle_m8fis_102", ee = "_ghost_m8fis_114", ne = "_danger_m8fis_126", te = "_dangerSubtle_m8fis_138", oe = "_outline_m8fis_150", p = {
4
- button: P,
5
- disabled: U,
6
- size24: Z,
7
- size32: G,
8
- size40: K,
9
- size48: X,
10
- accent: Y,
11
- accentSubtle: J,
12
- neutral: Q,
13
- neutralSubtle: O,
14
- ghost: ee,
15
- danger: ne,
16
- dangerSubtle: te,
17
- outline: oe
18
- }, ie = {
19
- accent: p.accent,
20
- "accent-subtle": p.accentSubtle,
21
- neutral: p.neutral,
22
- "neutral-subtle": p.neutralSubtle,
23
- ghost: p.ghost,
24
- danger: p.danger,
25
- "danger-subtle": p.dangerSubtle,
26
- outline: p.outline
27
- }, re = {
28
- 24: p.size24,
29
- 32: p.size32,
30
- 40: p.size40,
31
- 48: p.size48
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
32
32
  };
33
- function Yn({
33
+ function un({
34
34
  variant: e = "neutral",
35
35
  size: t = 32,
36
36
  href: i,
37
37
  target: a,
38
- rel: s,
38
+ rel: c,
39
39
  disabled: o,
40
40
  className: r,
41
41
  onClick: l,
42
- ref: u,
43
- ...h
42
+ ref: d,
43
+ ...s
44
44
  }) {
45
- const f = [
46
- p.button,
47
- ie[e],
48
- re[t],
49
- i !== void 0 && o ? p.disabled : void 0,
45
+ const u = [
46
+ f.button,
47
+ ue[e],
48
+ de[t],
49
+ i !== void 0 && o ? f.disabled : void 0,
50
50
  r
51
51
  ].filter(Boolean).join(" ");
52
52
  return i !== void 0 ? /* @__PURE__ */ n(
53
53
  "a",
54
54
  {
55
- ref: u,
56
- className: f,
55
+ ref: d,
56
+ className: u,
57
57
  href: o ? void 0 : i,
58
58
  target: a,
59
- rel: s,
59
+ rel: c,
60
60
  "aria-disabled": o || void 0,
61
61
  onClick: o ? void 0 : l,
62
- ...h
62
+ ...s
63
63
  }
64
64
  ) : /* @__PURE__ */ n(
65
65
  "button",
66
66
  {
67
- ref: u,
68
- className: f,
67
+ ref: d,
68
+ className: u,
69
69
  disabled: o,
70
70
  onClick: l,
71
- ...h
71
+ ...s
72
72
  }
73
73
  );
74
74
  }
75
- const se = "_iconButton_1dldx_3", ae = "_disabled_1dldx_29", ce = "_size24_1dldx_37", le = "_size32_1dldx_42", de = "_size40_1dldx_47", ue = "_size48_1dldx_52", _e = "_accent_1dldx_60", he = "_neutral_1dldx_72", ge = "_ghost_1dldx_84", pe = "_danger_1dldx_96", b = {
76
- iconButton: se,
77
- disabled: ae,
78
- size24: ce,
79
- size32: le,
80
- size40: de,
81
- size48: ue,
82
- accent: _e,
83
- neutral: he,
84
- ghost: ge,
85
- danger: pe
86
- }, fe = {
87
- accent: b.accent,
88
- neutral: b.neutral,
89
- ghost: b.ghost,
90
- danger: b.danger
91
- }, ve = {
92
- 24: b.size24,
93
- 32: b.size32,
94
- 40: b.size40,
95
- 48: b.size48
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
96
96
  };
97
- function be({
97
+ function Ce({
98
98
  variant: e = "neutral",
99
99
  size: t = 32,
100
100
  href: i,
101
101
  target: a,
102
- rel: s,
102
+ rel: c,
103
103
  disabled: o,
104
104
  className: r,
105
105
  onClick: l,
106
- ref: u,
107
- ...h
106
+ ref: d,
107
+ ...s
108
108
  }) {
109
- const f = [
110
- b.iconButton,
111
- fe[e],
112
- ve[t],
113
- i !== void 0 && o ? b.disabled : void 0,
109
+ const u = [
110
+ w.iconButton,
111
+ ke[e],
112
+ xe[t],
113
+ i !== void 0 && o ? w.disabled : void 0,
114
114
  r
115
115
  ].filter(Boolean).join(" ");
116
116
  return i !== void 0 ? /* @__PURE__ */ n(
117
117
  "a",
118
118
  {
119
- ref: u,
120
- className: f,
119
+ ref: d,
120
+ className: u,
121
121
  href: o ? void 0 : i,
122
122
  target: a,
123
- rel: s,
123
+ rel: c,
124
124
  "aria-disabled": o || void 0,
125
125
  onClick: o ? void 0 : l,
126
- ...h
126
+ ...s
127
127
  }
128
128
  ) : /* @__PURE__ */ n(
129
129
  "button",
130
130
  {
131
- ref: u,
132
- className: f,
131
+ ref: d,
132
+ className: u,
133
133
  disabled: o,
134
134
  onClick: l,
135
- ...h
135
+ ...s
136
136
  }
137
137
  );
138
138
  }
139
- const ye = "_card_1btb3_1", ke = "_stacked_1btb3_8", me = "_featured_1btb3_10", xe = "_media_1btb3_22", we = "_body_1btb3_23", ze = "_hoverLift_1btb3_31", m = {
140
- card: ye,
141
- stacked: ke,
142
- featured: me,
143
- media: xe,
144
- body: we,
145
- hoverLift: ze
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
146
146
  };
147
- function Jn({
147
+ function dn({
148
148
  variant: e = "stacked",
149
149
  media: t,
150
150
  hoverLift: i = !1,
151
151
  className: a,
152
- children: s,
152
+ children: c,
153
153
  ref: o,
154
154
  ...r
155
155
  }) {
156
156
  const l = [
157
- m.card,
158
- e === "featured" ? m.featured : m.stacked,
159
- i ? m.hoverLift : void 0,
157
+ $.card,
158
+ e === "featured" ? $.featured : $.stacked,
159
+ i ? $.hoverLift : void 0,
160
160
  a
161
161
  ].filter(Boolean).join(" ");
162
- return /* @__PURE__ */ c("div", { ref: o, className: l, ...r, children: [
163
- t != null && /* @__PURE__ */ n("div", { className: m.media, children: t }),
164
- /* @__PURE__ */ n("div", { className: m.body, children: s })
162
+ return /* @__PURE__ */ h("div", { ref: o, className: l, ...r, children: [
163
+ t != null && /* @__PURE__ */ n("div", { className: $.media, children: t }),
164
+ /* @__PURE__ */ n("div", { className: $.body, children: c })
165
165
  ] });
166
166
  }
167
- const Ce = "_panel_jn8w4_1", je = "_padding16_jn8w4_8", V = {
168
- panel: Ce,
169
- padding16: je
167
+ const Ne = "_panel_jn8w4_1", Ie = "_padding16_jn8w4_8", q = {
168
+ panel: Ne,
169
+ padding16: Ie
170
170
  };
171
- function Qn({ padding: e = 24, className: t, children: i, ref: a, ...s }) {
172
- const o = [V.panel, e === 16 ? V.padding16 : void 0, t].filter(Boolean).join(" ");
173
- return /* @__PURE__ */ n("div", { ref: a, className: o, ...s, children: i });
174
- }
175
- const Le = "_navbar_1gyow_1", Be = "_inner_1gyow_12", $e = "_brand_1gyow_19", Ne = "_links_1gyow_20", Se = "_actions_1gyow_50", B = {
176
- navbar: Le,
177
- inner: Be,
178
- brand: $e,
179
- links: Ne,
180
- actions: Se
171
+ function _n({ padding: e = 24, className: t, children: i, ref: a, ...c }) {
172
+ const o = [q.panel, e === 16 ? q.padding16 : void 0, t].filter(Boolean).join(" ");
173
+ return /* @__PURE__ */ n("div", { ref: a, className: o, ...c, children: i });
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
181
181
  };
182
- function On({ brand: e, actions: t, children: i, className: a, ref: s, ...o }) {
183
- const r = [B.navbar, a].filter(Boolean).join(" ");
184
- return /* @__PURE__ */ n("header", { ref: s, className: r, ...o, children: /* @__PURE__ */ c("div", { className: `psi-container ${B.inner}`, children: [
185
- e != null && /* @__PURE__ */ n("div", { className: B.brand, children: e }),
186
- /* @__PURE__ */ n("nav", { className: B.links, children: i }),
187
- t != null && /* @__PURE__ */ n("div", { className: B.actions, children: t })
182
+ function hn({ brand: e, actions: t, children: i, className: a, ref: c, ...o }) {
183
+ const r = [M.navbar, a].filter(Boolean).join(" ");
184
+ return /* @__PURE__ */ n("header", { ref: c, className: r, ...o, 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: i }),
187
+ t != null && /* @__PURE__ */ n("div", { className: M.actions, children: t })
188
188
  ] }) });
189
189
  }
190
- const Ie = "_frame_et4fc_1", Me = {
191
- frame: Ie
190
+ const He = "_frame_et4fc_1", Ve = {
191
+ frame: He
192
192
  };
193
- function et({ ratio: e, className: t, style: i, children: a, ref: s, ...o }) {
194
- const r = [Me.frame, t].filter(Boolean).join(" ");
195
- return /* @__PURE__ */ n("div", { ref: s, className: r, style: { aspectRatio: String(e), ...i }, ...o, children: a });
196
- }
197
- const We = "_field_lplye_1", He = "_label_lplye_10", Ae = "_marker_lplye_16", Ee = "_message_lplye_20", Ve = "_invalid_lplye_26", x = {
198
- field: We,
199
- label: He,
200
- marker: Ae,
201
- message: Ee,
202
- invalid: Ve
203
- }, H = T(null);
204
- function nt({
193
+ function pn({ ratio: e, className: t, style: i, children: a, ref: c, ...o }) {
194
+ const r = [Ve.frame, t].filter(Boolean).join(" ");
195
+ return /* @__PURE__ */ n("div", { ref: c, className: r, style: { aspectRatio: String(e), ...i }, ...o, 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({
205
205
  label: e,
206
206
  description: t,
207
207
  error: i,
208
208
  required: a = !1,
209
- group: s = !1,
209
+ group: c = !1,
210
210
  htmlFor: o,
211
211
  className: r,
212
212
  children: l,
213
- ref: u,
214
- ...h
213
+ ref: d,
214
+ ...s
215
215
  }) {
216
- const f = W(), g = o ?? f, d = !!i, L = d ? i : t, k = L != null && L !== !1 ? `${g}-message` : void 0, N = [x.field, d && x.invalid, r].filter(Boolean).join(" "), _ = e != null ? /* @__PURE__ */ c(E, { children: [
216
+ const u = H(), p = o ?? u, _ = !!i, b = _ ? i : t, m = b != null && b !== !1 ? `${p}-message` : void 0, L = [j.field, _ && j.invalid, r].filter(Boolean).join(" "), g = e != null ? /* @__PURE__ */ h(V, { children: [
217
217
  e,
218
- a && /* @__PURE__ */ n("span", { "aria-hidden": "true", className: x.marker, children: " *" })
219
- ] }) : null, A = /* @__PURE__ */ c(E, { children: [
220
- _ != null && (s ? /* @__PURE__ */ n("legend", { className: x.label, children: _ }) : /* @__PURE__ */ n("label", { className: x.label, htmlFor: g, children: _ })),
221
- /* @__PURE__ */ n(H.Provider, { value: { id: g, describedBy: k, invalid: d, required: a }, children: l }),
222
- k && /* @__PURE__ */ n("p", { id: k, className: x.message, "aria-live": "polite", children: L })
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 })
223
223
  ] });
224
- return s ? /* @__PURE__ */ n(
224
+ return c ? /* @__PURE__ */ n(
225
225
  "fieldset",
226
226
  {
227
- ref: u,
228
- className: N,
229
- "aria-describedby": k,
230
- ...h,
231
- children: A
227
+ ref: d,
228
+ className: L,
229
+ "aria-describedby": m,
230
+ ...s,
231
+ children: W
232
232
  }
233
- ) : /* @__PURE__ */ n("div", { ref: u, className: N, ...h, children: A });
233
+ ) : /* @__PURE__ */ n("div", { ref: d, className: L, ...s, children: W });
234
234
  }
235
- function tt({ size: e = 20, ...t }) {
236
- return /* @__PURE__ */ c("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 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: [
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 ot({ size: e = 20, ...t }) {
241
+ function vn({ 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 qe({ size: e = 20, ...t }) {
245
- return /* @__PURE__ */ c("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 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: [
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 it({ size: e = 20, ...t }) {
250
+ function yn({ 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 rt({ size: e = 20, ...t }) {
253
+ function bn({ 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 st({ size: e = 20, ...t }) {
256
+ function mn({ 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 at({ size: e = 20, ...t }) {
260
- return /* @__PURE__ */ c("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 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: [
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 ct({ size: e = 20, ...t }) {
266
- return /* @__PURE__ */ c("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 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: [
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 lt({ size: e = 20, ...t }) {
272
- return /* @__PURE__ */ c("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 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: [
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 dt({ size: e = 20, ...t }) {
278
- return /* @__PURE__ */ c("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 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: [
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 ut({ size: e = 20, ...t }) {
284
- return /* @__PURE__ */ c("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 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: [
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 _t({ size: e = 20, ...t }) {
290
- return /* @__PURE__ */ c("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 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: [
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 ht({ size: e = 20, ...t }) {
296
- return /* @__PURE__ */ c("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 $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: [
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 gt({ size: e = 20, ...t }) {
303
- return /* @__PURE__ */ c("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 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: [
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 pt({ size: e = 20, ...t }) {
309
- return /* @__PURE__ */ c("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 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: [
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 ft({ size: e = 20, ...t }) {
317
- return /* @__PURE__ */ c("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 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: [
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,284 +325,284 @@ function ft({ 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 vt({ size: e = 20, ...t }) {
329
- return /* @__PURE__ */ c("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 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: [
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 bt({ size: e = 20, ...t }) {
335
- return /* @__PURE__ */ c("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 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: [
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 yt({ size: e = 20, ...t }) {
340
+ function Mn({ 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 kt({ size: e = 20, ...t }) {
343
+ function En({ 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 mt({ size: e = 20, ...t }) {
346
+ function Wn({ 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 xt({ size: e = 20, ...t }) {
350
- return /* @__PURE__ */ c("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 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: [
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 Re = "_dialog_l23jf_2", Te = "_w400_l23jf_31", De = "_w560_l23jf_32", Fe = "_w720_l23jf_33", Pe = "_panel_l23jf_35", Ue = "_header_l23jf_41", Ze = "_title_l23jf_48", Ge = "_footer_l23jf_54", y = {
357
- dialog: Re,
358
- w400: Te,
359
- w560: De,
360
- w720: Fe,
361
- panel: Pe,
362
- header: Ue,
363
- title: Ze,
364
- footer: Ge
365
- }, Ke = {
366
- 400: y.w400,
367
- 560: y.w560,
368
- 720: y.w720
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
369
369
  };
370
- function wt({
370
+ function Dn({
371
371
  open: e,
372
372
  onClose: t,
373
373
  title: i,
374
374
  footer: a,
375
- width: s = 560,
375
+ width: c = 560,
376
376
  dismissible: o = !0,
377
377
  className: r,
378
378
  children: l,
379
- ref: u,
380
- ...h
379
+ ref: d,
380
+ ...s
381
381
  }) {
382
- const f = q(null), g = W(), d = (_) => {
383
- f.current = _, typeof u == "function" ? u(_) : u && (u.current = _);
382
+ const u = z(null), p = H(), _ = (g) => {
383
+ u.current = g, typeof d == "function" ? d(g) : d && (d.current = g);
384
384
  };
385
- I(() => {
386
- const _ = f.current;
387
- _ && (e && !_.open ? _.showModal() : !e && _.open && _.close());
388
- }, [e]), I(() => {
385
+ x(() => {
386
+ const g = u.current;
387
+ g && (e && !g.open ? g.showModal() : !e && g.open && g.close());
388
+ }, [e]), x(() => {
389
389
  if (!e) return;
390
- const _ = document.body.style.overflow;
390
+ const g = document.body.style.overflow;
391
391
  return document.body.style.overflow = "hidden", () => {
392
- document.body.style.overflow = _;
392
+ document.body.style.overflow = g;
393
393
  };
394
394
  }, [e]);
395
- const L = (_) => {
396
- _.preventDefault(), o && t("esc");
397
- }, k = (_) => {
398
- o && _.target === f.current && t("backdrop");
399
- }, N = [y.dialog, Ke[s], r].filter(Boolean).join(" ");
395
+ const b = (g) => {
396
+ g.preventDefault(), o && t("esc");
397
+ }, m = (g) => {
398
+ o && g.target === u.current && t("backdrop");
399
+ }, L = [C.dialog, et[c], r].filter(Boolean).join(" ");
400
400
  return /* @__PURE__ */ n(
401
401
  "dialog",
402
402
  {
403
- ref: d,
404
- className: N,
405
- "aria-labelledby": i != null ? g : void 0,
406
- onCancel: L,
407
- onClick: k,
408
- ...h,
409
- children: /* @__PURE__ */ c("div", { className: y.panel, children: [
410
- (i != null || o) && /* @__PURE__ */ c("div", { className: y.header, children: [
411
- i != null && /* @__PURE__ */ n("h2", { id: g, className: y.title, children: i }),
403
+ ref: _,
404
+ className: L,
405
+ "aria-labelledby": i != null ? p : void 0,
406
+ onCancel: b,
407
+ onClick: m,
408
+ ...s,
409
+ children: /* @__PURE__ */ h("div", { className: C.panel, children: [
410
+ (i != null || o) && /* @__PURE__ */ h("div", { className: C.header, children: [
411
+ i != null && /* @__PURE__ */ n("h2", { id: p, className: C.title, children: i }),
412
412
  o && /* @__PURE__ */ n(
413
- be,
413
+ Ce,
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(qe, { "aria-hidden": "true" })
419
+ children: /* @__PURE__ */ n(Fe, { "aria-hidden": "true" })
420
420
  }
421
421
  )
422
422
  ] }),
423
423
  l,
424
- a != null && /* @__PURE__ */ n("div", { className: y.footer, children: a })
424
+ a != null && /* @__PURE__ */ n("div", { className: C.footer, children: a })
425
425
  ] })
426
426
  }
427
427
  );
428
428
  }
429
- const Xe = "_input_8tzcf_3", Ye = "_size24_8tzcf_38", Je = "_size32_8tzcf_43", Qe = "_size40_8tzcf_48", Oe = "_size48_8tzcf_53", en = "_error_8tzcf_60", z = {
430
- input: Xe,
431
- size24: Ye,
432
- size32: Je,
433
- size40: Qe,
434
- size48: Oe,
435
- error: en
436
- }, nn = {
437
- 24: z.size24,
438
- 32: z.size32,
439
- 40: z.size40,
440
- 48: z.size48
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
441
441
  };
442
- function zt({ size: e = 32, error: t = !1, className: i, ref: a, ...s }) {
443
- const o = R(H), r = t || ((o == null ? void 0 : o.invalid) ?? !1), l = [o == null ? void 0 : o.describedBy, s["aria-describedby"]].filter(Boolean).join(" ") || void 0, u = [z.input, nn[e], r && z.error, i].filter(Boolean).join(" ");
442
+ function Hn({ size: e = 32, error: t = !1, className: i, ref: a, ...c }) {
443
+ const o = P(T), r = t || ((o == null ? void 0 : o.invalid) ?? !1), l = [o == null ? void 0 : o.describedBy, c["aria-describedby"]].filter(Boolean).join(" ") || void 0, d = [S.input, at[e], r && S.error, i].filter(Boolean).join(" ");
444
444
  return /* @__PURE__ */ n(
445
445
  "input",
446
446
  {
447
447
  ref: a,
448
- className: u,
449
- id: s.id ?? (o == null ? void 0 : o.id),
450
- required: s.required ?? ((o == null ? void 0 : o.required) || void 0),
448
+ className: d,
449
+ id: c.id ?? (o == null ? void 0 : o.id),
450
+ required: c.required ?? ((o == null ? void 0 : o.required) || void 0),
451
451
  "aria-invalid": (o == null ? void 0 : o.invalid) || void 0,
452
- ...s,
452
+ ...c,
453
453
  "aria-describedby": l
454
454
  }
455
455
  );
456
456
  }
457
- const tn = "_select_140kg_3", on = "_size24_140kg_40", rn = "_size32_140kg_45", sn = "_size40_140kg_50", an = "_size48_140kg_55", cn = "_error_140kg_62", C = {
458
- select: tn,
459
- size24: on,
460
- size32: rn,
461
- size40: sn,
462
- size48: an,
463
- error: cn
464
- }, ln = {
465
- 24: C.size24,
466
- 32: C.size32,
467
- 40: C.size40,
468
- 48: C.size48
457
+ 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 = {
458
+ select: ct,
459
+ size24: lt,
460
+ size32: ut,
461
+ size40: dt,
462
+ size48: _t,
463
+ error: ht
464
+ }, pt = {
465
+ 24: N.size24,
466
+ 32: N.size32,
467
+ 40: N.size40,
468
+ 48: N.size48
469
469
  };
470
- function Ct({
470
+ function Vn({
471
471
  size: e = 32,
472
472
  error: t = !1,
473
473
  className: i,
474
474
  ref: a,
475
- children: s,
475
+ children: c,
476
476
  ...o
477
477
  }) {
478
- const r = R(H), l = t || ((r == null ? void 0 : r.invalid) ?? !1), u = [r == null ? void 0 : r.describedBy, o["aria-describedby"]].filter(Boolean).join(" ") || void 0, h = [
479
- C.select,
480
- ln[e],
481
- l && C.error,
478
+ const r = P(T), l = t || ((r == null ? void 0 : r.invalid) ?? !1), d = [r == null ? void 0 : r.describedBy, o["aria-describedby"]].filter(Boolean).join(" ") || void 0, s = [
479
+ N.select,
480
+ pt[e],
481
+ l && N.error,
482
482
  i
483
483
  ].filter(Boolean).join(" ");
484
484
  return /* @__PURE__ */ n(
485
485
  "select",
486
486
  {
487
487
  ref: a,
488
- className: h,
488
+ className: s,
489
489
  id: o.id ?? (r == null ? void 0 : r.id),
490
490
  required: o.required ?? ((r == null ? void 0 : r.required) || void 0),
491
491
  "aria-invalid": (r == null ? void 0 : r.invalid) || void 0,
492
492
  ...o,
493
- "aria-describedby": u,
494
- children: s
493
+ "aria-describedby": d,
494
+ children: c
495
495
  }
496
496
  );
497
497
  }
498
- const dn = "_label_thyza_3", un = "_disabled_thyza_13", _n = "_input_thyza_20", hn = "_indicator_thyza_34", gn = "_text_thyza_75", $ = {
499
- label: dn,
500
- disabled: un,
501
- input: _n,
502
- indicator: hn,
503
- text: gn
498
+ const gt = "_label_1v4vv_3", ft = "_disabled_1v4vv_13", vt = "_input_1v4vv_20", yt = "_indicator_1v4vv_34", bt = "_text_1v4vv_75", E = {
499
+ label: gt,
500
+ disabled: ft,
501
+ input: vt,
502
+ indicator: yt,
503
+ text: bt
504
504
  };
505
- function jt({
505
+ function Pn({
506
506
  children: e,
507
507
  className: t,
508
508
  disabled: i,
509
509
  ref: a,
510
- ...s
510
+ ...c
511
511
  }) {
512
- const o = [$.label, i && $.disabled, t].filter(Boolean).join(" ");
513
- return /* @__PURE__ */ c("label", { className: o, children: [
512
+ const o = [E.label, i && E.disabled, t].filter(Boolean).join(" ");
513
+ return /* @__PURE__ */ h("label", { className: o, children: [
514
514
  /* @__PURE__ */ n(
515
515
  "input",
516
516
  {
517
517
  ref: a,
518
518
  type: "checkbox",
519
- className: $.input,
519
+ className: E.input,
520
520
  disabled: i,
521
- ...s
521
+ ...c
522
522
  }
523
523
  ),
524
- /* @__PURE__ */ n("span", { className: $.indicator, "aria-hidden": "true" }),
525
- e && /* @__PURE__ */ n("span", { className: $.text, children: e })
524
+ /* @__PURE__ */ n("span", { className: E.indicator, "aria-hidden": "true" }),
525
+ e && /* @__PURE__ */ n("span", { className: E.text, children: e })
526
526
  ] });
527
527
  }
528
- const pn = "_label_jru2c_3", fn = "_disabled_jru2c_13", vn = "_input_jru2c_20", bn = "_track_jru2c_34", yn = "_thumb_jru2c_58", kn = "_text_jru2c_75", w = {
529
- label: pn,
530
- disabled: fn,
531
- input: vn,
532
- track: bn,
533
- thumb: yn,
534
- text: kn
528
+ 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 = {
529
+ label: mt,
530
+ disabled: wt,
531
+ input: kt,
532
+ track: xt,
533
+ thumb: Ct,
534
+ text: zt
535
535
  };
536
- function Lt({
536
+ function Tn({
537
537
  children: e,
538
538
  className: t,
539
539
  disabled: i,
540
540
  ref: a,
541
- ...s
541
+ ...c
542
542
  }) {
543
- const o = [w.label, i && w.disabled, t].filter(Boolean).join(" ");
544
- return /* @__PURE__ */ c("label", { className: o, children: [
543
+ const o = [B.label, i && B.disabled, t].filter(Boolean).join(" ");
544
+ return /* @__PURE__ */ h("label", { className: o, children: [
545
545
  /* @__PURE__ */ n(
546
546
  "input",
547
547
  {
548
548
  ref: a,
549
549
  type: "checkbox",
550
550
  role: "switch",
551
- className: w.input,
551
+ className: B.input,
552
552
  disabled: i,
553
- ...s
553
+ ...c
554
554
  }
555
555
  ),
556
- /* @__PURE__ */ n("span", { className: w.track, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: w.thumb }) }),
557
- e && /* @__PURE__ */ n("span", { className: w.text, children: e })
556
+ /* @__PURE__ */ n("span", { className: B.track, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: B.thumb }) }),
557
+ e && /* @__PURE__ */ n("span", { className: B.text, children: e })
558
558
  ] });
559
559
  }
560
- const mn = "_tag_3oysa_3", xn = "_dismiss_3oysa_17", wn = "_neutral_3oysa_43", zn = "_accent_3oysa_48", Cn = "_success_3oysa_53", jn = "_warning_3oysa_58", Ln = "_danger_3oysa_63", Bn = "_neutralSubtle_3oysa_70", $n = "_accentSubtle_3oysa_75", Nn = "_successSubtle_3oysa_80", Sn = "_warningSubtle_3oysa_85", In = "_dangerSubtle_3oysa_90", v = {
561
- tag: mn,
562
- dismiss: xn,
563
- neutral: wn,
564
- accent: zn,
565
- success: Cn,
566
- warning: jn,
567
- danger: Ln,
568
- neutralSubtle: Bn,
569
- accentSubtle: $n,
570
- successSubtle: Nn,
571
- warningSubtle: Sn,
572
- dangerSubtle: In
573
- }, Mn = {
574
- neutral: v.neutral,
575
- accent: v.accent,
576
- success: v.success,
577
- warning: v.warning,
578
- danger: v.danger
579
- }, Wn = {
580
- neutral: v.neutralSubtle,
581
- accent: v.accentSubtle,
582
- success: v.successSubtle,
583
- warning: v.warningSubtle,
584
- danger: v.dangerSubtle
560
+ 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 = {
561
+ tag: Lt,
562
+ dismiss: $t,
563
+ neutral: jt,
564
+ accent: Bt,
565
+ success: St,
566
+ warning: Nt,
567
+ danger: It,
568
+ neutralSubtle: Mt,
569
+ accentSubtle: Et,
570
+ successSubtle: Wt,
571
+ warningSubtle: At,
572
+ dangerSubtle: Dt
573
+ }, Ht = {
574
+ neutral: y.neutral,
575
+ accent: y.accent,
576
+ success: y.success,
577
+ warning: y.warning,
578
+ danger: y.danger
579
+ }, Vt = {
580
+ neutral: y.neutralSubtle,
581
+ accent: y.accentSubtle,
582
+ success: y.successSubtle,
583
+ warning: y.warningSubtle,
584
+ danger: y.dangerSubtle
585
585
  };
586
- function Bt({
586
+ function Rn({
587
587
  variant: e = "neutral",
588
588
  subtle: t = !1,
589
589
  onDismiss: i,
590
590
  className: a,
591
- children: s,
591
+ children: c,
592
592
  ref: o,
593
593
  ...r
594
594
  }) {
595
- const l = t ? Wn : Mn, u = [v.tag, l[e], a].filter(Boolean).join(" ");
596
- return /* @__PURE__ */ c("span", { ref: o, className: u, ...r, children: [
597
- s,
595
+ const l = t ? Vt : Ht, d = [y.tag, l[e], a].filter(Boolean).join(" ");
596
+ return /* @__PURE__ */ h("span", { ref: o, className: d, ...r, children: [
597
+ c,
598
598
  i && /* @__PURE__ */ n(
599
599
  "button",
600
600
  {
601
601
  type: "button",
602
- className: v.dismiss,
602
+ className: y.dismiss,
603
603
  onClick: i,
604
604
  "aria-label": "Dismiss",
605
- children: /* @__PURE__ */ c(
605
+ children: /* @__PURE__ */ h(
606
606
  "svg",
607
607
  {
608
608
  width: "12",
@@ -624,116 +624,299 @@ function Bt({
624
624
  )
625
625
  ] });
626
626
  }
627
- const Hn = "_wrapper_17qua_3", An = "_tooltip_17qua_10", En = "_top_17qua_24", Vn = "_bottom_17qua_31", qn = "_left_17qua_38", Rn = "_right_17qua_45", j = {
628
- wrapper: Hn,
629
- tooltip: An,
630
- top: En,
631
- bottom: Vn,
632
- left: qn,
633
- right: Rn
634
- }, Tn = {
635
- top: j.top,
636
- bottom: j.bottom,
637
- left: j.left,
638
- right: j.right
639
- }, Dn = 150;
640
- function $t({
627
+ 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 = {
628
+ wrapper: Pt,
629
+ tooltip: Tt,
630
+ top: Rt,
631
+ bottom: qt,
632
+ left: Kt,
633
+ right: Ft
634
+ }, Ut = {
635
+ top: I.top,
636
+ bottom: I.bottom,
637
+ left: I.left,
638
+ right: I.right
639
+ }, Yt = 150;
640
+ function qn({
641
641
  content: e,
642
642
  children: t,
643
643
  placement: i = "top"
644
644
  }) {
645
- const [a, s] = D(!1), o = W(), r = q(void 0), l = M(() => {
645
+ const [a, c] = Z(!1), o = H(), r = z(void 0), l = k(() => {
646
646
  r.current !== void 0 && (window.clearTimeout(r.current), r.current = void 0);
647
- }, []), u = M(() => s(!0), []), h = M(() => s(!1), []);
648
- I(() => l, [l]), I(() => {
647
+ }, []), d = k(() => c(!0), []), s = k(() => c(!1), []);
648
+ x(() => l, [l]), x(() => {
649
649
  if (!a) return;
650
- const g = (d) => {
651
- d.key === "Escape" && h();
650
+ const p = (_) => {
651
+ _.key === "Escape" && s();
652
652
  };
653
- return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
654
- }, [a, h]);
655
- const f = F(t, {
653
+ return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
654
+ }, [a, s]);
655
+ const u = U(t, {
656
656
  "aria-describedby": a ? o : void 0,
657
- onMouseEnter: (g) => {
658
- l(), r.current = window.setTimeout(u, Dn);
659
- const d = t.props.onMouseEnter;
660
- d == null || d(g);
657
+ onMouseEnter: (p) => {
658
+ l(), r.current = window.setTimeout(d, Yt);
659
+ const _ = t.props.onMouseEnter;
660
+ _ == null || _(p);
661
661
  },
662
- onMouseLeave: (g) => {
663
- l(), h();
664
- const d = t.props.onMouseLeave;
665
- d == null || d(g);
662
+ onMouseLeave: (p) => {
663
+ l(), s();
664
+ const _ = t.props.onMouseLeave;
665
+ _ == null || _(p);
666
666
  },
667
- onFocus: (g) => {
668
- u();
669
- const d = t.props.onFocus;
670
- d == null || d(g);
667
+ onFocus: (p) => {
668
+ d();
669
+ const _ = t.props.onFocus;
670
+ _ == null || _(p);
671
671
  },
672
- onBlur: (g) => {
673
- l(), h();
674
- const d = t.props.onBlur;
675
- d == null || d(g);
672
+ onBlur: (p) => {
673
+ l(), s();
674
+ const _ = t.props.onBlur;
675
+ _ == null || _(p);
676
676
  }
677
677
  });
678
- return /* @__PURE__ */ c("span", { className: j.wrapper, children: [
679
- f,
678
+ return /* @__PURE__ */ h("span", { className: I.wrapper, children: [
679
+ u,
680
680
  a && /* @__PURE__ */ n(
681
681
  "span",
682
682
  {
683
683
  id: o,
684
684
  role: "tooltip",
685
- className: [j.tooltip, Tn[i]].filter(Boolean).join(" "),
685
+ className: [I.tooltip, Ut[i]].filter(Boolean).join(" "),
686
686
  children: e
687
687
  }
688
688
  )
689
689
  ] });
690
690
  }
691
- const Fn = "_toolbar_1i848_1", Pn = "_gap8_1i848_7", Un = "_gap12_1i848_8", Zn = "_gap16_1i848_9", S = {
692
- toolbar: Fn,
693
- gap8: Pn,
694
- gap12: Un,
695
- gap16: Zn
696
- }, Gn = { 8: S.gap8, 12: S.gap12, 16: S.gap16 };
697
- function Nt({ gap: e = 8, className: t, children: i, ref: a, ...s }) {
698
- const o = [S.toolbar, Gn[e], t].filter(Boolean).join(" ");
699
- return /* @__PURE__ */ n("div", { ref: a, role: s["aria-label"] != null ? "group" : void 0, className: o, ...s, children: i });
691
+ const Zt = "_toolbar_1i848_1", Gt = "_gap8_1i848_7", Ot = "_gap12_1i848_8", Xt = "_gap16_1i848_9", A = {
692
+ toolbar: Zt,
693
+ gap8: Gt,
694
+ gap12: Ot,
695
+ gap16: Xt
696
+ }, Jt = { 8: A.gap8, 12: A.gap12, 16: A.gap16 };
697
+ function Kn({ gap: e = 8, className: t, children: i, ref: a, ...c }) {
698
+ const o = [A.toolbar, Jt[e], t].filter(Boolean).join(" ");
699
+ return /* @__PURE__ */ n("div", { ref: a, role: c["aria-label"] != null ? "group" : void 0, className: o, ...c, children: i });
700
+ }
701
+ const Qt = "_trigger_1a54a_4", en = "_menu_1a54a_10", tn = "_item_1a54a_31", nn = "_separator_1a54a_68", D = {
702
+ trigger: Qt,
703
+ menu: en,
704
+ item: tn,
705
+ separator: nn
706
+ }, on = 500;
707
+ function rn({ popoverRef: e, triggerRef: t, open: i, onEsc: a }) {
708
+ const c = z(""), o = z(0), r = k(() => {
709
+ const s = e.current;
710
+ return s ? Array.from(
711
+ s.querySelectorAll('[data-psi-menu-item]:not([aria-disabled="true"])')
712
+ ) : [];
713
+ }, [e]), l = k(
714
+ (s) => {
715
+ if (s) {
716
+ for (const u of r()) u.tabIndex = u === s ? 0 : -1;
717
+ s.focus();
718
+ }
719
+ },
720
+ [r]
721
+ ), d = k(() => {
722
+ var u;
723
+ const s = (u = t.current) == null ? void 0 : u.querySelector("button, a, [tabindex]");
724
+ s == null || s.focus();
725
+ }, [t]);
726
+ return x(() => {
727
+ if (!i) return;
728
+ const s = r();
729
+ return l(s[0]), () => {
730
+ var u;
731
+ (u = e.current) != null && u.contains(document.activeElement) && d();
732
+ };
733
+ }, [i, e, r, l, d]), k(
734
+ (s) => {
735
+ if (s.key === "Escape") {
736
+ s.preventDefault(), a();
737
+ return;
738
+ }
739
+ const u = r();
740
+ if (u.length === 0) return;
741
+ const p = u.indexOf(document.activeElement);
742
+ switch (s.key) {
743
+ case "ArrowDown":
744
+ s.preventDefault(), l(u[(p + 1 + u.length) % u.length]);
745
+ return;
746
+ case "ArrowUp":
747
+ s.preventDefault(), l(u[p <= 0 ? u.length - 1 : p - 1]);
748
+ return;
749
+ case "Home":
750
+ s.preventDefault(), l(u[0]);
751
+ return;
752
+ case "End":
753
+ s.preventDefault(), l(u[u.length - 1]);
754
+ return;
755
+ }
756
+ if (s.key.length !== 1 || s.metaKey || s.ctrlKey || s.altKey) return;
757
+ const _ = Date.now();
758
+ c.current = _ - o.current > on ? s.key.toLowerCase() : c.current + s.key.toLowerCase(), o.current = _;
759
+ const b = u.find(
760
+ (m) => (m.textContent ?? "").trim().toLowerCase().startsWith(c.current)
761
+ );
762
+ b && (s.preventDefault(), l(b));
763
+ },
764
+ [r, l, a]
765
+ );
766
+ }
767
+ function sn() {
768
+ return typeof CSS < "u" && CSS.supports("anchor-name", "--x");
769
+ }
770
+ function an({ popoverRef: e, triggerRef: t, open: i, placement: a, anchorName: c }) {
771
+ x(() => {
772
+ const o = t.current, r = e.current;
773
+ !o || !r || (o.style.setProperty("anchor-name", c), r.style.setProperty("position-anchor", c));
774
+ }, [e, t, c]), x(() => {
775
+ if (!i || sn()) return;
776
+ const o = t.current, r = e.current;
777
+ if (!o || !r) return;
778
+ const l = () => {
779
+ const d = o.getBoundingClientRect(), s = a.startsWith("bottom"), u = a.endsWith("end"), p = getComputedStyle(o).direction === "rtl", _ = u !== p;
780
+ r.style.position = "fixed", r.style.top = s ? `${d.bottom}px` : "", r.style.bottom = s ? "" : `${window.innerHeight - d.top}px`, r.style.left = _ ? "" : `${d.left}px`, r.style.right = _ ? `${window.innerWidth - d.right}px` : "";
781
+ };
782
+ return l(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
783
+ window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
784
+ };
785
+ }, [i, a, e, t]);
786
+ }
787
+ const Y = F({ close: () => {
788
+ } });
789
+ function K(e) {
790
+ return e.hasAttribute("data-open") || e.matches(":popover-open");
791
+ }
792
+ function Fn({
793
+ open: e,
794
+ onClose: t,
795
+ trigger: i,
796
+ placement: a = "bottom-start",
797
+ children: c,
798
+ className: o,
799
+ ref: r,
800
+ ...l
801
+ }) {
802
+ const d = z(null), s = z(null), u = z(!1), p = `--psi-menu-${H().replace(/:/g, "")}`;
803
+ an({ popoverRef: d, triggerRef: s, open: e, placement: a, anchorName: p });
804
+ const _ = (v) => {
805
+ d.current = v, typeof r == "function" ? r(v) : r && (r.current = v);
806
+ };
807
+ x(() => {
808
+ const v = d.current;
809
+ if (!v) return;
810
+ const R = K(v);
811
+ e && !R ? v.showPopover() : !e && R && (u.current = !0, v.hidePopover());
812
+ }, [e]);
813
+ const b = k(() => {
814
+ const v = d.current;
815
+ if (v) {
816
+ if (u.current) {
817
+ u.current = !1;
818
+ return;
819
+ }
820
+ K(v) || t("outside");
821
+ }
822
+ }, [t]), m = rn({
823
+ popoverRef: d,
824
+ triggerRef: s,
825
+ open: e,
826
+ onEsc: () => t("esc")
827
+ }), L = k(
828
+ (v) => {
829
+ t(v);
830
+ },
831
+ [t]
832
+ ), g = G(i);
833
+ x(() => {
834
+ g || console.warn(
835
+ "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."
836
+ );
837
+ }, [g]);
838
+ const W = g ? U(i, { "aria-haspopup": "menu", "aria-expanded": e }) : i;
839
+ return /* @__PURE__ */ h(V, { children: [
840
+ /* @__PURE__ */ n("div", { ref: s, className: D.trigger, "data-psi-menu-trigger": !0, children: W }),
841
+ /* @__PURE__ */ n(
842
+ "div",
843
+ {
844
+ ...l,
845
+ ref: _,
846
+ popover: "auto",
847
+ role: "menu",
848
+ "data-psi-menu": !0,
849
+ "data-placement": a,
850
+ className: [D.menu, o].filter(Boolean).join(" "),
851
+ onToggle: b,
852
+ onKeyDown: m,
853
+ children: /* @__PURE__ */ n(Y.Provider, { value: { close: L }, children: c })
854
+ }
855
+ )
856
+ ] });
857
+ }
858
+ function Un({ children: e, onSelect: t, variant: i = "neutral", disabled: a = !1 }) {
859
+ const { close: c } = P(Y);
860
+ return /* @__PURE__ */ n(
861
+ "button",
862
+ {
863
+ type: "button",
864
+ role: "menuitem",
865
+ "data-psi-menu-item": !0,
866
+ "data-variant": i,
867
+ "aria-disabled": a || void 0,
868
+ tabIndex: -1,
869
+ className: D.item,
870
+ onClick: () => {
871
+ a || (t(), c("item-select"));
872
+ },
873
+ children: e
874
+ }
875
+ );
876
+ }
877
+ function Yn() {
878
+ return /* @__PURE__ */ n("div", { role: "separator", "data-psi-menu-separator": !0, className: D.separator });
700
879
  }
701
880
  export {
702
- et as AspectRatio,
703
- Yn as Button,
704
- Jn as Card,
705
- jt as Checkbox,
706
- wt as Dialog,
707
- nt as Field,
708
- vt as IconArrowDown,
709
- bt as IconArrowUpRight,
710
- be as IconButton,
711
- it as IconCheck,
712
- rt as IconChevronDown,
713
- st as IconChevronRight,
714
- qe as IconClose,
715
- _t as IconCopy,
716
- dt as IconEdit,
717
- ht as IconExternalLink,
718
- gt as IconEye,
719
- pt as IconEyeOff,
720
- kt as IconGitHub,
721
- xt as IconInstagram,
722
- yt as IconLinkedIn,
723
- ft as IconLoader,
724
- ot as IconMinus,
725
- tt as IconPlus,
726
- at as IconSearch,
727
- ct as IconSettings,
728
- ut as IconTrash,
729
- lt as IconUser,
730
- mt as IconX,
731
- zt as Input,
732
- On as NavBar,
733
- Qn as Panel,
734
- Ct as Select,
735
- Lt as Switch,
736
- Bt as Tag,
737
- Nt as Toolbar,
738
- $t as Tooltip
881
+ pn as AspectRatio,
882
+ un as Button,
883
+ dn as Card,
884
+ Pn as Checkbox,
885
+ Dn as Dialog,
886
+ gn as Field,
887
+ Nn as IconArrowDown,
888
+ In as IconArrowUpRight,
889
+ Ce as IconButton,
890
+ yn as IconCheck,
891
+ bn as IconChevronDown,
892
+ mn as IconChevronRight,
893
+ Fe as IconClose,
894
+ Ln as IconCopy,
895
+ Cn as IconEdit,
896
+ $n as IconExternalLink,
897
+ jn as IconEye,
898
+ Bn as IconEyeOff,
899
+ En as IconGitHub,
900
+ An as IconInstagram,
901
+ Mn as IconLinkedIn,
902
+ Sn as IconLoader,
903
+ vn as IconMinus,
904
+ fn as IconPlus,
905
+ wn as IconSearch,
906
+ kn as IconSettings,
907
+ zn as IconTrash,
908
+ xn as IconUser,
909
+ Wn as IconX,
910
+ Hn as Input,
911
+ Fn as Menu,
912
+ Y as MenuContext,
913
+ Un as MenuItem,
914
+ Yn as MenuSeparator,
915
+ hn as NavBar,
916
+ _n as Panel,
917
+ Vn as Select,
918
+ Tn as Switch,
919
+ Rn as Tag,
920
+ Kn as Toolbar,
921
+ qn as Tooltip
739
922
  };