@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
package/README.md
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
# @still-void/ui
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@still-void/ui)
|
|
4
|
+
[](https://github.com/KalleoPinheiro/still-void/actions/workflows/ci.yml)
|
|
5
|
+
|
|
6
|
+
**Still Void** design system for **React and Next.js** — extracted from the
|
|
7
|
+
`blog.kalleopinheiro.dev` prototype. Ships as two entry points: a server-safe entry that
|
|
8
|
+
renders inside Next.js Server Components with zero hydration cost, and a `'use client'`
|
|
9
|
+
entry for interactive pieces. See [docs/design-system.md](docs/design-system.md) for the
|
|
10
|
+
full architecture and component catalog,
|
|
11
|
+
[docs/migration-v1-to-v2.md](docs/migration-v1-to-v2.md) if you're upgrading from the
|
|
12
|
+
framework-agnostic `1.x` line, and
|
|
13
|
+
[docs/migration-v2-to-v3.md](docs/migration-v2-to-v3.md) for the `2.x` → `3.x` breaking
|
|
14
|
+
changes (Tailwind v4 is now required, and the v3 preset is gone).
|
|
15
|
+
|
|
16
|
+
## Architecture
|
|
17
|
+
|
|
18
|
+
| Layer | Entry | Runs where | What it is |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| **Theme CSS** | `@still-void/ui/theme.css` | browser | CSS vars (`--sv-*`), dark/light via `data-theme`, accents via `data-accent`, signature utilities |
|
|
21
|
+
| **Component CSS** | `@still-void/ui/style.css` | browser | All component classes (`sv-*`) — every component this package ships needs only this, never Tailwind |
|
|
22
|
+
| **Tailwind theme (optional)** | `@still-void/ui/tailwind.css` | browser (Tailwind v4 build) | `@theme inline` mapping `--color-sv-*`/`--font-sv-*`/`--spacing`/`--radius-sv-*` to `var(--sv-*)`, for `bg-sv-surface`-style utilities in **your own** markup |
|
|
23
|
+
| **React (server-safe)** | `@still-void/ui/react` | server or client | Tokens, recipes, and components without hooks — render inside Server Components |
|
|
24
|
+
| **React (client)** | `@still-void/ui/react/client` | client | `'use client'` bundle: DOM behaviors (`createThemeManager`, `createScrollSpy`, `createReadingProgress`, `createMediaQuery`, `copyToClipboard`), `ThemeProvider`, `ThemeToggle`, `CopyButton`, `TableOfContents`, `ReadingProgress`, app shell (`SidebarProvider`, `SidebarPanel`, `SidebarTrigger`, `SidebarInset`), toast (`ToastProvider`), hooks |
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npm install @still-void/ui
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`react` and `react-dom` (>=18) are required peer dependencies.
|
|
33
|
+
|
|
34
|
+
**Node.js:** the published `dist` is plain ES2020 JS and CSS, so `engines.node` stays `>=18` for
|
|
35
|
+
consumers. Developing this repo (tests, Storybook, build) needs **Node 22+** — the version in
|
|
36
|
+
`.nvmrc` and the only one CI runs, because vitest 4's toolchain doesn't run on Node 18/20.
|
|
37
|
+
`devEngines` in `package.json` warns when you run npm here on an older Node.
|
|
38
|
+
|
|
39
|
+
## Usage — Next.js (App Router, Server Components)
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
// app/layout.tsx (Server Component)
|
|
43
|
+
import '@still-void/ui/theme.css';
|
|
44
|
+
import '@still-void/ui/style.css';
|
|
45
|
+
import { Header, Logo, Footer, ThemeScript } from '@still-void/ui/react';
|
|
46
|
+
import { ThemeProvider, ThemeToggle } from '@still-void/ui/react/client';
|
|
47
|
+
|
|
48
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
49
|
+
return (
|
|
50
|
+
// Server-rendered attributes = correct theme for a first-time visitor.
|
|
51
|
+
// <ThemeScript /> runs before paint and re-applies a *returning* visitor's
|
|
52
|
+
// stored preference, so there's no flash of the wrong theme either way.
|
|
53
|
+
<html lang="en" data-theme="dark" data-accent="cyan" suppressHydrationWarning>
|
|
54
|
+
<head>
|
|
55
|
+
<ThemeScript />
|
|
56
|
+
</head>
|
|
57
|
+
<body className="sv-body">
|
|
58
|
+
<ThemeProvider>
|
|
59
|
+
<Header
|
|
60
|
+
logo={<Logo label="still.void" />}
|
|
61
|
+
items={[{ label: 'Home', href: '/', active: true }]}
|
|
62
|
+
actions={<ThemeToggle />}
|
|
63
|
+
/>
|
|
64
|
+
{children}
|
|
65
|
+
<Footer author="Kalleo Pinheiro" links={[{ label: 'RSS', href: '/rss' }]} />
|
|
66
|
+
</ThemeProvider>
|
|
67
|
+
</body>
|
|
68
|
+
</html>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
// app/page.tsx (Server Component — zero client JS for this content)
|
|
75
|
+
import { Hero, PostGrid, PostCard, Layout } from '@still-void/ui/react';
|
|
76
|
+
|
|
77
|
+
export default async function Home() {
|
|
78
|
+
const posts = await getPosts(); // fetch on the server
|
|
79
|
+
return (
|
|
80
|
+
<Layout>
|
|
81
|
+
<Hero eyebrow="blog" title="Calm engineering, sharp accents" />
|
|
82
|
+
<PostGrid>
|
|
83
|
+
{posts.map((post) => (
|
|
84
|
+
<PostCard key={post.href} post={post} />
|
|
85
|
+
))}
|
|
86
|
+
</PostGrid>
|
|
87
|
+
</Layout>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Everything in `@still-void/ui/react` is hook-free and browser-API-free, so it renders on the
|
|
93
|
+
server. Interactive pieces come from `@still-void/ui/react/client` and are composed in via
|
|
94
|
+
slots (`actions`, `visual`, `eyebrow`).
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
// CodeBlock stays a Server Component; only the copy button hydrates.
|
|
98
|
+
import { CodeBlock } from '@still-void/ui/react';
|
|
99
|
+
import { CopyButton } from '@still-void/ui/react/client';
|
|
100
|
+
|
|
101
|
+
<CodeBlock code={source} language="ts" actions={<CopyButton code={source} />} />;
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Syntax highlighting is bring-your-own (by design — the prototype tokenizer was demo-only):
|
|
105
|
+
render with Shiki on the server and pass the markup via `rendered`.
|
|
106
|
+
|
|
107
|
+
### Per-layer CSS (optional)
|
|
108
|
+
|
|
109
|
+
`style.css` stays the recommended import. If an app doesn't use the sidebar, toasts or charts, it can import only the layers it needs instead. Each file is a contiguous slice of `style.css` (cut at its section headers, so the grouping follows the file, not a strict component taxonomy); together, in this order, they are byte-identical to it:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import '@still-void/ui/theme.css'; // always first
|
|
113
|
+
import '@still-void/ui/css/base.css'; // always (body, typography, signature)
|
|
114
|
+
import '@still-void/ui/css/content.css'; // Header, Logo, Footer, PostCard, Hero, CodeBlock, Callout, TOC, Prose…
|
|
115
|
+
import '@still-void/ui/css/forms.css'; // TextLink, .sv-field/Field/Select/Checkbox…, Table
|
|
116
|
+
import '@still-void/ui/css/controls.css'; // Button, touch-target rules, Card, Alert, Badge, Icon
|
|
117
|
+
import '@still-void/ui/css/overlays.css'; // Dialog, BottomSheet, Popover, Tooltip, menus, Tabs
|
|
118
|
+
import '@still-void/ui/css/data.css'; // Separator, Progress, Pagination, Chart
|
|
119
|
+
import '@still-void/ui/css/app-shell.css';// App Sidebar / AppShell
|
|
120
|
+
import '@still-void/ui/css/toast.css'; // Toast
|
|
121
|
+
import '@still-void/ui/css/motion.css'; // always last (prefers-reduced-motion)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Keep the order: later layers rely on earlier ones (cascade order), and `controls.css` carries the minimum touch-target sizes for logo, footer and text links, so don't drop it.
|
|
125
|
+
|
|
126
|
+
### Router links
|
|
127
|
+
|
|
128
|
+
Components that render links accept `linkAs` (`Logo`, `Header`, `Footer`, `PostCard`, `FeaturedPostCard`), and `Button`, `Badge` and `TextLink` accept `asChild`:
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
import Link from 'next/link';
|
|
132
|
+
<Header linkAs={Link} items={items} />
|
|
133
|
+
<Button asChild variant="primary"><Link href="/novo">Novo post</Link></Button>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`Button`'s default `variant` is `default`, the neutral surface button. Use `variant="primary"` (alias of `accent`) for the one filled call to action of a view.
|
|
137
|
+
|
|
138
|
+
## Recipes and behaviors
|
|
139
|
+
|
|
140
|
+
Recipes are pure class-name builders (server-safe, exported from `@still-void/ui/react`);
|
|
141
|
+
behaviors are plain DOM and return a `destroy()` (client-only, exported from
|
|
142
|
+
`@still-void/ui/react/client`):
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
import { postCard, postCardClasses } from '@still-void/ui/react';
|
|
146
|
+
import { createThemeManager } from '@still-void/ui/react/client';
|
|
147
|
+
|
|
148
|
+
const theme = createThemeManager(); // drives data-theme / data-accent, persists to localStorage
|
|
149
|
+
theme.toggleMode();
|
|
150
|
+
theme.setAccent('violet');
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Fonts
|
|
154
|
+
|
|
155
|
+
`theme.css` sets `--sv-font-display`/`--sv-font-body`/`--sv-font-mono` to Sora, Manrope and
|
|
156
|
+
JetBrains Mono, but does **not** load them — that's a render-blocking `@import` on every
|
|
157
|
+
consumer's critical path, and a runtime dependency on a third-party CDN. Load them yourself:
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
// app/layout.tsx — next/font self-hosts and inlines the @font-face rules, no network request
|
|
161
|
+
import { Sora, Manrope, JetBrains_Mono } from 'next/font/google';
|
|
162
|
+
|
|
163
|
+
const sora = Sora({ subsets: ['latin'], weight: ['400', '600', '700'], variable: '--sv-font-display' });
|
|
164
|
+
const manrope = Manrope({ subsets: ['latin'], weight: ['400', '500', '600', '700'], variable: '--sv-font-body' });
|
|
165
|
+
const mono = JetBrains_Mono({ subsets: ['latin'], weight: ['400', '500'], variable: '--sv-font-mono' });
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
```html
|
|
169
|
+
<!-- any other framework: preconnect + stylesheet -->
|
|
170
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
171
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
172
|
+
<link
|
|
173
|
+
href="https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
174
|
+
rel="stylesheet"
|
|
175
|
+
/>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
System-font fallbacks (`ui-sans-serif`, `system-ui`, `ui-monospace`) already cover the gap
|
|
179
|
+
before your chosen font loads — see [Fidelity rules](#fidelity-rules-do-not-regress).
|
|
180
|
+
|
|
181
|
+
## Theming
|
|
182
|
+
|
|
183
|
+
- Mode: `data-theme="dark" | "light"` on `<html>` (dark is default).
|
|
184
|
+
- Accent: `data-accent="cyan" | "violet" | "mint" | "amber"` — pure CSS, so it works in
|
|
185
|
+
Server Components with no JS.
|
|
186
|
+
- Everything is overridable via CSS vars (`--sv-accent`, `--sv-bg`, …). No `!important` anywhere.
|
|
187
|
+
|
|
188
|
+
## shadcn/ui Components
|
|
189
|
+
|
|
190
|
+
A selection of **shadcn/ui** components has been ported to Still Void with the design system's palette, typography, and spacing applied. Both server-safe and client-only variants are available:
|
|
191
|
+
|
|
192
|
+
**Server-safe components** (import from `@still-void/ui/react`):
|
|
193
|
+
- `Button` — with variants (default, destructive, outline, secondary, ghost, link, **accent**) and sizes (sm, default, lg, icon)
|
|
194
|
+
- `Card` — with header, title, description, content, footer; renders as `<div>` by default, or any of `section`/`article`/`li`/`aside` via `as`, or merges onto a single child via `asChild`
|
|
195
|
+
- `Icon` — a curated set of icons (`@heroicons/react` under the hood) with `size` (`sm`/`md`/`lg`) and an accessible `label`
|
|
196
|
+
- `Input` — text input with placeholder, disabled, and focus states
|
|
197
|
+
- `Alert` — with optional semantic `variant` (info/success/warning/danger), automatic icon and role derivation, and an optional `action` slot; zero-regression default when variant is omitted
|
|
198
|
+
- `Badge` — with variants (default, secondary, destructive, outline)
|
|
199
|
+
- `Textarea` — multi-line text field sharing `Input`'s frame, plus `rows`
|
|
200
|
+
- `NativeSelect` — a real `<select>`, serializable via `FormData`; coexists with the client-only `Select` combobox (see [docs/design-system.md](docs/design-system.md))
|
|
201
|
+
- `FileInput` — `<input type="file">` with a styled file-selector button
|
|
202
|
+
- `Checkbox` — `<input type="checkbox">`, no wrapper
|
|
203
|
+
- `RadioGroup` / `RadioGroupItem` — `<fieldset>`/`<legend>` group of native radios
|
|
204
|
+
- `Table` family — `Table`, `TableHeader`, `TableBody`, `TableFooter`, `TableRow`, `TableHead`, `TableCell`, `TableCaption`, a presentational data table with a scrolling container
|
|
205
|
+
- `Sidebar` / `SidebarSection` — content sidebar (blog table of contents, article navigation); static rail at all viewport widths. **Coexists with the client-only `SidebarPanel`** for responsive app shells — see [docs/design-system.md](docs/design-system.md)
|
|
206
|
+
|
|
207
|
+
All of the above style themselves through real `sv-*` CSS classes — **no Tailwind required**,
|
|
208
|
+
for any component this package ships, in any version.
|
|
209
|
+
|
|
210
|
+
**Client-only components** (import from `@still-void/ui/react/client`):
|
|
211
|
+
- `SidebarProvider` / `SidebarPanel` / `SidebarTrigger` / `SidebarInset` / `useSidebar` — responsive app shell with toggleable sidebar (drawer below breakpoint, static panel above); read/control state via context
|
|
212
|
+
- `ToastProvider` / `useToast` — notification queue (up to 3 by default, configurable), auto-dismiss (5s default), pause on hover/focus; four severities with semantic `aria-live` announcements
|
|
213
|
+
- `Dialog` — modal with trigger, content, header, footer, title, description; renders a close button by default (`showCloseButton={false}` to opt out)
|
|
214
|
+
- `BottomSheet` — mobile modal that rises from the bottom edge (drag handle, Cancel button, safe-area aware); same focus trap, Escape and overlay dismissal as `Dialog`
|
|
215
|
+
- `AlertDialog` — the same modal mechanics as `Dialog`, without a close button, for destructive confirmations that must be resolved through explicit `Action`/`Cancel`
|
|
216
|
+
- `Select` — dropdown with groups, labels, and scroll
|
|
217
|
+
- `Dropdown` — menu with items, checkboxes, radio groups, labels, separators
|
|
218
|
+
- `Tabs` — tabbed interface with triggers and content
|
|
219
|
+
- `Tooltip` — positioned tooltip with provider
|
|
220
|
+
|
|
221
|
+
### Usage
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
// Server Component
|
|
225
|
+
import { Button, Card, CardHeader, CardTitle, CardContent } from '@still-void/ui/react';
|
|
226
|
+
|
|
227
|
+
export default function MyPage() {
|
|
228
|
+
return (
|
|
229
|
+
<Card>
|
|
230
|
+
<CardHeader>
|
|
231
|
+
<CardTitle>Settings</CardTitle>
|
|
232
|
+
</CardHeader>
|
|
233
|
+
<CardContent>
|
|
234
|
+
<Button>Save</Button>
|
|
235
|
+
</CardContent>
|
|
236
|
+
</Card>
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
// Client Component ('use client')
|
|
243
|
+
import { Dialog, DialogTrigger, DialogContent } from '@still-void/ui/react/client';
|
|
244
|
+
import { Button } from '@still-void/ui/react';
|
|
245
|
+
|
|
246
|
+
export function SettingsDialog() {
|
|
247
|
+
return (
|
|
248
|
+
<Dialog>
|
|
249
|
+
<DialogTrigger asChild>
|
|
250
|
+
<Button>Open Settings</Button>
|
|
251
|
+
</DialogTrigger>
|
|
252
|
+
<DialogContent>
|
|
253
|
+
{/* modal content */}
|
|
254
|
+
</DialogContent>
|
|
255
|
+
</Dialog>
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Note on Tailwind:** **no component this package ships requires Tailwind at all**, in either
|
|
261
|
+
entry. Every component — server-safe or client — styles itself through real `sv-*` classes in
|
|
262
|
+
`@still-void/ui/style.css`, driven by `var(--sv-*)`, so it follows `[data-theme]`/
|
|
263
|
+
`[data-accent]` with **zero Tailwind config**. That was not always true: before `3.0.0`, the
|
|
264
|
+
client-only family (`Dialog`, `DropdownMenu`, `Select`, `Tabs`, `Tooltip`) still emitted
|
|
265
|
+
Tailwind utility classes and rendered unstyled without one — see
|
|
266
|
+
[docs/migration-v2-to-v3.md](docs/migration-v2-to-v3.md) if you're coming from `2.x`.
|
|
267
|
+
|
|
268
|
+
`@still-void/ui/tailwind.css` exists for a different reason: if **your own** markup wants
|
|
269
|
+
`bg-sv-surface`/`text-sv-text`/`rounded-sv-lg`-style utilities built from this package's
|
|
270
|
+
tokens, `@import "@still-void/ui/tailwind.css";` in a Tailwind **v4** project wires them up —
|
|
271
|
+
a `@theme inline` block, so the generated utilities keep following `[data-theme]`/
|
|
272
|
+
`[data-accent]` at runtime instead of freezing on whichever value was in scope at build time.
|
|
273
|
+
This is why `tailwindcss` is declared as a peer dependency at `>=4` — the package no longer
|
|
274
|
+
supports Tailwind v3 in any form, preset included (see the migration doc). The peer stays
|
|
275
|
+
**optional**: a consumer with no Tailwind at all still gets every component correctly styled.
|
|
276
|
+
|
|
277
|
+
There is also an opt-in `@still-void/ui/shadcn-overrides.css` subpath (bare-element
|
|
278
|
+
`box-shadow: none !important` resets) for consumers who install additional unstyled shadcn
|
|
279
|
+
components of their
|
|
280
|
+
own — it is never imported automatically.
|
|
281
|
+
|
|
282
|
+
## Fidelity rules (do not regress)
|
|
283
|
+
|
|
284
|
+
- Color values (hex/oklch) are literal from the spec — never rounded.
|
|
285
|
+
- `.sv-gradient-border` is the visual signature; never replace with `box-shadow`.
|
|
286
|
+
- Cards have **no shadow**.
|
|
287
|
+
- `text-wrap: balance` on every display heading.
|
|
288
|
+
- Fonts: Sora (display) / Manrope (body) / JetBrains Mono (code). System fonts are loading
|
|
289
|
+
fallbacks only.
|
|
290
|
+
- Hover easing `cubic-bezier(.3,.7,.4,1)`; reading progress bar is linear.
|
|
291
|
+
- Categories are colored dots + label — never emoji.
|
|
292
|
+
|
|
293
|
+
> Note: the reference sources (`colors_and_type.css`, `ui_kits/blog/*.jsx`) were not available
|
|
294
|
+
> at extraction time. Colors, accents, fonts, radii, easing and component inventory come
|
|
295
|
+
> literally from the spec document; the numeric type/spacing scales were derived and are
|
|
296
|
+
> centralized in `src/tokens/` for easy correction against the originals.
|
|
297
|
+
|
|
298
|
+
## Scripts
|
|
299
|
+
|
|
300
|
+
```sh
|
|
301
|
+
npm run build # tsup (ESM + CJS + .d.ts) + CSS to dist/
|
|
302
|
+
npm test # vitest (320 tests)
|
|
303
|
+
npm run typecheck # tsc --noEmit (strict)
|
|
304
|
+
npm run lint:package # publint + are-the-types-wrong on the packed tarball
|
|
305
|
+
npm run storybook # component catalog at localhost:6006
|
|
306
|
+
npm run build-storybook # static Storybook build → storybook-static/
|
|
307
|
+
npm run changeset # record a change for the next release
|
|
308
|
+
npm run version-packages # apply pending changesets, bump version, update CHANGELOG (CI does this)
|
|
309
|
+
npm run release # build + publish to npm (CI does this)
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Versioning
|
|
313
|
+
|
|
314
|
+
Releases are managed with [Changesets](https://github.com/changesets/changesets) and are
|
|
315
|
+
fully automated — nobody publishes from a laptop:
|
|
316
|
+
|
|
317
|
+
1. A pull request that touches `src/` or `scripts/` must carry a changeset
|
|
318
|
+
(`npm run changeset`); CI fails without one.
|
|
319
|
+
2. Merging into `main` opens a **`chore: version packages`** pull request with the version
|
|
320
|
+
bump and the generated `CHANGELOG.md`.
|
|
321
|
+
3. Merging *that* publishes to npm with
|
|
322
|
+
[provenance](https://docs.npmjs.com/generating-provenance-statements), tags `v<version>`,
|
|
323
|
+
creates the GitHub release and redeploys Storybook.
|
|
324
|
+
|
|
325
|
+
The changelog and the version are generated from changeset entries, never written by hand.
|
|
326
|
+
Unreleased changes can be tried out from a `canary` snapshot before they ship.
|
|
327
|
+
|
|
328
|
+
Bump levels for a design system (what counts as breaking, and why a corrected token is a
|
|
329
|
+
patch while a redesigned one is a major) are documented in
|
|
330
|
+
[CONTRIBUTING.md](CONTRIBUTING.md).
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/* ---------- App Sidebar ---------- */
|
|
2
|
+
/* R5-02, R5-03, R5-04: Sidebar de aplicação responsiva.
|
|
3
|
+
The wrapper (.sv-app-shell) carries data-state (open/closed), data-collapsible
|
|
4
|
+
(offcanvas/icon/none), and data-mobile (true/false). The panel (.sv-app-sidebar)
|
|
5
|
+
is static in-flow above the breakpoint, drawer in portal below. No box-shadow
|
|
6
|
+
per Flat-By-Default Rule. Focus is outline (AD-005). Fade animation is driven
|
|
7
|
+
by data-state with var(--sv-duration-fast) and var(--sv-ease-hover).
|
|
8
|
+
|
|
9
|
+
.sv-app-shell is the flex container that lays SidebarPanel (the <aside>)
|
|
10
|
+
and SidebarInset (the <main>) side by side above the breakpoint — both are
|
|
11
|
+
rendered as direct children of it (SidebarProvider wraps `children` in this
|
|
12
|
+
one div). Below the breakpoint SidebarPanel renders into a portal instead
|
|
13
|
+
(it's not a flex child at all in that mode), so the inset alone fills the
|
|
14
|
+
row — AC R5-04.3 ("full width below the breakpoint") falls out of the flex
|
|
15
|
+
layout for free, no separate rule needed. */
|
|
16
|
+
.sv-app-shell {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: stretch;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.sv-app-sidebar {
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
background: var(--sv-surface);
|
|
24
|
+
color: var(--sv-text);
|
|
25
|
+
border-right: 1px solid var(--sv-border);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* CSS-first first paint (SSR). Before hydration SidebarProvider omits
|
|
29
|
+
`data-mobile` and SidebarPanel renders the in-flow <aside>, so desktop
|
|
30
|
+
paints with the sidebar already in place (no layout shift). Below the
|
|
31
|
+
default breakpoint (1024px, SidebarProvider's default) this hides that
|
|
32
|
+
<aside> until JS mounts the drawer instead. A custom `breakpoint` prop gets
|
|
33
|
+
the equivalent rule from the provider itself (scoped by `data-breakpoint`).
|
|
34
|
+
`collapsible="none"` stays in flow at every width, as after hydration. */
|
|
35
|
+
@media (width < 1024px) {
|
|
36
|
+
.sv-app-shell:not([data-mobile]):not([data-breakpoint]):not([data-collapsible='none'])
|
|
37
|
+
.sv-app-sidebar {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.sv-app-sidebar__drawer {
|
|
43
|
+
position: fixed;
|
|
44
|
+
inset: 0;
|
|
45
|
+
z-index: var(--sv-z-modal);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Dialog.Content animates via data-state=[open|closed] */
|
|
49
|
+
.sv-app-sidebar[data-state='open'] {
|
|
50
|
+
animation: sv-fade-in var(--sv-duration-fast) var(--sv-ease-hover);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.sv-app-sidebar[data-state='closed'] {
|
|
54
|
+
animation: sv-fade-out var(--sv-duration-fast) var(--sv-ease-hover);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.sv-app-sidebar__body {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: var(--sv-space-6);
|
|
61
|
+
padding: var(--sv-space-6);
|
|
62
|
+
max-height: 100vh;
|
|
63
|
+
overflow-y: auto;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* `sv-app-sidebar__label` carries no typography of its own — it's a bare
|
|
67
|
+
hook for the collapsed-state hiding rule below, and content it wraps is
|
|
68
|
+
always something else's text (a nav link, a heading) that already owns
|
|
69
|
+
its own font. A Sora/text-lg/600 default shipped here in v3.3.0 fought
|
|
70
|
+
whatever it wrapped and broke the Sparse-Display Rule (DESIGN.md §3:
|
|
71
|
+
Sora never sets label text) the moment a consumer used it on ordinary
|
|
72
|
+
nav-item copy, as the App Sidebar story did. */
|
|
73
|
+
|
|
74
|
+
.sv-app-sidebar-inset {
|
|
75
|
+
flex: 1;
|
|
76
|
+
/* Without this a flex item's default `min-width: auto` lets its content
|
|
77
|
+
(e.g. a wide table) push it wider than the row, shrinking the sidebar
|
|
78
|
+
instead of scrolling internally. */
|
|
79
|
+
min-width: 0;
|
|
80
|
+
overflow: auto;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sv-app-sidebar-trigger {
|
|
84
|
+
position: relative;
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
padding: var(--sv-space-2);
|
|
89
|
+
border: 1px solid transparent;
|
|
90
|
+
border-radius: var(--sv-radius-sm);
|
|
91
|
+
background: none;
|
|
92
|
+
color: var(--sv-text-2);
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
transition: background var(--sv-duration-fast) var(--sv-ease-hover),
|
|
95
|
+
color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.sv-app-sidebar-trigger:hover {
|
|
99
|
+
background: var(--sv-surface-2);
|
|
100
|
+
color: var(--sv-text);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.sv-app-sidebar-trigger:focus-visible {
|
|
104
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
105
|
+
outline-offset: 2px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* R5-03: collapsible="icon" mode — `open` toggles rail width vs. full width,
|
|
109
|
+
the same way `offcanvas` toggles visible vs. hidden. Both rules below key
|
|
110
|
+
off data-state="closed" *together with* data-collapsible="icon" — without
|
|
111
|
+
that, a collapsed-width rail would also apply while `open` (the expanded,
|
|
112
|
+
labels-visible state), which is the opposite of what "collapsible" means
|
|
113
|
+
here. .sv-app-shell carries data-state from SidebarProvider's own `open`. */
|
|
114
|
+
.sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar:not(.sv-app-sidebar__drawer) {
|
|
115
|
+
width: var(--sv-space-14);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Hide text labels only in the collapsed (closed) state; keep them
|
|
119
|
+
accessible to screen readers via the sr-only pattern rather than
|
|
120
|
+
removing them, since the icon alone is not a reliable label. */
|
|
121
|
+
.sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar__label {
|
|
122
|
+
position: absolute;
|
|
123
|
+
width: 1px;
|
|
124
|
+
height: 1px;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
clip-path: inset(50%);
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
}
|
|
129
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
Still Void — component styles
|
|
3
|
+
Import once: `import '@still-void/ui/style.css'`
|
|
4
|
+
Requires theme.css (tokens) to be loaded as well.
|
|
5
|
+
All values reference theme vars — no magic numbers.
|
|
6
|
+
============================================================ */
|
|
7
|
+
|
|
8
|
+
/* ---------- base ---------- */
|
|
9
|
+
.sv-root,
|
|
10
|
+
[data-sv] body,
|
|
11
|
+
body.sv-body {
|
|
12
|
+
background: var(--sv-bg);
|
|
13
|
+
color: var(--sv-text);
|
|
14
|
+
font-family: var(--sv-font-body);
|
|
15
|
+
font-size: var(--sv-text-base);
|
|
16
|
+
line-height: 1.5;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Display headings always balance. */
|
|
21
|
+
.sv-display {
|
|
22
|
+
font-family: var(--sv-font-display);
|
|
23
|
+
letter-spacing: -0.02em;
|
|
24
|
+
text-wrap: balance;
|
|
25
|
+
color: var(--sv-text);
|
|
26
|
+
}
|
|
27
|
+
|