@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.js
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
+
// src/components/ui/icon.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
// src/lib/utils.ts
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { twMerge } from "tailwind-merge";
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// src/components/ui/icon-set.ts
|
|
12
|
+
import {
|
|
13
|
+
Bars3Icon,
|
|
14
|
+
CameraIcon,
|
|
15
|
+
CheckCircleIcon,
|
|
16
|
+
CheckIcon,
|
|
17
|
+
ChevronDownIcon,
|
|
18
|
+
ChevronLeftIcon,
|
|
19
|
+
ChevronRightIcon,
|
|
20
|
+
ChevronUpIcon,
|
|
21
|
+
ClockIcon,
|
|
22
|
+
DocumentDuplicateIcon,
|
|
23
|
+
ExclamationCircleIcon,
|
|
24
|
+
ExclamationTriangleIcon,
|
|
25
|
+
InformationCircleIcon,
|
|
26
|
+
MagnifyingGlassIcon,
|
|
27
|
+
MoonIcon,
|
|
28
|
+
NoSymbolIcon,
|
|
29
|
+
SunIcon,
|
|
30
|
+
XMarkIcon
|
|
31
|
+
} from "@heroicons/react/24/outline";
|
|
32
|
+
var ICON_GLYPHS = {
|
|
33
|
+
x: XMarkIcon,
|
|
34
|
+
check: CheckIcon,
|
|
35
|
+
"chevron-down": ChevronDownIcon,
|
|
36
|
+
"chevron-up": ChevronUpIcon,
|
|
37
|
+
"chevron-right": ChevronRightIcon,
|
|
38
|
+
"chevron-left": ChevronLeftIcon,
|
|
39
|
+
info: InformationCircleIcon,
|
|
40
|
+
"alert-triangle": ExclamationTriangleIcon,
|
|
41
|
+
"alert-circle": ExclamationCircleIcon,
|
|
42
|
+
"check-circle": CheckCircleIcon,
|
|
43
|
+
copy: DocumentDuplicateIcon,
|
|
44
|
+
sun: SunIcon,
|
|
45
|
+
moon: MoonIcon,
|
|
46
|
+
search: MagnifyingGlassIcon,
|
|
47
|
+
menu: Bars3Icon,
|
|
48
|
+
camera: CameraIcon,
|
|
49
|
+
blocked: NoSymbolIcon,
|
|
50
|
+
pending: ClockIcon
|
|
51
|
+
};
|
|
52
|
+
var ICON_NAMES = Object.keys(ICON_GLYPHS);
|
|
53
|
+
var ICON_FALLBACK_NAME = "alert-circle";
|
|
54
|
+
|
|
55
|
+
// src/components/ui/icon.tsx
|
|
56
|
+
import { jsx } from "react/jsx-runtime";
|
|
57
|
+
var Icon = React.forwardRef(
|
|
58
|
+
({ name, size = "md", label, className, ...props }, ref) => {
|
|
59
|
+
const Glyph = ICON_GLYPHS[name] ?? ICON_GLYPHS[ICON_FALLBACK_NAME];
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
Glyph,
|
|
62
|
+
{
|
|
63
|
+
...props,
|
|
64
|
+
ref,
|
|
65
|
+
className: cn(
|
|
66
|
+
"sv-icon",
|
|
67
|
+
size === "sm" && "sv-icon--sm",
|
|
68
|
+
size === "lg" && "sv-icon--lg",
|
|
69
|
+
className
|
|
70
|
+
),
|
|
71
|
+
"aria-hidden": label === void 0 ? "true" : void 0,
|
|
72
|
+
role: label === void 0 ? void 0 : "img",
|
|
73
|
+
"aria-label": label
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
Icon.displayName = "Icon";
|
|
79
|
+
|
|
1
80
|
// src/recipes/cx.ts
|
|
2
81
|
function cx(...parts) {
|
|
3
82
|
return parts.filter(Boolean).join(" ");
|
|
@@ -9,6 +88,10 @@ function header(options = {}) {
|
|
|
9
88
|
}
|
|
10
89
|
var headerClasses = {
|
|
11
90
|
nav: "sv-header__nav",
|
|
91
|
+
/** Wraps <nav> in a native <details> — collapsible below 640px, a no-op
|
|
92
|
+
* wrapper above it, with zero JavaScript (see DESIGN.md §5 Navigation). */
|
|
93
|
+
navToggle: "sv-header__nav-toggle",
|
|
94
|
+
navSummary: "sv-header__nav-summary",
|
|
12
95
|
link: "sv-header__link",
|
|
13
96
|
linkActive: cx("sv-header__link", "sv-header__link--active"),
|
|
14
97
|
actions: "sv-header__actions"
|
|
@@ -28,33 +111,39 @@ var footerClasses = {
|
|
|
28
111
|
};
|
|
29
112
|
|
|
30
113
|
// src/react/components/Shell.tsx
|
|
31
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
114
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
32
115
|
function Logo({ label, href = "/", className, ...rest }) {
|
|
33
116
|
return /* @__PURE__ */ jsxs("a", { href, className: cx(logo(), className), ...rest, children: [
|
|
34
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ jsx2("span", { className: logoClasses.dot, "aria-hidden": "true" }),
|
|
35
118
|
label
|
|
36
119
|
] });
|
|
37
120
|
}
|
|
38
121
|
function Header({ logo: logoSlot, items = [], actions, glass, className, ...rest }) {
|
|
39
122
|
return /* @__PURE__ */ jsxs("header", { className: cx(header({ glass }), className), ...rest, children: [
|
|
40
123
|
logoSlot,
|
|
41
|
-
items.length > 0 &&
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
124
|
+
items.length > 0 && // <details> makes the nav collapsible below 640px with zero
|
|
125
|
+
// JavaScript: CSS forces it open above that width (a no-op wrapper),
|
|
126
|
+
// native click-to-toggle handles it below (see DESIGN.md §5).
|
|
127
|
+
/* @__PURE__ */ jsxs("details", { className: headerClasses.navToggle, children: [
|
|
128
|
+
/* @__PURE__ */ jsx2("summary", { className: headerClasses.navSummary, "aria-label": "Menu", children: /* @__PURE__ */ jsx2(Icon, { name: "menu" }) }),
|
|
129
|
+
/* @__PURE__ */ jsx2("nav", { className: headerClasses.nav, children: items.map((item) => /* @__PURE__ */ jsx2(
|
|
130
|
+
"a",
|
|
131
|
+
{
|
|
132
|
+
href: item.href,
|
|
133
|
+
className: item.active ? headerClasses.linkActive : headerClasses.link,
|
|
134
|
+
"aria-current": item.active ? "page" : void 0,
|
|
135
|
+
children: item.label
|
|
136
|
+
},
|
|
137
|
+
item.href
|
|
138
|
+
)) })
|
|
139
|
+
] }),
|
|
140
|
+
actions && /* @__PURE__ */ jsx2("div", { className: headerClasses.actions, children: actions })
|
|
52
141
|
] });
|
|
53
142
|
}
|
|
54
143
|
function Footer({ author, links = [], children, className, ...rest }) {
|
|
55
144
|
return /* @__PURE__ */ jsxs("footer", { className: cx(footer(), className), ...rest, children: [
|
|
56
|
-
author && /* @__PURE__ */
|
|
57
|
-
links.length > 0 && /* @__PURE__ */
|
|
145
|
+
author && /* @__PURE__ */ jsx2("span", { children: author }),
|
|
146
|
+
links.length > 0 && /* @__PURE__ */ jsx2("div", { className: footerClasses.links, children: links.map((link) => /* @__PURE__ */ jsx2("a", { href: link.href, className: footerClasses.link, children: link.label }, link.href)) }),
|
|
58
147
|
children
|
|
59
148
|
] });
|
|
60
149
|
}
|
|
@@ -221,15 +310,15 @@ function resolveCategoryColor(color) {
|
|
|
221
310
|
}
|
|
222
311
|
|
|
223
312
|
// src/react/components/Content.tsx
|
|
224
|
-
import { Fragment, jsx as
|
|
313
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
225
314
|
function CategoryPill({ label, color, active, interactive, className, style, ...rest }) {
|
|
226
315
|
const pillStyle = color ? { ...style, "--sv-pill-color": resolveCategoryColor(color) } : style;
|
|
227
316
|
const content = /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
228
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ jsx3("span", { className: categoryPillClasses.dot, "aria-hidden": "true" }),
|
|
229
318
|
label
|
|
230
319
|
] });
|
|
231
320
|
if (interactive) {
|
|
232
|
-
return /* @__PURE__ */
|
|
321
|
+
return /* @__PURE__ */ jsx3(
|
|
233
322
|
"button",
|
|
234
323
|
{
|
|
235
324
|
type: "button",
|
|
@@ -241,7 +330,7 @@ function CategoryPill({ label, color, active, interactive, className, style, ...
|
|
|
241
330
|
}
|
|
242
331
|
);
|
|
243
332
|
}
|
|
244
|
-
return /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ jsx3(
|
|
245
334
|
"span",
|
|
246
335
|
{
|
|
247
336
|
className: cx(categoryPill({ active, interactive }), className),
|
|
@@ -254,8 +343,8 @@ function CategoryPill({ label, color, active, interactive, className, style, ...
|
|
|
254
343
|
function PostMeta({ post }) {
|
|
255
344
|
if (!post.category && !post.date && post.readMinutes === void 0) return null;
|
|
256
345
|
return /* @__PURE__ */ jsxs2("div", { className: postCardClasses.meta, children: [
|
|
257
|
-
post.category && /* @__PURE__ */
|
|
258
|
-
post.date && /* @__PURE__ */
|
|
346
|
+
post.category && /* @__PURE__ */ jsx3(CategoryPill, { label: post.category.label, color: post.category.color }),
|
|
347
|
+
post.date && /* @__PURE__ */ jsx3("span", { children: post.date }),
|
|
259
348
|
post.readMinutes !== void 0 && /* @__PURE__ */ jsxs2("span", { children: [
|
|
260
349
|
post.readMinutes,
|
|
261
350
|
" min"
|
|
@@ -264,54 +353,54 @@ function PostMeta({ post }) {
|
|
|
264
353
|
}
|
|
265
354
|
function PostCard({ post, dense, className, children, ...rest }) {
|
|
266
355
|
return /* @__PURE__ */ jsxs2("article", { className: cx(postCard({ dense }), className), ...rest, children: [
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
!dense && post.excerpt && /* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ jsx3(PostMeta, { post }),
|
|
357
|
+
/* @__PURE__ */ jsx3("h3", { className: postCardClasses.title, children: /* @__PURE__ */ jsx3("a", { href: post.href, children: post.title }) }),
|
|
358
|
+
!dense && post.excerpt && /* @__PURE__ */ jsx3("p", { className: postCardClasses.excerpt, children: post.excerpt }),
|
|
270
359
|
children
|
|
271
360
|
] });
|
|
272
361
|
}
|
|
273
362
|
function FeaturedPostCard({ post, visual, className, children, ...rest }) {
|
|
274
363
|
return /* @__PURE__ */ jsxs2("article", { className: cx(featuredPostCard(), className), ...rest, children: [
|
|
275
364
|
/* @__PURE__ */ jsxs2("div", { className: featuredPostCardClasses.body, children: [
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
post.excerpt && /* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ jsx3(PostMeta, { post }),
|
|
366
|
+
/* @__PURE__ */ jsx3("h2", { className: featuredPostCardClasses.title, children: /* @__PURE__ */ jsx3("a", { href: post.href, children: post.title }) }),
|
|
367
|
+
post.excerpt && /* @__PURE__ */ jsx3("p", { className: postCardClasses.excerpt, children: post.excerpt }),
|
|
279
368
|
children
|
|
280
369
|
] }),
|
|
281
|
-
visual && /* @__PURE__ */
|
|
370
|
+
visual && /* @__PURE__ */ jsx3("div", { className: featuredPostCardClasses.visual, children: visual })
|
|
282
371
|
] });
|
|
283
372
|
}
|
|
284
373
|
function PostGrid({ className, ...rest }) {
|
|
285
|
-
return /* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ jsx3("div", { className: cx(postGrid(), className), ...rest });
|
|
286
375
|
}
|
|
287
376
|
function Layout({ withSidebar, className, ...rest }) {
|
|
288
|
-
return /* @__PURE__ */
|
|
377
|
+
return /* @__PURE__ */ jsx3("div", { className: cx(layout({ withSidebar }), className), ...rest });
|
|
289
378
|
}
|
|
290
379
|
function Sidebar({ className, ...rest }) {
|
|
291
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ jsx3("aside", { className: cx(sidebar(), className), ...rest });
|
|
292
381
|
}
|
|
293
382
|
function SidebarSection({ title, children, ...rest }) {
|
|
294
383
|
return /* @__PURE__ */ jsxs2("section", { ...rest, children: [
|
|
295
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ jsx3("h4", { className: sidebarClasses.sectionTitle, children: title }),
|
|
296
385
|
children
|
|
297
386
|
] });
|
|
298
387
|
}
|
|
299
388
|
function Hero({ eyebrow, title, description, className, children, ...rest }) {
|
|
300
389
|
return /* @__PURE__ */ jsxs2("section", { className: cx(hero(), className), ...rest, children: [
|
|
301
|
-
eyebrow && /* @__PURE__ */
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
description && /* @__PURE__ */
|
|
390
|
+
eyebrow && /* @__PURE__ */ jsx3("span", { className: heroClasses.eyebrow, children: eyebrow }),
|
|
391
|
+
/* @__PURE__ */ jsx3("h1", { className: heroClasses.title, children: title }),
|
|
392
|
+
description && /* @__PURE__ */ jsx3("p", { className: heroClasses.description, children: description }),
|
|
304
393
|
children
|
|
305
394
|
] });
|
|
306
395
|
}
|
|
307
396
|
function Skeleton({ small, className, ...rest }) {
|
|
308
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ jsx3("div", { className: cx(skeletonLine({ small }), className), "aria-hidden": "true", ...rest });
|
|
309
398
|
}
|
|
310
399
|
function CardSkeleton({ className, ...rest }) {
|
|
311
400
|
return /* @__PURE__ */ jsxs2("div", { className: cx(cardSkeleton(), className), "aria-hidden": "true", ...rest, children: [
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ jsx3(Skeleton, { small: true }),
|
|
402
|
+
/* @__PURE__ */ jsx3(Skeleton, {}),
|
|
403
|
+
/* @__PURE__ */ jsx3(Skeleton, {})
|
|
315
404
|
] });
|
|
316
405
|
}
|
|
317
406
|
|
|
@@ -369,7 +458,7 @@ var proseClasses = {
|
|
|
369
458
|
};
|
|
370
459
|
|
|
371
460
|
// src/react/components/Article.tsx
|
|
372
|
-
import { jsx as
|
|
461
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
373
462
|
function CodeBlock({
|
|
374
463
|
code,
|
|
375
464
|
language,
|
|
@@ -381,16 +470,16 @@ function CodeBlock({
|
|
|
381
470
|
}) {
|
|
382
471
|
return /* @__PURE__ */ jsxs3("figure", { className: cx(codeBlock(), className), ...rest, children: [
|
|
383
472
|
/* @__PURE__ */ jsxs3("figcaption", { className: codeBlockClasses.header, children: [
|
|
384
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ jsx4("span", { children: filename ?? language ?? "code" }),
|
|
385
474
|
actions
|
|
386
475
|
] }),
|
|
387
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ jsx4("pre", { className: codeBlockClasses.pre, children: rendered ?? /* @__PURE__ */ jsx4("code", { children: code }) })
|
|
388
477
|
] });
|
|
389
478
|
}
|
|
390
479
|
function Callout({ kind, label, className, children, ...rest }) {
|
|
391
480
|
return /* @__PURE__ */ jsxs3("aside", { className: cx(callout(kind), className), ...rest, children: [
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ jsx4("span", { className: calloutClasses.label, children: label ?? calloutLabels[kind] }),
|
|
482
|
+
/* @__PURE__ */ jsx4("div", { children })
|
|
394
483
|
] });
|
|
395
484
|
}
|
|
396
485
|
function ArticleHeader({
|
|
@@ -404,10 +493,10 @@ function ArticleHeader({
|
|
|
404
493
|
}) {
|
|
405
494
|
return /* @__PURE__ */ jsxs3("header", { className: cx(articleHeader(), className), ...rest, children: [
|
|
406
495
|
eyebrow,
|
|
407
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ jsx4("h1", { className: articleHeaderClasses.title, children: title }),
|
|
408
497
|
(author || date || readMinutes !== void 0) && /* @__PURE__ */ jsxs3("div", { className: articleHeaderClasses.meta, children: [
|
|
409
|
-
author && /* @__PURE__ */
|
|
410
|
-
date && /* @__PURE__ */
|
|
498
|
+
author && /* @__PURE__ */ jsx4("span", { className: articleHeaderClasses.author, children: author }),
|
|
499
|
+
date && /* @__PURE__ */ jsx4("span", { children: date }),
|
|
411
500
|
readMinutes !== void 0 && /* @__PURE__ */ jsxs3("span", { children: [
|
|
412
501
|
readMinutes,
|
|
413
502
|
" min"
|
|
@@ -416,17 +505,17 @@ function ArticleHeader({
|
|
|
416
505
|
] });
|
|
417
506
|
}
|
|
418
507
|
function Prose({ className, ...rest }) {
|
|
419
|
-
return /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ jsx4("div", { className: cx(prose(), className), ...rest });
|
|
420
509
|
}
|
|
421
510
|
function Lead({ className, ...rest }) {
|
|
422
|
-
return /* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ jsx4("p", { className: cx(proseClasses.lead, className), ...rest });
|
|
423
512
|
}
|
|
424
513
|
|
|
425
514
|
// src/behaviors/themeManager.ts
|
|
426
515
|
var DEFAULT_STORAGE_KEY = "still-void-theme";
|
|
427
516
|
|
|
428
517
|
// src/react/components/ThemeScript.tsx
|
|
429
|
-
import { jsx as
|
|
518
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
430
519
|
function toScriptLiteral(value) {
|
|
431
520
|
return JSON.stringify(value).replace(/</g, "\\u003c");
|
|
432
521
|
}
|
|
@@ -435,23 +524,14 @@ function ThemeScript({ storageKey = DEFAULT_STORAGE_KEY, nonce } = {}) {
|
|
|
435
524
|
const accents2 = toScriptLiteral(accentNames);
|
|
436
525
|
const key = toScriptLiteral(storageKey);
|
|
437
526
|
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){}})();`;
|
|
438
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ jsx5("script", { nonce, dangerouslySetInnerHTML: { __html: script } });
|
|
439
528
|
}
|
|
440
529
|
|
|
441
530
|
// src/components/ui/button.tsx
|
|
442
|
-
import * as
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
import { twMerge } from "tailwind-merge";
|
|
447
|
-
function cn(...inputs) {
|
|
448
|
-
return twMerge(clsx(inputs));
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// src/components/ui/button.tsx
|
|
452
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
453
|
-
var Button = React.forwardRef(
|
|
454
|
-
({ className, variant = "default", size = "default", ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
531
|
+
import * as React2 from "react";
|
|
532
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
533
|
+
var Button = React2.forwardRef(
|
|
534
|
+
({ className, variant = "default", size = "default", ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
455
535
|
"button",
|
|
456
536
|
{
|
|
457
537
|
className: cn(
|
|
@@ -475,10 +555,10 @@ var Button = React.forwardRef(
|
|
|
475
555
|
Button.displayName = "Button";
|
|
476
556
|
|
|
477
557
|
// src/components/ui/card.tsx
|
|
478
|
-
import * as
|
|
558
|
+
import * as React4 from "react";
|
|
479
559
|
|
|
480
560
|
// src/components/ui/slot.tsx
|
|
481
|
-
import * as
|
|
561
|
+
import * as React3 from "react";
|
|
482
562
|
function composeRefs(...refs) {
|
|
483
563
|
return (node) => {
|
|
484
564
|
for (const ref of refs) {
|
|
@@ -511,9 +591,9 @@ function mergeProps(slotProps, childProps) {
|
|
|
511
591
|
}
|
|
512
592
|
return merged;
|
|
513
593
|
}
|
|
514
|
-
var Slot =
|
|
594
|
+
var Slot = React3.forwardRef(
|
|
515
595
|
({ children, ...slotProps }, forwardedRef) => {
|
|
516
|
-
if (!
|
|
596
|
+
if (!React3.isValidElement(children) || React3.Children.count(children) !== 1 || children.type === React3.Fragment) {
|
|
517
597
|
throw new Error(
|
|
518
598
|
"Slot expected a single React element child. Pass exactly one element to asChild."
|
|
519
599
|
);
|
|
@@ -522,21 +602,21 @@ var Slot = React2.forwardRef(
|
|
|
522
602
|
const childRef = child.props.ref ?? null;
|
|
523
603
|
const mergedProps = mergeProps(slotProps, child.props);
|
|
524
604
|
mergedProps.ref = forwardedRef ? composeRefs(forwardedRef, childRef) : childRef;
|
|
525
|
-
return
|
|
605
|
+
return React3.cloneElement(child, mergedProps);
|
|
526
606
|
}
|
|
527
607
|
);
|
|
528
608
|
Slot.displayName = "Slot";
|
|
529
609
|
|
|
530
610
|
// src/components/ui/card.tsx
|
|
531
|
-
import { jsx as
|
|
611
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
532
612
|
var CARD_ELEMENTS = /* @__PURE__ */ new Set(["div", "section", "article", "li", "aside"]);
|
|
533
|
-
var Card =
|
|
613
|
+
var Card = React4.forwardRef(
|
|
534
614
|
({ className, as, asChild = false, ...props }, ref) => {
|
|
535
615
|
if (asChild) {
|
|
536
|
-
return /* @__PURE__ */
|
|
616
|
+
return /* @__PURE__ */ jsx7(Slot, { ref, className: cn("sv-card", className), ...props });
|
|
537
617
|
}
|
|
538
618
|
const Comp = as !== void 0 && CARD_ELEMENTS.has(as) ? as : "div";
|
|
539
|
-
return
|
|
619
|
+
return React4.createElement(Comp, {
|
|
540
620
|
ref,
|
|
541
621
|
className: cn("sv-card", className),
|
|
542
622
|
...props
|
|
@@ -544,21 +624,21 @@ var Card = React3.forwardRef(
|
|
|
544
624
|
}
|
|
545
625
|
);
|
|
546
626
|
Card.displayName = "Card";
|
|
547
|
-
var CardHeader =
|
|
627
|
+
var CardHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("sv-card__header", className), ...props }));
|
|
548
628
|
CardHeader.displayName = "CardHeader";
|
|
549
|
-
var CardTitle =
|
|
629
|
+
var CardTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7("h2", { ref, className: cn("sv-card__title", className), ...props }));
|
|
550
630
|
CardTitle.displayName = "CardTitle";
|
|
551
|
-
var CardDescription =
|
|
631
|
+
var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7("p", { ref, className: cn("sv-card__description", className), ...props }));
|
|
552
632
|
CardDescription.displayName = "CardDescription";
|
|
553
|
-
var CardContent =
|
|
633
|
+
var CardContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("sv-card__content", className), ...props }));
|
|
554
634
|
CardContent.displayName = "CardContent";
|
|
555
|
-
var CardFooter =
|
|
635
|
+
var CardFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("sv-card__footer", className), ...props }));
|
|
556
636
|
CardFooter.displayName = "CardFooter";
|
|
557
637
|
|
|
558
638
|
// src/components/ui/alert.tsx
|
|
559
|
-
import * as
|
|
560
|
-
import { jsx as
|
|
561
|
-
var Alert =
|
|
639
|
+
import * as React5 from "react";
|
|
640
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
641
|
+
var Alert = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
562
642
|
"div",
|
|
563
643
|
{
|
|
564
644
|
ref,
|
|
@@ -568,16 +648,16 @@ var Alert = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
568
648
|
}
|
|
569
649
|
));
|
|
570
650
|
Alert.displayName = "Alert";
|
|
571
|
-
var AlertTitle =
|
|
651
|
+
var AlertTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8("h5", { ref, className: cn("sv-alert__title", className), ...props }));
|
|
572
652
|
AlertTitle.displayName = "AlertTitle";
|
|
573
|
-
var AlertDescription =
|
|
653
|
+
var AlertDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8("div", { ref, className: cn("sv-alert__description", className), ...props }));
|
|
574
654
|
AlertDescription.displayName = "AlertDescription";
|
|
575
655
|
|
|
576
656
|
// src/components/ui/badge.tsx
|
|
577
657
|
import "react";
|
|
578
|
-
import { jsx as
|
|
658
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
579
659
|
function Badge({ className, variant = "default", ...props }) {
|
|
580
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ jsx9(
|
|
581
661
|
"div",
|
|
582
662
|
{
|
|
583
663
|
className: cn(
|
|
@@ -592,72 +672,6 @@ function Badge({ className, variant = "default", ...props }) {
|
|
|
592
672
|
);
|
|
593
673
|
}
|
|
594
674
|
|
|
595
|
-
// src/components/ui/icon.tsx
|
|
596
|
-
import * as React6 from "react";
|
|
597
|
-
|
|
598
|
-
// src/components/ui/icon-set.ts
|
|
599
|
-
import {
|
|
600
|
-
Bars3Icon,
|
|
601
|
-
CheckCircleIcon,
|
|
602
|
-
CheckIcon,
|
|
603
|
-
ChevronDownIcon,
|
|
604
|
-
ChevronLeftIcon,
|
|
605
|
-
ChevronRightIcon,
|
|
606
|
-
ChevronUpIcon,
|
|
607
|
-
DocumentDuplicateIcon,
|
|
608
|
-
ExclamationCircleIcon,
|
|
609
|
-
ExclamationTriangleIcon,
|
|
610
|
-
InformationCircleIcon,
|
|
611
|
-
MagnifyingGlassIcon,
|
|
612
|
-
MoonIcon,
|
|
613
|
-
SunIcon,
|
|
614
|
-
XMarkIcon
|
|
615
|
-
} from "@heroicons/react/24/outline";
|
|
616
|
-
var ICON_GLYPHS = {
|
|
617
|
-
x: XMarkIcon,
|
|
618
|
-
check: CheckIcon,
|
|
619
|
-
"chevron-down": ChevronDownIcon,
|
|
620
|
-
"chevron-up": ChevronUpIcon,
|
|
621
|
-
"chevron-right": ChevronRightIcon,
|
|
622
|
-
"chevron-left": ChevronLeftIcon,
|
|
623
|
-
info: InformationCircleIcon,
|
|
624
|
-
"alert-triangle": ExclamationTriangleIcon,
|
|
625
|
-
"alert-circle": ExclamationCircleIcon,
|
|
626
|
-
"check-circle": CheckCircleIcon,
|
|
627
|
-
copy: DocumentDuplicateIcon,
|
|
628
|
-
sun: SunIcon,
|
|
629
|
-
moon: MoonIcon,
|
|
630
|
-
search: MagnifyingGlassIcon,
|
|
631
|
-
menu: Bars3Icon
|
|
632
|
-
};
|
|
633
|
-
var ICON_NAMES = Object.keys(ICON_GLYPHS);
|
|
634
|
-
var ICON_FALLBACK_NAME = "alert-circle";
|
|
635
|
-
|
|
636
|
-
// src/components/ui/icon.tsx
|
|
637
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
638
|
-
var Icon = React6.forwardRef(
|
|
639
|
-
({ name, size = "md", label, className, ...props }, ref) => {
|
|
640
|
-
const Glyph = ICON_GLYPHS[name] ?? ICON_GLYPHS[ICON_FALLBACK_NAME];
|
|
641
|
-
return /* @__PURE__ */ jsx9(
|
|
642
|
-
Glyph,
|
|
643
|
-
{
|
|
644
|
-
...props,
|
|
645
|
-
ref,
|
|
646
|
-
className: cn(
|
|
647
|
-
"sv-icon",
|
|
648
|
-
size === "sm" && "sv-icon--sm",
|
|
649
|
-
size === "lg" && "sv-icon--lg",
|
|
650
|
-
className
|
|
651
|
-
),
|
|
652
|
-
"aria-hidden": label === void 0 ? "true" : void 0,
|
|
653
|
-
role: label === void 0 ? void 0 : "img",
|
|
654
|
-
"aria-label": label
|
|
655
|
-
}
|
|
656
|
-
);
|
|
657
|
-
}
|
|
658
|
-
);
|
|
659
|
-
Icon.displayName = "Icon";
|
|
660
|
-
|
|
661
675
|
// src/components/ui/input.tsx
|
|
662
676
|
import * as React7 from "react";
|
|
663
677
|
|
|
@@ -672,6 +686,9 @@ var fieldClasses = {
|
|
|
672
686
|
choice: "sv-choice",
|
|
673
687
|
srOnly: "sv-sr-only"
|
|
674
688
|
};
|
|
689
|
+
function fieldMessage(options = {}) {
|
|
690
|
+
return cx("sv-field-message", options.variant === "error" && "sv-field-message--error");
|
|
691
|
+
}
|
|
675
692
|
|
|
676
693
|
// src/components/ui/input.tsx
|
|
677
694
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
@@ -751,12 +768,239 @@ var Checkbox = React11.forwardRef(
|
|
|
751
768
|
);
|
|
752
769
|
Checkbox.displayName = "Checkbox";
|
|
753
770
|
|
|
754
|
-
// src/components/ui/
|
|
771
|
+
// src/components/ui/separator.tsx
|
|
755
772
|
import * as React12 from "react";
|
|
756
|
-
import { jsx as jsx15
|
|
757
|
-
var
|
|
758
|
-
({ className,
|
|
759
|
-
|
|
773
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
774
|
+
var Separator = React12.forwardRef(
|
|
775
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
776
|
+
"div",
|
|
777
|
+
{
|
|
778
|
+
...props,
|
|
779
|
+
ref,
|
|
780
|
+
role: decorative ? void 0 : "separator",
|
|
781
|
+
"aria-orientation": !decorative && orientation === "vertical" ? "vertical" : void 0,
|
|
782
|
+
className: cn(
|
|
783
|
+
"sv-separator",
|
|
784
|
+
orientation === "vertical" && "sv-separator--vertical",
|
|
785
|
+
className
|
|
786
|
+
)
|
|
787
|
+
}
|
|
788
|
+
)
|
|
789
|
+
);
|
|
790
|
+
Separator.displayName = "Separator";
|
|
791
|
+
|
|
792
|
+
// src/components/ui/progress.tsx
|
|
793
|
+
import * as React13 from "react";
|
|
794
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
795
|
+
function clamp(value, max) {
|
|
796
|
+
return Math.min(Math.max(value, 0), max);
|
|
797
|
+
}
|
|
798
|
+
function normalizeMax(max) {
|
|
799
|
+
return Number.isFinite(max) && max > 0 ? max : 0;
|
|
800
|
+
}
|
|
801
|
+
var Progress = React13.forwardRef(
|
|
802
|
+
({ className, value = 0, max = 100, ...props }, ref) => {
|
|
803
|
+
const safeMax = normalizeMax(max);
|
|
804
|
+
const clamped = clamp(value, safeMax);
|
|
805
|
+
const percent = safeMax === 0 ? 0 : clamped / safeMax * 100;
|
|
806
|
+
return /* @__PURE__ */ jsx16(
|
|
807
|
+
"div",
|
|
808
|
+
{
|
|
809
|
+
...props,
|
|
810
|
+
ref,
|
|
811
|
+
role: "progressbar",
|
|
812
|
+
"aria-valuenow": clamped,
|
|
813
|
+
"aria-valuemin": 0,
|
|
814
|
+
"aria-valuemax": safeMax,
|
|
815
|
+
className: cn("sv-progress", className),
|
|
816
|
+
children: /* @__PURE__ */ jsx16("div", { className: "sv-progress__indicator", style: { width: `${percent}%` } })
|
|
817
|
+
}
|
|
818
|
+
);
|
|
819
|
+
}
|
|
820
|
+
);
|
|
821
|
+
Progress.displayName = "Progress";
|
|
822
|
+
|
|
823
|
+
// src/components/ui/pagination.tsx
|
|
824
|
+
import * as React14 from "react";
|
|
825
|
+
import { jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
826
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx17("nav", { ...props, "aria-label": "pagination", className: cn("sv-pagination", className) });
|
|
827
|
+
Pagination.displayName = "Pagination";
|
|
828
|
+
var PaginationContent = React14.forwardRef(
|
|
829
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx17("ul", { ref, className: cn("sv-pagination__content", className), ...props })
|
|
830
|
+
);
|
|
831
|
+
PaginationContent.displayName = "PaginationContent";
|
|
832
|
+
var PaginationItem = React14.forwardRef(
|
|
833
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx17("li", { ref, className: cn("sv-pagination__item", className), ...props })
|
|
834
|
+
);
|
|
835
|
+
PaginationItem.displayName = "PaginationItem";
|
|
836
|
+
var PaginationLink = React14.forwardRef(
|
|
837
|
+
({ className, isActive = false, href, ...props }, ref) => {
|
|
838
|
+
const sharedClassName = cn(
|
|
839
|
+
"sv-pagination__link",
|
|
840
|
+
isActive && "sv-pagination__link--active",
|
|
841
|
+
className
|
|
842
|
+
);
|
|
843
|
+
const sharedAria = isActive ? { "aria-current": "page" } : {};
|
|
844
|
+
if (href !== void 0) {
|
|
845
|
+
return /* @__PURE__ */ jsx17(
|
|
846
|
+
"a",
|
|
847
|
+
{
|
|
848
|
+
ref,
|
|
849
|
+
href,
|
|
850
|
+
className: sharedClassName,
|
|
851
|
+
...sharedAria,
|
|
852
|
+
...props
|
|
853
|
+
}
|
|
854
|
+
);
|
|
855
|
+
}
|
|
856
|
+
return /* @__PURE__ */ jsx17(
|
|
857
|
+
"button",
|
|
858
|
+
{
|
|
859
|
+
ref,
|
|
860
|
+
type: "button",
|
|
861
|
+
className: sharedClassName,
|
|
862
|
+
...sharedAria,
|
|
863
|
+
...props
|
|
864
|
+
}
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
PaginationLink.displayName = "PaginationLink";
|
|
869
|
+
var PaginationPrevious = React14.forwardRef(({ className, label = "Previous", ...props }, ref) => /* @__PURE__ */ jsxs4(
|
|
870
|
+
PaginationLink,
|
|
871
|
+
{
|
|
872
|
+
ref,
|
|
873
|
+
"aria-label": label,
|
|
874
|
+
className: cn("sv-pagination__link--previous", className),
|
|
875
|
+
...props,
|
|
876
|
+
children: [
|
|
877
|
+
/* @__PURE__ */ jsx17(Icon, { name: "chevron-left" }),
|
|
878
|
+
/* @__PURE__ */ jsx17("span", { children: label })
|
|
879
|
+
]
|
|
880
|
+
}
|
|
881
|
+
));
|
|
882
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
883
|
+
var PaginationNext = React14.forwardRef(
|
|
884
|
+
({ className, label = "Next", ...props }, ref) => /* @__PURE__ */ jsxs4(
|
|
885
|
+
PaginationLink,
|
|
886
|
+
{
|
|
887
|
+
ref,
|
|
888
|
+
"aria-label": label,
|
|
889
|
+
className: cn("sv-pagination__link--next", className),
|
|
890
|
+
...props,
|
|
891
|
+
children: [
|
|
892
|
+
/* @__PURE__ */ jsx17("span", { children: label }),
|
|
893
|
+
/* @__PURE__ */ jsx17(Icon, { name: "chevron-right" })
|
|
894
|
+
]
|
|
895
|
+
}
|
|
896
|
+
)
|
|
897
|
+
);
|
|
898
|
+
PaginationNext.displayName = "PaginationNext";
|
|
899
|
+
var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", className: cn("sv-pagination__ellipsis", className), ...props, children: "\u2026" });
|
|
900
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
901
|
+
|
|
902
|
+
// src/components/ui/chart.tsx
|
|
903
|
+
import * as React15 from "react";
|
|
904
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
905
|
+
var ChartContainer = React15.forwardRef(
|
|
906
|
+
({ width, height, className, children, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
907
|
+
"svg",
|
|
908
|
+
{
|
|
909
|
+
ref,
|
|
910
|
+
role: "img",
|
|
911
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
912
|
+
width,
|
|
913
|
+
height,
|
|
914
|
+
className: cn("sv-chart", className),
|
|
915
|
+
...props,
|
|
916
|
+
children
|
|
917
|
+
}
|
|
918
|
+
)
|
|
919
|
+
);
|
|
920
|
+
ChartContainer.displayName = "ChartContainer";
|
|
921
|
+
var ChartGrid = ({ orientation, positions, width, className }) => /* @__PURE__ */ jsx18(Fragment3, { children: positions.map(
|
|
922
|
+
(position) => orientation === "horizontal" ? /* @__PURE__ */ jsx18(
|
|
923
|
+
"line",
|
|
924
|
+
{
|
|
925
|
+
x1: 0,
|
|
926
|
+
y1: position,
|
|
927
|
+
x2: width,
|
|
928
|
+
y2: position,
|
|
929
|
+
className: cn("sv-chart__grid-line", className)
|
|
930
|
+
},
|
|
931
|
+
position
|
|
932
|
+
) : /* @__PURE__ */ jsx18(
|
|
933
|
+
"line",
|
|
934
|
+
{
|
|
935
|
+
x1: position,
|
|
936
|
+
y1: 0,
|
|
937
|
+
x2: position,
|
|
938
|
+
y2: width,
|
|
939
|
+
className: cn("sv-chart__grid-line", className)
|
|
940
|
+
},
|
|
941
|
+
position
|
|
942
|
+
)
|
|
943
|
+
) });
|
|
944
|
+
ChartGrid.displayName = "ChartGrid";
|
|
945
|
+
var ChartAxis = ({ orientation, ticks, length, className }) => /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
946
|
+
orientation === "bottom" ? /* @__PURE__ */ jsx18("line", { x1: 0, y1: 0, x2: length, y2: 0, className: cn("sv-chart__axis", className) }) : /* @__PURE__ */ jsx18("line", { x1: 0, y1: 0, x2: 0, y2: length, className: cn("sv-chart__axis", className) }),
|
|
947
|
+
ticks.map(
|
|
948
|
+
(tick) => orientation === "bottom" ? /* @__PURE__ */ jsx18(
|
|
949
|
+
"text",
|
|
950
|
+
{
|
|
951
|
+
x: tick.position,
|
|
952
|
+
y: 16,
|
|
953
|
+
textAnchor: "middle",
|
|
954
|
+
className: "sv-chart__axis-label",
|
|
955
|
+
children: tick.label
|
|
956
|
+
},
|
|
957
|
+
tick.position
|
|
958
|
+
) : /* @__PURE__ */ jsx18(
|
|
959
|
+
"text",
|
|
960
|
+
{
|
|
961
|
+
x: -8,
|
|
962
|
+
y: tick.position,
|
|
963
|
+
textAnchor: "end",
|
|
964
|
+
dominantBaseline: "middle",
|
|
965
|
+
className: "sv-chart__axis-label",
|
|
966
|
+
children: tick.label
|
|
967
|
+
},
|
|
968
|
+
tick.position
|
|
969
|
+
)
|
|
970
|
+
)
|
|
971
|
+
] });
|
|
972
|
+
ChartAxis.displayName = "ChartAxis";
|
|
973
|
+
var ChartLine = ({ points, color, className }) => /* @__PURE__ */ jsx18(
|
|
974
|
+
"polyline",
|
|
975
|
+
{
|
|
976
|
+
points: points.map(({ x, y }) => `${x},${y}`).join(" "),
|
|
977
|
+
fill: "none",
|
|
978
|
+
stroke: color,
|
|
979
|
+
strokeWidth: 2,
|
|
980
|
+
className: cn("sv-chart__line", className)
|
|
981
|
+
}
|
|
982
|
+
);
|
|
983
|
+
ChartLine.displayName = "ChartLine";
|
|
984
|
+
var ChartBar = ({ bars, color, className }) => /* @__PURE__ */ jsx18(Fragment3, { children: bars.map((bar) => /* @__PURE__ */ jsx18(
|
|
985
|
+
"rect",
|
|
986
|
+
{
|
|
987
|
+
x: bar.x,
|
|
988
|
+
y: bar.y,
|
|
989
|
+
width: bar.width,
|
|
990
|
+
height: bar.height,
|
|
991
|
+
fill: color,
|
|
992
|
+
className: cn("sv-chart__bar", className)
|
|
993
|
+
},
|
|
994
|
+
`${bar.x},${bar.y}`
|
|
995
|
+
)) });
|
|
996
|
+
ChartBar.displayName = "ChartBar";
|
|
997
|
+
|
|
998
|
+
// src/components/ui/radio-group.tsx
|
|
999
|
+
import * as React16 from "react";
|
|
1000
|
+
import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1001
|
+
var RadioGroupItem = React16.forwardRef(
|
|
1002
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6("label", { className: fieldClasses.choice, children: [
|
|
1003
|
+
/* @__PURE__ */ jsx19(
|
|
760
1004
|
"input",
|
|
761
1005
|
{
|
|
762
1006
|
className: cn("sv-radio", className),
|
|
@@ -769,19 +1013,19 @@ var RadioGroupItem = React12.forwardRef(
|
|
|
769
1013
|
] })
|
|
770
1014
|
);
|
|
771
1015
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
772
|
-
var RadioGroup =
|
|
1016
|
+
var RadioGroup = React16.forwardRef(
|
|
773
1017
|
({ className, legend, legendHidden, orientation = "vertical", name, children, ...props }, ref) => {
|
|
774
|
-
const items =
|
|
775
|
-
if (!
|
|
1018
|
+
const items = React16.Children.map(children, (child) => {
|
|
1019
|
+
if (!React16.isValidElement(child) || child.type !== RadioGroupItem) {
|
|
776
1020
|
return child;
|
|
777
1021
|
}
|
|
778
1022
|
const itemProps = child.props;
|
|
779
1023
|
if (itemProps.name !== void 0) {
|
|
780
1024
|
return child;
|
|
781
1025
|
}
|
|
782
|
-
return
|
|
1026
|
+
return React16.cloneElement(child, { name });
|
|
783
1027
|
});
|
|
784
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ jsxs6(
|
|
785
1029
|
"fieldset",
|
|
786
1030
|
{
|
|
787
1031
|
className: cn(
|
|
@@ -792,7 +1036,7 @@ var RadioGroup = React12.forwardRef(
|
|
|
792
1036
|
ref,
|
|
793
1037
|
...props,
|
|
794
1038
|
children: [
|
|
795
|
-
legend !== void 0 && /* @__PURE__ */
|
|
1039
|
+
legend !== void 0 && /* @__PURE__ */ jsx19("legend", { className: cn("sv-radio-group__legend", legendHidden && fieldClasses.srOnly), children: legend }),
|
|
796
1040
|
items
|
|
797
1041
|
]
|
|
798
1042
|
}
|
|
@@ -802,7 +1046,7 @@ var RadioGroup = React12.forwardRef(
|
|
|
802
1046
|
RadioGroup.displayName = "RadioGroup";
|
|
803
1047
|
|
|
804
1048
|
// src/components/ui/table.tsx
|
|
805
|
-
import * as
|
|
1049
|
+
import * as React17 from "react";
|
|
806
1050
|
|
|
807
1051
|
// src/recipes/table.ts
|
|
808
1052
|
function table() {
|
|
@@ -820,37 +1064,37 @@ var tableClasses = {
|
|
|
820
1064
|
};
|
|
821
1065
|
|
|
822
1066
|
// src/components/ui/table.tsx
|
|
823
|
-
import { jsx as
|
|
824
|
-
var Table =
|
|
825
|
-
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
1067
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1068
|
+
var Table = React17.forwardRef(
|
|
1069
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx20("div", { className: cn(tableClasses.container, containerClassName), children: /* @__PURE__ */ jsx20("table", { className: cn(table(), className), ref, ...props }) })
|
|
826
1070
|
);
|
|
827
1071
|
Table.displayName = "Table";
|
|
828
|
-
var TableHeader =
|
|
829
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1072
|
+
var TableHeader = React17.forwardRef(
|
|
1073
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("thead", { className: cn(tableClasses.head, className), ref, ...props })
|
|
830
1074
|
);
|
|
831
1075
|
TableHeader.displayName = "TableHeader";
|
|
832
|
-
var TableBody =
|
|
833
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1076
|
+
var TableBody = React17.forwardRef(
|
|
1077
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("tbody", { className: cn(tableClasses.body, className), ref, ...props })
|
|
834
1078
|
);
|
|
835
1079
|
TableBody.displayName = "TableBody";
|
|
836
|
-
var TableFooter =
|
|
837
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1080
|
+
var TableFooter = React17.forwardRef(
|
|
1081
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("tfoot", { className: cn(tableClasses.foot, className), ref, ...props })
|
|
838
1082
|
);
|
|
839
1083
|
TableFooter.displayName = "TableFooter";
|
|
840
|
-
var TableRow =
|
|
841
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1084
|
+
var TableRow = React17.forwardRef(
|
|
1085
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("tr", { className: cn(tableClasses.row, className), ref, ...props })
|
|
842
1086
|
);
|
|
843
1087
|
TableRow.displayName = "TableRow";
|
|
844
|
-
var TableHead =
|
|
845
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1088
|
+
var TableHead = React17.forwardRef(
|
|
1089
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("th", { className: cn(tableClasses.th, className), ref, ...props })
|
|
846
1090
|
);
|
|
847
1091
|
TableHead.displayName = "TableHead";
|
|
848
|
-
var TableCell =
|
|
849
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1092
|
+
var TableCell = React17.forwardRef(
|
|
1093
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("td", { className: cn(tableClasses.td, className), ref, ...props })
|
|
850
1094
|
);
|
|
851
1095
|
TableCell.displayName = "TableCell";
|
|
852
|
-
var TableCaption =
|
|
853
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1096
|
+
var TableCaption = React17.forwardRef(
|
|
1097
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20("caption", { className: cn(tableClasses.caption, className), ref, ...props })
|
|
854
1098
|
);
|
|
855
1099
|
TableCaption.displayName = "TableCaption";
|
|
856
1100
|
|
|
@@ -957,6 +1201,11 @@ export {
|
|
|
957
1201
|
CardSkeleton,
|
|
958
1202
|
CardTitle,
|
|
959
1203
|
CategoryPill,
|
|
1204
|
+
ChartAxis,
|
|
1205
|
+
ChartBar,
|
|
1206
|
+
ChartContainer,
|
|
1207
|
+
ChartGrid,
|
|
1208
|
+
ChartLine,
|
|
960
1209
|
Checkbox,
|
|
961
1210
|
CodeBlock,
|
|
962
1211
|
DEFAULT_ACCENT,
|
|
@@ -972,12 +1221,21 @@ export {
|
|
|
972
1221
|
Lead,
|
|
973
1222
|
Logo,
|
|
974
1223
|
NativeSelect,
|
|
1224
|
+
Pagination,
|
|
1225
|
+
PaginationContent,
|
|
1226
|
+
PaginationEllipsis,
|
|
1227
|
+
PaginationItem,
|
|
1228
|
+
PaginationLink,
|
|
1229
|
+
PaginationNext,
|
|
1230
|
+
PaginationPrevious,
|
|
975
1231
|
PostCard,
|
|
976
1232
|
PostGrid,
|
|
1233
|
+
Progress,
|
|
977
1234
|
Prose,
|
|
978
1235
|
READING_PROGRESS_VAR,
|
|
979
1236
|
RadioGroup,
|
|
980
1237
|
RadioGroupItem,
|
|
1238
|
+
Separator,
|
|
981
1239
|
Sidebar,
|
|
982
1240
|
SidebarSection,
|
|
983
1241
|
Skeleton,
|
|
@@ -1013,6 +1271,7 @@ export {
|
|
|
1013
1271
|
featuredPostCardClasses,
|
|
1014
1272
|
field,
|
|
1015
1273
|
fieldClasses,
|
|
1274
|
+
fieldMessage,
|
|
1016
1275
|
fontFamilies,
|
|
1017
1276
|
fontSizes,
|
|
1018
1277
|
fontWeights,
|