@sarunyu/system-one 4.5.0 → 4.5.1

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.
Files changed (3) hide show
  1. package/AGENTS.md +5 -4
  2. package/llms.txt +8 -3
  3. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -22,8 +22,8 @@ in this package.** This file is the short version: the rules you must follow.
22
22
  - Custom bottom sheets / drawers from the bottom → use `<BottomSheet>` (it ships its own backdrop via Vaul).
23
23
  - Custom inline status banners → use `<Alert>` (never hand-roll tinted divs with icons).
24
24
  - Custom toast / snackbar notifications → use `<Toast>` / `<ToastStack>` in a `fixed` portal.
25
- - Filter buttons with count badges or notification bell buttons → use `<Badge>`.
26
- - Custom notification panels / bell popover use `<Notification>`.
25
+ - Filter buttons with count badges → use `<Badge>` (`variant="button"`).
26
+ - Notification bell + list panel → use `<Notification>`. Never use `<Badge variant="notification">` standalone or wire it to a custom `onClick` (toast, popover, etc.) `<Notification>` handles both the bell and the panel.
27
27
 
28
28
  2. **Use token-backed Tailwind classes for color.** Never emit hard-coded colors:
29
29
  - Hex (`#3b82f6`), arbitrary (`bg-[#...]`), and palette utilities
@@ -49,8 +49,9 @@ in this package.** This file is the short version: the rules you must follow.
49
49
  - `BottomSheet` is mobile-only. On desktop, use `Modal` instead.
50
50
  - `Alert` is always-visible (no open state). Pass `status` + `message`; add `onClose` only for dismissible alerts.
51
51
  - `Toast` / `ToastStack` are floating — render them in a `fixed` portal (`fixed bottom-4 right-4 z-50`). Never inline them in page flow.
52
- - `Badge` wraps a trigger element via children and adds a count or dot on top. Pass `variant="notification"` for the bell, `variant="filter"` for buttons.
53
- - `Notification` manages its own popover; pass `groups` (array of `{ label, items }`). It renders both the bell trigger and the panel.
52
+ - `Badge variant="button"` (default) filter button with optional count. Pass `count`, `label`, `iconOnly`, and `onClick`.
53
+ - `Badge variant="notification"` internal to `<Notification>`; never use standalone or attach your own `onClick` to it.
54
+ - `Notification` manages its own popover; pass `groups` (array of `{ label, items }`). It renders both the bell trigger and the panel. This is the only correct way to show a notification list.
54
55
 
55
56
  6. **Mobile forms and action-heavy modals MUST use `<BottomSheet>`, not `<Modal>`.**
56
57
  Login, signup, settings panels, profile editors, any multi-field form,
package/llms.txt CHANGED
@@ -690,7 +690,9 @@ Props (ToastStack): `items: (ToastProps & { id: string })[]`, `className`, `rend
690
690
  Button with a count indicator. Two variants:
691
691
 
692
692
  - `"button"` (default) — filter/action button (funnel icon) that shows a count badge when active. Use in toolbars and filter bars.
693
- - `"notification"` — bell icon button; typically used as the trigger inside `<Notification>` rather than standalone.
693
+ - `"notification"` — bell icon button used **internally** by `<Notification>`. Do not use standalone.
694
+
695
+ **Critical rule:** `<Badge variant="notification">` is an internal building block of `<Notification>`. Never wire it to your own `onClick` (a toast, a custom popover, etc.). If you need a notification bell that opens a list, use `<Notification>` — it renders the bell and the panel together.
694
696
 
695
697
  ```tsx
696
698
  // Filter button — inactive and active states
@@ -698,8 +700,11 @@ Button with a count indicator. Two variants:
698
700
  <Badge label="Filter" count={3} onClick={openFilter} />
699
701
  <Badge iconOnly count={2} onClick={openFilter} />
700
702
 
701
- // Notification bell (standalone)
702
- <Badge variant="notification" count={5} />
703
+ // WRONG do not do this:
704
+ // <Badge variant="notification" count={5} onClick={showToast} />
705
+
706
+ // CORRECT — for a notification bell + list, always use <Notification>:
707
+ <Notification groups={groups} onItemClick={handleClick} />
703
708
  ```
704
709
 
705
710
  Props: `variant?` (`"button"` | `"notification"`, default `"button"`), `count?`, `maxCount?` (default 99), `label?` (button variant, default `"Filter"`), `iconOnly?`, `icon?` (custom icon), `notificationState?` (`"default"` | `"active"` | `"noti"`), plus native `<button>` props.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarunyu/system-one",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "type": "module",
5
5
  "description": "A production-ready React design system built for AI-powered web generation tools (Figma Make, Lovable, V0). Tailwind CSS v4 + CSS custom properties for full theming support.",
6
6
  "keywords": [