@sakaniui/react 0.3.29 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -3
- package/dist/{TopBar-BFua2Hnk.js → TopBar-CWqp1c0A.js} +1725 -831
- package/dist/TopBar-CgO9Njm_.cjs +1 -0
- package/dist/blocks/LiquidDashboardBlock/DashboardContent.d.ts +7 -0
- package/dist/blocks/LiquidDashboardBlock/LiquidDashboardBlock.d.ts +14 -0
- package/dist/blocks/LiquidDashboardBlock/index.d.ts +2 -0
- package/dist/blocks/LiquidDashboardBlock/parts/LegendRow.d.ts +9 -0
- package/dist/blocks/LiquidDashboardBlock/parts/Panel.d.ts +18 -0
- package/dist/blocks/LiquidDashboardBlock/parts/PeriodDropdown.d.ts +15 -0
- package/dist/blocks/LiquidDashboardBlock/parts/SearchExpand.d.ts +3 -0
- package/dist/blocks/LiquidDashboardBlock/parts/randomChartData.d.ts +20 -0
- package/dist/blocks/index.d.ts +2 -0
- package/dist/blocks.cjs +2 -1
- package/dist/blocks.mjs +3136 -2166
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +1132 -1836
- package/dist/style.css +1 -1
- package/dist/tokens.css +168 -0
- package/package.json +14 -3
- package/dist/TopBar-CvreVtZH.cjs +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sakani Design System
|
|
2
2
|
|
|
3
|
-
An open-source, token-driven React component library for SaaS products — **1,500+ accessible components and variants**, built 1:1 from a Figma design system and
|
|
3
|
+
An open-source, token-driven React component library for SaaS products — **1,500+ accessible components and variants**, built 1:1 from a Figma design system, across light and dark modes, with **built-in glass and Apple-style liquid glass surfaces**.
|
|
4
4
|
|
|
5
5
|
**[Live Storybook →](https://main--6a5a658b3681fcc010430db5.chromatic.com)** · **[Figma file →](https://www.figma.com/community/file/1661001585975776295/sakani-design-system-v1-8)**
|
|
6
6
|
|
|
@@ -14,6 +14,7 @@ Most component libraries start in code and retrofit the design. Sakani was built
|
|
|
14
14
|
|
|
15
15
|
- **Token-driven** — components bind only to semantic tokens (`bg/surface`, `fg/muted`, `accent/default`…), so the entire library re-themes from one place
|
|
16
16
|
- **Light & dark mode** — add the `.dark` class to any container; every component re-themes automatically, no per-component dark styles
|
|
17
|
+
- **Glass & liquid glass** — a third theme axis, *Surface* (Solid · Glass · Liquid): frosted glassmorphism and Apple-style liquid glass with real lens refraction, switched per area with one attribute — see [Glass & liquid glass](#glass--liquid-glass)
|
|
17
18
|
- **Accessible by default** — WCAG AA contrast audited, global focus-ring system, `prefers-reduced-motion` support, full ARIA semantics (combobox active-descendant, calendar date labels, live-region toasts, focus-return popovers)
|
|
18
19
|
- **Typed & composable** — strict TypeScript, generic `Table<T>`, slot-based composition, controlled + uncontrolled patterns
|
|
19
20
|
- **Geist typography** and **Lucide icons** throughout, matching the Figma source exactly
|
|
@@ -74,6 +75,37 @@ export const Dashboard = () => (
|
|
|
74
75
|
</div>
|
|
75
76
|
```
|
|
76
77
|
|
|
78
|
+
## Glass & liquid glass
|
|
79
|
+
|
|
80
|
+
Glass is built into the theme system, not added component by component. Next to light/dark, Sakani has a second axis — **Surface** — with three modes: **Solid** (the default), **Glass** (frosted translucency) and **Liquid** (Apple-style liquid glass: the backdrop *bends* at the edges like a lens, with a faint color fringe, rim light and depth). Components read a small set of `--surface-*` tokens, so switching an area from Solid to Glass or Liquid re-themes everything inside it at once — in the Figma file (variable modes and effect styles) and in code. Solid stays pixel-identical to before.
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
// Frosted glass: one attribute on any ancestor (works in light and dark)
|
|
84
|
+
<div data-surface="glass">
|
|
85
|
+
<Sidebar />
|
|
86
|
+
<Card>…</Card>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
// Liquid glass: a lens-refracting sheet over a photo, UI on top
|
|
90
|
+
import { LiquidGlass } from '@sakaniui/react';
|
|
91
|
+
|
|
92
|
+
<div style={{ position: 'relative', backgroundImage: 'url(photo.jpg)', backgroundSize: 'cover' }}>
|
|
93
|
+
<LiquidGlass variant="clear" radius={0} style={{ position: 'absolute', inset: 0 }} />
|
|
94
|
+
<div data-surface="liquid" style={{ position: 'relative' }}>
|
|
95
|
+
<Sidebar /> {/* transparent: sits on the glass */}
|
|
96
|
+
<div data-surface="solid"><Card>…</Card></div> {/* data stays solid and crisp */}
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The recipe is always the same three layers: **photo → one glass overlay → components**. See the full **Liquid Glass Dashboard** block (`@sakaniui/react/blocks`) for a complete example: a hovering lens that glides between sidebar items while the active item keeps its own, frosted menus, and solid data cards on a glass panel.
|
|
102
|
+
|
|
103
|
+
- **Browsers** — refraction renders in Chromium (Chrome, Edge); Safari and Firefox get a frosted fallback with the same rim and depth.
|
|
104
|
+
- **Accessible** — `prefers-reduced-transparency` turns glass into an opaque surface, `prefers-reduced-motion` stops the glare and glide; secondary text has its own stronger color token on glass, and the docs list measured contrast for every tint.
|
|
105
|
+
- **Tunable** — strength, bend, frost, tint and color boost are `--liquid-*` tokens.
|
|
106
|
+
|
|
107
|
+
Docs: **[sakaniui.com/docs/glass](https://www.sakaniui.com/docs/glass)** · Storybook: *Foundations → Glass* and *Foundations → Liquid glass*.
|
|
108
|
+
|
|
77
109
|
## Token architecture
|
|
78
110
|
|
|
79
111
|
Three layers, defined in Figma and exported to `tokens.css`:
|
|
@@ -98,6 +130,8 @@ Change a semantic token and every component follows — in both the design file
|
|
|
98
130
|
|
|
99
131
|
**Overlays** — Menu · Menu Item
|
|
100
132
|
|
|
133
|
+
**Glass** — Liquid Glass (`LiquidGlass`, `useLiquidGlass`) · Surface modes (`data-surface="glass" | "liquid" | "solid"`)
|
|
134
|
+
|
|
101
135
|
**Data** — Empty State · Filter Chip
|
|
102
136
|
|
|
103
137
|
**Charts** — Area · Bar · Donut · Funnel · Heatmap · Line · Pie · Radar · Radial — Recharts wrappers styled entirely with the `chart/1–6` tokens
|
|
@@ -110,7 +144,7 @@ Change a semantic token and every component follows — in both the design file
|
|
|
110
144
|
|
|
111
145
|
**Marketing** — Blog Blockquote · Blog Feature Text · Blog Image · Blog Listing Card · Blog Listing Featured Card · Featured Icon · First Page Heading · Job Listing · List · Location Dot · Marquee · Metric · Mobile Navigation Menu · Placeholder Logo · Profile Card · Rich Text Heading · Rich Text Paragraph · Section Heading · Sub Feature · Team Card
|
|
112
146
|
|
|
113
|
-
## Blocks (
|
|
147
|
+
## Blocks (42)
|
|
114
148
|
|
|
115
149
|
Blocks are full sections assembled from Sakani components — **composition examples**, not fully-configurable components like the ones above. Most ship with realistic sample data and manage their own demo state internally (a `state` prop just switches between the states each one ships with — loading, empty, error, and so on). They're meant as a working starting point you customize, not a drop-in you configure entirely through props.
|
|
116
150
|
|
|
@@ -136,7 +170,7 @@ import { DataTableBlock } from './DataTableBlock';
|
|
|
136
170
|
<DataTableBlock />
|
|
137
171
|
```
|
|
138
172
|
|
|
139
|
-
**Application (
|
|
173
|
+
**Application (14)** — Account Overview · Activity Log · App Header · CRM Dashboard · Liquid Glass Dashboard · Data Table + Toolbar · File Upload Panel · Form Modal · Inline CTA · Multistep Modal · Notification Panel · Onboarding Progress · Profile Settings · Section Footer
|
|
140
174
|
|
|
141
175
|
**Authentication (6)** — Email Verification · Forgot Password · Login · Reset Password · Sign Up · Two-Factor Authentication
|
|
142
176
|
|