@still-void/ui 2.0.1 → 3.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/CHANGELOG.md +63 -0
- package/README.md +41 -7
- package/dist/react/client/index.cjs +310 -197
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +63 -9
- package/dist/react/client/index.d.ts +63 -9
- package/dist/react/client/index.js +315 -197
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +363 -93
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +133 -3
- package/dist/react/index.d.ts +133 -3
- package/dist/react/index.js +359 -92
- package/dist/react/index.js.map +1 -1
- package/dist/shadcn-overrides.css +98 -0
- package/dist/style.css +815 -0
- package/dist/tailwind.css +72 -0
- package/dist/theme.css +33 -11
- package/package.json +13 -3
package/dist/react/index.cjs
CHANGED
|
@@ -45,24 +45,39 @@ __export(react_exports, {
|
|
|
45
45
|
CardSkeleton: () => CardSkeleton,
|
|
46
46
|
CardTitle: () => CardTitle,
|
|
47
47
|
CategoryPill: () => CategoryPill,
|
|
48
|
+
Checkbox: () => Checkbox,
|
|
48
49
|
CodeBlock: () => CodeBlock,
|
|
49
50
|
DEFAULT_ACCENT: () => DEFAULT_ACCENT,
|
|
50
51
|
DEFAULT_MODE: () => DEFAULT_MODE,
|
|
51
52
|
FeaturedPostCard: () => FeaturedPostCard,
|
|
53
|
+
FileInput: () => FileInput,
|
|
52
54
|
Footer: () => Footer,
|
|
53
55
|
Header: () => Header,
|
|
54
56
|
Hero: () => Hero,
|
|
57
|
+
Icon: () => Icon,
|
|
55
58
|
Input: () => Input,
|
|
56
59
|
Layout: () => Layout,
|
|
57
60
|
Lead: () => Lead,
|
|
58
61
|
Logo: () => Logo,
|
|
62
|
+
NativeSelect: () => NativeSelect,
|
|
59
63
|
PostCard: () => PostCard,
|
|
60
64
|
PostGrid: () => PostGrid,
|
|
61
65
|
Prose: () => Prose,
|
|
62
66
|
READING_PROGRESS_VAR: () => READING_PROGRESS_VAR,
|
|
67
|
+
RadioGroup: () => RadioGroup,
|
|
68
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
63
69
|
Sidebar: () => Sidebar,
|
|
64
70
|
SidebarSection: () => SidebarSection,
|
|
65
71
|
Skeleton: () => Skeleton,
|
|
72
|
+
Table: () => Table,
|
|
73
|
+
TableBody: () => TableBody,
|
|
74
|
+
TableCaption: () => TableCaption,
|
|
75
|
+
TableCell: () => TableCell,
|
|
76
|
+
TableFooter: () => TableFooter,
|
|
77
|
+
TableHead: () => TableHead,
|
|
78
|
+
TableHeader: () => TableHeader,
|
|
79
|
+
TableRow: () => TableRow,
|
|
80
|
+
Textarea: () => Textarea,
|
|
66
81
|
ThemeScript: () => ThemeScript,
|
|
67
82
|
accentNames: () => accentNames,
|
|
68
83
|
accents: () => accents,
|
|
@@ -84,6 +99,8 @@ __export(react_exports, {
|
|
|
84
99
|
easings: () => easings,
|
|
85
100
|
featuredPostCard: () => featuredPostCard,
|
|
86
101
|
featuredPostCardClasses: () => featuredPostCardClasses,
|
|
102
|
+
field: () => field,
|
|
103
|
+
fieldClasses: () => fieldClasses,
|
|
87
104
|
fontFamilies: () => fontFamilies,
|
|
88
105
|
fontSizes: () => fontSizes,
|
|
89
106
|
fontWeights: () => fontWeights,
|
|
@@ -114,6 +131,8 @@ __export(react_exports, {
|
|
|
114
131
|
sidebarClasses: () => sidebarClasses,
|
|
115
132
|
skeletonLine: () => skeletonLine,
|
|
116
133
|
spacing: () => spacing,
|
|
134
|
+
table: () => table,
|
|
135
|
+
tableClasses: () => tableClasses,
|
|
117
136
|
tableOfContents: () => tableOfContents,
|
|
118
137
|
themeModes: () => themeModes,
|
|
119
138
|
tocLink: () => tocLink,
|
|
@@ -578,17 +597,16 @@ var Button = React.forwardRef(
|
|
|
578
597
|
"button",
|
|
579
598
|
{
|
|
580
599
|
className: cn(
|
|
581
|
-
"
|
|
582
|
-
variant === "
|
|
583
|
-
variant === "
|
|
584
|
-
variant === "
|
|
585
|
-
variant === "
|
|
586
|
-
variant === "
|
|
587
|
-
variant === "
|
|
588
|
-
size === "
|
|
589
|
-
size === "
|
|
590
|
-
size === "
|
|
591
|
-
size === "icon" && "h-10 w-10",
|
|
600
|
+
"sv-btn",
|
|
601
|
+
variant === "destructive" && "sv-btn--destructive",
|
|
602
|
+
variant === "outline" && "sv-btn--outline",
|
|
603
|
+
variant === "secondary" && "sv-btn--secondary",
|
|
604
|
+
variant === "ghost" && "sv-btn--ghost",
|
|
605
|
+
variant === "link" && "sv-btn--link",
|
|
606
|
+
variant === "accent" && "sv-btn--accent",
|
|
607
|
+
size === "sm" && "sv-btn--sm",
|
|
608
|
+
size === "lg" && "sv-btn--lg",
|
|
609
|
+
size === "icon" && "sv-btn--icon",
|
|
592
610
|
className
|
|
593
611
|
),
|
|
594
612
|
ref,
|
|
@@ -599,110 +617,116 @@ var Button = React.forwardRef(
|
|
|
599
617
|
Button.displayName = "Button";
|
|
600
618
|
|
|
601
619
|
// src/components/ui/card.tsx
|
|
620
|
+
var React3 = __toESM(require("react"), 1);
|
|
621
|
+
|
|
622
|
+
// src/components/ui/slot.tsx
|
|
602
623
|
var React2 = __toESM(require("react"), 1);
|
|
624
|
+
function composeRefs(...refs) {
|
|
625
|
+
return (node) => {
|
|
626
|
+
for (const ref of refs) {
|
|
627
|
+
if (typeof ref === "function") {
|
|
628
|
+
ref(node);
|
|
629
|
+
} else if (ref !== null && ref !== void 0) {
|
|
630
|
+
;
|
|
631
|
+
ref.current = node;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
function mergeProps(slotProps, childProps) {
|
|
637
|
+
const merged = { ...slotProps, ...childProps };
|
|
638
|
+
for (const key in childProps) {
|
|
639
|
+
const slotValue = slotProps[key];
|
|
640
|
+
const childValue = childProps[key];
|
|
641
|
+
const isHandler = /^on[A-Z]/.test(key);
|
|
642
|
+
if (isHandler && typeof slotValue === "function" && typeof childValue === "function") {
|
|
643
|
+
merged[key] = (...args) => {
|
|
644
|
+
const result = childValue(...args);
|
|
645
|
+
slotValue(...args);
|
|
646
|
+
return result;
|
|
647
|
+
};
|
|
648
|
+
} else if (key === "style") {
|
|
649
|
+
merged[key] = { ...slotValue, ...childValue };
|
|
650
|
+
} else if (key === "className") {
|
|
651
|
+
merged[key] = [slotValue, childValue].filter(Boolean).join(" ");
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
return merged;
|
|
655
|
+
}
|
|
656
|
+
var Slot = React2.forwardRef(
|
|
657
|
+
({ children, ...slotProps }, forwardedRef) => {
|
|
658
|
+
if (!React2.isValidElement(children) || React2.Children.count(children) !== 1 || children.type === React2.Fragment) {
|
|
659
|
+
throw new Error(
|
|
660
|
+
"Slot expected a single React element child. Pass exactly one element to asChild."
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
const child = children;
|
|
664
|
+
const childRef = child.props.ref ?? null;
|
|
665
|
+
const mergedProps = mergeProps(slotProps, child.props);
|
|
666
|
+
mergedProps.ref = forwardedRef ? composeRefs(forwardedRef, childRef) : childRef;
|
|
667
|
+
return React2.cloneElement(child, mergedProps);
|
|
668
|
+
}
|
|
669
|
+
);
|
|
670
|
+
Slot.displayName = "Slot";
|
|
671
|
+
|
|
672
|
+
// src/components/ui/card.tsx
|
|
603
673
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
{
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
674
|
+
var CARD_ELEMENTS = /* @__PURE__ */ new Set(["div", "section", "article", "li", "aside"]);
|
|
675
|
+
var Card = React3.forwardRef(
|
|
676
|
+
({ className, as, asChild = false, ...props }, ref) => {
|
|
677
|
+
if (asChild) {
|
|
678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Slot, { ref, className: cn("sv-card", className), ...props });
|
|
679
|
+
}
|
|
680
|
+
const Comp = as !== void 0 && CARD_ELEMENTS.has(as) ? as : "div";
|
|
681
|
+
return React3.createElement(Comp, {
|
|
682
|
+
ref,
|
|
683
|
+
className: cn("sv-card", className),
|
|
684
|
+
...props
|
|
685
|
+
});
|
|
613
686
|
}
|
|
614
|
-
)
|
|
687
|
+
);
|
|
615
688
|
Card.displayName = "Card";
|
|
616
|
-
var CardHeader =
|
|
617
|
-
"div",
|
|
618
|
-
{
|
|
619
|
-
ref,
|
|
620
|
-
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
621
|
-
...props
|
|
622
|
-
}
|
|
623
|
-
));
|
|
689
|
+
var CardHeader = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("sv-card__header", className), ...props }));
|
|
624
690
|
CardHeader.displayName = "CardHeader";
|
|
625
|
-
var CardTitle =
|
|
626
|
-
"h2",
|
|
627
|
-
{
|
|
628
|
-
ref,
|
|
629
|
-
className: cn(
|
|
630
|
-
"text-2xl font-semibold leading-none tracking-tight",
|
|
631
|
-
className
|
|
632
|
-
),
|
|
633
|
-
...props
|
|
634
|
-
}
|
|
635
|
-
));
|
|
691
|
+
var CardTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { ref, className: cn("sv-card__title", className), ...props }));
|
|
636
692
|
CardTitle.displayName = "CardTitle";
|
|
637
|
-
var CardDescription =
|
|
638
|
-
"p",
|
|
639
|
-
{
|
|
640
|
-
ref,
|
|
641
|
-
className: cn("text-sm text-sv-text-2", className),
|
|
642
|
-
...props
|
|
643
|
-
}
|
|
644
|
-
));
|
|
693
|
+
var CardDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { ref, className: cn("sv-card__description", className), ...props }));
|
|
645
694
|
CardDescription.displayName = "CardDescription";
|
|
646
|
-
var CardContent =
|
|
695
|
+
var CardContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("sv-card__content", className), ...props }));
|
|
647
696
|
CardContent.displayName = "CardContent";
|
|
648
|
-
var CardFooter =
|
|
649
|
-
"div",
|
|
650
|
-
{
|
|
651
|
-
ref,
|
|
652
|
-
className: cn("flex items-center p-6 pt-0", className),
|
|
653
|
-
...props
|
|
654
|
-
}
|
|
655
|
-
));
|
|
697
|
+
var CardFooter = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("sv-card__footer", className), ...props }));
|
|
656
698
|
CardFooter.displayName = "CardFooter";
|
|
657
699
|
|
|
658
700
|
// src/components/ui/alert.tsx
|
|
659
|
-
var
|
|
701
|
+
var React4 = __toESM(require("react"), 1);
|
|
660
702
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
661
|
-
var Alert =
|
|
703
|
+
var Alert = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
662
704
|
"div",
|
|
663
705
|
{
|
|
664
706
|
ref,
|
|
665
|
-
className: cn(
|
|
666
|
-
"relative w-full rounded-lg border border-sv-border bg-sv-surface p-4 text-sv-text [&>svg~*]:pl-7 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-sv-text",
|
|
667
|
-
className
|
|
668
|
-
),
|
|
707
|
+
className: cn("sv-alert", className),
|
|
669
708
|
role: "alert",
|
|
670
709
|
...props
|
|
671
710
|
}
|
|
672
711
|
));
|
|
673
712
|
Alert.displayName = "Alert";
|
|
674
|
-
var AlertTitle =
|
|
675
|
-
"h5",
|
|
676
|
-
{
|
|
677
|
-
ref,
|
|
678
|
-
className: cn("mb-1 font-medium leading-tight tracking-tight", className),
|
|
679
|
-
...props
|
|
680
|
-
}
|
|
681
|
-
));
|
|
713
|
+
var AlertTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h5", { ref, className: cn("sv-alert__title", className), ...props }));
|
|
682
714
|
AlertTitle.displayName = "AlertTitle";
|
|
683
|
-
var AlertDescription =
|
|
684
|
-
"div",
|
|
685
|
-
{
|
|
686
|
-
ref,
|
|
687
|
-
className: cn("text-sm text-sv-text-2 [&_p]:leading-relaxed", className),
|
|
688
|
-
...props
|
|
689
|
-
}
|
|
690
|
-
));
|
|
715
|
+
var AlertDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("sv-alert__description", className), ...props }));
|
|
691
716
|
AlertDescription.displayName = "AlertDescription";
|
|
692
717
|
|
|
693
718
|
// src/components/ui/badge.tsx
|
|
694
|
-
var
|
|
719
|
+
var React5 = require("react");
|
|
695
720
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
696
721
|
function Badge({ className, variant = "default", ...props }) {
|
|
697
722
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
698
723
|
"div",
|
|
699
724
|
{
|
|
700
725
|
className: cn(
|
|
701
|
-
"
|
|
702
|
-
variant === "
|
|
703
|
-
variant === "
|
|
704
|
-
variant === "
|
|
705
|
-
variant === "outline" && "text-sv-text border-sv-border",
|
|
726
|
+
"sv-badge",
|
|
727
|
+
variant === "secondary" && "sv-badge--secondary",
|
|
728
|
+
variant === "destructive" && "sv-badge--destructive",
|
|
729
|
+
variant === "outline" && "sv-badge--outline",
|
|
706
730
|
className
|
|
707
731
|
),
|
|
708
732
|
...props
|
|
@@ -710,18 +734,79 @@ function Badge({ className, variant = "default", ...props }) {
|
|
|
710
734
|
);
|
|
711
735
|
}
|
|
712
736
|
|
|
713
|
-
// src/components/ui/
|
|
714
|
-
var
|
|
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
|
|
715
763
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
716
|
-
var
|
|
717
|
-
({
|
|
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
|
+
// src/components/ui/input.tsx
|
|
788
|
+
var React7 = __toESM(require("react"), 1);
|
|
789
|
+
|
|
790
|
+
// src/recipes/field.ts
|
|
791
|
+
function field(options = {}) {
|
|
792
|
+
return cx(
|
|
793
|
+
"sv-field",
|
|
794
|
+
options.variant && options.variant !== "input" && `sv-field--${options.variant}`
|
|
795
|
+
);
|
|
796
|
+
}
|
|
797
|
+
var fieldClasses = {
|
|
798
|
+
choice: "sv-choice",
|
|
799
|
+
srOnly: "sv-sr-only"
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
// src/components/ui/input.tsx
|
|
803
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
804
|
+
var Input = React7.forwardRef(
|
|
805
|
+
({ className, type, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
718
806
|
"input",
|
|
719
807
|
{
|
|
720
808
|
type,
|
|
721
|
-
className: cn(
|
|
722
|
-
"flex h-10 w-full rounded-md border border-sv-border bg-sv-surface px-3 py-2 text-sm text-sv-text placeholder:text-sv-text-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
723
|
-
className
|
|
724
|
-
),
|
|
809
|
+
className: cn(field(), className),
|
|
725
810
|
ref,
|
|
726
811
|
...props
|
|
727
812
|
}
|
|
@@ -729,6 +814,172 @@ var Input = React5.forwardRef(
|
|
|
729
814
|
);
|
|
730
815
|
Input.displayName = "Input";
|
|
731
816
|
|
|
817
|
+
// src/components/ui/textarea.tsx
|
|
818
|
+
var React8 = __toESM(require("react"), 1);
|
|
819
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
820
|
+
var Textarea = React8.forwardRef(
|
|
821
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
822
|
+
"textarea",
|
|
823
|
+
{
|
|
824
|
+
className: cn(field({ variant: "textarea" }), className),
|
|
825
|
+
ref,
|
|
826
|
+
...props
|
|
827
|
+
}
|
|
828
|
+
)
|
|
829
|
+
);
|
|
830
|
+
Textarea.displayName = "Textarea";
|
|
831
|
+
|
|
832
|
+
// src/components/ui/native-select.tsx
|
|
833
|
+
var React9 = __toESM(require("react"), 1);
|
|
834
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
835
|
+
var NativeSelect = React9.forwardRef(
|
|
836
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
837
|
+
"select",
|
|
838
|
+
{
|
|
839
|
+
className: cn(field({ variant: "select" }), className),
|
|
840
|
+
ref,
|
|
841
|
+
...props,
|
|
842
|
+
children
|
|
843
|
+
}
|
|
844
|
+
)
|
|
845
|
+
);
|
|
846
|
+
NativeSelect.displayName = "NativeSelect";
|
|
847
|
+
|
|
848
|
+
// src/components/ui/file-input.tsx
|
|
849
|
+
var React10 = __toESM(require("react"), 1);
|
|
850
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
851
|
+
var FileInput = React10.forwardRef(
|
|
852
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
853
|
+
"input",
|
|
854
|
+
{
|
|
855
|
+
className: cn(field({ variant: "file" }), className),
|
|
856
|
+
ref,
|
|
857
|
+
...props,
|
|
858
|
+
type: "file"
|
|
859
|
+
}
|
|
860
|
+
)
|
|
861
|
+
);
|
|
862
|
+
FileInput.displayName = "FileInput";
|
|
863
|
+
|
|
864
|
+
// src/components/ui/checkbox.tsx
|
|
865
|
+
var React11 = __toESM(require("react"), 1);
|
|
866
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
867
|
+
var Checkbox = React11.forwardRef(
|
|
868
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
869
|
+
"input",
|
|
870
|
+
{
|
|
871
|
+
className: cn("sv-check", className),
|
|
872
|
+
ref,
|
|
873
|
+
...props,
|
|
874
|
+
type: "checkbox"
|
|
875
|
+
}
|
|
876
|
+
)
|
|
877
|
+
);
|
|
878
|
+
Checkbox.displayName = "Checkbox";
|
|
879
|
+
|
|
880
|
+
// src/components/ui/radio-group.tsx
|
|
881
|
+
var React12 = __toESM(require("react"), 1);
|
|
882
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
883
|
+
var RadioGroupItem = React12.forwardRef(
|
|
884
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: fieldClasses.choice, children: [
|
|
885
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
886
|
+
"input",
|
|
887
|
+
{
|
|
888
|
+
className: cn("sv-radio", className),
|
|
889
|
+
ref,
|
|
890
|
+
...props,
|
|
891
|
+
type: "radio"
|
|
892
|
+
}
|
|
893
|
+
),
|
|
894
|
+
children
|
|
895
|
+
] })
|
|
896
|
+
);
|
|
897
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
898
|
+
var RadioGroup = React12.forwardRef(
|
|
899
|
+
({ className, legend, legendHidden, orientation = "vertical", name, children, ...props }, ref) => {
|
|
900
|
+
const items = React12.Children.map(children, (child) => {
|
|
901
|
+
if (!React12.isValidElement(child) || child.type !== RadioGroupItem) {
|
|
902
|
+
return child;
|
|
903
|
+
}
|
|
904
|
+
const itemProps = child.props;
|
|
905
|
+
if (itemProps.name !== void 0) {
|
|
906
|
+
return child;
|
|
907
|
+
}
|
|
908
|
+
return React12.cloneElement(child, { name });
|
|
909
|
+
});
|
|
910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
911
|
+
"fieldset",
|
|
912
|
+
{
|
|
913
|
+
className: cn(
|
|
914
|
+
"sv-radio-group",
|
|
915
|
+
orientation === "horizontal" && "sv-radio-group--horizontal",
|
|
916
|
+
className
|
|
917
|
+
),
|
|
918
|
+
ref,
|
|
919
|
+
...props,
|
|
920
|
+
children: [
|
|
921
|
+
legend !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("legend", { className: cn("sv-radio-group__legend", legendHidden && fieldClasses.srOnly), children: legend }),
|
|
922
|
+
items
|
|
923
|
+
]
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
);
|
|
928
|
+
RadioGroup.displayName = "RadioGroup";
|
|
929
|
+
|
|
930
|
+
// src/components/ui/table.tsx
|
|
931
|
+
var React13 = __toESM(require("react"), 1);
|
|
932
|
+
|
|
933
|
+
// src/recipes/table.ts
|
|
934
|
+
function table() {
|
|
935
|
+
return "sv-table";
|
|
936
|
+
}
|
|
937
|
+
var tableClasses = {
|
|
938
|
+
container: "sv-table-container",
|
|
939
|
+
head: "sv-table__head",
|
|
940
|
+
body: "sv-table__body",
|
|
941
|
+
foot: "sv-table__foot",
|
|
942
|
+
row: "sv-table__row",
|
|
943
|
+
th: "sv-table__th",
|
|
944
|
+
td: "sv-table__td",
|
|
945
|
+
caption: "sv-table__caption"
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
// src/components/ui/table.tsx
|
|
949
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
950
|
+
var Table = React13.forwardRef(
|
|
951
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn(tableClasses.container, containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("table", { className: cn(table(), className), ref, ...props }) })
|
|
952
|
+
);
|
|
953
|
+
Table.displayName = "Table";
|
|
954
|
+
var TableHeader = React13.forwardRef(
|
|
955
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: cn(tableClasses.head, className), ref, ...props })
|
|
956
|
+
);
|
|
957
|
+
TableHeader.displayName = "TableHeader";
|
|
958
|
+
var TableBody = React13.forwardRef(
|
|
959
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { className: cn(tableClasses.body, className), ref, ...props })
|
|
960
|
+
);
|
|
961
|
+
TableBody.displayName = "TableBody";
|
|
962
|
+
var TableFooter = React13.forwardRef(
|
|
963
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tfoot", { className: cn(tableClasses.foot, className), ref, ...props })
|
|
964
|
+
);
|
|
965
|
+
TableFooter.displayName = "TableFooter";
|
|
966
|
+
var TableRow = React13.forwardRef(
|
|
967
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: cn(tableClasses.row, className), ref, ...props })
|
|
968
|
+
);
|
|
969
|
+
TableRow.displayName = "TableRow";
|
|
970
|
+
var TableHead = React13.forwardRef(
|
|
971
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: cn(tableClasses.th, className), ref, ...props })
|
|
972
|
+
);
|
|
973
|
+
TableHead.displayName = "TableHead";
|
|
974
|
+
var TableCell = React13.forwardRef(
|
|
975
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: cn(tableClasses.td, className), ref, ...props })
|
|
976
|
+
);
|
|
977
|
+
TableCell.displayName = "TableCell";
|
|
978
|
+
var TableCaption = React13.forwardRef(
|
|
979
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("caption", { className: cn(tableClasses.caption, className), ref, ...props })
|
|
980
|
+
);
|
|
981
|
+
TableCaption.displayName = "TableCaption";
|
|
982
|
+
|
|
732
983
|
// src/tokens/typography.ts
|
|
733
984
|
var fontFamilies = {
|
|
734
985
|
display: "'Sora', ui-sans-serif, system-ui, sans-serif",
|
|
@@ -833,24 +1084,39 @@ var zIndex = {
|
|
|
833
1084
|
CardSkeleton,
|
|
834
1085
|
CardTitle,
|
|
835
1086
|
CategoryPill,
|
|
1087
|
+
Checkbox,
|
|
836
1088
|
CodeBlock,
|
|
837
1089
|
DEFAULT_ACCENT,
|
|
838
1090
|
DEFAULT_MODE,
|
|
839
1091
|
FeaturedPostCard,
|
|
1092
|
+
FileInput,
|
|
840
1093
|
Footer,
|
|
841
1094
|
Header,
|
|
842
1095
|
Hero,
|
|
1096
|
+
Icon,
|
|
843
1097
|
Input,
|
|
844
1098
|
Layout,
|
|
845
1099
|
Lead,
|
|
846
1100
|
Logo,
|
|
1101
|
+
NativeSelect,
|
|
847
1102
|
PostCard,
|
|
848
1103
|
PostGrid,
|
|
849
1104
|
Prose,
|
|
850
1105
|
READING_PROGRESS_VAR,
|
|
1106
|
+
RadioGroup,
|
|
1107
|
+
RadioGroupItem,
|
|
851
1108
|
Sidebar,
|
|
852
1109
|
SidebarSection,
|
|
853
1110
|
Skeleton,
|
|
1111
|
+
Table,
|
|
1112
|
+
TableBody,
|
|
1113
|
+
TableCaption,
|
|
1114
|
+
TableCell,
|
|
1115
|
+
TableFooter,
|
|
1116
|
+
TableHead,
|
|
1117
|
+
TableHeader,
|
|
1118
|
+
TableRow,
|
|
1119
|
+
Textarea,
|
|
854
1120
|
ThemeScript,
|
|
855
1121
|
accentNames,
|
|
856
1122
|
accents,
|
|
@@ -872,6 +1138,8 @@ var zIndex = {
|
|
|
872
1138
|
easings,
|
|
873
1139
|
featuredPostCard,
|
|
874
1140
|
featuredPostCardClasses,
|
|
1141
|
+
field,
|
|
1142
|
+
fieldClasses,
|
|
875
1143
|
fontFamilies,
|
|
876
1144
|
fontSizes,
|
|
877
1145
|
fontWeights,
|
|
@@ -902,6 +1170,8 @@ var zIndex = {
|
|
|
902
1170
|
sidebarClasses,
|
|
903
1171
|
skeletonLine,
|
|
904
1172
|
spacing,
|
|
1173
|
+
table,
|
|
1174
|
+
tableClasses,
|
|
905
1175
|
tableOfContents,
|
|
906
1176
|
themeModes,
|
|
907
1177
|
tocLink,
|