@photon-ai/pho-ui 1.0.1 → 1.2.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.
Files changed (62) hide show
  1. package/dist/chunks/IconCheck-D2WuculQ.js +11 -0
  2. package/dist/chunks/IconCheck-D2WuculQ.js.map +1 -0
  3. package/dist/chunks/card-9cGnv-VD.js +56 -0
  4. package/dist/chunks/card-9cGnv-VD.js.map +1 -0
  5. package/dist/chunks/{close-button-8f-oRJXt.js → close-button-Bq9f-H15.js} +256 -181
  6. package/dist/chunks/close-button-Bq9f-H15.js.map +1 -0
  7. package/dist/chunks/{dialog-Bgb2Z1_v.js → dialog-DolPKFGS.js} +2 -2
  8. package/dist/chunks/{dialog-Bgb2Z1_v.js.map → dialog-DolPKFGS.js.map} +1 -1
  9. package/dist/chunks/{input-BSJGBUbf.js → input-CxS7ndpb.js} +7 -7
  10. package/dist/chunks/input-CxS7ndpb.js.map +1 -0
  11. package/dist/chunks/input-group-D6dlma8k.js +85 -0
  12. package/dist/chunks/input-group-D6dlma8k.js.map +1 -0
  13. package/dist/chunks/{menu-Dan0oRvL.js → menu-BSXds3Rt.js} +2 -2
  14. package/dist/chunks/{menu-Dan0oRvL.js.map → menu-BSXds3Rt.js.map} +1 -1
  15. package/dist/chunks/settings-B0vhLoMi.js +134 -0
  16. package/dist/chunks/settings-B0vhLoMi.js.map +1 -0
  17. package/dist/chunks/sidebar-BCqq58hV.js +177 -0
  18. package/dist/chunks/sidebar-BCqq58hV.js.map +1 -0
  19. package/dist/chunks/use-press-pulse-CMwPTOR2.js +44 -0
  20. package/dist/chunks/use-press-pulse-CMwPTOR2.js.map +1 -0
  21. package/dist/components/button.js +1 -1
  22. package/dist/components/card.js +6 -0
  23. package/dist/components/checkbox.js +33 -28
  24. package/dist/components/checkbox.js.map +1 -1
  25. package/dist/components/context-menu.js +2 -2
  26. package/dist/components/dialog.js +1 -1
  27. package/dist/components/field.js +17 -17
  28. package/dist/components/field.js.map +1 -1
  29. package/dist/components/input-group.js +5 -0
  30. package/dist/components/input.js +1 -1
  31. package/dist/components/menu.js +1 -1
  32. package/dist/components/select.js +83 -39
  33. package/dist/components/select.js.map +1 -1
  34. package/dist/components/skeleton.js +18 -0
  35. package/dist/components/skeleton.js.map +1 -0
  36. package/dist/index.js +44 -27
  37. package/dist/primitives.js +1 -1
  38. package/dist/sections/settings.js +8 -0
  39. package/dist/sections/sidebar.js +8 -5
  40. package/dist/src/components/card/card.d.ts +75 -0
  41. package/dist/src/components/card/index.d.ts +1 -0
  42. package/dist/src/components/checkbox/checkbox.d.ts +5 -1
  43. package/dist/src/components/input-group/index.d.ts +1 -0
  44. package/dist/src/components/input-group/input-group.d.ts +57 -0
  45. package/dist/src/components/select/index.d.ts +1 -1
  46. package/dist/src/components/select/select.d.ts +29 -10
  47. package/dist/src/components/skeleton/index.d.ts +1 -0
  48. package/dist/src/components/skeleton/skeleton.d.ts +11 -0
  49. package/dist/src/index.d.ts +3 -0
  50. package/dist/src/sections/settings/index.d.ts +1 -0
  51. package/dist/src/sections/settings/settings.d.ts +170 -0
  52. package/dist/src/sections/sidebar/index.d.ts +1 -1
  53. package/dist/src/sections/sidebar/sidebar.d.ts +25 -6
  54. package/dist/src/utils/index.d.ts +1 -0
  55. package/dist/src/utils/use-press-pulse.d.ts +37 -0
  56. package/dist/utils.js +12 -8
  57. package/package.json +17 -1
  58. package/src/styles/theme.css +18 -4
  59. package/dist/chunks/close-button-8f-oRJXt.js.map +0 -1
  60. package/dist/chunks/input-BSJGBUbf.js.map +0 -1
  61. package/dist/chunks/sidebar-Buhva5xa.js +0 -164
  62. package/dist/chunks/sidebar-Buhva5xa.js.map +0 -1
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { t as p } from "./cn-DTiB6ek_.js";
3
- import { n as G, r as C } from "./link-provider-9TFNyDqO.js";
4
- import { t as N } from "./resolve-variant-CcD8iG5l.js";
5
- import { n as T } from "./spinner-Cy8bkyJf.js";
6
- import { t as Z } from "./IconX-pZ9vrtSr.js";
7
- import { isValidElement as B, useMemo as K } from "react";
8
- import { Fragment as Q, jsx as t, jsxs as W } from "react/jsx-runtime";
9
- import { motion as w } from "motion/react";
10
- var X = p("group relative inline-flex h-max cursor-pointer items-center justify-center whitespace-nowrap outline-pho-brand transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"), L = {
3
+ import { n as Z, r as I } from "./link-provider-9TFNyDqO.js";
4
+ import { t as k } from "./resolve-variant-CcD8iG5l.js";
5
+ import { n as C } from "./spinner-Cy8bkyJf.js";
6
+ import { t as Q } from "./IconX-pZ9vrtSr.js";
7
+ import { isValidElement as A, useEffect as X, useMemo as J, useRef as Y, useState as $ } from "react";
8
+ import { Fragment as z, jsx as t, jsxs as ee } from "react/jsx-runtime";
9
+ import { motion as S, useReducedMotion as oe } from "motion/react";
10
+ var ae = p("group relative inline-flex h-max cursor-pointer items-center justify-center whitespace-nowrap outline-pho-brand transition-[color,background-color,border-color,opacity,box-shadow,outline-color] duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"), L = {
11
11
  sm: {
12
12
  classes: p("gap-1 px-3.5 py-1.5 text-base font-medium data-svg-only:p-2", "has-[[data-icon=prefix]]:pl-2 has-[[data-icon=loading]]:pl-2 has-[[data-icon=suffix]]:pr-2"),
13
13
  description: "Small — compact rows, tables, and toolbars"
@@ -20,7 +20,7 @@ var X = p("group relative inline-flex h-max cursor-pointer items-center justify-
20
20
  classes: p("gap-1.5 px-5 py-2.5 text-md font-medium data-svg-only:p-3", "has-[[data-icon=prefix]]:pl-3 has-[[data-icon=loading]]:pl-3 has-[[data-icon=suffix]]:pr-3"),
21
21
  description: "Large — prominent and marketing actions"
22
22
  }
23
- }, z = {
23
+ }, re = {
24
24
  rounded: {
25
25
  classes: "rounded-full",
26
26
  description: "Pill — the default; every button on photon.codes"
@@ -33,11 +33,11 @@ var X = p("group relative inline-flex h-max cursor-pointer items-center justify-
33
33
  classes: "rounded-full",
34
34
  description: "Circular — pair with svgOnly for round icon buttons"
35
35
  }
36
- }, J = "squircle", Y = {
36
+ }, ne = "squircle", te = {
37
37
  sm: "py-[4.5px] data-svg-only:p-[6.5px]",
38
38
  md: "py-[6.5px] data-svg-only:p-[8.5px]",
39
39
  lg: "py-[8.5px] data-svg-only:p-[10.5px]"
40
- }, ge = {
40
+ }, Te = {
41
41
  effect: {
42
42
  classes: "",
43
43
  description: "Default — marketing pill with same-hue outer rim and inset sheen"
@@ -54,7 +54,7 @@ var X = p("group relative inline-flex h-max cursor-pointer items-center justify-
54
54
  classes: "",
55
55
  description: "Borderless — quiet / inline action"
56
56
  }
57
- }, xe = {
57
+ }, Re = {
58
58
  default: {
59
59
  classes: "",
60
60
  description: "Neutral / brand contrast"
@@ -63,7 +63,7 @@ var X = p("group relative inline-flex h-max cursor-pointer items-center justify-
63
63
  classes: "",
64
64
  description: "Destructive intent (delete, discard)"
65
65
  }
66
- }, $ = {
66
+ }, se = {
67
67
  effect: {
68
68
  default: p("squircle overflow-hidden bg-pho-brand-solid text-pho-on-brand transition-none", "hover:bg-pho-brand-solid data-loading:bg-pho-brand-solid", "[--pho-rim:color-mix(in_oklab,var(--background-color-pho-brand-solid)_62%,transparent)]", "[--pho-sheen:light-dark(rgba(255,255,255,0.5),rgba(0,0,0,0.12))]", "shadow-[0_0_0_1.5px_var(--pho-rim),inset_0_0_0_1px_var(--border-color-pho-on-brand),inset_0_var(--pho-sheen-y,0px)_var(--pho-sheen-blur,5px)_var(--pho-sheen-spread,2px)_var(--pho-sheen)]"),
69
69
  destructive: p("squircle overflow-hidden bg-pho-error-solid text-white outline-pho-error transition-none", "hover:bg-pho-error-solid data-loading:bg-pho-error-solid", "[--pho-rim:color-mix(in_oklab,var(--background-color-pho-error-solid)_62%,transparent)]", "[--pho-sheen:light-dark(rgba(255,255,255,0.45),rgba(0,0,0,0.18))]", "shadow-[0_0_0_1.5px_var(--pho-rim),inset_0_0_0_1px_oklch(1_0_0/0.2),inset_0_var(--pho-sheen-y,0px)_var(--pho-sheen-blur,5px)_var(--pho-sheen-spread,2px)_var(--pho-sheen)]")
@@ -81,40 +81,40 @@ var X = p("group relative inline-flex h-max cursor-pointer items-center justify-
81
81
  destructive: "text-pho-error outline-pho-error hover:bg-pho-error-primary hover:text-pho-error-hover data-loading:bg-pho-error-primary"
82
82
  }
83
83
  };
84
- function O(e) {
85
- const { variant: r = "effect", color: o = "default", size: a = "md", shape: n = "rounded", className: i } = e ?? {}, d = r === "effect" ? "rounded" : n, s = $[r]?.[o] ?? "";
86
- return p(X, N(z, d), d === "square" && a === "lg" && J, N(L, a), r === "effect" && Y[a], s, i);
84
+ function F(e) {
85
+ const { variant: a = "effect", color: o = "default", size: r = "md", shape: n = "rounded", className: s } = e ?? {}, l = a === "effect" ? "rounded" : n, i = se[a]?.[o] ?? "";
86
+ return p(ae, k(re, l), l === "square" && r === "lg" && ne, k(L, r), a === "effect" && te[r], i, s);
87
87
  }
88
- var ee = "transition-inherit-all pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-[1.125em] [&>svg]:shrink-0";
89
- function S({ position: e, children: r }) {
88
+ var ie = "transition-inherit-all pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-[1.125em] [&>svg]:shrink-0";
89
+ function w({ position: e, children: a }) {
90
90
  return /* @__PURE__ */ t("span", {
91
91
  "data-icon": e,
92
- className: ee,
93
- children: r
92
+ className: ie,
93
+ children: a
94
94
  });
95
95
  }
96
- function R(e, r) {
97
- return e == null || e === !1 ? null : C(e) ? /* @__PURE__ */ t(S, {
98
- position: r,
96
+ function B(e, a) {
97
+ return e == null || e === !1 ? null : I(e) ? /* @__PURE__ */ t(w, {
98
+ position: a,
99
99
  children: /* @__PURE__ */ t(e, {})
100
- }) : B(e) ? /* @__PURE__ */ t(S, {
101
- position: r,
100
+ }) : A(e) ? /* @__PURE__ */ t(w, {
101
+ position: a,
102
102
  children: e
103
103
  }) : null;
104
104
  }
105
- function I(e, r) {
106
- e && !r && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("Button: `svgOnly` buttons require an `aria-label` that names the action.");
105
+ function U(e, a) {
106
+ e && !a && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("Button: `svgOnly` buttons require an `aria-label` that names the action.");
107
107
  }
108
- var A = {
108
+ var V = {
109
109
  type: "spring",
110
110
  stiffness: 200,
111
111
  damping: 30,
112
112
  mass: 0.1
113
- }, re = {
113
+ }, le = {
114
114
  "--pho-sheen-y": "0px",
115
115
  "--pho-sheen-blur": "5px",
116
116
  "--pho-sheen-spread": "2px"
117
- }, oe = {
117
+ }, pe = {
118
118
  sm: {
119
119
  "--pho-sheen-y": "-3px",
120
120
  "--pho-sheen-blur": "8px",
@@ -130,7 +130,7 @@ var A = {
130
130
  "--pho-sheen-blur": "14px",
131
131
  "--pho-sheen-spread": "1px"
132
132
  }
133
- }, ae = {
133
+ }, de = {
134
134
  sm: {
135
135
  "--pho-sheen-y": "1.5px",
136
136
  "--pho-sheen-blur": "4px",
@@ -146,7 +146,84 @@ var A = {
146
146
  "--pho-sheen-blur": "7px",
147
147
  "--pho-sheen-spread": "1px"
148
148
  }
149
- }, te = 0.97, ne = {
149
+ }, he = 0.97, ce = {
150
+ sm: {
151
+ "--pho-sheen-y": [
152
+ "1.5px",
153
+ "-4px",
154
+ "0px"
155
+ ],
156
+ "--pho-sheen-blur": [
157
+ "4px",
158
+ "9px",
159
+ "5px"
160
+ ],
161
+ "--pho-sheen-spread": [
162
+ "1px",
163
+ "2px",
164
+ "2px"
165
+ ]
166
+ },
167
+ md: {
168
+ "--pho-sheen-y": [
169
+ "1.5px",
170
+ "-4px",
171
+ "0px"
172
+ ],
173
+ "--pho-sheen-blur": [
174
+ "4px",
175
+ "9px",
176
+ "5px"
177
+ ],
178
+ "--pho-sheen-spread": [
179
+ "1px",
180
+ "2px",
181
+ "2px"
182
+ ]
183
+ },
184
+ lg: {
185
+ "--pho-sheen-y": [
186
+ "3px",
187
+ "-8px",
188
+ "0px"
189
+ ],
190
+ "--pho-sheen-blur": [
191
+ "7px",
192
+ "16px",
193
+ "5px"
194
+ ],
195
+ "--pho-sheen-spread": [
196
+ "1px",
197
+ "1px",
198
+ "2px"
199
+ ]
200
+ }
201
+ }, ue = {
202
+ duration: 0.6,
203
+ delay: 0.05,
204
+ times: [
205
+ 0,
206
+ 0.4,
207
+ 1
208
+ ],
209
+ ease: ["easeOut", "easeInOut"]
210
+ };
211
+ function M(e, a) {
212
+ const [o, r] = $(!1), n = Y(e), s = oe();
213
+ return X(() => {
214
+ n.current && !e && a && !s ? r(!0) : e && r(!1), n.current = e;
215
+ }, [
216
+ e,
217
+ a,
218
+ s
219
+ ]), {
220
+ waking: o,
221
+ onWakeComplete: (l) => {
222
+ l === "wake" && r(!1);
223
+ }
224
+ };
225
+ }
226
+ var fe = {
150
227
  sm: {
151
228
  rest: {
152
229
  opacity: 0,
@@ -183,16 +260,16 @@ var A = {
183
260
  height: 21
184
261
  }
185
262
  }
186
- }, F = {
263
+ }, P = {
187
264
  sm: "has-[[data-icon=prefix]]:pl-3.5 has-[[data-icon=loading]]:pl-3.5 has-[[data-icon=suffix]]:pr-3.5",
188
265
  md: "has-[[data-icon=prefix]]:pl-4 has-[[data-icon=loading]]:pl-4 has-[[data-icon=suffix]]:pr-4",
189
266
  lg: "has-[[data-icon=prefix]]:pl-5 has-[[data-icon=loading]]:pl-5 has-[[data-icon=suffix]]:pr-5"
190
267
  };
191
- function E({ position: e, size: r, children: o }) {
192
- return /* @__PURE__ */ t(w.span, {
268
+ function N({ position: e, size: a, children: o }) {
269
+ return /* @__PURE__ */ t(S.span, {
193
270
  "data-icon": e,
194
- variants: ne[r],
195
- transition: A,
271
+ variants: fe[a],
272
+ transition: V,
196
273
  style: {
197
274
  display: "inline-flex",
198
275
  flex: "none",
@@ -203,218 +280,216 @@ function E({ position: e, size: r, children: o }) {
203
280
  children: o
204
281
  });
205
282
  }
206
- function k(e, r, o) {
283
+ function O(e, a, o) {
207
284
  if (!(e == null || e === !1))
208
- return C(e) ? /* @__PURE__ */ t(E, {
209
- position: r,
285
+ return I(e) ? /* @__PURE__ */ t(N, {
286
+ position: a,
210
287
  size: o,
211
288
  children: /* @__PURE__ */ t(e, {})
212
- }) : B(e) ? /* @__PURE__ */ t(E, {
213
- position: r,
289
+ }) : A(e) ? /* @__PURE__ */ t(N, {
290
+ position: a,
214
291
  size: o,
215
292
  children: e
216
- }) : /* @__PURE__ */ t(E, {
217
- position: r,
293
+ }) : /* @__PURE__ */ t(N, {
294
+ position: a,
218
295
  size: o,
219
296
  children: e
220
297
  });
221
298
  }
222
- function V({ svgOnly: e, loading: r, prefix: o, suffix: a, children: n, iconReveal: i, size: d }) {
223
- if (e) return r ? /* @__PURE__ */ t(T, {}) : n;
224
- const s = !!i;
225
- return /* @__PURE__ */ W(Q, { children: [
226
- r ? /* @__PURE__ */ t(S, {
299
+ function q({ svgOnly: e, loading: a, prefix: o, suffix: r, children: n, iconReveal: s, size: l }) {
300
+ if (e) return a ? /* @__PURE__ */ t(C, {}) : n;
301
+ const i = !!s;
302
+ return /* @__PURE__ */ ee(z, { children: [
303
+ a ? /* @__PURE__ */ t(w, {
227
304
  position: "loading",
228
- children: /* @__PURE__ */ t(T, {})
229
- }) : s ? k(o, "prefix", d) : R(o, "prefix"),
305
+ children: /* @__PURE__ */ t(C, {})
306
+ }) : i ? O(o, "prefix", l) : B(o, "prefix"),
230
307
  n != null && n !== !1 && /* @__PURE__ */ t("span", {
231
308
  "data-text": !0,
232
309
  className: "transition-inherit-all px-0.5",
233
310
  children: n
234
311
  }),
235
- s ? k(a, "suffix", d) : R(a, "suffix")
312
+ i ? O(r, "suffix", l) : B(r, "suffix")
236
313
  ] });
237
314
  }
238
- function P(e, r, o) {
239
- const a = o.sheen ? {
240
- ...re,
241
- scale: 1
242
- } : {}, n = o.sheen ? { ...oe[e] } : {}, i = o.sheen ? {
243
- ...ae[e],
244
- scale: te
315
+ function H(e, a, o) {
316
+ const r = {
317
+ scale: 1,
318
+ ...o.sheen ? le : {}
319
+ }, n = o.sheen ? { ...pe[e] } : {}, s = {
320
+ scale: he,
321
+ ...o.sheen ? de[e] : {}
322
+ }, l = o.sheen ? {
323
+ ...ce[e],
324
+ transition: ue
245
325
  } : {};
246
- return o.iconReveal && (a.gap = 0, n.gap = e === "lg" ? 4 : 0), {
326
+ return o.iconReveal && (r.gap = 0, n.gap = e === "lg" ? 4 : 0), {
247
327
  initial: !1,
248
- animate: "rest",
249
- whileHover: r ? void 0 : "hover",
250
- whileTap: r || !o.sheen ? void 0 : "press",
328
+ animate: o.waking && o.sheen ? "wake" : "rest",
329
+ whileHover: a ? void 0 : "hover",
330
+ whileTap: a ? void 0 : "press",
251
331
  variants: {
252
- rest: a,
332
+ rest: r,
253
333
  hover: n,
254
- press: i
334
+ press: s,
335
+ wake: l
255
336
  },
256
- transition: A
337
+ transition: V
257
338
  };
258
339
  }
259
- function U({ variant: e, color: r, size: o, shape: a, loading: n, svgOnly: i, className: d }) {
260
- return p(O({
340
+ function W({ variant: e, color: a, size: o, shape: r, loading: n, svgOnly: s, className: l }) {
341
+ return p(F({
261
342
  variant: e,
262
- color: r,
343
+ color: a,
263
344
  size: o,
264
- shape: a
265
- }), n && "pointer-events-none", i && "[&>svg]:size-[1.25em] [&>svg]:shrink-0", d);
345
+ shape: r
346
+ }), n && "pointer-events-none", s && "[&>svg]:size-[1.25em] [&>svg]:shrink-0", l);
266
347
  }
267
- function q({ variant: e = "effect", color: r, size: o = "md", shape: a, prefix: n, suffix: i, iconReveal: d = !1, svgOnly: s, loading: l, children: b, className: x, ref: g, ...f }) {
268
- I(s, f["aria-label"]);
269
- const c = e === "effect", h = d && !s, v = U({
348
+ function D({ variant: e = "effect", color: a, size: o = "md", shape: r, prefix: n, suffix: s, iconReveal: l = !1, svgOnly: i, loading: d, children: b, className: g, ref: _, ...v }) {
349
+ U(i, v["aria-label"]);
350
+ const h = e === "effect", u = l && !i, m = !!(v.disabled || d), { waking: f, onWakeComplete: y } = M(m, h), x = W({
270
351
  variant: e,
271
- color: r,
352
+ color: a,
272
353
  size: o,
273
- shape: a,
274
- loading: l,
275
- svgOnly: s,
276
- className: p(h && F[o], x)
277
- }), u = V({
278
- svgOnly: s,
279
- loading: l,
354
+ shape: r,
355
+ loading: d,
356
+ svgOnly: i,
357
+ className: p(u && P[o], g)
358
+ }), E = q({
359
+ svgOnly: i,
360
+ loading: d,
280
361
  prefix: n,
281
- suffix: i,
362
+ suffix: s,
282
363
  children: b,
283
- iconReveal: h,
364
+ iconReveal: u,
284
365
  size: o
285
366
  });
286
- return c || h ? /* @__PURE__ */ t(w.button, {
287
- ref: g,
367
+ return /* @__PURE__ */ t(S.button, {
368
+ ref: _,
288
369
  type: "button",
289
- ...P(o, f.disabled || l, {
290
- sheen: c,
291
- iconReveal: h
370
+ ...H(o, m, {
371
+ sheen: h,
372
+ iconReveal: u,
373
+ waking: f
292
374
  }),
293
- ...f,
294
- "aria-busy": l || void 0,
295
- "data-loading": l ? "true" : void 0,
296
- "data-svg-only": s ? "true" : void 0,
297
- className: v,
298
- children: u
299
- }) : /* @__PURE__ */ t("button", {
300
- ref: g,
301
- type: "button",
302
- ...f,
303
- "aria-busy": l || void 0,
304
- "data-loading": l ? "true" : void 0,
305
- "data-svg-only": s ? "true" : void 0,
306
- className: v,
307
- children: u
375
+ onAnimationComplete: y,
376
+ ...v,
377
+ "aria-busy": d || void 0,
378
+ "data-loading": d ? "true" : void 0,
379
+ "data-svg-only": i ? "true" : void 0,
380
+ "data-waking": f || void 0,
381
+ className: x,
382
+ children: E
308
383
  });
309
384
  }
310
- q.displayName = "Button";
311
- function D({ variant: e = "effect", color: r, size: o = "md", shape: a, prefix: n, suffix: i, iconReveal: d = !1, svgOnly: s, loading: l, disabled: b, href: x, children: g, className: f, ...c }) {
312
- I(s, c["aria-label"]);
313
- const h = G(), v = e === "effect", u = d && !s, H = U({
385
+ D.displayName = "Button";
386
+ function j({ variant: e = "effect", color: a, size: o = "md", shape: r, prefix: n, suffix: s, iconReveal: l = !1, svgOnly: i, loading: d, disabled: b, href: g, children: _, className: v, ...h }) {
387
+ U(i, h["aria-label"]);
388
+ const u = Z(), m = e === "effect", f = l && !i, y = W({
314
389
  variant: e,
315
- color: r,
390
+ color: a,
316
391
  size: o,
317
- shape: a,
318
- loading: l,
319
- svgOnly: s,
320
- className: p(u && F[o], f)
321
- }), _ = V({
322
- svgOnly: s,
323
- loading: l,
392
+ shape: r,
393
+ loading: d,
394
+ svgOnly: i,
395
+ className: p(f && P[o], v)
396
+ }), x = q({
397
+ svgOnly: i,
398
+ loading: d,
324
399
  prefix: n,
325
- suffix: i,
326
- children: g,
327
- iconReveal: u,
400
+ suffix: s,
401
+ children: _,
402
+ iconReveal: f,
328
403
  size: o
329
- }), M = K(() => w.create(h), [h]), m = !!(b || l), y = {
330
- ...c,
331
- ...m ? {} : { href: x },
332
- "aria-disabled": m || void 0,
333
- "aria-busy": l || void 0,
334
- "data-loading": l ? "true" : void 0,
335
- "data-svg-only": s ? "true" : void 0,
336
- className: H,
337
- tabIndex: m ? -1 : c.tabIndex,
338
- onClick: m ? (j) => {
339
- j.preventDefault();
340
- } : c.onClick
404
+ }), E = J(() => S.create(u), [u]), c = !!(b || d), { waking: T, onWakeComplete: G } = M(c, m), R = {
405
+ ...h,
406
+ ...c ? {} : { href: g },
407
+ "aria-disabled": c || void 0,
408
+ "aria-busy": d || void 0,
409
+ "data-loading": d ? "true" : void 0,
410
+ "data-svg-only": i ? "true" : void 0,
411
+ className: y,
412
+ tabIndex: c ? -1 : h.tabIndex,
413
+ onClick: c ? (K) => {
414
+ K.preventDefault();
415
+ } : h.onClick
341
416
  };
342
- return m ? /* @__PURE__ */ t("span", {
343
- ...y,
344
- children: _
345
- }) : v || u ? /* @__PURE__ */ t(M, {
346
- ...P(o, b || l, {
347
- sheen: v,
348
- iconReveal: u
417
+ return c ? /* @__PURE__ */ t("span", {
418
+ ...R,
419
+ children: x
420
+ }) : /* @__PURE__ */ t(E, {
421
+ ...H(o, c, {
422
+ sheen: m,
423
+ iconReveal: f,
424
+ waking: T
349
425
  }),
350
- ...y,
351
- children: _
352
- }) : /* @__PURE__ */ t(h, {
353
- ...y,
354
- children: _
426
+ onAnimationComplete: G,
427
+ "data-waking": T || void 0,
428
+ ...R,
429
+ children: x
355
430
  });
356
431
  }
357
- D.displayName = "ButtonLink";
358
- var _e = L;
359
- function ye(e) {
360
- const { size: r = "md", fullWidth: o, className: a } = e ?? {};
361
- return O({
432
+ j.displayName = "ButtonLink";
433
+ var Ce = L;
434
+ function Be(e) {
435
+ const { size: a = "md", fullWidth: o, className: r } = e ?? {};
436
+ return F({
362
437
  variant: "effect",
363
- size: r,
364
- className: p(o && "w-full", a)
438
+ size: a,
439
+ className: p(o && "w-full", r)
365
440
  });
366
441
  }
367
- function se({ size: e = "md", fullWidth: r, animated: o, iconReveal: a, className: n, ...i }) {
368
- return /* @__PURE__ */ t(q, {
442
+ function ve({ size: e = "md", fullWidth: a, animated: o, iconReveal: r, className: n, ...s }) {
443
+ return /* @__PURE__ */ t(D, {
369
444
  variant: "effect",
370
445
  size: e,
371
- iconReveal: a ?? o ?? !0,
372
- className: p(r && "w-full", n),
373
- ...i
446
+ iconReveal: r ?? o ?? !0,
447
+ className: p(a && "w-full", n),
448
+ ...s
374
449
  });
375
450
  }
376
- se.displayName = "EffectButton";
377
- function ie({ size: e = "md", fullWidth: r, animated: o, iconReveal: a, className: n, ...i }) {
378
- return /* @__PURE__ */ t(D, {
451
+ ve.displayName = "EffectButton";
452
+ function me({ size: e = "md", fullWidth: a, animated: o, iconReveal: r, className: n, ...s }) {
453
+ return /* @__PURE__ */ t(j, {
379
454
  variant: "effect",
380
455
  size: e,
381
- iconReveal: a ?? o ?? !0,
382
- className: p(r && "w-full", n),
383
- ...i
456
+ iconReveal: r ?? o ?? !0,
457
+ className: p(a && "w-full", n),
458
+ ...s
384
459
  });
385
460
  }
386
- ie.displayName = "EffectButtonLink";
387
- var le = {
461
+ me.displayName = "EffectButtonLink";
462
+ var xe = {
388
463
  sm: { classes: "size-9 rounded-base *:size-5" },
389
464
  md: { classes: "size-10 rounded-base *:size-5" },
390
465
  lg: { classes: "size-11 rounded-base *:size-6" }
391
466
  };
392
- function pe({ size: e = "sm", label: r, className: o, ...a }) {
467
+ function be({ size: e = "sm", label: a, className: o, ...r }) {
393
468
  return /* @__PURE__ */ t("button", {
394
469
  type: "button",
395
- "aria-label": r || "Close",
396
- ...a,
397
- className: p("squircle text-pho-secondary outline-pho-brand hover:bg-pho-ghost-hover hover:text-pho-secondary-hover inline-flex cursor-pointer items-center justify-center p-2 transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2", N(le, e), o),
398
- children: /* @__PURE__ */ t(Z, {
470
+ "aria-label": a || "Close",
471
+ ...r,
472
+ className: p("squircle text-pho-secondary outline-pho-brand hover:bg-pho-ghost-hover hover:text-pho-secondary-hover inline-flex cursor-pointer items-center justify-center p-2 transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2", k(xe, e), o),
473
+ children: /* @__PURE__ */ t(Q, {
399
474
  "aria-hidden": "true",
400
475
  className: "transition-inherit-all shrink-0"
401
476
  })
402
477
  });
403
478
  }
404
- pe.displayName = "CloseButton";
479
+ be.displayName = "CloseButton";
405
480
  export {
406
- ge as a,
407
- _e as c,
408
- O as d,
409
- ye as f,
481
+ Te as a,
482
+ Ce as c,
483
+ F as d,
484
+ Be as f,
410
485
  L as i,
411
- se as l,
412
- xe as n,
413
- q as o,
414
- z as r,
415
- D as s,
416
- pe as t,
417
- ie as u
486
+ ve as l,
487
+ Re as n,
488
+ D as o,
489
+ re as r,
490
+ j as s,
491
+ be as t,
492
+ me as u
418
493
  };
419
494
 
420
- //# sourceMappingURL=close-button-8f-oRJXt.js.map
495
+ //# sourceMappingURL=close-button-Bq9f-H15.js.map