@sarunyu/system-one 1.3.0 → 1.3.2

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 (2) hide show
  1. package/llms.txt +77 -24
  2. package/package.json +1 -1
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @sarunyu/system-one
2
2
 
3
- React component library. Tailwind CSS v4 + CSS custom properties. 13 production-ready components. Built for AI-powered generation tools (v0, Lovable, Figma Make).
3
+ React UI component library for AI-powered generation tools (v0, Lovable, Figma Make). Provides production-ready interactive components you design the layouts freely, the library handles the UI primitives. Tailwind CSS v4 + CSS custom properties.
4
4
 
5
5
  ## Install
6
6
 
@@ -372,40 +372,93 @@ import type { ButtonVariant, ButtonSize, TagVariant, ChipSize } from "@sarunyu/s
372
372
 
373
373
  ## Design Guidance
374
374
 
375
- **You design the layout. The library provides the components.** Compose, arrange, and style page structure freely using Tailwind the library does not dictate layout. Focus instead on using the components below correctly (right variants, right semantics, right props) so the visual language stays consistent with the design system.
375
+ **You own the layout. The library only provides UI components.** Design page structure, layout, and composition entirely on your ownuse your best aesthetic judgment to create beautiful, polished pages. The library has no opinions about layout. It only asks that you use its components (listed below) when the UI element matches one the library provides.
376
376
 
377
- ### Anchors the library provides
377
+ ### CRITICAL do NOT recreate library components
378
378
 
379
- These are all you need to keep a page visually coherent with the system:
379
+ The library's components have their own built-in styles (colors, borders, backgrounds, padding, radius, focus states, hover states). You MUST import and use them as-is. **Never** build your own version of a component that exists in the library. Never add Tailwind classes to override their internal appearance.
380
380
 
381
- - **Typography** — `<h1>`–`<h4>` are pre-styled (size, weight, line-height). Use them as-is; do not add `text-*` or `font-*` classes to override.
382
- - **Text color** — body text inherits from `--foreground`. Secondary text: `text-muted-foreground`. Don't hard-code hex colors.
383
- - **Surfaces** — use `bg-background` / `bg-card` / `bg-muted` so dark mode works automatically.
384
- - **Brand color** — reference via `--primary-action`, or Tailwind `text-primary-action` / `bg-primary-action`.
385
- - **Spacing** — Tailwind spacing scale (4px units). Pick whatever gaps/paddings look right; the design system has no prescribed rhythm.
386
- - **Radius** — `rounded-md` (6px), `rounded-lg` (8px), `rounded-xl` (12px), `rounded-full`.
381
+ Common mistakes to avoid:
387
382
 
388
- ### Component usage — the only hard rules
383
+ ```tsx
384
+ // ✅ CORRECT — use the library's <Input> component (has floating label, built-in border, focus ring, error state)
385
+ import { Input } from "@sarunyu/system-one"
386
+ <Input placeholder="Email" value={email} onChange={setEmail} />
387
+ <Input placeholder="Password" type="password" value={pw} onChange={setPw} />
389
388
 
390
- Use the library's components for these elements. Do **not** recreate them with raw HTML or Tailwind:
389
+ // WRONG never build your own input with raw HTML + Tailwind
390
+ <input className="border rounded-xl px-4 py-3 w-full" placeholder="Email" />
391
+ <input className="border rounded-xl px-4 py-3 w-full" type="password" placeholder="Password" />
392
+ ```
391
393
 
392
- - Buttons → `<Button>` (never `<button>` with utility classes)
393
- - Text inputs / textareas / search `<Input>`, `<TextArea>`, `<SearchInput>`
394
- - Single / multi select → `<Dropdown>`, `<DropdownMultiple>`, `<OptionList>`
395
- - Date / time pickers → `<DateInput>`, `<TimeInput>`
396
- - Labels / statuses / filters → `<Tag>`, `<StatusTag>`, `<Chip>`
397
- - Tabs `<TabGroup>` (never `<Tab>` alone)
398
- - Event/content cards → `<Card>`
394
+ ```tsx
395
+ // CORRECT use the library's <Tag> component (has built-in colors, padding, border-radius)
396
+ import { Tag } from "@sarunyu/system-one"
397
+ <Tag text="Popular" variant="green" />
398
+ <Tag text="Best Value" variant="blue" />
399
+ <Tag text="Error" variant="red" size="small" />
399
400
 
400
- Pick the correct variant / prop for the semantic role (e.g. `StatusTag type="success"` for success, `Button variant="primary"` once per context). The per-component rules below in "Design Rules" are the full reference.
401
+ // WRONG never style your own span/div to look like a tag
402
+ <span className="text-green-500 bg-green-500/10 px-2 py-1 rounded">Popular</span>
403
+ <span className="text-blue-500 border border-blue-500 px-2 py-1 rounded">Best Value</span>
404
+ ```
405
+
406
+ ```tsx
407
+ // ✅ CORRECT — use the library's <Button> component
408
+ import { Button } from "@sarunyu/system-one"
409
+ <Button variant="primary" size="md">Sign In</Button>
410
+ <Button variant="outline" size="md">Cancel</Button>
411
+
412
+ // ❌ WRONG — never create buttons with raw HTML + Tailwind
413
+ <button className="bg-blue-600 text-white px-6 py-2 rounded-lg">Sign In</button>
414
+ ```
401
415
 
