@still-void/ui 0.0.0-canary-20261202214749
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 +350 -0
- package/LICENSE +21 -0
- package/README.md +330 -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 +1924 -0
- package/dist/react/client/index.cjs.map +1 -0
- package/dist/react/client/index.d.cts +588 -0
- package/dist/react/client/index.d.ts +588 -0
- package/dist/react/client/index.js +233 -0
- package/dist/react/client/index.js.map +1 -0
- package/dist/react/index.cjs +1682 -0
- package/dist/react/index.cjs.map +1 -0
- package/dist/react/index.d.cts +994 -0
- package/dist/react/index.d.ts +994 -0
- package/dist/react/index.js +333 -0
- package/dist/react/index.js.map +1 -0
- package/dist/shadcn-overrides.css +112 -0
- package/dist/style.css +2480 -0
- package/dist/tailwind.css +73 -0
- package/dist/theme.css +346 -0
- package/package.json +171 -0
|
@@ -0,0 +1,994 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ElementType, ReactNode, AriaAttributes, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Still Void color tokens.
|
|
6
|
+
* Values ported literally from the Still Void spec (blog.kalleopinheiro.dev).
|
|
7
|
+
* Do not round or "approximate" — fidelity rule.
|
|
8
|
+
*/
|
|
9
|
+
declare const colors: {
|
|
10
|
+
readonly dark: {
|
|
11
|
+
readonly bg: "#0A0A0C";
|
|
12
|
+
readonly bgElev: "#111114";
|
|
13
|
+
readonly surface: "#16161B";
|
|
14
|
+
readonly surface2: "#1C1C22";
|
|
15
|
+
readonly border: "rgba(255,255,255,0.08)";
|
|
16
|
+
readonly borderStrong: "rgba(255,255,255,0.14)";
|
|
17
|
+
readonly controlBorder: "#6B6B76";
|
|
18
|
+
readonly text: "#EDEDF0";
|
|
19
|
+
readonly text2: "#8B8B96";
|
|
20
|
+
readonly text3: "#83838F";
|
|
21
|
+
};
|
|
22
|
+
readonly light: {
|
|
23
|
+
readonly bg: "#F7F7F5";
|
|
24
|
+
readonly bgElev: "#FFFFFF";
|
|
25
|
+
readonly surface: "#FFFFFF";
|
|
26
|
+
readonly surface2: "#F2F2EF";
|
|
27
|
+
readonly border: "rgba(0,0,0,0.08)";
|
|
28
|
+
readonly borderStrong: "rgba(0,0,0,0.14)";
|
|
29
|
+
readonly controlBorder: "#85858E";
|
|
30
|
+
readonly text: "#16161B";
|
|
31
|
+
readonly text2: "#5A5A66";
|
|
32
|
+
readonly text3: "#6D6D76";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
declare const accents: {
|
|
36
|
+
readonly cyan: "oklch(0.78 0.12 210)";
|
|
37
|
+
readonly violet: "oklch(0.72 0.14 295)";
|
|
38
|
+
readonly mint: "oklch(0.78 0.10 160)";
|
|
39
|
+
readonly amber: "oklch(0.78 0.12 75)";
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Text/UI-safe accent variants ("ink"). `accents` above is tuned for surface use
|
|
43
|
+
* (dots, gradient border, progress bar) and fails WCAG AA as text on light
|
|
44
|
+
* backgrounds (e.g. cyan is ~1.8:1 on white). These preserve the dark-mode
|
|
45
|
+
* values (already ≥6.9:1) and darken each hue for light mode to clear 4.5:1
|
|
46
|
+
* against both light surfaces. Used anywhere the accent colors text: prose
|
|
47
|
+
* links, active TOC state, callout labels, hero eyebrow, copy-success, focus ring.
|
|
48
|
+
*/
|
|
49
|
+
declare const accentsInk: {
|
|
50
|
+
readonly dark: {
|
|
51
|
+
readonly cyan: "oklch(0.78 0.12 210)";
|
|
52
|
+
readonly violet: "oklch(0.72 0.14 295)";
|
|
53
|
+
readonly mint: "oklch(0.78 0.10 160)";
|
|
54
|
+
readonly amber: "oklch(0.78 0.12 75)";
|
|
55
|
+
};
|
|
56
|
+
readonly light: {
|
|
57
|
+
readonly cyan: "oklch(0.515 0.09 210)";
|
|
58
|
+
readonly violet: "oklch(0.535 0.14 295)";
|
|
59
|
+
readonly mint: "oklch(0.515 0.1 160)";
|
|
60
|
+
readonly amber: "oklch(0.53 0.11 75)";
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Semantic state colors — independent of the switchable `accent`, so a
|
|
65
|
+
* consumer picking `data-accent="amber"` never collides a warning with the
|
|
66
|
+
* site accent. Fixed per meaning in both surface and text/UI ("ink") forms,
|
|
67
|
+
* same split as `accents`/`accentsInk`.
|
|
68
|
+
*/
|
|
69
|
+
declare const semantic: {
|
|
70
|
+
readonly dark: {
|
|
71
|
+
readonly danger: "oklch(0.68 0.19 25)";
|
|
72
|
+
readonly success: "oklch(0.75 0.15 150)";
|
|
73
|
+
readonly info: "oklch(0.78 0.12 210)";
|
|
74
|
+
readonly warning: "oklch(0.78 0.12 75)";
|
|
75
|
+
};
|
|
76
|
+
readonly light: {
|
|
77
|
+
readonly danger: "oklch(0.68 0.19 25)";
|
|
78
|
+
readonly success: "oklch(0.75 0.15 150)";
|
|
79
|
+
readonly info: "oklch(0.78 0.12 210)";
|
|
80
|
+
readonly warning: "oklch(0.78 0.12 75)";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
declare const semanticInk: {
|
|
84
|
+
readonly dark: {
|
|
85
|
+
readonly danger: "oklch(0.68 0.19 25)";
|
|
86
|
+
readonly success: "oklch(0.75 0.15 150)";
|
|
87
|
+
readonly info: "oklch(0.78 0.12 210)";
|
|
88
|
+
readonly warning: "oklch(0.78 0.12 75)";
|
|
89
|
+
};
|
|
90
|
+
readonly light: {
|
|
91
|
+
readonly danger: "oklch(0.535 0.19 25)";
|
|
92
|
+
readonly success: "oklch(0.51 0.14 150)";
|
|
93
|
+
readonly info: "oklch(0.515 0.09 210)";
|
|
94
|
+
readonly warning: "oklch(0.53 0.11 75)";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
type ThemeMode = keyof typeof colors;
|
|
98
|
+
type AccentName = keyof typeof accents;
|
|
99
|
+
type ColorScheme = (typeof colors)[ThemeMode];
|
|
100
|
+
type SemanticName = keyof (typeof semantic)['dark'];
|
|
101
|
+
declare const themeModes: ThemeMode[];
|
|
102
|
+
declare const accentNames: AccentName[];
|
|
103
|
+
declare const DEFAULT_MODE: ThemeMode;
|
|
104
|
+
declare const DEFAULT_ACCENT: AccentName;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Blog categories from the prototype. Categories render as a colored dot + label
|
|
108
|
+
* (never an emoji). The pill also accepts any CSS color for whitelabel use.
|
|
109
|
+
*/
|
|
110
|
+
type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';
|
|
111
|
+
declare const defaultCategoryColors: Record<CategoryName, AccentName>;
|
|
112
|
+
/** Resolve an accent name or raw CSS color to a CSS color value. */
|
|
113
|
+
declare function resolveAccentColor(color: AccentName | (string & {})): string;
|
|
114
|
+
/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */
|
|
115
|
+
declare function resolveCategoryColor(color: CategoryName | AccentName | (string & {})): string;
|
|
116
|
+
|
|
117
|
+
/** Data shape consumed by PostCard / FeaturedPostCard. The library never ships mock data. */
|
|
118
|
+
interface PostSummary {
|
|
119
|
+
title: string;
|
|
120
|
+
href: string;
|
|
121
|
+
excerpt?: string;
|
|
122
|
+
date?: string;
|
|
123
|
+
readMinutes?: number;
|
|
124
|
+
category?: {
|
|
125
|
+
label: string;
|
|
126
|
+
/** Accent token name, known category, or any CSS color. */
|
|
127
|
+
color?: AccentName | CategoryName | (string & {});
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
interface TocItem {
|
|
131
|
+
id: string;
|
|
132
|
+
label: string;
|
|
133
|
+
depth?: 2 | 3;
|
|
134
|
+
}
|
|
135
|
+
interface NavItem {
|
|
136
|
+
label: string;
|
|
137
|
+
href: string;
|
|
138
|
+
active?: boolean;
|
|
139
|
+
}
|
|
140
|
+
/** Props every link the library renders passes to `linkAs`. */
|
|
141
|
+
interface LinkComponentProps {
|
|
142
|
+
href: string;
|
|
143
|
+
className?: string;
|
|
144
|
+
children?: ReactNode;
|
|
145
|
+
'aria-current'?: AriaAttributes['aria-current'];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The element or component a library link renders as. Defaults to `'a'`; pass
|
|
149
|
+
* your router's link (`next/link`'s `Link`, react-router's `Link`…) to get
|
|
150
|
+
* client-side navigation and prefetch without re-implementing the component.
|
|
151
|
+
* A component reference — not a function prop — so it works from a Server
|
|
152
|
+
* Component too.
|
|
153
|
+
*/
|
|
154
|
+
type LinkComponent = ElementType<LinkComponentProps>;
|
|
155
|
+
|
|
156
|
+
interface LogoProps extends ComponentPropsWithoutRef<'a'> {
|
|
157
|
+
label: string;
|
|
158
|
+
href?: string;
|
|
159
|
+
/** Render the link as your router's link component (e.g. `next/link`). Defaults to `<a>`. */
|
|
160
|
+
linkAs?: LinkComponent;
|
|
161
|
+
}
|
|
162
|
+
declare function Logo({ label, href, linkAs, className, ...rest }: LogoProps): React.JSX.Element;
|
|
163
|
+
interface HeaderProps extends ComponentPropsWithoutRef<'header'> {
|
|
164
|
+
/** Usually a <Logo />. */
|
|
165
|
+
logo?: ReactNode;
|
|
166
|
+
items?: NavItem[];
|
|
167
|
+
/** Right-side slot — theme toggle, search, etc. */
|
|
168
|
+
actions?: ReactNode;
|
|
169
|
+
/** Frosted glass background (default true). */
|
|
170
|
+
glass?: boolean;
|
|
171
|
+
/** Render nav links as your router's link component (e.g. `next/link`). Defaults to `<a>`. */
|
|
172
|
+
linkAs?: LinkComponent;
|
|
173
|
+
/** Accessible name of the mobile menu toggle. Defaults to `"Menu"`. */
|
|
174
|
+
menuLabel?: string;
|
|
175
|
+
/** Accessible name of the `<nav>` landmark. Omitted by default. */
|
|
176
|
+
navLabel?: string;
|
|
177
|
+
}
|
|
178
|
+
declare function Header({ logo: logoSlot, items, actions, glass, linkAs: LinkAs, menuLabel, navLabel, className, ...rest }: HeaderProps): React.JSX.Element;
|
|
179
|
+
interface FooterProps extends ComponentPropsWithoutRef<'footer'> {
|
|
180
|
+
author?: string;
|
|
181
|
+
links?: NavItem[];
|
|
182
|
+
children?: ReactNode;
|
|
183
|
+
/** Render footer links as your router's link component (e.g. `next/link`). Defaults to `<a>`. */
|
|
184
|
+
linkAs?: LinkComponent;
|
|
185
|
+
}
|
|
186
|
+
declare function Footer({ author, links, children, linkAs: LinkAs, className, ...rest }: FooterProps): React.JSX.Element;
|
|
187
|
+
|
|
188
|
+
interface CategoryPillBaseProps {
|
|
189
|
+
label: string;
|
|
190
|
+
/** Accent name ('cyan'), category name ('ia'), or any CSS color. */
|
|
191
|
+
color?: string;
|
|
192
|
+
active?: boolean;
|
|
193
|
+
}
|
|
194
|
+
type CategoryPillProps = (CategoryPillBaseProps & {
|
|
195
|
+
interactive: true;
|
|
196
|
+
} & Omit<ComponentPropsWithoutRef<'button'>, 'color'>) | (CategoryPillBaseProps & {
|
|
197
|
+
interactive?: false;
|
|
198
|
+
} & Omit<ComponentPropsWithoutRef<'span'>, 'color'>);
|
|
199
|
+
/**
|
|
200
|
+
* Categories render as a colored dot + label. When `interactive`, this is a
|
|
201
|
+
* real <button> (toggle semantics via `aria-pressed`) — a `<span>` with a
|
|
202
|
+
* pointer cursor is not operable by keyboard or assistive tech.
|
|
203
|
+
*/
|
|
204
|
+
declare function CategoryPill({ label, color, active, interactive, className, style, ...rest }: CategoryPillProps): React.JSX.Element;
|
|
205
|
+
interface PostCardProps extends ComponentPropsWithoutRef<'article'> {
|
|
206
|
+
post: PostSummary;
|
|
207
|
+
dense?: boolean;
|
|
208
|
+
/** Render the title link as your router's link component (e.g. `next/link`). Defaults to `<a>`. */
|
|
209
|
+
linkAs?: LinkComponent;
|
|
210
|
+
/** Replaces the default meta row (category pill, date, reading time). */
|
|
211
|
+
meta?: ReactNode;
|
|
212
|
+
}
|
|
213
|
+
declare function PostCard({ post, dense, linkAs: LinkAs, meta, className, children, ...rest }: PostCardProps): React.JSX.Element;
|
|
214
|
+
interface FeaturedPostCardProps extends ComponentPropsWithoutRef<'article'> {
|
|
215
|
+
post: PostSummary;
|
|
216
|
+
/** Custom visual slot (illustration, image). */
|
|
217
|
+
visual?: ReactNode;
|
|
218
|
+
/** Render the title link as your router's link component (e.g. `next/link`). Defaults to `<a>`. */
|
|
219
|
+
linkAs?: LinkComponent;
|
|
220
|
+
/** Replaces the default meta row (category pill, date, reading time). */
|
|
221
|
+
meta?: ReactNode;
|
|
222
|
+
/** Slot rendered above the meta row — e.g. a "Featured" badge. */
|
|
223
|
+
eyebrow?: ReactNode;
|
|
224
|
+
}
|
|
225
|
+
declare function FeaturedPostCard({ post, visual, linkAs: LinkAs, meta, eyebrow, className, children, ...rest }: FeaturedPostCardProps): React.JSX.Element;
|
|
226
|
+
interface PostGridProps extends ComponentPropsWithoutRef<'div'> {
|
|
227
|
+
}
|
|
228
|
+
declare function PostGrid({ className, ...rest }: PostGridProps): React.JSX.Element;
|
|
229
|
+
interface LayoutProps extends ComponentPropsWithoutRef<'div'> {
|
|
230
|
+
withSidebar?: boolean;
|
|
231
|
+
}
|
|
232
|
+
declare function Layout({ withSidebar, className, ...rest }: LayoutProps): React.JSX.Element;
|
|
233
|
+
interface SidebarProps extends ComponentPropsWithoutRef<'aside'> {
|
|
234
|
+
}
|
|
235
|
+
declare function Sidebar({ className, ...rest }: SidebarProps): React.JSX.Element;
|
|
236
|
+
interface SidebarSectionProps extends ComponentPropsWithoutRef<'section'> {
|
|
237
|
+
title: string;
|
|
238
|
+
}
|
|
239
|
+
declare function SidebarSection({ title, children, ...rest }: SidebarSectionProps): React.JSX.Element;
|
|
240
|
+
interface HeroProps extends Omit<ComponentPropsWithoutRef<'section'>, 'title'> {
|
|
241
|
+
/** Plain text or inline markup (e.g. a status dot before the text). */
|
|
242
|
+
eyebrow?: ReactNode;
|
|
243
|
+
/** Plain text or inline markup (e.g. one word in a muted tone). */
|
|
244
|
+
title: ReactNode;
|
|
245
|
+
description?: ReactNode;
|
|
246
|
+
}
|
|
247
|
+
declare function Hero({ eyebrow, title, description, className, children, ...rest }: HeroProps): React.JSX.Element;
|
|
248
|
+
interface SkeletonProps extends ComponentPropsWithoutRef<'div'> {
|
|
249
|
+
small?: boolean;
|
|
250
|
+
}
|
|
251
|
+
declare function Skeleton({ small, className, ...rest }: SkeletonProps): React.JSX.Element;
|
|
252
|
+
declare function CardSkeleton({ className, ...rest }: ComponentPropsWithoutRef<'div'>): React.JSX.Element;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,
|
|
256
|
+
* ArticleHeader, Prose. Pure functions — Server Component safe.
|
|
257
|
+
*/
|
|
258
|
+
declare function codeBlock(): string;
|
|
259
|
+
declare const codeBlockClasses: {
|
|
260
|
+
readonly header: "sv-code-block__header";
|
|
261
|
+
readonly pre: "sv-code-block__pre";
|
|
262
|
+
readonly copy: "sv-code-block__copy";
|
|
263
|
+
readonly copyCopied: string;
|
|
264
|
+
};
|
|
265
|
+
type CalloutKind = 'note' | 'warn' | 'aha';
|
|
266
|
+
declare function callout(kind: CalloutKind): string;
|
|
267
|
+
declare const calloutClasses: {
|
|
268
|
+
readonly label: "sv-callout__label";
|
|
269
|
+
};
|
|
270
|
+
declare const calloutLabels: Record<CalloutKind, string>;
|
|
271
|
+
declare function tableOfContents(): string;
|
|
272
|
+
interface TocLinkOptions {
|
|
273
|
+
active?: boolean;
|
|
274
|
+
/** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */
|
|
275
|
+
depth?: 2 | 3;
|
|
276
|
+
}
|
|
277
|
+
declare function tocLink(options?: TocLinkOptions): string;
|
|
278
|
+
declare function readingProgress(): string;
|
|
279
|
+
declare const readingProgressClasses: {
|
|
280
|
+
readonly bar: "sv-reading-progress__bar";
|
|
281
|
+
};
|
|
282
|
+
/** CSS var read by `.sv-reading-progress__bar` (0 → 1). */
|
|
283
|
+
declare const READING_PROGRESS_VAR = "--sv-reading-progress";
|
|
284
|
+
declare function articleHeader(): string;
|
|
285
|
+
declare const articleHeaderClasses: {
|
|
286
|
+
readonly title: "sv-article-header__title";
|
|
287
|
+
readonly meta: "sv-article-header__meta";
|
|
288
|
+
readonly author: "sv-article-header__author";
|
|
289
|
+
};
|
|
290
|
+
declare function prose(): string;
|
|
291
|
+
declare const proseClasses: {
|
|
292
|
+
readonly lead: "sv-prose__lead";
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
interface CodeBlockProps extends ComponentPropsWithoutRef<'figure'> {
|
|
296
|
+
/** Raw source shown when `rendered` is absent. */
|
|
297
|
+
code: string;
|
|
298
|
+
language?: string;
|
|
299
|
+
filename?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Pre-highlighted markup (e.g. Shiki output rendered on the server).
|
|
302
|
+
* The prototype's regex tokenizer was demo-only and is intentionally
|
|
303
|
+
* not part of the library.
|
|
304
|
+
*/
|
|
305
|
+
rendered?: ReactNode;
|
|
306
|
+
/** Header slot — pass <CopyButton code={code} /> from the client entry. */
|
|
307
|
+
actions?: ReactNode;
|
|
308
|
+
}
|
|
309
|
+
declare function CodeBlock({ code, language, filename, rendered, actions, className, ...rest }: CodeBlockProps): React.JSX.Element;
|
|
310
|
+
interface CalloutProps extends ComponentPropsWithoutRef<'aside'> {
|
|
311
|
+
kind: CalloutKind;
|
|
312
|
+
/** Override the default kind label. */
|
|
313
|
+
label?: string;
|
|
314
|
+
}
|
|
315
|
+
declare function Callout({ kind, label, className, children, ...rest }: CalloutProps): React.JSX.Element;
|
|
316
|
+
interface ArticleHeaderProps extends ComponentPropsWithoutRef<'header'> {
|
|
317
|
+
title: string;
|
|
318
|
+
author?: string;
|
|
319
|
+
date?: string;
|
|
320
|
+
readMinutes?: number;
|
|
321
|
+
/** Slot above the title — usually a <CategoryPill />. */
|
|
322
|
+
eyebrow?: ReactNode;
|
|
323
|
+
}
|
|
324
|
+
declare function ArticleHeader({ title, author, date, readMinutes, eyebrow, className, ...rest }: ArticleHeaderProps): React.JSX.Element;
|
|
325
|
+
interface ProseProps extends ComponentPropsWithoutRef<'div'> {
|
|
326
|
+
}
|
|
327
|
+
/** Typography wrapper for article/MDX content. */
|
|
328
|
+
declare function Prose({ className, ...rest }: ProseProps): React.JSX.Element;
|
|
329
|
+
interface LeadProps extends ComponentPropsWithoutRef<'p'> {
|
|
330
|
+
}
|
|
331
|
+
/** Lead paragraph inside <Prose>. */
|
|
332
|
+
declare function Lead({ className, ...rest }: LeadProps): React.JSX.Element;
|
|
333
|
+
|
|
334
|
+
interface PageHeaderProps extends Omit<ComponentPropsWithoutRef<'header'>, 'title'> {
|
|
335
|
+
title: ReactNode;
|
|
336
|
+
/** Supporting line under the title. */
|
|
337
|
+
description?: ReactNode;
|
|
338
|
+
/** Badge next to the title (e.g. a status). */
|
|
339
|
+
badge?: ReactNode;
|
|
340
|
+
/**
|
|
341
|
+
* Wide badge: always on its own line below 40rem, beside the title from
|
|
342
|
+
* 40rem up. Decided by viewport width (CSS), never by text measurement, so
|
|
343
|
+
* it doesn't jump when the web font arrives.
|
|
344
|
+
*/
|
|
345
|
+
stackBadge?: boolean;
|
|
346
|
+
/** Above the title (e.g. a back link). */
|
|
347
|
+
leading?: ReactNode;
|
|
348
|
+
/** The screen's primary actions: below the title on narrow screens, to the right from 40rem. */
|
|
349
|
+
actions?: ReactNode;
|
|
350
|
+
/** Heading element for the title. Default `h1`. */
|
|
351
|
+
headingLevel?: 'h1' | 'h2' | 'h3';
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Screen header for app pages: one heading, optional supporting text, badge
|
|
355
|
+
* and actions. Mobile first — stacked, side by side from 40rem. Server-safe.
|
|
356
|
+
*/
|
|
357
|
+
declare function PageHeader({ title, description, badge, stackBadge, leading, actions, headingLevel: Heading, className, ...rest }: PageHeaderProps): React.JSX.Element;
|
|
358
|
+
|
|
359
|
+
interface ThemeScriptProps {
|
|
360
|
+
/** Must match the `storageKey` passed to `<ThemeProvider>` (or `createThemeManager`). */
|
|
361
|
+
storageKey?: string;
|
|
362
|
+
/** CSP nonce forwarded to the inline `<script>`. */
|
|
363
|
+
nonce?: string;
|
|
364
|
+
}
|
|
365
|
+
declare function ThemeScript({ storageKey, nonce }?: ThemeScriptProps): React.JSX.Element;
|
|
366
|
+
|
|
367
|
+
type ButtonVariant = "default" | "primary" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "accent";
|
|
368
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
369
|
+
/**
|
|
370
|
+
* `default` is the neutral surface button (secondary actions, toolbars) —
|
|
371
|
+
* it is *not* the page's primary call to action. The filled accent button
|
|
372
|
+
* is the primary CTA: `variant="primary"` (alias, since 3.6) or `"accent"`
|
|
373
|
+
* render the same `sv-btn--accent`. Use at most one per view (One-Accent
|
|
374
|
+
* Rule, DESIGN.md).
|
|
375
|
+
*/
|
|
376
|
+
variant?: ButtonVariant;
|
|
377
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
378
|
+
/**
|
|
379
|
+
* Merge the button's classes, ref and props onto a single child instead of
|
|
380
|
+
* rendering a `<button>` — e.g. `<Button asChild><Link href="/x">…</Link></Button>`
|
|
381
|
+
* for a navigation that must look like a button (next/link, react-router).
|
|
382
|
+
* Server-safe: uses the vendored `Slot` (AD-015), not Radix's.
|
|
383
|
+
*/
|
|
384
|
+
asChild?: boolean;
|
|
385
|
+
}
|
|
386
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
387
|
+
|
|
388
|
+
type CardElement = "div" | "section" | "article" | "li" | "aside";
|
|
389
|
+
interface CardProps extends React.HTMLAttributes<HTMLElement> {
|
|
390
|
+
/** Tag to render. Defaults to `div`. Ignored when `asChild` is also passed (AD-006). */
|
|
391
|
+
as?: CardElement;
|
|
392
|
+
/** Merge sv-card's class, ref and props onto a single child instead of rendering a wrapper. Wins over `as` when both are given (AD-006). */
|
|
393
|
+
asChild?: boolean;
|
|
394
|
+
}
|
|
395
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLElement>>;
|
|
396
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
397
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
398
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
399
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
400
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
401
|
+
|
|
402
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
403
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
404
|
+
variant?: AlertVariant;
|
|
405
|
+
icon?: React.ReactNode | null;
|
|
406
|
+
action?: React.ReactNode;
|
|
407
|
+
}
|
|
408
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
409
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
410
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
411
|
+
|
|
412
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
413
|
+
variant?: "default" | "secondary" | "destructive" | "outline";
|
|
414
|
+
/** Merge the badge's classes and props onto a single child (e.g. a link or a `<span>`) instead of rendering a `<div>`. */
|
|
415
|
+
asChild?: boolean;
|
|
416
|
+
}
|
|
417
|
+
declare function Badge({ className, variant, asChild, ...props }: BadgeProps): React.JSX.Element;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* The curated set behind `Icon` (AD-013).
|
|
421
|
+
*
|
|
422
|
+
* One grade — 24/outline — is the whole family, because size comes from CSS
|
|
423
|
+
* (`.sv-icon`) and mixing grades would mix stroke weights at the same rendered
|
|
424
|
+
* size. Each glyph is a NAMED import from the grade subpath: a namespace import
|
|
425
|
+
* or the package root barrel would pull all ~1200 heroicons into the consumer's
|
|
426
|
+
* bundle instead of the one or two they use.
|
|
427
|
+
*
|
|
428
|
+
* The names are the design system's, not heroicons': `alert-triangle` reads the
|
|
429
|
+
* same whatever library draws it, which is what keeps a future swap of source
|
|
430
|
+
* out of the public API.
|
|
431
|
+
*/
|
|
432
|
+
type IconName = 'x' | 'check' | 'chevron-down' | 'chevron-up' | 'chevron-right' | 'chevron-left' | 'info' | 'alert-triangle' | 'alert-circle' | 'check-circle' | 'copy' | 'sun' | 'moon' | 'search' | 'menu' | 'camera' | 'blocked' | 'pending';
|
|
433
|
+
|
|
434
|
+
interface IconProps extends Omit<React.SVGProps<SVGSVGElement>, 'ref'> {
|
|
435
|
+
name: IconName;
|
|
436
|
+
/** `md` is the default and carries no modifier — the base class is the size. */
|
|
437
|
+
size?: 'sm' | 'md' | 'lg';
|
|
438
|
+
/** Present: the icon is announced. Absent: it stays decorative. */
|
|
439
|
+
label?: string;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* The design system's icon (ICON-01..06).
|
|
443
|
+
*
|
|
444
|
+
* Server-safe by construction: no hook, no context, no client boundary —
|
|
445
|
+
* heroicons is a plain forwardRef <svg> and this adds only class names, so
|
|
446
|
+
* `Icon` renders inside a Next.js Server Component (AD-002, AD-013).
|
|
447
|
+
*
|
|
448
|
+
* Size is deliberately NOT a prop on the svg: heroicons emits no width/height
|
|
449
|
+
* attribute, so `.sv-icon` is the only thing sizing it, and a consumer cannot
|
|
450
|
+
* pull an icon off the token scale by passing a pixel value.
|
|
451
|
+
*/
|
|
452
|
+
declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
453
|
+
|
|
454
|
+
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
455
|
+
}
|
|
456
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Field — label + control + optional description + optional error, with the
|
|
460
|
+
* ARIA wiring done for you: the control gets `id`, `aria-describedby`
|
|
461
|
+
* (description and error ids, merged with any the control already had) and
|
|
462
|
+
* `aria-invalid` when there is an error; the label gets `htmlFor`.
|
|
463
|
+
*
|
|
464
|
+
* Server-safe (no hooks, no context — AD-002 forbids `useId` here), so ids are
|
|
465
|
+
* derived from the `id` you pass (or the control's own `id`): `<id>-description`
|
|
466
|
+
* and `<id>-error`.
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* <Field id="email" label="E-mail" description="Usado só para login" error={errors.email}>
|
|
470
|
+
* <Input type="email" name="email" />
|
|
471
|
+
* </Field>
|
|
472
|
+
*/
|
|
473
|
+
interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
474
|
+
/** Id of the control. Falls back to the child's own `id`; one of the two is required. */
|
|
475
|
+
id?: string;
|
|
476
|
+
label: React.ReactNode;
|
|
477
|
+
description?: React.ReactNode;
|
|
478
|
+
/** Error message. Truthy marks the control `aria-invalid` and renders the message. */
|
|
479
|
+
error?: React.ReactNode;
|
|
480
|
+
/** Shows a required marker after the label and sets `required` on the control. */
|
|
481
|
+
required?: boolean;
|
|
482
|
+
/** Text of the required marker (screen readers announce `required` from the control itself). Defaults to `"*"`. */
|
|
483
|
+
requiredIndicator?: React.ReactNode;
|
|
484
|
+
/** Exactly one form control (Input, Textarea, NativeSelect, FileInput, SelectTrigger's root…). */
|
|
485
|
+
children: React.ReactElement;
|
|
486
|
+
}
|
|
487
|
+
declare function Field({ id: idProp, label, description, error, required, requiredIndicator, className, children, ...rest }: FieldProps): React.JSX.Element;
|
|
488
|
+
declare namespace Field {
|
|
489
|
+
var displayName: string;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
interface TextLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
493
|
+
/**
|
|
494
|
+
* Merge the link's class and props onto a single child — your router's link:
|
|
495
|
+
* `<TextLink asChild><NextLink href="/sobre">Sobre</NextLink></TextLink>`.
|
|
496
|
+
*/
|
|
497
|
+
asChild?: boolean;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Inline text link outside Prose (`.sv-link`): accent ink, underline, focus
|
|
501
|
+
* ring, 24px minimum target (44px on touch). Server-safe.
|
|
502
|
+
*/
|
|
503
|
+
declare const TextLink: React.ForwardRefExoticComponent<TextLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
504
|
+
|
|
505
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
506
|
+
}
|
|
507
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
508
|
+
|
|
509
|
+
interface NativeSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
510
|
+
}
|
|
511
|
+
declare const NativeSelect: React.ForwardRefExoticComponent<NativeSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
512
|
+
|
|
513
|
+
interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
514
|
+
}
|
|
515
|
+
declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
516
|
+
|
|
517
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
518
|
+
}
|
|
519
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
520
|
+
|
|
521
|
+
interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
522
|
+
orientation?: "horizontal" | "vertical";
|
|
523
|
+
/**
|
|
524
|
+
* `true` (default, matching shadcn/ui upstream): a purely visual divider,
|
|
525
|
+
* so it stays out of the accessibility tree — no `role`, no
|
|
526
|
+
* `aria-orientation`. Pass `false` for a divider that carries real
|
|
527
|
+
* meaning (e.g. between two distinct sign-in methods) to expose
|
|
528
|
+
* `role="separator"` and, when vertical, `aria-orientation="vertical"`.
|
|
529
|
+
*/
|
|
530
|
+
decorative?: boolean;
|
|
531
|
+
}
|
|
532
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
533
|
+
|
|
534
|
+
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
535
|
+
/** Current amount. Clamped to `[0, max]` — never renders past the track. */
|
|
536
|
+
value?: number;
|
|
537
|
+
/** Ceiling `value` is measured against. Library default is `100` — not a claim of native `<progress>` parity (that element defaults `max` to `1` and treats an omitted `value` as indeterminate; this component always renders a determinate `value`). */
|
|
538
|
+
max?: number;
|
|
539
|
+
}
|
|
540
|
+
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
541
|
+
|
|
542
|
+
interface PaginationProps extends React.ComponentPropsWithoutRef<"nav"> {
|
|
543
|
+
/** Accessible name of the landmark. Defaults to `"pagination"`; pass a translation (e.g. `"Paginação"`). Blank counts as omitted. */
|
|
544
|
+
label?: string;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* The root landmark. The label is what tells assistive tech which `<nav>`
|
|
548
|
+
* this is among possibly several on the page, so it is always set: `label`
|
|
549
|
+
* picks the text (default `"pagination"`), and a raw `aria-label` prop is
|
|
550
|
+
* still overridden — spread order matters here the same way Dialog's
|
|
551
|
+
* `aria-modal` does.
|
|
552
|
+
*/
|
|
553
|
+
declare const Pagination: {
|
|
554
|
+
({ className, label, ...props }: PaginationProps): React.JSX.Element;
|
|
555
|
+
displayName: string;
|
|
556
|
+
};
|
|
557
|
+
type PaginationContentProps = React.ComponentPropsWithoutRef<"ul">;
|
|
558
|
+
declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
559
|
+
type PaginationItemProps = React.ComponentPropsWithoutRef<"li">;
|
|
560
|
+
declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
561
|
+
interface PaginationLinkOwnProps {
|
|
562
|
+
isActive?: boolean;
|
|
563
|
+
}
|
|
564
|
+
type PaginationLinkProps = PaginationLinkOwnProps & Omit<React.ComponentPropsWithoutRef<"a">, "href"> & {
|
|
565
|
+
href?: string;
|
|
566
|
+
};
|
|
567
|
+
/**
|
|
568
|
+
* Renders an `<a>` when `href` is passed (real navigation: SEO, right-click
|
|
569
|
+
* "open in new tab"), a `<button type="button">` otherwise (client-side page
|
|
570
|
+
* state with no URL to point at) — never a third `as` prop to pick between
|
|
571
|
+
* them, because these are the only two real call sites (AD, design.md).
|
|
572
|
+
*/
|
|
573
|
+
declare const PaginationLink: React.ForwardRefExoticComponent<PaginationLinkOwnProps & Omit<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "href"> & {
|
|
574
|
+
href?: string;
|
|
575
|
+
} & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
576
|
+
interface PaginationPreviousProps extends Omit<PaginationLinkProps, "children"> {
|
|
577
|
+
/** Accessible + visible label. Defaults to English, like closeLabel on DialogContent — override for i18n. */
|
|
578
|
+
label?: string;
|
|
579
|
+
}
|
|
580
|
+
declare const PaginationPrevious: React.ForwardRefExoticComponent<PaginationPreviousProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
581
|
+
interface PaginationNextProps extends Omit<PaginationLinkProps, "children"> {
|
|
582
|
+
label?: string;
|
|
583
|
+
}
|
|
584
|
+
declare const PaginationNext: React.ForwardRefExoticComponent<PaginationNextProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
585
|
+
type PaginationEllipsisProps = React.ComponentPropsWithoutRef<"span">;
|
|
586
|
+
/** Not a link — there is nothing to focus or activate, only a visual "more pages" marker. */
|
|
587
|
+
declare const PaginationEllipsis: {
|
|
588
|
+
({ className, ...props }: PaginationEllipsisProps): React.JSX.Element;
|
|
589
|
+
displayName: string;
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* SVG chart primitives — visual geometry only, reading the system's own
|
|
594
|
+
* tokens for grid/axis color and taking series color as a prop (the three
|
|
595
|
+
* series tokens, `var(--sv-accent-ink)` / `var(--sv-info-ink)` /
|
|
596
|
+
* `var(--sv-warning-ink)`, are the system's contract; which series maps to
|
|
597
|
+
* which token is the consumer's call, same as it is today).
|
|
598
|
+
*
|
|
599
|
+
* Deliberately NOT a charting engine: every geometry prop here (`points`,
|
|
600
|
+
* `positions`, `ticks`, `bars`) is already in pixel space. Mapping a domain
|
|
601
|
+
* value (a clinical score, a percentage) to that space is application logic,
|
|
602
|
+
* not a design-system concern — see design.md's Assumptions table.
|
|
603
|
+
*/
|
|
604
|
+
interface ChartContainerProps {
|
|
605
|
+
width: number;
|
|
606
|
+
height: number;
|
|
607
|
+
/** The chart's accessible name. Omit only when an adjacent visible caption already names it. */
|
|
608
|
+
"aria-label"?: string;
|
|
609
|
+
className?: string;
|
|
610
|
+
children?: React.ReactNode;
|
|
611
|
+
}
|
|
612
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<ChartContainerProps & React.RefAttributes<SVGSVGElement>>;
|
|
613
|
+
interface ChartGridProps {
|
|
614
|
+
orientation: "horizontal" | "vertical";
|
|
615
|
+
/** Position, along the axis perpendicular to the line's own direction, of each grid line. */
|
|
616
|
+
positions: number[];
|
|
617
|
+
/** Line length — the far edge each horizontal line reaches on x, or each vertical line reaches on y. */
|
|
618
|
+
width: number;
|
|
619
|
+
className?: string;
|
|
620
|
+
}
|
|
621
|
+
declare const ChartGrid: {
|
|
622
|
+
({ orientation, positions, width, className }: ChartGridProps): React.JSX.Element;
|
|
623
|
+
displayName: string;
|
|
624
|
+
};
|
|
625
|
+
interface ChartTick {
|
|
626
|
+
position: number;
|
|
627
|
+
label: string;
|
|
628
|
+
}
|
|
629
|
+
interface ChartAxisProps {
|
|
630
|
+
orientation: "bottom" | "left";
|
|
631
|
+
ticks: ChartTick[];
|
|
632
|
+
/** Baseline length — how far along its own axis the line runs. */
|
|
633
|
+
length: number;
|
|
634
|
+
className?: string;
|
|
635
|
+
}
|
|
636
|
+
declare const ChartAxis: {
|
|
637
|
+
({ orientation, ticks, length, className }: ChartAxisProps): React.JSX.Element;
|
|
638
|
+
displayName: string;
|
|
639
|
+
};
|
|
640
|
+
interface ChartPoint {
|
|
641
|
+
x: number;
|
|
642
|
+
y: number;
|
|
643
|
+
}
|
|
644
|
+
interface ChartLineProps {
|
|
645
|
+
points: ChartPoint[];
|
|
646
|
+
/** A `var(--sv-*-ink)` series token, or any valid CSS color. */
|
|
647
|
+
color: string;
|
|
648
|
+
className?: string;
|
|
649
|
+
/** Line width in px. Defaults to 2. */
|
|
650
|
+
strokeWidth?: number;
|
|
651
|
+
/**
|
|
652
|
+
* Dash pattern, so a series can be told apart without relying on color
|
|
653
|
+
* (WCAG 1.4.1): `"dashed"` (6 4), `"dotted"` (1 4), or any SVG
|
|
654
|
+
* `stroke-dasharray` value. Solid when omitted.
|
|
655
|
+
*/
|
|
656
|
+
dash?: "dashed" | "dotted" | (string & {});
|
|
657
|
+
/** Draw a point marker on every point. `true` uses a 3px radius; pass a number for another radius. */
|
|
658
|
+
markers?: boolean | number;
|
|
659
|
+
/** Series name: rendered as an SVG `<title>` on the series group, for pointer hover and assistive tech. */
|
|
660
|
+
label?: string;
|
|
661
|
+
}
|
|
662
|
+
declare const ChartLine: {
|
|
663
|
+
({ points, color, className, strokeWidth, dash, markers, label, }: ChartLineProps): React.JSX.Element;
|
|
664
|
+
displayName: string;
|
|
665
|
+
};
|
|
666
|
+
interface ChartBarDatum {
|
|
667
|
+
x: number;
|
|
668
|
+
y: number;
|
|
669
|
+
width: number;
|
|
670
|
+
height: number;
|
|
671
|
+
}
|
|
672
|
+
interface ChartBarProps {
|
|
673
|
+
bars: ChartBarDatum[];
|
|
674
|
+
/** A `var(--sv-*-ink)` series token, or any valid CSS color. */
|
|
675
|
+
color: string;
|
|
676
|
+
className?: string;
|
|
677
|
+
}
|
|
678
|
+
declare const ChartBar: {
|
|
679
|
+
({ bars, color, className }: ChartBarProps): React.JSX.Element;
|
|
680
|
+
displayName: string;
|
|
681
|
+
};
|
|
682
|
+
interface ChartLegendItem {
|
|
683
|
+
label: React.ReactNode;
|
|
684
|
+
/** Same color passed to the series' `ChartLine`/`ChartBar`. */
|
|
685
|
+
color: string;
|
|
686
|
+
/** Swatch shape: a line (default) or a filled block for bar series. */
|
|
687
|
+
kind?: "line" | "bar";
|
|
688
|
+
/** Draw the line swatch dashed, matching a `ChartLine dash`. */
|
|
689
|
+
dashed?: boolean;
|
|
690
|
+
}
|
|
691
|
+
interface ChartLegendProps extends Omit<React.HTMLAttributes<HTMLUListElement>, "children"> {
|
|
692
|
+
items: ChartLegendItem[];
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Series legend, rendered as an HTML list beside the `<svg>` (not inside it):
|
|
696
|
+
* it wraps, uses the body font and reads as a list to assistive tech. The
|
|
697
|
+
* swatch is decorative; the label carries the meaning.
|
|
698
|
+
*/
|
|
699
|
+
declare const ChartLegend: {
|
|
700
|
+
({ items, className, ...props }: ChartLegendProps): React.JSX.Element;
|
|
701
|
+
displayName: string;
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
interface RadioGroupItemProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
705
|
+
children?: React.ReactNode;
|
|
706
|
+
}
|
|
707
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLInputElement>>;
|
|
708
|
+
interface RadioGroupProps extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, "name"> {
|
|
709
|
+
legend?: React.ReactNode;
|
|
710
|
+
legendHidden?: boolean;
|
|
711
|
+
orientation?: "vertical" | "horizontal";
|
|
712
|
+
name?: string;
|
|
713
|
+
}
|
|
714
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLFieldSetElement>>;
|
|
715
|
+
|
|
716
|
+
interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
717
|
+
containerClassName?: string;
|
|
718
|
+
/** Below 40rem, render each row as a block of label/value pairs. Pair with `TableCell label`. */
|
|
719
|
+
stack?: boolean;
|
|
720
|
+
}
|
|
721
|
+
declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
722
|
+
interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
723
|
+
}
|
|
724
|
+
declare const TableHeader: React.ForwardRefExoticComponent<TableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
725
|
+
interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
726
|
+
}
|
|
727
|
+
declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
728
|
+
interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
729
|
+
}
|
|
730
|
+
declare const TableFooter: React.ForwardRefExoticComponent<TableFooterProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
731
|
+
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
732
|
+
}
|
|
733
|
+
declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
734
|
+
interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
735
|
+
}
|
|
736
|
+
declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
737
|
+
interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
738
|
+
/** Column name shown before the value when the table is stacked (`Table stack`). */
|
|
739
|
+
label?: string;
|
|
740
|
+
}
|
|
741
|
+
declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
742
|
+
interface TableCaptionProps extends React.HTMLAttributes<HTMLTableCaptionElement> {
|
|
743
|
+
}
|
|
744
|
+
declare const TableCaption: React.ForwardRefExoticComponent<TableCaptionProps & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
745
|
+
|
|
746
|
+
/** What an unsafe href is replaced with: inert, still a valid `href` for `next/link`. */
|
|
747
|
+
declare const BLOCKED_HREF = "#";
|
|
748
|
+
/**
|
|
749
|
+
* Returns `href` unchanged unless it uses a script-capable scheme
|
|
750
|
+
* (`javascript:`, `vbscript:`, `data:`), in which case it returns `"#"`.
|
|
751
|
+
* Relative paths, fragments, `http(s):`, `mailto:`, `tel:` and any other
|
|
752
|
+
* scheme pass through. `undefined` stays `undefined`. Server-safe.
|
|
753
|
+
*
|
|
754
|
+
* React 19 already neutralises `javascript:` on a plain `<a>`, but not
|
|
755
|
+
* `data:`/`vbscript:`, and not hrefs handed to a custom `linkAs` component.
|
|
756
|
+
*/
|
|
757
|
+
declare function safeHref<T extends string | undefined>(href: T): T | typeof BLOCKED_HREF;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Still Void typography tokens.
|
|
761
|
+
* Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).
|
|
762
|
+
* System fallbacks are loading fallbacks only — the final family must be the correct one.
|
|
763
|
+
*/
|
|
764
|
+
declare const fontFamilies: {
|
|
765
|
+
readonly display: "'Sora', ui-sans-serif, system-ui, sans-serif";
|
|
766
|
+
readonly body: "'Manrope', ui-sans-serif, system-ui, sans-serif";
|
|
767
|
+
readonly mono: "'JetBrains Mono', ui-monospace, 'SF Mono', monospace";
|
|
768
|
+
};
|
|
769
|
+
declare const fontWeights: {
|
|
770
|
+
readonly regular: 400;
|
|
771
|
+
readonly medium: 500;
|
|
772
|
+
readonly semibold: 600;
|
|
773
|
+
readonly bold: 700;
|
|
774
|
+
};
|
|
775
|
+
declare const fontSizes: {
|
|
776
|
+
readonly xs: "0.75rem";
|
|
777
|
+
readonly sm: "0.8125rem";
|
|
778
|
+
readonly base: "0.9375rem";
|
|
779
|
+
readonly md: "1rem";
|
|
780
|
+
readonly lg: "1.125rem";
|
|
781
|
+
readonly xl: "1.375rem";
|
|
782
|
+
readonly '2xl': "1.75rem";
|
|
783
|
+
readonly '3xl': "2.25rem";
|
|
784
|
+
readonly '4xl': "2.75rem";
|
|
785
|
+
};
|
|
786
|
+
declare const lineHeights: {
|
|
787
|
+
readonly tight: 1.15;
|
|
788
|
+
readonly snug: 1.3;
|
|
789
|
+
readonly normal: 1.5;
|
|
790
|
+
readonly relaxed: 1.7;
|
|
791
|
+
};
|
|
792
|
+
declare const letterSpacings: {
|
|
793
|
+
readonly display: "-0.02em";
|
|
794
|
+
readonly normal: "0";
|
|
795
|
+
readonly wide: "0.08em";
|
|
796
|
+
};
|
|
797
|
+
type FontFamily = keyof typeof fontFamilies;
|
|
798
|
+
type FontSize = keyof typeof fontSizes;
|
|
799
|
+
type FontWeight = keyof typeof fontWeights;
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Still Void spacing scale (4→72px) and radii (6/8/12/16/full).
|
|
803
|
+
*/
|
|
804
|
+
declare const spacing: {
|
|
805
|
+
readonly 1: "4px";
|
|
806
|
+
readonly 2: "8px";
|
|
807
|
+
readonly 3: "12px";
|
|
808
|
+
readonly 4: "16px";
|
|
809
|
+
readonly 5: "20px";
|
|
810
|
+
readonly 6: "24px";
|
|
811
|
+
readonly 8: "32px";
|
|
812
|
+
readonly 10: "40px";
|
|
813
|
+
readonly 12: "48px";
|
|
814
|
+
readonly 14: "56px";
|
|
815
|
+
readonly 16: "64px";
|
|
816
|
+
readonly 18: "72px";
|
|
817
|
+
};
|
|
818
|
+
declare const radii: {
|
|
819
|
+
readonly sm: "6px";
|
|
820
|
+
readonly md: "8px";
|
|
821
|
+
readonly lg: "12px";
|
|
822
|
+
readonly xl: "16px";
|
|
823
|
+
readonly full: "9999px";
|
|
824
|
+
};
|
|
825
|
+
type SpacingStep = keyof typeof spacing;
|
|
826
|
+
type Radius = keyof typeof radii;
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Still Void motion tokens.
|
|
830
|
+
* Hover transitions use the signature easing; the reading progress bar is linear.
|
|
831
|
+
*/
|
|
832
|
+
declare const easings: {
|
|
833
|
+
readonly hover: "cubic-bezier(.3,.7,.4,1)";
|
|
834
|
+
readonly linear: "linear";
|
|
835
|
+
};
|
|
836
|
+
declare const durations: {
|
|
837
|
+
readonly fast: "120ms";
|
|
838
|
+
readonly base: "200ms";
|
|
839
|
+
readonly slow: "320ms";
|
|
840
|
+
};
|
|
841
|
+
type Easing = keyof typeof easings;
|
|
842
|
+
type Duration = keyof typeof durations;
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Still Void z-index scale. Named steps instead of arbitrary numbers so new
|
|
846
|
+
* layered components (dropdown, modal, toast, tooltip) stack predictably
|
|
847
|
+
* against the existing sticky header and reading progress bar.
|
|
848
|
+
*/
|
|
849
|
+
declare const zIndex: {
|
|
850
|
+
readonly dropdown: 10;
|
|
851
|
+
readonly sticky: 20;
|
|
852
|
+
readonly backdrop: 30;
|
|
853
|
+
readonly modal: 40;
|
|
854
|
+
readonly toast: 50;
|
|
855
|
+
readonly tooltip: 60;
|
|
856
|
+
};
|
|
857
|
+
type ZIndexStep = keyof typeof zIndex;
|
|
858
|
+
|
|
859
|
+
/** Minimal class-name joiner. Falsy values are dropped. */
|
|
860
|
+
declare function cx(...parts: Array<string | false | null | undefined>): string;
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Shell recipes: Header, Logo, Footer.
|
|
864
|
+
* Recipes are pure functions returning class strings — no DOM, no framework.
|
|
865
|
+
* Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.
|
|
866
|
+
*/
|
|
867
|
+
interface HeaderOptions {
|
|
868
|
+
/** Frosted glass background (sticky headers). */
|
|
869
|
+
glass?: boolean;
|
|
870
|
+
}
|
|
871
|
+
declare function header(options?: HeaderOptions): string;
|
|
872
|
+
declare const headerClasses: {
|
|
873
|
+
readonly nav: "sv-header__nav";
|
|
874
|
+
/** Wraps <nav> in a native <details> — collapsible below 640px, a no-op
|
|
875
|
+
* wrapper above it, with zero JavaScript (see DESIGN.md §5 Navigation). */
|
|
876
|
+
readonly navToggle: "sv-header__nav-toggle";
|
|
877
|
+
readonly navSummary: "sv-header__nav-summary";
|
|
878
|
+
readonly link: "sv-header__link";
|
|
879
|
+
readonly linkActive: string;
|
|
880
|
+
readonly actions: "sv-header__actions";
|
|
881
|
+
};
|
|
882
|
+
declare function logo(): string;
|
|
883
|
+
declare const logoClasses: {
|
|
884
|
+
readonly dot: "sv-logo__dot";
|
|
885
|
+
};
|
|
886
|
+
declare function footer(): string;
|
|
887
|
+
declare const footerClasses: {
|
|
888
|
+
readonly links: "sv-footer__links";
|
|
889
|
+
readonly link: "sv-footer__link";
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,
|
|
894
|
+
* Sidebar, Hero, Skeleton. Pure functions — Server Component safe.
|
|
895
|
+
*/
|
|
896
|
+
interface CategoryPillOptions {
|
|
897
|
+
interactive?: boolean;
|
|
898
|
+
active?: boolean;
|
|
899
|
+
}
|
|
900
|
+
declare function categoryPill(options?: CategoryPillOptions): string;
|
|
901
|
+
declare const categoryPillClasses: {
|
|
902
|
+
readonly dot: "sv-pill__dot";
|
|
903
|
+
};
|
|
904
|
+
interface PostCardOptions {
|
|
905
|
+
dense?: boolean;
|
|
906
|
+
hover?: boolean;
|
|
907
|
+
}
|
|
908
|
+
declare function postCard(options?: PostCardOptions): string;
|
|
909
|
+
declare const postCardClasses: {
|
|
910
|
+
readonly meta: "sv-post-card__meta";
|
|
911
|
+
readonly title: "sv-post-card__title";
|
|
912
|
+
readonly excerpt: "sv-post-card__excerpt";
|
|
913
|
+
};
|
|
914
|
+
declare function featuredPostCard(): string;
|
|
915
|
+
declare const featuredPostCardClasses: {
|
|
916
|
+
readonly body: "sv-featured-card__body";
|
|
917
|
+
readonly title: "sv-featured-card__title";
|
|
918
|
+
readonly visual: "sv-featured-card__visual";
|
|
919
|
+
};
|
|
920
|
+
declare function postGrid(): string;
|
|
921
|
+
interface LayoutOptions {
|
|
922
|
+
withSidebar?: boolean;
|
|
923
|
+
}
|
|
924
|
+
declare function layout(options?: LayoutOptions): string;
|
|
925
|
+
declare function sidebar(): string;
|
|
926
|
+
declare const sidebarClasses: {
|
|
927
|
+
readonly sectionTitle: "sv-sidebar__section-title";
|
|
928
|
+
};
|
|
929
|
+
declare function hero(): string;
|
|
930
|
+
declare const heroClasses: {
|
|
931
|
+
readonly eyebrow: "sv-hero__eyebrow";
|
|
932
|
+
readonly title: "sv-hero__title";
|
|
933
|
+
readonly description: "sv-hero__description";
|
|
934
|
+
};
|
|
935
|
+
interface SkeletonOptions {
|
|
936
|
+
small?: boolean;
|
|
937
|
+
}
|
|
938
|
+
declare function skeletonLine(options?: SkeletonOptions): string;
|
|
939
|
+
declare function cardSkeleton(): string;
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Field recipe: the single source of truth for the form-field frame shared by
|
|
943
|
+
* Input, Textarea, NativeSelect and FileInput. Pure function — Server
|
|
944
|
+
* Component safe, and exported so consumers composing their own markup style
|
|
945
|
+
* a field the same way the components do instead of mirroring the CSS by hand.
|
|
946
|
+
*/
|
|
947
|
+
type FieldVariant = 'input' | 'textarea' | 'select' | 'file';
|
|
948
|
+
interface FieldOptions {
|
|
949
|
+
variant?: FieldVariant;
|
|
950
|
+
}
|
|
951
|
+
declare function field(options?: FieldOptions): string;
|
|
952
|
+
declare const fieldClasses: {
|
|
953
|
+
readonly choice: "sv-choice";
|
|
954
|
+
readonly srOnly: "sv-sr-only";
|
|
955
|
+
/** Wrapper of a label + control + messages group (the `Field` component). */
|
|
956
|
+
readonly group: "sv-form-field";
|
|
957
|
+
readonly label: "sv-label";
|
|
958
|
+
readonly labelRequired: "sv-label__required";
|
|
959
|
+
};
|
|
960
|
+
/**
|
|
961
|
+
* Invalid state is read from the native `aria-invalid` attribute rather than
|
|
962
|
+
* a boolean prop: Input/Textarea/NativeSelect/FileInput already spread
|
|
963
|
+
* `...props`, so `<Input aria-invalid="true" />` alone paints the danger
|
|
964
|
+
* border with zero component changes — composition over configuration.
|
|
965
|
+
*/
|
|
966
|
+
type FieldMessageVariant = 'hint' | 'error';
|
|
967
|
+
interface FieldMessageOptions {
|
|
968
|
+
variant?: FieldMessageVariant;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Helper/error text meant to sit under a field, associated to it via
|
|
972
|
+
* `aria-describedby` on the field itself.
|
|
973
|
+
*/
|
|
974
|
+
declare function fieldMessage(options?: FieldMessageOptions): string;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Table recipes: the class map behind the Table component family, exported so
|
|
978
|
+
* a consumer composing a raw <table> gets the same tokenized decoration
|
|
979
|
+
* instead of re-deriving borders, header band and caption by hand. Pure —
|
|
980
|
+
* Server Component safe.
|
|
981
|
+
*/
|
|
982
|
+
declare function table(): string;
|
|
983
|
+
declare const tableClasses: {
|
|
984
|
+
readonly container: "sv-table-container";
|
|
985
|
+
readonly head: "sv-table__head";
|
|
986
|
+
readonly body: "sv-table__body";
|
|
987
|
+
readonly foot: "sv-table__foot";
|
|
988
|
+
readonly row: "sv-table__row";
|
|
989
|
+
readonly th: "sv-table__th";
|
|
990
|
+
readonly td: "sv-table__td";
|
|
991
|
+
readonly caption: "sv-table__caption";
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
export { type AccentName, Alert, AlertDescription, AlertTitle, ArticleHeader, type ArticleHeaderProps, Badge, type BadgeProps, Button, type ButtonProps, type ButtonVariant, Callout, type CalloutKind, type CalloutProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardSkeleton, CardTitle, type CategoryName, CategoryPill, type CategoryPillOptions, type CategoryPillProps, ChartAxis, type ChartAxisProps, ChartBar, type ChartBarDatum, type ChartBarProps, ChartContainer, type ChartContainerProps, ChartGrid, type ChartGridProps, ChartLegend, type ChartLegendItem, type ChartLegendProps, ChartLine, type ChartLineProps, type ChartPoint, type ChartTick, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type ColorScheme, DEFAULT_ACCENT, DEFAULT_MODE, type Duration, type Easing, FeaturedPostCard, type FeaturedPostCardProps, Field, type FieldMessageOptions, type FieldMessageVariant, type FieldOptions, type FieldProps, type FieldVariant, FileInput, type FileInputProps, type FontFamily, type FontSize, type FontWeight, Footer, type FooterProps, Header, type HeaderOptions, type HeaderProps, Hero, type HeroProps, Icon, type IconName, type IconProps, Input, type InputProps, Layout, type LayoutOptions, type LayoutProps, Lead, type LeadProps, type LinkComponent, type LinkComponentProps, Logo, type LogoProps, NativeSelect, type NativeSelectProps, type NavItem, PageHeader, type PageHeaderProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, PostCard, type PostCardOptions, type PostCardProps, PostGrid, type PostGridProps, type PostSummary, Progress, type ProgressProps, Prose, type ProseProps, READING_PROGRESS_VAR, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type Radius, type SemanticName, Separator, type SeparatorProps, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonOptions, type SkeletonProps, type SpacingStep, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, TextLink, type TextLinkProps, Textarea, type TextareaProps, type ThemeMode, ThemeScript, type ThemeScriptProps, type TocItem, type TocLinkOptions, type ZIndexStep, accentNames, accents, accentsInk, articleHeader, articleHeaderClasses, callout, calloutClasses, calloutLabels, cardSkeleton, categoryPill, categoryPillClasses, codeBlock, codeBlockClasses, colors, cx, defaultCategoryColors, durations, easings, featuredPostCard, featuredPostCardClasses, field, fieldClasses, fieldMessage, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, prose, proseClasses, radii, readingProgress, readingProgressClasses, resolveAccentColor, resolveCategoryColor, safeHref, semantic, semanticInk, sidebar, sidebarClasses, skeletonLine, spacing, table, tableClasses, tableOfContents, themeModes, tocLink, zIndex };
|