@finhay-pro/leaf-design-system 0.1.1 → 0.1.3
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/README.md +263 -92
- package/dist/border.css +44 -0
- package/dist/button.css +56 -25
- package/dist/cdn/leaf-0.1.3.min.css +2 -0
- package/dist/cdn/leaf-0.1.3.min.js +2 -0
- package/dist/classes.css +2168 -265
- package/dist/components/Button/Button.d.ts +20 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +65 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +62 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.js +85 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Dialog/index.js +2 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/Logo/Logo.d.ts +29 -0
- package/dist/components/Logo/Logo.d.ts.map +1 -0
- package/dist/components/Logo/Logo.js +39 -0
- package/dist/components/Logo/Logo.js.map +1 -0
- package/dist/components/Logo/assets.d.ts +11 -0
- package/dist/components/Logo/assets.d.ts.map +1 -0
- package/dist/components/Logo/assets.js +35 -0
- package/dist/components/Logo/assets.js.map +1 -0
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/Logo/index.d.ts.map +1 -0
- package/dist/components/Logo/index.js +2 -0
- package/dist/components/Logo/index.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +16 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +18 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +2 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Slider/Slider.d.ts +56 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/Slider.js +184 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +2 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +34 -0
- package/dist/components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner/Spinner.js +37 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.d.ts.map +1 -0
- package/dist/components/Spinner/index.js +2 -0
- package/dist/components/Spinner/index.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +32 -20
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +53 -31
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts +29 -0
- package/dist/components/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/Toggle/Toggle.js +29 -0
- package/dist/components/Toggle/Toggle.js.map +1 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Toggle/index.d.ts.map +1 -0
- package/dist/components/Toggle/index.js +2 -0
- package/dist/components/Toggle/index.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +67 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +138 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/core/dialog.d.ts +26 -0
- package/dist/core/dialog.d.ts.map +1 -0
- package/dist/core/dialog.js +124 -0
- package/dist/core/dialog.js.map +1 -0
- package/dist/core/focus.d.ts +8 -0
- package/dist/core/focus.d.ts.map +1 -0
- package/dist/core/focus.js +18 -0
- package/dist/core/focus.js.map +1 -0
- package/dist/core/slider.d.ts +35 -0
- package/dist/core/slider.d.ts.map +1 -0
- package/dist/core/slider.js +81 -0
- package/dist/core/slider.js.map +1 -0
- package/dist/core/spinner.d.ts +10 -0
- package/dist/core/spinner.d.ts.map +1 -0
- package/dist/core/spinner.js +13 -0
- package/dist/core/spinner.js.map +1 -0
- package/dist/core/tabs.d.ts +9 -0
- package/dist/core/tabs.d.ts.map +1 -0
- package/dist/core/tabs.js +30 -0
- package/dist/core/tabs.js.map +1 -0
- package/dist/core/tooltip.d.ts +33 -0
- package/dist/core/tooltip.d.ts.map +1 -0
- package/dist/core/tooltip.js +175 -0
- package/dist/core/tooltip.js.map +1 -0
- package/dist/dialog.css +157 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/logo-assets.css +80 -0
- package/dist/logo.css +46 -0
- package/dist/skeleton.css +48 -0
- package/dist/slider.css +241 -0
- package/dist/spacing.css +838 -0
- package/dist/spinner.css +115 -0
- package/dist/styles.css +2220 -267
- package/dist/tabs.css +70 -15
- package/dist/toggle.css +106 -0
- package/dist/tokens.css +62 -12
- package/dist/tooltip.css +210 -0
- package/dist/typography.css +24 -3
- package/dist/utils/mergeRefs.d.ts +4 -0
- package/dist/utils/mergeRefs.d.ts.map +1 -0
- package/dist/utils/mergeRefs.js +14 -0
- package/dist/utils/mergeRefs.js.map +1 -0
- package/dist/utils/toCssSize.d.ts +4 -0
- package/dist/utils/toCssSize.d.ts.map +1 -0
- package/dist/utils/toCssSize.js +7 -0
- package/dist/utils/toCssSize.js.map +1 -0
- package/dist/utils/useControllableState.d.ts +13 -0
- package/dist/utils/useControllableState.d.ts.map +1 -0
- package/dist/utils/useControllableState.js +29 -0
- package/dist/utils/useControllableState.js.map +1 -0
- package/dist/utils/useInheritedTheme.d.ts +10 -0
- package/dist/utils/useInheritedTheme.d.ts.map +1 -0
- package/dist/utils/useInheritedTheme.js +22 -0
- package/dist/utils/useInheritedTheme.js.map +1 -0
- package/dist/utils/useMounted.d.ts +3 -0
- package/dist/utils/useMounted.d.ts.map +1 -0
- package/dist/utils/useMounted.js +11 -0
- package/dist/utils/useMounted.js.map +1 -0
- package/package.json +23 -3
- package/dist/cdn/leaf-0.1.1.min.css +0 -2
- package/dist/cdn/leaf-0.1.1.min.js +0 -2
package/README.md
CHANGED
|
@@ -21,15 +21,25 @@ pnpm add @finhay-pro/leaf-design-system
|
|
|
21
21
|
Class chỉ đọc `var(--…)`, không tự khai báo giá trị — nên **luôn import `tokens.css` trước**, rồi
|
|
22
22
|
chọn phần class cần dùng.
|
|
23
23
|
|
|
24
|
-
| Import
|
|
25
|
-
|
|
|
26
|
-
| `@finhay-pro/leaf-design-system/tokens.css`
|
|
27
|
-
| `@finhay-pro/leaf-design-system/typography.css`
|
|
28
|
-
| `@finhay-pro/leaf-design-system/color.css`
|
|
29
|
-
| `@finhay-pro/leaf-design-system/
|
|
30
|
-
| `@finhay-pro/leaf-design-system/
|
|
31
|
-
| `@finhay-pro/leaf-design-system/
|
|
32
|
-
| `@finhay-pro/leaf-design-system/
|
|
24
|
+
| Import | Nội dung |
|
|
25
|
+
| ------------------------------------------------ | ------------------------------------------------------------------------------- |
|
|
26
|
+
| `@finhay-pro/leaf-design-system/tokens.css` | Chỉ token (primitive + semantic + typography + spacing + border), không class. |
|
|
27
|
+
| `@finhay-pro/leaf-design-system/typography.css` | Chỉ class typography. |
|
|
28
|
+
| `@finhay-pro/leaf-design-system/color.css` | Chỉ class color. |
|
|
29
|
+
| `@finhay-pro/leaf-design-system/spacing.css` | Chỉ class spacing (`p-*` / `m-*` / `gap-*`). |
|
|
30
|
+
| `@finhay-pro/leaf-design-system/border.css` | Chỉ class border radius (`radius-*`). |
|
|
31
|
+
| `@finhay-pro/leaf-design-system/button.css` | Style của component `Button`. |
|
|
32
|
+
| `@finhay-pro/leaf-design-system/tabs.css` | Style của component `Tabs`. |
|
|
33
|
+
| `@finhay-pro/leaf-design-system/dialog.css` | Style của component `Dialog`. |
|
|
34
|
+
| `@finhay-pro/leaf-design-system/logo.css` | Style của component `Logo`. |
|
|
35
|
+
| `@finhay-pro/leaf-design-system/logo-assets.css` | SVG data-URI cho Logo HTML tĩnh — không nằm trong `classes.css` / `styles.css`. |
|
|
36
|
+
| `@finhay-pro/leaf-design-system/skeleton.css` | Style của component `Skeleton`. |
|
|
37
|
+
| `@finhay-pro/leaf-design-system/spinner.css` | Style của component `Spinner`. |
|
|
38
|
+
| `@finhay-pro/leaf-design-system/toggle.css` | Style của component `Toggle`. |
|
|
39
|
+
| `@finhay-pro/leaf-design-system/slider.css` | Style của component `Slider`. |
|
|
40
|
+
| `@finhay-pro/leaf-design-system/tooltip.css` | Style của component `Tooltip`. |
|
|
41
|
+
| `@finhay-pro/leaf-design-system/classes.css` | Tất cả class + component, không token. |
|
|
42
|
+
| `@finhay-pro/leaf-design-system/styles.css` | Token + tất cả class + component. Một dòng là đủ. |
|
|
33
43
|
|
|
34
44
|
Trong app dùng Tailwind v4, import bằng CSS, **sau** `@import "tailwindcss"`:
|
|
35
45
|
|
|
@@ -42,10 +52,19 @@ Trong app dùng Tailwind v4, import bằng CSS, **sau** `@import "tailwindcss"`:
|
|
|
42
52
|
/* 2. Bộ class nền tảng */
|
|
43
53
|
@import "@finhay-pro/leaf-design-system/typography.css";
|
|
44
54
|
@import "@finhay-pro/leaf-design-system/color.css";
|
|
55
|
+
@import "@finhay-pro/leaf-design-system/spacing.css";
|
|
56
|
+
@import "@finhay-pro/leaf-design-system/border.css";
|
|
45
57
|
|
|
46
58
|
/* 3. Component nào dùng thì import cái đó */
|
|
47
59
|
@import "@finhay-pro/leaf-design-system/button.css";
|
|
48
60
|
@import "@finhay-pro/leaf-design-system/tabs.css";
|
|
61
|
+
@import "@finhay-pro/leaf-design-system/dialog.css";
|
|
62
|
+
@import "@finhay-pro/leaf-design-system/logo.css";
|
|
63
|
+
@import "@finhay-pro/leaf-design-system/skeleton.css";
|
|
64
|
+
@import "@finhay-pro/leaf-design-system/spinner.css";
|
|
65
|
+
@import "@finhay-pro/leaf-design-system/toggle.css";
|
|
66
|
+
@import "@finhay-pro/leaf-design-system/slider.css";
|
|
67
|
+
@import "@finhay-pro/leaf-design-system/tooltip.css";
|
|
49
68
|
```
|
|
50
69
|
|
|
51
70
|
Muốn gọn thì một dòng `@import "@finhay-pro/leaf-design-system/styles.css";` thay cho cả khối trên.
|
|
@@ -99,8 +118,8 @@ Trong React / Next.js, class đi thẳng vào `className` của bất kỳ eleme
|
|
|
99
118
|
```tsx
|
|
100
119
|
<h2 className="heading-2">Tài sản của bạn</h2>
|
|
101
120
|
|
|
102
|
-
// Class typography lo cỡ chữ,
|
|
103
|
-
<p className="body-3 text-secondary mt-
|
|
121
|
+
// Class typography lo cỡ chữ, color lo màu, spacing lo khoảng cách
|
|
122
|
+
<p className="body-3 text-secondary mt-s">Lợi nhuận kỳ vọng 8.5%/năm</p>
|
|
104
123
|
|
|
105
124
|
// Gắn vào component của thư viện khác cũng chỉ là một chuỗi class
|
|
106
125
|
<Link href="/tai-khoan" className="body-3-highlight">
|
|
@@ -125,7 +144,7 @@ viết thêm gì cho light mode.
|
|
|
125
144
|
| System (đủ 3 bộ) | `text-*`, `base-*`, `border-*` với `red`, `green`, `yellow`, `orange`, `blue`, `purple` |
|
|
126
145
|
|
|
127
146
|
```html
|
|
128
|
-
<div class="base-secondary border-quaternary
|
|
147
|
+
<div class="base-secondary border-quaternary p-l radius-m border">
|
|
129
148
|
<h3 class="heading-3 text-primary">Tích luỹ</h3>
|
|
130
149
|
<p class="body-4 text-secondary">Lợi nhuận kỳ vọng 8.5%/năm</p>
|
|
131
150
|
<p class="body-4 text-red">Số dư không đủ</p>
|
|
@@ -135,31 +154,85 @@ viết thêm gì cho light mode.
|
|
|
135
154
|
<html data-theme="light"></html>
|
|
136
155
|
```
|
|
137
156
|
|
|
157
|
+
## Spacing class
|
|
158
|
+
|
|
159
|
+
Token `--spacing-*` (Figma Application) áp dụng cho **margin · padding · gap**. Tiền tố = thuộc
|
|
160
|
+
tính, hậu tố = bậc: `0` · `xs` · `s` · `m` · `l` · `xl` · `2xl` … `7xl`.
|
|
161
|
+
|
|
162
|
+
| Prefix | Property |
|
|
163
|
+
| -------------------------------- | -------------------------------------------- |
|
|
164
|
+
| `p-*` `px-*` `py-*` `pt/r/b/l-*` | padding / padding-inline / block / từng cạnh |
|
|
165
|
+
| `m-*` `mx-*` `my-*` `mt/r/b/l-*` | margin tương tự |
|
|
166
|
+
| `gap-*` `gap-x-*` `gap-y-*` | gap / column-gap / row-gap |
|
|
167
|
+
|
|
168
|
+
| Hậu tố | Token | px |
|
|
169
|
+
| ------ | --------------- | --- |
|
|
170
|
+
| `0` | `--spacing-0` | 0 |
|
|
171
|
+
| `xs` | `--spacing-xs` | 4 |
|
|
172
|
+
| `s` | `--spacing-s` | 8 |
|
|
173
|
+
| `m` | `--spacing-m` | 12 |
|
|
174
|
+
| `l` | `--spacing-l` | 16 |
|
|
175
|
+
| `xl` | `--spacing-xl` | 24 |
|
|
176
|
+
| `2xl` | `--spacing-2xl` | 36 |
|
|
177
|
+
| `3xl` | `--spacing-3xl` | 48 |
|
|
178
|
+
| `4xl` | `--spacing-4xl` | 60 |
|
|
179
|
+
| `5xl` | `--spacing-5xl` | 84 |
|
|
180
|
+
| `6xl` | `--spacing-6xl` | 120 |
|
|
181
|
+
| `7xl` | `--spacing-7xl` | 240 |
|
|
182
|
+
|
|
183
|
+
```html
|
|
184
|
+
<div class="gap-m p-l flex flex-col">
|
|
185
|
+
<h3 class="heading-3">Danh mục</h3>
|
|
186
|
+
<p class="body-4 mt-s text-secondary">Cập nhật 5 phút trước</p>
|
|
187
|
+
</div>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Border radius class
|
|
191
|
+
|
|
192
|
+
Token `--radius-*` (Figma Border Application) — subset của spacing tới `2xl`. Class `radius-*`
|
|
193
|
+
chỉ set `border-radius` (không đụng `rounded-*` của Tailwind hay `border-*` màu viền).
|
|
194
|
+
|
|
195
|
+
| Class | Token | px |
|
|
196
|
+
| ------------ | -------------- | --- |
|
|
197
|
+
| `radius-0` | `--radius-0` | 0 |
|
|
198
|
+
| `radius-xs` | `--radius-xs` | 4 |
|
|
199
|
+
| `radius-s` | `--radius-s` | 8 |
|
|
200
|
+
| `radius-m` | `--radius-m` | 12 |
|
|
201
|
+
| `radius-l` | `--radius-l` | 16 |
|
|
202
|
+
| `radius-xl` | `--radius-xl` | 24 |
|
|
203
|
+
| `radius-2xl` | `--radius-2xl` | 36 |
|
|
204
|
+
|
|
205
|
+
```html
|
|
206
|
+
<div class="base-secondary border-quaternary p-l radius-m border">Card</div>
|
|
207
|
+
```
|
|
208
|
+
|
|
138
209
|
## Cần biết
|
|
139
210
|
|
|
140
|
-
- **Class typography chỉ set đúng 3 thuộc tính** (`font-size`, `line-height`, `font-weight`)
|
|
141
|
-
**class color chỉ set đúng 1** (`color` / `background-color` / `border-color`)
|
|
142
|
-
|
|
211
|
+
- **Class typography chỉ set đúng 3 thuộc tính** (`font-size`, `line-height`, `font-weight`);
|
|
212
|
+
**class color chỉ set đúng 1** (`color` / `background-color` / `border-color`); **spacing /
|
|
213
|
+
radius chỉ set đúng 1** (margin/padding/gap hoặc `border-radius`). Font family, letter spacing,
|
|
214
|
+
border width… nằm ngoài phạm vi — app tự setup ở tầng global
|
|
143
215
|
(`body { font-family: var(--font-sans) }`, CSS reset…) hoặc thêm bằng Tailwind.
|
|
144
216
|
- **Typography nằm trong `@layer components`**, nên utility của Tailwind v4 (`@layer utilities`)
|
|
145
217
|
luôn thắng: `class="heading-1 font-bold"` hay `class="body-3 text-2xl"` override được bình
|
|
146
218
|
thường, không cần important modifier.
|
|
147
|
-
- **Color nằm trong `@layer utilities`** —
|
|
148
|
-
thắng. Class
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
`@import "tailwindcss"`.
|
|
219
|
+
- **Color / spacing / border nằm trong `@layer utilities`** — token gốc nên trùng tên thì phải
|
|
220
|
+
thắng. Class đứng cùng layer với utility của Tailwind và được import sau, nên nếu app tự khai
|
|
221
|
+
báo cùng tên trong `@theme` thì class Leaf vẫn có hiệu lực. Điều kiện:
|
|
222
|
+
`@import "@finhay-pro/leaf-design-system/…"` phải nằm **sau** `@import "tailwindcss"`.
|
|
152
223
|
- **Class không có biến thể `hover:` / `focus:` / opacity** — nó là CSS thuần, không phải utility do
|
|
153
224
|
Tailwind sinh ra. Cần state thì dùng arbitrary value trỏ vào cùng token:
|
|
154
225
|
`hover:text-[var(--text-highlight)]` (pseudo-class có specificity cao hơn nên thắng). Riêng biến
|
|
155
226
|
thể responsive cùng specificity với class màu và được ghi ra trước, nên cần important modifier:
|
|
156
227
|
`md:text-[var(--text-secondary)]!`.
|
|
157
|
-
- **Chỉ semantic token mới có class.** Primitive (`--neutral-500`, `--brand-300`…) là nguồn nội
|
|
158
|
-
dùng thẳng trong UI là mất khả năng đổi theme.
|
|
228
|
+
- **Chỉ semantic token mới có class màu.** Primitive (`--neutral-500`, `--brand-300`…) là nguồn nội
|
|
229
|
+
bộ, dùng thẳng trong UI là mất khả năng đổi theme. Spacing / radius là thang kích thước cố định,
|
|
230
|
+
không đổi theo theme.
|
|
159
231
|
- **Tên class không có prefix.** Đây là những tên khá phổ thông, nên app dùng Leaf cần cân nhắc kỹ
|
|
160
232
|
nếu load kèm CSS framework khác (Bootstrap cũng định nghĩa `.display-1`–`.display-6`). Với
|
|
161
|
-
Tailwind thì màu của Leaf luôn thắng khi trùng tên — đó là chủ đích; muốn
|
|
162
|
-
thì đặt tên khác
|
|
233
|
+
Tailwind thì màu / spacing token-name của Leaf luôn thắng khi trùng tên — đó là chủ đích; muốn
|
|
234
|
+
dùng scale riêng của app thì đặt tên khác hoặc gọi qua arbitrary value. `radius-*` cố ý khác
|
|
235
|
+
`rounded-*` để không đụng bo góc mặc định của Tailwind.
|
|
163
236
|
- Typography token hiện chỉ có **bộ Desktop**. Chưa có responsive type set, nên các style Display
|
|
164
237
|
cần app tự xử lý ở breakpoint nhỏ.
|
|
165
238
|
|
|
@@ -191,52 +264,86 @@ Thêm component React (khi thật sự cần state/behavior, không phải để
|
|
|
191
264
|
`src/components/<Tên>/` (kèm `<tên>.css` nếu cần) rồi re-export trong `src/index.ts`. CSS của
|
|
192
265
|
component cũng ra `dist/<tên>.css` và được gom vào `classes.css` / `styles.css` — nhớ thêm dòng
|
|
193
266
|
`"./<tên>.css"` vào `exports`. Tên file CSS phải duy nhất trong cả `src/` (script báo lỗi nếu trùng).
|
|
194
|
-
Component có hành vi (
|
|
195
|
-
`window.Leaf` qua `src/vanilla/index.ts`. `src/vanilla` chỉ
|
|
267
|
+
Component có hành vi (Tabs · Toggle · Dialog · Slider · Tooltip) cần thêm bản vanilla cho HTML
|
|
268
|
+
tĩnh trong `src/vanilla/` và gắn vào `window.Leaf` qua `src/vanilla/index.ts`. `src/vanilla` chỉ
|
|
269
|
+
vào bản CDN, không vào bản npm.
|
|
196
270
|
|
|
197
271
|
## Components
|
|
198
272
|
|
|
199
|
-
| Export
|
|
200
|
-
|
|
|
201
|
-
| `Button`
|
|
202
|
-
| `Tabs`
|
|
273
|
+
| Export | Mô tả |
|
|
274
|
+
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
275
|
+
| `Button` | Khung icon · label · icon — bật/tắt từng phần; `width` / `height`; `onClick` trả Promise → tự loading (spinner thay leading icon, khoá click), `loading` controlled |
|
|
276
|
+
| `Tabs` | Tabs Items — `items[]` (`value` · `label: ReactNode` · `disabled`); phím ← → Home End |
|
|
277
|
+
| `Dialog` | Panel + backdrop blur — `open` (controlled), `title` / `onBack` / `onClose(reason)`, `dismissible`, `closeLabel` / `backLabel`, `theme`, `maxWidth` / `maxHeight` |
|
|
278
|
+
| `Logo` | Wordmark FHSC · Finhay · FHC — `brand` / `mode` / `side` / `size` |
|
|
279
|
+
| `Skeleton` | Placeholder shimmer — `width` / `height` / `border` (radius), nền `--base-tertiary` |
|
|
280
|
+
| `Spinner` | Indicator 8 nan — `animation` (`spin` · `fade` · `pulse` · `breathe`), `size` |
|
|
281
|
+
| `Toggle` | Công tắc On/Off — `size` md/sm, `checked`, `disabled` (Figma Active Off); `name` / `value` → input ẩn cho form |
|
|
282
|
+
| `Slider` | Kéo từng `step` trong `min`–`max` (mặc định 0–100, bước 1) · mốc `steps` · `labels`; `name` → input ẩn |
|
|
283
|
+
| `Tooltip` | Hover/focus/Escape — `size`, `position`, `align`, `onOpenChange`; `trigger="click"`, `openDelay` / `closeDelay`, tự lật phía khi thiếu chỗ, `theme`; kèm `TooltipContent` |
|
|
203
284
|
|
|
204
285
|
```css
|
|
205
286
|
/* Ngoài tokens.css + typography.css, mỗi component cần CSS riêng của nó */
|
|
206
287
|
@import "@finhay-pro/leaf-design-system/button.css";
|
|
207
288
|
@import "@finhay-pro/leaf-design-system/tabs.css";
|
|
289
|
+
@import "@finhay-pro/leaf-design-system/dialog.css";
|
|
290
|
+
@import "@finhay-pro/leaf-design-system/logo.css";
|
|
291
|
+
@import "@finhay-pro/leaf-design-system/skeleton.css";
|
|
292
|
+
@import "@finhay-pro/leaf-design-system/spinner.css";
|
|
293
|
+
@import "@finhay-pro/leaf-design-system/toggle.css";
|
|
294
|
+
@import "@finhay-pro/leaf-design-system/slider.css";
|
|
295
|
+
@import "@finhay-pro/leaf-design-system/tooltip.css";
|
|
208
296
|
```
|
|
209
297
|
|
|
210
298
|
```tsx
|
|
211
|
-
import {
|
|
299
|
+
import {
|
|
300
|
+
Button,
|
|
301
|
+
Tabs,
|
|
302
|
+
Dialog,
|
|
303
|
+
Logo,
|
|
304
|
+
Skeleton,
|
|
305
|
+
Spinner,
|
|
306
|
+
Toggle,
|
|
307
|
+
Slider,
|
|
308
|
+
Tooltip,
|
|
309
|
+
} from "@finhay-pro/leaf-design-system";
|
|
212
310
|
|
|
213
311
|
<Button priority="primary" size="md" leadingIcon={<PlusIcon />} trailingIcon={<PlusIcon />}>
|
|
214
312
|
Label
|
|
215
313
|
</Button>
|
|
216
314
|
{/* Chỉ icon → layout tròn */}
|
|
217
315
|
<Button aria-label="Thêm" leadingIcon={<PlusIcon />} />
|
|
316
|
+
<Button size="md" leadingIcon={<Spinner size="md" />}>
|
|
317
|
+
Mua AAA
|
|
318
|
+
</Button>
|
|
319
|
+
|
|
320
|
+
<Skeleton height={48} border={12} />
|
|
218
321
|
|
|
219
|
-
<Tabs
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
322
|
+
<Tabs
|
|
323
|
+
variant="buy"
|
|
324
|
+
defaultValue="buy"
|
|
325
|
+
items={[
|
|
326
|
+
{ value: "buy", label: "Mua 1.2%" },
|
|
327
|
+
{ value: "idle", label: "Mua" },
|
|
328
|
+
]}
|
|
329
|
+
/>
|
|
224
330
|
```
|
|
225
331
|
|
|
226
332
|
## HTML tĩnh (CDN)
|
|
227
333
|
|
|
228
334
|
Cho landing page / trang dựng tay không có bundler. Giống Bootstrap: 1 `<link>` + 1 `<script>` là
|
|
229
|
-
dùng được toàn bộ class typography, color
|
|
335
|
+
dùng được toàn bộ class typography, color và mọi component (CSS). Script chỉ cần khi dùng hành vi
|
|
336
|
+
Tabs · Toggle · Dialog · Slider · Tooltip (`data-leaf-*`).
|
|
230
337
|
|
|
231
338
|
```html
|
|
232
|
-
<link rel="stylesheet" href="https://<cdn>/leaf-0.1.
|
|
233
|
-
<script src="https://<cdn>/leaf-0.1.
|
|
339
|
+
<link rel="stylesheet" href="https://<cdn>/leaf-0.1.3.min.css" />
|
|
340
|
+
<script src="https://<cdn>/leaf-0.1.3.min.js" defer></script>
|
|
234
341
|
```
|
|
235
342
|
|
|
236
|
-
| File | Nội dung
|
|
237
|
-
| ------------------------ |
|
|
238
|
-
| `leaf-<version>.min.css` | `styles.css` đã minify: token + typography + color + CSS của mọi component.
|
|
239
|
-
| `leaf-<version>.min.js` | Hành vi Tabs
|
|
343
|
+
| File | Nội dung |
|
|
344
|
+
| ------------------------ | -------------------------------------------------------------------------------------------- |
|
|
345
|
+
| `leaf-<version>.min.css` | `styles.css` đã minify: token + typography + color + CSS của mọi component. |
|
|
346
|
+
| `leaf-<version>.min.js` | Hành vi Tabs · Toggle · Dialog · Slider · Tooltip → `window.Leaf`. Trang CSS-only có thể bỏ. |
|
|
240
347
|
|
|
241
348
|
Link thật (do tool admin CDN trả về) nằm ở trang docs **Develop → Web**. Trang demo đủ mọi biến thể:
|
|
242
349
|
[`examples/static.html`](examples/static.html) (mở bằng `file://` sau khi build).
|
|
@@ -252,63 +359,62 @@ Không cần JS. Thiếu attribute nào thì lấy mặc định giống prop Re
|
|
|
252
359
|
| `data-status` | `normal` `destruction` | `normal` |
|
|
253
360
|
| `data-icon-only` | `true` — chỉ có icon → tròn, cần `aria-label` | — |
|
|
254
361
|
| `disabled` / `aria-disabled` | native / `"true"` | — |
|
|
362
|
+
| `data-loading` | `true` — `Leaf.button.setLoading` / `run` gắn | — |
|
|
255
363
|
|
|
256
364
|
```html
|
|
257
365
|
<button class="leaf-button">Tiếp tục</button>
|
|
258
366
|
<button class="leaf-button" data-priority="secondary" data-size="md">Secondary</button>
|
|
259
|
-
|
|
260
|
-
<button class="leaf-button" data-size="md">
|
|
261
|
-
<span class="leaf-button__icon" aria-hidden="true"><svg>…</svg></span>
|
|
262
|
-
<span class="leaf-button__label">Thêm</span>
|
|
263
|
-
</button>
|
|
264
|
-
|
|
265
|
-
<button class="leaf-button" data-icon-only="true" aria-label="Thêm">
|
|
266
|
-
<span class="leaf-button__icon" aria-hidden="true"><svg>…</svg></span>
|
|
267
|
-
</button>
|
|
268
367
|
```
|
|
269
368
|
|
|
369
|
+
Loading (cần `leaf.js`): `Leaf.button.run(el, promise)` bật loading tới khi promise settle,
|
|
370
|
+
`Leaf.button.setLoading(el, true | false)` tự bật / tắt — spinner thay leading icon, `aria-busy`,
|
|
371
|
+
khoá `min-width`, nút đang loading không nhận click (kể cả handler của trang).
|
|
372
|
+
|
|
270
373
|
### Tabs
|
|
271
374
|
|
|
272
|
-
Đánh dấu tablist bằng `data-leaf-tabs` (opt-in
|
|
273
|
-
bị `leaf.js` đụng vào). Variant / size đặt trên tablist; từng tab chỉ cần `aria-selected`.
|
|
375
|
+
Đánh dấu tablist bằng `data-leaf-tabs` (opt-in). `Leaf.tabs` · event `leaf:tabs-change`.
|
|
274
376
|
|
|
275
|
-
|
|
276
|
-
| ---------------- | ------------ | -------------------------------------------------- | ------------ |
|
|
277
|
-
| `data-leaf-tabs` | `.leaf-tabs` | (không giá trị) — bật hành vi của `leaf.js` | — |
|
|
278
|
-
| `data-variant` | `.leaf-tabs` | `subcontent` `title` `functional` `buy` `sell` | `subcontent` |
|
|
279
|
-
| `data-size` | `.leaf-tabs` | `xl` `lg` `md` `sm` (chỉ Subcontent đổi theo size) | `xl` |
|
|
280
|
-
| `data-value` | `.leaf-tab` | id của tab, trả về trong event | — |
|
|
281
|
-
| `aria-selected` | `.leaf-tab` | `"true"` cho tab chọn ban đầu | tab đầu tiên |
|
|
282
|
-
| `aria-controls` | `.leaf-tab` | id của panel → panel tự ẩn/hiện | — |
|
|
283
|
-
| `disabled` | `.leaf-tab` | native | — |
|
|
377
|
+
### Toggle
|
|
284
378
|
|
|
285
|
-
|
|
286
|
-
<div class="leaf-tabs" data-leaf-tabs data-variant="buy">
|
|
287
|
-
<button class="leaf-tab" data-value="buy" aria-selected="true" aria-controls="panel-buy">
|
|
288
|
-
<span class="leaf-tab__label">Mua</span>
|
|
289
|
-
<span class="leaf-tab__addon">1.2%</span>
|
|
290
|
-
</button>
|
|
291
|
-
<button class="leaf-tab" data-value="idle" aria-controls="panel-idle">Mua</button>
|
|
292
|
-
</div>
|
|
293
|
-
<section id="panel-buy">…</section>
|
|
294
|
-
<section id="panel-idle" hidden>…</section>
|
|
295
|
-
```
|
|
379
|
+
`data-leaf-toggle` trên `.leaf-toggle`. `Leaf.toggle.set` / `toggle` · `leaf:toggle-change`.
|
|
296
380
|
|
|
297
|
-
|
|
298
|
-
tự thêm `role` còn thiếu. Click đi qua event delegation nên nội dung chèn động vẫn chạy.
|
|
381
|
+
### Dialog
|
|
299
382
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
383
|
+
`data-leaf-dialog` trên `.leaf-dialog-backdrop`. Mở bằng `data-leaf-dialog-open="id"` hoặc
|
|
384
|
+
`Leaf.dialog.open`. Đóng: Escape / backdrop / `data-leaf-dialog-close` /
|
|
385
|
+
`Leaf.dialog.close(el, reason?)` — `leaf:dialog-close` mang `detail.reason`
|
|
386
|
+
(`close` · `backdrop` · `escape` · `api`). `data-leaf-dialog-dismissible="false"` tắt đóng bằng
|
|
387
|
+
backdrop / Escape. Back: `data-leaf-dialog-back` → `leaf:dialog-back` (không tự đóng). Khi mở, các
|
|
388
|
+
con khác của `<body>` được đặt `inert` — đặt dialog tĩnh là con trực tiếp của `<body>`.
|
|
305
389
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
390
|
+
### Slider
|
|
391
|
+
|
|
392
|
+
`data-leaf-slider` trên `.leaf-slider` + `data-min` / `data-max` / `data-step` / `data-value`
|
|
393
|
+
(mặc định 0 / 100 / 1 / min). `Leaf.slider.set(el, value)` · `leaf:slider-input` (liên tục khi kéo)
|
|
394
|
+
· `leaf:slider-change` (khi chốt). Sync `--leaf-slider-fill` (fill + thumb) / `data-state` mốc;
|
|
395
|
+
thiếu `.leaf-slider__thumb` thì leaf.js tự tạo. Có `input.leaf-slider__input[type=hidden]` trong
|
|
396
|
+
markup thì leaf.js ghi giá trị đã chốt vào đó (form). Toggle tương tự với
|
|
397
|
+
`input.leaf-toggle__input` — `disabled` khi Off, giống checkbox.
|
|
310
398
|
|
|
311
|
-
|
|
399
|
+
### Tooltip
|
|
400
|
+
|
|
401
|
+
Bubble tĩnh: `.leaf-tooltip` + `data-size` / `data-position` / `data-align` — không cần JS.
|
|
402
|
+
Hover/focus: `.leaf-tooltip-trigger` + `data-leaf-tooltip` + `data-content` (hoặc `data-tooltip`);
|
|
403
|
+
`data-leaf-tooltip-trigger="click"` để bấm mở/đóng, `data-focusable` khi trigger là icon thuần
|
|
404
|
+
(không có phần tử focus được — leaf.js gắn `tabindex` / `role="button"`), `data-open-delay` /
|
|
405
|
+
`data-close-delay` (ms), `data-flip="false"` tắt tự lật phía khi thiếu chỗ. Bubble kế thừa
|
|
406
|
+
`data-theme` của khối bọc trigger.
|
|
407
|
+
|
|
408
|
+
### Logo
|
|
409
|
+
|
|
410
|
+
Span rỗng `.leaf-logo` + `data-brand` / `data-mode` / `data-side` + `--leaf-logo-size`. CSS gắn
|
|
411
|
+
SVG data-URI — không cần JS. Bản CDN đã gộp sẵn data-URI; dùng qua npm thì import thêm
|
|
412
|
+
`logo-assets.css` (không nằm trong `classes.css` / `styles.css` vì component React không cần).
|
|
413
|
+
|
|
414
|
+
### Skeleton / Spinner
|
|
415
|
+
|
|
416
|
+
Chỉ CSS. Skeleton: `--leaf-skeleton-width` / `height` / `radius`. Spinner: `data-animation` /
|
|
417
|
+
`data-size` + SVG path; overlay = `.leaf-spinner-overlay` (app tự `hidden`/mount).
|
|
312
418
|
|
|
313
419
|
### Cần biết
|
|
314
420
|
|
|
@@ -319,6 +425,9 @@ Handler của trang gọi `event.preventDefault()` trong `click` thì tab không
|
|
|
319
425
|
`body { font-family: var(--font-sans) }`.
|
|
320
426
|
- **Trình duyệt tối thiểu** (CSS dùng `@layer`): Chrome / Edge 99+, Safari 15.4+, Firefox 97+.
|
|
321
427
|
- Dark là mặc định; `data-theme="light"` trên `<html>` để chuyển light.
|
|
428
|
+
- z-index của lớp phủ đọc `--leaf-z-dialog` (50) / `--leaf-z-spinner-overlay` (100) /
|
|
429
|
+
`--leaf-z-tooltip` (110) — override trên `:root` để chèn lớp của trang vào giữa.
|
|
430
|
+
- Chi tiết attribute / markup từng component: tab **Code → HTML tĩnh** trên docs.
|
|
322
431
|
|
|
323
432
|
### Phát hành bản CDN
|
|
324
433
|
|
|
@@ -331,12 +440,74 @@ Handler của trang gọi `event.preventDefault()` trong `click` thì tab không
|
|
|
331
440
|
|
|
332
441
|
## Changelog
|
|
333
442
|
|
|
334
|
-
###
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
443
|
+
### 0.1.3
|
|
444
|
+
|
|
445
|
+
**Breaking**
|
|
446
|
+
|
|
447
|
+
- `Loading` → `Spinner`: component, type, class `leaf-spinner` / `leaf-spinner__icon` /
|
|
448
|
+
`leaf-spinner-overlay`, biến `--leaf-spinner-*`, file `spinner.css`, docs `/components/spinner`.
|
|
449
|
+
Không giữ alias (CDN gắn version nên landing page cũ không vỡ).
|
|
450
|
+
- `onValueChange` / `onCheckedChange` / `onOpenChange` không gọi lại khi giá trị không đổi (bấm
|
|
451
|
+
tab đang chọn, phím → khi Slider đã ở max) — khớp bản vanilla vốn chỉ phát `leaf:*-change` khi
|
|
452
|
+
thật sự đổi. App nào dựa vào việc bắn lại (vd. bấm tab đang mở để refetch) cần tự xử lý.
|
|
453
|
+
- Slider: label nằm ngoài thứ tự Tab (slider chỉ có một điểm dừng, nhảy mốc bằng PageUp /
|
|
454
|
+
PageDown); mốc là `<span>` thay vì `<button>` — snippet HTML tĩnh đã đổi theo (markup cũ vẫn chạy).
|
|
455
|
+
- Tabs: `size` chỉ nhận khi `variant="subcontent"` (TypeScript chặn tổ hợp không có trong Figma).
|
|
456
|
+
- Dialog: `width` / `height` → `maxWidth` / `maxHeight` (CSS `--leaf-dialog-max-width` /
|
|
457
|
+
`--leaf-dialog-max-height`). Panel luôn `width: 100%` / `height: auto` trong trần đó — mobile
|
|
458
|
+
không bị cố định kích thước.
|
|
459
|
+
|
|
460
|
+
**Sửa lỗi**
|
|
461
|
+
|
|
462
|
+
- Dialog: bôi đen text trong panel rồi thả chuột ra nền không còn đóng nhầm (chỉ đóng khi
|
|
463
|
+
pointerdown cũng bắt đầu trên backdrop) — cả React lẫn leaf.js.
|
|
464
|
+
- Slider: `touch-action: none` chỉ còn trên track; title / labels cuộn trang được trên mobile.
|
|
465
|
+
- Tabs: tab nhận `tabindex="0"` đúng ngay trong HTML server (SSR), không đợi effect.
|
|
466
|
+
- Tooltip: không gắn / gỡ listener lại mỗi lần cha render.
|
|
467
|
+
|
|
468
|
+
**Mới**
|
|
469
|
+
|
|
470
|
+
- Test: Vitest + jsdom (`pnpm test`). Test parity chạy cùng một bộ assertion trên component React và
|
|
471
|
+
markup HTML tĩnh (sinh từ `renderToStaticMarkup` + `data-leaf-*`) do leaf.js điều khiển.
|
|
472
|
+
- Mọi component nhận `ref` (React 19, không cần `forwardRef`).
|
|
473
|
+
- Button: `onClick` trả Promise → tự loading (spinner thay leading icon, giữ label và màu priority,
|
|
474
|
+
`aria-busy`, khoá click, `min-width` giữ nút không nhảy) tới khi settle; `loading` controlled.
|
|
475
|
+
leaf.js: `Leaf.button.setLoading` / `run` / `isLoading`; nút đang loading không nhận click.
|
|
476
|
+
Cảnh báo dev khi icon-only thiếu `aria-label`.
|
|
477
|
+
- Dialog: `open` (controlled — đóng thì giữ DOM + `hidden`), `onClose(reason)`, `dismissible`,
|
|
478
|
+
`closeLabel` / `backLabel`, `title: ReactNode`, `theme`. leaf.js: `data-leaf-dialog-dismissible`,
|
|
479
|
+
`leaf:dialog-close` có `detail.reason`, `Leaf.dialog.close(el, reason)`.
|
|
480
|
+
- Tooltip: `trigger="click"`, `openDelay` / `closeDelay`, `focusable`, tự lật phía khi thiếu chỗ
|
|
481
|
+
(`flip`), `theme`. leaf.js: `data-leaf-tooltip-trigger`, `data-focusable`, `data-open-delay` /
|
|
482
|
+
`data-close-delay`, `data-flip`.
|
|
483
|
+
- Slider: root gắn `data-min` / `data-max` / `data-step` / `data-value` — cùng surface HTML tĩnh.
|
|
484
|
+
- Tabs: `label: ReactNode` (badge, icon).
|
|
485
|
+
- Toggle / Slider: `name` (+ `value` cho Toggle) → `<input type="hidden">` đi vào `FormData`; leaf.js
|
|
486
|
+
sync `input.leaf-toggle__input` / `input.leaf-slider__input` nếu có trong markup.
|
|
487
|
+
- Portal (Dialog, Tooltip, Spinner overlay) kế thừa `data-theme` của khối bọc chỗ dùng; khi dialog
|
|
488
|
+
mở, phần còn lại của `<body>` được `inert`; z-index qua `--leaf-z-dialog` /
|
|
489
|
+
`--leaf-z-spinner-overlay` / `--leaf-z-tooltip` (giá trị mặc định không đổi).
|
|
490
|
+
|
|
491
|
+
- Button: width/height prop; size MD/SM khớp Figma gap/padding; token
|
|
492
|
+
`--button-disabled-base|content` (alias `--button-*-disable`).
|
|
493
|
+
- Spacing: token `--spacing-*` (0…7xl) + class `p-*` / `m-*` / `gap-*` (Figma 34:1034).
|
|
494
|
+
- Border: token `--radius-*` (0…2xl) + class `radius-*` (Figma 700:4390).
|
|
495
|
+
- Dual-support HTML tĩnh: vanilla `Leaf.toggle` / `dialog` / `slider` / `tooltip` (`data-leaf-*`);
|
|
496
|
+
Logo CSS data-URI theo `data-brand` / `data-mode` / `data-side`; docs `htmlSection` +
|
|
497
|
+
`examples/static.html` cover đủ component.
|
|
498
|
+
- Skeleton: placeholder shimmer (`width` / `height` / `border`), nền `--base-tertiary`.
|
|
499
|
+
- Spinner: indicator 8 nan (loader-line), animation `spin` · `fade` · `pulse` · `breathe`; màu
|
|
500
|
+
mặc định trắng (dark) / đen (light) qua `--base-quinary`, overlay cũng vậy — không dùng highlight.
|
|
501
|
+
- Toggle: công tắc On/Off (Figma 730:12438) — size md/sm, checked, disabled.
|
|
502
|
+
- Slider: bước rời (Figma 730:12646) — title/unit, labels, activeColor.
|
|
503
|
+
- Tooltip: hover/focus (Figma 891:4983) — size/position/align + TooltipContent.
|
|
504
|
+
- Dialog / Logo: React component + CSS (Logo asset generate qua `embed-logo-assets.mjs`).
|
|
505
|
+
- Thêm bản CDN cho HTML tĩnh: `leaf-<version>.min.css` + `leaf-<version>.min.js` (`window.Leaf`).
|
|
338
506
|
- Button: typography của label chuyển vào `button.css`, component không còn gắn class
|
|
339
507
|
`body-*-highlight`. Thiếu `data-priority` / `data-size` / `data-status` → primary / lg / normal.
|
|
340
|
-
- Tabs: `
|
|
341
|
-
|
|
508
|
+
- Tabs: API `items[]` (không export `Tab`); label là string đầy đủ, bỏ slot `addon`;
|
|
509
|
+
`data-variant` / `data-size` chỉ đọc từ tablist; typography của label trong `tabs.css`.
|
|
510
|
+
- Tooltip: caret khớp SVG Figma (tam giác nhỏ giữa khung hit-area), không còn full-width.
|
|
511
|
+
- Slider: thumb min = `--text-primary`, Active = `--text-highlight`; click label nhảy mốc.
|
|
512
|
+
- Token: `--icon-on-color` (Figma Icon/icon-on-color) cho Toggle thumb On.
|
|
342
513
|
- Token: `--font-sans` có fallback khi không có `--font-inter` (trang ngoài Next.js).
|
package/dist/border.css
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
|
|
3
|
+
/* --- src/styles/border.css --- */
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Border radius classes — map 1:1 sang --radius-* trong @finhay/leaf-tokens
|
|
7
|
+
* (Figma 700:4390).
|
|
8
|
+
*
|
|
9
|
+
* Tên class `radius-*` (không dùng `rounded-*`) để không đụng utility bo góc mặc
|
|
10
|
+
* định của Tailwind (`rounded-xl`…). `border-*` đã dành cho màu viền.
|
|
11
|
+
*
|
|
12
|
+
* Hậu tố = bậc token: 0 · xs · s · m · l · xl · 2xl.
|
|
13
|
+
* Chỉ set border-radius — width / style / color do app tự lo.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@layer utilities {
|
|
17
|
+
.radius-0 {
|
|
18
|
+
border-radius: var(--radius-0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.radius-xs {
|
|
22
|
+
border-radius: var(--radius-xs);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.radius-s {
|
|
26
|
+
border-radius: var(--radius-s);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.radius-m {
|
|
30
|
+
border-radius: var(--radius-m);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.radius-l {
|
|
34
|
+
border-radius: var(--radius-l);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.radius-xl {
|
|
38
|
+
border-radius: var(--radius-xl);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.radius-2xl {
|
|
42
|
+
border-radius: var(--radius-2xl);
|
|
43
|
+
}
|
|
44
|
+
}
|