@sarunyu/system-one 4.9.28 → 4.9.31

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/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @sarunyu/system-one — AI usage guide
2
2
 
3
- React component library. Tailwind CSS v4 + CSS custom properties. 24 components.
3
+ React component library. Tailwind CSS v4 + CSS custom properties. 27 components.
4
4
  Built for AI-powered UI generation (v0, Lovable, Figma Make, Cursor).
5
5
 
6
6
  **This file is the contract.** Read it top-to-bottom before generating any screen
@@ -12,7 +12,7 @@ that uses this library. The rules are non-negotiable.
12
12
 
13
13
  1. **Use library components for every element it provides.** Never recreate
14
14
  Button, Input, Tag, Dropdown, Card, Tab, Checkbox, Toggle, Radio, DateInput, TimeInput,
15
- Table, SearchInput, TextArea, Chip, Modal, BottomSheet, Alert, Toast, Notification, Badge as raw HTML.
15
+ Table, SearchInput, TextArea, Chip, Modal, BottomSheet, Alert, Toast, Notification, Badge, Avatar, AvatarStack, Breadcrumb as raw HTML.
16
16
  2. **Never override a component's built-in styles.** Every library component manages its own colors, shadows, padding, radius, and typography internally. Only use `className` on library components for **layout** (`w-*`, `max-w-*`, `flex`, `grid`, `gap-*`, `m-*`, `col-span-*`). Never pass `bg-*`, `shadow-*`, `text-*`, `p-*`, `rounded-*`, or `border-*` in `className` on a library component.
17
17
  3. **Use design-token classes for color and typography.** Never `text-blue-600`,
18
18
  `bg-gray-100`, `text-[#3b82f6]`. The token table below is exhaustive — if a
@@ -142,7 +142,10 @@ import {
142
142
  Dropdown, DropdownMultiple, OptionList,
143
143
  Checkbox, Toggle, Radio,
144
144
  DateInput, TimeInput,
145
+ // Navigation
146
+ Breadcrumb,
145
147
  // Display
148
+ Avatar, AvatarStack,
146
149
  Tag, StatusTag, Chip,
147
150
  Tab, TabGroup,
148
151
  Card,
@@ -816,6 +819,77 @@ Props: `variant?` (`"button"` | `"notification"`, default `"button"`), `count?`,
816
819
 
817
820
  ---
818
821
 
822
+ ### Avatar
823
+
824
+ User avatar in three display modes across seven sizes, with an optional online-status dot.
825
+
826
+ - `"photo"` (default) — renders an `<img>`. Pair with `status` for a green online dot.
827
+ - `"text"` — gradient circle showing up to 2-character initials.
828
+ - `"placeholder"` — generic silhouette when no photo or name is available.
829
+
830
+ ```tsx
831
+ // Photo
832
+ <Avatar src={user.photoUrl} alt={user.name} />
833
+ <Avatar src={user.photoUrl} alt={user.name} status />
834
+
835
+ // Initials
836
+ <Avatar type="text" initials="JD" />
837
+ <Avatar type="text" initials="JD" size="l" />
838
+
839
+ // Placeholder
840
+ <Avatar type="placeholder" />
841
+
842
+ // Sizes: xxs | xs | s | m (default) | l | xl | xxl
843
+ <Avatar size="s" src={url} alt="User" />
844
+ ```
845
+
846
+ Props: `type?` (`"photo"` | `"text"` | `"placeholder"`, default `"photo"`), `size?` (`"xxs"` | `"xs"` | `"s"` | `"m"` | `"l"` | `"xl"` | `"xxl"`, default `"m"`), `src?`, `alt?`, `initials?` (≤ 2 chars, `text` type), `status?` (green dot, `photo` type only), `className?`.
847
+
848
+ ---
849
+
850
+ ### AvatarStack
851
+
852
+ Horizontal row of overlapping avatars with a circular separator between each pair. Items can mix `photo`, `text`, and `placeholder` types.
853
+
854
+ ```tsx
855
+ <AvatarStack
856
+ items={[
857
+ { src: user1.photoUrl, alt: user1.name },
858
+ { src: user2.photoUrl, alt: user2.name },
859
+ { type: "text", initials: "JD" },
860
+ { type: "placeholder" },
861
+ ]}
862
+ size="medium"
863
+ max={5}
864
+ />
865
+ ```
866
+
867
+ Sizes map to avatar pixel sizes: `"small"` → 16 px, `"medium"` → 20 px, `"large"` → 24 px.
868
+
869
+ Props: `items` (array of `{ type?, src?, alt?, initials? }`), `size?` (`"small"` | `"medium"` | `"large"`, default `"small"`), `max?` (default 5), `className?`.
870
+
871
+ ---
872
+
873
+ ### Breadcrumb
874
+
875
+ Horizontal navigation trail rendered as a `<nav>` with `/` separators. The last item is always the current page (active state). Items with `href` render as anchor tags; items without render as plain text.
876
+
877
+ ```tsx
878
+ <Breadcrumb
879
+ items={[
880
+ { label: "Home", href: "/" },
881
+ { label: "Products", href: "/products" },
882
+ { label: "Detail" },
883
+ ]}
884
+ />
885
+ ```
886
+
887
+ Props: `items` (`BreadcrumbItem[]` — each has `label: string`, `href?: string`), `className?`.
888
+
889
+ The last item in `items` is always treated as the current page — never pass `href` on it.
890
+
891
+ ---
892
+
819
893
  ### Notification
820
894
 
821
895
  Bell-icon trigger + popover panel showing grouped notification rows. Handles badge count, auto-clear on open, and keyboard navigation. Uses `<Badge variant="notification">` internally.
@@ -1469,4 +1543,4 @@ Rules for custom components:
1469
1543
  - Border → `border-border` (or `border-divider` for light separators).
1470
1544
  - Typography → use `<h1>`…`<h4>` and body text inherits from `--foreground`.
1471
1545
 
1472
- If the thing you're building is conceptually a button/input/tag/chip/tab/card/table — **do not build a custom one. Use the library's component.** The only reason to build custom is when the library truly doesn't cover the concept (e.g. a bespoke hero section, a custom chart, a breadcrumb).
1546
+ If the thing you're building is conceptually a button/input/tag/chip/tab/card/table/breadcrumb — **do not build a custom one. Use the library's component.** The only reason to build custom is when the library truly doesn't cover the concept (e.g. a bespoke hero section, a custom chart).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarunyu/system-one",
3
- "version": "4.9.28",
3
+ "version": "4.9.31",
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": [