@photon-ai/pho-ui 0.1.1 → 0.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 (90) hide show
  1. package/dist/chunks/button-GQALfaly.js +325 -0
  2. package/dist/chunks/button-GQALfaly.js.map +1 -0
  3. package/dist/chunks/{close-button-CbQNfpxU.js → close-button-DKaNIndU.js} +6 -6
  4. package/dist/chunks/{close-button-CbQNfpxU.js.map → close-button-DKaNIndU.js.map} +1 -1
  5. package/dist/chunks/{cn-D6jQqeRj.js → cn-7uGUzCOM.js} +2 -3
  6. package/dist/chunks/{cn-D6jQqeRj.js.map → cn-7uGUzCOM.js.map} +1 -1
  7. package/dist/chunks/{dialog-BSBF1Wyq.js → dialog-CyyL5VCc.js} +13 -13
  8. package/dist/chunks/dialog-CyyL5VCc.js.map +1 -0
  9. package/dist/chunks/{input-aZqjjV_m.js → input-DX7d5MlS.js} +3 -3
  10. package/dist/chunks/input-DX7d5MlS.js.map +1 -0
  11. package/dist/chunks/menu-BfaNHnOp.js +101 -0
  12. package/dist/chunks/menu-BfaNHnOp.js.map +1 -0
  13. package/dist/components/accordion.js +1 -1
  14. package/dist/components/alert-dialog.js +5 -5
  15. package/dist/components/alert-dialog.js.map +1 -1
  16. package/dist/components/autocomplete.js +7 -7
  17. package/dist/components/autocomplete.js.map +1 -1
  18. package/dist/components/avatar.js +1 -1
  19. package/dist/components/badge.js +2 -2
  20. package/dist/components/badge.js.map +1 -1
  21. package/dist/components/button.js +10 -11
  22. package/dist/components/checkbox.js +2 -2
  23. package/dist/components/checkbox.js.map +1 -1
  24. package/dist/components/collapsible.js +1 -1
  25. package/dist/components/combobox.js +53 -53
  26. package/dist/components/combobox.js.map +1 -1
  27. package/dist/components/context-menu.js +11 -11
  28. package/dist/components/context-menu.js.map +1 -1
  29. package/dist/components/dialog.js +1 -1
  30. package/dist/components/drawer.js +2 -2
  31. package/dist/components/drawer.js.map +1 -1
  32. package/dist/components/field.js +26 -26
  33. package/dist/components/field.js.map +1 -1
  34. package/dist/components/fieldset.js +1 -1
  35. package/dist/components/form.js +1 -1
  36. package/dist/components/input.js +1 -1
  37. package/dist/components/kbd.js +8 -8
  38. package/dist/components/kbd.js.map +1 -1
  39. package/dist/components/menu.js +1 -1
  40. package/dist/components/menubar.js +5 -5
  41. package/dist/components/menubar.js.map +1 -1
  42. package/dist/components/meter.js +1 -1
  43. package/dist/components/navigation-menu.js +34 -34
  44. package/dist/components/navigation-menu.js.map +1 -1
  45. package/dist/components/notification.js +16 -16
  46. package/dist/components/notification.js.map +1 -1
  47. package/dist/components/number-field.js +18 -18
  48. package/dist/components/number-field.js.map +1 -1
  49. package/dist/components/otp-field.js +6 -6
  50. package/dist/components/otp-field.js.map +1 -1
  51. package/dist/components/popover.js +9 -9
  52. package/dist/components/popover.js.map +1 -1
  53. package/dist/components/preview-card.js +12 -12
  54. package/dist/components/preview-card.js.map +1 -1
  55. package/dist/components/progress.js +1 -1
  56. package/dist/components/radio-group.js +9 -9
  57. package/dist/components/radio-group.js.map +1 -1
  58. package/dist/components/scroll-area.js +1 -1
  59. package/dist/components/select.js +10 -10
  60. package/dist/components/select.js.map +1 -1
  61. package/dist/components/separator.js +1 -1
  62. package/dist/components/slider.js +16 -16
  63. package/dist/components/slider.js.map +1 -1
  64. package/dist/components/switch.js +11 -11
  65. package/dist/components/switch.js.map +1 -1
  66. package/dist/components/tabs.js +15 -15
  67. package/dist/components/tabs.js.map +1 -1
  68. package/dist/components/toast.js +6 -6
  69. package/dist/components/toast.js.map +1 -1
  70. package/dist/components/toggle-group.js +1 -1
  71. package/dist/components/toggle.js +6 -6
  72. package/dist/components/toggle.js.map +1 -1
  73. package/dist/components/toolbar.js +7 -7
  74. package/dist/components/toolbar.js.map +1 -1
  75. package/dist/components/tooltip.js +14 -14
  76. package/dist/components/tooltip.js.map +1 -1
  77. package/dist/index.js +17 -18
  78. package/dist/src/components/button/button.d.ts +12 -35
  79. package/dist/src/components/button/index.d.ts +1 -1
  80. package/dist/src/components/menu/menu.d.ts +2 -2
  81. package/dist/utils.js +1 -1
  82. package/package.json +1 -1
  83. package/src/styles/fonts.css +22 -0
  84. package/src/styles/theme.css +166 -169
  85. package/dist/chunks/button-DjjSiLYz.js +0 -334
  86. package/dist/chunks/button-DjjSiLYz.js.map +0 -1
  87. package/dist/chunks/dialog-BSBF1Wyq.js.map +0 -1
  88. package/dist/chunks/input-aZqjjV_m.js.map +0 -1
  89. package/dist/chunks/menu-BkzDbNuX.js +0 -101
  90. package/dist/chunks/menu-BkzDbNuX.js.map +0 -1
