camber-ui 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +72 -2
- package/dist/chunk-XW4RP3PC.js +45 -0
- package/dist/chunk-XW4RP3PC.js.map +1 -0
- package/dist/index.d.ts +456 -0
- package/dist/index.js +1146 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +1178 -0
- package/dist/theme.d.ts +351 -0
- package/dist/theme.js +298 -0
- package/dist/theme.js.map +1 -0
- package/dist/themes/default.css +67 -0
- package/dist/themes/midnight.css +66 -0
- package/package.json +73 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,1146 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isThemeName } from './chunk-XW4RP3PC.js';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { useId, isValidElement, cloneElement, useRef, useEffect, useState, createElement, useCallback } from 'react';
|
|
5
|
+
|
|
6
|
+
// src/set-theme.ts
|
|
7
|
+
function setTheme(name) {
|
|
8
|
+
if (!isThemeName(name)) {
|
|
9
|
+
throw new Error(`Invalid theme name: ${name}`);
|
|
10
|
+
}
|
|
11
|
+
document.documentElement.dataset.theme = name;
|
|
12
|
+
}
|
|
13
|
+
function getTheme() {
|
|
14
|
+
const value = document.documentElement.dataset.theme;
|
|
15
|
+
return value || void 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/components/classes.ts
|
|
19
|
+
function cn(...parts) {
|
|
20
|
+
return parts.filter(Boolean).join(" ");
|
|
21
|
+
}
|
|
22
|
+
var focusRing = [
|
|
23
|
+
"focus-visible:[outline-style:solid]",
|
|
24
|
+
"focus-visible:[outline-width:var(--camber-focus-width)]",
|
|
25
|
+
"focus-visible:[outline-offset:var(--camber-focus-offset)]",
|
|
26
|
+
"focus-visible:[outline-color:var(--camber-focus)]"
|
|
27
|
+
].join(" ");
|
|
28
|
+
var camberFamily = "font-[family-name:var(--camber-font)]";
|
|
29
|
+
var camberMono = "font-[family-name:var(--camber-font-mono)]";
|
|
30
|
+
var camberFont = `${camberFamily} [line-height:var(--camber-line-height)]`;
|
|
31
|
+
var controlClass = [
|
|
32
|
+
camberFont,
|
|
33
|
+
focusRing,
|
|
34
|
+
"w-full min-h-[2.5rem] px-[var(--camber-space-16)] text-[length:var(--camber-font-size)] [box-sizing:border-box]",
|
|
35
|
+
"[border-width:var(--camber-border-width)] [border-style:solid] [border-color:var(--camber-input-border)]",
|
|
36
|
+
"rounded-[var(--camber-input-radius)] bg-[var(--camber-input-bg)] text-[var(--camber-input-fg)]",
|
|
37
|
+
"aria-invalid:[border-color:var(--camber-input-border-error)]",
|
|
38
|
+
"disabled:cursor-not-allowed disabled:[opacity:var(--camber-disabled-opacity)]"
|
|
39
|
+
].join(" ");
|
|
40
|
+
var motionEase = "duration-200 camber-ease motion-reduce:transition-none motion-reduce:active:scale-100";
|
|
41
|
+
var pressable = [
|
|
42
|
+
"transition-[background-color,border-color,color,box-shadow,transform]",
|
|
43
|
+
motionEase,
|
|
44
|
+
"active:scale-[0.98] disabled:active:scale-100"
|
|
45
|
+
].join(" ");
|
|
46
|
+
var buttonChrome = [
|
|
47
|
+
"inline-flex appearance-none cursor-pointer items-center justify-center gap-[var(--camber-space-8)]",
|
|
48
|
+
"[box-sizing:border-box] [margin:0] [border-width:var(--camber-border-width)] [border-style:solid]",
|
|
49
|
+
"rounded-[var(--camber-button-radius)] [font-weight:var(--camber-font-weight)] no-underline",
|
|
50
|
+
"disabled:cursor-not-allowed disabled:[opacity:var(--camber-disabled-opacity)]"
|
|
51
|
+
].join(" ");
|
|
52
|
+
var buttonVariants = {
|
|
53
|
+
primary: [
|
|
54
|
+
"bg-[var(--camber-button-primary-bg)]",
|
|
55
|
+
"text-[var(--camber-button-primary-fg)]",
|
|
56
|
+
"visited:text-[var(--camber-button-primary-fg)]",
|
|
57
|
+
"[border-color:var(--camber-button-primary-bg)]",
|
|
58
|
+
"hover:bg-[var(--camber-button-primary-bg-hover)]",
|
|
59
|
+
"hover:[border-color:var(--camber-button-primary-bg-hover)]",
|
|
60
|
+
"[box-shadow:var(--camber-elevation-1)]",
|
|
61
|
+
"hover:[box-shadow:var(--camber-elevation-2)]"
|
|
62
|
+
].join(" "),
|
|
63
|
+
secondary: [
|
|
64
|
+
"bg-[var(--camber-button-secondary-bg)]",
|
|
65
|
+
"text-[var(--camber-button-secondary-fg)]",
|
|
66
|
+
"visited:text-[var(--camber-button-secondary-fg)]",
|
|
67
|
+
"[border-color:var(--camber-border)]",
|
|
68
|
+
"hover:bg-[var(--camber-button-secondary-bg-hover)]"
|
|
69
|
+
].join(" "),
|
|
70
|
+
ghost: [
|
|
71
|
+
"bg-transparent",
|
|
72
|
+
"text-[var(--camber-button-ghost-fg)]",
|
|
73
|
+
"visited:text-[var(--camber-button-ghost-fg)]",
|
|
74
|
+
"[border-color:transparent]",
|
|
75
|
+
"hover:bg-[var(--camber-button-ghost-bg-hover)]"
|
|
76
|
+
].join(" ")
|
|
77
|
+
};
|
|
78
|
+
var buttonSizes = {
|
|
79
|
+
sm: "min-h-[2rem] px-[var(--camber-space-8)] text-[length:var(--camber-font-size-sm)]",
|
|
80
|
+
md: "min-h-[2.5rem] px-[var(--camber-space-16)] text-[length:var(--camber-font-size)]"
|
|
81
|
+
};
|
|
82
|
+
var plainControl = "appearance-none [border:0] [margin:0] cursor-pointer";
|
|
83
|
+
var choiceBox = [
|
|
84
|
+
"relative shrink-0 appearance-none [box-sizing:border-box] [margin:0] size-[1.25rem]",
|
|
85
|
+
"[border-width:var(--camber-border-width)] [border-style:solid]",
|
|
86
|
+
"[border-color:var(--camber-input-border)] bg-[var(--camber-input-bg)]",
|
|
87
|
+
"checked:[border-color:var(--camber-button-primary-bg)]",
|
|
88
|
+
"hover:[border-color:var(--camber-button-primary-bg)]",
|
|
89
|
+
"disabled:cursor-not-allowed disabled:[opacity:var(--camber-disabled-opacity)]",
|
|
90
|
+
"transition-[background-color,border-color,transform]",
|
|
91
|
+
motionEase,
|
|
92
|
+
"active:scale-95 disabled:active:scale-100",
|
|
93
|
+
focusRing
|
|
94
|
+
].join(" ");
|
|
95
|
+
var checkControl = [
|
|
96
|
+
choiceBox,
|
|
97
|
+
"checked:bg-[var(--camber-button-primary-bg)]",
|
|
98
|
+
"rounded-[0.375rem]",
|
|
99
|
+
"after:pointer-events-none after:absolute after:left-[0.34rem] after:top-[0.12rem]",
|
|
100
|
+
"after:h-[0.55rem] after:w-[0.28rem] after:rotate-45 after:content-['']",
|
|
101
|
+
"after:[border-width:0_2px_2px_0] after:[border-style:solid]",
|
|
102
|
+
"after:[border-color:var(--camber-button-primary-fg)]",
|
|
103
|
+
"after:origin-center after:scale-50 after:opacity-0",
|
|
104
|
+
"after:transition-[transform,opacity] after:duration-200",
|
|
105
|
+
"checked:after:scale-100 checked:after:opacity-100",
|
|
106
|
+
"motion-reduce:after:transition-none"
|
|
107
|
+
].join(" ");
|
|
108
|
+
var radioControl = [
|
|
109
|
+
choiceBox,
|
|
110
|
+
"rounded-[999px]",
|
|
111
|
+
"after:pointer-events-none after:absolute after:top-[50%] after:left-[50%] after:size-[0.5rem]",
|
|
112
|
+
"after:translate-x-[-50%] after:translate-y-[-50%]",
|
|
113
|
+
"after:rounded-[999px] after:bg-[var(--camber-button-primary-bg)] after:content-['']",
|
|
114
|
+
"after:scale-50 after:opacity-0 after:transition-[transform,opacity,scale] after:duration-200",
|
|
115
|
+
"checked:after:scale-100 checked:after:opacity-100",
|
|
116
|
+
"motion-reduce:after:transition-none"
|
|
117
|
+
].join(" ");
|
|
118
|
+
var choiceLabel = `${camberFont} inline-flex items-center gap-[var(--camber-space-8)] text-[length:var(--camber-font-size)] text-[var(--camber-surface-fg)]`;
|
|
119
|
+
var panel = [
|
|
120
|
+
camberFont,
|
|
121
|
+
"[box-sizing:border-box] [border-width:var(--camber-border-width)] [border-style:solid]",
|
|
122
|
+
"[border-color:var(--camber-border)] rounded-[var(--camber-input-radius)]",
|
|
123
|
+
"bg-[var(--camber-surface-bg)] text-[var(--camber-surface-fg)]"
|
|
124
|
+
].join(" ");
|
|
125
|
+
var elevation1 = "[box-shadow:var(--camber-elevation-1)]";
|
|
126
|
+
var elevation2 = "[box-shadow:var(--camber-elevation-2)]";
|
|
127
|
+
function Button({
|
|
128
|
+
variant = "primary",
|
|
129
|
+
size = "md",
|
|
130
|
+
className,
|
|
131
|
+
type = "button",
|
|
132
|
+
...props
|
|
133
|
+
}) {
|
|
134
|
+
return /* @__PURE__ */ jsx(
|
|
135
|
+
"button",
|
|
136
|
+
{
|
|
137
|
+
type,
|
|
138
|
+
className: cn(
|
|
139
|
+
camberFont,
|
|
140
|
+
focusRing,
|
|
141
|
+
buttonChrome,
|
|
142
|
+
pressable,
|
|
143
|
+
buttonVariants[variant],
|
|
144
|
+
buttonSizes[size],
|
|
145
|
+
className
|
|
146
|
+
),
|
|
147
|
+
...props
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
function mergeRel(existing, required) {
|
|
152
|
+
const tokens = new Set([...(existing ?? "").split(/\s+/), ...required.split(/\s+/)].filter(Boolean));
|
|
153
|
+
return [...tokens].join(" ");
|
|
154
|
+
}
|
|
155
|
+
var textLink = [
|
|
156
|
+
"text-[var(--camber-link-fg)] underline underline-offset-[0.15em] rounded-[0.125rem]",
|
|
157
|
+
"transition-colors duration-200 camber-ease motion-reduce:transition-none",
|
|
158
|
+
"hover:text-[var(--camber-link-fg-hover)] visited:text-[var(--camber-link-fg)]"
|
|
159
|
+
].join(" ");
|
|
160
|
+
function Link({
|
|
161
|
+
external = false,
|
|
162
|
+
variant = "text",
|
|
163
|
+
size = "md",
|
|
164
|
+
target,
|
|
165
|
+
rel,
|
|
166
|
+
className,
|
|
167
|
+
...props
|
|
168
|
+
}) {
|
|
169
|
+
const opensNewTab = external || target === "_blank";
|
|
170
|
+
const buttonLike = variant !== "text";
|
|
171
|
+
return /* @__PURE__ */ jsx(
|
|
172
|
+
"a",
|
|
173
|
+
{
|
|
174
|
+
target: opensNewTab ? "_blank" : target,
|
|
175
|
+
rel: opensNewTab ? mergeRel(rel, "noopener noreferrer") : rel,
|
|
176
|
+
className: cn(
|
|
177
|
+
camberFont,
|
|
178
|
+
focusRing,
|
|
179
|
+
buttonLike ? buttonChrome : textLink,
|
|
180
|
+
buttonLike && pressable,
|
|
181
|
+
buttonLike && buttonVariants[variant],
|
|
182
|
+
buttonLike && buttonSizes[size],
|
|
183
|
+
className
|
|
184
|
+
),
|
|
185
|
+
...props
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
var pillTones = ["neutral", "info", "success", "warning", "danger"];
|
|
190
|
+
var tones = {
|
|
191
|
+
neutral: "bg-[var(--camber-pill-neutral-bg)] text-[var(--camber-pill-neutral-fg)]",
|
|
192
|
+
info: "bg-[var(--camber-pill-info-bg)] text-[var(--camber-pill-info-fg)]",
|
|
193
|
+
success: "bg-[var(--camber-pill-success-bg)] text-[var(--camber-pill-success-fg)]",
|
|
194
|
+
warning: "bg-[var(--camber-pill-warning-bg)] text-[var(--camber-pill-warning-fg)]",
|
|
195
|
+
danger: "bg-[var(--camber-pill-danger-bg)] text-[var(--camber-pill-danger-fg)]"
|
|
196
|
+
};
|
|
197
|
+
function pillToneClass(tone = "neutral") {
|
|
198
|
+
return tones[tone];
|
|
199
|
+
}
|
|
200
|
+
function Pill({ tone = "neutral", className, ...props }) {
|
|
201
|
+
return /* @__PURE__ */ jsx(
|
|
202
|
+
"span",
|
|
203
|
+
{
|
|
204
|
+
className: cn(
|
|
205
|
+
camberFont,
|
|
206
|
+
"inline-flex items-center min-h-[1.5rem] px-[var(--camber-space-8)] text-[length:var(--camber-font-size-sm)] [font-weight:var(--camber-font-weight)] rounded-[var(--camber-pill-radius)]",
|
|
207
|
+
pillToneClass(tone),
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
function Input({ className, type = "text", ...props }) {
|
|
215
|
+
return /* @__PURE__ */ jsx(
|
|
216
|
+
"input",
|
|
217
|
+
{
|
|
218
|
+
type,
|
|
219
|
+
className: cn(controlClass, className),
|
|
220
|
+
...props
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
function Field({ label, hint, error, children, className }) {
|
|
225
|
+
const generatedId = useId();
|
|
226
|
+
if (!isValidElement(children)) {
|
|
227
|
+
throw new Error("Field expects a single control element.");
|
|
228
|
+
}
|
|
229
|
+
const controlId = children.props.id ?? generatedId;
|
|
230
|
+
const hintId = hint ? `${controlId}-hint` : void 0;
|
|
231
|
+
const errorId = error ? `${controlId}-error` : void 0;
|
|
232
|
+
const describedBy = [hintId, errorId].filter(Boolean).join(" ") || void 0;
|
|
233
|
+
const control = cloneElement(children, {
|
|
234
|
+
id: controlId,
|
|
235
|
+
"aria-describedby": describedBy,
|
|
236
|
+
"aria-invalid": error ? true : children.props["aria-invalid"]
|
|
237
|
+
});
|
|
238
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("grid gap-[var(--camber-space-4)]", className), children: [
|
|
239
|
+
/* @__PURE__ */ jsx(
|
|
240
|
+
"label",
|
|
241
|
+
{
|
|
242
|
+
htmlFor: controlId,
|
|
243
|
+
className: cn(
|
|
244
|
+
camberFont,
|
|
245
|
+
"text-[length:var(--camber-font-size-sm)] [font-weight:var(--camber-font-weight)] text-[var(--camber-field-label)]"
|
|
246
|
+
),
|
|
247
|
+
children: label
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
control,
|
|
251
|
+
hint ? /* @__PURE__ */ jsx(FieldNote, { id: hintId, children: hint }) : null,
|
|
252
|
+
error ? /* @__PURE__ */ jsx(FieldNote, { id: errorId, alert: true, children: error }) : null
|
|
253
|
+
] });
|
|
254
|
+
}
|
|
255
|
+
function FieldNote({ id, alert = false, children }) {
|
|
256
|
+
return /* @__PURE__ */ jsx(
|
|
257
|
+
"p",
|
|
258
|
+
{
|
|
259
|
+
id,
|
|
260
|
+
role: alert ? "alert" : void 0,
|
|
261
|
+
className: cn(
|
|
262
|
+
camberFont,
|
|
263
|
+
"[margin:0] text-[length:var(--camber-font-size-sm)]",
|
|
264
|
+
alert ? "[font-weight:var(--camber-font-weight)] text-[var(--camber-field-error)]" : "text-[var(--camber-field-hint)]"
|
|
265
|
+
),
|
|
266
|
+
children
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
var headingScale = {
|
|
271
|
+
h1: 2.5,
|
|
272
|
+
h2: 2,
|
|
273
|
+
h3: 1.5,
|
|
274
|
+
h4: 1.25,
|
|
275
|
+
h5: 1,
|
|
276
|
+
h6: 0.875
|
|
277
|
+
};
|
|
278
|
+
var paragraphScale = {
|
|
279
|
+
p: 1,
|
|
280
|
+
address: 1,
|
|
281
|
+
figcaption: 0.875
|
|
282
|
+
};
|
|
283
|
+
var quoteScale = {
|
|
284
|
+
blockquote: 1.25,
|
|
285
|
+
q: 1
|
|
286
|
+
};
|
|
287
|
+
var listScale = {
|
|
288
|
+
ul: 1,
|
|
289
|
+
ol: 1,
|
|
290
|
+
dl: 1
|
|
291
|
+
};
|
|
292
|
+
var codeScale = {
|
|
293
|
+
code: 0.875,
|
|
294
|
+
pre: 0.875,
|
|
295
|
+
kbd: 0.875,
|
|
296
|
+
samp: 0.875
|
|
297
|
+
};
|
|
298
|
+
var textScale = {
|
|
299
|
+
span: 1,
|
|
300
|
+
strong: 1,
|
|
301
|
+
b: 1,
|
|
302
|
+
em: 1,
|
|
303
|
+
i: 1,
|
|
304
|
+
small: 0.875,
|
|
305
|
+
mark: 1,
|
|
306
|
+
abbr: 1,
|
|
307
|
+
cite: 1,
|
|
308
|
+
dfn: 1,
|
|
309
|
+
var: 1,
|
|
310
|
+
time: 1,
|
|
311
|
+
u: 1,
|
|
312
|
+
s: 1,
|
|
313
|
+
del: 1,
|
|
314
|
+
ins: 1,
|
|
315
|
+
sub: 0.75,
|
|
316
|
+
sup: 0.75
|
|
317
|
+
};
|
|
318
|
+
var headingFace = cn(
|
|
319
|
+
camberFamily,
|
|
320
|
+
"[margin:var(--camber-heading-margin)] text-[var(--camber-surface-fg)] [font-weight:var(--camber-font-weight)] [line-height:var(--camber-line-height-heading)]"
|
|
321
|
+
);
|
|
322
|
+
var bodyFace = cn(camberFont, "[margin:var(--camber-paragraph-margin)] text-[var(--camber-surface-fg)]");
|
|
323
|
+
function resolveScale(size, fallback) {
|
|
324
|
+
if (size === void 0 || !Number.isFinite(size) || size <= 0 || size > 8) {
|
|
325
|
+
return fallback;
|
|
326
|
+
}
|
|
327
|
+
return Math.round(size * 1e3) / 1e3;
|
|
328
|
+
}
|
|
329
|
+
function typeSize(scale) {
|
|
330
|
+
return `calc(var(--camber-font-size) * ${scale})`;
|
|
331
|
+
}
|
|
332
|
+
function renderTyped(tag, scale, face, props) {
|
|
333
|
+
const { className, style, children, ...rest } = props;
|
|
334
|
+
return createElement(tag, {
|
|
335
|
+
...rest,
|
|
336
|
+
className: cn(face, className),
|
|
337
|
+
style: { ...style, fontSize: typeSize(scale) }
|
|
338
|
+
}, children);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// src/components/Heading.tsx
|
|
342
|
+
function Heading({ as = "h2", size, className, style, ...props }) {
|
|
343
|
+
return renderTyped(as, resolveScale(size, headingScale[as]), headingFace, { ...props, className, style });
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// src/components/Paragraph.tsx
|
|
347
|
+
function Paragraph({ as = "p", size, className, style, ...props }) {
|
|
348
|
+
return renderTyped(as, resolveScale(size, paragraphScale[as]), bodyFace, { ...props, className, style });
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// src/components/Quote.tsx
|
|
352
|
+
var quoteFace = cn(
|
|
353
|
+
bodyFace,
|
|
354
|
+
"[font-style:italic] border-s-[length:var(--camber-border-width)] [border-inline-start-style:solid] [border-inline-start-color:var(--camber-focus)] ps-[var(--camber-space-16)]"
|
|
355
|
+
);
|
|
356
|
+
function Quote({ as = "blockquote", size, className, style, ...props }) {
|
|
357
|
+
const face = as === "q" ? cn(bodyFace, "[font-style:italic]") : quoteFace;
|
|
358
|
+
return renderTyped(as, resolveScale(size, quoteScale[as]), face, { ...props, className, style });
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// src/components/List.tsx
|
|
362
|
+
var markers = {
|
|
363
|
+
ul: "[list-style-type:disc] ps-[1.25em]",
|
|
364
|
+
ol: "[list-style-type:decimal] ps-[1.25em]",
|
|
365
|
+
dl: "[list-style-type:none] [padding-inline-start:0] [&_dt]:[font-weight:var(--camber-font-weight)] [&_dd]:[margin:var(--camber-paragraph-margin)]"
|
|
366
|
+
};
|
|
367
|
+
function List({ as = "ul", size, className, style, ...props }) {
|
|
368
|
+
const face = cn(bodyFace, "[list-style-position:outside] [&_li]:mt-[var(--camber-copy-gap)]", markers[as]);
|
|
369
|
+
return renderTyped(as, resolveScale(size, listScale[as]), face, { ...props, className, style });
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// src/components/Code.tsx
|
|
373
|
+
var codeFace = cn(
|
|
374
|
+
bodyFace,
|
|
375
|
+
camberMono,
|
|
376
|
+
"px-[0.3em] rounded-[0.2rem] bg-[var(--camber-pill-neutral-bg)] text-[var(--camber-surface-fg)]"
|
|
377
|
+
);
|
|
378
|
+
var faces = {
|
|
379
|
+
code: codeFace,
|
|
380
|
+
samp: cn(bodyFace, camberMono),
|
|
381
|
+
kbd: cn(
|
|
382
|
+
codeFace,
|
|
383
|
+
"[border-width:var(--camber-border-width)] [border-style:solid] [border-color:var(--camber-input-border)]"
|
|
384
|
+
),
|
|
385
|
+
pre: cn(
|
|
386
|
+
bodyFace,
|
|
387
|
+
camberMono,
|
|
388
|
+
"[display:block] overflow-auto p-[var(--camber-space-8)] [white-space:pre-wrap] rounded-[var(--camber-input-radius)] bg-[var(--camber-pill-neutral-bg)] text-[var(--camber-surface-fg)]"
|
|
389
|
+
)
|
|
390
|
+
};
|
|
391
|
+
function Code({ as = "code", size, className, style, ...props }) {
|
|
392
|
+
return renderTyped(as, resolveScale(size, codeScale[as]), faces[as], { ...props, className, style });
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// src/components/Text.tsx
|
|
396
|
+
var faces2 = {
|
|
397
|
+
span: bodyFace,
|
|
398
|
+
strong: cn(bodyFace, "[font-weight:var(--camber-font-weight)]"),
|
|
399
|
+
b: cn(bodyFace, "[font-weight:var(--camber-font-weight)]"),
|
|
400
|
+
em: cn(bodyFace, "[font-style:italic]"),
|
|
401
|
+
i: cn(bodyFace, "[font-style:italic]"),
|
|
402
|
+
small: bodyFace,
|
|
403
|
+
mark: cn(bodyFace, "px-[0.15em] bg-[var(--camber-pill-warning-bg)] text-[var(--camber-surface-fg)]"),
|
|
404
|
+
abbr: cn(bodyFace, "[text-decoration-line:underline] [text-decoration-style:dotted] [cursor:help]"),
|
|
405
|
+
cite: cn(bodyFace, "[font-style:italic]"),
|
|
406
|
+
dfn: cn(bodyFace, "[font-style:italic]"),
|
|
407
|
+
var: cn(bodyFace, "[font-style:italic]"),
|
|
408
|
+
time: bodyFace,
|
|
409
|
+
u: cn(bodyFace, "[text-decoration-line:underline]"),
|
|
410
|
+
s: cn(bodyFace, "[text-decoration-line:line-through]"),
|
|
411
|
+
del: cn(bodyFace, "[text-decoration-line:line-through]"),
|
|
412
|
+
ins: cn(bodyFace, "[text-decoration-line:underline]"),
|
|
413
|
+
sub: cn(bodyFace, "[vertical-align:sub]"),
|
|
414
|
+
sup: cn(bodyFace, "[vertical-align:super]")
|
|
415
|
+
};
|
|
416
|
+
function Text({ as = "span", size, className, style, ...props }) {
|
|
417
|
+
return renderTyped(as, resolveScale(size, textScale[as]), faces2[as], { ...props, className, style });
|
|
418
|
+
}
|
|
419
|
+
function Textarea({ className, ...props }) {
|
|
420
|
+
return /* @__PURE__ */ jsx("textarea", { className: cn(controlClass, "min-h-[6.5rem] py-[var(--camber-space-8)] [resize:vertical]", className), ...props });
|
|
421
|
+
}
|
|
422
|
+
function Select({ className, ...props }) {
|
|
423
|
+
return /* @__PURE__ */ jsx("select", { className: cn(controlClass, "camber-select", className), ...props });
|
|
424
|
+
}
|
|
425
|
+
function Checkbox({ children, className, ...props }) {
|
|
426
|
+
const input = /* @__PURE__ */ jsx("input", { type: "checkbox", className: cn(checkControl, className), ...props });
|
|
427
|
+
if (children == null) return input;
|
|
428
|
+
return /* @__PURE__ */ jsxs("label", { className: choiceLabel, children: [
|
|
429
|
+
input,
|
|
430
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
431
|
+
] });
|
|
432
|
+
}
|
|
433
|
+
function Radio({ children, className, ...props }) {
|
|
434
|
+
const input = /* @__PURE__ */ jsx("input", { type: "radio", className: cn(radioControl, className), ...props });
|
|
435
|
+
if (children == null) return input;
|
|
436
|
+
return /* @__PURE__ */ jsxs("label", { className: choiceLabel, children: [
|
|
437
|
+
input,
|
|
438
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
439
|
+
] });
|
|
440
|
+
}
|
|
441
|
+
var track = cn(
|
|
442
|
+
focusRing,
|
|
443
|
+
"relative h-[1.35rem] w-[2.35rem] shrink-0 rounded-[999px] [appearance:none] [border:0] [margin:0]",
|
|
444
|
+
"bg-[var(--camber-input-border)] checked:bg-[var(--camber-button-primary-bg)]",
|
|
445
|
+
"transition-[background-color] duration-200 camber-ease motion-reduce:transition-none",
|
|
446
|
+
"after:absolute after:top-[0.15rem] after:left-[0.15rem] after:size-[1.05rem] after:rounded-[999px]",
|
|
447
|
+
"after:bg-[var(--camber-input-bg)] after:content-[''] after:[box-shadow:0_1px_2px_color-mix(in_srgb,var(--camber-surface-fg)_18%,transparent)]",
|
|
448
|
+
"after:transition-[transform] after:duration-200 motion-reduce:after:transition-none",
|
|
449
|
+
"active:after:scale-95 motion-reduce:active:after:scale-100",
|
|
450
|
+
"checked:after:translate-x-[1rem]",
|
|
451
|
+
"disabled:cursor-not-allowed disabled:[opacity:var(--camber-disabled-opacity)]"
|
|
452
|
+
);
|
|
453
|
+
function Switch({ children, className, ...props }) {
|
|
454
|
+
const input = /* @__PURE__ */ jsx("input", { type: "checkbox", role: "switch", className: cn(track, className), ...props });
|
|
455
|
+
if (children == null) return input;
|
|
456
|
+
return /* @__PURE__ */ jsxs("label", { className: choiceLabel, children: [
|
|
457
|
+
input,
|
|
458
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
459
|
+
] });
|
|
460
|
+
}
|
|
461
|
+
function Slider({ className, ...props }) {
|
|
462
|
+
return /* @__PURE__ */ jsx(
|
|
463
|
+
"input",
|
|
464
|
+
{
|
|
465
|
+
type: "range",
|
|
466
|
+
className: cn(focusRing, "camber-slider w-full", className),
|
|
467
|
+
...props
|
|
468
|
+
}
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
function Avatar({ name, src, className }) {
|
|
472
|
+
const rootClass = cn(
|
|
473
|
+
camberFont,
|
|
474
|
+
"inline-grid size-[2.5rem] place-items-center overflow-hidden rounded-[999px]",
|
|
475
|
+
"bg-[var(--camber-pill-neutral-bg)] text-[var(--camber-pill-neutral-fg)]",
|
|
476
|
+
"text-[length:var(--camber-font-size-sm)] [font-weight:var(--camber-font-weight)]",
|
|
477
|
+
className
|
|
478
|
+
);
|
|
479
|
+
if (src) {
|
|
480
|
+
return /* @__PURE__ */ jsx("img", { className: cn(rootClass, "object-cover"), src, alt: name });
|
|
481
|
+
}
|
|
482
|
+
const initials = name.split(" ").filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
483
|
+
return /* @__PURE__ */ jsx("span", { className: rootClass, role: "img", "aria-label": name, children: initials });
|
|
484
|
+
}
|
|
485
|
+
var rule = "h-px flex-1 bg-[var(--camber-border)]";
|
|
486
|
+
function Divider({ children, className }) {
|
|
487
|
+
if (children == null) {
|
|
488
|
+
return /* @__PURE__ */ jsx(
|
|
489
|
+
"hr",
|
|
490
|
+
{
|
|
491
|
+
className: cn(
|
|
492
|
+
"w-full [border:0] [border-top-width:var(--camber-border-width)] [border-top-style:solid] [border-top-color:var(--camber-border)]",
|
|
493
|
+
className
|
|
494
|
+
)
|
|
495
|
+
}
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
return /* @__PURE__ */ jsxs(
|
|
499
|
+
"div",
|
|
500
|
+
{
|
|
501
|
+
role: "separator",
|
|
502
|
+
className: cn(
|
|
503
|
+
camberFont,
|
|
504
|
+
"flex items-center gap-[var(--camber-space-8)] text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-hint)]",
|
|
505
|
+
className
|
|
506
|
+
),
|
|
507
|
+
children: [
|
|
508
|
+
/* @__PURE__ */ jsx("span", { className: rule }),
|
|
509
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
510
|
+
/* @__PURE__ */ jsx("span", { className: rule })
|
|
511
|
+
]
|
|
512
|
+
}
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
function Spinner({ label = "Loading", className }) {
|
|
516
|
+
return /* @__PURE__ */ jsxs(
|
|
517
|
+
"span",
|
|
518
|
+
{
|
|
519
|
+
role: "status",
|
|
520
|
+
className: cn(
|
|
521
|
+
camberFont,
|
|
522
|
+
"inline-flex items-center gap-[var(--camber-space-8)] text-[length:var(--camber-font-size)] text-[var(--camber-surface-fg)]",
|
|
523
|
+
className
|
|
524
|
+
),
|
|
525
|
+
children: [
|
|
526
|
+
/* @__PURE__ */ jsx(
|
|
527
|
+
"span",
|
|
528
|
+
{
|
|
529
|
+
"aria-hidden": "true",
|
|
530
|
+
className: "camber-spinner inline-block size-[1.15rem] rounded-[999px] [border-width:2px] [border-style:solid] [border-color:var(--camber-button-primary-bg)] [border-top-color:transparent]"
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
label
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
function Progress({ label, value, max = 100, className }) {
|
|
539
|
+
const safeMax = max > 0 ? max : 100;
|
|
540
|
+
const current = Math.min(safeMax, Math.max(0, value));
|
|
541
|
+
const percent = Math.round(current / safeMax * 100);
|
|
542
|
+
return /* @__PURE__ */ jsxs(
|
|
543
|
+
"div",
|
|
544
|
+
{
|
|
545
|
+
className: cn(
|
|
546
|
+
camberFont,
|
|
547
|
+
"grid gap-[var(--camber-space-4)] text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-fg)]",
|
|
548
|
+
className
|
|
549
|
+
),
|
|
550
|
+
children: [
|
|
551
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-[var(--camber-space-16)]", children: [
|
|
552
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
553
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
554
|
+
percent,
|
|
555
|
+
"%"
|
|
556
|
+
] })
|
|
557
|
+
] }),
|
|
558
|
+
/* @__PURE__ */ jsx(
|
|
559
|
+
"div",
|
|
560
|
+
{
|
|
561
|
+
role: "progressbar",
|
|
562
|
+
"aria-label": label,
|
|
563
|
+
"aria-valuemin": 0,
|
|
564
|
+
"aria-valuemax": safeMax,
|
|
565
|
+
"aria-valuenow": current,
|
|
566
|
+
className: "h-[var(--camber-space-8)] overflow-hidden rounded-[999px] bg-[var(--camber-pill-neutral-bg)]",
|
|
567
|
+
children: /* @__PURE__ */ jsx("div", { className: "h-full rounded-[999px] bg-[var(--camber-button-primary-bg)]", style: { width: `${percent}%` } })
|
|
568
|
+
}
|
|
569
|
+
)
|
|
570
|
+
]
|
|
571
|
+
}
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
function Alert({ tone = "info", title, children, className }) {
|
|
575
|
+
return /* @__PURE__ */ jsxs(
|
|
576
|
+
"div",
|
|
577
|
+
{
|
|
578
|
+
role: tone === "danger" || tone === "warning" ? "alert" : "status",
|
|
579
|
+
className: cn(
|
|
580
|
+
camberFont,
|
|
581
|
+
pillToneClass(tone),
|
|
582
|
+
"grid gap-[var(--camber-space-4)] rounded-[var(--camber-input-radius)] px-[var(--camber-space-16)] py-[var(--camber-space-8)] text-[length:var(--camber-font-size)]",
|
|
583
|
+
className
|
|
584
|
+
),
|
|
585
|
+
children: [
|
|
586
|
+
title ? /* @__PURE__ */ jsx("strong", { className: "[font-weight:var(--camber-font-weight)]", children: title }) : null,
|
|
587
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
588
|
+
]
|
|
589
|
+
}
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
function Toast({ tone = "neutral", children, onDismiss, className }) {
|
|
593
|
+
return /* @__PURE__ */ jsxs(
|
|
594
|
+
"div",
|
|
595
|
+
{
|
|
596
|
+
role: "status",
|
|
597
|
+
className: cn(
|
|
598
|
+
camberFont,
|
|
599
|
+
pillToneClass(tone),
|
|
600
|
+
"flex flex-wrap items-center justify-between gap-[var(--camber-space-8)] rounded-[var(--camber-input-radius)] px-[var(--camber-space-16)] py-[var(--camber-space-8)] text-[length:var(--camber-font-size)]",
|
|
601
|
+
className
|
|
602
|
+
),
|
|
603
|
+
children: [
|
|
604
|
+
/* @__PURE__ */ jsx("div", { children }),
|
|
605
|
+
onDismiss ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onDismiss, children: "Dismiss" }) : null
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
function Breadcrumb({ items, className }) {
|
|
611
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: cn(camberFont, className), children: /* @__PURE__ */ jsx("ol", { className: "[margin:0] flex list-none flex-wrap items-center gap-[var(--camber-space-8)] [padding:0] text-[length:var(--camber-font-size-sm)]", children: items.map((item, index) => {
|
|
612
|
+
const last = index === items.length - 1;
|
|
613
|
+
return /* @__PURE__ */ jsxs("li", { className: "inline-flex items-center gap-[var(--camber-space-8)]", children: [
|
|
614
|
+
last || !item.href ? /* @__PURE__ */ jsx("span", { "aria-current": last ? "page" : void 0, className: cn(last && "text-[var(--camber-surface-fg)] [font-weight:var(--camber-font-weight)]"), children: item.label }) : /* @__PURE__ */ jsx(Link, { href: item.href, children: item.label }),
|
|
615
|
+
last ? null : /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "/" })
|
|
616
|
+
] }, `${item.label}-${index}`);
|
|
617
|
+
}) }) });
|
|
618
|
+
}
|
|
619
|
+
function ButtonGroup({ label, children, className }) {
|
|
620
|
+
return /* @__PURE__ */ jsx(
|
|
621
|
+
"div",
|
|
622
|
+
{
|
|
623
|
+
role: "group",
|
|
624
|
+
"aria-label": label,
|
|
625
|
+
className: cn("inline-flex flex-wrap items-center gap-[var(--camber-space-8)]", className),
|
|
626
|
+
children
|
|
627
|
+
}
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
function Card({ title, children, action, className }) {
|
|
631
|
+
return /* @__PURE__ */ jsxs("section", { className: cn(panel, elevation1, "grid gap-[var(--camber-space-8)] p-[var(--camber-space-16)]", className), children: [
|
|
632
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-[var(--camber-space-8)]", children: [
|
|
633
|
+
/* @__PURE__ */ jsx(Heading, { as: "h3", size: 1.15, children: title }),
|
|
634
|
+
action
|
|
635
|
+
] }),
|
|
636
|
+
children
|
|
637
|
+
] });
|
|
638
|
+
}
|
|
639
|
+
function useControllableState(controlled, defaultValue, onChange) {
|
|
640
|
+
const [uncontrolled, setUncontrolled] = useState(defaultValue);
|
|
641
|
+
const isControlled = controlled !== void 0;
|
|
642
|
+
const value = isControlled ? controlled : uncontrolled;
|
|
643
|
+
const setValue = useCallback(
|
|
644
|
+
(next) => {
|
|
645
|
+
if (!isControlled) setUncontrolled(next);
|
|
646
|
+
onChange?.(next);
|
|
647
|
+
},
|
|
648
|
+
[isControlled, onChange]
|
|
649
|
+
);
|
|
650
|
+
return [value, setValue];
|
|
651
|
+
}
|
|
652
|
+
function Tabs({
|
|
653
|
+
label,
|
|
654
|
+
items,
|
|
655
|
+
className,
|
|
656
|
+
value: valueProp,
|
|
657
|
+
defaultValue,
|
|
658
|
+
onValueChange
|
|
659
|
+
}) {
|
|
660
|
+
const initial = defaultValue ?? items[0]?.id ?? "";
|
|
661
|
+
const [current, setCurrent] = useControllableState(valueProp, initial, onValueChange);
|
|
662
|
+
const uid = useId();
|
|
663
|
+
const selected = items.find((item) => item.id === current) ?? items[0];
|
|
664
|
+
const tabId = (id) => `${uid}-${id}-tab`;
|
|
665
|
+
const panelId = (id) => `${uid}-${id}-panel`;
|
|
666
|
+
const move = (index, delta) => {
|
|
667
|
+
const next = items[(index + delta + items.length) % items.length];
|
|
668
|
+
if (!next) return;
|
|
669
|
+
setCurrent(next.id);
|
|
670
|
+
document.getElementById(tabId(next.id))?.focus();
|
|
671
|
+
};
|
|
672
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(camberFont, className), children: [
|
|
673
|
+
/* @__PURE__ */ jsx(
|
|
674
|
+
"div",
|
|
675
|
+
{
|
|
676
|
+
role: "tablist",
|
|
677
|
+
"aria-label": label,
|
|
678
|
+
className: "flex flex-wrap gap-[var(--camber-space-4)] [border-bottom-width:var(--camber-border-width)] [border-bottom-style:solid] [border-bottom-color:var(--camber-border)]",
|
|
679
|
+
children: items.map((item, index) => {
|
|
680
|
+
const on = item.id === selected?.id;
|
|
681
|
+
return /* @__PURE__ */ jsx(
|
|
682
|
+
"button",
|
|
683
|
+
{
|
|
684
|
+
type: "button",
|
|
685
|
+
role: "tab",
|
|
686
|
+
id: tabId(item.id),
|
|
687
|
+
"aria-selected": on,
|
|
688
|
+
"aria-controls": panelId(item.id),
|
|
689
|
+
tabIndex: on ? 0 : -1,
|
|
690
|
+
className: cn(
|
|
691
|
+
focusRing,
|
|
692
|
+
camberFamily,
|
|
693
|
+
"appearance-none cursor-pointer relative min-h-[2.5rem] rounded-[0] [box-sizing:border-box] [margin:0] [border-width:0] bg-transparent",
|
|
694
|
+
"[padding-block:0] px-[var(--camber-space-16)] text-[length:var(--camber-font-size-sm)] [font-weight:var(--camber-font-weight)]",
|
|
695
|
+
"transition-[color,box-shadow] duration-200 camber-ease motion-reduce:transition-none",
|
|
696
|
+
"after:pointer-events-none after:absolute after:right-[0] after:bottom-[-1px] after:left-[0] after:h-[2px] after:content-['']",
|
|
697
|
+
"after:transition-[background-color,transform] after:duration-200 motion-reduce:after:transition-none",
|
|
698
|
+
on ? "text-[var(--camber-surface-fg)] after:bg-[var(--camber-button-primary-bg)] after:scale-x-100" : "text-[var(--camber-surface-hint)] after:bg-transparent after:scale-x-75 hover:text-[var(--camber-surface-fg)]"
|
|
699
|
+
),
|
|
700
|
+
onClick: () => setCurrent(item.id),
|
|
701
|
+
onKeyDown: (event) => {
|
|
702
|
+
if (event.key === "ArrowRight") {
|
|
703
|
+
event.preventDefault();
|
|
704
|
+
move(index, 1);
|
|
705
|
+
}
|
|
706
|
+
if (event.key === "ArrowLeft") {
|
|
707
|
+
event.preventDefault();
|
|
708
|
+
move(index, -1);
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
children: item.label
|
|
712
|
+
},
|
|
713
|
+
item.id
|
|
714
|
+
);
|
|
715
|
+
})
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
selected ? /* @__PURE__ */ jsx(
|
|
719
|
+
"div",
|
|
720
|
+
{
|
|
721
|
+
role: "tabpanel",
|
|
722
|
+
id: panelId(selected.id),
|
|
723
|
+
"aria-labelledby": tabId(selected.id),
|
|
724
|
+
tabIndex: 0,
|
|
725
|
+
className: "pt-[var(--camber-space-16)]",
|
|
726
|
+
children: selected.children
|
|
727
|
+
}
|
|
728
|
+
) : null
|
|
729
|
+
] });
|
|
730
|
+
}
|
|
731
|
+
function Accordion({
|
|
732
|
+
items,
|
|
733
|
+
className,
|
|
734
|
+
value: valueProp,
|
|
735
|
+
defaultValue,
|
|
736
|
+
onValueChange
|
|
737
|
+
}) {
|
|
738
|
+
const initial = defaultValue !== void 0 ? defaultValue : items[0]?.id ?? null;
|
|
739
|
+
const [open, setOpen] = useControllableState(valueProp, initial, onValueChange);
|
|
740
|
+
const uid = useId();
|
|
741
|
+
return /* @__PURE__ */ jsx("div", { className: cn(panel, elevation1, camberFont, "grid overflow-hidden", className), children: items.map((item, index) => {
|
|
742
|
+
const expanded = open === item.id;
|
|
743
|
+
const buttonId = `${uid}-${item.id}-button`;
|
|
744
|
+
const panelId = `${uid}-${item.id}-panel`;
|
|
745
|
+
return /* @__PURE__ */ jsxs(
|
|
746
|
+
"div",
|
|
747
|
+
{
|
|
748
|
+
className: cn(
|
|
749
|
+
index > 0 && "[border-top-width:var(--camber-border-width)] [border-top-style:solid] [border-top-color:var(--camber-border)]"
|
|
750
|
+
),
|
|
751
|
+
children: [
|
|
752
|
+
/* @__PURE__ */ jsx("h3", { className: "[margin:0] text-[length:var(--camber-font-size)]", children: /* @__PURE__ */ jsxs(
|
|
753
|
+
"button",
|
|
754
|
+
{
|
|
755
|
+
type: "button",
|
|
756
|
+
id: buttonId,
|
|
757
|
+
"aria-expanded": expanded,
|
|
758
|
+
"aria-controls": panelId,
|
|
759
|
+
className: cn(
|
|
760
|
+
focusRing,
|
|
761
|
+
plainControl,
|
|
762
|
+
camberFamily,
|
|
763
|
+
"flex w-full min-h-[2.25rem] items-center justify-between gap-[var(--camber-space-16)] bg-transparent [box-sizing:border-box] px-[var(--camber-space-16)] py-[var(--camber-space-8)] text-left text-[length:var(--camber-font-size)] text-[var(--camber-surface-fg)] [font-weight:var(--camber-font-weight)]",
|
|
764
|
+
"transition-colors duration-200 camber-ease motion-reduce:transition-none",
|
|
765
|
+
"hover:bg-[var(--camber-button-ghost-bg-hover)]"
|
|
766
|
+
),
|
|
767
|
+
onClick: () => setOpen(expanded ? null : item.id),
|
|
768
|
+
children: [
|
|
769
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1", children: item.title }),
|
|
770
|
+
/* @__PURE__ */ jsx(
|
|
771
|
+
"span",
|
|
772
|
+
{
|
|
773
|
+
"aria-hidden": "true",
|
|
774
|
+
className: cn(
|
|
775
|
+
"inline-block shrink-0 text-[length:var(--camber-font-size)] leading-none transition-transform duration-200 camber-ease motion-reduce:transition-none",
|
|
776
|
+
expanded && "rotate-180"
|
|
777
|
+
),
|
|
778
|
+
children: "\u25BE"
|
|
779
|
+
}
|
|
780
|
+
)
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
) }),
|
|
784
|
+
/* @__PURE__ */ jsx(
|
|
785
|
+
"div",
|
|
786
|
+
{
|
|
787
|
+
className: cn(
|
|
788
|
+
"grid transition-[grid-template-rows] duration-200 camber-ease motion-reduce:transition-none",
|
|
789
|
+
expanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
790
|
+
),
|
|
791
|
+
children: /* @__PURE__ */ jsx(
|
|
792
|
+
"div",
|
|
793
|
+
{
|
|
794
|
+
id: panelId,
|
|
795
|
+
role: "region",
|
|
796
|
+
"aria-labelledby": buttonId,
|
|
797
|
+
"aria-hidden": expanded ? void 0 : true,
|
|
798
|
+
inert: expanded ? void 0 : true,
|
|
799
|
+
className: "overflow-hidden text-[var(--camber-surface-fg)]",
|
|
800
|
+
children: /* @__PURE__ */ jsx("div", { className: "px-[var(--camber-space-16)] pb-[var(--camber-space-16)]", children: item.children })
|
|
801
|
+
}
|
|
802
|
+
)
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
item.id
|
|
808
|
+
);
|
|
809
|
+
}) });
|
|
810
|
+
}
|
|
811
|
+
function Pagination({ page, pages, onPage, className }) {
|
|
812
|
+
return /* @__PURE__ */ jsxs(
|
|
813
|
+
"nav",
|
|
814
|
+
{
|
|
815
|
+
"aria-label": "Pagination",
|
|
816
|
+
className: cn(
|
|
817
|
+
camberFont,
|
|
818
|
+
"flex flex-wrap items-center gap-[var(--camber-space-8)] text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-fg)]",
|
|
819
|
+
className
|
|
820
|
+
),
|
|
821
|
+
children: [
|
|
822
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", disabled: page <= 1, onClick: () => onPage(page - 1), children: "Previous" }),
|
|
823
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
824
|
+
"Page ",
|
|
825
|
+
page,
|
|
826
|
+
" of ",
|
|
827
|
+
pages
|
|
828
|
+
] }),
|
|
829
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", disabled: page >= pages, onClick: () => onPage(page + 1), children: "Next" })
|
|
830
|
+
]
|
|
831
|
+
}
|
|
832
|
+
);
|
|
833
|
+
}
|
|
834
|
+
function Table({ caption, columns, rows, className }) {
|
|
835
|
+
return /* @__PURE__ */ jsx("div", { className: cn("overflow-auto", className), children: /* @__PURE__ */ jsxs(
|
|
836
|
+
"table",
|
|
837
|
+
{
|
|
838
|
+
className: cn(
|
|
839
|
+
camberFont,
|
|
840
|
+
"w-full border-collapse text-left text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-fg)]"
|
|
841
|
+
),
|
|
842
|
+
children: [
|
|
843
|
+
/* @__PURE__ */ jsx("caption", { className: "mb-[var(--camber-space-8)] text-left [font-weight:var(--camber-font-weight)]", children: caption }),
|
|
844
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
845
|
+
"th",
|
|
846
|
+
{
|
|
847
|
+
scope: "col",
|
|
848
|
+
className: "text-left [border-bottom-width:var(--camber-border-width)] [border-bottom-style:solid] [border-bottom-color:var(--camber-border)] px-[var(--camber-space-8)] py-[var(--camber-space-8)] [font-weight:var(--camber-font-weight)]",
|
|
849
|
+
children: column
|
|
850
|
+
},
|
|
851
|
+
column
|
|
852
|
+
)) }) }),
|
|
853
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx("tr", { children: row.map((cell, cellIndex) => /* @__PURE__ */ jsx(
|
|
854
|
+
"td",
|
|
855
|
+
{
|
|
856
|
+
className: "[border-bottom-width:var(--camber-border-width)] [border-bottom-style:solid] [border-bottom-color:var(--camber-border)] px-[var(--camber-space-8)] py-[var(--camber-space-8)]",
|
|
857
|
+
children: cell
|
|
858
|
+
},
|
|
859
|
+
cellIndex
|
|
860
|
+
)) }, rowIndex)) })
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
) });
|
|
864
|
+
}
|
|
865
|
+
function syncDialog(node, open) {
|
|
866
|
+
const canShow = typeof node.showModal === "function";
|
|
867
|
+
const canClose = typeof node.close === "function";
|
|
868
|
+
if (open) {
|
|
869
|
+
if (node.open) return;
|
|
870
|
+
if (canShow) node.showModal();
|
|
871
|
+
else node.setAttribute("open", "");
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
if (canClose && node.open) node.close();
|
|
875
|
+
else node.removeAttribute("open");
|
|
876
|
+
}
|
|
877
|
+
function Dialog({ open, title, children, onClose, modal = false, className }) {
|
|
878
|
+
const ref = useRef(null);
|
|
879
|
+
const opener = useRef(null);
|
|
880
|
+
const titleId = useId();
|
|
881
|
+
useEffect(() => {
|
|
882
|
+
const node = ref.current;
|
|
883
|
+
if (!node || !modal) return;
|
|
884
|
+
if (open) {
|
|
885
|
+
opener.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
886
|
+
syncDialog(node, true);
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
889
|
+
syncDialog(node, false);
|
|
890
|
+
const returnTo = opener.current;
|
|
891
|
+
opener.current = null;
|
|
892
|
+
returnTo?.focus();
|
|
893
|
+
}, [open, modal]);
|
|
894
|
+
function requestClose(event) {
|
|
895
|
+
event?.preventDefault();
|
|
896
|
+
onClose?.();
|
|
897
|
+
}
|
|
898
|
+
return /* @__PURE__ */ jsxs(
|
|
899
|
+
"dialog",
|
|
900
|
+
{
|
|
901
|
+
ref,
|
|
902
|
+
open: !modal && open ? true : void 0,
|
|
903
|
+
"aria-labelledby": titleId,
|
|
904
|
+
className: cn(
|
|
905
|
+
panel,
|
|
906
|
+
elevation2,
|
|
907
|
+
"grid w-full max-w-[28rem] gap-[var(--camber-space-8)] p-[var(--camber-space-24)]",
|
|
908
|
+
"transition-[opacity,transform] duration-200 camber-ease motion-reduce:transition-none",
|
|
909
|
+
className
|
|
910
|
+
),
|
|
911
|
+
style: {
|
|
912
|
+
background: "var(--camber-surface-bg)",
|
|
913
|
+
color: "var(--camber-surface-fg)",
|
|
914
|
+
...modal ? {} : { position: "static", inset: "auto", margin: 0, width: "100%" }
|
|
915
|
+
},
|
|
916
|
+
onCancel: (event) => requestClose(event),
|
|
917
|
+
onKeyDown: (event) => {
|
|
918
|
+
if (event.key === "Escape") requestClose(event);
|
|
919
|
+
},
|
|
920
|
+
children: [
|
|
921
|
+
/* @__PURE__ */ jsx(Heading, { as: "h2", id: titleId, size: 1.35, children: title }),
|
|
922
|
+
children
|
|
923
|
+
]
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
function Menu({
|
|
928
|
+
label,
|
|
929
|
+
items,
|
|
930
|
+
className,
|
|
931
|
+
open: openProp,
|
|
932
|
+
defaultOpen = false,
|
|
933
|
+
onOpenChange
|
|
934
|
+
}) {
|
|
935
|
+
const [open, setOpen] = useControllableState(openProp, defaultOpen, onOpenChange);
|
|
936
|
+
const [active, setActive] = useState(0);
|
|
937
|
+
const menuId = useId();
|
|
938
|
+
const buttonRef = useRef(null);
|
|
939
|
+
const itemRefs = useRef([]);
|
|
940
|
+
useEffect(() => {
|
|
941
|
+
if (!open) return;
|
|
942
|
+
itemRefs.current[0]?.focus();
|
|
943
|
+
function onPointer(event) {
|
|
944
|
+
const target = event.target;
|
|
945
|
+
if (!(target instanceof Node)) return;
|
|
946
|
+
if (buttonRef.current?.contains(target)) return;
|
|
947
|
+
if (document.getElementById(menuId)?.contains(target)) return;
|
|
948
|
+
setOpen(false);
|
|
949
|
+
}
|
|
950
|
+
document.addEventListener("pointerdown", onPointer);
|
|
951
|
+
return () => document.removeEventListener("pointerdown", onPointer);
|
|
952
|
+
}, [open, menuId, setOpen]);
|
|
953
|
+
function focusItem(index) {
|
|
954
|
+
if (items.length === 0) return;
|
|
955
|
+
const next = (index + items.length) % items.length;
|
|
956
|
+
setActive(next);
|
|
957
|
+
itemRefs.current[next]?.focus();
|
|
958
|
+
}
|
|
959
|
+
function closeToButton() {
|
|
960
|
+
setOpen(false);
|
|
961
|
+
buttonRef.current?.focus();
|
|
962
|
+
}
|
|
963
|
+
return /* @__PURE__ */ jsxs(
|
|
964
|
+
"div",
|
|
965
|
+
{
|
|
966
|
+
className: cn("relative inline-grid", className),
|
|
967
|
+
onKeyDown: (event) => {
|
|
968
|
+
if (!open) return;
|
|
969
|
+
if (event.key === "Escape") {
|
|
970
|
+
event.preventDefault();
|
|
971
|
+
closeToButton();
|
|
972
|
+
}
|
|
973
|
+
if (event.key === "ArrowDown") {
|
|
974
|
+
event.preventDefault();
|
|
975
|
+
focusItem(active + 1);
|
|
976
|
+
}
|
|
977
|
+
if (event.key === "ArrowUp") {
|
|
978
|
+
event.preventDefault();
|
|
979
|
+
focusItem(active - 1);
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
children: [
|
|
983
|
+
/* @__PURE__ */ jsx(
|
|
984
|
+
Button,
|
|
985
|
+
{
|
|
986
|
+
ref: buttonRef,
|
|
987
|
+
variant: "secondary",
|
|
988
|
+
"aria-expanded": open,
|
|
989
|
+
"aria-haspopup": "menu",
|
|
990
|
+
"aria-controls": menuId,
|
|
991
|
+
onClick: () => {
|
|
992
|
+
setActive(0);
|
|
993
|
+
setOpen(!open);
|
|
994
|
+
},
|
|
995
|
+
children: label
|
|
996
|
+
}
|
|
997
|
+
),
|
|
998
|
+
open ? /* @__PURE__ */ jsx(
|
|
999
|
+
"div",
|
|
1000
|
+
{
|
|
1001
|
+
id: menuId,
|
|
1002
|
+
role: "menu",
|
|
1003
|
+
"aria-label": label,
|
|
1004
|
+
className: cn(
|
|
1005
|
+
panel,
|
|
1006
|
+
elevation2,
|
|
1007
|
+
"absolute top-[calc(100%+var(--camber-space-4))] [left:0] z-10 grid min-w-[12rem] overflow-hidden p-[var(--camber-space-4)]"
|
|
1008
|
+
),
|
|
1009
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx(
|
|
1010
|
+
"button",
|
|
1011
|
+
{
|
|
1012
|
+
ref: (node) => {
|
|
1013
|
+
itemRefs.current[index] = node;
|
|
1014
|
+
},
|
|
1015
|
+
type: "button",
|
|
1016
|
+
role: "menuitem",
|
|
1017
|
+
tabIndex: index === active ? 0 : -1,
|
|
1018
|
+
className: cn(
|
|
1019
|
+
camberFont,
|
|
1020
|
+
focusRing,
|
|
1021
|
+
plainControl,
|
|
1022
|
+
"min-h-[2.25rem] w-full rounded-[var(--camber-button-radius)] bg-transparent [box-sizing:border-box] [padding-block:0] px-[var(--camber-space-8)] text-left text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-fg)]",
|
|
1023
|
+
"transition-colors duration-200 camber-ease motion-reduce:transition-none",
|
|
1024
|
+
"hover:bg-[var(--camber-button-ghost-bg-hover)]"
|
|
1025
|
+
),
|
|
1026
|
+
onClick: () => {
|
|
1027
|
+
item.onSelect?.();
|
|
1028
|
+
closeToButton();
|
|
1029
|
+
},
|
|
1030
|
+
children: item.label
|
|
1031
|
+
},
|
|
1032
|
+
item.id
|
|
1033
|
+
))
|
|
1034
|
+
}
|
|
1035
|
+
) : null
|
|
1036
|
+
]
|
|
1037
|
+
}
|
|
1038
|
+
);
|
|
1039
|
+
}
|
|
1040
|
+
function Stat({ label, value, hint, className }) {
|
|
1041
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(camberFont, "grid gap-[var(--camber-copy-gap)] text-[var(--camber-surface-fg)]", className), children: [
|
|
1042
|
+
/* @__PURE__ */ jsx("p", { className: "[margin:0] text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-hint)]", children: label }),
|
|
1043
|
+
/* @__PURE__ */ jsx("p", { className: "[margin:0] text-[length:calc(var(--camber-font-size)*2)] [font-weight:var(--camber-font-weight)] [line-height:var(--camber-line-height-heading)]", children: value }),
|
|
1044
|
+
hint ? /* @__PURE__ */ jsx("p", { className: "[margin:0] text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-hint)]", children: hint }) : null
|
|
1045
|
+
] });
|
|
1046
|
+
}
|
|
1047
|
+
function EmptyState({ title, children, action, className }) {
|
|
1048
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(camberFont, "grid justify-items-center gap-[var(--camber-section-gap)] text-center", className), children: [
|
|
1049
|
+
/* @__PURE__ */ jsx(Heading, { as: "h2", size: 1.5, children: title }),
|
|
1050
|
+
/* @__PURE__ */ jsx(Paragraph, { children }),
|
|
1051
|
+
action
|
|
1052
|
+
] });
|
|
1053
|
+
}
|
|
1054
|
+
function Navbar({ brand, links, children, className }) {
|
|
1055
|
+
return /* @__PURE__ */ jsxs(
|
|
1056
|
+
"header",
|
|
1057
|
+
{
|
|
1058
|
+
className: cn(camberFont, "flex flex-wrap items-center justify-between gap-[var(--camber-space-8)]", className),
|
|
1059
|
+
children: [
|
|
1060
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--camber-font-size)] [font-weight:var(--camber-font-weight)] text-[var(--camber-surface-fg)]", children: brand }),
|
|
1061
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": "Primary", children: /* @__PURE__ */ jsx("ul", { className: "[margin:0] flex list-none flex-wrap items-center gap-[var(--camber-space-8)] [padding:0]", children: links.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: link.href, variant: "ghost", size: "sm", children: link.label }) }, link.href)) }) }),
|
|
1062
|
+
children ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-[var(--camber-space-8)]", children }) : null
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
function Footer({ note, links, className }) {
|
|
1068
|
+
return /* @__PURE__ */ jsxs(
|
|
1069
|
+
"footer",
|
|
1070
|
+
{
|
|
1071
|
+
className: cn(
|
|
1072
|
+
camberFont,
|
|
1073
|
+
"flex flex-wrap items-center justify-between gap-[var(--camber-space-8)] text-[length:var(--camber-font-size-sm)] text-[var(--camber-surface-hint)]",
|
|
1074
|
+
className
|
|
1075
|
+
),
|
|
1076
|
+
children: [
|
|
1077
|
+
/* @__PURE__ */ jsx("p", { className: "[margin:0]", children: note }),
|
|
1078
|
+
/* @__PURE__ */ jsx("ul", { className: "[margin:0] flex list-none flex-wrap gap-[var(--camber-space-16)] [padding:0]", children: links.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: link.href, children: link.label }) }, link.href)) })
|
|
1079
|
+
]
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1083
|
+
function Hero({ kicker, title, children, actions, className }) {
|
|
1084
|
+
return /* @__PURE__ */ jsxs("section", { className: cn(camberFont, "grid max-w-[36rem] gap-[var(--camber-section-gap)]", className), children: [
|
|
1085
|
+
kicker ? /* @__PURE__ */ jsx("p", { className: "[margin:0] text-[length:var(--camber-font-size-sm)] [font-weight:var(--camber-font-weight)] tracking-[0.06em] text-[var(--camber-button-primary-bg)] uppercase", children: kicker }) : null,
|
|
1086
|
+
/* @__PURE__ */ jsx(Heading, { as: "h1", children: title }),
|
|
1087
|
+
/* @__PURE__ */ jsx(Paragraph, { size: 1.15, children }),
|
|
1088
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-[var(--camber-space-8)]", children: actions }) : null
|
|
1089
|
+
] });
|
|
1090
|
+
}
|
|
1091
|
+
function Features({ title, items, className }) {
|
|
1092
|
+
return /* @__PURE__ */ jsxs("section", { className: cn(camberFont, "grid gap-[var(--camber-section-gap)]", className), children: [
|
|
1093
|
+
/* @__PURE__ */ jsx(Heading, { as: "h2", size: 1.6, children: title }),
|
|
1094
|
+
/* @__PURE__ */ jsx("ul", { className: "[margin:0] grid list-none gap-[var(--camber-space-16)] [padding:0] [grid-template-columns:repeat(auto-fit,minmax(11rem,1fr))]", children: items.map((item) => /* @__PURE__ */ jsxs("li", { className: "grid gap-[var(--camber-copy-gap)]", children: [
|
|
1095
|
+
/* @__PURE__ */ jsx(Heading, { as: "h3", size: 1.15, children: item.title }),
|
|
1096
|
+
/* @__PURE__ */ jsx(Paragraph, { children: item.body })
|
|
1097
|
+
] }, item.title)) })
|
|
1098
|
+
] });
|
|
1099
|
+
}
|
|
1100
|
+
function Pricing({ title, tiers, className }) {
|
|
1101
|
+
return /* @__PURE__ */ jsxs("section", { className: cn(camberFont, "grid gap-[var(--camber-section-gap)]", className), children: [
|
|
1102
|
+
/* @__PURE__ */ jsx(Heading, { as: "h2", size: 1.6, children: title }),
|
|
1103
|
+
/* @__PURE__ */ jsx("ul", { className: "[margin:0] grid list-none gap-[var(--camber-space-16)] [padding:0] [grid-template-columns:repeat(auto-fit,minmax(12rem,1fr))]", children: tiers.map((tier) => /* @__PURE__ */ jsxs("li", { className: cn(panel, elevation1, "grid content-start gap-[var(--camber-space-8)] p-[var(--camber-space-16)]"), children: [
|
|
1104
|
+
/* @__PURE__ */ jsx(Heading, { as: "h3", size: 1.15, children: tier.name }),
|
|
1105
|
+
/* @__PURE__ */ jsx("p", { className: "[margin:0] text-[length:calc(var(--camber-font-size)*2)] [font-weight:var(--camber-font-weight)] [line-height:var(--camber-line-height-heading)]", children: tier.price }),
|
|
1106
|
+
/* @__PURE__ */ jsx(Paragraph, { children: tier.detail }),
|
|
1107
|
+
/* @__PURE__ */ jsx("ul", { className: "[margin:0] grid list-disc gap-[var(--camber-space-4)] ps-[var(--camber-space-16)]", children: tier.features.map((feature) => /* @__PURE__ */ jsx("li", { children: feature }, feature)) }),
|
|
1108
|
+
tier.action
|
|
1109
|
+
] }, tier.name)) })
|
|
1110
|
+
] });
|
|
1111
|
+
}
|
|
1112
|
+
function Faq({ title, items, className }) {
|
|
1113
|
+
return /* @__PURE__ */ jsxs("section", { className: cn(camberFont, "grid gap-[var(--camber-section-gap)]", className), children: [
|
|
1114
|
+
/* @__PURE__ */ jsx(Heading, { as: "h2", size: 1.6, children: title }),
|
|
1115
|
+
/* @__PURE__ */ jsx(Accordion, { items })
|
|
1116
|
+
] });
|
|
1117
|
+
}
|
|
1118
|
+
function Testimonials({ title, quotes, className }) {
|
|
1119
|
+
return /* @__PURE__ */ jsxs("section", { className: cn(camberFont, "grid gap-[var(--camber-section-gap)]", className), children: [
|
|
1120
|
+
/* @__PURE__ */ jsx(Heading, { as: "h2", size: 1.6, children: title }),
|
|
1121
|
+
/* @__PURE__ */ jsx("ul", { className: "[margin:0] grid list-none gap-[var(--camber-section-gap)] [padding:0]", children: quotes.map((quote) => /* @__PURE__ */ jsxs("li", { className: "grid gap-[var(--camber-copy-gap)]", children: [
|
|
1122
|
+
/* @__PURE__ */ jsx(Quote, { children: quote.quote }),
|
|
1123
|
+
/* @__PURE__ */ jsxs(Paragraph, { children: [
|
|
1124
|
+
quote.name,
|
|
1125
|
+
", ",
|
|
1126
|
+
quote.role
|
|
1127
|
+
] })
|
|
1128
|
+
] }, quote.name)) })
|
|
1129
|
+
] });
|
|
1130
|
+
}
|
|
1131
|
+
function ContactForm({ action = "Send", onSubmit, className }) {
|
|
1132
|
+
const submit = (event) => {
|
|
1133
|
+
event.preventDefault();
|
|
1134
|
+
onSubmit?.(event);
|
|
1135
|
+
};
|
|
1136
|
+
return /* @__PURE__ */ jsxs("form", { className: cn("grid max-w-[28rem] gap-[var(--camber-space-16)]", className), onSubmit: submit, children: [
|
|
1137
|
+
/* @__PURE__ */ jsx(Field, { label: "Name", children: /* @__PURE__ */ jsx(Input, { autoComplete: "name" }) }),
|
|
1138
|
+
/* @__PURE__ */ jsx(Field, { label: "Email", hint: "We use this to reply.", children: /* @__PURE__ */ jsx(Input, { type: "email", autoComplete: "email" }) }),
|
|
1139
|
+
/* @__PURE__ */ jsx(Field, { label: "Message", children: /* @__PURE__ */ jsx(Textarea, { rows: 4 }) }),
|
|
1140
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", children: action })
|
|
1141
|
+
] });
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export { Accordion, Alert, Avatar, Breadcrumb, Button, ButtonGroup, Card, Checkbox, Code, ContactForm, Dialog, Divider, EmptyState, Faq, Features, Field, Footer, Heading, Hero, Input, Link, List, Menu, Navbar, Pagination, Paragraph, Pill, Pricing, Progress, Quote, Radio, Select, Slider, Spinner, Stat, Switch, Table, Tabs, Testimonials, Text, Textarea, Toast, codeScale, getTheme, headingScale, listScale, paragraphScale, pillToneClass, pillTones, quoteScale, setTheme, textScale };
|
|
1145
|
+
//# sourceMappingURL=index.js.map
|
|
1146
|
+
//# sourceMappingURL=index.js.map
|