@sakaniui/react 0.8.3 → 0.8.5
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 +8 -8
- package/dist/{TopBar-DHp4nwwW.js → TopBar-n4mj0qZ2.js} +30 -30
- package/dist/{TopBar-zMhW9kWA.cjs → TopBar-rSTYQ9IY.cjs} +1 -1
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.mjs +1 -1
- package/dist/components/Switch/Switch.d.ts +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1159 -1134
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@ An open-source, token-driven React component library for SaaS products — **1,5
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## Why
|
|
11
|
+
## Why SakaniUI
|
|
12
12
|
|
|
13
|
-
Most component libraries start in code and retrofit the design.
|
|
13
|
+
Most component libraries start in code and retrofit the design. SakaniUI was built the other way: every component is designed first in Figma with a strict three-layer token architecture, then implemented 1:1 in React — same variants, same states, same tokens. The Figma file has grown into a 1,500+ component-and-variant system across light and dark mode; the React library mirrors it component by component, with new ones landing as they're built out.
|
|
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
|
|
@@ -69,13 +69,13 @@ Import the tokens once, then use any component from `@sakaniui/react`:
|
|
|
69
69
|
```tsx
|
|
70
70
|
import '@sakaniui/react/tokens.css';
|
|
71
71
|
import { Button, StatCard } from '@sakaniui/react';
|
|
72
|
-
import {
|
|
72
|
+
import { IconCurrencyDollar } from '@sakaniui/react/icons';
|
|
73
73
|
|
|
74
74
|
export const Dashboard = () => (
|
|
75
75
|
<>
|
|
76
76
|
<StatCard
|
|
77
77
|
variant="icon"
|
|
78
|
-
icon={
|
|
78
|
+
icon={IconCurrencyDollar}
|
|
79
79
|
title="Revenue"
|
|
80
80
|
value="$48,120"
|
|
81
81
|
delta="+12.5%"
|
|
@@ -97,7 +97,7 @@ export const Dashboard = () => (
|
|
|
97
97
|
|
|
98
98
|
## Glass & liquid glass
|
|
99
99
|
|
|
100
|
-
Glass is built into the theme system, not added component by component. Next to light/dark,
|
|
100
|
+
Glass is built into the theme system, not added component by component. Next to light/dark, SakaniUI 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.
|
|
101
101
|
|
|
102
102
|
```tsx
|
|
103
103
|
// Frosted glass: one attribute on any ancestor (works in light and dark)
|
|
@@ -205,7 +205,7 @@ Change a semantic token and every component follows — in both the design file
|
|
|
205
205
|
|
|
206
206
|
## Blocks (42)
|
|
207
207
|
|
|
208
|
-
Blocks are full sections assembled from
|
|
208
|
+
Blocks are full sections assembled from SakaniUI 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.
|
|
209
209
|
|
|
210
210
|
They live in `src/blocks`, and are also published separately from the main package at **`@sakaniui/react/blocks`** — kept out of the main entry point on purpose, so importing them is a deliberate choice:
|
|
211
211
|
|
|
@@ -258,7 +258,7 @@ The library ships with an audited AA baseline: contrast-checked token pairs in b
|
|
|
258
258
|
|
|
259
259
|
## Support
|
|
260
260
|
|
|
261
|
-
If
|
|
261
|
+
If SakaniUI is useful to you, you can [tip the creator](https://csakani.gumroad.com/coffee). It funds the time that keeps the system maintained and growing.
|
|
262
262
|
|
|
263
263
|
## Author
|
|
264
264
|
|
|
@@ -268,4 +268,4 @@ If Sakani is useful to you, you can [tip the creator](https://csakani.gumroad.co
|
|
|
268
268
|
|
|
269
269
|
## License
|
|
270
270
|
|
|
271
|
-
MIT — free for personal and commercial use. If
|
|
271
|
+
MIT — free for personal and commercial use. If SakaniUI saves you time, a star ⭐ helps others find it.
|
|
@@ -4510,19 +4510,19 @@ var jr = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: i })
|
|
|
4510
4510
|
className: zr.groupLabel,
|
|
4511
4511
|
children: e
|
|
4512
4512
|
}), Z = {
|
|
4513
|
-
header: "
|
|
4514
|
-
"header--collapsed": "_header--
|
|
4515
|
-
"header--workspace": "_header--
|
|
4516
|
-
header__subtitle: "
|
|
4517
|
-
header__switch: "
|
|
4518
|
-
header__logoWrap: "
|
|
4519
|
-
header__logo: "
|
|
4520
|
-
header__logoContent: "
|
|
4521
|
-
header__logoIcon: "
|
|
4522
|
-
header__text: "
|
|
4523
|
-
"header__text--collapsed": "_header__text--
|
|
4524
|
-
header__title: "
|
|
4525
|
-
header__toggle: "
|
|
4513
|
+
header: "_header_et3rf_2",
|
|
4514
|
+
"header--collapsed": "_header--collapsed_et3rf_12",
|
|
4515
|
+
"header--workspace": "_header--workspace_et3rf_15",
|
|
4516
|
+
header__subtitle: "_header__subtitle_et3rf_20",
|
|
4517
|
+
header__switch: "_header__switch_et3rf_21",
|
|
4518
|
+
header__logoWrap: "_header__logoWrap_et3rf_24",
|
|
4519
|
+
header__logo: "_header__logo_et3rf_23",
|
|
4520
|
+
header__logoContent: "_header__logoContent_et3rf_52",
|
|
4521
|
+
header__logoIcon: "_header__logoIcon_et3rf_53",
|
|
4522
|
+
header__text: "_header__text_et3rf_59",
|
|
4523
|
+
"header__text--collapsed": "_header__text--collapsed_et3rf_70",
|
|
4524
|
+
header__title: "_header__title_et3rf_74",
|
|
4525
|
+
header__toggle: "_header__toggle_et3rf_76"
|
|
4526
4526
|
}, Vr = ({ type: e = "brand", title: t, subtitle: n, logo: r, collapsed: i, onToggle: a, toggleIcon: o = y }) => /* @__PURE__ */ M("div", {
|
|
4527
4527
|
className: [
|
|
4528
4528
|
Z.header,
|
|
@@ -4587,18 +4587,18 @@ var jr = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: i })
|
|
|
4587
4587
|
})
|
|
4588
4588
|
]
|
|
4589
4589
|
}), Hr = {
|
|
4590
|
-
item: "
|
|
4591
|
-
"item--disabled": "_item--
|
|
4592
|
-
"item--active": "_item--
|
|
4593
|
-
"item--active-flat": "_item--active-
|
|
4594
|
-
item__icon: "
|
|
4595
|
-
item__bar: "
|
|
4596
|
-
item__chevron: "
|
|
4597
|
-
item__badge: "
|
|
4598
|
-
"item--collapsed": "_item--
|
|
4599
|
-
item__label: "
|
|
4600
|
-
"item__label--collapsed": "_item__label--
|
|
4601
|
-
"item__chevron--expanded": "_item__chevron--
|
|
4590
|
+
item: "_item_873gi_5",
|
|
4591
|
+
"item--disabled": "_item--disabled_873gi_37",
|
|
4592
|
+
"item--active": "_item--active_873gi_37",
|
|
4593
|
+
"item--active-flat": "_item--active-flat_873gi_37",
|
|
4594
|
+
item__icon: "_item__icon_873gi_38",
|
|
4595
|
+
item__bar: "_item__bar_873gi_49",
|
|
4596
|
+
item__chevron: "_item__chevron_873gi_82",
|
|
4597
|
+
item__badge: "_item__badge_873gi_84",
|
|
4598
|
+
"item--collapsed": "_item--collapsed_873gi_103",
|
|
4599
|
+
item__label: "_item__label_873gi_142",
|
|
4600
|
+
"item__label--collapsed": "_item__label--collapsed_873gi_151",
|
|
4601
|
+
"item__chevron--expanded": "_item__chevron--expanded_873gi_174"
|
|
4602
4602
|
}, Ur = ({ icon: e, label: t, active: n, activeIndicator: r = !0, disabled: i, badge: a, hasSubmenu: o, collapsed: s, expanded: c, onClick: l, href: u, nativeTooltip: d = !0 }) => {
|
|
4603
4603
|
let f = n && r, m = n && !r, h = [
|
|
4604
4604
|
Hr.item,
|
|
@@ -4705,11 +4705,11 @@ var jr = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: i })
|
|
|
4705
4705
|
})
|
|
4706
4706
|
]
|
|
4707
4707
|
}), Kr = {
|
|
4708
|
-
subItem: "
|
|
4709
|
-
"subItem--disabled": "_subItem--
|
|
4710
|
-
"subItem--active": "_subItem--
|
|
4711
|
-
subItem__dot: "
|
|
4712
|
-
subItem__label: "
|
|
4708
|
+
subItem: "_subItem_1d7az_2",
|
|
4709
|
+
"subItem--disabled": "_subItem--disabled_1d7az_26",
|
|
4710
|
+
"subItem--active": "_subItem--active_1d7az_27",
|
|
4711
|
+
subItem__dot: "_subItem__dot_1d7az_31",
|
|
4712
|
+
subItem__label: "_subItem__label_1d7az_41"
|
|
4713
4713
|
}, qr = ({ label: e, active: t, disabled: n, onClick: r, href: i }) => {
|
|
4714
4714
|
let a = {
|
|
4715
4715
|
className: [
|