@sarunyu/system-one 4.9.27 → 4.9.30
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/AGENTS.md +1 -0
- package/DESIGN.md +2 -2
- package/dist/index.cjs +187 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +187 -19
- package/dist/index.js.map +1 -1
- package/dist/src/components/avatar-stack.d.ts +24 -0
- package/dist/src/components/avatar-stack.d.ts.map +1 -0
- package/dist/src/components/avatar.d.ts +20 -0
- package/dist/src/components/avatar.d.ts.map +1 -0
- package/dist/src/components/bottom-sheet.d.ts.map +1 -1
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/llms.txt +53 -1
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -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 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
|
|
@@ -143,6 +143,7 @@ import {
|
|
|
143
143
|
Checkbox, Toggle, Radio,
|
|
144
144
|
DateInput, TimeInput,
|
|
145
145
|
// Display
|
|
146
|
+
Avatar, AvatarStack,
|
|
146
147
|
Tag, StatusTag, Chip,
|
|
147
148
|
Tab, TabGroup,
|
|
148
149
|
Card,
|
|
@@ -816,6 +817,57 @@ Props: `variant?` (`"button"` | `"notification"`, default `"button"`), `count?`,
|
|
|
816
817
|
|
|
817
818
|
---
|
|
818
819
|
|
|
820
|
+
### Avatar
|
|
821
|
+
|
|
822
|
+
User avatar in three display modes across seven sizes, with an optional online-status dot.
|
|
823
|
+
|
|
824
|
+
- `"photo"` (default) — renders an `<img>`. Pair with `status` for a green online dot.
|
|
825
|
+
- `"text"` — gradient circle showing up to 2-character initials.
|
|
826
|
+
- `"placeholder"` — generic silhouette when no photo or name is available.
|
|
827
|
+
|
|
828
|
+
```tsx
|
|
829
|
+
// Photo
|
|
830
|
+
<Avatar src={user.photoUrl} alt={user.name} />
|
|
831
|
+
<Avatar src={user.photoUrl} alt={user.name} status />
|
|
832
|
+
|
|
833
|
+
// Initials
|
|
834
|
+
<Avatar type="text" initials="JD" />
|
|
835
|
+
<Avatar type="text" initials="JD" size="l" />
|
|
836
|
+
|
|
837
|
+
// Placeholder
|
|
838
|
+
<Avatar type="placeholder" />
|
|
839
|
+
|
|
840
|
+
// Sizes: xxs | xs | s | m (default) | l | xl | xxl
|
|
841
|
+
<Avatar size="s" src={url} alt="User" />
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
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?`.
|
|
845
|
+
|
|
846
|
+
---
|
|
847
|
+
|
|
848
|
+
### AvatarStack
|
|
849
|
+
|
|
850
|
+
Horizontal row of overlapping avatars with a circular separator between each pair. Items can mix `photo`, `text`, and `placeholder` types.
|
|
851
|
+
|
|
852
|
+
```tsx
|
|
853
|
+
<AvatarStack
|
|
854
|
+
items={[
|
|
855
|
+
{ src: user1.photoUrl, alt: user1.name },
|
|
856
|
+
{ src: user2.photoUrl, alt: user2.name },
|
|
857
|
+
{ type: "text", initials: "JD" },
|
|
858
|
+
{ type: "placeholder" },
|
|
859
|
+
]}
|
|
860
|
+
size="medium"
|
|
861
|
+
max={5}
|
|
862
|
+
/>
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
Sizes map to avatar pixel sizes: `"small"` → 16 px, `"medium"` → 20 px, `"large"` → 24 px.
|
|
866
|
+
|
|
867
|
+
Props: `items` (array of `{ type?, src?, alt?, initials? }`), `size?` (`"small"` | `"medium"` | `"large"`, default `"small"`), `max?` (default 5), `className?`.
|
|
868
|
+
|
|
869
|
+
---
|
|
870
|
+
|
|
819
871
|
### Notification
|
|
820
872
|
|
|
821
873
|
Bell-icon trigger + popover panel showing grouped notification rows. Handles badge count, auto-clear on open, and keyboard navigation. Uses `<Badge variant="notification">` internally.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarunyu/system-one",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.30",
|
|
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": [
|