@sarunyu/system-one 1.3.1 → 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 +60 -12
  2. package/package.json +1 -1
package/llms.txt CHANGED
@@ -374,6 +374,47 @@ import type { ButtonVariant, ButtonSize, TagVariant, ChipSize } from "@sarunyu/s
374
374
 
375
375
  **You own the layout. The library only provides UI components.** Design page structure, layout, and composition entirely on your own — use 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
+ ### CRITICAL — do NOT recreate library components
378
+
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
+
381
+ Common mistakes to avoid:
382
+
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} />
388
+
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
+ ```
393
+
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" />
400
+
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
+ ```
415
+
416
+ This rule applies to ALL components listed in this document. The components handle their own styling — you only pass props.
417
+
377
418
  ### Layout — full creative freedom
378
419
 
379
420
  Design the layout yourself. Use any technique that produces the best result:
@@ -387,23 +428,30 @@ Design the layout yourself. Use any technique that produces the best result:
387
428
 
388
429
  The library provides a specific set of UI components. The rule is simple:
389
430
 
390
- **If the UI element matches a component below → use the library's component.** Do not recreate it with raw HTML or Tailwind.
391
-
392
- - Buttons → `<Button>`
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>`
398
- - Event/content cards → `<Card>`
399
-
400
- **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, badges (use `<Tag>` only if it semantically fits), alert/notification banners, steppers, menus, etc.
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.
401
449
 
402
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.
403
451
 
404
452
  ### Visual anchors from the library
405
453
 
406
- Use these tokens to keep custom elements visually coherent with the design system:
454
+ Use these tokens so custom-built elements stay visually coherent with the design system:
407
455
 
408
456
  - **Typography** — `<h1>`–`<h4>` are pre-styled. Use them as-is.
409
457
  - **Text color** — body text: `--foreground`. Secondary: `text-muted-foreground`. Don't hard-code hex colors.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarunyu/system-one",
3
- "version": "1.3.1",
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": [