@finhay-pro/leaf-design-system 0.1.7 → 0.1.9
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 +384 -212
- package/dist/button.css +21 -13
- package/dist/calendar.css +325 -0
- package/dist/cdn/leaf-0.1.9.min.css +2 -0
- package/dist/cdn/leaf-0.1.9.min.js +2 -0
- package/dist/checkbox.css +132 -0
- package/dist/classes.css +2272 -3155
- package/dist/color.css +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +49 -0
- package/dist/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.js +167 -0
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/index.d.ts.map +1 -0
- package/dist/components/Calendar/index.js +2 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +25 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +40 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +62 -0
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/Dropdown/Dropdown.js +199 -0
- package/dist/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/components/Dropdown/LanguageDropdown.d.ts +15 -0
- package/dist/components/Dropdown/LanguageDropdown.d.ts.map +1 -0
- package/dist/components/Dropdown/LanguageDropdown.js +18 -0
- package/dist/components/Dropdown/LanguageDropdown.js.map +1 -0
- package/dist/components/Dropdown/index.d.ts +4 -0
- package/dist/components/Dropdown/index.d.ts.map +1 -0
- package/dist/components/Dropdown/index.js +5 -0
- package/dist/components/Dropdown/index.js.map +1 -0
- package/dist/components/Input/Input.d.ts +57 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Input/Input.js +78 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/InputDate.d.ts +65 -0
- package/dist/components/Input/InputDate.d.ts.map +1 -0
- package/dist/components/Input/InputDate.js +129 -0
- package/dist/components/Input/InputDate.js.map +1 -0
- package/dist/components/Input/InputOtp.d.ts +33 -0
- package/dist/components/Input/InputOtp.d.ts.map +1 -0
- package/dist/components/Input/InputOtp.js +96 -0
- package/dist/components/Input/InputOtp.js.map +1 -0
- package/dist/components/Input/InputStepper.d.ts +42 -0
- package/dist/components/Input/InputStepper.d.ts.map +1 -0
- package/dist/components/Input/InputStepper.js +86 -0
- package/dist/components/Input/InputStepper.js.map +1 -0
- package/dist/components/Input/index.d.ts +5 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +5 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/components/Logo/Logo.d.ts.map +1 -1
- package/dist/components/Logo/Logo.js +2 -2
- package/dist/components/Logo/Logo.js.map +1 -1
- package/dist/components/Radio/Radio.d.ts +39 -0
- package/dist/components/Radio/Radio.d.ts.map +1 -0
- package/dist/components/Radio/Radio.js +50 -0
- package/dist/components/Radio/Radio.js.map +1 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.d.ts.map +1 -0
- package/dist/components/Radio/index.js +2 -0
- package/dist/components/Radio/index.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Slider/Slider.js +9 -6
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +3 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Toast/Toast.d.ts +66 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/Toast.js +77 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Toggle/Toggle.d.ts +2 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +6 -3
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +13 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/core/calendar.d.ts +36 -0
- package/dist/core/calendar.d.ts.map +1 -0
- package/dist/core/calendar.js +65 -0
- package/dist/core/calendar.js.map +1 -0
- package/dist/core/dropdown.d.ts +66 -0
- package/dist/core/dropdown.d.ts.map +1 -0
- package/dist/core/dropdown.js +131 -0
- package/dist/core/dropdown.js.map +1 -0
- package/dist/core/language.d.ts +25 -0
- package/dist/core/language.d.ts.map +1 -0
- package/dist/core/language.js +17 -0
- package/dist/core/language.js.map +1 -0
- package/dist/core/otp.d.ts +30 -0
- package/dist/core/otp.d.ts.map +1 -0
- package/dist/core/otp.js +65 -0
- package/dist/core/otp.js.map +1 -0
- package/dist/core/stepper.d.ts +39 -0
- package/dist/core/stepper.d.ts.map +1 -0
- package/dist/core/stepper.js +109 -0
- package/dist/core/stepper.js.map +1 -0
- package/dist/core/toast.d.ts +67 -0
- package/dist/core/toast.d.ts.map +1 -0
- package/dist/core/toast.js +102 -0
- package/dist/core/toast.js.map +1 -0
- package/dist/core/tooltip.d.ts +4 -0
- package/dist/core/tooltip.d.ts.map +1 -1
- package/dist/core/tooltip.js.map +1 -1
- package/dist/dialog.css +42 -4
- package/dist/dropdown.css +303 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/input-date.css +49 -0
- package/dist/input-otp.css +76 -0
- package/dist/input-stepper.css +179 -0
- package/dist/input.css +218 -0
- package/dist/logo.css +7 -2
- package/dist/radio.css +124 -0
- package/dist/skeleton.css +4 -0
- package/dist/slider.css +36 -6
- package/dist/spinner.css +16 -2
- package/dist/styles.css +2272 -3191
- package/dist/tabs.css +15 -3
- package/dist/toast.css +234 -0
- package/dist/toggle.css +21 -9
- package/dist/tokens.css +0 -36
- package/dist/tooltip.css +17 -3
- package/package.json +10 -9
- package/dist/border.css +0 -182
- package/dist/cdn/leaf-0.1.7.min.css +0 -2
- package/dist/cdn/leaf-0.1.7.min.js +0 -2
- package/dist/flex.css +0 -229
- package/dist/grid.css +0 -533
- package/dist/overflow.css +0 -72
- package/dist/position.css +0 -140
- package/dist/sizing.css +0 -377
- package/dist/spacing.css +0 -906
- package/dist/text-layout.css +0 -219
package/README.md
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# @finhay-pro/leaf-design-system
|
|
2
2
|
|
|
3
|
-
Design system của Finhay
|
|
4
|
-
[`@finhay/leaf-tokens`](../tokens)
|
|
3
|
+
Design system của Finhay: **2 bộ token — Color và Typography** (CSS variables trong
|
|
4
|
+
[`@finhay/leaf-tokens`](../tokens)), **class typography / màu dùng sẵn** và **component** (React +
|
|
5
|
+
HTML tĩnh dùng chung markup). Màu và chữ luôn đọc từ token; spacing / radius / độ dày viền không
|
|
6
|
+
phải token của Leaf — component tự khai báo trong CSS của nó, app dùng Tailwind hoặc CSS của page.
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
class, nên dùng được ở mọi nơi (React, Next.js, Vue, HTML thuần, template của thư viện khác) mà
|
|
8
|
-
không phải bọc thêm một lớp component hay truyền props.
|
|
8
|
+
Leaf **không** có class layout / spacing / responsive. Phần đó thuộc về app, theo 2 cách dùng:
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
| Loại project | Leaf cung cấp | Layout · spacing · responsive · hover |
|
|
11
|
+
| ------------------- | ------------------------------------------ | ------------------------------------- |
|
|
12
|
+
| Next.js (có bundle) | Token + class typography / màu + component | **Tailwind CSS v4** |
|
|
13
|
+
| Landing page tĩnh | Bản CDN (1 `<link>` + 1 `<script>`) | **CSS riêng của page** |
|
|
14
|
+
|
|
15
|
+
Xem [Dùng với Next.js + Tailwind](#dùng-với-nextjs--tailwind) và [HTML tĩnh (CDN)](#html-tĩnh-cdn).
|
|
12
16
|
|
|
13
17
|
## Cài đặt
|
|
14
18
|
|
|
@@ -21,31 +25,32 @@ pnpm add @finhay-pro/leaf-design-system
|
|
|
21
25
|
Class chỉ đọc `var(--…)`, không tự khai báo giá trị — nên **luôn import `tokens.css` trước**, rồi
|
|
22
26
|
chọn phần class cần dùng.
|
|
23
27
|
|
|
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/
|
|
33
|
-
| `@finhay-pro/leaf-design-system/
|
|
34
|
-
| `@finhay-pro/leaf-design-system/
|
|
35
|
-
| `@finhay-pro/leaf-design-system/
|
|
36
|
-
| `@finhay-pro/leaf-design-system/
|
|
37
|
-
| `@finhay-pro/leaf-design-system/
|
|
38
|
-
| `@finhay-pro/leaf-design-system/
|
|
39
|
-
| `@finhay-pro/leaf-design-system/
|
|
40
|
-
| `@finhay-pro/leaf-design-system/
|
|
41
|
-
| `@finhay-pro/leaf-design-system/
|
|
42
|
-
| `@finhay-pro/leaf-design-system/
|
|
43
|
-
| `@finhay-pro/leaf-design-system/
|
|
44
|
-
| `@finhay-pro/leaf-design-system/
|
|
45
|
-
| `@finhay-pro/leaf-design-system/
|
|
46
|
-
| `@finhay-pro/leaf-design-system/
|
|
47
|
-
| `@finhay-pro/leaf-design-system/
|
|
48
|
-
| `@finhay-pro/leaf-design-system/
|
|
28
|
+
| Import | Nội dung |
|
|
29
|
+
| -------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
30
|
+
| `@finhay-pro/leaf-design-system/tokens.css` | Chỉ token (primitive + semantic màu + typography), không class. |
|
|
31
|
+
| `@finhay-pro/leaf-design-system/typography.css` | Chỉ class typography. |
|
|
32
|
+
| `@finhay-pro/leaf-design-system/color.css` | Chỉ class color. |
|
|
33
|
+
| `@finhay-pro/leaf-design-system/button.css` | Style của component `Button`. |
|
|
34
|
+
| `@finhay-pro/leaf-design-system/tabs.css` | Style của component `Tabs`. |
|
|
35
|
+
| `@finhay-pro/leaf-design-system/dialog.css` | Style của component `Dialog`. |
|
|
36
|
+
| `@finhay-pro/leaf-design-system/logo.css` | Style của component `Logo`. |
|
|
37
|
+
| `@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`. |
|
|
38
|
+
| `@finhay-pro/leaf-design-system/skeleton.css` | Style của component `Skeleton`. |
|
|
39
|
+
| `@finhay-pro/leaf-design-system/spinner.css` | Style của component `Spinner`. |
|
|
40
|
+
| `@finhay-pro/leaf-design-system/toggle.css` | Style của component `Toggle`. |
|
|
41
|
+
| `@finhay-pro/leaf-design-system/slider.css` | Style của component `Slider`. |
|
|
42
|
+
| `@finhay-pro/leaf-design-system/tooltip.css` | Style của component `Tooltip`. |
|
|
43
|
+
| `@finhay-pro/leaf-design-system/radio.css` | Style của component `Radio` / `RadioGroup`. |
|
|
44
|
+
| `@finhay-pro/leaf-design-system/checkbox.css` | Style của component `Checkbox`. |
|
|
45
|
+
| `@finhay-pro/leaf-design-system/input.css` | Style của component `Input` (field / inline, dùng chung cho `InputDate`). |
|
|
46
|
+
| `@finhay-pro/leaf-design-system/input-otp.css` | Style của component `InputOtp`. |
|
|
47
|
+
| `@finhay-pro/leaf-design-system/input-stepper.css` | Style của component `InputStepper`. |
|
|
48
|
+
| `@finhay-pro/leaf-design-system/calendar.css` | Style của component `Calendar` (cần kèm `button.css` + `color.css`). |
|
|
49
|
+
| `@finhay-pro/leaf-design-system/input-date.css` | Popover của `InputDate` (kèm `input.css` + `calendar.css` + `button.css` + `color.css`). |
|
|
50
|
+
| `@finhay-pro/leaf-design-system/toast.css` | Style của `Toaster` / `ToastContent`. |
|
|
51
|
+
| `@finhay-pro/leaf-design-system/dropdown.css` | Style của component `Dropdown`. |
|
|
52
|
+
| `@finhay-pro/leaf-design-system/classes.css` | Tất cả class + component, không token. |
|
|
53
|
+
| `@finhay-pro/leaf-design-system/styles.css` | Token + tất cả class + component. Một dòng là đủ. |
|
|
49
54
|
|
|
50
55
|
Import bằng CSS:
|
|
51
56
|
|
|
@@ -53,17 +58,9 @@ Import bằng CSS:
|
|
|
53
58
|
/* 1. Token — luôn đứng đầu */
|
|
54
59
|
@import "@finhay-pro/leaf-design-system/tokens.css";
|
|
55
60
|
|
|
56
|
-
/* 2.
|
|
61
|
+
/* 2. Class typography + màu */
|
|
57
62
|
@import "@finhay-pro/leaf-design-system/typography.css";
|
|
58
63
|
@import "@finhay-pro/leaf-design-system/color.css";
|
|
59
|
-
@import "@finhay-pro/leaf-design-system/spacing.css";
|
|
60
|
-
@import "@finhay-pro/leaf-design-system/border.css";
|
|
61
|
-
@import "@finhay-pro/leaf-design-system/flex.css";
|
|
62
|
-
@import "@finhay-pro/leaf-design-system/grid.css";
|
|
63
|
-
@import "@finhay-pro/leaf-design-system/sizing.css";
|
|
64
|
-
@import "@finhay-pro/leaf-design-system/overflow.css";
|
|
65
|
-
@import "@finhay-pro/leaf-design-system/position.css";
|
|
66
|
-
@import "@finhay-pro/leaf-design-system/text-layout.css";
|
|
67
64
|
|
|
68
65
|
/* 3. Component nào dùng thì import cái đó */
|
|
69
66
|
@import "@finhay-pro/leaf-design-system/button.css";
|
|
@@ -75,13 +72,67 @@ Import bằng CSS:
|
|
|
75
72
|
@import "@finhay-pro/leaf-design-system/toggle.css";
|
|
76
73
|
@import "@finhay-pro/leaf-design-system/slider.css";
|
|
77
74
|
@import "@finhay-pro/leaf-design-system/tooltip.css";
|
|
75
|
+
@import "@finhay-pro/leaf-design-system/radio.css";
|
|
76
|
+
@import "@finhay-pro/leaf-design-system/checkbox.css";
|
|
77
|
+
@import "@finhay-pro/leaf-design-system/input.css";
|
|
78
|
+
@import "@finhay-pro/leaf-design-system/input-otp.css";
|
|
79
|
+
@import "@finhay-pro/leaf-design-system/input-stepper.css";
|
|
80
|
+
@import "@finhay-pro/leaf-design-system/calendar.css";
|
|
81
|
+
@import "@finhay-pro/leaf-design-system/input-date.css";
|
|
82
|
+
@import "@finhay-pro/leaf-design-system/toast.css";
|
|
83
|
+
@import "@finhay-pro/leaf-design-system/dropdown.css";
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
Muốn gọn thì một dòng `@import "@finhay-pro/leaf-design-system/styles.css";` thay cho cả khối trên.
|
|
81
87
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
CSS của component **tự đủ** về layout (display, flex, gap, padding, radius, viền…): chỉ cần
|
|
89
|
+
`tokens.css` + `typography.css` + CSS của component là component hiển thị đúng. Riêng `Calendar`
|
|
90
|
+
gắn thêm class màu (`bg-secondary`, `border-tertiary`…) nên cần cả `color.css`. App đang giữ bộ màu
|
|
91
|
+
riêng có thể bỏ `color.css` (trừ khi dùng `Calendar`).
|
|
92
|
+
|
|
93
|
+
## Dùng với Next.js + Tailwind
|
|
94
|
+
|
|
95
|
+
Leaf lo token, typography, màu và component; Tailwind CSS v4 lo layout, spacing, radius, độ dày
|
|
96
|
+
viền, responsive và state (`hover:`, `md:`…). Cấu hình mẫu trong `globals.css` (site docs
|
|
97
|
+
`apps/docs` dùng đúng cấu hình này):
|
|
98
|
+
|
|
99
|
+
```css
|
|
100
|
+
@layer theme, base, components, utilities;
|
|
101
|
+
|
|
102
|
+
/* Leaf trước Tailwind utilities → class Tailwind override được class màu Leaf khi cần */
|
|
103
|
+
@import "@finhay-pro/leaf-design-system/styles.css";
|
|
104
|
+
@import "tailwindcss";
|
|
105
|
+
|
|
106
|
+
/* Màu và cỡ chữ chỉ lấy từ Leaf — tắt palette và thang font-size của Tailwind */
|
|
107
|
+
@theme {
|
|
108
|
+
--color-*: initial;
|
|
109
|
+
--text-*: initial;
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
import { Button } from "@finhay-pro/leaf-design-system";
|
|
115
|
+
|
|
116
|
+
<section className="bg-secondary border-quaternary flex flex-col gap-3 rounded-xl border p-4 md:p-6">
|
|
117
|
+
<h3 className="heading-3 text-primary">Tích luỹ</h3>
|
|
118
|
+
<p className="body-4 text-secondary hover:text-(color:--text-highlight)">Lợi nhuận 8.5%/năm</p>
|
|
119
|
+
<Button className="w-full md:w-auto">Đầu tư</Button>
|
|
120
|
+
</section>;
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
- Class typography / màu Leaf giữ nguyên tên (`body-3`, `text-secondary`, `bg-secondary`,
|
|
124
|
+
`border-quaternary`…). Giá trị lẻ dùng token qua cú pháp biến của Tailwind:
|
|
125
|
+
`bg-(--base-tertiary)`, `text-(color:--text-highlight)`.
|
|
126
|
+
- Spacing / radius / độ dày viền dùng thang của Tailwind (base 4px). Thang px theo Figma:
|
|
127
|
+
|
|
128
|
+
| Figma | px | Tailwind |
|
|
129
|
+
| ----------------- | -------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
130
|
+
| Spacing 2XS…7XL | 2 · 4 · 8 · 12 · 16 · 24 · 36 · 48 · 60 · 84 · 120 · 240 | `0.5` `1` `2` `3` `4` `6` `9` `12` `15` `21` `30` `60` (`p-4`, `gap-3`…) |
|
|
131
|
+
| Radius S/M/L/Full | 4 · 8 · 12 · full | `rounded-sm` / `rounded-lg` / `rounded-xl` / `rounded-full` |
|
|
132
|
+
| Border S/M/L/XL | 0.5 · 1 · 1.5 · 2 | `border-[0.5px]` / `border` / `border-[1.5px]` / `border-2` |
|
|
133
|
+
|
|
134
|
+
- Override CSS của component bằng `className` Tailwind: utility (`@layer utilities`) luôn thắng CSS
|
|
135
|
+
component (`@layer components`), không cần `!important`.
|
|
85
136
|
|
|
86
137
|
## Typography class
|
|
87
138
|
|
|
@@ -128,8 +179,8 @@ Trong React / Next.js, class đi thẳng vào `className` của bất kỳ eleme
|
|
|
128
179
|
```tsx
|
|
129
180
|
<h2 className="heading-2">Tài sản của bạn</h2>
|
|
130
181
|
|
|
131
|
-
// Class typography lo cỡ chữ, color lo màu
|
|
132
|
-
<p className="body-3 text-secondary mt-
|
|
182
|
+
// Class typography lo cỡ chữ, color lo màu; khoảng cách là của app (Tailwind `mt-2`)
|
|
183
|
+
<p className="body-3 text-secondary mt-2">Lợi nhuận kỳ vọng 8.5%/năm</p>
|
|
133
184
|
|
|
134
185
|
// Gắn vào component của thư viện khác cũng chỉ là một chuỗi class
|
|
135
186
|
<Link href="/tai-khoan" className="body-3-highlight">
|
|
@@ -154,7 +205,8 @@ viết thêm gì cho light mode.
|
|
|
154
205
|
| System (đủ 3 bộ) | `text-*`, `bg-*`, `border-*` với `red`, `green`, `yellow`, `orange`, `blue`, `purple` (+ `-secondary`) |
|
|
155
206
|
|
|
156
207
|
```html
|
|
157
|
-
|
|
208
|
+
<!-- Viền: class màu chỉ set border-color — độ dày / padding do app (Tailwind hoặc CSS của page) -->
|
|
209
|
+
<div class="bg-secondary border-quaternary card">
|
|
158
210
|
<h3 class="heading-3 text-primary">Tích luỹ</h3>
|
|
159
211
|
<p class="body-4 text-secondary">Lợi nhuận kỳ vọng 8.5%/năm</p>
|
|
160
212
|
<p class="body-4 text-red">Số dư không đủ</p>
|
|
@@ -164,122 +216,31 @@ viết thêm gì cho light mode.
|
|
|
164
216
|
<html data-theme="light"></html>
|
|
165
217
|
```
|
|
166
218
|
|
|
167
|
-
## Spacing class
|
|
168
|
-
|
|
169
|
-
Token `--spacing-*` (Figma Application) áp dụng cho **margin · padding · gap**. Tiền tố = thuộc
|
|
170
|
-
tính, hậu tố = bậc: `0` · `2xs` · `xs` · `s` · `m` · `l` · `xl` · `2xl` … `7xl`.
|
|
171
|
-
|
|
172
|
-
| Prefix | Property |
|
|
173
|
-
| -------------------------------- | -------------------------------------------- |
|
|
174
|
-
| `p-*` `px-*` `py-*` `pt/r/b/l-*` | padding / padding-inline / block / từng cạnh |
|
|
175
|
-
| `m-*` `mx-*` `my-*` `mt/r/b/l-*` | margin tương tự |
|
|
176
|
-
| `gap-*` `gap-x-*` `gap-y-*` | gap / column-gap / row-gap |
|
|
177
|
-
|
|
178
|
-
| Hậu tố | Token | px |
|
|
179
|
-
| ------ | --------------- | --- |
|
|
180
|
-
| `0` | `--spacing-0` | 0 |
|
|
181
|
-
| `2xs` | `--spacing-2xs` | 2 |
|
|
182
|
-
| `xs` | `--spacing-xs` | 4 |
|
|
183
|
-
| `s` | `--spacing-s` | 8 |
|
|
184
|
-
| `m` | `--spacing-m` | 12 |
|
|
185
|
-
| `l` | `--spacing-l` | 16 |
|
|
186
|
-
| `xl` | `--spacing-xl` | 24 |
|
|
187
|
-
| `2xl` | `--spacing-2xl` | 36 |
|
|
188
|
-
| `3xl` | `--spacing-3xl` | 48 |
|
|
189
|
-
| `4xl` | `--spacing-4xl` | 60 |
|
|
190
|
-
| `5xl` | `--spacing-5xl` | 84 |
|
|
191
|
-
| `6xl` | `--spacing-6xl` | 120 |
|
|
192
|
-
| `7xl` | `--spacing-7xl` | 240 |
|
|
193
|
-
|
|
194
|
-
```html
|
|
195
|
-
<div class="gap-m p-l flex flex-col">
|
|
196
|
-
<h3 class="heading-3">Danh mục</h3>
|
|
197
|
-
<p class="body-4 mt-s text-secondary">Cập nhật 5 phút trước</p>
|
|
198
|
-
</div>
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
## Border width & radius class
|
|
202
|
-
|
|
203
|
-
Token `--border-width-*` — độ dày viền 0.5 · 1 · 1.5 · 2 px. Class `border-s|m|l|xl` (và biến thể
|
|
204
|
-
cạnh) set width + `border-style: solid` để một class là thấy viền. Token `--radius-*` — bo góc
|
|
205
|
-
4 · 8 · 12 · full; class `radius-s|m|l|full`. Màu viền vẫn dùng `border-primary`… (hậu tố vai trò).
|
|
206
|
-
|
|
207
|
-
| Prefix | Property |
|
|
208
|
-
| --------------------------------------------------------------------------------- | ----------------------------------- |
|
|
209
|
-
| `border-s` / `border-m` / `border-l` / `border-xl` | border-width + border-style: solid |
|
|
210
|
-
| `border-top-s` / `border-right-s` / `border-bottom-s` / `border-left-s` (…m/l/xl) | width + style từng cạnh |
|
|
211
|
-
| `border-inline-s` / `border-block-s` (…m/l/xl) | border-inline / block width + style |
|
|
212
|
-
| `radius-s` / `radius-m` / `radius-l` / `radius-full` | border-radius |
|
|
213
|
-
|
|
214
|
-
| Hậu tố | Token | px |
|
|
215
|
-
| ------ | ------------------- | --- |
|
|
216
|
-
| `s` | `--border-width-s` | 0.5 |
|
|
217
|
-
| `m` | `--border-width-m` | 1 |
|
|
218
|
-
| `l` | `--border-width-l` | 1.5 |
|
|
219
|
-
| `xl` | `--border-width-xl` | 2 |
|
|
220
|
-
|
|
221
|
-
| Hậu tố | Token | Value |
|
|
222
|
-
| ------ | --------------- | ----- |
|
|
223
|
-
| `s` | `--radius-s` | 4px |
|
|
224
|
-
| `m` | `--radius-m` | 8px |
|
|
225
|
-
| `l` | `--radius-l` | 12px |
|
|
226
|
-
| `full` | `--radius-full` | full |
|
|
227
|
-
|
|
228
|
-
```html
|
|
229
|
-
<div class="bg-secondary border-quaternary radius-l p-l border-s">Card</div>
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## Layout class
|
|
233
|
-
|
|
234
|
-
Nằm trong `@layer components` để utility (layer cao hơn) thắng; SCSS module (ngoài layer)
|
|
235
|
-
luôn đè được. Leaf **không** có class responsive — media query viết trong SCSS module
|
|
236
|
-
của component/page. Size cố định (`w-80`…) cũng để app tự viết.
|
|
237
|
-
|
|
238
|
-
| Import | Nội dung chính |
|
|
239
|
-
| ----------------- | -------------------------------------------------------------------------- |
|
|
240
|
-
| `flex.css` | `flex`, hướng, wrap, grow/shrink/basis, `justify-*` / `items-*` / `self-*` |
|
|
241
|
-
| `grid.css` | `grid`, `grid-cols-*`, `col-span-*`, flow, place/justify-items/self |
|
|
242
|
-
| `sizing.css` | `w-*` / `h-*` keyword + phân số, `size-*`, min/max |
|
|
243
|
-
| `overflow.css` | `overflow` / `overflow-x` / `overflow-y` |
|
|
244
|
-
| `position.css` | position, inset, z-index scale |
|
|
245
|
-
| `text-layout.css` | căn chữ, truncate, line-clamp, whitespace, transform, decoration |
|
|
246
|
-
|
|
247
|
-
```html
|
|
248
|
-
<div class="gap-m p-l flex items-center justify-between">
|
|
249
|
-
<h3 class="heading-3">Danh mục</h3>
|
|
250
|
-
<span class="body-4 text-secondary truncate">Tên rất dài…</span>
|
|
251
|
-
</div>
|
|
252
|
-
|
|
253
|
-
<div class="gap-m grid grid-cols-3">
|
|
254
|
-
<div class="col-span-2">Chính</div>
|
|
255
|
-
<div>Phụ</div>
|
|
256
|
-
</div>
|
|
257
|
-
```
|
|
258
|
-
|
|
259
219
|
## Cần biết
|
|
260
220
|
|
|
261
221
|
- **Class typography chỉ set đúng 3 thuộc tính** (`font-size`, `line-height`, `font-weight`);
|
|
262
|
-
**class color chỉ set đúng 1** (`color` / `background-color` / `border-color`)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
- **
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
222
|
+
**class color chỉ set đúng 1** (`color` / `background-color` / `border-color`). Font family,
|
|
223
|
+
letter spacing… nằm ngoài phạm vi — app tự setup ở tầng global
|
|
224
|
+
(`body { font-family: var(--font-sans) }`, CSS reset…).
|
|
225
|
+
- **Leaf không có class layout / spacing / radius / border width / responsive.** Next.js dùng
|
|
226
|
+
Tailwind, landing page dùng CSS của page. Leaf cũng **không** có token spacing / radius / độ dày
|
|
227
|
+
viền — chỉ có token màu và typography.
|
|
228
|
+
- **Typography và CSS component nằm trong `@layer components`**; **class màu nằm trong
|
|
229
|
+
`@layer utilities`** (đè được CSS component, vd. `leaf-spinner text-highlight`). Utility của app
|
|
230
|
+
(Tailwind) và CSS không layer (CSS / SCSS module của app) đều override được, không cần
|
|
231
|
+
`!important`.
|
|
232
|
+
- **Mỗi file CSS mở đầu bằng `@layer theme, base, components, utilities;`** — trùng thứ tự layer của
|
|
233
|
+
Tailwind v4, nên import file theo thứ tự nào thì class màu vẫn đứng trên CSS component. Component
|
|
234
|
+
không trông vào CSS reset: tự reset `button`, tự xử lý `[hidden]`.
|
|
235
|
+
- **Class không có biến thể `hover:` / `focus:` / opacity** — nó là CSS thuần. Cần state thì dùng
|
|
236
|
+
Tailwind (`hover:text-(color:--text-highlight)`) hoặc CSS của page với cùng token.
|
|
275
237
|
- **Chỉ semantic token mới có class màu.** Primitive (`--neutral-500`, `--brand-300`…) là nguồn nội
|
|
276
|
-
bộ, dùng thẳng trong UI là mất khả năng đổi theme. Spacing / border-width là thang kích
|
|
277
|
-
định, không đổi theo theme.
|
|
238
|
+
bộ, dùng thẳng trong UI là mất khả năng đổi theme. Spacing / border-width / radius là thang kích
|
|
239
|
+
thước cố định, không đổi theo theme.
|
|
278
240
|
- **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ỹ
|
|
279
|
-
nếu load kèm CSS framework khác (Bootstrap cũng định nghĩa `.display-1`–`.display-6`).
|
|
280
|
-
|
|
281
|
-
của
|
|
282
|
-
(`border-primary`) — cùng tiền tố `border-` nhưng không trùng class.
|
|
241
|
+
nếu load kèm CSS framework khác (Bootstrap cũng định nghĩa `.display-1`–`.display-6`). Với
|
|
242
|
+
Tailwind v4: tắt palette (`--color-*: initial`) để `text-*` / `bg-*` / `border-*` chỉ còn class
|
|
243
|
+
màu của Leaf.
|
|
283
244
|
- Typography token hiện chỉ có **bộ Desktop**. Chưa có responsive type set, nên các style Display
|
|
284
245
|
cần app tự xử lý ở breakpoint nhỏ.
|
|
285
246
|
|
|
@@ -304,42 +265,56 @@ khi chạy docs: xoá `apps/docs/.next/dev` rồi chạy lại `pnpm dev`.
|
|
|
304
265
|
typography của label. Component React chỉ gắn attribute, không gắn class theo prop — nhờ vậy HTML
|
|
305
266
|
tĩnh viết cùng markup là ra cùng kết quả. Attribute thiếu → CSS lấy mặc định giống prop React.
|
|
306
267
|
|
|
307
|
-
|
|
308
|
-
|
|
268
|
+
**CSS component tự đủ**: layout (display / flex / grid / gap / padding / radius / viền…) nằm trong
|
|
269
|
+
`<tên>.css` của component; markup chỉ gắn class `leaf-*` (+ class typography / màu khi cần). Phần tử
|
|
270
|
+
nào CSS set `display` thì kèm rule `[hidden] { display: none }`.
|
|
271
|
+
|
|
272
|
+
Thêm bộ class mới (typography / màu): tạo `src/styles/<tên>.css` — script tự sinh `dist/<tên>.css`
|
|
273
|
+
và gom vào `classes.css` + `styles.css`; chỉ cần thêm một dòng `"./<tên>.css"` vào `exports` của
|
|
309
274
|
`package.json`.
|
|
310
275
|
Thêm component React (khi thật sự cần state/behavior, không phải để bọc style): tạo
|
|
311
276
|
`src/components/<Tên>/` (kèm `<tên>.css` nếu cần) rồi re-export trong `src/index.ts`. CSS của
|
|
312
277
|
component cũng ra `dist/<tên>.css` và được gom vào `classes.css` / `styles.css` — nhớ thêm dòng
|
|
313
278
|
`"./<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).
|
|
314
|
-
Component có hành vi (Tabs · Toggle · Dialog · Slider · Tooltip) cần thêm bản vanilla cho HTML
|
|
279
|
+
Component có hành vi (Button loading · Tabs · Toggle · Dialog · Slider · Tooltip · InputOtp · InputStepper · Toast · Dropdown) cần thêm bản vanilla cho HTML
|
|
315
280
|
tĩnh trong `src/vanilla/` và gắn vào `window.Leaf` qua `src/vanilla/index.ts`. `src/vanilla` chỉ
|
|
316
281
|
vào bản CDN, không vào bản npm.
|
|
317
282
|
|
|
318
283
|
## Components
|
|
319
284
|
|
|
320
|
-
| Export
|
|
321
|
-
|
|
|
322
|
-
| `Button`
|
|
323
|
-
| `Tabs`
|
|
324
|
-
| `Dialog`
|
|
325
|
-
| `Logo`
|
|
326
|
-
| `Skeleton`
|
|
327
|
-
| `Spinner`
|
|
328
|
-
| `Toggle`
|
|
329
|
-
| `Slider`
|
|
330
|
-
| `Tooltip`
|
|
285
|
+
| Export | Mô tả |
|
|
286
|
+
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
287
|
+
| `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 |
|
|
288
|
+
| `Tabs` | Tabs Items — `items[]` (`value` · `label: ReactNode` · `disabled`); phím ← → Home End |
|
|
289
|
+
| `Dialog` | Panel + backdrop blur — `open` (controlled), `title` / `onBack` / `onClose(reason)`, `dismissible`, `closeLabel` / `backLabel`, `theme`, `maxWidth` / `height` / `maxHeight` |
|
|
290
|
+
| `Logo` | Wordmark FHSC · Finhay · FHC — `brand` / `mode` / `side` / `size` |
|
|
291
|
+
| `Skeleton` | Placeholder shimmer — `width` / `height` / `border` (radius), nền `--base-tertiary` |
|
|
292
|
+
| `Spinner` | Indicator 8 nan — `animation` (`spin` · `fade` · `pulse` · `breathe`), `size` |
|
|
293
|
+
| `Toggle` | Công tắc On/Off — `size` md/sm, `checked`, `disabled` (Figma Active Off); `name` / `value` → input ẩn cho form |
|
|
294
|
+
| `Slider` | Kéo từng `step` trong `min`–`max` (mặc định 0–100, bước 1) · mốc `steps` · `labels`; `name` → input ẩn |
|
|
295
|
+
| `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` |
|
|
296
|
+
| `Radio` / `RadioGroup` | Radio đơn + nhóm — `value` / `defaultValue` / `onValueChange`, `name` cho form, `disabled`, `orientation` |
|
|
297
|
+
| `Checkbox` | Checkbox — `checked` / `defaultChecked` / `onCheckedChange` (`checked="indeterminate"` cho trạng thái lưng chừng), `label`, `disabled`; input native nên đi thẳng vào `FormData` |
|
|
298
|
+
| `Input` | Input dynamic — `variant` field/inline, `shape` default/pill, slot `label` · `leadingIcon` · `trailingIcon` · `action` · `message`, `invalid`, `revealPassword`; `as="button"` làm trigger |
|
|
299
|
+
| `InputOtp` | Ô OTP — `length`, `mask`, dán cả mã, `onComplete`; `name` → input ẩn |
|
|
300
|
+
| `InputStepper` | Nhập số với −/+ — `tone` buy/sell, `step` / `min` / `max` / `precision`, `locale`, `unit`; phím ↑ ↓, chốt khi blur/Enter |
|
|
301
|
+
| `Calendar` | Lịch tháng (port từ vnsc) — chọn ngày / giờ (`showTime`, `timeOnly`), `minDate` / `maxDate` / `disablePast` / `disableFuture` / `disableDate`, luật giờ (`minHour` / `maxHour` / `minuteStep`…), `weekStartsOn`, `labels`; dùng độc lập được |
|
|
302
|
+
| `InputDate` | `Input` trigger + popover `Calendar` — `value` chốt khi bấm "Chọn" (hoặc `confirmOnSelect`), `formatDisplay`, `align`, tự lật phía; `name` → input ẩn ISO |
|
|
303
|
+
| `Toaster` / `toast` | Toast success / error / warning — `toast.success(title, { description, duration })`, `duration: -1` không tự đóng, dừng khi hover / focus, `toast.dismiss(id)`; `<Toaster position closeLabel theme />` đặt một lần; kèm `ToastContent` |
|
|
304
|
+
| `Dropdown` | Chọn một giá trị — `variant` list / radio, `trigger` field / text, `appearance` filled / outlined, `size` md / sm, `openOn` click / hover, `align`, `readOnly`, `maxHeight`; option `leading` / `disabled`; phím ↑ ↓ Home End + typeahead |
|
|
305
|
+
| `LanguageDropdown` | Chọn ngôn ngữ Tiếng Việt / English kèm cờ (CDN Finhay) — danh sách ở `LEAF_LANGUAGES`, `value` kiểu `LeafLanguageCode`; mặc định `size="sm"`, `openOn="hover"`, `align="end"` |
|
|
331
306
|
|
|
332
307
|
```css
|
|
333
|
-
/* Ngoài tokens.css + typography.css, mỗi component cần CSS riêng của nó
|
|
308
|
+
/* Ngoài tokens.css + typography.css, mỗi component cần CSS riêng của nó
|
|
309
|
+
(bảng đầy đủ ở mục Import CSS) — hoặc một dòng styles.css cho tất cả */
|
|
334
310
|
@import "@finhay-pro/leaf-design-system/button.css";
|
|
335
311
|
@import "@finhay-pro/leaf-design-system/tabs.css";
|
|
336
312
|
@import "@finhay-pro/leaf-design-system/dialog.css";
|
|
337
|
-
@import "@finhay-pro/leaf-design-system/
|
|
338
|
-
@import "@finhay-pro/leaf-design-system/
|
|
339
|
-
@import "@finhay-pro/leaf-design-system/
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
@import "@finhay-pro/leaf-design-system/tooltip.css";
|
|
313
|
+
@import "@finhay-pro/leaf-design-system/toast.css";
|
|
314
|
+
@import "@finhay-pro/leaf-design-system/input.css";
|
|
315
|
+
@import "@finhay-pro/leaf-design-system/dropdown.css";
|
|
316
|
+
/* … skeleton / spinner / toggle / slider / tooltip / radio / checkbox / input-otp /
|
|
317
|
+
input-stepper / calendar / input-date / logo */
|
|
343
318
|
```
|
|
344
319
|
|
|
345
320
|
```tsx
|
|
@@ -353,14 +328,28 @@ import {
|
|
|
353
328
|
Toggle,
|
|
354
329
|
Slider,
|
|
355
330
|
Tooltip,
|
|
331
|
+
Radio,
|
|
332
|
+
RadioGroup,
|
|
333
|
+
Checkbox,
|
|
334
|
+
Input,
|
|
335
|
+
InputOtp,
|
|
336
|
+
InputStepper,
|
|
337
|
+
InputDate,
|
|
338
|
+
Calendar,
|
|
339
|
+
Dropdown,
|
|
340
|
+
LanguageDropdown,
|
|
341
|
+
Toaster,
|
|
342
|
+
toast,
|
|
356
343
|
} from "@finhay-pro/leaf-design-system";
|
|
357
344
|
|
|
358
345
|
<Button priority="primary" size="md" leadingIcon={<PlusIcon />} trailingIcon={<PlusIcon />}>
|
|
359
346
|
Label
|
|
360
347
|
</Button>
|
|
361
|
-
{/* Chỉ icon → layout tròn */}
|
|
348
|
+
{/* Chỉ icon → layout tròn, bắt buộc aria-label */}
|
|
362
349
|
<Button aria-label="Thêm" leadingIcon={<PlusIcon />} />
|
|
363
|
-
|
|
350
|
+
{/* Loading: onClick trả Promise (tự loading tới khi settle) hoặc controlled `loading` —
|
|
351
|
+
không tự nhét <Spinner> vào leadingIcon (Spinner ép màu --base-quinary, không theo màu nút) */}
|
|
352
|
+
<Button size="md" onClick={() => placeOrder()}>
|
|
364
353
|
Mua AAA
|
|
365
354
|
</Button>
|
|
366
355
|
|
|
@@ -374,30 +363,75 @@ import {
|
|
|
374
363
|
{ value: "idle", label: "Mua" },
|
|
375
364
|
]}
|
|
376
365
|
/>
|
|
366
|
+
|
|
367
|
+
{/* Toast: đặt <Toaster /> một lần ở root layout, gọi toast.* ở client */}
|
|
368
|
+
<Toaster />;
|
|
369
|
+
toast.success("Đặt lệnh thành công", { description: "Mua 100 AAA" });
|
|
377
370
|
```
|
|
378
371
|
|
|
379
372
|
## HTML tĩnh (CDN)
|
|
380
373
|
|
|
381
|
-
Cho landing page / trang dựng tay không có bundler
|
|
382
|
-
dùng được toàn bộ class typography, color và mọi component (CSS). Script chỉ cần
|
|
383
|
-
Tabs · Toggle · Dialog · Slider · Tooltip (`data-leaf-*`).
|
|
374
|
+
Cho landing page / trang dựng tay không có bundler: **Leaf CDN + CSS riêng của page**. 1 `<link>` +
|
|
375
|
+
1 `<script>` là dùng được toàn bộ class typography, color và mọi component (CSS). Script chỉ cần
|
|
376
|
+
khi dùng hành vi Button loading · Tabs · Toggle · Dialog · Slider · Tooltip · InputOtp · InputStepper · Toast · Dropdown (`data-leaf-*` / `window.Leaf`).
|
|
377
|
+
Calendar / InputDate chưa có bản HTML tĩnh (chỉ React).
|
|
378
|
+
Layout, spacing, responsive của page viết trong CSS của page, dùng token Leaf.
|
|
384
379
|
|
|
385
380
|
```html
|
|
386
|
-
<link rel="stylesheet" href="https://<cdn>/leaf-0.1.
|
|
387
|
-
<script src="https://<cdn>/leaf-0.1.
|
|
381
|
+
<link rel="stylesheet" href="https://<cdn>/leaf-0.1.9.min.css" />
|
|
382
|
+
<script src="https://<cdn>/leaf-0.1.9.min.js" defer></script>
|
|
383
|
+
|
|
384
|
+
<style>
|
|
385
|
+
/* CSS của page — bọc trong @layer để không đè nhầm CSS component (xem "Cần biết") */
|
|
386
|
+
@layer base {
|
|
387
|
+
body {
|
|
388
|
+
margin: 0;
|
|
389
|
+
font-family: var(--font-sans);
|
|
390
|
+
background: var(--base-primary);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
@layer page {
|
|
395
|
+
.hero {
|
|
396
|
+
display: flex;
|
|
397
|
+
flex-direction: column;
|
|
398
|
+
gap: 16px;
|
|
399
|
+
padding: 48px 16px;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
@media (min-width: 768px) {
|
|
403
|
+
.hero {
|
|
404
|
+
flex-direction: row;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
</style>
|
|
409
|
+
|
|
410
|
+
<section class="hero">
|
|
411
|
+
<h1 class="display-3 text-primary">Finhay</h1>
|
|
412
|
+
<button class="leaf-button" data-size="md">Mở tài khoản</button>
|
|
413
|
+
</section>
|
|
388
414
|
```
|
|
389
415
|
|
|
390
|
-
| File | Nội dung
|
|
391
|
-
| ------------------------ |
|
|
392
|
-
| `leaf-<version>.min.css` | `styles.css` đã minify: token + typography + color + CSS của mọi component.
|
|
393
|
-
| `leaf-<version>.min.js` | Hành vi Tabs · Toggle · Dialog · Slider · Tooltip → `window.Leaf`. Trang CSS-only có thể bỏ. |
|
|
416
|
+
| File | Nội dung |
|
|
417
|
+
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
418
|
+
| `leaf-<version>.min.css` | `styles.css` đã minify: token + typography + color + CSS của mọi component. |
|
|
419
|
+
| `leaf-<version>.min.js` | Hành vi Button loading · Tabs · Toggle · Dialog · Slider · Tooltip · InputOtp · InputStepper · Toast · Dropdown → `window.Leaf`. Trang CSS-only có thể bỏ. |
|
|
394
420
|
|
|
395
|
-
Link thật
|
|
421
|
+
Link thật nằm ở trang docs **Develop → Web** (`apps/docs/config/shared.ts` → `leafCdn`). Bản CDN
|
|
422
|
+
cũng nằm trong package npm (`dist/cdn/`), nên jsDelivr phục vụ trực tiếp theo version:
|
|
423
|
+
`https://cdn.jsdelivr.net/npm/@finhay-pro/leaf-design-system@<version>/dist/cdn/leaf-<version>.min.css`
|
|
424
|
+
(và `.min.js`). Trang demo đủ mọi component có bản HTML tĩnh:
|
|
396
425
|
[`examples/static.html`](examples/static.html) (mở bằng `file://` sau khi build).
|
|
397
426
|
|
|
427
|
+
`leaf.js` nạp bằng `defer` — code gọi `Leaf.*` ngay khi tải trang phải đặt trong
|
|
428
|
+
`document.addEventListener("DOMContentLoaded", …)` (handler click / event thì không cần).
|
|
429
|
+
|
|
398
430
|
### Button
|
|
399
431
|
|
|
400
|
-
Không cần JS. Thiếu attribute nào thì lấy mặc định giống prop React.
|
|
432
|
+
Không cần JS, trừ trạng thái loading. Thiếu attribute nào thì lấy mặc định giống prop React. Nút
|
|
433
|
+
có icon thì bọc chữ trong `span.leaf-button__label` — `Leaf.button.setLoading` dựa vào nó để biết
|
|
434
|
+
icon nào là leading. CTA điều hướng dùng được `<a class="leaf-button" href="…">`.
|
|
401
435
|
|
|
402
436
|
| Attribute | Giá trị | Mặc định |
|
|
403
437
|
| ---------------------------- | --------------------------------------------- | --------- |
|
|
@@ -409,18 +443,8 @@ Không cần JS. Thiếu attribute nào thì lấy mặc định giống prop Re
|
|
|
409
443
|
| `data-loading` | `true` — `Leaf.button.setLoading` / `run` gắn | — |
|
|
410
444
|
|
|
411
445
|
```html
|
|
412
|
-
<button
|
|
413
|
-
|
|
414
|
-
>
|
|
415
|
-
Tiếp tục
|
|
416
|
-
</button>
|
|
417
|
-
<button
|
|
418
|
-
class="leaf-button inline-flex items-center justify-center text-center whitespace-nowrap align-middle"
|
|
419
|
-
data-priority="secondary"
|
|
420
|
-
data-size="md"
|
|
421
|
-
>
|
|
422
|
-
Secondary
|
|
423
|
-
</button>
|
|
446
|
+
<button class="leaf-button">Tiếp tục</button>
|
|
447
|
+
<button class="leaf-button" data-priority="secondary" data-size="md">Secondary</button>
|
|
424
448
|
```
|
|
425
449
|
|
|
426
450
|
Loading (cần `leaf.js`): `Leaf.button.run(el, promise)` bật loading tới khi promise settle,
|
|
@@ -441,13 +465,16 @@ khoá `min-width`, nút đang loading không nhận click (kể cả handler c
|
|
|
441
465
|
`Leaf.dialog.open`. Đóng: Escape / backdrop / `data-leaf-dialog-close` /
|
|
442
466
|
`Leaf.dialog.close(el, reason?)` — `leaf:dialog-close` mang `detail.reason`
|
|
443
467
|
(`close` · `backdrop` · `escape` · `api`). `data-leaf-dialog-dismissible="false"` tắt đóng bằng
|
|
444
|
-
backdrop / Escape. Back: `data-leaf-dialog-back` → `leaf:dialog-back` (không tự
|
|
445
|
-
con khác của `<body>` được đặt `inert` — đặt dialog tĩnh là con trực tiếp của
|
|
468
|
+
backdrop / Escape (nút X vẫn đóng). Back: `data-leaf-dialog-back` → `leaf:dialog-back` (không tự
|
|
469
|
+
đóng). Khi mở, các con khác của `<body>` được đặt `inert` — đặt dialog tĩnh là **con trực tiếp của
|
|
470
|
+
`<body>`** và luôn bắt đầu bằng `hidden` (dialog hiện sẵn lúc load không được khoá cuộn / focus
|
|
471
|
+
trap / `inert`).
|
|
446
472
|
|
|
447
473
|
### Slider
|
|
448
474
|
|
|
449
475
|
`data-leaf-slider` trên `.leaf-slider` + `data-min` / `data-max` / `data-step` / `data-value`
|
|
450
|
-
(mặc định 0 / 100 / 1 / min).
|
|
476
|
+
(mặc định 0 / 100 / 1 / min). Slider tĩnh **cần leaf.js cả để hiển thị đúng**: vị trí mốc / label
|
|
477
|
+
và `--leaf-slider-fill` do leaf.js tính. `Leaf.slider.set(el, value)` · `leaf:slider-input` (liên tục khi kéo)
|
|
451
478
|
· `leaf:slider-change` (khi chốt). Sync `--leaf-slider-fill` (fill + thumb) / `data-state` mốc;
|
|
452
479
|
thiếu `.leaf-slider__thumb` thì leaf.js tự tạo. Có `input.leaf-slider__input[type=hidden]` trong
|
|
453
480
|
markup thì leaf.js ghi giá trị đã chốt vào đó (form). Toggle tương tự với
|
|
@@ -460,14 +487,57 @@ Hover/focus: `.leaf-tooltip-trigger` + `data-leaf-tooltip` + `data-content` (ho
|
|
|
460
487
|
`data-leaf-tooltip-trigger="click"` để bấm mở/đóng, `data-focusable` khi trigger là icon thuần
|
|
461
488
|
(không có phần tử focus được — leaf.js gắn `tabindex` / `role="button"`), `data-open-delay` /
|
|
462
489
|
`data-close-delay` (ms), `data-flip="false"` tắt tự lật phía khi thiếu chỗ. Bubble kế thừa
|
|
463
|
-
`data-theme` của khối bọc trigger.
|
|
490
|
+
`data-theme` của khối bọc trigger. leaf.js dựng bubble một lần ở lần hiện đầu tiên — đổi
|
|
491
|
+
`data-content` / `data-size` sau đó không có tác dụng (`data-position` / `data-align` / `data-flip`
|
|
492
|
+
thì đọc lại mỗi lần đặt vị trí). Bubble `pointer-events: none` — không đặt link / nút bên trong.
|
|
464
493
|
|
|
465
494
|
### Logo
|
|
466
495
|
|
|
467
496
|
Span rỗng `.leaf-logo` + `data-brand` / `data-mode` / `data-side` + `--leaf-logo-size`. CSS gắn
|
|
468
|
-
SVG data-URI — không cần JS.
|
|
497
|
+
SVG data-URI — không cần JS. Khác React, HTML tĩnh **không có mặc định**: wordmark phải đủ cả ba
|
|
498
|
+
attribute, và span phải rỗng tuyệt đối (`:empty` — không có khoảng trắng bên trong), thiếu là ra ô
|
|
499
|
+
trống. `data-mode` theo nền phía sau (`dark` = nền tối), không tự đổi theo `data-theme`. Bản CDN đã gộp sẵn data-URI; dùng qua npm thì import thêm
|
|
469
500
|
`logo-assets.css` (không nằm trong `classes.css` / `styles.css` vì component React không cần).
|
|
470
501
|
|
|
502
|
+
### Radio / Checkbox / Input
|
|
503
|
+
|
|
504
|
+
Chỉ CSS — markup như tab **Code → HTML tĩnh**. Input đọc `data-variant` / `data-shape` /
|
|
505
|
+
`data-invalid` / `data-disabled` / `data-filled` trên `.leaf-input`. Không có JS nào tự set
|
|
506
|
+
`data-filled` (label đổi màu khi có giá trị) hay ẩn/hiện mật khẩu ở HTML tĩnh — cần thì trang tự
|
|
507
|
+
viết. Checkbox là một `<label>` bọc cả hàng: không đặt link bên trong.
|
|
508
|
+
|
|
509
|
+
### InputOtp
|
|
510
|
+
|
|
511
|
+
`data-leaf-input-otp` trên `.leaf-input-otp` (các ô `.leaf-input-otp__cell`). leaf.js lo nhảy ô,
|
|
512
|
+
dán, Backspace; `Leaf.inputOtp.set` / `get` · `leaf:input-otp-change` · `leaf:input-otp-complete`.
|
|
513
|
+
Có `input[type=hidden]` trong markup thì leaf.js ghi mã vào đó.
|
|
514
|
+
|
|
515
|
+
### InputStepper
|
|
516
|
+
|
|
517
|
+
`data-leaf-input-stepper` trên `.leaf-input-stepper` + `data-step` / `data-precision` /
|
|
518
|
+
`data-locale`; min / max đọc từ `aria-valuemin` / `aria-valuemax` của input. Nút `data-action="decrement|increment"`.
|
|
519
|
+
`Leaf.inputStepper.set` / `get` · `leaf:input-stepper-change`.
|
|
520
|
+
|
|
521
|
+
### Toast
|
|
522
|
+
|
|
523
|
+
`Leaf.toast.success | error | warning(title, { description, duration, id })` (hoặc
|
|
524
|
+
`Leaf.toast.show({ status, title, … })`) trả id; `Leaf.toast.dismiss(id?)` đóng (không truyền → đóng
|
|
525
|
+
hết); `Leaf.toast.configure({ position, closeLabel, label, theme })`. Vùng chứa
|
|
526
|
+
`.leaf-toaster[data-leaf-toaster]` có sẵn trong trang thì dùng, không thì leaf.js tự tạo. Toast viết
|
|
527
|
+
tay: `.leaf-toast[data-leaf-toast]` + `data-status` — nút `.leaf-toast__close` và thanh progress
|
|
528
|
+
chạy hết đều đóng toast. Event `leaf:toast-show` / `leaf:toast-dismiss`.
|
|
529
|
+
|
|
530
|
+
### Dropdown
|
|
531
|
+
|
|
532
|
+
`data-leaf-dropdown` trên `.leaf-dropdown` (markup như tab **Code → HTML tĩnh**) + `data-variant` /
|
|
533
|
+
`data-trigger` / `data-appearance` / `data-size` / `data-align`; `data-open-on="hover"` để rê chuột
|
|
534
|
+
mở. CSS không suy trigger từ variant: `data-variant="radio"` cần kèm `data-trigger="text"` mới
|
|
535
|
+
giống React. Trigger `filled` có nền `--base-secondary` — đặt trên card `bg-secondary` thì dùng
|
|
536
|
+
`data-appearance="outlined"`. Option `.leaf-dropdown__option[data-value]`, mục chọn `aria-selected="true"`, disabled
|
|
537
|
+
`aria-disabled="true"`. `Leaf.dropdown.open` / `close` / `select(el, value)` ·
|
|
538
|
+
`leaf:dropdown-change`. Có `input.leaf-dropdown__input` thì leaf.js ghi value vào đó. Panel nằm ngay
|
|
539
|
+
dưới trigger (không portal) — tránh đặt trong khung `overflow: hidden / auto` thấp hơn panel.
|
|
540
|
+
|
|
471
541
|
### Skeleton / Spinner
|
|
472
542
|
|
|
473
543
|
Chỉ CSS. Skeleton: `--leaf-skeleton-width` / `height` / `radius`. Spinner: `data-animation` /
|
|
@@ -483,11 +553,15 @@ Chỉ CSS. Skeleton: `--leaf-skeleton-width` / `height` / `radius`. Spinner: `da
|
|
|
483
553
|
- **CSS của trang phải nằm trong `@layer` nếu đụng vào element của component.** Style component
|
|
484
554
|
nằm trong `@layer components`, mà CSS không layer luôn thắng CSS có layer bất kể specificity —
|
|
485
555
|
reset kiểu `* { padding: 0 }` hay `button { background: none }` đặt trần sẽ xoá padding / nền
|
|
486
|
-
của `.leaf-button`. Bọc reset trong `@layer base { … }
|
|
556
|
+
của `.leaf-button`. Bọc reset trong `@layer base { … }`, layout của page trong một layer riêng
|
|
557
|
+
(vd. `@layer page`, khai báo sau `utilities` nếu muốn đè cả class màu).
|
|
558
|
+
- **Leaf không có class layout / spacing** (`flex`, `gap-*`, `p-*`… đã bỏ từ 0.1.8). Markup component
|
|
559
|
+
chỉ cần class `leaf-*` (+ typography / màu); markup cũ còn class layout vẫn hiển thị y hệt — các
|
|
560
|
+
class đó giờ không có tác dụng.
|
|
487
561
|
- **Trình duyệt tối thiểu** (CSS dùng `@layer`): Chrome / Edge 99+, Safari 15.4+, Firefox 97+.
|
|
488
562
|
- Dark là mặc định; `data-theme="light"` trên `<html>` để chuyển light.
|
|
489
|
-
- z-index của lớp phủ đọc `--leaf-z-
|
|
490
|
-
`--leaf-z-tooltip` (110) — override trên `:root` để chèn lớp của trang vào giữa.
|
|
563
|
+
- z-index của lớp phủ đọc `--leaf-z-dropdown` (30) / `--leaf-z-dialog` (50) /
|
|
564
|
+
`--leaf-z-spinner-overlay` (100) / `--leaf-z-tooltip` (110) / `--leaf-z-toast` (120) — override trên `:root` để chèn lớp của trang vào giữa.
|
|
491
565
|
- Chi tiết attribute / markup từng component: tab **Code → HTML tĩnh** trên docs.
|
|
492
566
|
|
|
493
567
|
### Phát hành bản CDN
|
|
@@ -502,6 +576,104 @@ Chỉ CSS. Skeleton: `--leaf-skeleton-width` / `height` / `radius`. Spinner: `da
|
|
|
502
576
|
|
|
503
577
|
## Changelog
|
|
504
578
|
|
|
579
|
+
### 0.1.9
|
|
580
|
+
|
|
581
|
+
**Thay đổi hành vi** (kiểm tra nếu app đang dựa vào hành vi cũ)
|
|
582
|
+
|
|
583
|
+
- `Dropdown` disabled: input ẩn (`name`) cũng `disabled` → **không còn gửi giá trị** trong
|
|
584
|
+
`FormData`, giống input native. React đổi ngay; leaf.js đồng bộ theo trigger `disabled` lúc
|
|
585
|
+
`init`.
|
|
586
|
+
- `Slider`: `aria-label` / `aria-labelledby` truyền vào `<Slider>` chuyển từ div gốc xuống control
|
|
587
|
+
`role="slider"` (trước đây control không có tên khi không có `title`). Có cả `title` lẫn
|
|
588
|
+
`aria-label` thì `aria-label` thắng.
|
|
589
|
+
- `Slider`: `style` của app giờ thắng biến lấy từ prop (`--leaf-slider-active` / `-mark` /
|
|
590
|
+
`-mark-active`); `--leaf-slider-fill` vẫn do component tính.
|
|
591
|
+
|
|
592
|
+
**Sửa lỗi**
|
|
593
|
+
|
|
594
|
+
- `Dropdown` (React): `aria-describedby` gắn lên trigger (combobox) thay vì div gốc — nối được text
|
|
595
|
+
lỗi với ô chọn.
|
|
596
|
+
- `Toggle`: `aria-disabled="true"` ra giao diện disabled (`toggle.css` đọc thêm
|
|
597
|
+
`[aria-disabled="true"]`) và React chặn đổi trạng thái như leaf.js; nút vẫn focus được.
|
|
598
|
+
- `InputDate`: `onValueChange` khai báo đúng `(value: Date) => void` (chưa bao giờ nhận `null`;
|
|
599
|
+
handler kiểu `(value: Date | null) => void` vẫn tương thích). Prop còn lại của `<button>`
|
|
600
|
+
(`aria-label`, `aria-labelledby`, `onBlur`, `onFocus`, `data-*`…) đi xuống nút trigger; `onClick`
|
|
601
|
+
của app chạy trước, `preventDefault()` thì không mở popover.
|
|
602
|
+
|
|
603
|
+
**Docs**
|
|
604
|
+
|
|
605
|
+
- Sửa tên token trong bảng docs (`$bg-*` → `$base-*` — biến thật là `--base-*`), snippet HTML gọi
|
|
606
|
+
`Leaf.*` trước khi leaf.js (`defer`) nạp xong, id không tồn tại trong markup (Checkbox, Dropdown,
|
|
607
|
+
Tabs, Tooltip), mô tả `position` của Tooltip, `data-filled` của Input, phụ thuộc `color.css` của
|
|
608
|
+
Calendar / InputDate, Spinner lồng trong Button (dùng `loading`).
|
|
609
|
+
- Ghi rõ: Button đang loading mang màu disabled (tạm khoá, có chủ đích); Dialog tĩnh phải là con
|
|
610
|
+
trực tiếp của `<body>` và bắt đầu bằng `hidden`; Logo tĩnh bắt buộc đủ `data-brand` /
|
|
611
|
+
`data-mode` / `data-side`; Slider tĩnh cần leaf.js để hiển thị đúng; khác biệt API Toast React ↔
|
|
612
|
+
leaf.js; link CDN dự phòng qua jsDelivr.
|
|
613
|
+
- `examples/static.html` đủ mọi component có bản HTML tĩnh (thêm Radio, Checkbox, Input, InputOtp,
|
|
614
|
+
InputStepper, Dropdown, Toast).
|
|
615
|
+
- Thêm Claude skill `skills/leaf-design-system` (dựng UI bằng Leaf + Tailwind cho Next.js / React /
|
|
616
|
+
landing page).
|
|
617
|
+
|
|
618
|
+
### 0.1.8
|
|
619
|
+
|
|
620
|
+
**Breaking**
|
|
621
|
+
|
|
622
|
+
- Bỏ class layout / spacing / border width / radius khỏi Leaf: xoá `spacing.css`, `border.css`,
|
|
623
|
+
`flex.css`, `grid.css`, `sizing.css`, `overflow.css`, `position.css`, `text-layout.css` (cả
|
|
624
|
+
export npm lẫn trong `classes.css` / `styles.css` / CDN). Next.js dùng Tailwind (xem
|
|
625
|
+
[Dùng với Next.js + Tailwind](#dùng-với-nextjs--tailwind)), landing page dùng CSS của page. Trang
|
|
626
|
+
dựng layout bằng các class này (`flex`, `gap-m`, `p-l`, `radius-l`…) phải giữ link CDN 0.1.7 hoặc
|
|
627
|
+
chuyển sang CSS riêng trước khi lên 0.1.8.
|
|
628
|
+
- Bỏ token `--spacing-*`, `--border-width-*`, `--radius-*` (file `spacing.css` / `border.css` của
|
|
629
|
+
`@finhay/leaf-tokens`). Leaf chỉ còn 2 bộ token: **Color** và **Typography**. CSS component khai
|
|
630
|
+
báo giá trị px trực tiếp (giá trị không đổi); app đang đọc các biến này phải tự khai báo lại hoặc
|
|
631
|
+
chuyển sang Tailwind.
|
|
632
|
+
|
|
633
|
+
**Thay đổi**
|
|
634
|
+
|
|
635
|
+
- CSS component tự đủ trở lại: layout nằm trong `<component>.css`, markup React / leaf.js chỉ gắn
|
|
636
|
+
class `leaf-*` (+ typography / màu). Import riêng `tokens.css` + `typography.css` +
|
|
637
|
+
`<component>.css` là đủ (`Calendar` cần thêm `color.css`). Giao diện không đổi; markup HTML tĩnh
|
|
638
|
+
cũ (còn class layout) vẫn hiển thị y hệt.
|
|
639
|
+
- `Calendar`: thêm class BEM cho các khối trước đây chỉ có class layout (`__heading`,
|
|
640
|
+
`__months-header`, `__months-grid`, `__weekdays`, `__weekday`, `__time-group`, `__select-wrap`,
|
|
641
|
+
`__footer`).
|
|
642
|
+
- `Dialog`: truncate của title nằm trong `dialog.css` (`.leaf-dialog__start > h2 | p`) — markup
|
|
643
|
+
không cần class `min-w-0 truncate`.
|
|
644
|
+
- Docs: dùng Leaf + Tailwind v4 (bỏ SCSS module); bỏ trang Spacing, Border, Flex, Grid, Sizing,
|
|
645
|
+
Overflow, Position, Text.
|
|
646
|
+
|
|
647
|
+
**Mới**
|
|
648
|
+
|
|
649
|
+
- `Toaster` / `toast` / `ToastContent` — toast success · error · warning (port từ vnsc). Màu từ
|
|
650
|
+
token có sẵn: nền `--system-green|red|yellow-secondary`, viền / icon / progress
|
|
651
|
+
`--text-highlight` · `--system-red` · `--system-yellow`. Toast gắn `data-theme="dark"` mặc định
|
|
652
|
+
(nền thang 800 ở cả hai theme). Tự đóng sau `duration` (mặc định 4000ms, `-1` không tự đóng), dừng
|
|
653
|
+
khi hover / focus. CSS `toast.css`; leaf.js `Leaf.toast`.
|
|
654
|
+
- `Dropdown` — chọn một giá trị, gom các dropdown của vnsc: `variant="radio"` (dropdown kèm radio ở
|
|
655
|
+
màn thị trường) và `variant="list"` (SubAccounts, chọn lệnh) với trigger `field` filled / outlined,
|
|
656
|
+
size md / sm, `readOnly`, `openOn="hover"`. Bàn phím theo WAI-ARIA select-only combobox. CSS
|
|
657
|
+
`dropdown.css`; leaf.js `data-leaf-dropdown` / `Leaf.dropdown`.
|
|
658
|
+
- `LanguageDropdown` — Tiếng Việt / English kèm cờ từ CDN Finhay (`.leaf-dropdown__flag`). Danh sách
|
|
659
|
+
ngôn ngữ nằm ở `LEAF_LANGUAGES`; thêm ngôn ngữ mới thì bổ sung trong Leaf.
|
|
660
|
+
- Docs: `/components/dropdown`, `/components/toast`.
|
|
661
|
+
- `Radio` / `RadioGroup` (Figma 1146:2081) và `Checkbox` (Figma 891:10191) — input native, đi
|
|
662
|
+
thẳng vào `FormData`. CSS: `radio.css`, `checkbox.css`.
|
|
663
|
+
- Họ Input (Figma 1146:2159), export chung từ `components/Input`:
|
|
664
|
+
- `Input` — field dynamic: bật/tắt từng slot label · icon · action · message; variant
|
|
665
|
+
field / inline, shape pill, `revealPassword`, `as="button"` làm trigger. CSS `input.css`.
|
|
666
|
+
- `InputOtp` — nhảy ô, dán cả mã, `mask`, `onComplete`. CSS `input-otp.css`; leaf.js
|
|
667
|
+
`data-leaf-input-otp` / `Leaf.inputOtp`.
|
|
668
|
+
- `InputStepper` — −/+ tone buy / sell, `step` / `min` / `max` / `precision`, format theo
|
|
669
|
+
`locale`. CSS `input-stepper.css`; leaf.js `data-leaf-input-stepper` / `Leaf.inputStepper`.
|
|
670
|
+
- `InputDate` — `Input` + popover `Calendar`, chốt khi bấm "Chọn". CSS `input-date.css` (cần
|
|
671
|
+
kèm `input.css` + `calendar.css` + `button.css`).
|
|
672
|
+
- `Calendar` — port từ vnsc, chọn ngày / giờ, dùng độc lập được. CSS `calendar.css` (footer
|
|
673
|
+
dùng `Button` → cần `button.css`).
|
|
674
|
+
- Docs: `/components/radio`, `/components/checkbox`, `/components/input` (đủ 4 dạng, React + HTML
|
|
675
|
+
tĩnh), `/components/calendar`.
|
|
676
|
+
|
|
505
677
|
### 0.1.7
|
|
506
678
|
|
|
507
679
|
**Breaking**
|