@still-void/ui 3.5.1 → 3.6.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 +65 -0
- package/README.md +36 -0
- package/dist/css/app-shell.css +129 -0
- package/dist/css/base.css +27 -0
- package/dist/css/content.css +726 -0
- package/dist/css/controls.css +383 -0
- package/dist/css/data.css +190 -0
- package/dist/css/forms.css +318 -0
- package/dist/css/motion.css +49 -0
- package/dist/css/overlays.css +488 -0
- package/dist/css/toast.css +170 -0
- package/dist/react/_modules/behaviors/themeManager.js +10 -0
- package/dist/react/_modules/behaviors/themeManager.js.map +1 -0
- package/dist/react/_modules/components/ui/alert.js +14 -0
- package/dist/react/_modules/components/ui/alert.js.map +1 -0
- package/dist/react/_modules/components/ui/badge.js +9 -0
- package/dist/react/_modules/components/ui/badge.js.map +1 -0
- package/dist/react/_modules/components/ui/button.js +9 -0
- package/dist/react/_modules/components/ui/button.js.map +1 -0
- package/dist/react/_modules/components/ui/card.js +19 -0
- package/dist/react/_modules/components/ui/card.js.map +1 -0
- package/dist/react/_modules/components/ui/chart.js +18 -0
- package/dist/react/_modules/components/ui/chart.js.map +1 -0
- package/dist/react/_modules/components/ui/checkbox.js +8 -0
- package/dist/react/_modules/components/ui/checkbox.js.map +1 -0
- package/dist/react/_modules/components/ui/field.js +9 -0
- package/dist/react/_modules/components/ui/field.js.map +1 -0
- package/dist/react/_modules/components/ui/file-input.js +10 -0
- package/dist/react/_modules/components/ui/file-input.js.map +1 -0
- package/dist/react/_modules/components/ui/icon-set.js +11 -0
- package/dist/react/_modules/components/ui/icon-set.js.map +1 -0
- package/dist/react/_modules/components/ui/icon.js +9 -0
- package/dist/react/_modules/components/ui/icon.js.map +1 -0
- package/dist/react/_modules/components/ui/input.js +10 -0
- package/dist/react/_modules/components/ui/input.js.map +1 -0
- package/dist/react/_modules/components/ui/native-select.js +10 -0
- package/dist/react/_modules/components/ui/native-select.js.map +1 -0
- package/dist/react/_modules/components/ui/pagination.js +23 -0
- package/dist/react/_modules/components/ui/pagination.js.map +1 -0
- package/dist/react/_modules/components/ui/progress.js +8 -0
- package/dist/react/_modules/components/ui/progress.js.map +1 -0
- package/dist/react/_modules/components/ui/radio-group.js +12 -0
- package/dist/react/_modules/components/ui/radio-group.js.map +1 -0
- package/dist/react/_modules/components/ui/separator.js +8 -0
- package/dist/react/_modules/components/ui/separator.js.map +1 -0
- package/dist/react/_modules/components/ui/slot.js +7 -0
- package/dist/react/_modules/components/ui/slot.js.map +1 -0
- package/dist/react/_modules/components/ui/table.js +23 -0
- package/dist/react/_modules/components/ui/table.js.map +1 -0
- package/dist/react/_modules/components/ui/text-link.js +10 -0
- package/dist/react/_modules/components/ui/text-link.js.map +1 -0
- package/dist/react/_modules/components/ui/textarea.js +10 -0
- package/dist/react/_modules/components/ui/textarea.js.map +1 -0
- package/dist/react/_modules/lib/safe-href.js +9 -0
- package/dist/react/_modules/lib/safe-href.js.map +1 -0
- package/dist/react/_modules/lib/utils.js +7 -0
- package/dist/react/_modules/lib/utils.js.map +1 -0
- package/dist/react/_modules/react/components/Article.js +17 -0
- package/dist/react/_modules/react/components/Article.js.map +1 -0
- package/dist/react/_modules/react/components/Content.js +30 -0
- package/dist/react/_modules/react/components/Content.js.map +1 -0
- package/dist/react/_modules/react/components/PageHeader.js +8 -0
- package/dist/react/_modules/react/components/PageHeader.js.map +1 -0
- package/dist/react/_modules/react/components/Shell.js +17 -0
- package/dist/react/_modules/react/components/Shell.js.map +1 -0
- package/dist/react/_modules/react/components/ThemeScript.js +9 -0
- package/dist/react/_modules/react/components/ThemeScript.js.map +1 -0
- package/dist/react/_modules/recipes/article.js +34 -0
- package/dist/react/_modules/recipes/article.js.map +1 -0
- package/dist/react/_modules/recipes/content.js +34 -0
- package/dist/react/_modules/recipes/content.js.map +1 -0
- package/dist/react/_modules/recipes/cx.js +7 -0
- package/dist/react/_modules/recipes/cx.js.map +1 -0
- package/dist/react/_modules/recipes/field.js +12 -0
- package/dist/react/_modules/recipes/field.js.map +1 -0
- package/dist/react/_modules/recipes/shell.js +18 -0
- package/dist/react/_modules/recipes/shell.js.map +1 -0
- package/dist/react/_modules/recipes/table.js +9 -0
- package/dist/react/_modules/recipes/table.js.map +1 -0
- package/dist/react/_modules/tokens/categories.js +12 -0
- package/dist/react/_modules/tokens/categories.js.map +1 -0
- package/dist/react/_modules/tokens/colors.js +23 -0
- package/dist/react/_modules/tokens/colors.js.map +1 -0
- package/dist/react/_modules/tokens/motion.js +9 -0
- package/dist/react/_modules/tokens/motion.js.map +1 -0
- package/dist/react/_modules/tokens/spacing.js +9 -0
- package/dist/react/_modules/tokens/spacing.js.map +1 -0
- package/dist/react/_modules/tokens/typography.js +15 -0
- package/dist/react/_modules/tokens/typography.js.map +1 -0
- package/dist/react/_modules/tokens/zIndex.js +7 -0
- package/dist/react/_modules/tokens/zIndex.js.map +1 -0
- package/dist/react/chunk-2QRW4J2C.js +29 -0
- package/dist/react/chunk-2QRW4J2C.js.map +1 -0
- package/dist/react/chunk-3BWBG3BR.js +82 -0
- package/dist/react/chunk-3BWBG3BR.js.map +1 -0
- package/dist/react/chunk-563PKHIJ.js +48 -0
- package/dist/react/chunk-563PKHIJ.js.map +1 -0
- package/dist/react/chunk-5RPXXOD7.js +50 -0
- package/dist/react/chunk-5RPXXOD7.js.map +1 -0
- package/dist/react/chunk-6PF2SFKH.js +54 -0
- package/dist/react/chunk-6PF2SFKH.js.map +1 -0
- package/dist/react/chunk-7JIE3YAY.js +109 -0
- package/dist/react/chunk-7JIE3YAY.js.map +1 -0
- package/dist/react/chunk-7ZVSFBDK.js +26 -0
- package/dist/react/chunk-7ZVSFBDK.js.map +1 -0
- package/dist/react/chunk-AVAJOAL5.js +10 -0
- package/dist/react/chunk-AVAJOAL5.js.map +1 -0
- package/dist/react/chunk-BXKXO6FU.js +34 -0
- package/dist/react/chunk-BXKXO6FU.js.map +1 -0
- package/dist/react/chunk-CN3PNEZL.js +80 -0
- package/dist/react/chunk-CN3PNEZL.js.map +1 -0
- package/dist/react/chunk-EHJDOUXR.js +144 -0
- package/dist/react/chunk-EHJDOUXR.js.map +1 -0
- package/dist/react/chunk-FX2E23UV.js +28 -0
- package/dist/react/chunk-FX2E23UV.js.map +1 -0
- package/dist/react/chunk-GYGMM6RW.js +20 -0
- package/dist/react/chunk-GYGMM6RW.js.map +1 -0
- package/dist/react/chunk-H7DEOO3V.js +29 -0
- package/dist/react/chunk-H7DEOO3V.js.map +1 -0
- package/dist/react/chunk-HD7O5FNH.js +39 -0
- package/dist/react/chunk-HD7O5FNH.js.map +1 -0
- package/dist/react/chunk-HYLCMS2U.js +28 -0
- package/dist/react/chunk-HYLCMS2U.js.map +1 -0
- package/dist/react/chunk-HYXG2WF4.js +73 -0
- package/dist/react/chunk-HYXG2WF4.js.map +1 -0
- package/dist/react/chunk-KQK7SZ3K.js +52 -0
- package/dist/react/chunk-KQK7SZ3K.js.map +1 -0
- package/dist/react/chunk-KQZBK3XX.js +24 -0
- package/dist/react/chunk-KQZBK3XX.js.map +1 -0
- package/dist/react/chunk-L6WPFLSD.js +39 -0
- package/dist/react/chunk-L6WPFLSD.js.map +1 -0
- package/dist/react/chunk-LOVNG6RF.js +9 -0
- package/dist/react/chunk-LOVNG6RF.js.map +1 -0
- package/dist/react/chunk-M5FFVQKK.js +41 -0
- package/dist/react/chunk-M5FFVQKK.js.map +1 -0
- package/dist/react/chunk-MZEFPODP.js +77 -0
- package/dist/react/chunk-MZEFPODP.js.map +1 -0
- package/dist/react/chunk-NJQN37EG.js +37 -0
- package/dist/react/chunk-NJQN37EG.js.map +1 -0
- package/dist/react/chunk-OEFJMV7G.js +144 -0
- package/dist/react/chunk-OEFJMV7G.js.map +1 -0
- package/dist/react/chunk-P4M4LEI2.js +62 -0
- package/dist/react/chunk-P4M4LEI2.js.map +1 -0
- package/dist/react/chunk-PGDHKADW.js +60 -0
- package/dist/react/chunk-PGDHKADW.js.map +1 -0
- package/dist/react/chunk-QTVPXQ43.js +29 -0
- package/dist/react/chunk-QTVPXQ43.js.map +1 -0
- package/dist/react/chunk-QVOZHMVF.js +14 -0
- package/dist/react/chunk-QVOZHMVF.js.map +1 -0
- package/dist/react/chunk-SJ2YK4NJ.js +27 -0
- package/dist/react/chunk-SJ2YK4NJ.js.map +1 -0
- package/dist/react/chunk-SSMGCYPH.js +79 -0
- package/dist/react/chunk-SSMGCYPH.js.map +1 -0
- package/dist/react/chunk-SUT4G3TE.js +29 -0
- package/dist/react/chunk-SUT4G3TE.js.map +1 -0
- package/dist/react/chunk-SVLIJGBZ.js +14 -0
- package/dist/react/chunk-SVLIJGBZ.js.map +1 -0
- package/dist/react/chunk-SY7EEIC3.js +100 -0
- package/dist/react/chunk-SY7EEIC3.js.map +1 -0
- package/dist/react/chunk-TI3OPDCN.js +25 -0
- package/dist/react/chunk-TI3OPDCN.js.map +1 -0
- package/dist/react/chunk-U6L6J73Y.js +27 -0
- package/dist/react/chunk-U6L6J73Y.js.map +1 -0
- package/dist/react/chunk-VD5O66DN.js +54 -0
- package/dist/react/chunk-VD5O66DN.js.map +1 -0
- package/dist/react/chunk-YDGOXO6Q.js +74 -0
- package/dist/react/chunk-YDGOXO6Q.js.map +1 -0
- package/dist/react/chunk-YTTFCX3E.js +16 -0
- package/dist/react/chunk-YTTFCX3E.js.map +1 -0
- package/dist/react/chunk-YXV3UEL5.js +27 -0
- package/dist/react/chunk-YXV3UEL5.js.map +1 -0
- package/dist/react/client/_modules/behaviors/clipboard.js +8 -0
- package/dist/react/client/_modules/behaviors/clipboard.js.map +1 -0
- package/dist/react/client/_modules/behaviors/mediaQuery.js +8 -0
- package/dist/react/client/_modules/behaviors/mediaQuery.js.map +1 -0
- package/dist/react/client/_modules/behaviors/readingProgress.js +10 -0
- package/dist/react/client/_modules/behaviors/readingProgress.js.map +1 -0
- package/dist/react/client/_modules/behaviors/scrollSpy.js +8 -0
- package/dist/react/client/_modules/behaviors/scrollSpy.js.map +1 -0
- package/dist/react/client/_modules/behaviors/themeManager.js +11 -0
- package/dist/react/client/_modules/behaviors/themeManager.js.map +1 -0
- package/dist/react/client/_modules/components/ui/alert-dialog.js +30 -0
- package/dist/react/client/_modules/components/ui/alert-dialog.js.map +1 -0
- package/dist/react/client/_modules/components/ui/bottom-sheet.js +28 -0
- package/dist/react/client/_modules/components/ui/bottom-sheet.js.map +1 -0
- package/dist/react/client/_modules/components/ui/combobox.js +13 -0
- package/dist/react/client/_modules/components/ui/combobox.js.map +1 -0
- package/dist/react/client/_modules/components/ui/dialog.js +30 -0
- package/dist/react/client/_modules/components/ui/dialog.js.map +1 -0
- package/dist/react/client/_modules/components/ui/dropdown-menu.js +39 -0
- package/dist/react/client/_modules/components/ui/dropdown-menu.js.map +1 -0
- package/dist/react/client/_modules/components/ui/icon-set.js +12 -0
- package/dist/react/client/_modules/components/ui/icon-set.js.map +1 -0
- package/dist/react/client/_modules/components/ui/icon.js +10 -0
- package/dist/react/client/_modules/components/ui/icon.js.map +1 -0
- package/dist/react/client/_modules/components/ui/restore-focus.js +8 -0
- package/dist/react/client/_modules/components/ui/restore-focus.js.map +1 -0
- package/dist/react/client/_modules/components/ui/select.js +29 -0
- package/dist/react/client/_modules/components/ui/select.js.map +1 -0
- package/dist/react/client/_modules/components/ui/tabs.js +15 -0
- package/dist/react/client/_modules/components/ui/tabs.js.map +1 -0
- package/dist/react/client/_modules/components/ui/tooltip.js +15 -0
- package/dist/react/client/_modules/components/ui/tooltip.js.map +1 -0
- package/dist/react/client/_modules/lib/utils.js +8 -0
- package/dist/react/client/_modules/lib/utils.js.map +1 -0
- package/dist/react/client/_modules/react/client/CopyButton.js +11 -0
- package/dist/react/client/_modules/react/client/CopyButton.js.map +1 -0
- package/dist/react/client/_modules/react/client/ReadingProgress.js +14 -0
- package/dist/react/client/_modules/react/client/ReadingProgress.js.map +1 -0
- package/dist/react/client/_modules/react/client/SidebarProvider.js +26 -0
- package/dist/react/client/_modules/react/client/SidebarProvider.js.map +1 -0
- package/dist/react/client/_modules/react/client/TableOfContents.js +14 -0
- package/dist/react/client/_modules/react/client/TableOfContents.js.map +1 -0
- package/dist/react/client/_modules/react/client/ThemeProvider.js +12 -0
- package/dist/react/client/_modules/react/client/ThemeProvider.js.map +1 -0
- package/dist/react/client/_modules/react/client/ThemeToggle.js +14 -0
- package/dist/react/client/_modules/react/client/ThemeToggle.js.map +1 -0
- package/dist/react/client/_modules/react/client/ToastProvider.js +14 -0
- package/dist/react/client/_modules/react/client/ToastProvider.js.map +1 -0
- package/dist/react/client/_modules/react/client/hooks.js +17 -0
- package/dist/react/client/_modules/react/client/hooks.js.map +1 -0
- package/dist/react/client/_modules/react/client/shadcn.js +160 -0
- package/dist/react/client/_modules/react/client/shadcn.js.map +1 -0
- package/dist/react/client/_modules/recipes/article.js +35 -0
- package/dist/react/client/_modules/recipes/article.js.map +1 -0
- package/dist/react/client/_modules/recipes/cx.js +8 -0
- package/dist/react/client/_modules/recipes/cx.js.map +1 -0
- package/dist/react/client/_modules/recipes/field.js +13 -0
- package/dist/react/client/_modules/recipes/field.js.map +1 -0
- package/dist/react/client/_modules/tokens/colors.js +24 -0
- package/dist/react/client/_modules/tokens/colors.js.map +1 -0
- package/dist/react/client/chunk-3MVZ2ES4.js +83 -0
- package/dist/react/client/chunk-3MVZ2ES4.js.map +1 -0
- package/dist/react/client/chunk-7AU2DPOL.js +35 -0
- package/dist/react/client/chunk-7AU2DPOL.js.map +1 -0
- package/dist/react/client/chunk-ABWCVXOO.js +11 -0
- package/dist/react/client/chunk-ABWCVXOO.js.map +1 -0
- package/dist/react/client/chunk-AEXJWMUV.js +52 -0
- package/dist/react/client/chunk-AEXJWMUV.js.map +1 -0
- package/dist/react/client/chunk-CJQZ4BGO.js +125 -0
- package/dist/react/client/chunk-CJQZ4BGO.js.map +1 -0
- package/dist/react/client/chunk-CMMPIPNC.js +30 -0
- package/dist/react/client/chunk-CMMPIPNC.js.map +1 -0
- package/dist/react/client/chunk-CWA3N5RK.js +123 -0
- package/dist/react/client/chunk-CWA3N5RK.js.map +1 -0
- package/dist/react/client/chunk-ECOPTUZT.js +102 -0
- package/dist/react/client/chunk-ECOPTUZT.js.map +1 -0
- package/dist/react/client/chunk-GD7XJWKF.js +102 -0
- package/dist/react/client/chunk-GD7XJWKF.js.map +1 -0
- package/dist/react/client/chunk-JVVNV4DF.js +95 -0
- package/dist/react/client/chunk-JVVNV4DF.js.map +1 -0
- package/dist/react/client/chunk-LDOUB5IA.js +40 -0
- package/dist/react/client/chunk-LDOUB5IA.js.map +1 -0
- package/dist/react/client/chunk-M5QFSQYC.js +40 -0
- package/dist/react/client/chunk-M5QFSQYC.js.map +1 -0
- package/dist/react/client/chunk-MGR4F2BJ.js +67 -0
- package/dist/react/client/chunk-MGR4F2BJ.js.map +1 -0
- package/dist/react/client/chunk-MYTOL2RH.js +61 -0
- package/dist/react/client/chunk-MYTOL2RH.js.map +1 -0
- package/dist/react/client/chunk-N64GC5ZU.js +12 -0
- package/dist/react/client/chunk-N64GC5ZU.js.map +1 -0
- package/dist/react/client/chunk-NEAL74VV.js +130 -0
- package/dist/react/client/chunk-NEAL74VV.js.map +1 -0
- package/dist/react/client/chunk-OF6BMW2X.js +30 -0
- package/dist/react/client/chunk-OF6BMW2X.js.map +1 -0
- package/dist/react/client/chunk-OILITPDP.js +72 -0
- package/dist/react/client/chunk-OILITPDP.js.map +1 -0
- package/dist/react/client/chunk-OU4ACOFA.js +75 -0
- package/dist/react/client/chunk-OU4ACOFA.js.map +1 -0
- package/dist/react/client/chunk-OVMH25G3.js +23 -0
- package/dist/react/client/chunk-OVMH25G3.js.map +1 -0
- package/dist/react/client/chunk-P2UPL6Y3.js +205 -0
- package/dist/react/client/chunk-P2UPL6Y3.js.map +1 -0
- package/dist/react/client/chunk-PAOYY55O.js +41 -0
- package/dist/react/client/chunk-PAOYY55O.js.map +1 -0
- package/dist/react/client/chunk-PYG5NCEU.js +54 -0
- package/dist/react/client/chunk-PYG5NCEU.js.map +1 -0
- package/dist/react/client/chunk-RCZS37V5.js +239 -0
- package/dist/react/client/chunk-RCZS37V5.js.map +1 -0
- package/dist/react/client/chunk-RJFN4KXE.js +36 -0
- package/dist/react/client/chunk-RJFN4KXE.js.map +1 -0
- package/dist/react/client/chunk-RNMQZ6T2.js +62 -0
- package/dist/react/client/chunk-RNMQZ6T2.js.map +1 -0
- package/dist/react/client/chunk-TXL2US4Z.js +53 -0
- package/dist/react/client/chunk-TXL2US4Z.js.map +1 -0
- package/dist/react/client/chunk-U6FMZ32G.js +192 -0
- package/dist/react/client/chunk-U6FMZ32G.js.map +1 -0
- package/dist/react/client/chunk-WR7KQGBM.js +2 -0
- package/dist/react/client/chunk-WR7KQGBM.js.map +1 -0
- package/dist/react/client/chunk-XHL4YEVA.js +17 -0
- package/dist/react/client/chunk-XHL4YEVA.js.map +1 -0
- package/dist/react/client/index.cjs +400 -81
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +86 -5
- package/dist/react/client/index.d.ts +86 -5
- package/dist/react/client/index.js +141 -1426
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +368 -183
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +202 -23
- package/dist/react/index.d.ts +202 -23
- package/dist/react/index.js +206 -1231
- package/dist/react/index.js.map +1 -1
- package/dist/shadcn-overrides.css +27 -13
- package/dist/style.css +301 -19
- package/dist/theme.css +73 -24
- package/package.json +36 -6
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
table,
|
|
3
|
+
tableClasses
|
|
4
|
+
} from "./chunk-GYGMM6RW.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "./chunk-AVAJOAL5.js";
|
|
8
|
+
|
|
9
|
+
// src/components/ui/table.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var Table = React.forwardRef(
|
|
13
|
+
({ className, containerClassName, stack, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn(tableClasses.container, containerClassName), children: /* @__PURE__ */ jsx(
|
|
14
|
+
"table",
|
|
15
|
+
{
|
|
16
|
+
role: "table",
|
|
17
|
+
className: cn(table(), stack && "sv-table--stack", className),
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
) })
|
|
22
|
+
);
|
|
23
|
+
Table.displayName = "Table";
|
|
24
|
+
var TableHeader = React.forwardRef(
|
|
25
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { role: "rowgroup", className: cn(tableClasses.head, className), ref, ...props })
|
|
26
|
+
);
|
|
27
|
+
TableHeader.displayName = "TableHeader";
|
|
28
|
+
var TableBody = React.forwardRef(
|
|
29
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { role: "rowgroup", className: cn(tableClasses.body, className), ref, ...props })
|
|
30
|
+
);
|
|
31
|
+
TableBody.displayName = "TableBody";
|
|
32
|
+
var TableFooter = React.forwardRef(
|
|
33
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { role: "rowgroup", className: cn(tableClasses.foot, className), ref, ...props })
|
|
34
|
+
);
|
|
35
|
+
TableFooter.displayName = "TableFooter";
|
|
36
|
+
var TableRow = React.forwardRef(
|
|
37
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", { role: "row", className: cn(tableClasses.row, className), ref, ...props })
|
|
38
|
+
);
|
|
39
|
+
TableRow.displayName = "TableRow";
|
|
40
|
+
var TableHead = React.forwardRef(
|
|
41
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
42
|
+
"th",
|
|
43
|
+
{
|
|
44
|
+
role: props.scope === "row" || props.scope === "rowgroup" ? "rowheader" : "columnheader",
|
|
45
|
+
className: cn(tableClasses.th, className),
|
|
46
|
+
ref,
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
TableHead.displayName = "TableHead";
|
|
52
|
+
var TableCell = React.forwardRef(
|
|
53
|
+
({ className, label, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54
|
+
"td",
|
|
55
|
+
{
|
|
56
|
+
role: "cell",
|
|
57
|
+
className: cn(tableClasses.td, className),
|
|
58
|
+
"data-label": label,
|
|
59
|
+
ref,
|
|
60
|
+
...props
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
TableCell.displayName = "TableCell";
|
|
65
|
+
var TableCaption = React.forwardRef(
|
|
66
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { className: cn(tableClasses.caption, className), ref, ...props })
|
|
67
|
+
);
|
|
68
|
+
TableCaption.displayName = "TableCaption";
|
|
69
|
+
|
|
70
|
+
export {
|
|
71
|
+
Table,
|
|
72
|
+
TableHeader,
|
|
73
|
+
TableBody,
|
|
74
|
+
TableFooter,
|
|
75
|
+
TableRow,
|
|
76
|
+
TableHead,
|
|
77
|
+
TableCell,
|
|
78
|
+
TableCaption
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=chunk-CN3PNEZL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/ui/table.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/no-redundant-roles -- the explicit roles are the point: a stacked\n table changes `display`, and Safari/VoiceOver then drop the implicit table semantics. */\nimport * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { table, tableClasses } from \"../../recipes/table\"\n\nexport interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {\n containerClassName?: string\n /** Below 40rem, render each row as a block of label/value pairs. Pair with `TableCell label`. */\n stack?: boolean\n}\n\n/*\n * Explicit ARIA table roles on every element of the family. They restate the\n * native semantics, so a regular table reads exactly the same — but `Table\n * stack` sets `display: block` on the table, rows and cells below 40rem, and\n * several engines (Safari/VoiceOver, older Chromium) drop the implicit table\n * semantics once a table element stops being `display: table*`. The explicit\n * roles keep \"row 2 of 5, column Name\" announcements working in stacked mode.\n * A `role` passed by the consumer still wins (spread after).\n */\nconst Table = React.forwardRef<HTMLTableElement, TableProps>(\n ({ className, containerClassName, stack, ...props }, ref) => (\n <div className={cn(tableClasses.container, containerClassName)}>\n <table\n role=\"table\"\n className={cn(table(), stack && \"sv-table--stack\", className)}\n ref={ref}\n {...props}\n />\n </div>\n )\n)\nTable.displayName = \"Table\"\n\nexport interface TableHeaderProps\n extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nconst TableHeader = React.forwardRef<HTMLTableSectionElement, TableHeaderProps>(\n ({ className, ...props }, ref) => (\n <thead role=\"rowgroup\" className={cn(tableClasses.head, className)} ref={ref} {...props} />\n )\n)\nTableHeader.displayName = \"TableHeader\"\n\nexport interface TableBodyProps\n extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nconst TableBody = React.forwardRef<HTMLTableSectionElement, TableBodyProps>(\n ({ className, ...props }, ref) => (\n <tbody role=\"rowgroup\" className={cn(tableClasses.body, className)} ref={ref} {...props} />\n )\n)\nTableBody.displayName = \"TableBody\"\n\nexport interface TableFooterProps\n extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nconst TableFooter = React.forwardRef<HTMLTableSectionElement, TableFooterProps>(\n ({ className, ...props }, ref) => (\n <tfoot role=\"rowgroup\" className={cn(tableClasses.foot, className)} ref={ref} {...props} />\n )\n)\nTableFooter.displayName = \"TableFooter\"\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {}\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, TableRowProps>(\n ({ className, ...props }, ref) => (\n <tr role=\"row\" className={cn(tableClasses.row, className)} ref={ref} {...props} />\n )\n)\nTableRow.displayName = \"TableRow\"\n\nexport interface TableHeadProps\n extends React.ThHTMLAttributes<HTMLTableCellElement> {}\n\nconst TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\n ({ className, ...props }, ref) => (\n <th\n // A row header (`scope=\"row\"`) is a rowheader; every other <th> in this\n // family is a column header (the TableHeader row).\n role={props.scope === \"row\" || props.scope === \"rowgroup\" ? \"rowheader\" : \"columnheader\"}\n className={cn(tableClasses.th, className)}\n ref={ref}\n {...props}\n />\n )\n)\nTableHead.displayName = \"TableHead\"\n\nexport interface TableCellProps\n extends React.TdHTMLAttributes<HTMLTableCellElement> {\n /** Column name shown before the value when the table is stacked (`Table stack`). */\n label?: string\n}\n\nconst TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, label, ...props }, ref) => (\n <td\n // eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role -- see file header\n role=\"cell\"\n className={cn(tableClasses.td, className)}\n data-label={label}\n ref={ref}\n {...props}\n />\n )\n)\nTableCell.displayName = \"TableCell\"\n\nexport interface TableCaptionProps\n extends React.HTMLAttributes<HTMLTableCaptionElement> {}\n\nconst TableCaption = React.forwardRef<HTMLTableCaptionElement, TableCaptionProps>(\n ({ className, ...props }, ref) => (\n <caption className={cn(tableClasses.caption, className)} ref={ref} {...props} />\n )\n)\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableRow,\n TableHead,\n TableCell,\n TableCaption,\n}\n"],"mappings":";;;;;;;;;AAEA,YAAY,WAAW;AAsBjB;AAHN,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,oBAAoB,OAAO,GAAG,MAAM,GAAG,QACnD,oBAAC,SAAI,WAAW,GAAG,aAAa,WAAW,kBAAkB,GAC3D;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAW,GAAG,MAAM,GAAG,SAAS,mBAAmB,SAAS;AAAA,MAC5D;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AACA,MAAM,cAAc;AAKpB,IAAM,cAAoB;AAAA,EACxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,WAAM,MAAK,YAAW,WAAW,GAAG,aAAa,MAAM,SAAS,GAAG,KAAW,GAAG,OAAO;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AAc;","names":[]}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-AVAJOAL5.js";
|
|
4
|
+
|
|
5
|
+
// src/components/ui/chart.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
var ChartContainer = React.forwardRef(
|
|
9
|
+
({ width, height, className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
role: "img",
|
|
14
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
15
|
+
width,
|
|
16
|
+
height,
|
|
17
|
+
className: cn("sv-chart", className),
|
|
18
|
+
...props,
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
ChartContainer.displayName = "ChartContainer";
|
|
24
|
+
var ChartGrid = ({ orientation, positions, width, className }) => /* @__PURE__ */ jsx(Fragment, { children: positions.map(
|
|
25
|
+
(position) => orientation === "horizontal" ? /* @__PURE__ */ jsx(
|
|
26
|
+
"line",
|
|
27
|
+
{
|
|
28
|
+
x1: 0,
|
|
29
|
+
y1: position,
|
|
30
|
+
x2: width,
|
|
31
|
+
y2: position,
|
|
32
|
+
className: cn("sv-chart__grid-line", className)
|
|
33
|
+
},
|
|
34
|
+
position
|
|
35
|
+
) : /* @__PURE__ */ jsx(
|
|
36
|
+
"line",
|
|
37
|
+
{
|
|
38
|
+
x1: position,
|
|
39
|
+
y1: 0,
|
|
40
|
+
x2: position,
|
|
41
|
+
y2: width,
|
|
42
|
+
className: cn("sv-chart__grid-line", className)
|
|
43
|
+
},
|
|
44
|
+
position
|
|
45
|
+
)
|
|
46
|
+
) });
|
|
47
|
+
ChartGrid.displayName = "ChartGrid";
|
|
48
|
+
var ChartAxis = ({ orientation, ticks, length, className }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
|
+
orientation === "bottom" ? /* @__PURE__ */ jsx("line", { x1: 0, y1: 0, x2: length, y2: 0, className: cn("sv-chart__axis", className) }) : /* @__PURE__ */ jsx("line", { x1: 0, y1: 0, x2: 0, y2: length, className: cn("sv-chart__axis", className) }),
|
|
50
|
+
ticks.map(
|
|
51
|
+
(tick) => orientation === "bottom" ? /* @__PURE__ */ jsx(
|
|
52
|
+
"text",
|
|
53
|
+
{
|
|
54
|
+
x: tick.position,
|
|
55
|
+
y: 16,
|
|
56
|
+
textAnchor: "middle",
|
|
57
|
+
className: "sv-chart__axis-label",
|
|
58
|
+
children: tick.label
|
|
59
|
+
},
|
|
60
|
+
tick.position
|
|
61
|
+
) : /* @__PURE__ */ jsx(
|
|
62
|
+
"text",
|
|
63
|
+
{
|
|
64
|
+
x: -8,
|
|
65
|
+
y: tick.position,
|
|
66
|
+
textAnchor: "end",
|
|
67
|
+
dominantBaseline: "middle",
|
|
68
|
+
className: "sv-chart__axis-label",
|
|
69
|
+
children: tick.label
|
|
70
|
+
},
|
|
71
|
+
tick.position
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
] });
|
|
75
|
+
ChartAxis.displayName = "ChartAxis";
|
|
76
|
+
var DASH_PRESETS = { dashed: "6 4", dotted: "1 4" };
|
|
77
|
+
var ChartLine = ({
|
|
78
|
+
points,
|
|
79
|
+
color,
|
|
80
|
+
className,
|
|
81
|
+
strokeWidth = 2,
|
|
82
|
+
dash,
|
|
83
|
+
markers = false,
|
|
84
|
+
label
|
|
85
|
+
}) => {
|
|
86
|
+
const line = /* @__PURE__ */ jsx(
|
|
87
|
+
"polyline",
|
|
88
|
+
{
|
|
89
|
+
points: points.map(({ x, y }) => `${x},${y}`).join(" "),
|
|
90
|
+
fill: "none",
|
|
91
|
+
stroke: color,
|
|
92
|
+
strokeWidth,
|
|
93
|
+
strokeDasharray: dash === void 0 ? void 0 : DASH_PRESETS[dash] ?? dash,
|
|
94
|
+
className: cn("sv-chart__line", className)
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
if (markers === false && label === void 0) return line;
|
|
98
|
+
const radius = typeof markers === "number" ? markers : 3;
|
|
99
|
+
return /* @__PURE__ */ jsxs("g", { className: "sv-chart__series", children: [
|
|
100
|
+
label !== void 0 ? /* @__PURE__ */ jsx("title", { children: label }) : null,
|
|
101
|
+
line,
|
|
102
|
+
markers !== false ? points.map(({ x, y }) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: radius, fill: color, className: "sv-chart__marker" }, `${x},${y}`)) : null
|
|
103
|
+
] });
|
|
104
|
+
};
|
|
105
|
+
ChartLine.displayName = "ChartLine";
|
|
106
|
+
var ChartBar = ({ bars, color, className }) => /* @__PURE__ */ jsx(Fragment, { children: bars.map((bar) => /* @__PURE__ */ jsx(
|
|
107
|
+
"rect",
|
|
108
|
+
{
|
|
109
|
+
x: bar.x,
|
|
110
|
+
y: bar.y,
|
|
111
|
+
width: bar.width,
|
|
112
|
+
height: bar.height,
|
|
113
|
+
fill: color,
|
|
114
|
+
className: cn("sv-chart__bar", className)
|
|
115
|
+
},
|
|
116
|
+
`${bar.x},${bar.y}`
|
|
117
|
+
)) });
|
|
118
|
+
ChartBar.displayName = "ChartBar";
|
|
119
|
+
var ChartLegend = ({ items, className, ...props }) => /* @__PURE__ */ jsx("ul", { className: cn("sv-chart-legend", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs("li", { className: "sv-chart-legend__item", children: [
|
|
120
|
+
/* @__PURE__ */ jsx(
|
|
121
|
+
"span",
|
|
122
|
+
{
|
|
123
|
+
"aria-hidden": "true",
|
|
124
|
+
className: cn(
|
|
125
|
+
"sv-chart-legend__swatch",
|
|
126
|
+
item.kind === "bar" && "sv-chart-legend__swatch--bar",
|
|
127
|
+
item.dashed && "sv-chart-legend__swatch--dashed"
|
|
128
|
+
),
|
|
129
|
+
style: { "--sv-series-color": item.color }
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
item.label
|
|
133
|
+
] }, index)) });
|
|
134
|
+
ChartLegend.displayName = "ChartLegend";
|
|
135
|
+
|
|
136
|
+
export {
|
|
137
|
+
ChartContainer,
|
|
138
|
+
ChartGrid,
|
|
139
|
+
ChartAxis,
|
|
140
|
+
ChartLine,
|
|
141
|
+
ChartBar,
|
|
142
|
+
ChartLegend
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=chunk-EHJDOUXR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/ui/chart.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\n/**\n * SVG chart primitives — visual geometry only, reading the system's own\n * tokens for grid/axis color and taking series color as a prop (the three\n * series tokens, `var(--sv-accent-ink)` / `var(--sv-info-ink)` /\n * `var(--sv-warning-ink)`, are the system's contract; which series maps to\n * which token is the consumer's call, same as it is today).\n *\n * Deliberately NOT a charting engine: every geometry prop here (`points`,\n * `positions`, `ticks`, `bars`) is already in pixel space. Mapping a domain\n * value (a clinical score, a percentage) to that space is application logic,\n * not a design-system concern — see design.md's Assumptions table.\n */\n\nexport interface ChartContainerProps {\n width: number\n height: number\n /** The chart's accessible name. Omit only when an adjacent visible caption already names it. */\n \"aria-label\"?: string\n className?: string\n children?: React.ReactNode\n}\n\nconst ChartContainer = React.forwardRef<SVGSVGElement, ChartContainerProps>(\n ({ width, height, className, children, ...props }, ref) => (\n <svg\n ref={ref}\n role=\"img\"\n viewBox={`0 0 ${width} ${height}`}\n width={width}\n height={height}\n className={cn(\"sv-chart\", className)}\n {...props}\n >\n {children}\n </svg>\n ),\n)\nChartContainer.displayName = \"ChartContainer\"\n\nexport interface ChartGridProps {\n orientation: \"horizontal\" | \"vertical\"\n /** Position, along the axis perpendicular to the line's own direction, of each grid line. */\n positions: number[]\n /** Line length — the far edge each horizontal line reaches on x, or each vertical line reaches on y. */\n width: number\n className?: string\n}\n\nconst ChartGrid = ({ orientation, positions, width, className }: ChartGridProps) => (\n <>\n {positions.map((position) =>\n orientation === \"horizontal\" ? (\n <line\n key={position}\n x1={0}\n y1={position}\n x2={width}\n y2={position}\n className={cn(\"sv-chart__grid-line\", className)}\n />\n ) : (\n <line\n key={position}\n x1={position}\n y1={0}\n x2={position}\n y2={width}\n className={cn(\"sv-chart__grid-line\", className)}\n />\n ),\n )}\n </>\n)\nChartGrid.displayName = \"ChartGrid\"\n\nexport interface ChartTick {\n position: number\n label: string\n}\n\nexport interface ChartAxisProps {\n orientation: \"bottom\" | \"left\"\n ticks: ChartTick[]\n /** Baseline length — how far along its own axis the line runs. */\n length: number\n className?: string\n}\n\nconst ChartAxis = ({ orientation, ticks, length, className }: ChartAxisProps) => (\n <>\n {orientation === \"bottom\" ? (\n <line x1={0} y1={0} x2={length} y2={0} className={cn(\"sv-chart__axis\", className)} />\n ) : (\n <line x1={0} y1={0} x2={0} y2={length} className={cn(\"sv-chart__axis\", className)} />\n )}\n {ticks.map((tick) =>\n orientation === \"bottom\" ? (\n <text\n key={tick.position}\n x={tick.position}\n y={16}\n textAnchor=\"middle\"\n className=\"sv-chart__axis-label\"\n >\n {tick.label}\n </text>\n ) : (\n <text\n key={tick.position}\n x={-8}\n y={tick.position}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n className=\"sv-chart__axis-label\"\n >\n {tick.label}\n </text>\n ),\n )}\n </>\n)\nChartAxis.displayName = \"ChartAxis\"\n\nexport interface ChartPoint {\n x: number\n y: number\n}\n\nexport interface ChartLineProps {\n points: ChartPoint[]\n /** A `var(--sv-*-ink)` series token, or any valid CSS color. */\n color: string\n className?: string\n /** Line width in px. Defaults to 2. */\n strokeWidth?: number\n /**\n * Dash pattern, so a series can be told apart without relying on color\n * (WCAG 1.4.1): `\"dashed\"` (6 4), `\"dotted\"` (1 4), or any SVG\n * `stroke-dasharray` value. Solid when omitted.\n */\n dash?: \"dashed\" | \"dotted\" | (string & {})\n /** Draw a point marker on every point. `true` uses a 3px radius; pass a number for another radius. */\n markers?: boolean | number\n /** Series name: rendered as an SVG `<title>` on the series group, for pointer hover and assistive tech. */\n label?: string\n}\n\nconst DASH_PRESETS: Record<string, string> = { dashed: \"6 4\", dotted: \"1 4\" }\n\nconst ChartLine = ({\n points,\n color,\n className,\n strokeWidth = 2,\n dash,\n markers = false,\n label,\n}: ChartLineProps) => {\n const line = (\n <polyline\n points={points.map(({ x, y }) => `${x},${y}`).join(\" \")}\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeDasharray={dash === undefined ? undefined : (DASH_PRESETS[dash] ?? dash)}\n className={cn(\"sv-chart__line\", className)}\n />\n )\n // Without markers or a label the output is the bare <polyline> it always\n // was — consumers styling `polyline.sv-chart__line` see no new wrapper.\n if (markers === false && label === undefined) return line\n const radius = typeof markers === \"number\" ? markers : 3\n return (\n <g className=\"sv-chart__series\">\n {label !== undefined ? <title>{label}</title> : null}\n {line}\n {markers !== false\n ? points.map(({ x, y }) => (\n <circle key={`${x},${y}`} cx={x} cy={y} r={radius} fill={color} className=\"sv-chart__marker\" />\n ))\n : null}\n </g>\n )\n}\nChartLine.displayName = \"ChartLine\"\n\nexport interface ChartBarDatum {\n x: number\n y: number\n width: number\n height: number\n}\n\nexport interface ChartBarProps {\n bars: ChartBarDatum[]\n /** A `var(--sv-*-ink)` series token, or any valid CSS color. */\n color: string\n className?: string\n}\n\nconst ChartBar = ({ bars, color, className }: ChartBarProps) => (\n <>\n {bars.map((bar) => (\n <rect\n key={`${bar.x},${bar.y}`}\n x={bar.x}\n y={bar.y}\n width={bar.width}\n height={bar.height}\n fill={color}\n className={cn(\"sv-chart__bar\", className)}\n />\n ))}\n </>\n)\nChartBar.displayName = \"ChartBar\"\n\nexport interface ChartLegendItem {\n label: React.ReactNode\n /** Same color passed to the series' `ChartLine`/`ChartBar`. */\n color: string\n /** Swatch shape: a line (default) or a filled block for bar series. */\n kind?: \"line\" | \"bar\"\n /** Draw the line swatch dashed, matching a `ChartLine dash`. */\n dashed?: boolean\n}\n\nexport interface ChartLegendProps extends Omit<React.HTMLAttributes<HTMLUListElement>, \"children\"> {\n items: ChartLegendItem[]\n}\n\n/**\n * Series legend, rendered as an HTML list beside the `<svg>` (not inside it):\n * it wraps, uses the body font and reads as a list to assistive tech. The\n * swatch is decorative; the label carries the meaning.\n */\nconst ChartLegend = ({ items, className, ...props }: ChartLegendProps) => (\n <ul className={cn(\"sv-chart-legend\", className)} {...props}>\n {items.map((item, index) => (\n <li key={index} className=\"sv-chart-legend__item\">\n <span\n aria-hidden=\"true\"\n className={cn(\n \"sv-chart-legend__swatch\",\n item.kind === \"bar\" && \"sv-chart-legend__swatch--bar\",\n item.dashed && \"sv-chart-legend__swatch--dashed\",\n )}\n style={{ \"--sv-series-color\": item.color } as React.CSSProperties}\n />\n {item.label}\n </li>\n ))}\n </ul>\n)\nChartLegend.displayName = \"ChartLegend\"\n\nexport { ChartContainer, ChartGrid, ChartAxis, ChartLine, ChartBar, ChartLegend }\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AA2BnB,SAyBF,UAzBE,KAiEF,YAjEE;AAFJ,IAAM,iBAAuB;AAAA,EAC3B,CAAC,EAAE,OAAO,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAG,QACjD;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL,SAAS,OAAO,KAAK,IAAI,MAAM;AAAA,MAC/B;AAAA,MACA;AAAA,MACA,WAAW,GAAG,YAAY,SAAS;AAAA,MAClC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AACA,eAAe,cAAc;AAW7B,IAAM,YAAY,CAAC,EAAE,aAAa,WAAW,OAAO,UAAU,MAC5D,gCACG,oBAAU;AAAA,EAAI,CAAC,aACd,gBAAgB,eACd;AAAA,IAAC;AAAA;AAAA,MAEC,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW,GAAG,uBAAuB,SAAS;AAAA;AAAA,IALzC;AAAA,EAMP,IAEA;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MAAM;AAAA;AAAA,EAC3C;AAAA,EACC,KAAK;AAAA,KAVC,KAWT,CACD,GACH;AAEF,YAAY,cAAc;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Slot
|
|
3
|
+
} from "./chunk-VD5O66DN.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-AVAJOAL5.js";
|
|
7
|
+
|
|
8
|
+
// src/components/ui/badge.tsx
|
|
9
|
+
import "react";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
12
|
+
const classes = cn(
|
|
13
|
+
"sv-badge",
|
|
14
|
+
variant === "secondary" && "sv-badge--secondary",
|
|
15
|
+
variant === "destructive" && "sv-badge--destructive",
|
|
16
|
+
variant === "outline" && "sv-badge--outline",
|
|
17
|
+
className
|
|
18
|
+
);
|
|
19
|
+
if (asChild) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Slot, { className: classes, ...props });
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ jsx("div", { className: classes, ...props });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
Badge
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-FX2E23UV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/ui/badge.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\nimport { Slot } from \"./slot\"\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"secondary\" | \"destructive\" | \"outline\"\n /** Merge the badge's classes and props onto a single child (e.g. a link or a `<span>`) instead of rendering a `<div>`. */\n asChild?: boolean\n}\n\nfunction Badge({ className, variant = \"default\", asChild = false, ...props }: BadgeProps) {\n const classes = cn(\n \"sv-badge\",\n variant === \"secondary\" && \"sv-badge--secondary\",\n variant === \"destructive\" && \"sv-badge--destructive\",\n variant === \"outline\" && \"sv-badge--outline\",\n className\n )\n if (asChild) {\n return <Slot className={classes} {...props} />\n }\n return <div className={classes} {...props} />\n}\n\nexport { Badge }\n"],"mappings":";;;;;;;;AAAA,OAAuB;AAoBZ;AATX,SAAS,MAAM,EAAE,WAAW,UAAU,WAAW,UAAU,OAAO,GAAG,MAAM,GAAe;AACxF,QAAM,UAAU;AAAA,IACd;AAAA,IACA,YAAY,eAAe;AAAA,IAC3B,YAAY,iBAAiB;AAAA,IAC7B,YAAY,aAAa;AAAA,IACzB;AAAA,EACF;AACA,MAAI,SAAS;AACX,WAAO,oBAAC,QAAK,WAAW,SAAU,GAAG,OAAO;AAAA,EAC9C;AACA,SAAO,oBAAC,SAAI,WAAW,SAAU,GAAG,OAAO;AAC7C;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/recipes/table.ts
|
|
2
|
+
function table() {
|
|
3
|
+
return "sv-table";
|
|
4
|
+
}
|
|
5
|
+
var tableClasses = {
|
|
6
|
+
container: "sv-table-container",
|
|
7
|
+
head: "sv-table__head",
|
|
8
|
+
body: "sv-table__body",
|
|
9
|
+
foot: "sv-table__foot",
|
|
10
|
+
row: "sv-table__row",
|
|
11
|
+
th: "sv-table__th",
|
|
12
|
+
td: "sv-table__td",
|
|
13
|
+
caption: "sv-table__caption"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
table,
|
|
18
|
+
tableClasses
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chunk-GYGMM6RW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/recipes/table.ts"],"sourcesContent":["/**\n * Table recipes: the class map behind the Table component family, exported so\n * a consumer composing a raw <table> gets the same tokenized decoration\n * instead of re-deriving borders, header band and caption by hand. Pure —\n * Server Component safe.\n */\n\nexport function table(): string {\n return 'sv-table';\n}\n\nexport const tableClasses = {\n container: 'sv-table-container',\n head: 'sv-table__head',\n body: 'sv-table__body',\n foot: 'sv-table__foot',\n row: 'sv-table__row',\n th: 'sv-table__th',\n td: 'sv-table__td',\n caption: 'sv-table__caption',\n} as const;\n"],"mappings":";AAOO,SAAS,QAAgB;AAC9B,SAAO;AACT;AAEO,IAAM,eAAe;AAAA,EAC1B,WAAW;AAAA,EACX,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,SAAS;AACX;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
accents
|
|
3
|
+
} from "./chunk-SY7EEIC3.js";
|
|
4
|
+
|
|
5
|
+
// src/tokens/categories.ts
|
|
6
|
+
var defaultCategoryColors = {
|
|
7
|
+
ia: "violet",
|
|
8
|
+
prompt: "amber",
|
|
9
|
+
dev: "mint",
|
|
10
|
+
arch: "cyan",
|
|
11
|
+
ts: "cyan"
|
|
12
|
+
};
|
|
13
|
+
var hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
|
|
14
|
+
function resolveAccentColor(color) {
|
|
15
|
+
return hasOwn(accents, color) ? accents[color] : color;
|
|
16
|
+
}
|
|
17
|
+
function resolveCategoryColor(color) {
|
|
18
|
+
if (hasOwn(defaultCategoryColors, color)) {
|
|
19
|
+
return accents[defaultCategoryColors[color]];
|
|
20
|
+
}
|
|
21
|
+
return resolveAccentColor(color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
defaultCategoryColors,
|
|
26
|
+
resolveAccentColor,
|
|
27
|
+
resolveCategoryColor
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=chunk-H7DEOO3V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/tokens/categories.ts"],"sourcesContent":["import { accents, type AccentName } from './colors';\n\n/**\n * Blog categories from the prototype. Categories render as a colored dot + label\n * (never an emoji). The pill also accepts any CSS color for whitelabel use.\n */\nexport type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';\n\nexport const defaultCategoryColors: Record<CategoryName, AccentName> = {\n ia: 'violet',\n prompt: 'amber',\n dev: 'mint',\n arch: 'cyan',\n ts: 'cyan',\n};\n\nconst hasOwn = <T extends object>(obj: T, key: string): key is Extract<keyof T, string> =>\n Object.prototype.hasOwnProperty.call(obj, key);\n\n/** Resolve an accent name or raw CSS color to a CSS color value. */\nexport function resolveAccentColor(color: AccentName | (string & {})): string {\n return hasOwn(accents, color) ? accents[color] : color;\n}\n\n/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */\nexport function resolveCategoryColor(\n color: CategoryName | AccentName | (string & {}),\n): string {\n if (hasOwn(defaultCategoryColors, color)) {\n return accents[defaultCategoryColors[color]];\n }\n return resolveAccentColor(color);\n}\n"],"mappings":";;;;;AAQO,IAAM,wBAA0D;AAAA,EACrE,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,MAAM;AAAA,EACN,IAAI;AACN;AAEA,IAAM,SAAS,CAAmB,KAAQ,QACxC,OAAO,UAAU,eAAe,KAAK,KAAK,GAAG;AAGxC,SAAS,mBAAmB,OAA2C;AAC5E,SAAO,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAK,IAAI;AACnD;AAGO,SAAS,qBACd,OACQ;AACR,MAAI,OAAO,uBAAuB,KAAK,GAAG;AACxC,WAAO,QAAQ,sBAAsB,KAAK,CAAC;AAAA,EAC7C;AACA,SAAO,mBAAmB,KAAK;AACjC;","names":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-AVAJOAL5.js";
|
|
4
|
+
import {
|
|
5
|
+
ICON_FALLBACK_NAME,
|
|
6
|
+
ICON_GLYPHS
|
|
7
|
+
} from "./chunk-5RPXXOD7.js";
|
|
8
|
+
|
|
9
|
+
// src/components/ui/icon.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var Icon = React.forwardRef(
|
|
13
|
+
({ name, size = "md", label, className, ...props }, ref) => {
|
|
14
|
+
const Glyph = ICON_GLYPHS[name] ?? ICON_GLYPHS[ICON_FALLBACK_NAME];
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
Glyph,
|
|
17
|
+
{
|
|
18
|
+
...props,
|
|
19
|
+
ref,
|
|
20
|
+
"data-icon-name": name,
|
|
21
|
+
className: cn(
|
|
22
|
+
"sv-icon",
|
|
23
|
+
size === "sm" && "sv-icon--sm",
|
|
24
|
+
size === "lg" && "sv-icon--lg",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
"aria-hidden": label === void 0 ? "true" : void 0,
|
|
28
|
+
role: label === void 0 ? void 0 : "img",
|
|
29
|
+
"aria-label": label
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
Icon.displayName = "Icon";
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
Icon
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=chunk-HD7O5FNH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/ui/icon.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { ICON_FALLBACK_NAME, ICON_GLYPHS, type IconName } from './icon-set';\n\nexport type { IconName };\n\nexport interface IconProps extends Omit<React.SVGProps<SVGSVGElement>, 'ref'> {\n name: IconName;\n /** `md` is the default and carries no modifier — the base class is the size. */\n size?: 'sm' | 'md' | 'lg';\n /** Present: the icon is announced. Absent: it stays decorative. */\n label?: string;\n}\n\n/**\n * The design system's icon (ICON-01..06).\n *\n * Server-safe by construction: no hook, no context, no client boundary —\n * heroicons is a plain forwardRef <svg> and this adds only class names, so\n * `Icon` renders inside a Next.js Server Component (AD-002, AD-013).\n *\n * Size is deliberately NOT a prop on the svg: heroicons emits no width/height\n * attribute, so `.sv-icon` is the only thing sizing it, and a consumer cannot\n * pull an icon off the token scale by passing a pixel value.\n */\nconst Icon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ name, size = 'md', label, className, ...props }, ref) => {\n // A name outside the union only reaches here from JS, JSON or a CMS —\n // places the compiler never saw. Falling back beats throwing: a wrong\n // icon is a visible defect, a thrown error is a blank page.\n const Glyph = ICON_GLYPHS[name] ?? ICON_GLYPHS[ICON_FALLBACK_NAME];\n\n return (\n <Glyph\n {...props}\n ref={ref}\n data-icon-name={name}\n className={cn(\n 'sv-icon',\n size === 'sm' && 'sv-icon--sm',\n size === 'lg' && 'sv-icon--lg',\n className,\n )}\n // Spread before, not after: whether the icon is announced is\n // controlled by `label`, not by a stray aria-hidden/role/aria-label\n // the caller passed through `...props` — those must not be able to\n // override the mode `label` selected. (Heroicons itself still\n // spreads ITS own default aria-hidden under what we pass here, so\n // aria-hidden={undefined} below is still what removes it when a\n // label is present.)\n aria-hidden={label === undefined ? 'true' : undefined}\n role={label === undefined ? undefined : 'img'}\n aria-label={label}\n />\n );\n },\n);\nIcon.displayName = 'Icon';\n\nexport { Icon };\n"],"mappings":";;;;;;;;;AAAA,YAAY,WAAW;AAiCjB;AARN,IAAM,OAAa;AAAA,EACjB,CAAC,EAAE,MAAM,OAAO,MAAM,OAAO,WAAW,GAAG,MAAM,GAAG,QAAQ;AAI1D,UAAM,QAAQ,YAAY,IAAI,KAAK,YAAY,kBAAkB;AAEjE,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,kBAAgB;AAAA,QAChB,WAAW;AAAA,UACT;AAAA,UACA,SAAS,QAAQ;AAAA,UACjB,SAAS,QAAQ;AAAA,UACjB;AAAA,QACF;AAAA,QAQA,eAAa,UAAU,SAAY,SAAS;AAAA,QAC5C,MAAM,UAAU,SAAY,SAAY;AAAA,QACxC,cAAY;AAAA;AAAA,IACd;AAAA,EAEJ;AACF;AACA,KAAK,cAAc;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/tokens/spacing.ts
|
|
2
|
+
var spacing = {
|
|
3
|
+
1: "4px",
|
|
4
|
+
2: "8px",
|
|
5
|
+
3: "12px",
|
|
6
|
+
4: "16px",
|
|
7
|
+
5: "20px",
|
|
8
|
+
6: "24px",
|
|
9
|
+
8: "32px",
|
|
10
|
+
10: "40px",
|
|
11
|
+
12: "48px",
|
|
12
|
+
14: "56px",
|
|
13
|
+
16: "64px",
|
|
14
|
+
18: "72px"
|
|
15
|
+
};
|
|
16
|
+
var radii = {
|
|
17
|
+
sm: "6px",
|
|
18
|
+
md: "8px",
|
|
19
|
+
lg: "12px",
|
|
20
|
+
xl: "16px",
|
|
21
|
+
full: "9999px"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
spacing,
|
|
26
|
+
radii
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-HYLCMS2U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/tokens/spacing.ts"],"sourcesContent":["/**\n * Still Void spacing scale (4→72px) and radii (6/8/12/16/full).\n */\nexport const spacing = {\n 1: '4px',\n 2: '8px',\n 3: '12px',\n 4: '16px',\n 5: '20px',\n 6: '24px',\n 8: '32px',\n 10: '40px',\n 12: '48px',\n 14: '56px',\n 16: '64px',\n 18: '72px',\n} as const;\n\nexport const radii = {\n sm: '6px',\n md: '8px',\n lg: '12px',\n xl: '16px',\n full: '9999px',\n} as const;\n\nexport type SpacingStep = keyof typeof spacing;\nexport type Radius = keyof typeof radii;\n"],"mappings":";AAGO,IAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,QAAQ;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AACR;","names":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Icon
|
|
3
|
+
} from "./chunk-HD7O5FNH.js";
|
|
4
|
+
import {
|
|
5
|
+
footer,
|
|
6
|
+
footerClasses,
|
|
7
|
+
header,
|
|
8
|
+
headerClasses,
|
|
9
|
+
logo,
|
|
10
|
+
logoClasses
|
|
11
|
+
} from "./chunk-M5FFVQKK.js";
|
|
12
|
+
import {
|
|
13
|
+
cx
|
|
14
|
+
} from "./chunk-LOVNG6RF.js";
|
|
15
|
+
import {
|
|
16
|
+
safeHref
|
|
17
|
+
} from "./chunk-QVOZHMVF.js";
|
|
18
|
+
|
|
19
|
+
// src/react/components/Shell.tsx
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
function Logo({ label, href = "/", linkAs = "a", className, ...rest }) {
|
|
22
|
+
const LinkAs = linkAs;
|
|
23
|
+
return /* @__PURE__ */ jsxs(LinkAs, { href: safeHref(href), className: cx(logo(), className), ...rest, children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: logoClasses.dot, "aria-hidden": "true" }),
|
|
25
|
+
label
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
function Header({
|
|
29
|
+
logo: logoSlot,
|
|
30
|
+
items = [],
|
|
31
|
+
actions,
|
|
32
|
+
glass,
|
|
33
|
+
linkAs: LinkAs = "a",
|
|
34
|
+
menuLabel = "Menu",
|
|
35
|
+
navLabel,
|
|
36
|
+
className,
|
|
37
|
+
...rest
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsxs("header", { className: cx(header({ glass }), className), ...rest, children: [
|
|
40
|
+
logoSlot,
|
|
41
|
+
items.length > 0 && // <details> makes the nav collapsible below 640px with zero
|
|
42
|
+
// JavaScript: CSS forces it open above that width (a no-op wrapper),
|
|
43
|
+
// native click-to-toggle handles it below (see DESIGN.md §5).
|
|
44
|
+
/* @__PURE__ */ jsxs("details", { className: headerClasses.navToggle, children: [
|
|
45
|
+
/* @__PURE__ */ jsx("summary", { className: headerClasses.navSummary, "aria-label": menuLabel, children: /* @__PURE__ */ jsx(Icon, { name: "menu" }) }),
|
|
46
|
+
/* @__PURE__ */ jsx("nav", { className: headerClasses.nav, "aria-label": navLabel, children: items.map((item) => /* @__PURE__ */ jsx(
|
|
47
|
+
LinkAs,
|
|
48
|
+
{
|
|
49
|
+
href: safeHref(item.href),
|
|
50
|
+
className: item.active ? headerClasses.linkActive : headerClasses.link,
|
|
51
|
+
"aria-current": item.active ? "page" : void 0,
|
|
52
|
+
children: item.label
|
|
53
|
+
},
|
|
54
|
+
item.href
|
|
55
|
+
)) })
|
|
56
|
+
] }),
|
|
57
|
+
actions && /* @__PURE__ */ jsx("div", { className: headerClasses.actions, children: actions })
|
|
58
|
+
] });
|
|
59
|
+
}
|
|
60
|
+
function Footer({ author, links = [], children, linkAs: LinkAs = "a", className, ...rest }) {
|
|
61
|
+
return /* @__PURE__ */ jsxs("footer", { className: cx(footer(), className), ...rest, children: [
|
|
62
|
+
author && /* @__PURE__ */ jsx("span", { children: author }),
|
|
63
|
+
links.length > 0 && /* @__PURE__ */ jsx("div", { className: footerClasses.links, children: links.map((link) => /* @__PURE__ */ jsx(LinkAs, { href: safeHref(link.href), className: footerClasses.link, children: link.label }, link.href)) }),
|
|
64
|
+
children
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
Logo,
|
|
70
|
+
Header,
|
|
71
|
+
Footer
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=chunk-HYXG2WF4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/react/components/Shell.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';\nimport { Icon } from '../../components/ui/icon';\nimport { cx } from '../../recipes/cx';\nimport { footer, footerClasses, header, headerClasses, logo, logoClasses } from '../../recipes/shell';\nimport { safeHref } from '../../lib/safe-href';\nimport type { LinkComponent, NavItem } from '../../types';\n\n/*\n * Shell components are Server Component safe: no hooks, no browser APIs.\n * Interactivity (theme toggle) is composed in via the `actions` slot —\n * pass <ThemeToggle /> from '@still-void/ui/react/client'.\n */\n\nexport interface LogoProps extends ComponentPropsWithoutRef<'a'> {\n label: string;\n href?: string;\n /** Render the link as your router's link component (e.g. `next/link`). Defaults to `<a>`. */\n linkAs?: LinkComponent;\n}\n\nexport function Logo({ label, href = '/', linkAs = 'a', className, ...rest }: LogoProps) {\n // Widened on purpose: `rest` carries arbitrary <a> attributes, which the\n // narrow LinkComponent contract does not enumerate.\n const LinkAs = linkAs as ElementType;\n return (\n <LinkAs href={safeHref(href)} className={cx(logo(), className)} {...rest}>\n <span className={logoClasses.dot} aria-hidden=\"true\" />\n {label}\n </LinkAs>\n );\n}\n\nexport interface HeaderProps extends ComponentPropsWithoutRef<'header'> {\n /** Usually a <Logo />. */\n logo?: ReactNode;\n items?: NavItem[];\n /** Right-side slot — theme toggle, search, etc. */\n actions?: ReactNode;\n /** Frosted glass background (default true). */\n glass?: boolean;\n /** Render nav links as your router's link component (e.g. `next/link`). Defaults to `<a>`. */\n linkAs?: LinkComponent;\n /** Accessible name of the mobile menu toggle. Defaults to `\"Menu\"`. */\n menuLabel?: string;\n /** Accessible name of the `<nav>` landmark. Omitted by default. */\n navLabel?: string;\n}\n\nexport function Header({\n logo: logoSlot,\n items = [],\n actions,\n glass,\n linkAs: LinkAs = 'a',\n menuLabel = 'Menu',\n navLabel,\n className,\n ...rest\n}: HeaderProps) {\n return (\n <header className={cx(header({ glass }), className)} {...rest}>\n {logoSlot}\n {items.length > 0 && (\n // <details> makes the nav collapsible below 640px with zero\n // JavaScript: CSS forces it open above that width (a no-op wrapper),\n // native click-to-toggle handles it below (see DESIGN.md §5).\n <details className={headerClasses.navToggle}>\n <summary className={headerClasses.navSummary} aria-label={menuLabel}>\n <Icon name=\"menu\" />\n </summary>\n <nav className={headerClasses.nav} aria-label={navLabel}>\n {items.map((item) => (\n <LinkAs\n key={item.href}\n href={safeHref(item.href)}\n className={item.active ? headerClasses.linkActive : headerClasses.link}\n aria-current={item.active ? 'page' : undefined}\n >\n {item.label}\n </LinkAs>\n ))}\n </nav>\n </details>\n )}\n {actions && <div className={headerClasses.actions}>{actions}</div>}\n </header>\n );\n}\n\nexport interface FooterProps extends ComponentPropsWithoutRef<'footer'> {\n author?: string;\n links?: NavItem[];\n children?: ReactNode;\n /** Render footer links as your router's link component (e.g. `next/link`). Defaults to `<a>`. */\n linkAs?: LinkComponent;\n}\n\nexport function Footer({ author, links = [], children, linkAs: LinkAs = 'a', className, ...rest }: FooterProps) {\n return (\n <footer className={cx(footer(), className)} {...rest}>\n {author && <span>{author}</span>}\n {links.length > 0 && (\n <div className={footerClasses.links}>\n {links.map((link) => (\n <LinkAs key={link.href} href={safeHref(link.href)} className={footerClasses.link}>\n {link.label}\n </LinkAs>\n ))}\n </div>\n )}\n {children}\n </footer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBI,SACE,KADF;AALG,SAAS,KAAK,EAAE,OAAO,OAAO,KAAK,SAAS,KAAK,WAAW,GAAG,KAAK,GAAc;AAGvF,QAAM,SAAS;AACf,SACE,qBAAC,UAAO,MAAM,SAAS,IAAI,GAAG,WAAW,GAAG,KAAK,GAAG,SAAS,GAAI,GAAG,MAClE;AAAA,wBAAC,UAAK,WAAW,YAAY,KAAK,eAAY,QAAO;AAAA,IACpD;AAAA,KACH;AAEJ;AAkBO,SAAS,OAAO;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ,CAAC;AAAA,EACT;AAAA,EACA;AAAA,EACA,QAAQ,SAAS;AAAA,EACjB,YA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
|
|
4
|
+
body: "'Manrope', ui-sans-serif, system-ui, sans-serif",
|
|
5
|
+
mono: "'JetBrains Mono', ui-monospace, 'SF Mono', monospace"
|
|
6
|
+
};
|
|
7
|
+
var fontWeights = {
|
|
8
|
+
regular: 400,
|
|
9
|
+
medium: 500,
|
|
10
|
+
semibold: 600,
|
|
11
|
+
bold: 700
|
|
12
|
+
};
|
|
13
|
+
var fontSizes = {
|
|
14
|
+
xs: "0.75rem",
|
|
15
|
+
// 12px — meta, pills
|
|
16
|
+
sm: "0.8125rem",
|
|
17
|
+
// 13px — captions, code
|
|
18
|
+
base: "0.9375rem",
|
|
19
|
+
// 15px — body
|
|
20
|
+
md: "1rem",
|
|
21
|
+
// 16px — lead paragraphs
|
|
22
|
+
lg: "1.125rem",
|
|
23
|
+
// 18px — article lead
|
|
24
|
+
xl: "1.375rem",
|
|
25
|
+
// 22px — card titles, h3
|
|
26
|
+
"2xl": "1.75rem",
|
|
27
|
+
// 28px — h2
|
|
28
|
+
"3xl": "2.25rem",
|
|
29
|
+
// 36px — article title
|
|
30
|
+
"4xl": "2.75rem"
|
|
31
|
+
// 44px — hero display
|
|
32
|
+
};
|
|
33
|
+
var lineHeights = {
|
|
34
|
+
tight: 1.15,
|
|
35
|
+
snug: 1.3,
|
|
36
|
+
normal: 1.5,
|
|
37
|
+
relaxed: 1.7
|
|
38
|
+
};
|
|
39
|
+
var letterSpacings = {
|
|
40
|
+
display: "-0.02em",
|
|
41
|
+
normal: "0",
|
|
42
|
+
wide: "0.08em"
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
fontFamilies,
|
|
47
|
+
fontWeights,
|
|
48
|
+
fontSizes,
|
|
49
|
+
lineHeights,
|
|
50
|
+
letterSpacings
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=chunk-KQK7SZ3K.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/tokens/typography.ts"],"sourcesContent":["/**\n * Still Void typography tokens.\n * Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).\n * System fallbacks are loading fallbacks only — the final family must be the correct one.\n */\nexport const fontFamilies = {\n display: \"'Sora', ui-sans-serif, system-ui, sans-serif\",\n body: \"'Manrope', ui-sans-serif, system-ui, sans-serif\",\n mono: \"'JetBrains Mono', ui-monospace, 'SF Mono', monospace\",\n} as const;\n\nexport const fontWeights = {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n} as const;\n\nexport const fontSizes = {\n xs: '0.75rem', // 12px — meta, pills\n sm: '0.8125rem', // 13px — captions, code\n base: '0.9375rem', // 15px — body\n md: '1rem', // 16px — lead paragraphs\n lg: '1.125rem', // 18px — article lead\n xl: '1.375rem', // 22px — card titles, h3\n '2xl': '1.75rem', // 28px — h2\n '3xl': '2.25rem', // 36px — article title\n '4xl': '2.75rem', // 44px — hero display\n} as const;\n\nexport const lineHeights = {\n tight: 1.15,\n snug: 1.3,\n normal: 1.5,\n relaxed: 1.7,\n} as const;\n\nexport const letterSpacings = {\n display: '-0.02em',\n normal: '0',\n wide: '0.08em',\n} as const;\n\nexport type FontFamily = keyof typeof fontFamilies;\nexport type FontSize = keyof typeof fontSizes;\nexport type FontWeight = keyof typeof fontWeights;\n"],"mappings":";AAKO,IAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AACR;AAEO,IAAM,cAAc;AAAA,EACzB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AACR;AAEO,IAAM,YAAY;AAAA,EACvB,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,MAAM;AAAA;AAAA,EACN,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,OAAO;AAAA;AAAA,EACP,OAAO;AAAA;AAAA,EACP,OAAO;AAAA;AACT;AAEO,IAAM,cAAc;AAAA,EACzB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AACX;AAEO,IAAM,iBAAiB;AAAA,EAC5B,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AACR;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-AVAJOAL5.js";
|
|
4
|
+
|
|
5
|
+
// src/components/ui/checkbox.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var Checkbox = React.forwardRef(
|
|
9
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
"input",
|
|
11
|
+
{
|
|
12
|
+
className: cn("sv-check", className),
|
|
13
|
+
ref,
|
|
14
|
+
...props,
|
|
15
|
+
type: "checkbox"
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
Checkbox.displayName = "Checkbox";
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
Checkbox
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-KQZBK3XX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/ui/checkbox.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nexport interface CheckboxProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"type\"> {}\n\nconst Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <input\n className={cn(\"sv-check\", className)}\n ref={ref}\n {...props}\n type=\"checkbox\"\n />\n )\n)\nCheckbox.displayName = \"Checkbox\"\n\nexport { Checkbox }\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAQnB;AAFJ,IAAM,WAAiB;AAAA,EACrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,YAAY,SAAS;AAAA,MACnC;AAAA,MACC,GAAG;AAAA,MACJ,MAAK;AAAA;AAAA,EACP;AAEJ;AACA,SAAS,cAAc;","names":[]}
|