@still-void/ui 3.0.1 → 3.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/CHANGELOG.md +40 -0
- package/dist/react/client/index.cjs +26 -20
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +7 -0
- package/dist/react/client/index.d.ts +7 -0
- package/dist/react/client/index.js +29 -20
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +453 -182
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +168 -2
- package/dist/react/index.d.ts +168 -2
- package/dist/react/index.js +439 -180
- package/dist/react/index.js.map +1 -1
- package/dist/style.css +244 -26
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -45,6 +45,11 @@ __export(react_exports, {
|
|
|
45
45
|
CardSkeleton: () => CardSkeleton,
|
|
46
46
|
CardTitle: () => CardTitle,
|
|
47
47
|
CategoryPill: () => CategoryPill,
|
|
48
|
+
ChartAxis: () => ChartAxis,
|
|
49
|
+
ChartBar: () => ChartBar,
|
|
50
|
+
ChartContainer: () => ChartContainer,
|
|
51
|
+
ChartGrid: () => ChartGrid,
|
|
52
|
+
ChartLine: () => ChartLine,
|
|
48
53
|
Checkbox: () => Checkbox,
|
|
49
54
|
CodeBlock: () => CodeBlock,
|
|
50
55
|
DEFAULT_ACCENT: () => DEFAULT_ACCENT,
|
|
@@ -60,12 +65,21 @@ __export(react_exports, {
|
|
|
60
65
|
Lead: () => Lead,
|
|
61
66
|
Logo: () => Logo,
|
|
62
67
|
NativeSelect: () => NativeSelect,
|
|
68
|
+
Pagination: () => Pagination,
|
|
69
|
+
PaginationContent: () => PaginationContent,
|
|
70
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
71
|
+
PaginationItem: () => PaginationItem,
|
|
72
|
+
PaginationLink: () => PaginationLink,
|
|
73
|
+
PaginationNext: () => PaginationNext,
|
|
74
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
63
75
|
PostCard: () => PostCard,
|
|
64
76
|
PostGrid: () => PostGrid,
|
|
77
|
+
Progress: () => Progress,
|
|
65
78
|
Prose: () => Prose,
|
|
66
79
|
READING_PROGRESS_VAR: () => READING_PROGRESS_VAR,
|
|
67
80
|
RadioGroup: () => RadioGroup,
|
|
68
81
|
RadioGroupItem: () => RadioGroupItem,
|
|
82
|
+
Separator: () => Separator,
|
|
69
83
|
Sidebar: () => Sidebar,
|
|
70
84
|
SidebarSection: () => SidebarSection,
|
|
71
85
|
Skeleton: () => Skeleton,
|
|
@@ -101,6 +115,7 @@ __export(react_exports, {
|
|
|
101
115
|
featuredPostCardClasses: () => featuredPostCardClasses,
|
|
102
116
|
field: () => field,
|
|
103
117
|
fieldClasses: () => fieldClasses,
|
|
118
|
+
fieldMessage: () => fieldMessage,
|
|
104
119
|
fontFamilies: () => fontFamilies,
|
|
105
120
|
fontSizes: () => fontSizes,
|
|
106
121
|
fontWeights: () => fontWeights,
|
|
@@ -140,6 +155,66 @@ __export(react_exports, {
|
|
|
140
155
|
});
|
|
141
156
|
module.exports = __toCommonJS(react_exports);
|
|
142
157
|
|
|
158
|
+
// src/components/ui/icon.tsx
|
|
159
|
+
var React = __toESM(require("react"), 1);
|
|
160
|
+
|
|
161
|
+
// src/lib/utils.ts
|
|
162
|
+
var import_clsx = require("clsx");
|
|
163
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
164
|
+
function cn(...inputs) {
|
|
165
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// src/components/ui/icon-set.ts
|
|
169
|
+
var import_outline = require("@heroicons/react/24/outline");
|
|
170
|
+
var ICON_GLYPHS = {
|
|
171
|
+
x: import_outline.XMarkIcon,
|
|
172
|
+
check: import_outline.CheckIcon,
|
|
173
|
+
"chevron-down": import_outline.ChevronDownIcon,
|
|
174
|
+
"chevron-up": import_outline.ChevronUpIcon,
|
|
175
|
+
"chevron-right": import_outline.ChevronRightIcon,
|
|
176
|
+
"chevron-left": import_outline.ChevronLeftIcon,
|
|
177
|
+
info: import_outline.InformationCircleIcon,
|
|
178
|
+
"alert-triangle": import_outline.ExclamationTriangleIcon,
|
|
179
|
+
"alert-circle": import_outline.ExclamationCircleIcon,
|
|
180
|
+
"check-circle": import_outline.CheckCircleIcon,
|
|
181
|
+
copy: import_outline.DocumentDuplicateIcon,
|
|
182
|
+
sun: import_outline.SunIcon,
|
|
183
|
+
moon: import_outline.MoonIcon,
|
|
184
|
+
search: import_outline.MagnifyingGlassIcon,
|
|
185
|
+
menu: import_outline.Bars3Icon,
|
|
186
|
+
camera: import_outline.CameraIcon,
|
|
187
|
+
blocked: import_outline.NoSymbolIcon,
|
|
188
|
+
pending: import_outline.ClockIcon
|
|
189
|
+
};
|
|
190
|
+
var ICON_NAMES = Object.keys(ICON_GLYPHS);
|
|
191
|
+
var ICON_FALLBACK_NAME = "alert-circle";
|
|
192
|
+
|
|
193
|
+
// src/components/ui/icon.tsx
|
|
194
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
195
|
+
var Icon = React.forwardRef(
|
|
196
|
+
({ name, size = "md", label, className, ...props }, ref) => {
|
|
197
|
+
const Glyph = ICON_GLYPHS[name] ?? ICON_GLYPHS[ICON_FALLBACK_NAME];
|
|
198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
199
|
+
Glyph,
|
|
200
|
+
{
|
|
201
|
+
...props,
|
|
202
|
+
ref,
|
|
203
|
+
className: cn(
|
|
204
|
+
"sv-icon",
|
|
205
|
+
size === "sm" && "sv-icon--sm",
|
|
206
|
+
size === "lg" && "sv-icon--lg",
|
|
207
|
+
className
|
|
208
|
+
),
|
|
209
|
+
"aria-hidden": label === void 0 ? "true" : void 0,
|
|
210
|
+
role: label === void 0 ? void 0 : "img",
|
|
211
|
+
"aria-label": label
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
Icon.displayName = "Icon";
|
|
217
|
+
|
|
143
218
|
// src/recipes/cx.ts
|
|
144
219
|
function cx(...parts) {
|
|
145
220
|
return parts.filter(Boolean).join(" ");
|
|
@@ -151,6 +226,10 @@ function header(options = {}) {
|
|
|
151
226
|
}
|
|
152
227
|
var headerClasses = {
|
|
153
228
|
nav: "sv-header__nav",
|
|
229
|
+
/** Wraps <nav> in a native <details> — collapsible below 640px, a no-op
|
|
230
|
+
* wrapper above it, with zero JavaScript (see DESIGN.md §5 Navigation). */
|
|
231
|
+
navToggle: "sv-header__nav-toggle",
|
|
232
|
+
navSummary: "sv-header__nav-summary",
|
|
154
233
|
link: "sv-header__link",
|
|
155
234
|
linkActive: cx("sv-header__link", "sv-header__link--active"),
|
|
156
235
|
actions: "sv-header__actions"
|
|
@@ -170,33 +249,39 @@ var footerClasses = {
|
|
|
170
249
|
};
|
|
171
250
|
|
|
172
251
|
// src/react/components/Shell.tsx
|
|
173
|
-
var
|
|
252
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
174
253
|
function Logo({ label, href = "/", className, ...rest }) {
|
|
175
|
-
return /* @__PURE__ */ (0,
|
|
176
|
-
/* @__PURE__ */ (0,
|
|
254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("a", { href, className: cx(logo(), className), ...rest, children: [
|
|
255
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: logoClasses.dot, "aria-hidden": "true" }),
|
|
177
256
|
label
|
|
178
257
|
] });
|
|
179
258
|
}
|
|
180
259
|
function Header({ logo: logoSlot, items = [], actions, glass, className, ...rest }) {
|
|
181
|
-
return /* @__PURE__ */ (0,
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: cx(header({ glass }), className), ...rest, children: [
|
|
182
261
|
logoSlot,
|
|
183
|
-
items.length > 0 &&
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
262
|
+
items.length > 0 && // <details> makes the nav collapsible below 640px with zero
|
|
263
|
+
// JavaScript: CSS forces it open above that width (a no-op wrapper),
|
|
264
|
+
// native click-to-toggle handles it below (see DESIGN.md §5).
|
|
265
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("details", { className: headerClasses.navToggle, children: [
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("summary", { className: headerClasses.navSummary, "aria-label": "Menu", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: "menu" }) }),
|
|
267
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("nav", { className: headerClasses.nav, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
268
|
+
"a",
|
|
269
|
+
{
|
|
270
|
+
href: item.href,
|
|
271
|
+
className: item.active ? headerClasses.linkActive : headerClasses.link,
|
|
272
|
+
"aria-current": item.active ? "page" : void 0,
|
|
273
|
+
children: item.label
|
|
274
|
+
},
|
|
275
|
+
item.href
|
|
276
|
+
)) })
|
|
277
|
+
] }),
|
|
278
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: headerClasses.actions, children: actions })
|
|
194
279
|
] });
|
|
195
280
|
}
|
|
196
281
|
function Footer({ author, links = [], children, className, ...rest }) {
|
|
197
|
-
return /* @__PURE__ */ (0,
|
|
198
|
-
author && /* @__PURE__ */ (0,
|
|
199
|
-
links.length > 0 && /* @__PURE__ */ (0,
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("footer", { className: cx(footer(), className), ...rest, children: [
|
|
283
|
+
author && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: author }),
|
|
284
|
+
links.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: footerClasses.links, children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { href: link.href, className: footerClasses.link, children: link.label }, link.href)) }),
|
|
200
285
|
children
|
|
201
286
|
] });
|
|
202
287
|
}
|
|
@@ -363,15 +448,15 @@ function resolveCategoryColor(color) {
|
|
|
363
448
|
}
|
|
364
449
|
|
|
365
450
|
// src/react/components/Content.tsx
|
|
366
|
-
var
|
|
451
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
367
452
|
function CategoryPill({ label, color, active, interactive, className, style, ...rest }) {
|
|
368
453
|
const pillStyle = color ? { ...style, "--sv-pill-color": resolveCategoryColor(color) } : style;
|
|
369
|
-
const content = /* @__PURE__ */ (0,
|
|
370
|
-
/* @__PURE__ */ (0,
|
|
454
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: categoryPillClasses.dot, "aria-hidden": "true" }),
|
|
371
456
|
label
|
|
372
457
|
] });
|
|
373
458
|
if (interactive) {
|
|
374
|
-
return /* @__PURE__ */ (0,
|
|
459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
375
460
|
"button",
|
|
376
461
|
{
|
|
377
462
|
type: "button",
|
|
@@ -383,7 +468,7 @@ function CategoryPill({ label, color, active, interactive, className, style, ...
|
|
|
383
468
|
}
|
|
384
469
|
);
|
|
385
470
|
}
|
|
386
|
-
return /* @__PURE__ */ (0,
|
|
471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
387
472
|
"span",
|
|
388
473
|
{
|
|
389
474
|
className: cx(categoryPill({ active, interactive }), className),
|
|
@@ -395,65 +480,65 @@ function CategoryPill({ label, color, active, interactive, className, style, ...
|
|
|
395
480
|
}
|
|
396
481
|
function PostMeta({ post }) {
|
|
397
482
|
if (!post.category && !post.date && post.readMinutes === void 0) return null;
|
|
398
|
-
return /* @__PURE__ */ (0,
|
|
399
|
-
post.category && /* @__PURE__ */ (0,
|
|
400
|
-
post.date && /* @__PURE__ */ (0,
|
|
401
|
-
post.readMinutes !== void 0 && /* @__PURE__ */ (0,
|
|
483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: postCardClasses.meta, children: [
|
|
484
|
+
post.category && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CategoryPill, { label: post.category.label, color: post.category.color }),
|
|
485
|
+
post.date && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: post.date }),
|
|
486
|
+
post.readMinutes !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
|
|
402
487
|
post.readMinutes,
|
|
403
488
|
" min"
|
|
404
489
|
] })
|
|
405
490
|
] });
|
|
406
491
|
}
|
|
407
492
|
function PostCard({ post, dense, className, children, ...rest }) {
|
|
408
|
-
return /* @__PURE__ */ (0,
|
|
409
|
-
/* @__PURE__ */ (0,
|
|
410
|
-
/* @__PURE__ */ (0,
|
|
411
|
-
!dense && post.excerpt && /* @__PURE__ */ (0,
|
|
493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("article", { className: cx(postCard({ dense }), className), ...rest, children: [
|
|
494
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PostMeta, { post }),
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: postCardClasses.title, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: post.href, children: post.title }) }),
|
|
496
|
+
!dense && post.excerpt && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: postCardClasses.excerpt, children: post.excerpt }),
|
|
412
497
|
children
|
|
413
498
|
] });
|
|
414
499
|
}
|
|
415
500
|
function FeaturedPostCard({ post, visual, className, children, ...rest }) {
|
|
416
|
-
return /* @__PURE__ */ (0,
|
|
417
|
-
/* @__PURE__ */ (0,
|
|
418
|
-
/* @__PURE__ */ (0,
|
|
419
|
-
/* @__PURE__ */ (0,
|
|
420
|
-
post.excerpt && /* @__PURE__ */ (0,
|
|
501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("article", { className: cx(featuredPostCard(), className), ...rest, children: [
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: featuredPostCardClasses.body, children: [
|
|
503
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PostMeta, { post }),
|
|
504
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: featuredPostCardClasses.title, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: post.href, children: post.title }) }),
|
|
505
|
+
post.excerpt && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: postCardClasses.excerpt, children: post.excerpt }),
|
|
421
506
|
children
|
|
422
507
|
] }),
|
|
423
|
-
visual && /* @__PURE__ */ (0,
|
|
508
|
+
visual && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: featuredPostCardClasses.visual, children: visual })
|
|
424
509
|
] });
|
|
425
510
|
}
|
|
426
511
|
function PostGrid({ className, ...rest }) {
|
|
427
|
-
return /* @__PURE__ */ (0,
|
|
512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cx(postGrid(), className), ...rest });
|
|
428
513
|
}
|
|
429
514
|
function Layout({ withSidebar, className, ...rest }) {
|
|
430
|
-
return /* @__PURE__ */ (0,
|
|
515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cx(layout({ withSidebar }), className), ...rest });
|
|
431
516
|
}
|
|
432
517
|
function Sidebar({ className, ...rest }) {
|
|
433
|
-
return /* @__PURE__ */ (0,
|
|
518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("aside", { className: cx(sidebar(), className), ...rest });
|
|
434
519
|
}
|
|
435
520
|
function SidebarSection({ title, children, ...rest }) {
|
|
436
|
-
return /* @__PURE__ */ (0,
|
|
437
|
-
/* @__PURE__ */ (0,
|
|
521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { ...rest, children: [
|
|
522
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h4", { className: sidebarClasses.sectionTitle, children: title }),
|
|
438
523
|
children
|
|
439
524
|
] });
|
|
440
525
|
}
|
|
441
526
|
function Hero({ eyebrow, title, description, className, children, ...rest }) {
|
|
442
|
-
return /* @__PURE__ */ (0,
|
|
443
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
444
|
-
/* @__PURE__ */ (0,
|
|
445
|
-
description && /* @__PURE__ */ (0,
|
|
527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: cx(hero(), className), ...rest, children: [
|
|
528
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: heroClasses.eyebrow, children: eyebrow }),
|
|
529
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: heroClasses.title, children: title }),
|
|
530
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: heroClasses.description, children: description }),
|
|
446
531
|
children
|
|
447
532
|
] });
|
|
448
533
|
}
|
|
449
534
|
function Skeleton({ small, className, ...rest }) {
|
|
450
|
-
return /* @__PURE__ */ (0,
|
|
535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cx(skeletonLine({ small }), className), "aria-hidden": "true", ...rest });
|
|
451
536
|
}
|
|
452
537
|
function CardSkeleton({ className, ...rest }) {
|
|
453
|
-
return /* @__PURE__ */ (0,
|
|
454
|
-
/* @__PURE__ */ (0,
|
|
455
|
-
/* @__PURE__ */ (0,
|
|
456
|
-
/* @__PURE__ */ (0,
|
|
538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cx(cardSkeleton(), className), "aria-hidden": "true", ...rest, children: [
|
|
539
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { small: true }),
|
|
540
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, {}),
|
|
541
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, {})
|
|
457
542
|
] });
|
|
458
543
|
}
|
|
459
544
|
|
|
@@ -511,7 +596,7 @@ var proseClasses = {
|
|
|
511
596
|
};
|
|
512
597
|
|
|
513
598
|
// src/react/components/Article.tsx
|
|
514
|
-
var
|
|
599
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
515
600
|
function CodeBlock({
|
|
516
601
|
code,
|
|
517
602
|
language,
|
|
@@ -521,18 +606,18 @@ function CodeBlock({
|
|
|
521
606
|
className,
|
|
522
607
|
...rest
|
|
523
608
|
}) {
|
|
524
|
-
return /* @__PURE__ */ (0,
|
|
525
|
-
/* @__PURE__ */ (0,
|
|
526
|
-
/* @__PURE__ */ (0,
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("figure", { className: cx(codeBlock(), className), ...rest, children: [
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("figcaption", { className: codeBlockClasses.header, children: [
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: filename ?? language ?? "code" }),
|
|
527
612
|
actions
|
|
528
613
|
] }),
|
|
529
|
-
/* @__PURE__ */ (0,
|
|
614
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("pre", { className: codeBlockClasses.pre, children: rendered ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("code", { children: code }) })
|
|
530
615
|
] });
|
|
531
616
|
}
|
|
532
617
|
function Callout({ kind, label, className, children, ...rest }) {
|
|
533
|
-
return /* @__PURE__ */ (0,
|
|
534
|
-
/* @__PURE__ */ (0,
|
|
535
|
-
/* @__PURE__ */ (0,
|
|
618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("aside", { className: cx(callout(kind), className), ...rest, children: [
|
|
619
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: calloutClasses.label, children: label ?? calloutLabels[kind] }),
|
|
620
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { children })
|
|
536
621
|
] });
|
|
537
622
|
}
|
|
538
623
|
function ArticleHeader({
|
|
@@ -544,13 +629,13 @@ function ArticleHeader({
|
|
|
544
629
|
className,
|
|
545
630
|
...rest
|
|
546
631
|
}) {
|
|
547
|
-
return /* @__PURE__ */ (0,
|
|
632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: cx(articleHeader(), className), ...rest, children: [
|
|
548
633
|
eyebrow,
|
|
549
|
-
/* @__PURE__ */ (0,
|
|
550
|
-
(author || date || readMinutes !== void 0) && /* @__PURE__ */ (0,
|
|
551
|
-
author && /* @__PURE__ */ (0,
|
|
552
|
-
date && /* @__PURE__ */ (0,
|
|
553
|
-
readMinutes !== void 0 && /* @__PURE__ */ (0,
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h1", { className: articleHeaderClasses.title, children: title }),
|
|
635
|
+
(author || date || readMinutes !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: articleHeaderClasses.meta, children: [
|
|
636
|
+
author && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: articleHeaderClasses.author, children: author }),
|
|
637
|
+
date && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: date }),
|
|
638
|
+
readMinutes !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { children: [
|
|
554
639
|
readMinutes,
|
|
555
640
|
" min"
|
|
556
641
|
] })
|
|
@@ -558,17 +643,17 @@ function ArticleHeader({
|
|
|
558
643
|
] });
|
|
559
644
|
}
|
|
560
645
|
function Prose({ className, ...rest }) {
|
|
561
|
-
return /* @__PURE__ */ (0,
|
|
646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cx(prose(), className), ...rest });
|
|
562
647
|
}
|
|
563
648
|
function Lead({ className, ...rest }) {
|
|
564
|
-
return /* @__PURE__ */ (0,
|
|
649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: cx(proseClasses.lead, className), ...rest });
|
|
565
650
|
}
|
|
566
651
|
|
|
567
652
|
// src/behaviors/themeManager.ts
|
|
568
653
|
var DEFAULT_STORAGE_KEY = "still-void-theme";
|
|
569
654
|
|
|
570
655
|
// src/react/components/ThemeScript.tsx
|
|
571
|
-
var
|
|
656
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
572
657
|
function toScriptLiteral(value) {
|
|
573
658
|
return JSON.stringify(value).replace(/</g, "\\u003c");
|
|
574
659
|
}
|
|
@@ -577,23 +662,14 @@ function ThemeScript({ storageKey = DEFAULT_STORAGE_KEY, nonce } = {}) {
|
|
|
577
662
|
const accents2 = toScriptLiteral(accentNames);
|
|
578
663
|
const key = toScriptLiteral(storageKey);
|
|
579
664
|
const script = `(function(){try{var s=JSON.parse(localStorage.getItem(${key})||"null");if(!s)return;var m=${modes},a=${accents2},r=document.documentElement;if(m.indexOf(s.mode)!==-1)r.setAttribute("data-theme",s.mode);if(a.indexOf(s.accent)!==-1)r.setAttribute("data-accent",s.accent);}catch(e){}})();`;
|
|
580
|
-
return /* @__PURE__ */ (0,
|
|
665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("script", { nonce, dangerouslySetInnerHTML: { __html: script } });
|
|
581
666
|
}
|
|
582
667
|
|
|
583
668
|
// src/components/ui/button.tsx
|
|
584
|
-
var
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
589
|
-
function cn(...inputs) {
|
|
590
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
// src/components/ui/button.tsx
|
|
594
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
595
|
-
var Button = React.forwardRef(
|
|
596
|
-
({ className, variant = "default", size = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
669
|
+
var React2 = __toESM(require("react"), 1);
|
|
670
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
671
|
+
var Button = React2.forwardRef(
|
|
672
|
+
({ className, variant = "default", size = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
597
673
|
"button",
|
|
598
674
|
{
|
|
599
675
|
className: cn(
|
|
@@ -617,10 +693,10 @@ var Button = React.forwardRef(
|
|
|
617
693
|
Button.displayName = "Button";
|
|
618
694
|
|
|
619
695
|
// src/components/ui/card.tsx
|
|
620
|
-
var
|
|
696
|
+
var React4 = __toESM(require("react"), 1);
|
|
621
697
|
|
|
622
698
|
// src/components/ui/slot.tsx
|
|
623
|
-
var
|
|
699
|
+
var React3 = __toESM(require("react"), 1);
|
|
624
700
|
function composeRefs(...refs) {
|
|
625
701
|
return (node) => {
|
|
626
702
|
for (const ref of refs) {
|
|
@@ -653,9 +729,9 @@ function mergeProps(slotProps, childProps) {
|
|
|
653
729
|
}
|
|
654
730
|
return merged;
|
|
655
731
|
}
|
|
656
|
-
var Slot =
|
|
732
|
+
var Slot = React3.forwardRef(
|
|
657
733
|
({ children, ...slotProps }, forwardedRef) => {
|
|
658
|
-
if (!
|
|
734
|
+
if (!React3.isValidElement(children) || React3.Children.count(children) !== 1 || children.type === React3.Fragment) {
|
|
659
735
|
throw new Error(
|
|
660
736
|
"Slot expected a single React element child. Pass exactly one element to asChild."
|
|
661
737
|
);
|
|
@@ -664,21 +740,21 @@ var Slot = React2.forwardRef(
|
|
|
664
740
|
const childRef = child.props.ref ?? null;
|
|
665
741
|
const mergedProps = mergeProps(slotProps, child.props);
|
|
666
742
|
mergedProps.ref = forwardedRef ? composeRefs(forwardedRef, childRef) : childRef;
|
|
667
|
-
return
|
|
743
|
+
return React3.cloneElement(child, mergedProps);
|
|
668
744
|
}
|
|
669
745
|
);
|
|
670
746
|
Slot.displayName = "Slot";
|
|
671
747
|
|
|
672
748
|
// src/components/ui/card.tsx
|
|
673
|
-
var
|
|
749
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
674
750
|
var CARD_ELEMENTS = /* @__PURE__ */ new Set(["div", "section", "article", "li", "aside"]);
|
|
675
|
-
var Card =
|
|
751
|
+
var Card = React4.forwardRef(
|
|
676
752
|
({ className, as, asChild = false, ...props }, ref) => {
|
|
677
753
|
if (asChild) {
|
|
678
|
-
return /* @__PURE__ */ (0,
|
|
754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Slot, { ref, className: cn("sv-card", className), ...props });
|
|
679
755
|
}
|
|
680
756
|
const Comp = as !== void 0 && CARD_ELEMENTS.has(as) ? as : "div";
|
|
681
|
-
return
|
|
757
|
+
return React4.createElement(Comp, {
|
|
682
758
|
ref,
|
|
683
759
|
className: cn("sv-card", className),
|
|
684
760
|
...props
|
|
@@ -686,21 +762,21 @@ var Card = React3.forwardRef(
|
|
|
686
762
|
}
|
|
687
763
|
);
|
|
688
764
|
Card.displayName = "Card";
|
|
689
|
-
var CardHeader =
|
|
765
|
+
var CardHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("sv-card__header", className), ...props }));
|
|
690
766
|
CardHeader.displayName = "CardHeader";
|
|
691
|
-
var CardTitle =
|
|
767
|
+
var CardTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { ref, className: cn("sv-card__title", className), ...props }));
|
|
692
768
|
CardTitle.displayName = "CardTitle";
|
|
693
|
-
var CardDescription =
|
|
769
|
+
var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { ref, className: cn("sv-card__description", className), ...props }));
|
|
694
770
|
CardDescription.displayName = "CardDescription";
|
|
695
|
-
var CardContent =
|
|
771
|
+
var CardContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("sv-card__content", className), ...props }));
|
|
696
772
|
CardContent.displayName = "CardContent";
|
|
697
|
-
var CardFooter =
|
|
773
|
+
var CardFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("sv-card__footer", className), ...props }));
|
|
698
774
|
CardFooter.displayName = "CardFooter";
|
|
699
775
|
|
|
700
776
|
// src/components/ui/alert.tsx
|
|
701
|
-
var
|
|
702
|
-
var
|
|
703
|
-
var Alert =
|
|
777
|
+
var React5 = __toESM(require("react"), 1);
|
|
778
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
779
|
+
var Alert = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
704
780
|
"div",
|
|
705
781
|
{
|
|
706
782
|
ref,
|
|
@@ -710,16 +786,16 @@ var Alert = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
710
786
|
}
|
|
711
787
|
));
|
|
712
788
|
Alert.displayName = "Alert";
|
|
713
|
-
var AlertTitle =
|
|
789
|
+
var AlertTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h5", { ref, className: cn("sv-alert__title", className), ...props }));
|
|
714
790
|
AlertTitle.displayName = "AlertTitle";
|
|
715
|
-
var AlertDescription =
|
|
791
|
+
var AlertDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref, className: cn("sv-alert__description", className), ...props }));
|
|
716
792
|
AlertDescription.displayName = "AlertDescription";
|
|
717
793
|
|
|
718
794
|
// src/components/ui/badge.tsx
|
|
719
|
-
var
|
|
720
|
-
var
|
|
795
|
+
var React6 = require("react");
|
|
796
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
721
797
|
function Badge({ className, variant = "default", ...props }) {
|
|
722
|
-
return /* @__PURE__ */ (0,
|
|
798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
723
799
|
"div",
|
|
724
800
|
{
|
|
725
801
|
className: cn(
|
|
@@ -734,56 +810,6 @@ function Badge({ className, variant = "default", ...props }) {
|
|
|
734
810
|
);
|
|
735
811
|
}
|
|
736
812
|
|
|
737
|
-
// src/components/ui/icon.tsx
|
|
738
|
-
var React6 = __toESM(require("react"), 1);
|
|
739
|
-
|
|
740
|
-
// src/components/ui/icon-set.ts
|
|
741
|
-
var import_outline = require("@heroicons/react/24/outline");
|
|
742
|
-
var ICON_GLYPHS = {
|
|
743
|
-
x: import_outline.XMarkIcon,
|
|
744
|
-
check: import_outline.CheckIcon,
|
|
745
|
-
"chevron-down": import_outline.ChevronDownIcon,
|
|
746
|
-
"chevron-up": import_outline.ChevronUpIcon,
|
|
747
|
-
"chevron-right": import_outline.ChevronRightIcon,
|
|
748
|
-
"chevron-left": import_outline.ChevronLeftIcon,
|
|
749
|
-
info: import_outline.InformationCircleIcon,
|
|
750
|
-
"alert-triangle": import_outline.ExclamationTriangleIcon,
|
|
751
|
-
"alert-circle": import_outline.ExclamationCircleIcon,
|
|
752
|
-
"check-circle": import_outline.CheckCircleIcon,
|
|
753
|
-
copy: import_outline.DocumentDuplicateIcon,
|
|
754
|
-
sun: import_outline.SunIcon,
|
|
755
|
-
moon: import_outline.MoonIcon,
|
|
756
|
-
search: import_outline.MagnifyingGlassIcon,
|
|
757
|
-
menu: import_outline.Bars3Icon
|
|
758
|
-
};
|
|
759
|
-
var ICON_NAMES = Object.keys(ICON_GLYPHS);
|
|
760
|
-
var ICON_FALLBACK_NAME = "alert-circle";
|
|
761
|
-
|
|
762
|
-
// src/components/ui/icon.tsx
|
|
763
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
764
|
-
var Icon = React6.forwardRef(
|
|
765
|
-
({ name, size = "md", label, className, ...props }, ref) => {
|
|
766
|
-
const Glyph = ICON_GLYPHS[name] ?? ICON_GLYPHS[ICON_FALLBACK_NAME];
|
|
767
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
768
|
-
Glyph,
|
|
769
|
-
{
|
|
770
|
-
...props,
|
|
771
|
-
ref,
|
|
772
|
-
className: cn(
|
|
773
|
-
"sv-icon",
|
|
774
|
-
size === "sm" && "sv-icon--sm",
|
|
775
|
-
size === "lg" && "sv-icon--lg",
|
|
776
|
-
className
|
|
777
|
-
),
|
|
778
|
-
"aria-hidden": label === void 0 ? "true" : void 0,
|
|
779
|
-
role: label === void 0 ? void 0 : "img",
|
|
780
|
-
"aria-label": label
|
|
781
|
-
}
|
|
782
|
-
);
|
|
783
|
-
}
|
|
784
|
-
);
|
|
785
|
-
Icon.displayName = "Icon";
|
|
786
|
-
|
|
787
813
|
// src/components/ui/input.tsx
|
|
788
814
|
var React7 = __toESM(require("react"), 1);
|
|
789
815
|
|
|
@@ -798,6 +824,9 @@ var fieldClasses = {
|
|
|
798
824
|
choice: "sv-choice",
|
|
799
825
|
srOnly: "sv-sr-only"
|
|
800
826
|
};
|
|
827
|
+
function fieldMessage(options = {}) {
|
|
828
|
+
return cx("sv-field-message", options.variant === "error" && "sv-field-message--error");
|
|
829
|
+
}
|
|
801
830
|
|
|
802
831
|
// src/components/ui/input.tsx
|
|
803
832
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
@@ -877,12 +906,239 @@ var Checkbox = React11.forwardRef(
|
|
|
877
906
|
);
|
|
878
907
|
Checkbox.displayName = "Checkbox";
|
|
879
908
|
|
|
880
|
-
// src/components/ui/
|
|
909
|
+
// src/components/ui/separator.tsx
|
|
881
910
|
var React12 = __toESM(require("react"), 1);
|
|
882
911
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
883
|
-
var
|
|
884
|
-
({ className,
|
|
885
|
-
|
|
912
|
+
var Separator = React12.forwardRef(
|
|
913
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
914
|
+
"div",
|
|
915
|
+
{
|
|
916
|
+
...props,
|
|
917
|
+
ref,
|
|
918
|
+
role: decorative ? void 0 : "separator",
|
|
919
|
+
"aria-orientation": !decorative && orientation === "vertical" ? "vertical" : void 0,
|
|
920
|
+
className: cn(
|
|
921
|
+
"sv-separator",
|
|
922
|
+
orientation === "vertical" && "sv-separator--vertical",
|
|
923
|
+
className
|
|
924
|
+
)
|
|
925
|
+
}
|
|
926
|
+
)
|
|
927
|
+
);
|
|
928
|
+
Separator.displayName = "Separator";
|
|
929
|
+
|
|
930
|
+
// src/components/ui/progress.tsx
|
|
931
|
+
var React13 = __toESM(require("react"), 1);
|
|
932
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
933
|
+
function clamp(value, max) {
|
|
934
|
+
return Math.min(Math.max(value, 0), max);
|
|
935
|
+
}
|
|
936
|
+
function normalizeMax(max) {
|
|
937
|
+
return Number.isFinite(max) && max > 0 ? max : 0;
|
|
938
|
+
}
|
|
939
|
+
var Progress = React13.forwardRef(
|
|
940
|
+
({ className, value = 0, max = 100, ...props }, ref) => {
|
|
941
|
+
const safeMax = normalizeMax(max);
|
|
942
|
+
const clamped = clamp(value, safeMax);
|
|
943
|
+
const percent = safeMax === 0 ? 0 : clamped / safeMax * 100;
|
|
944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
945
|
+
"div",
|
|
946
|
+
{
|
|
947
|
+
...props,
|
|
948
|
+
ref,
|
|
949
|
+
role: "progressbar",
|
|
950
|
+
"aria-valuenow": clamped,
|
|
951
|
+
"aria-valuemin": 0,
|
|
952
|
+
"aria-valuemax": safeMax,
|
|
953
|
+
className: cn("sv-progress", className),
|
|
954
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "sv-progress__indicator", style: { width: `${percent}%` } })
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
}
|
|
958
|
+
);
|
|
959
|
+
Progress.displayName = "Progress";
|
|
960
|
+
|
|
961
|
+
// src/components/ui/pagination.tsx
|
|
962
|
+
var React14 = __toESM(require("react"), 1);
|
|
963
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
964
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { ...props, "aria-label": "pagination", className: cn("sv-pagination", className) });
|
|
965
|
+
Pagination.displayName = "Pagination";
|
|
966
|
+
var PaginationContent = React14.forwardRef(
|
|
967
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { ref, className: cn("sv-pagination__content", className), ...props })
|
|
968
|
+
);
|
|
969
|
+
PaginationContent.displayName = "PaginationContent";
|
|
970
|
+
var PaginationItem = React14.forwardRef(
|
|
971
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { ref, className: cn("sv-pagination__item", className), ...props })
|
|
972
|
+
);
|
|
973
|
+
PaginationItem.displayName = "PaginationItem";
|
|
974
|
+
var PaginationLink = React14.forwardRef(
|
|
975
|
+
({ className, isActive = false, href, ...props }, ref) => {
|
|
976
|
+
const sharedClassName = cn(
|
|
977
|
+
"sv-pagination__link",
|
|
978
|
+
isActive && "sv-pagination__link--active",
|
|
979
|
+
className
|
|
980
|
+
);
|
|
981
|
+
const sharedAria = isActive ? { "aria-current": "page" } : {};
|
|
982
|
+
if (href !== void 0) {
|
|
983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
984
|
+
"a",
|
|
985
|
+
{
|
|
986
|
+
ref,
|
|
987
|
+
href,
|
|
988
|
+
className: sharedClassName,
|
|
989
|
+
...sharedAria,
|
|
990
|
+
...props
|
|
991
|
+
}
|
|
992
|
+
);
|
|
993
|
+
}
|
|
994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
995
|
+
"button",
|
|
996
|
+
{
|
|
997
|
+
ref,
|
|
998
|
+
type: "button",
|
|
999
|
+
className: sharedClassName,
|
|
1000
|
+
...sharedAria,
|
|
1001
|
+
...props
|
|
1002
|
+
}
|
|
1003
|
+
);
|
|
1004
|
+
}
|
|
1005
|
+
);
|
|
1006
|
+
PaginationLink.displayName = "PaginationLink";
|
|
1007
|
+
var PaginationPrevious = React14.forwardRef(({ className, label = "Previous", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1008
|
+
PaginationLink,
|
|
1009
|
+
{
|
|
1010
|
+
ref,
|
|
1011
|
+
"aria-label": label,
|
|
1012
|
+
className: cn("sv-pagination__link--previous", className),
|
|
1013
|
+
...props,
|
|
1014
|
+
children: [
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "chevron-left" }),
|
|
1016
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: label })
|
|
1017
|
+
]
|
|
1018
|
+
}
|
|
1019
|
+
));
|
|
1020
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
1021
|
+
var PaginationNext = React14.forwardRef(
|
|
1022
|
+
({ className, label = "Next", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1023
|
+
PaginationLink,
|
|
1024
|
+
{
|
|
1025
|
+
ref,
|
|
1026
|
+
"aria-label": label,
|
|
1027
|
+
className: cn("sv-pagination__link--next", className),
|
|
1028
|
+
...props,
|
|
1029
|
+
children: [
|
|
1030
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: label }),
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "chevron-right" })
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
)
|
|
1035
|
+
);
|
|
1036
|
+
PaginationNext.displayName = "PaginationNext";
|
|
1037
|
+
var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", className: cn("sv-pagination__ellipsis", className), ...props, children: "\u2026" });
|
|
1038
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
1039
|
+
|
|
1040
|
+
// src/components/ui/chart.tsx
|
|
1041
|
+
var React15 = __toESM(require("react"), 1);
|
|
1042
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1043
|
+
var ChartContainer = React15.forwardRef(
|
|
1044
|
+
({ width, height, className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1045
|
+
"svg",
|
|
1046
|
+
{
|
|
1047
|
+
ref,
|
|
1048
|
+
role: "img",
|
|
1049
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
1050
|
+
width,
|
|
1051
|
+
height,
|
|
1052
|
+
className: cn("sv-chart", className),
|
|
1053
|
+
...props,
|
|
1054
|
+
children
|
|
1055
|
+
}
|
|
1056
|
+
)
|
|
1057
|
+
);
|
|
1058
|
+
ChartContainer.displayName = "ChartContainer";
|
|
1059
|
+
var ChartGrid = ({ orientation, positions, width, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: positions.map(
|
|
1060
|
+
(position) => orientation === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1061
|
+
"line",
|
|
1062
|
+
{
|
|
1063
|
+
x1: 0,
|
|
1064
|
+
y1: position,
|
|
1065
|
+
x2: width,
|
|
1066
|
+
y2: position,
|
|
1067
|
+
className: cn("sv-chart__grid-line", className)
|
|
1068
|
+
},
|
|
1069
|
+
position
|
|
1070
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1071
|
+
"line",
|
|
1072
|
+
{
|
|
1073
|
+
x1: position,
|
|
1074
|
+
y1: 0,
|
|
1075
|
+
x2: position,
|
|
1076
|
+
y2: width,
|
|
1077
|
+
className: cn("sv-chart__grid-line", className)
|
|
1078
|
+
},
|
|
1079
|
+
position
|
|
1080
|
+
)
|
|
1081
|
+
) });
|
|
1082
|
+
ChartGrid.displayName = "ChartGrid";
|
|
1083
|
+
var ChartAxis = ({ orientation, ticks, length, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
1084
|
+
orientation === "bottom" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: 0, y1: 0, x2: length, y2: 0, className: cn("sv-chart__axis", className) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: 0, y1: 0, x2: 0, y2: length, className: cn("sv-chart__axis", className) }),
|
|
1085
|
+
ticks.map(
|
|
1086
|
+
(tick) => orientation === "bottom" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1087
|
+
"text",
|
|
1088
|
+
{
|
|
1089
|
+
x: tick.position,
|
|
1090
|
+
y: 16,
|
|
1091
|
+
textAnchor: "middle",
|
|
1092
|
+
className: "sv-chart__axis-label",
|
|
1093
|
+
children: tick.label
|
|
1094
|
+
},
|
|
1095
|
+
tick.position
|
|
1096
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1097
|
+
"text",
|
|
1098
|
+
{
|
|
1099
|
+
x: -8,
|
|
1100
|
+
y: tick.position,
|
|
1101
|
+
textAnchor: "end",
|
|
1102
|
+
dominantBaseline: "middle",
|
|
1103
|
+
className: "sv-chart__axis-label",
|
|
1104
|
+
children: tick.label
|
|
1105
|
+
},
|
|
1106
|
+
tick.position
|
|
1107
|
+
)
|
|
1108
|
+
)
|
|
1109
|
+
] });
|
|
1110
|
+
ChartAxis.displayName = "ChartAxis";
|
|
1111
|
+
var ChartLine = ({ points, color, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1112
|
+
"polyline",
|
|
1113
|
+
{
|
|
1114
|
+
points: points.map(({ x, y }) => `${x},${y}`).join(" "),
|
|
1115
|
+
fill: "none",
|
|
1116
|
+
stroke: color,
|
|
1117
|
+
strokeWidth: 2,
|
|
1118
|
+
className: cn("sv-chart__line", className)
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
ChartLine.displayName = "ChartLine";
|
|
1122
|
+
var ChartBar = ({ bars, color, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: bars.map((bar) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1123
|
+
"rect",
|
|
1124
|
+
{
|
|
1125
|
+
x: bar.x,
|
|
1126
|
+
y: bar.y,
|
|
1127
|
+
width: bar.width,
|
|
1128
|
+
height: bar.height,
|
|
1129
|
+
fill: color,
|
|
1130
|
+
className: cn("sv-chart__bar", className)
|
|
1131
|
+
},
|
|
1132
|
+
`${bar.x},${bar.y}`
|
|
1133
|
+
)) });
|
|
1134
|
+
ChartBar.displayName = "ChartBar";
|
|
1135
|
+
|
|
1136
|
+
// src/components/ui/radio-group.tsx
|
|
1137
|
+
var React16 = __toESM(require("react"), 1);
|
|
1138
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1139
|
+
var RadioGroupItem = React16.forwardRef(
|
|
1140
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: fieldClasses.choice, children: [
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
886
1142
|
"input",
|
|
887
1143
|
{
|
|
888
1144
|
className: cn("sv-radio", className),
|
|
@@ -895,19 +1151,19 @@ var RadioGroupItem = React12.forwardRef(
|
|
|
895
1151
|
] })
|
|
896
1152
|
);
|
|
897
1153
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
898
|
-
var RadioGroup =
|
|
1154
|
+
var RadioGroup = React16.forwardRef(
|
|
899
1155
|
({ className, legend, legendHidden, orientation = "vertical", name, children, ...props }, ref) => {
|
|
900
|
-
const items =
|
|
901
|
-
if (!
|
|
1156
|
+
const items = React16.Children.map(children, (child) => {
|
|
1157
|
+
if (!React16.isValidElement(child) || child.type !== RadioGroupItem) {
|
|
902
1158
|
return child;
|
|
903
1159
|
}
|
|
904
1160
|
const itemProps = child.props;
|
|
905
1161
|
if (itemProps.name !== void 0) {
|
|
906
1162
|
return child;
|
|
907
1163
|
}
|
|
908
|
-
return
|
|
1164
|
+
return React16.cloneElement(child, { name });
|
|
909
1165
|
});
|
|
910
|
-
return /* @__PURE__ */ (0,
|
|
1166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
911
1167
|
"fieldset",
|
|
912
1168
|
{
|
|
913
1169
|
className: cn(
|
|
@@ -918,7 +1174,7 @@ var RadioGroup = React12.forwardRef(
|
|
|
918
1174
|
ref,
|
|
919
1175
|
...props,
|
|
920
1176
|
children: [
|
|
921
|
-
legend !== void 0 && /* @__PURE__ */ (0,
|
|
1177
|
+
legend !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("legend", { className: cn("sv-radio-group__legend", legendHidden && fieldClasses.srOnly), children: legend }),
|
|
922
1178
|
items
|
|
923
1179
|
]
|
|
924
1180
|
}
|
|
@@ -928,7 +1184,7 @@ var RadioGroup = React12.forwardRef(
|
|
|
928
1184
|
RadioGroup.displayName = "RadioGroup";
|
|
929
1185
|
|
|
930
1186
|
// src/components/ui/table.tsx
|
|
931
|
-
var
|
|
1187
|
+
var React17 = __toESM(require("react"), 1);
|
|
932
1188
|
|
|
933
1189
|
// src/recipes/table.ts
|
|
934
1190
|
function table() {
|
|
@@ -946,37 +1202,37 @@ var tableClasses = {
|
|
|
946
1202
|
};
|
|
947
1203
|
|
|
948
1204
|
// src/components/ui/table.tsx
|
|
949
|
-
var
|
|
950
|
-
var Table =
|
|
951
|
-
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1205
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1206
|
+
var Table = React17.forwardRef(
|
|
1207
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn(tableClasses.container, containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("table", { className: cn(table(), className), ref, ...props }) })
|
|
952
1208
|
);
|
|
953
1209
|
Table.displayName = "Table";
|
|
954
|
-
var TableHeader =
|
|
955
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1210
|
+
var TableHeader = React17.forwardRef(
|
|
1211
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("thead", { className: cn(tableClasses.head, className), ref, ...props })
|
|
956
1212
|
);
|
|
957
1213
|
TableHeader.displayName = "TableHeader";
|
|
958
|
-
var TableBody =
|
|
959
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1214
|
+
var TableBody = React17.forwardRef(
|
|
1215
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tbody", { className: cn(tableClasses.body, className), ref, ...props })
|
|
960
1216
|
);
|
|
961
1217
|
TableBody.displayName = "TableBody";
|
|
962
|
-
var TableFooter =
|
|
963
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1218
|
+
var TableFooter = React17.forwardRef(
|
|
1219
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tfoot", { className: cn(tableClasses.foot, className), ref, ...props })
|
|
964
1220
|
);
|
|
965
1221
|
TableFooter.displayName = "TableFooter";
|
|
966
|
-
var TableRow =
|
|
967
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1222
|
+
var TableRow = React17.forwardRef(
|
|
1223
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { className: cn(tableClasses.row, className), ref, ...props })
|
|
968
1224
|
);
|
|
969
1225
|
TableRow.displayName = "TableRow";
|
|
970
|
-
var TableHead =
|
|
971
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1226
|
+
var TableHead = React17.forwardRef(
|
|
1227
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("th", { className: cn(tableClasses.th, className), ref, ...props })
|
|
972
1228
|
);
|
|
973
1229
|
TableHead.displayName = "TableHead";
|
|
974
|
-
var TableCell =
|
|
975
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1230
|
+
var TableCell = React17.forwardRef(
|
|
1231
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { className: cn(tableClasses.td, className), ref, ...props })
|
|
976
1232
|
);
|
|
977
1233
|
TableCell.displayName = "TableCell";
|
|
978
|
-
var TableCaption =
|
|
979
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1234
|
+
var TableCaption = React17.forwardRef(
|
|
1235
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("caption", { className: cn(tableClasses.caption, className), ref, ...props })
|
|
980
1236
|
);
|
|
981
1237
|
TableCaption.displayName = "TableCaption";
|
|
982
1238
|
|
|
@@ -1084,6 +1340,11 @@ var zIndex = {
|
|
|
1084
1340
|
CardSkeleton,
|
|
1085
1341
|
CardTitle,
|
|
1086
1342
|
CategoryPill,
|
|
1343
|
+
ChartAxis,
|
|
1344
|
+
ChartBar,
|
|
1345
|
+
ChartContainer,
|
|
1346
|
+
ChartGrid,
|
|
1347
|
+
ChartLine,
|
|
1087
1348
|
Checkbox,
|
|
1088
1349
|
CodeBlock,
|
|
1089
1350
|
DEFAULT_ACCENT,
|
|
@@ -1099,12 +1360,21 @@ var zIndex = {
|
|
|
1099
1360
|
Lead,
|
|
1100
1361
|
Logo,
|
|
1101
1362
|
NativeSelect,
|
|
1363
|
+
Pagination,
|
|
1364
|
+
PaginationContent,
|
|
1365
|
+
PaginationEllipsis,
|
|
1366
|
+
PaginationItem,
|
|
1367
|
+
PaginationLink,
|
|
1368
|
+
PaginationNext,
|
|
1369
|
+
PaginationPrevious,
|
|
1102
1370
|
PostCard,
|
|
1103
1371
|
PostGrid,
|
|
1372
|
+
Progress,
|
|
1104
1373
|
Prose,
|
|
1105
1374
|
READING_PROGRESS_VAR,
|
|
1106
1375
|
RadioGroup,
|
|
1107
1376
|
RadioGroupItem,
|
|
1377
|
+
Separator,
|
|
1108
1378
|
Sidebar,
|
|
1109
1379
|
SidebarSection,
|
|
1110
1380
|
Skeleton,
|
|
@@ -1140,6 +1410,7 @@ var zIndex = {
|
|
|
1140
1410
|
featuredPostCardClasses,
|
|
1141
1411
|
field,
|
|
1142
1412
|
fieldClasses,
|
|
1413
|
+
fieldMessage,
|
|
1143
1414
|
fontFamilies,
|
|
1144
1415
|
fontSizes,
|
|
1145
1416
|
fontWeights,
|