@@ -1,334 +0,0 @@
1
- "use client";
2
- import { t as p } from "./cn-D6jQqeRj.js";
3
- import { n as T, r as S } from "./link-provider-9TFNyDqO.js";
4
- import { t as m } from "./resolve-variant-CcD8iG5l.js";
5
- import { isValidElement as B, useMemo as R } from "react";
6
- import { Fragment as _, jsx as a, jsxs as g } from "react/jsx-runtime";
7
- import { motion as y } from "motion/react";
8
- var q = p("group relative inline-flex h-max cursor-pointer items-center justify-center whitespace-nowrap outline-pho-brand transition duration-100 ease-linear before:absolute 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"), M = {
9
- sm: {
10
- classes: "gap-1 px-3 py-2 text-sm font-semibold data-svg-only:p-2",
11
- description: "Small — compact rows, tables, and toolbars"
12
- },
13
- md: {
14
- classes: "gap-1 px-3.5 py-2.5 text-sm font-semibold data-svg-only:p-2.5",
15
- description: "Medium — the default"
16
- },
17
- lg: {
18
- classes: "gap-1.5 px-4 py-2.5 text-md font-semibold data-svg-only:p-3",
19
- description: "Large — prominent and marketing actions"
20
- }
21
- }, O = {
22
- square: {
23
- classes: "rounded-lg before:rounded-[7px]",
24
- description: "Default — gently rounded corners"
25
- },
26
- circle: {
27
- classes: "rounded-full before:rounded-full",
28
- description: "Circular — pair with svgOnly for round icon buttons"
29
- },
30
- rounded: {
31
- classes: "rounded-full before:rounded-full",
32
- description: "Pill — marketing CTAs, often with shadow"
33
- }
34
- }, z = {
35
- primary: {
36
- classes: "bg-pho-brand-solid text-white shadow-pho-skeuo-xs ring-1 ring-transparent ring-inset hover:bg-pho-brand-solid-hover data-loading:bg-pho-brand-solid-hover before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% *:data-icon:text-white/60 hover:*:data-icon:text-white/70",
37
- description: "High-emphasis primary action (default)"
38
- },
39
- secondary: {
40
- classes: "bg-pho-primary text-pho-secondary shadow-pho-skeuo-xs ring-1 ring-pho-primary ring-inset hover:bg-pho-primary-hover hover:text-pho-secondary-hover data-loading:bg-pho-primary-hover *:data-icon:text-fg-pho-quaternary hover:*:data-icon:text-fg-pho-quaternary-hover",
41
- description: "Neutral, supporting action"
42
- },
43
- tertiary: {
44
- classes: "text-pho-tertiary hover:bg-pho-primary-hover hover:text-pho-tertiary-hover data-loading:bg-pho-primary-hover *:data-icon:text-fg-pho-quaternary hover:*:data-icon:text-fg-pho-quaternary-hover",
45
- description: "Low-emphasis, borderless action"
46
- },
47
- error: {
48
- classes: "bg-pho-error-solid text-white shadow-pho-skeuo-xs ring-1 ring-transparent outline-pho-error ring-inset hover:bg-pho-error-solid-hover data-loading:bg-pho-error-solid-hover before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% *:data-icon:text-white/60 hover:*:data-icon:text-white/70",
49
- description: "Destructive confirmation"
50
- }
51
- };
52
- function C(e) {
53
- const { variant: r = "primary", size: i = "md", shape: n = "square", shadow: o, className: s } = e ?? {};
54
- return p(q, m(O, n), m(M, i), m(z, r), o && "shadow-pho-md", s);
55
- }
56
- var D = "transition-inherit-all pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-5 [&>svg]:shrink-0";
57
- function b({ position: e, children: r }) {
58
- return /* @__PURE__ */ a("span", {
59
- "data-icon": e,
60
- className: D,
61
- children: r
62
- });
63
- }
64
- function v() {
65
- return /* @__PURE__ */ g("svg", {
66
- fill: "none",
67
- viewBox: "0 0 20 20",
68
- "aria-hidden": "true",
69
- children: [/* @__PURE__ */ a("circle", {
70
- className: "stroke-current opacity-30",
71
- cx: "10",
72
- cy: "10",
73
- r: "8",
74
- fill: "none",
75
- strokeWidth: "2"
76
- }), /* @__PURE__ */ a("circle", {
77
- className: "origin-center animate-spin stroke-current",
78
- cx: "10",
79
- cy: "10",
80
- r: "8",
81
- fill: "none",
82
- strokeWidth: "2",
83
- strokeDasharray: "12.5 50",
84
- strokeLinecap: "round"
85
- })]
86
- });
87
- }
88
- function w(e, r) {
89
- return e == null || e === !1 ? null : S(e) ? /* @__PURE__ */ a(b, {
90
- position: r,
91
- children: /* @__PURE__ */ a(e, {})
92
- }) : B(e) ? /* @__PURE__ */ a(b, {
93
- position: r,
94
- children: e
95
- }) : null;
96
- }
97
- function F({ svgOnly: e, loading: r, prefix: i, suffix: n, children: o }) {
98
- return e ? r ? /* @__PURE__ */ a(v, {}) : o : /* @__PURE__ */ g(_, { children: [
99
- r ? /* @__PURE__ */ a(b, {
100
- position: "loading",
101
- children: /* @__PURE__ */ a(v, {})
102
- }) : w(i, "prefix"),
103
- o != null && o !== !1 && /* @__PURE__ */ a("span", {
104
- "data-text": !0,
105
- className: "transition-inherit-all px-0.5",
106
- children: o
107
- }),
108
- w(n, "suffix")
109
- ] });
110
- }
111
- function x(e, r) {
112
- e && !r && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("Button: `svgOnly` buttons require an `aria-label` that names the action.");
113
- }
114
- function H({ variant: e, size: r, shape: i, shadow: n, prefix: o, suffix: s, svgOnly: t, loading: d, children: u, className: c, ref: l, ...h }) {
115
- return x(t, h["aria-label"]), /* @__PURE__ */ a("button", {
116
- ref: l,
117
- type: "button",
118
- ...h,
119
- "aria-busy": d || void 0,
120
- "data-loading": d ? "true" : void 0,
121
- "data-svg-only": t ? "true" : void 0,
122
- className: p(C({
123
- variant: e,
124
- size: r,
125
- shape: i,
126
- shadow: n
127
- }), d && "pointer-events-none", t && "[&>svg]:size-5 [&>svg]:shrink-0", c),
128
- children: F({
129
- svgOnly: t,
130
- loading: d,
131
- prefix: o,
132
- suffix: s,
133
- children: u
134
- })
135
- });
136
- }
137
- H.displayName = "Button";
138
- function U({ variant: e, size: r, shape: i, shadow: n, prefix: o, suffix: s, svgOnly: t, loading: d, disabled: u, href: c, children: l, className: h, ...f }) {
139
- return x(t, f["aria-label"]), /* @__PURE__ */ a(T(), {
140
- href: c,
141
- ...f,
142
- "aria-disabled": u || d || void 0,
143
- "aria-busy": d || void 0,
144
- "data-loading": d ? "true" : void 0,
145
- "data-svg-only": t ? "true" : void 0,
146
- className: p(C({
147
- variant: e,
148
- size: r,
149
- shape: i,
150
- shadow: n
151
- }), d && "pointer-events-none", t && "[&>svg]:size-5 [&>svg]:shrink-0", h),
152
- children: F({
153
- svgOnly: t,
154
- loading: d,
155
- prefix: o,
156
- suffix: s,
157
- children: l
158
- })
159
- });
160
- }
161
- U.displayName = "ButtonLink";
162
- var j = p("squircle relative inline-flex h-max cursor-pointer items-center justify-center overflow-hidden rounded-full border font-medium whitespace-nowrap", "outline-pho-brand focus-visible:outline-2 focus-visible:outline-offset-2", "disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"), A = {
163
- type: "spring",
164
- stiffness: 200,
165
- damping: 30,
166
- mass: 0.1
167
- }, P = "inset 0px 0px 5px 2px rgba(255, 255, 255, 0.5)", N = {
168
- sm: {
169
- boxShadow: "inset 0px -3px 8px 2px rgba(255, 255, 255, 0.5)",
170
- gap: 0
171
- },
172
- md: {
173
- boxShadow: "inset 0px -6px 14px 1px rgba(255, 255, 255, 0.5)",
174
- gap: 4
175
- }
176
- }, W = {
177
- sm: {
178
- classes: "p-2 text-sm data-svg-only:p-2",
179
- description: "Small — the compact 'Variant 2' (14px label, 8px padding)"
180
- },
181
- md: {
182
- classes: "px-4 py-3 text-md data-svg-only:p-3",
183
- description: "Medium — the 'Variant 1' (16px label, 12×16 padding)"
184
- }
185
- }, Z = {
186
- primary: {
187
- classes: "border-white/15 bg-pho-brand-solid text-white",
188
- description: "Brand fill with the glossy inset sheen (default)"
189
- },
190
- secondary: {
191
- classes: "border-transparent bg-pho-primary text-pho-secondary shadow-pho-skeuo-xs ring-1 ring-pho-primary ring-inset transition-colors duration-100 ease-linear not-disabled:hover:bg-pho-primary-hover not-disabled:hover:text-pho-secondary-hover data-loading:bg-pho-primary-hover",
192
- description: "Neutral white-card pill (OAuth / supporting CTA), no sheen"
193
- }
194
- };
195
- function L(e) {
196
- const { variant: r = "primary", size: i = "md", fullWidth: n, className: o } = e ?? {};
197
- return p(j, m(W, i), m(Z, r), n && "w-full", o);
198
- }
199
- function G(e, r) {
200
- return r === "secondary" ? {
201
- rest: { gap: 0 },
202
- hover: { gap: N[e].gap }
203
- } : {
204
- rest: {
205
- boxShadow: P,
206
- gap: 0
207
- },
208
- hover: N[e]
209
- };
210
- }
211
- var J = {
212
- rest: {
213
- opacity: 0,
214
- width: 1,
215
- height: 10
216
- },
217
- hover: {
218
- opacity: 1,
219
- width: 20,
220
- height: 21
221
- }
222
- };
223
- function E({ position: e, children: r }) {
224
- return /* @__PURE__ */ a(y.span, {
225
- "data-icon": e,
226
- variants: J,
227
- transition: A,
228
- style: {
229
- display: "inline-flex",
230
- flex: "none",
231
- alignItems: "center",
232
- overflow: "hidden"
233
- },
234
- className: "pointer-events-none [&>svg]:block [&>svg]:size-full",
235
- children: r
236
- });
237
- }
238
- function k(e, r) {
239
- return e == null || e === !1 ? null : S(e) ? /* @__PURE__ */ a(E, {
240
- position: r,
241
- children: /* @__PURE__ */ a(e, {})
242
- }) : B(e) ? /* @__PURE__ */ a(E, {
243
- position: r,
244
- children: e
245
- }) : null;
246
- }
247
- function V({ svgOnly: e, loading: r, prefix: i, suffix: n, children: o }) {
248
- return e ? r ? /* @__PURE__ */ a(v, {}) : o : /* @__PURE__ */ g(_, { children: [
249
- r ? /* @__PURE__ */ a(b, {
250
- position: "loading",
251
- children: /* @__PURE__ */ a(v, {})
252
- }) : k(i, "prefix"),
253
- o != null && o !== !1 && /* @__PURE__ */ a("span", {
254
- "data-text": !0,
255
- className: "px-0.5",
256
- children: o
257
- }),
258
- k(n, "suffix")
259
- ] });
260
- }
261
- function I(e, r, i) {
262
- return {
263
- initial: !1,
264
- animate: "rest",
265
- whileHover: i ? void 0 : "hover",
266
- variants: G(e, r),
267
- transition: A
268
- };
269
- }
270
- function K({ variant: e = "primary", size: r = "md", fullWidth: i, prefix: n, suffix: o, svgOnly: s, loading: t, children: d, className: u, ref: c, ...l }) {
271
- return x(s, l["aria-label"]), /* @__PURE__ */ a(y.button, {
272
- ref: c,
273
- type: "button",
274
- ...I(r, e, l.disabled || t),
275
- ...l,
276
- "aria-busy": t || void 0,
277
- "data-loading": t ? "true" : void 0,
278
- "data-svg-only": s ? "true" : void 0,
279
- className: p(L({
280
- variant: e,
281
- size: r,
282
- fullWidth: i
283
- }), t && "pointer-events-none", s && "[&>svg]:size-5 [&>svg]:shrink-0", u),
284
- children: V({
285
- svgOnly: s,
286
- loading: t,
287
- prefix: n,
288
- suffix: o,
289
- children: d
290
- })
291
- });
292
- }
293
- K.displayName = "EffectButton";
294
- function Q({ variant: e = "primary", size: r = "md", fullWidth: i, prefix: n, suffix: o, svgOnly: s, loading: t, disabled: d, href: u, children: c, className: l, ...h }) {
295
- x(s, h["aria-label"]);
296
- const f = T();
297
- return /* @__PURE__ */ a(R(() => y.create(f), [f]), {
298
- href: u,
299
- ...I(r, e, d || t),
300
- ...h,
301
- "aria-disabled": d || t || void 0,
302
- "aria-busy": t || void 0,
303
- "data-loading": t ? "true" : void 0,
304
- "data-svg-only": s ? "true" : void 0,
305
- className: p(L({
306
- variant: e,
307
- size: r,
308
- fullWidth: i
309
- }), t && "pointer-events-none", s && "[&>svg]:size-5 [&>svg]:shrink-0", l),
310
- children: V({
311
- svgOnly: s,
312
- loading: t,
313
- prefix: n,
314
- suffix: o,
315
- children: c
316
- })
317
- });
318
- }
319
- Q.displayName = "EffectButtonLink";
320
- export {
321
- U as a,
322
- K as c,
323
- L as d,
324
- H as i,
325
- Q as l,
326
- M as n,
327
- W as o,
328
- z as r,
329
- Z as s,
330
- O as t,
331
- C as u
332
- };
333
-
334
- //# sourceMappingURL=button-DjjSiLYz.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-DjjSiLYz.js","names":[],"sources":["../../src/components/button/button.tsx"],"sourcesContent":["import {\n isValidElement,\n useMemo,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type FC,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { motion, type HTMLMotionProps } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\nimport { isReactComponent } from \"../../utils/is-react-component\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * Design notes (Geist-aligned):\n * - ONE emphasis axis, kept deliberately small. `variant` is a closed,\n * semantic set — a single high-emphasis default plus the supporting and\n * intent variants you actually reach for. There is no `ghost`, no `link`,\n * and no second destructive: navigation belongs to `ButtonLink`, and an\n * inline text link is an anchor, not a button.\n * - THREE sizes (`sm` / `md` / `lg`, default `md`). No `xs` / `xl`.\n * - `prefix` / `suffix` are generic slots (icon, spinner, count…), not\n * icon-only props. `svgOnly` makes an icon button and *requires* an\n * `aria-label`. Boolean flags (`loading`, `shadow`) are declarative.\n */\n\nconst COMMON_ROOT = cn(\n \"group relative inline-flex h-max cursor-pointer items-center justify-center whitespace-nowrap outline-pho-brand transition duration-100 ease-linear before:absolute focus-visible:outline-2 focus-visible:outline-offset-2\",\n // Disabled (native `disabled` on <button>, `aria-disabled` on links).\n \"disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none\",\n);\n\n/** Size axis — padding, text size, and icon-only (svgOnly) padding. */\nexport const BUTTON_SIZES = {\n sm: {\n classes: \"gap-1 px-3 py-2 text-sm font-semibold data-svg-only:p-2\",\n description: \"Small — compact rows, tables, and toolbars\",\n },\n md: {\n classes: \"gap-1 px-3.5 py-2.5 text-sm font-semibold data-svg-only:p-2.5\",\n description: \"Medium — the default\",\n },\n lg: {\n classes: \"gap-1.5 px-4 py-2.5 text-md font-semibold data-svg-only:p-3\",\n description: \"Large — prominent and marketing actions\",\n },\n} satisfies VariantMap;\n\n/** Shape axis — corner treatment. `square` is the default text-button shape. */\nexport const BUTTON_SHAPES = {\n square: {\n classes: \"rounded-lg before:rounded-[7px]\",\n description: \"Default — gently rounded corners\",\n },\n circle: {\n classes: \"rounded-full before:rounded-full\",\n description: \"Circular — pair with svgOnly for round icon buttons\",\n },\n rounded: {\n classes: \"rounded-full before:rounded-full\",\n description: \"Pill — marketing CTAs, often with shadow\",\n },\n} satisfies VariantMap;\n\n/** Emphasis axis — a tight, semantic set. `primary` is the default. */\nexport const BUTTON_VARIANTS = {\n primary: {\n classes:\n \"bg-pho-brand-solid text-white shadow-pho-skeuo-xs ring-1 ring-transparent ring-inset hover:bg-pho-brand-solid-hover data-loading:bg-pho-brand-solid-hover before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% *:data-icon:text-white/60 hover:*:data-icon:text-white/70\",\n description: \"High-emphasis primary action (default)\",\n },\n secondary: {\n classes:\n \"bg-pho-primary text-pho-secondary shadow-pho-skeuo-xs ring-1 ring-pho-primary ring-inset hover:bg-pho-primary-hover hover:text-pho-secondary-hover data-loading:bg-pho-primary-hover *:data-icon:text-fg-pho-quaternary hover:*:data-icon:text-fg-pho-quaternary-hover\",\n description: \"Neutral, supporting action\",\n },\n tertiary: {\n classes:\n \"text-pho-tertiary hover:bg-pho-primary-hover hover:text-pho-tertiary-hover data-loading:bg-pho-primary-hover *:data-icon:text-fg-pho-quaternary hover:*:data-icon:text-fg-pho-quaternary-hover\",\n description: \"Low-emphasis, borderless action\",\n },\n error: {\n classes:\n \"bg-pho-error-solid text-white shadow-pho-skeuo-xs ring-1 ring-transparent outline-pho-error ring-inset hover:bg-pho-error-solid-hover data-loading:bg-pho-error-solid-hover before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% *:data-icon:text-white/60 hover:*:data-icon:text-white/70\",\n description: \"Destructive confirmation\",\n },\n} satisfies VariantMap;\n\nexport type ButtonSize = keyof typeof BUTTON_SIZES;\nexport type ButtonShape = keyof typeof BUTTON_SHAPES;\nexport type ButtonVariant = keyof typeof BUTTON_VARIANTS;\n\n/** Compose the full class string for a button — exported for reuse/testing. */\nexport function buttonVariants(opts?: {\n variant?: ButtonVariant;\n size?: ButtonSize;\n shape?: ButtonShape;\n shadow?: boolean;\n className?: string;\n}): string {\n const {\n variant = \"primary\",\n size = \"md\",\n shape = \"square\",\n shadow,\n className,\n } = opts ?? {};\n return cn(\n COMMON_ROOT,\n resolveVariant(BUTTON_SHAPES, shape),\n resolveVariant(BUTTON_SIZES, size),\n resolveVariant(BUTTON_VARIANTS, variant),\n shadow && \"shadow-pho-md\",\n className,\n );\n}\n\n/** An icon/element slot rendered before or after the label. */\ntype Slottable = ReactNode | FC<{ className?: string }>;\n\ninterface ButtonBaseProps {\n /** Emphasis variant. @default \"primary\" */\n variant?: ButtonVariant;\n /** Size variant. @default \"md\" */\n size?: ButtonSize;\n /** Corner shape. @default \"square\" */\n shape?: ButtonShape;\n /** Add an elevation shadow (marketing / `rounded`). */\n shadow?: boolean;\n /** Slot before the label — a component (`Plus`) or element (`<Plus />`). */\n prefix?: Slottable;\n /** Slot after the label. */\n suffix?: Slottable;\n /** Render as an icon-only button. Requires an `aria-label`. */\n svgOnly?: boolean;\n /** Show a spinner and block interaction while staying readable. */\n loading?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\nexport interface ButtonProps\n extends\n ButtonBaseProps,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonBaseProps> {\n ref?: Ref<HTMLButtonElement>;\n}\n\nexport interface ButtonLinkProps\n extends\n ButtonBaseProps,\n Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof ButtonBaseProps> {\n /** Navigate to this URL (rendered via the host's `LinkProvider`). */\n href: string;\n /** Visually and semantically disable the link. */\n disabled?: boolean;\n}\n\nconst SLOT_CLASS =\n \"transition-inherit-all pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-5 [&>svg]:shrink-0\";\n\nfunction Slot({\n position,\n children,\n}: {\n position: \"prefix\" | \"suffix\" | \"loading\";\n children: ReactNode;\n}) {\n return (\n <span data-icon={position} className={SLOT_CLASS}>\n {children}\n </span>\n );\n}\n\nfunction Spinner() {\n return (\n <svg fill=\"none\" viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <circle\n className=\"stroke-current opacity-30\"\n cx=\"10\"\n cy=\"10\"\n r=\"8\"\n fill=\"none\"\n strokeWidth=\"2\"\n />\n <circle\n className=\"origin-center animate-spin stroke-current\"\n cx=\"10\"\n cy=\"10\"\n r=\"8\"\n fill=\"none\"\n strokeWidth=\"2\"\n strokeDasharray=\"12.5 50\"\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction renderSlot(icon: Slottable, position: \"prefix\" | \"suffix\") {\n if (icon == null || icon === false) return null;\n if (isReactComponent(icon)) {\n const Icon = icon;\n return (\n <Slot position={position}>\n <Icon />\n </Slot>\n );\n }\n if (isValidElement(icon)) return <Slot position={position}>{icon}</Slot>;\n return null;\n}\n\nfunction buttonInner({\n svgOnly,\n loading,\n prefix,\n suffix,\n children,\n}: Pick<\n ButtonBaseProps,\n \"svgOnly\" | \"loading\" | \"prefix\" | \"suffix\" | \"children\"\n>) {\n if (svgOnly) {\n return loading ? <Spinner /> : children;\n }\n return (\n <>\n {loading ? (\n <Slot position=\"loading\">\n <Spinner />\n </Slot>\n ) : (\n renderSlot(prefix, \"prefix\")\n )}\n {children != null && children !== false && (\n <span data-text className=\"transition-inherit-all px-0.5\">\n {children}\n </span>\n )}\n {renderSlot(suffix, \"suffix\")}\n </>\n );\n}\n\nfunction warnMissingLabel(svgOnly: boolean | undefined, label: unknown) {\n if (\n svgOnly &&\n !label &&\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n ) {\n console.warn(\n \"Button: `svgOnly` buttons require an `aria-label` that names the action.\",\n );\n }\n}\n\n/**\n * Button — triggers an action that mutates state (submit, save, delete).\n * For navigation that changes the URL, use {@link ButtonLink}.\n */\nexport function Button({\n variant,\n size,\n shape,\n shadow,\n prefix,\n suffix,\n svgOnly,\n loading,\n children,\n className,\n ref,\n ...props\n}: ButtonProps) {\n warnMissingLabel(svgOnly, props[\"aria-label\"]);\n return (\n <button\n ref={ref}\n type=\"button\"\n {...props}\n aria-busy={loading || undefined}\n data-loading={loading ? \"true\" : undefined}\n data-svg-only={svgOnly ? \"true\" : undefined}\n className={cn(\n buttonVariants({ variant, size, shape, shadow }),\n loading && \"pointer-events-none\",\n svgOnly && \"[&>svg]:size-5 [&>svg]:shrink-0\",\n className,\n )}\n >\n {buttonInner({ svgOnly, loading, prefix, suffix, children })}\n </button>\n );\n}\n\nButton.displayName = \"Button\";\n\n/**\n * ButtonLink — a link styled as a button, for navigation that changes the URL.\n * Shares every visual prop with {@link Button}; renders the host router's link\n * via `LinkProvider`.\n */\nexport function ButtonLink({\n variant,\n size,\n shape,\n shadow,\n prefix,\n suffix,\n svgOnly,\n loading,\n disabled,\n href,\n children,\n className,\n ...props\n}: ButtonLinkProps) {\n warnMissingLabel(svgOnly, props[\"aria-label\"]);\n const Link = useLinkComponent();\n return (\n <Link\n href={href}\n {...props}\n aria-disabled={disabled || loading || undefined}\n aria-busy={loading || undefined}\n data-loading={loading ? \"true\" : undefined}\n data-svg-only={svgOnly ? \"true\" : undefined}\n className={cn(\n buttonVariants({ variant, size, shape, shadow }),\n loading && \"pointer-events-none\",\n svgOnly && \"[&>svg]:size-5 [&>svg]:shrink-0\",\n className,\n )}\n >\n {buttonInner({ svgOnly, loading, prefix, suffix, children })}\n </Link>\n );\n}\n\nButtonLink.displayName = \"ButtonLink\";\n\n/* ============================= Effect button ============================= */\n\n/**\n * A frame-exact port of Photon's Framer \"Button - Effect\", driven by Motion\n * (the same engine Framer renders with) so every frame matches the source — not\n * a CSS approximation. On hover, three things spring together on the *identical*\n * transition (`spring-physics 200 30 0.1` → stiffness 200 / damping 30 / mass\n * 0.1): a glossy inset white sheen reshapes toward the bottom edge, the gap\n * eases open (md), and any icon grows and fades in from nothing.\n *\n * Because it's a real spring — not a fixed-duration tween — it's also velocity-\n * correct: hovering out mid-animation continues from the current velocity,\n * exactly like Framer.\n *\n * Fill and stroke are STATIC (the source keeps them identical between the base\n * and hover variants); `variant` picks the treatment — `primary` is the source\n * brand pill with the glossy sheen, `secondary` the neutral white-card pill\n * (Button's secondary surface tokens) with the sheen omitted. The gap + icon\n * reveal springs are shared. `size` maps to the two source variants: `md` =\n * \"Variant 1\" (16px label, 12×16 padding), `sm` = \"Variant 2\" (14px label,\n * 8px padding).\n */\nconst EFFECT_ROOT = cn(\n // Every variant keeps the 1px border so the pill geometry never shifts.\n \"squircle relative inline-flex h-max cursor-pointer items-center justify-center overflow-hidden rounded-full border font-medium whitespace-nowrap\",\n \"outline-pho-brand focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50\",\n);\n\n/** The exact source transition: `spring-physics 200 30 0.1` (stiffness/damping/mass). */\nconst EFFECT_SPRING = {\n type: \"spring\",\n stiffness: 200,\n damping: 30,\n mass: 0.1,\n} as const;\n\n/** Resting inset sheen — identical across both sizes (source base variants). */\nconst EFFECT_REST_SHADOW = \"inset 0px 0px 5px 2px rgba(255, 255, 255, 0.5)\";\n\n/** Per-size hover targets, sampled 1:1 from the source hover (gesture) variants. */\nconst EFFECT_HOVER = {\n sm: { boxShadow: \"inset 0px -3px 8px 2px rgba(255, 255, 255, 0.5)\", gap: 0 },\n md: { boxShadow: \"inset 0px -6px 14px 1px rgba(255, 255, 255, 0.5)\", gap: 4 },\n} as const;\n\n/** Size axis for {@link EffectButton} — padding + label size per source variant. */\nexport const EFFECT_BUTTON_SIZES = {\n sm: {\n classes: \"p-2 text-sm data-svg-only:p-2\",\n description: \"Small — the compact 'Variant 2' (14px label, 8px padding)\",\n },\n md: {\n classes: \"px-4 py-3 text-md data-svg-only:p-3\",\n description: \"Medium — the 'Variant 1' (16px label, 12×16 padding)\",\n },\n} satisfies VariantMap;\n\n/**\n * Emphasis axis for {@link EffectButton} — the static fill + edge treatment.\n * `secondary` reuses the white-card surface tokens of Button's `secondary`\n * (white card, hairline ring, quiet hover) and skips the glossy sheen — that\n * inset shine is the brand-fill treatment.\n */\nexport const EFFECT_BUTTON_VARIANTS = {\n primary: {\n classes: \"border-white/15 bg-pho-brand-solid text-white\",\n description: \"Brand fill with the glossy inset sheen (default)\",\n },\n secondary: {\n // The colors-only hover is gated with `not-disabled:` — CSS `:hover` still\n // matches a disabled <button> (only pointer *events* are suppressed), and\n // `enabled:` would never match the <a> rendered by EffectButtonLink. A\n // disabled link is already inert via `aria-disabled:pointer-events-none`.\n classes:\n \"border-transparent bg-pho-primary text-pho-secondary shadow-pho-skeuo-xs ring-1 ring-pho-primary ring-inset transition-colors duration-100 ease-linear not-disabled:hover:bg-pho-primary-hover not-disabled:hover:text-pho-secondary-hover data-loading:bg-pho-primary-hover\",\n description: \"Neutral white-card pill (OAuth / supporting CTA), no sheen\",\n },\n} satisfies VariantMap;\n\nexport type EffectButtonSize = keyof typeof EFFECT_BUTTON_SIZES;\nexport type EffectButtonVariant = keyof typeof EFFECT_BUTTON_VARIANTS;\n\n/** Compose the static class string for an effect button — exported for reuse. */\nexport function effectButtonVariants(opts?: {\n variant?: EffectButtonVariant;\n size?: EffectButtonSize;\n fullWidth?: boolean;\n className?: string;\n}): string {\n const { variant = \"primary\", size = \"md\", fullWidth, className } = opts ?? {};\n return cn(\n EFFECT_ROOT,\n resolveVariant(EFFECT_BUTTON_SIZES, size),\n resolveVariant(EFFECT_BUTTON_VARIANTS, variant),\n fullWidth && \"w-full\",\n className,\n );\n}\n\n/**\n * Motion variants for the pill root — the sheen (+ gap on md) spring on hover.\n * `secondary` springs only the gap: its box-shadow stays with the CSS classes\n * (ring + skeuomorphic shadow), so Motion must never write an inline one.\n */\nfunction effectRootVariants(\n size: EffectButtonSize,\n variant: EffectButtonVariant,\n) {\n if (variant === \"secondary\") {\n return {\n rest: { gap: 0 },\n hover: { gap: EFFECT_HOVER[size].gap },\n };\n }\n return {\n rest: { boxShadow: EFFECT_REST_SHADOW, gap: 0 },\n hover: EFFECT_HOVER[size],\n };\n}\n\n/**\n * Icon reveal — a 1:1 port of the source \"Arrow Right\" instance: collapsed and\n * invisible at rest (opacity 0, 1×10px), grown to full size on hover (opacity 1,\n * 20×21px). The child inherits the pill's `rest`/`hover` variant label, so it\n * springs in perfect lockstep with the sheen and gap.\n */\nconst EFFECT_ICON_VARIANTS = {\n rest: { opacity: 0, width: 1, height: 10 },\n hover: { opacity: 1, width: 20, height: 21 },\n} as const;\n\nfunction EffectSlot({\n position,\n children,\n}: {\n position: \"prefix\" | \"suffix\";\n children: ReactNode;\n}) {\n return (\n <motion.span\n data-icon={position}\n variants={EFFECT_ICON_VARIANTS}\n transition={EFFECT_SPRING}\n style={{\n display: \"inline-flex\",\n flex: \"none\",\n alignItems: \"center\",\n overflow: \"hidden\",\n }}\n className=\"pointer-events-none [&>svg]:block [&>svg]:size-full\"\n >\n {children}\n </motion.span>\n );\n}\n\nfunction renderEffectSlot(icon: Slottable, position: \"prefix\" | \"suffix\") {\n if (icon == null || icon === false) return null;\n if (isReactComponent(icon)) {\n const Icon = icon;\n return (\n <EffectSlot position={position}>\n <Icon />\n </EffectSlot>\n );\n }\n if (isValidElement(icon))\n return <EffectSlot position={position}>{icon}</EffectSlot>;\n return null;\n}\n\nfunction effectButtonInner({\n svgOnly,\n loading,\n prefix,\n suffix,\n children,\n}: Pick<\n EffectButtonBaseProps,\n \"svgOnly\" | \"loading\" | \"prefix\" | \"suffix\" | \"children\"\n>) {\n // An icon-only button keeps its icon always visible (nothing to reveal).\n if (svgOnly) return loading ? <Spinner /> : children;\n return (\n <>\n {loading ? (\n <Slot position=\"loading\">\n <Spinner />\n </Slot>\n ) : (\n renderEffectSlot(prefix, \"prefix\")\n )}\n {children != null && children !== false && (\n <span data-text className=\"px-0.5\">\n {children}\n </span>\n )}\n {renderEffectSlot(suffix, \"suffix\")}\n </>\n );\n}\n\n/** Motion props (initial/animate/hover/variants/transition) shared by both roots. */\nfunction effectMotionProps(\n size: EffectButtonSize,\n variant: EffectButtonVariant,\n inert: boolean | undefined,\n) {\n return {\n initial: false as const,\n animate: \"rest\",\n // Browsers still dispatch pointerenter on a disabled <button>, so Motion's\n // hover gesture would run the sheen / gap / icon-reveal springs on a pill\n // that must read as inert. Omitting `whileHover` while disabled or loading\n // is Motion's intended off-switch: the gesture never engages (no inline\n // styles mutate), an in-flight hover springs back to `rest`, and restoring\n // the prop re-arms hover in place — no remount, no rest-state change.\n whileHover: inert ? undefined : \"hover\",\n variants: effectRootVariants(size, variant),\n transition: EFFECT_SPRING,\n };\n}\n\n// Motion redefines these DOM handlers; drop them from our public props so\n// spreading onto a motion element type-checks cleanly.\ntype MotionConflicts =\n | \"onAnimationStart\"\n | \"onAnimationEnd\"\n | \"onAnimationIteration\"\n | \"onDrag\"\n | \"onDragStart\"\n | \"onDragEnd\"\n | \"onDragEnter\"\n | \"onDragExit\"\n | \"onDragLeave\"\n | \"onDragOver\"\n | \"onDrop\"\n | \"style\";\n\ninterface EffectButtonBaseProps {\n /** Emphasis variant. @default \"primary\" */\n variant?: EffectButtonVariant;\n /** Size variant. @default \"md\" */\n size?: EffectButtonSize;\n /** Stretch to the container's full width (stacked login / OAuth pills). */\n fullWidth?: boolean;\n /** Slot before the label — a component (`Plus`) or element (`<Plus />`). */\n prefix?: Slottable;\n /** Slot after the label. */\n suffix?: Slottable;\n /** Render as an icon-only button. Requires an `aria-label`. */\n svgOnly?: boolean;\n /** Show a spinner and block interaction while staying readable. */\n loading?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\nexport interface EffectButtonProps\n extends\n EffectButtonBaseProps,\n Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n keyof EffectButtonBaseProps | MotionConflicts\n > {\n ref?: Ref<HTMLButtonElement>;\n}\n\nexport interface EffectButtonLinkProps\n extends\n EffectButtonBaseProps,\n Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n keyof EffectButtonBaseProps | MotionConflicts\n > {\n /** Navigate to this URL (rendered via the host's `LinkProvider`). */\n href: string;\n /** Visually and semantically disable the link. */\n disabled?: boolean;\n}\n\n/**\n * EffectButton — the glossy, springy pill ported frame-for-frame from Photon's\n * Framer \"Button - Effect\", driven by Motion. `variant=\"secondary\"` swaps the\n * brand fill for the neutral white-card surface without the sheen (the login /\n * OAuth pill), and `fullWidth` stretches the pill across its container.\n * Triggers an action; for navigation use {@link EffectButtonLink}.\n */\nexport function EffectButton({\n variant = \"primary\",\n size = \"md\",\n fullWidth,\n prefix,\n suffix,\n svgOnly,\n loading,\n children,\n className,\n ref,\n ...props\n}: EffectButtonProps) {\n warnMissingLabel(svgOnly, props[\"aria-label\"]);\n return (\n <motion.button\n ref={ref}\n type=\"button\"\n {...effectMotionProps(size, variant, props.disabled || loading)}\n {...props}\n aria-busy={loading || undefined}\n data-loading={loading ? \"true\" : undefined}\n data-svg-only={svgOnly ? \"true\" : undefined}\n className={cn(\n effectButtonVariants({ variant, size, fullWidth }),\n loading && \"pointer-events-none\",\n svgOnly && \"[&>svg]:size-5 [&>svg]:shrink-0\",\n className,\n )}\n >\n {effectButtonInner({ svgOnly, loading, prefix, suffix, children })}\n </motion.button>\n );\n}\n\nEffectButton.displayName = \"EffectButton\";\n\n/**\n * EffectButtonLink — {@link EffectButton} as a link, for navigation that changes\n * the URL. Renders the host router's link (via `LinkProvider`) wrapped by Motion,\n * so the pill animates identically to the button.\n */\nexport function EffectButtonLink({\n variant = \"primary\",\n size = \"md\",\n fullWidth,\n prefix,\n suffix,\n svgOnly,\n loading,\n disabled,\n href,\n children,\n className,\n ...props\n}: EffectButtonLinkProps) {\n warnMissingLabel(svgOnly, props[\"aria-label\"]);\n const Link = useLinkComponent();\n // Wrap the host link once per link identity so Motion can drive the DOM node.\n const MotionLink = useMemo(() => motion.create(Link), [Link]);\n return (\n <MotionLink\n href={href}\n {...effectMotionProps(size, variant, disabled || loading)}\n {...(props as HTMLMotionProps<\"a\">)}\n aria-disabled={disabled || loading || undefined}\n aria-busy={loading || undefined}\n data-loading={loading ? \"true\" : undefined}\n data-svg-only={svgOnly ? \"true\" : undefined}\n className={cn(\n effectButtonVariants({ variant, size, fullWidth }),\n loading && \"pointer-events-none\",\n svgOnly && \"[&>svg]:size-5 [&>svg]:shrink-0\",\n className,\n )}\n >\n {effectButtonInner({ svgOnly, loading, prefix, suffix, children })}\n </MotionLink>\n );\n}\n\nEffectButtonLink.displayName = \"EffectButtonLink\";\n"],"mappings":";;;;;;;AA4BA,IAAM,IAAc,EAClB,8NAEA,6IACF,GAGa,IAAe;AAAA,EAC1B,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF,GAGa,IAAgB;AAAA,EAC3B,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF,GAGa,IAAkB;AAAA,EAC7B,SAAS;AAAA,IACP,SACE;AAAA,IACF,aAAa;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACT,SACE;AAAA,IACF,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,SACE;A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QAAA;AAAA,MAAQ,QAAA;AAAA,MAAQ,UAAA;AAAA,IAAS,CAAC;AAAA,EACvD,CAAA;AAEhB;AAEA,EAAiB,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog-BSBF1Wyq.js","names":[],"sources":["../../src/components/dialog/dialog.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType, type ReactNode } from \"react\";\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { cn } from \"../../utils/cn\";\nimport { CloseButton } from \"../button/close-button\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseDialog.Root;\nconst Trigger = BaseDialog.Trigger;\nconst Portal = BaseDialog.Portal;\nconst Close = BaseDialog.Close;\n\nfunction Backdrop({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Backdrop>) {\n return (\n <BaseDialog.Backdrop\n className={cn(\n \"bg-pho-overlay fixed inset-0 z-50 backdrop-blur-[2px] transition-opacity duration-200 ease-out\",\n \"data-[ending-style]:opacity-0 data-[starting-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseDialog.Popup>) {\n return (\n <BaseDialog.Popup\n className={cn(\n \"squircle border-pho-interactive bg-pho-primary shadow-pho-xl fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-2xl border outline-none\",\n \"transition-all duration-200 ease-out\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseDialog.Title>) {\n return (\n <BaseDialog.Title\n className={cn(\"text-pho-primary text-lg font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Description>) {\n return (\n <BaseDialog.Description\n className={cn(\"text-pho-tertiary text-sm\", className)}\n {...props}\n />\n );\n}\n\ninterface ContentProps extends Omit<\n StyledProps<typeof BaseDialog.Popup>,\n \"title\"\n> {\n /** Heading rendered in the panel header. */\n title?: ReactNode;\n /** Supporting text under the title. */\n description?: ReactNode;\n /** Show the top-right close button. @default true */\n showClose?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Convenience panel: renders the portal, backdrop, and styled popup with an\n * optional header (title/description + close). For full control, compose the\n * parts directly (`Dialog.Portal` / `Dialog.Backdrop` / `Dialog.Popup`).\n */\nfunction Content({\n title,\n description,\n showClose = true,\n children,\n className,\n ...props\n}: ContentProps) {\n const hasHeader = Boolean(title || description || showClose);\n return (\n <Portal>\n <Backdrop />\n <Popup className={className} {...props}>\n {hasHeader && (\n <div className=\"flex items-start justify-between gap-4 px-6 pt-5\">\n <div className=\"flex flex-col gap-1\">\n {title && <Title>{title}</Title>}\n {description && <Description>{description}</Description>}\n </div>\n {showClose && <Close render={<CloseButton />} />}\n </div>\n )}\n <div className=\"px-6 py-5\">{children}</div>\n </Popup>\n </Portal>\n );\n}\n\n/**\n * Modal dialog built on Base UI `Dialog`. Controlled or uncontrolled via\n * `Dialog.Root` (`open` / `onOpenChange` / `defaultOpen`).\n */\nexport const Dialog = {\n Root,\n Trigger,\n Portal,\n Backdrop,\n Popup,\n Title,\n Description,\n Close,\n Content,\n};\n"],"mappings":";;;;;;AAaA,IAAM,IAAO,EAAW,MAClB,IAAU,EAAW,SACrB,IAAS,EAAW,QACpB,IAAQ,EAAW;AAEzB,SAAS,EAAS,EAChB,WAAA,GACA,GAAG,EAAA,GACuC;AAC1C,SACE,gBAAA,EAAC,EAAW,UAAZ;AAAA,IACE,WAAW,EACT,kGACA,iEACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,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;AAAA,EACpB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-aZqjjV_m.js","names":[],"sources":["../../src/components/input/input.tsx"],"sourcesContent":["import {\n useState,\n type ComponentType,\n type InputHTMLAttributes,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { Eye, EyeSlash, WarningCircle } from \"@phosphor-icons/react\";\nimport { Field } from \"@base-ui/react/field\";\nimport { cn } from \"../../utils/cn\";\n\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\n\nconst SIZE_PAD: Record<InputSize, string> = {\n sm: \"px-3 py-2 text-sm\",\n md: \"px-3 py-2 text-md\",\n lg: \"px-3.5 py-2.5 text-md\",\n};\nconst LEADING_PAD: Record<InputSize, string> = {\n sm: \"pl-9\",\n md: \"pl-10\",\n lg: \"pl-10.5\",\n};\nconst LEADING_ICON_POS: Record<InputSize, string> = {\n sm: \"left-3 size-4\",\n md: \"left-3 size-5\",\n lg: \"left-3.5 size-5\",\n};\n\nexport interface InputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"size\"\n> {\n /** Field label (associated for accessibility). */\n label?: ReactNode;\n /** Helper text below the field; rendered in the error color when `invalid`. */\n hint?: ReactNode;\n /** Size variant. @default \"md\" */\n size?: InputSize;\n /** Render the invalid state (ring + icon + error-colored hint). */\n invalid?: boolean;\n /** Leading icon component (e.g. a Phosphor icon). */\n icon?: ComponentType<{ className?: string }>;\n /** Node rendered at the right edge of the label row (e.g. \"Forgot?\"). */\n labelTrailing?: ReactNode;\n /** Class applied to the input wrapper. */\n wrapperClassName?: string;\n ref?: Ref<HTMLInputElement>;\n}\n\n/**\n * Text input built on Base UI `Field` (label/description a11y wiring) with\n * Pho's bordered surface, leading icon, invalid state, and a built-in password\n * reveal toggle.\n */\nexport function Input({\n label,\n hint,\n size = \"md\",\n invalid,\n icon: Icon,\n labelTrailing,\n disabled,\n required,\n type = \"text\",\n className,\n wrapperClassName,\n id,\n ref,\n ...props\n}: InputProps) {\n const [reveal, setReveal] = useState(false);\n const isPassword = type === \"password\";\n const resolvedType = isPassword && reveal ? \"text\" : type;\n const hasLeadingIcon = Boolean(Icon);\n const hasTrailingIcon = isPassword || invalid;\n\n return (\n <Field.Root\n disabled={disabled}\n className=\"group/field flex w-full flex-col gap-1.5\"\n >\n {label && (\n <div className=\"flex items-center justify-between gap-2\">\n <Field.Label className=\"text-pho-secondary flex cursor-default items-center gap-0.5 text-sm font-medium\">\n {label}\n {required && <span className=\"text-pho-brand\">*</span>}\n </Field.Label>\n {labelTrailing}\n </div>\n )}\n\n <div\n data-invalid={invalid || undefined}\n className={cn(\n \"bg-pho-primary shadow-pho-xs ring-pho-primary relative flex w-full items-center rounded-lg ring-1 transition-shadow duration-100 ease-linear ring-inset\",\n \"has-[input:focus-visible]:ring-pho-brand has-[input:focus-visible]:ring-2\",\n \"data-[invalid]:ring-pho-error-subtle data-[invalid]:has-[input:focus-visible]:ring-pho-error\",\n \"group-data-[disabled]/field:cursor-not-allowed group-data-[disabled]/field:opacity-50\",\n wrapperClassName,\n )}\n >\n {Icon && (\n <Icon\n className={cn(\n \"text-fg-pho-quaternary pointer-events-none absolute\",\n LEADING_ICON_POS[size],\n )}\n />\n )}\n\n <Field.Control\n ref={ref}\n id={id}\n type={resolvedType}\n required={required}\n {...props}\n className={cn(\n \"text-pho-primary placeholder:text-pho-placeholder m-0 w-full bg-transparent outline-none disabled:cursor-not-allowed\",\n SIZE_PAD[size],\n hasLeadingIcon && LEADING_PAD[size],\n hasTrailingIcon && \"pr-9\",\n className,\n )}\n />\n\n {invalid && !isPassword && (\n <WarningCircle\n weight=\"fill\"\n className=\"text-fg-pho-error pointer-events-none absolute right-3 size-4\"\n />\n )}\n\n {isPassword && (\n <button\n type=\"button\"\n // Reachable by click but skipped in tab order so Tab moves field→field.\n tabIndex={-1}\n aria-label=\"Toggle password visibility\"\n onClick={() => setReveal((v) => !v)}\n className=\"text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover absolute right-3 flex cursor-pointer items-center transition duration-100 ease-linear focus:outline-none\"\n >\n {reveal ? (\n <EyeSlash className=\"size-4\" />\n ) : (\n <Eye className=\"size-4\" />\n )}\n </button>\n )}\n </div>\n\n {hint && (\n <Field.Description\n className={cn(\n \"text-pho-tertiary text-sm\",\n invalid && \"text-pho-error\",\n )}\n >\n {hint}\n </Field.Description>\n )}\n </Field.Root>\n );\n}\n\nInput.displayName = \"Input\";\n"],"mappings":";;;;;;AAaA,IAAM,IAAsC;AAAA,EAC1C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GACM,IAAyC;AAAA,EAC7C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GACM,IAA8C;AAAA,EAClD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AA4BA,SAAgB,EAAM,EACpB,OAAA,GACA,MAAA,GACA,MAAA,IAAO,MACP,SAAA,GACA,MAAM,GACN,eAAA,GACA,UAAA,GACA,UAAA,GACA,MAAA,IAAO,QACP,WAAA,GACA,kBAAA,GACA,IAAA,GACA,KAAA,GACA,GAAG,EAAA,GACU;AACb,QAAM,CAAC,GAAQ,CAAA,IAAa,EAAS,EAAK,GACpC,IAAa,MAAS,YACtB,IAAe,KAAc,IAAS,SAAS,GAC/C,IAAiB,EAAQ,GACzB,IAAkB,KAAc;AAEtC,SACE,gBAAA,EAAC,EAAM,MAAP;AAAA,IACY,UAAA;AAAA,IACV,WAAU;AAAA,cAFZ;AAAA,MAIG,KACC,gBAAA,EAAC,OAAD;AAAA,QAAK,WAAU;AAAA,kBAAf,CACE,gBAAA,EAAC,EAAM,OAAP;AAAA,UAAa,WAAU;AAAA,oBAAvB,CACG,GACA,KAAY,gBAAA,EAAC,QAAD;AAAA,YAAM,WAAU;AAAA,sBAAiB;AAAA,UAAO,CAAA,CAC1C;AAAA,YACZ,CACE;AAAA;MAGP,gBAAA,EAAC,OAAD;AAAA,QACE,gBAAc,KAAW;AAAA,QACzB,WAAW,EACT,2JACA,6EACA,gGACA,yFACA,CACF;AAAA,kBARF;AAAA,UAUG,KACC,gBAAA,EAAC,GAAD,EACE,WAAW,EACT,uDACA,EAAiB,CAAA,CACnB,EACD,CAAA;AAAA,UAGH,gBAAA,EAAC,EAAM,SAAP;AAAA,YACO,KAAA;AAAA,YACD,IAAA;AAAA,YACJ,MAAM;AAAA,YACI,UAAA;AAAA,YACV,GAAI;AAAA,YACJ,WAAW,EACT,wHACA,EAAS,CAAA,GACT,KAAkB,EAAY,CAAA,GAC9B,KAAmB,QACnB,CACF;AAAA,UACD,CAAA;AAAA,UAEA,KAAW,CAAC,KACX,gBAAA,EAAC,GAAD;AAAA,YACE,QAAO;AAAA,YACP,WAAU;AAAA,UACX,CAAA;AAAA,UAGF,KACC,gBAAA,EAAC,UAAD;AAAA,YACE,MAAK;AAAA,YAEL,UAAU;AAAA,YACV,cAAW;AAAA,YACX,SAAA,MAAe,EAAA,CAAW,MAAM,CAAC,CAAC;AAAA,YAClC,WAAU;AAAA,sBAET,IACC,gBAAA,EAAC,GAAD,EAAU,WAAU,SAAU,CAAA,IAE9B,gBAAA,EAAC,GAAD,EAAK,WAAU,SAAU,CAAA;AAAA,UAErB,CAAA;AAAA,QAEP;AAAA;MAEJ,KACC,gBAAA,EAAC,EAAM,aAAP;AAAA,QACE,WAAW,EACT,6BACA,KAAW,gBACb;AAAA,kBAEC;AAAA,MACgB,CAAA;AAAA,IAEX;AAAA;AAEhB;AAEA,EAAM,cAAc"}
@@ -1,101 +0,0 @@
1
- "use client";
2
- import { t as a } from "./cn-D6jQqeRj.js";
3
- import "react";
4
- import { jsx as o } from "react/jsx-runtime";
5
- import { Menu as r } from "@base-ui/react/menu";
6
- import { Separator as p } from "@base-ui/react/separator";
7
- var u = "squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive origin-[var(--transform-origin)] min-w-44 rounded-xl p-1 ring-1 ring-inset outline-none transition-[transform,opacity] duration-150 ease-out data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0", n = "relative flex cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2.5 text-sm text-pho-secondary outline-none select-none data-[highlighted]:bg-pho-secondary data-[highlighted]:text-pho-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:text-fg-pho-quaternary", c = r.Root, m = r.Trigger, l = r.Portal, d = r.Group, g = r.RadioGroup, h = r.SubmenuRoot;
8
- function f({ className: t, sideOffset: e = 6, ...s }) {
9
- return /* @__PURE__ */ o(r.Positioner, {
10
- sideOffset: e,
11
- className: a("z-50", t),
12
- ...s
13
- });
14
- }
15
- function x({ className: t, ...e }) {
16
- return /* @__PURE__ */ o(r.Popup, {
17
- className: a(u, t),
18
- ...e
19
- });
20
- }
21
- function y({ className: t, ...e }) {
22
- return /* @__PURE__ */ o(r.Item, {
23
- className: a(n, t),
24
- ...e
25
- });
26
- }
27
- function b({ className: t, ...e }) {
28
- return /* @__PURE__ */ o(r.LinkItem, {
29
- className: a(n, t),
30
- ...e
31
- });
32
- }
33
- function I({ className: t, ...e }) {
34
- return /* @__PURE__ */ o(r.GroupLabel, {
35
- className: a("text-pho-quaternary px-2.5 py-1.5 text-xs font-medium", t),
36
- ...e
37
- });
38
- }
39
- function v({ className: t, ...e }) {
40
- return /* @__PURE__ */ o(p, {
41
- className: a("-mx-1 my-1 h-px bg-[var(--border-color-pho-secondary)]", t),
42
- ...e
43
- });
44
- }
45
- function N({ className: t, ...e }) {
46
- return /* @__PURE__ */ o(r.SubmenuTrigger, {
47
- className: a(n, "data-[popup-open]:bg-pho-secondary", t),
48
- ...e
49
- });
50
- }
51
- function R({ className: t, ...e }) {
52
- return /* @__PURE__ */ o(r.CheckboxItem, {
53
- className: a(n, "pl-8", t),
54
- ...e
55
- });
56
- }
57
- function P({ className: t, ...e }) {
58
- return /* @__PURE__ */ o(r.RadioItem, {
59
- className: a(n, "pl-8", t),
60
- ...e
61
- });
62
- }
63
- var i = "text-pho-brand absolute left-2.5 flex items-center [&>svg]:size-4";
64
- function C({ className: t, ...e }) {
65
- return /* @__PURE__ */ o(r.CheckboxItemIndicator, {
66
- className: a(i, t),
67
- ...e
68
- });
69
- }
70
- function S({ className: t, ...e }) {
71
- return /* @__PURE__ */ o(r.RadioItemIndicator, {
72
- className: a(i, t),
73
- ...e
74
- });
75
- }
76
- var L = {
77
- Root: c,
78
- Trigger: m,
79
- Portal: l,
80
- Positioner: f,
81
- Popup: x,
82
- Item: y,
83
- LinkItem: b,
84
- Group: d,
85
- GroupLabel: I,
86
- Separator: v,
87
- SubmenuRoot: h,
88
- SubmenuTrigger: N,
89
- CheckboxItem: R,
90
- CheckboxItemIndicator: C,
91
- RadioGroup: g,
92
- RadioItem: P,
93
- RadioItemIndicator: S
94
- };
95
- export {
96
- u as n,
97
- L as r,
98
- n as t
99
- };
100
-
101
- //# sourceMappingURL=menu-BkzDbNuX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-BkzDbNuX.js","names":[],"sources":["../../src/components/menu/menu.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** Shared popup + item styles, reused by `ContextMenu` and `Menubar` menus. */\nexport const MENU_POPUP =\n \"squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-interactive origin-[var(--transform-origin)] min-w-44 rounded-xl p-1 ring-1 ring-inset outline-none transition-[transform,opacity] duration-150 ease-out data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0\";\nexport const MENU_ITEM =\n \"relative flex cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2.5 text-sm text-pho-secondary outline-none select-none data-[highlighted]:bg-pho-secondary data-[highlighted]:text-pho-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:text-fg-pho-quaternary\";\n\nconst Root = BaseMenu.Root;\nconst Trigger = BaseMenu.Trigger;\nconst Portal = BaseMenu.Portal;\nconst Group = BaseMenu.Group;\nconst RadioGroup = BaseMenu.RadioGroup;\nconst SubmenuRoot = BaseMenu.SubmenuRoot;\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseMenu.Positioner>) {\n return (\n <BaseMenu.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseMenu.Popup>) {\n return <BaseMenu.Popup className={cn(MENU_POPUP, className)} {...props} />;\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseMenu.Item>) {\n return <BaseMenu.Item className={cn(MENU_ITEM, className)} {...props} />;\n}\n\nfunction LinkItem({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.LinkItem>) {\n return <BaseMenu.LinkItem className={cn(MENU_ITEM, className)} {...props} />;\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.GroupLabel>) {\n return (\n <BaseMenu.GroupLabel\n className={cn(\n \"text-pho-quaternary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Separator({ className, ...props }: StyledProps<typeof BaseSeparator>) {\n return (\n <BaseSeparator\n className={cn(\n \"-mx-1 my-1 h-px bg-[var(--border-color-pho-secondary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SubmenuTrigger({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.SubmenuTrigger>) {\n return (\n <BaseMenu.SubmenuTrigger\n className={cn(MENU_ITEM, \"data-[popup-open]:bg-pho-secondary\", className)}\n {...props}\n />\n );\n}\n\nfunction CheckboxItem({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.CheckboxItem>) {\n return (\n <BaseMenu.CheckboxItem\n className={cn(MENU_ITEM, \"pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction RadioItem({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.RadioItem>) {\n return (\n <BaseMenu.RadioItem\n className={cn(MENU_ITEM, \"pl-8\", className)}\n {...props}\n />\n );\n}\n\nconst CHECK_INDICATOR =\n \"text-pho-brand absolute left-2.5 flex items-center [&>svg]:size-4\";\n\nfunction CheckboxItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.CheckboxItemIndicator>) {\n return (\n <BaseMenu.CheckboxItemIndicator\n className={cn(CHECK_INDICATOR, className)}\n {...props}\n />\n );\n}\n\nfunction RadioItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.RadioItemIndicator>) {\n return (\n <BaseMenu.RadioItemIndicator\n className={cn(CHECK_INDICATOR, className)}\n {...props}\n />\n );\n}\n\n/**\n * Dropdown menu built on Base UI `Menu` — a list of actions opened from a\n * trigger. Supports grouped items, separators, submenus\n * (`SubmenuRoot` + `SubmenuTrigger`), and stateful `CheckboxItem` /\n * `RadioItem`s. For a right-click menu use `ContextMenu`.\n */\nexport const Menu = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Item,\n LinkItem,\n Group,\n GroupLabel,\n Separator,\n SubmenuRoot,\n SubmenuTrigger,\n CheckboxItem,\n CheckboxItemIndicator,\n RadioGroup,\n RadioItem,\n RadioItemIndicator,\n};\n"],"mappings":";;;;;;AAcA,IAAa,IACX,sVACW,IACX,4TAEI,IAAO,EAAS,MAChB,IAAU,EAAS,SACnB,IAAS,EAAS,QAClB,IAAQ,EAAS,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