@sarunyu/system-one 4.9.30 → 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/AGENTS.md +2 -1
- package/DESIGN.md +2 -2
- package/dist/index.cjs +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/src/components/breadcrumb.d.ts +17 -0
- package/dist/src/components/breadcrumb.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/llms.txt +25 -3
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -25,6 +25,7 @@ in this package.** This file is the short version: the rules you must follow.
|
|
|
25
25
|
- Filter buttons with count badges → use `<Badge>` (`variant="button"`).
|
|
26
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
|
- User profile photos, initials circles, or silhouette placeholders → use `<Avatar>`. For grouped users, use `<AvatarStack>`. Never hand-roll `<img>` or `<div>` avatar shapes.
|
|
28
|
+
- Custom breadcrumb / navigation trails → use `<Breadcrumb>`.
|
|
28
29
|
|
|
29
30
|
2. **Use token-backed Tailwind classes for color.** Never emit hard-coded colors:
|
|
30
31
|
- Hex (`#3b82f6`), arbitrary (`bg-[#...]`), and palette utilities
|
|
@@ -155,7 +156,7 @@ Build it with tokens. Never introduce new colors.
|
|
|
155
156
|
|
|
156
157
|
If the custom thing is conceptually a button/input/tag/chip/tab/card/table,
|
|
157
158
|
**stop and use the library's component instead.** Only build custom when the
|
|
158
|
-
concept isn't covered (hero section, chart,
|
|
159
|
+
concept isn't covered (hero section, chart, etc.).
|
|
159
160
|
|
|
160
161
|
## Read this before generating code
|
|
161
162
|
|
package/DESIGN.md
CHANGED
|
@@ -248,9 +248,9 @@ Use sparingly. Corporate UIs prefer border separation over heavy elevation.
|
|
|
248
248
|
|
|
249
249
|
## Component library
|
|
250
250
|
|
|
251
|
-
This design system ships
|
|
251
|
+
This design system ships 27 pre-built components. **Always use them — never recreate with raw HTML.**
|
|
252
252
|
|
|
253
|
-
Key components: `Button`, `Input`, `TextArea`, `SearchInput`, `Dropdown`, `DropdownMultiple`, `Checkbox`, `Radio`, `Toggle`, `DateInput`, `TimeInput`, `Avatar`, `AvatarStack`, `Tag`, `StatusTag`, `Chip`, `TabGroup`, `Card`, `Table` + `TableRow` + `TableHeaderCell` + `TableCell`, `Modal`, `BottomSheet`, `Alert`, `Toast`, `ToastStack`, `Notification`, `Badge`.
|
|
253
|
+
Key components: `Button`, `Input`, `TextArea`, `SearchInput`, `Dropdown`, `DropdownMultiple`, `Checkbox`, `Radio`, `Toggle`, `DateInput`, `TimeInput`, `Avatar`, `AvatarStack`, `Breadcrumb`, `Tag`, `StatusTag`, `Chip`, `TabGroup`, `Card`, `Table` + `TableRow` + `TableHeaderCell` + `TableCell`, `Modal`, `BottomSheet`, `Alert`, `Toast`, `ToastStack`, `Notification`, `Badge`.
|
|
254
254
|
|
|
255
255
|
For props, variants, and usage rules → read `AGENTS.md` and `llms.txt` in this package.
|
|
256
256
|
|
package/dist/index.cjs
CHANGED
|
@@ -6121,6 +6121,25 @@ function AvatarStack({
|
|
|
6121
6121
|
);
|
|
6122
6122
|
}) });
|
|
6123
6123
|
}
|
|
6124
|
+
function BreadcrumbLabel({ item, isLast }) {
|
|
6125
|
+
const base = "shrink-0 text-sm leading-5";
|
|
6126
|
+
if (isLast) {
|
|
6127
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-current": "page", className: `${base} text-text-brand-secondary`, children: item.label });
|
|
6128
|
+
}
|
|
6129
|
+
if (item.href) {
|
|
6130
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: `${base} text-text-default-secondary hover:text-foreground transition-colors`, children: item.label });
|
|
6131
|
+
}
|
|
6132
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${base} text-text-default-secondary`, children: item.label });
|
|
6133
|
+
}
|
|
6134
|
+
function Breadcrumb({ items, className }) {
|
|
6135
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", className: cn("flex items-center gap-1", className), children: items.map((item, index2) => {
|
|
6136
|
+
const isLast = index2 === items.length - 1;
|
|
6137
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
6138
|
+
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLabel, { item, isLast }),
|
|
6139
|
+
!isLast && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "shrink-0 text-sm leading-5 text-text-default-placeholder select-none", children: "/" })
|
|
6140
|
+
] }, index2);
|
|
6141
|
+
}) });
|
|
6142
|
+
}
|
|
6124
6143
|
const index = {
|
|
6125
6144
|
Button,
|
|
6126
6145
|
Badge,
|
|
@@ -6156,6 +6175,7 @@ const index = {
|
|
|
6156
6175
|
TimeInput,
|
|
6157
6176
|
Avatar,
|
|
6158
6177
|
AvatarStack,
|
|
6178
|
+
Breadcrumb,
|
|
6159
6179
|
cn,
|
|
6160
6180
|
useIsMobile
|
|
6161
6181
|
};
|
|
@@ -6164,6 +6184,7 @@ exports.Avatar = Avatar;
|
|
|
6164
6184
|
exports.AvatarStack = AvatarStack;
|
|
6165
6185
|
exports.Badge = Badge;
|
|
6166
6186
|
exports.BottomSheet = BottomSheet;
|
|
6187
|
+
exports.Breadcrumb = Breadcrumb;
|
|
6167
6188
|
exports.Button = Button;
|
|
6168
6189
|
exports.Card = Card;
|
|
6169
6190
|
exports.Checkbox = Checkbox;
|