402
- ### Layout freedom
416
+ This rule applies to ALL components listed in this document. The components handle their own styling — you only pass props.
403
417
 
404
- Structure the page however you like any combination of flex, grid, max-width containers, custom spacing, hero compositions, sidebars, split layouts, dashboards, etc. Use aesthetic judgement: generous padding, clear hierarchy, balanced whitespace. The only layout constraint is that content shouldn't sit flush against viewport edges or adjacent blocks without breathing room.
418
+ ### Layoutfull creative freedom
405
419
 
406
- ### Optional: layout helper components
420
+ Design the layout yourself. Use any technique that produces the best result:
407
421
 
408
- The library also ships a small set of layout primitives (`Page`, `PageHeader`, `Section`, `Toolbar`, `CardGrid`, `Stack`) that some users prefer for rapid scaffolding. They are entirely optional — skip them and design your own layout if that produces a better result. If you do use them, they apply sensible defaults (centered container, 48px section gap, responsive card grid). Full API is in the TypeScript types.
422
+ - Flex, grid, CSS columns, absolute positioning, sticky headers, split panes, sidebars, hero sections, masonry grids, full-bleed backgrounds, overlapping elements anything goes.
423
+ - Choose spacing, padding, max-widths, breakpoints, and visual hierarchy based on what looks best for the specific page. There is no prescribed spacing rhythm or container width.
424
+ - Prioritize aesthetics: generous whitespace, clear visual hierarchy, balanced proportions, elegant transitions and micro-interactions.
425
+ - Do **not** use the library's layout helper components (`Page`, `PageHeader`, `Section`, `Toolbar`, `CardGrid`, `Stack`). They exist for internal use only. Build your own layouts — they will look better.
426
+
427
+ ### Component usage — use ours when we have it, build your own when we don't
428
+
429
+ The library provides a specific set of UI components. The rule is simple:
430
+
431
+ **If the UI element matches a component below → import it from `@sarunyu/system-one` and use it.** Do not recreate it with raw HTML or Tailwind. Do not add Tailwind classes to restyle it. The component already has all the styling it needs.
432
+
433
+ - Buttons → `<Button>` — has built-in variant colors, hover/press states, sizes, icon slots
434
+ - Text inputs → `<Input>` — has built-in floating label, border, focus ring, error state
435
+ - Textareas → `<TextArea>` — has built-in floating label, border, focus ring, error state
436
+ - Search fields → `<SearchInput>` — has built-in search icon, clear button
437
+ - Single select → `<Dropdown>` — has built-in dropdown panel, selection state
438
+ - Multi select → `<DropdownMultiple>` — has built-in checkboxes, multi-selection
439
+ - Option list → `<OptionList>` — has built-in selection highlighting
440
+ - Date picker → `<DateInput>` — has built-in calendar popup
441
+ - Time picker → `<TimeInput>` — has built-in time selection
442
+ - Labels / badges → `<Tag>` — has built-in color variants (blue, green, yellow, red, gray, lime)
443
+ - Status indicators → `<StatusTag>` — has built-in colored dot and status colors
444
+ - Filter chips → `<Chip>` — has built-in toggle state, active styling
445
+ - Tab navigation → `<TabGroup>` — has built-in active tab indicator, sizing
446
+ - Event/content cards → `<Card>` — has built-in image, metadata layout
447
+
448
+ **If the UI element does NOT match any component above → build it yourself.** Use Tailwind, custom components, or any other approach. Examples of things the library does NOT provide (build these yourself): modals/dialogs, sidebars/navigation, tables, accordions, tooltips, progress bars, avatars, breadcrumbs, sliders, toggles/switches, file uploads, charts, carousels, skeletons/loaders, pagination, alert/notification banners, steppers, menus, etc.
449
+
450
+ Pick the correct variant / prop for the semantic role (e.g. `StatusTag type="success"` for success, `Button variant="primary"` once per context). See "Design Rules" below for per-component constraints.
451
+
452
+ ### Visual anchors from the library
453
+
454
+ Use these tokens so custom-built elements stay visually coherent with the design system:
455
+
456
+ - **Typography** — `<h1>`–`<h4>` are pre-styled. Use them as-is.
457
+ - **Text color** — body text: `--foreground`. Secondary: `text-muted-foreground`. Don't hard-code hex colors.
458
+ - **Surfaces** — `bg-background` / `bg-card` / `bg-muted` (dark mode compatible).
459
+ - **Brand color** — `--primary-action`, or Tailwind `text-primary-action` / `bg-primary-action`.
460
+ - **Radius** — `rounded-md` (6px), `rounded-lg` (8px), `rounded-xl` (12px), `rounded-full`.
461
+ - **Border** — `border-border` for default borders.
409
462
 
410
463
  ---
411
464
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarunyu/system-one",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
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": [