@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.
- package/dist/chunks/IconCheck-D2WuculQ.js +11 -0
- package/dist/chunks/IconCheck-D2WuculQ.js.map +1 -0
- package/dist/chunks/card-9cGnv-VD.js +56 -0
- package/dist/chunks/card-9cGnv-VD.js.map +1 -0
- package/dist/chunks/{close-button-8f-oRJXt.js → close-button-Bq9f-H15.js} +256 -181
- package/dist/chunks/close-button-Bq9f-H15.js.map +1 -0
- package/dist/chunks/{dialog-Bgb2Z1_v.js → dialog-DolPKFGS.js} +2 -2
- package/dist/chunks/{dialog-Bgb2Z1_v.js.map → dialog-DolPKFGS.js.map} +1 -1
- package/dist/chunks/{input-BSJGBUbf.js → input-CxS7ndpb.js} +7 -7
- package/dist/chunks/input-CxS7ndpb.js.map +1 -0
- package/dist/chunks/input-group-D6dlma8k.js +85 -0
- package/dist/chunks/input-group-D6dlma8k.js.map +1 -0
- package/dist/chunks/{menu-Dan0oRvL.js → menu-BSXds3Rt.js} +2 -2
- package/dist/chunks/{menu-Dan0oRvL.js.map → menu-BSXds3Rt.js.map} +1 -1
- package/dist/chunks/settings-B0vhLoMi.js +134 -0
- package/dist/chunks/settings-B0vhLoMi.js.map +1 -0
- package/dist/chunks/sidebar-BCqq58hV.js +177 -0
- package/dist/chunks/sidebar-BCqq58hV.js.map +1 -0
- package/dist/chunks/use-press-pulse-CMwPTOR2.js +44 -0
- package/dist/chunks/use-press-pulse-CMwPTOR2.js.map +1 -0
- package/dist/components/button.js +1 -1
- package/dist/components/card.js +6 -0
- package/dist/components/checkbox.js +33 -28
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/context-menu.js +2 -2
- package/dist/components/dialog.js +1 -1
- package/dist/components/field.js +17 -17
- package/dist/components/field.js.map +1 -1
- package/dist/components/input-group.js +5 -0
- package/dist/components/input.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/select.js +83 -39
- package/dist/components/select.js.map +1 -1
- package/dist/components/skeleton.js +18 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/index.js +44 -27
- package/dist/primitives.js +1 -1
- package/dist/sections/settings.js +8 -0
- package/dist/sections/sidebar.js +8 -5
- package/dist/src/components/card/card.d.ts +75 -0
- package/dist/src/components/card/index.d.ts +1 -0
- package/dist/src/components/checkbox/checkbox.d.ts +5 -1
- package/dist/src/components/input-group/index.d.ts +1 -0
- package/dist/src/components/input-group/input-group.d.ts +57 -0
- package/dist/src/components/select/index.d.ts +1 -1
- package/dist/src/components/select/select.d.ts +29 -10
- package/dist/src/components/skeleton/index.d.ts +1 -0
- package/dist/src/components/skeleton/skeleton.d.ts +11 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/sections/settings/index.d.ts +1 -0
- package/dist/src/sections/settings/settings.d.ts +170 -0
- package/dist/src/sections/sidebar/index.d.ts +1 -1
- package/dist/src/sections/sidebar/sidebar.d.ts +25 -6
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/use-press-pulse.d.ts +37 -0
- package/dist/utils.js +12 -8
- package/package.json +17 -1
- package/src/styles/theme.css +18 -4
- package/dist/chunks/close-button-8f-oRJXt.js.map +0 -1
- package/dist/chunks/input-BSJGBUbf.js.map +0 -1
- package/dist/chunks/sidebar-Buhva5xa.js +0 -164
- 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
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
6
|
-
import { t as
|
|
7
|
-
import { isValidElement as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { motion as
|
|
10
|
-
var
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
|
85
|
-
const { variant:
|
|
86
|
-
return p(
|
|
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
|
|
89
|
-
function
|
|
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:
|
|
93
|
-
children:
|
|
92
|
+
className: ie,
|
|
93
|
+
children: a
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return e == null || e === !1 ? null :
|
|
98
|
-
position:
|
|
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
|
-
}) :
|
|
101
|
-
position:
|
|
100
|
+
}) : A(e) ? /* @__PURE__ */ t(w, {
|
|
101
|
+
position: a,
|
|
102
102
|
children: e
|
|
103
103
|
}) : null;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
e && !
|
|
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
|
|
108
|
+
var V = {
|
|
109
109
|
type: "spring",
|
|
110
110
|
stiffness: 200,
|
|
111
111
|
damping: 30,
|
|
112
112
|
mass: 0.1
|
|
113
|
-
},
|
|
113
|
+
}, le = {
|
|
114
114
|
"--pho-sheen-y": "0px",
|
|
115
115
|
"--pho-sheen-blur": "5px",
|
|
116
116
|
"--pho-sheen-spread": "2px"
|
|
117
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
|
192
|
-
return /* @__PURE__ */ t(
|
|
268
|
+
function N({ position: e, size: a, children: o }) {
|
|
269
|
+
return /* @__PURE__ */ t(S.span, {
|
|
193
270
|
"data-icon": e,
|
|
194
|
-
variants:
|
|
195
|
-
transition:
|
|
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
|
|
283
|
+
function O(e, a, o) {
|
|
207
284
|
if (!(e == null || e === !1))
|
|
208
|
-
return
|
|
209
|
-
position:
|
|
285
|
+
return I(e) ? /* @__PURE__ */ t(N, {
|
|
286
|
+
position: a,
|
|
210
287
|
size: o,
|
|
211
288
|
children: /* @__PURE__ */ t(e, {})
|
|
212
|
-
}) :
|
|
213
|
-
position:
|
|
289
|
+
}) : A(e) ? /* @__PURE__ */ t(N, {
|
|
290
|
+
position: a,
|
|
214
291
|
size: o,
|
|
215
292
|
children: e
|
|
216
|
-
}) : /* @__PURE__ */ t(
|
|
217
|
-
position:
|
|
293
|
+
}) : /* @__PURE__ */ t(N, {
|
|
294
|
+
position: a,
|
|
218
295
|
size: o,
|
|
219
296
|
children: e
|
|
220
297
|
});
|
|
221
298
|
}
|
|
222
|
-
function
|
|
223
|
-
if (e) return
|
|
224
|
-
const
|
|
225
|
-
return /* @__PURE__ */
|
|
226
|
-
|
|
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(
|
|
229
|
-
}) :
|
|
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
|
-
|
|
312
|
+
i ? O(r, "suffix", l) : B(r, "suffix")
|
|
236
313
|
] });
|
|
237
314
|
}
|
|
238
|
-
function
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
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 && (
|
|
326
|
+
return o.iconReveal && (r.gap = 0, n.gap = e === "lg" ? 4 : 0), {
|
|
247
327
|
initial: !1,
|
|
248
|
-
animate: "rest",
|
|
249
|
-
whileHover:
|
|
250
|
-
whileTap:
|
|
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:
|
|
332
|
+
rest: r,
|
|
253
333
|
hover: n,
|
|
254
|
-
press:
|
|
334
|
+
press: s,
|
|
335
|
+
wake: l
|
|
255
336
|
},
|
|
256
|
-
transition:
|
|
337
|
+
transition: V
|
|
257
338
|
};
|
|
258
339
|
}
|
|
259
|
-
function
|
|
260
|
-
return p(
|
|
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:
|
|
343
|
+
color: a,
|
|
263
344
|
size: o,
|
|
264
|
-
shape:
|
|
265
|
-
}), n && "pointer-events-none",
|
|
345
|
+
shape: r
|
|
346
|
+
}), n && "pointer-events-none", s && "[&>svg]:size-[1.25em] [&>svg]:shrink-0", l);
|
|
266
347
|
}
|
|
267
|
-
function
|
|
268
|
-
|
|
269
|
-
const
|
|
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:
|
|
352
|
+
color: a,
|
|
272
353
|
size: o,
|
|
273
|
-
shape:
|
|
274
|
-
loading:
|
|
275
|
-
svgOnly:
|
|
276
|
-
className: p(
|
|
277
|
-
}),
|
|
278
|
-
svgOnly:
|
|
279
|
-
loading:
|
|
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:
|
|
362
|
+
suffix: s,
|
|
282
363
|
children: b,
|
|
283
|
-
iconReveal:
|
|
364
|
+
iconReveal: u,
|
|
284
365
|
size: o
|
|
285
366
|
});
|
|
286
|
-
return
|
|
287
|
-
ref:
|
|
367
|
+
return /* @__PURE__ */ t(S.button, {
|
|
368
|
+
ref: _,
|
|
288
369
|
type: "button",
|
|
289
|
-
...
|
|
290
|
-
sheen:
|
|
291
|
-
iconReveal:
|
|
370
|
+
...H(o, m, {
|
|
371
|
+
sheen: h,
|
|
372
|
+
iconReveal: u,
|
|
373
|
+
waking: f
|
|
292
374
|
}),
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
"
|
|
296
|
-
"data-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
|
|
311
|
-
function
|
|
312
|
-
|
|
313
|
-
const
|
|
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:
|
|
390
|
+
color: a,
|
|
316
391
|
size: o,
|
|
317
|
-
shape:
|
|
318
|
-
loading:
|
|
319
|
-
svgOnly:
|
|
320
|
-
className: p(
|
|
321
|
-
}),
|
|
322
|
-
svgOnly:
|
|
323
|
-
loading:
|
|
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:
|
|
326
|
-
children:
|
|
327
|
-
iconReveal:
|
|
400
|
+
suffix: s,
|
|
401
|
+
children: _,
|
|
402
|
+
iconReveal: f,
|
|
328
403
|
size: o
|
|
329
|
-
}),
|
|
330
|
-
...
|
|
331
|
-
...
|
|
332
|
-
"aria-disabled":
|
|
333
|
-
"aria-busy":
|
|
334
|
-
"data-loading":
|
|
335
|
-
"data-svg-only":
|
|
336
|
-
className:
|
|
337
|
-
tabIndex:
|
|
338
|
-
onClick:
|
|
339
|
-
|
|
340
|
-
} :
|
|
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
|
|
343
|
-
...
|
|
344
|
-
children:
|
|
345
|
-
}) :
|
|
346
|
-
...
|
|
347
|
-
sheen:
|
|
348
|
-
iconReveal:
|
|
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
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
children: _
|
|
426
|
+
onAnimationComplete: G,
|
|
427
|
+
"data-waking": T || void 0,
|
|
428
|
+
...R,
|
|
429
|
+
children: x
|
|
355
430
|
});
|
|
356
431
|
}
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
function
|
|
360
|
-
const { size:
|
|
361
|
-
return
|
|
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:
|
|
364
|
-
className: p(o && "w-full",
|
|
438
|
+
size: a,
|
|
439
|
+
className: p(o && "w-full", r)
|
|
365
440
|
});
|
|
366
441
|
}
|
|
367
|
-
function
|
|
368
|
-
return /* @__PURE__ */ t(
|
|
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:
|
|
372
|
-
className: p(
|
|
373
|
-
...
|
|
446
|
+
iconReveal: r ?? o ?? !0,
|
|
447
|
+
className: p(a && "w-full", n),
|
|
448
|
+
...s
|
|
374
449
|
});
|
|
375
450
|
}
|
|
376
|
-
|
|
377
|
-
function
|
|
378
|
-
return /* @__PURE__ */ t(
|
|
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:
|
|
382
|
-
className: p(
|
|
383
|
-
...
|
|
456
|
+
iconReveal: r ?? o ?? !0,
|
|
457
|
+
className: p(a && "w-full", n),
|
|
458
|
+
...s
|
|
384
459
|
});
|
|
385
460
|
}
|
|
386
|
-
|
|
387
|
-
var
|
|
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
|
|
467
|
+
function be({ size: e = "sm", label: a, className: o, ...r }) {
|
|
393
468
|
return /* @__PURE__ */ t("button", {
|
|
394
469
|
type: "button",
|
|
395
|
-
"aria-label":
|
|
396
|
-
...
|
|
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",
|
|
398
|
-
children: /* @__PURE__ */ t(
|
|
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
|
-
|
|
479
|
+
be.displayName = "CloseButton";
|
|
405
480
|
export {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
481
|
+
Te as a,
|
|
482
|
+
Ce as c,
|
|
483
|
+
F as d,
|
|
484
|
+
Be as f,
|
|
410
485
|
L as i,
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
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-
|
|
495
|
+
//# sourceMappingURL=close-button-Bq9f-H15.js.map
|