@uxuissk/design-system 0.8.14 → 0.8.16
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/dist/ai-rules.json +94 -0
- package/dist/ai-rules.md +168 -0
- package/dist/sellsuki-ds.css +1 -43
- package/dist/sellsuki-ds.js +2501 -6399
- package/dist/sellsuki-ds.js.map +1 -0
- package/dist/sellsuki-ds.umd.cjs +81 -81
- package/dist/sellsuki-ds.umd.cjs.map +1 -0
- package/dist/types/index.d.ts +21 -1294
- package/package.json +4 -13
- package/dist/fonts/DBHeaventRounded-Black.woff +0 -0
- package/dist/fonts/DBHeaventRounded-Black.woff2 +0 -0
- package/dist/fonts/DBHeaventRounded-Bold.woff +0 -0
- package/dist/fonts/DBHeaventRounded-Bold.woff2 +0 -0
- package/dist/fonts/DBHeaventRounded-Med.woff +0 -0
- package/dist/fonts/DBHeaventRounded-Med.woff2 +0 -0
- package/dist/fonts/DBHeaventRounded-Regular.woff +0 -0
- package/dist/fonts/DBHeaventRounded-Regular.woff2 +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Sellsuki Design System",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"updated": "2026-03-20",
|
|
5
|
+
"url": "https://sellsukidesignsystemv12.vercel.app/ai-rules.json",
|
|
6
|
+
"storybook": "https://sellsukidesignsystemv12.vercel.app",
|
|
7
|
+
"npm": "@uxuissk/design-system",
|
|
8
|
+
"brand": {
|
|
9
|
+
"product": "Sellsuki — E-commerce management platform for Thai merchants",
|
|
10
|
+
"mood": "Professional, clean, trustworthy, light, airy, functional",
|
|
11
|
+
"design": "Clarity over decoration — flat design, minimal shadows"
|
|
12
|
+
},
|
|
13
|
+
"colors": {
|
|
14
|
+
"primary": "#32a9ff",
|
|
15
|
+
"primary-hover": "#1b8bf5",
|
|
16
|
+
"primary-light": "#f0f9ff",
|
|
17
|
+
"text-primary": "#1f2937",
|
|
18
|
+
"text-secondary": "#6b7280",
|
|
19
|
+
"border": "#e5e7eb",
|
|
20
|
+
"surface": "#f9fafb",
|
|
21
|
+
"background": "#ffffff",
|
|
22
|
+
"success": "#059669",
|
|
23
|
+
"success-light": "#d1fae5",
|
|
24
|
+
"warning": "#d97706",
|
|
25
|
+
"warning-light": "#fef3c7",
|
|
26
|
+
"danger": "#e11d48",
|
|
27
|
+
"danger-light": "#ffe4e6"
|
|
28
|
+
},
|
|
29
|
+
"typography": {
|
|
30
|
+
"font": "'DB HeaventRounded', 'Noto Sans Thai', sans-serif",
|
|
31
|
+
"rule": "ALL text uses DB HeaventRounded — NEVER Inter",
|
|
32
|
+
"scale": {
|
|
33
|
+
"--text-h1": { "size": "48px", "weight": "400", "usage": "Page titles" },
|
|
34
|
+
"--text-h2": { "size": "40px", "weight": "400", "usage": "Section headers" },
|
|
35
|
+
"--text-h3": { "size": "28px", "weight": "400", "usage": "Card titles" },
|
|
36
|
+
"--text-h4": { "size": "24px", "weight": "500", "usage": "Small headings" },
|
|
37
|
+
"--text-p": { "size": "20px", "weight": "400", "usage": "Body, sidebar menu" },
|
|
38
|
+
"--text-label": { "size": "18px", "weight": "400", "usage": "Labels, sidebar group" },
|
|
39
|
+
"--text-button": { "size": "18px", "weight": "600", "usage": "Buttons, badges, tabs" },
|
|
40
|
+
"--text-caption": { "size": "14px", "weight": "400", "usage": "Helper text, captions" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"spacing": {
|
|
44
|
+
"page-desktop": "24px",
|
|
45
|
+
"page-mobile": "16px",
|
|
46
|
+
"card-gap": "16px",
|
|
47
|
+
"form-gap": "16px",
|
|
48
|
+
"section-gap": "32px"
|
|
49
|
+
},
|
|
50
|
+
"border": {
|
|
51
|
+
"radius": "8px",
|
|
52
|
+
"shadow": "0px 1px 2px 0px rgba(0,0,0,0.05)"
|
|
53
|
+
},
|
|
54
|
+
"layout": {
|
|
55
|
+
"navbar-height": "72px",
|
|
56
|
+
"sidebar-width": "280px"
|
|
57
|
+
},
|
|
58
|
+
"button": {
|
|
59
|
+
"variants": ["primary", "secondary", "outline", "ghost", "destructive", "link"],
|
|
60
|
+
"sizes": { "sm": "32px", "md": "36px", "lg": "40px", "xl": "44px" },
|
|
61
|
+
"default": "variant=primary size=md",
|
|
62
|
+
"rule": "Max 1 primary button per view"
|
|
63
|
+
},
|
|
64
|
+
"components": {
|
|
65
|
+
"data-entry": ["DSButton", "IconButton", "ButtonGroup", "DSInput", "DSTextarea", "DSCheckbox", "CheckboxGroup", "DSRadio", "RadioGroup", "Switch", "Dropdown", "DatePicker", "SearchField", "ColorPicker", "FileUpload", "TagInput", "Rating", "TransferList"],
|
|
66
|
+
"data-display": ["DSTable", "Card", "CardHeader", "CardBody", "CardFooter", "StatCard", "Statistic", "Badge", "Tag", "Avatar", "AvatarGroup", "Timeline", "Tree", "EmptyState", "Skeleton"],
|
|
67
|
+
"navigation": ["TopNavbar", "Sidebar", "Breadcrumb", "Tabs", "Stepper", "Pagination"],
|
|
68
|
+
"feedback": ["Alert", "Modal", "Drawer", "ConfirmDialog", "Notification", "toast", "ToastContainer", "Tooltip", "Popover", "ProgressBar", "Spinner"],
|
|
69
|
+
"layout": ["Divider", "Menu", "ImagePreview"]
|
|
70
|
+
},
|
|
71
|
+
"rules": [
|
|
72
|
+
"Flat clean design — no heavy shadows or gradients",
|
|
73
|
+
"Max 1 primary button per view",
|
|
74
|
+
"Handle loading, empty, and error states",
|
|
75
|
+
"DB HeaventRounded for text, Inter for buttons only",
|
|
76
|
+
"Only colors from the defined palette",
|
|
77
|
+
"Follow spacing system strictly"
|
|
78
|
+
],
|
|
79
|
+
"tailwind_patterns": {
|
|
80
|
+
"button-primary": "h-9 px-4 bg-[#32a9ff] hover:bg-[#1b8bf5] text-white text-sm font-semibold rounded-lg font-['Inter']",
|
|
81
|
+
"button-secondary": "h-9 px-4 bg-[#f3f4f6] hover:bg-[#e5e7eb] text-[#1f2937] text-sm font-semibold rounded-lg font-['Inter']",
|
|
82
|
+
"button-outline": "h-9 px-4 border border-[#32a9ff] text-[#32a9ff] bg-white hover:bg-[#f0f9ff] text-sm font-semibold rounded-lg font-['Inter']",
|
|
83
|
+
"button-destructive": "h-9 px-4 bg-[#e11d48] hover:bg-[#be123c] text-white text-sm font-semibold rounded-lg font-['Inter']",
|
|
84
|
+
"card": "bg-white rounded-lg border border-[#e5e7eb] p-4",
|
|
85
|
+
"input": "w-full h-9 px-3 border border-[#e5e7eb] rounded-lg text-sm text-[#1f2937] placeholder:text-[#9ca3af] focus:border-[#32a9ff] focus:ring-1 focus:ring-[#32a9ff] outline-none",
|
|
86
|
+
"badge-success": "px-2 py-0.5 text-xs font-medium rounded-full bg-[#d1fae5] text-[#065f46]",
|
|
87
|
+
"badge-warning": "px-2 py-0.5 text-xs font-medium rounded-full bg-[#fef3c7] text-[#92400e]",
|
|
88
|
+
"badge-danger": "px-2 py-0.5 text-xs font-medium rounded-full bg-[#ffe4e6] text-[#9f1239]",
|
|
89
|
+
"table-header": "px-4 py-3 bg-[#f9fafb] text-[#6b7280] text-xs font-semibold uppercase text-left",
|
|
90
|
+
"table-cell": "px-4 py-3 text-sm text-[#1f2937]",
|
|
91
|
+
"sidebar-item": "flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm text-[#6b7280] hover:bg-[#f0f9ff] hover:text-[#32a9ff]",
|
|
92
|
+
"sidebar-item-active": "flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm bg-[#f0f9ff] text-[#32a9ff] font-medium"
|
|
93
|
+
}
|
|
94
|
+
}
|
package/dist/ai-rules.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Sellsuki Design System — AI Rules (Hosted Version)
|
|
2
|
+
|
|
3
|
+
> This file is the single source of truth for all AI tools generating Sellsuki UI.
|
|
4
|
+
> URL: https://sellsukidesignsystemv12.vercel.app/ai-rules.md
|
|
5
|
+
> Last updated: 2026-03-20
|
|
6
|
+
|
|
7
|
+
## Important: Sandbox vs Full Mode
|
|
8
|
+
|
|
9
|
+
**Sandbox mode** (Claude.ai Artifacts, v0, Google AI Studio):
|
|
10
|
+
- Use ONLY React + Tailwind CSS + lucide-react + recharts
|
|
11
|
+
- DO NOT import from @uxuissk/design-system or any external npm package
|
|
12
|
+
- Recreate components inline using Tailwind classes matching tokens below
|
|
13
|
+
- For font: use `font-['DB_HeaventRounded',sans-serif]` for ALL text (body, button, label, badge)
|
|
14
|
+
|
|
15
|
+
**Full mode** (Claude Code, Cursor, Bolt.new, Lovable, Firebase Studio):
|
|
16
|
+
- Install: `npm install @uxuissk/design-system`
|
|
17
|
+
- CSS: `import "@uxuissk/design-system/styles.css"` (always first)
|
|
18
|
+
- Import: `import { DSButton, DSInput, Card, ... } from "@uxuissk/design-system"`
|
|
19
|
+
|
|
20
|
+
## Brand
|
|
21
|
+
|
|
22
|
+
- Product: **Sellsuki** — E-commerce management platform for Thai merchants
|
|
23
|
+
- Mood: Professional, clean, trustworthy, light, airy, functional
|
|
24
|
+
- Design: Clarity over decoration — flat design, minimal shadows
|
|
25
|
+
|
|
26
|
+
## Colors
|
|
27
|
+
|
|
28
|
+
| Token | Hex | Tailwind | Usage |
|
|
29
|
+
|-------|-----|----------|-------|
|
|
30
|
+
| Primary | `#32a9ff` | `bg-[#32a9ff]` | Buttons, links, brand |
|
|
31
|
+
| Primary hover | `#1b8bf5` | `hover:bg-[#1b8bf5]` | Hover states |
|
|
32
|
+
| Primary light | `#f0f9ff` | `bg-[#f0f9ff]` | Badges, highlights |
|
|
33
|
+
| Text primary | `#1f2937` | `text-[#1f2937]` | Headings, body |
|
|
34
|
+
| Text secondary | `#6b7280` | `text-[#6b7280]` | Muted, labels |
|
|
35
|
+
| Border | `#e5e7eb` | `border-[#e5e7eb]` | Dividers, cards |
|
|
36
|
+
| Surface | `#f9fafb` | `bg-[#f9fafb]` | Page background |
|
|
37
|
+
| Success | `#059669` | `bg-[#059669]` | Success states |
|
|
38
|
+
| Success light | `#d1fae5` | `bg-[#d1fae5]` | Success badges |
|
|
39
|
+
| Warning | `#d97706` | `bg-[#d97706]` | Warning states |
|
|
40
|
+
| Warning light | `#fef3c7` | `bg-[#fef3c7]` | Warning badges |
|
|
41
|
+
| Danger | `#e11d48` | `bg-[#e11d48]` | Error, destructive |
|
|
42
|
+
| Danger light | `#ffe4e6` | `bg-[#ffe4e6]` | Error badges |
|
|
43
|
+
|
|
44
|
+
## Typography
|
|
45
|
+
|
|
46
|
+
**Font: DB HeaventRounded, Noto Sans Thai, sans-serif — ALL text. NEVER use Inter.**
|
|
47
|
+
|
|
48
|
+
| Token | CSS Var | Size | Weight | Usage |
|
|
49
|
+
|-------|---------|------|--------|-------|
|
|
50
|
+
| H1 | `--text-h1` | 48px | 400 | Page titles, hero |
|
|
51
|
+
| H2 | `--text-h2` | 40px | 400 | Section headers |
|
|
52
|
+
| H3 | `--text-h3` | 28px | 400 | Card titles |
|
|
53
|
+
| H4 | `--text-h4` | 24px | 500 | Small headings |
|
|
54
|
+
| Body / P | `--text-p` | 20px | 400 | Body text, sidebar menu |
|
|
55
|
+
| Label | `--text-label` | 18px | 400 | Form labels, sidebar group headers |
|
|
56
|
+
| Button / Badge | `--text-button` | 18px | 600 | Buttons, badges, tabs |
|
|
57
|
+
| Caption | `--text-caption` | 14px | 400 | Helper text, timestamps |
|
|
58
|
+
|
|
59
|
+
## Spacing
|
|
60
|
+
|
|
61
|
+
- Page padding: `24px` desktop / `16px` mobile
|
|
62
|
+
- Card gap: `16px`
|
|
63
|
+
- Form field gap: `16px`
|
|
64
|
+
- Section gap: `32px`
|
|
65
|
+
- Border radius: `8px` (default)
|
|
66
|
+
- Shadow: `0px 1px 2px 0px rgba(0,0,0,0.05)` — prefer borders
|
|
67
|
+
|
|
68
|
+
## Layout
|
|
69
|
+
|
|
70
|
+
- Navbar: `72px` height, white background, bottom border
|
|
71
|
+
- Sidebar: `280px` width, white background, right border
|
|
72
|
+
- Content: `flex-1`, `24px` padding
|
|
73
|
+
|
|
74
|
+
## Button System
|
|
75
|
+
|
|
76
|
+
| Variant | Background | Text | Border |
|
|
77
|
+
|---------|-----------|------|--------|
|
|
78
|
+
| Primary | `#32a9ff` | white | none |
|
|
79
|
+
| Secondary | `#f3f4f6` | `#1f2937` | none |
|
|
80
|
+
| Outline | transparent | `#32a9ff` | `#32a9ff` |
|
|
81
|
+
| Ghost | transparent | `#6b7280` | none |
|
|
82
|
+
| Destructive | `#e11d48` | white | none |
|
|
83
|
+
| Link | transparent | `#32a9ff` | none |
|
|
84
|
+
|
|
85
|
+
Sizes: `sm` 32px / `md` 36px (default) / `lg` 40px / `xl` 44px
|
|
86
|
+
**Rule: Max 1 primary button per view**
|
|
87
|
+
|
|
88
|
+
## Component Patterns (Tailwind)
|
|
89
|
+
|
|
90
|
+
### Button
|
|
91
|
+
```html
|
|
92
|
+
<button class="h-9 px-4 bg-[#32a9ff] hover:bg-[#1b8bf5] text-white text-lg font-semibold rounded-lg font-['DB_HeaventRounded',sans-serif]">
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Card
|
|
96
|
+
```html
|
|
97
|
+
<div class="bg-white rounded-lg border border-[#e5e7eb] p-4">
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Input
|
|
101
|
+
```html
|
|
102
|
+
<input class="w-full h-9 px-3 border border-[#e5e7eb] rounded-lg text-sm text-[#1f2937] placeholder:text-[#9ca3af] focus:border-[#32a9ff] focus:ring-1 focus:ring-[#32a9ff] outline-none" />
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Badge
|
|
106
|
+
```html
|
|
107
|
+
<span class="px-2 py-0.5 text-xs font-medium rounded-full bg-[#d1fae5] text-[#065f46]">Active</span>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Table Header
|
|
111
|
+
```html
|
|
112
|
+
<th class="px-4 py-3 bg-[#f9fafb] text-[#6b7280] text-xs font-semibold uppercase text-left">
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Table Row
|
|
116
|
+
```html
|
|
117
|
+
<tr class="border-b border-[#e5e7eb] hover:bg-[#f9fafb]">
|
|
118
|
+
<td class="px-4 py-3 text-sm text-[#1f2937]">
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Sidebar Menu Item
|
|
122
|
+
```html
|
|
123
|
+
<div class="flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm text-[#6b7280] hover:bg-[#f0f9ff] hover:text-[#32a9ff] cursor-pointer">
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Active Menu Item
|
|
127
|
+
```html
|
|
128
|
+
<div class="flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm bg-[#f0f9ff] text-[#32a9ff] font-medium">
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Components (41 total)
|
|
132
|
+
|
|
133
|
+
**Data Entry**: DSButton, IconButton, ButtonGroup, DSInput, DSTextarea, DSCheckbox, CheckboxGroup, DSRadio, RadioGroup, Switch, Dropdown, DatePicker, SearchField, ColorPicker, FileUpload, TagInput, Rating, TransferList
|
|
134
|
+
|
|
135
|
+
**Data Display**: DSTable, Card, CardHeader, CardBody, CardFooter, StatCard, Statistic, Badge, Tag, Avatar, AvatarGroup, Timeline, Tree, EmptyState, Skeleton
|
|
136
|
+
|
|
137
|
+
**Navigation**: TopNavbar, Sidebar, Breadcrumb, Tabs, Stepper, Pagination
|
|
138
|
+
|
|
139
|
+
**Feedback**: Alert, Modal, Drawer, ConfirmDialog, Notification, toast, ToastContainer, Tooltip, Popover, ProgressBar, Spinner
|
|
140
|
+
|
|
141
|
+
**Layout**: Divider, Menu, ImagePreview
|
|
142
|
+
|
|
143
|
+
## Rules
|
|
144
|
+
|
|
145
|
+
1. Always use flat, clean design — no heavy shadows or gradients
|
|
146
|
+
2. Max 1 primary button per view
|
|
147
|
+
3. Handle loading (skeleton), empty, and error states
|
|
148
|
+
4. Use DB HeaventRounded for ALL text — body, buttons, labels, badges, nav — NEVER Inter
|
|
149
|
+
5. Only colors from the palette above — no random colors
|
|
150
|
+
6. Spacing must follow the defined system
|
|
151
|
+
7. Support responsive: desktop-first
|
|
152
|
+
|
|
153
|
+
## npm Package (for production code)
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm install @uxuissk/design-system
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import "@uxuissk/design-system/styles.css";
|
|
161
|
+
import { DSButton, DSInput, Card } from "@uxuissk/design-system";
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Resources
|
|
165
|
+
|
|
166
|
+
- Storybook: https://sellsukidesignsystemv12.vercel.app
|
|
167
|
+
- npm: @uxuissk/design-system
|
|
168
|
+
- GitHub: https://github.com/BearyCenter/Sellsukidesignsystemv12
|