@finhay-pro/leaf-design-system 0.1.5 → 0.1.7
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 +197 -73
- package/dist/border.css +155 -17
- package/dist/button.css +11 -10
- package/dist/cdn/leaf-0.1.7.min.css +2 -0
- package/dist/cdn/leaf-0.1.7.min.js +2 -0
- package/dist/classes.css +1915 -238
- package/dist/color.css +28 -32
- 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/Dialog/Dialog.d.ts +10 -2
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +3 -2
- package/dist/components/Dialog/Dialog.js.map +1 -1
- 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/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- 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/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/Toggle/Toggle.js.map +1 -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/dialog.css +19 -38
- package/dist/flex.css +229 -0
- package/dist/grid.css +533 -0
- package/dist/logo-assets.css +1 -0
- package/dist/logo.css +7 -6
- package/dist/overflow.css +72 -0
- package/dist/position.css +140 -0
- package/dist/sizing.css +377 -0
- package/dist/skeleton.css +1 -4
- package/dist/slider.css +8 -30
- package/dist/spacing.css +72 -4
- package/dist/spinner.css +4 -16
- package/dist/styles.css +1926 -246
- package/dist/tabs.css +9 -12
- package/dist/text-layout.css +219 -0
- package/dist/toggle.css +6 -8
- package/dist/tokens.css +12 -8
- package/dist/tooltip.css +4 -15
- package/dist/typography.css +2 -3
- package/package.json +7 -1
- package/dist/cdn/leaf-0.1.5.min.css +0 -2
- package/dist/cdn/leaf-0.1.5.min.js +0 -2
package/dist/tabs.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
2
3
|
|
|
3
4
|
/* --- src/components/Tabs/tabs.css --- */
|
|
4
5
|
|
|
@@ -27,10 +28,7 @@
|
|
|
27
28
|
--leaf-tab-line-height: var(--body-3-line-height);
|
|
28
29
|
--leaf-tab-font-weight: var(--body-3-highlight-weight);
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
flex-wrap: wrap;
|
|
32
|
-
align-items: center;
|
|
33
|
-
gap: 12px;
|
|
31
|
+
/* flex / wrap / items / gap-m — class Leaf trên markup */
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
.leaf-tabs[data-size="lg"] {
|
|
@@ -58,9 +56,6 @@
|
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
.leaf-tab {
|
|
61
|
-
display: inline-flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: center;
|
|
64
59
|
border: none;
|
|
65
60
|
margin: 0;
|
|
66
61
|
padding: 0;
|
|
@@ -69,9 +64,14 @@
|
|
|
69
64
|
color: inherit;
|
|
70
65
|
font: inherit;
|
|
71
66
|
font-family: var(--font-sans);
|
|
72
|
-
text-align: center;
|
|
73
|
-
white-space: nowrap;
|
|
74
67
|
box-sizing: border-box;
|
|
68
|
+
appearance: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
|
|
72
|
+
.leaf-tabs[hidden],
|
|
73
|
+
.leaf-tab[hidden] {
|
|
74
|
+
display: none;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.leaf-tab:disabled,
|
|
@@ -80,9 +80,6 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.leaf-tab__label {
|
|
83
|
-
display: inline-flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
justify-content: center;
|
|
86
83
|
line-height: inherit;
|
|
87
84
|
}
|
|
88
85
|
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
3
|
+
|
|
4
|
+
/* --- src/styles/text-layout.css --- */
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Text layout classes — căn chữ, whitespace, truncate, line-clamp, transform,
|
|
8
|
+
* decoration, vertical-align.
|
|
9
|
+
*
|
|
10
|
+
* Tên file `text-layout.css` để tránh lẫn với class màu `text-*` và typography.css.
|
|
11
|
+
* Không gồm wrap-break-*, italic, tabular-nums, cursor.
|
|
12
|
+
*
|
|
13
|
+
* Nằm trong @layer components (cùng lý do với flex.css).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@layer components {
|
|
17
|
+
.text-left {
|
|
18
|
+
text-align: left;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.text-center {
|
|
22
|
+
text-align: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.text-right {
|
|
26
|
+
text-align: right;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.text-justify {
|
|
30
|
+
text-align: justify;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.text-start {
|
|
34
|
+
text-align: start;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.text-end {
|
|
38
|
+
text-align: end;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.whitespace-normal {
|
|
42
|
+
white-space: normal;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.whitespace-nowrap {
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.whitespace-pre {
|
|
50
|
+
white-space: pre;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.whitespace-pre-line {
|
|
54
|
+
white-space: pre-line;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.whitespace-pre-wrap {
|
|
58
|
+
white-space: pre-wrap;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.whitespace-break-spaces {
|
|
62
|
+
white-space: break-spaces;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.truncate {
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.text-ellipsis {
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.text-clip {
|
|
76
|
+
text-overflow: clip;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.text-wrap {
|
|
80
|
+
text-wrap: wrap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.text-nowrap {
|
|
84
|
+
text-wrap: nowrap;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.text-balance {
|
|
88
|
+
text-wrap: balance;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.text-pretty {
|
|
92
|
+
text-wrap: pretty;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.break-normal {
|
|
96
|
+
overflow-wrap: normal;
|
|
97
|
+
word-break: normal;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.break-all {
|
|
101
|
+
word-break: break-all;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.break-keep {
|
|
105
|
+
word-break: keep-all;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.line-clamp-1 {
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
display: -webkit-box;
|
|
111
|
+
-webkit-box-orient: vertical;
|
|
112
|
+
-webkit-line-clamp: 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.line-clamp-2 {
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
display: -webkit-box;
|
|
118
|
+
-webkit-box-orient: vertical;
|
|
119
|
+
-webkit-line-clamp: 2;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.line-clamp-3 {
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
display: -webkit-box;
|
|
125
|
+
-webkit-box-orient: vertical;
|
|
126
|
+
-webkit-line-clamp: 3;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.line-clamp-4 {
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
display: -webkit-box;
|
|
132
|
+
-webkit-box-orient: vertical;
|
|
133
|
+
-webkit-line-clamp: 4;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.line-clamp-5 {
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
display: -webkit-box;
|
|
139
|
+
-webkit-box-orient: vertical;
|
|
140
|
+
-webkit-line-clamp: 5;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.line-clamp-6 {
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
display: -webkit-box;
|
|
146
|
+
-webkit-box-orient: vertical;
|
|
147
|
+
-webkit-line-clamp: 6;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.line-clamp-none {
|
|
151
|
+
overflow: visible;
|
|
152
|
+
display: block;
|
|
153
|
+
-webkit-box-orient: horizontal;
|
|
154
|
+
-webkit-line-clamp: unset;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* line-clamp set display — `hidden` vẫn phải ẩn (cùng lý do với flex.css). */
|
|
158
|
+
.line-clamp-1[hidden],
|
|
159
|
+
.line-clamp-2[hidden],
|
|
160
|
+
.line-clamp-3[hidden],
|
|
161
|
+
.line-clamp-4[hidden],
|
|
162
|
+
.line-clamp-5[hidden],
|
|
163
|
+
.line-clamp-6[hidden],
|
|
164
|
+
.line-clamp-none[hidden] {
|
|
165
|
+
display: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.uppercase {
|
|
169
|
+
text-transform: uppercase;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.lowercase {
|
|
173
|
+
text-transform: lowercase;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.capitalize {
|
|
177
|
+
text-transform: capitalize;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.normal-case {
|
|
181
|
+
text-transform: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.underline {
|
|
185
|
+
text-decoration-line: underline;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.line-through {
|
|
189
|
+
text-decoration-line: line-through;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.no-underline {
|
|
193
|
+
text-decoration-line: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.align-top {
|
|
197
|
+
vertical-align: top;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.align-middle {
|
|
201
|
+
vertical-align: middle;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.align-bottom {
|
|
205
|
+
vertical-align: bottom;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.align-baseline {
|
|
209
|
+
vertical-align: baseline;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.align-text-top {
|
|
213
|
+
vertical-align: text-top;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.align-text-bottom {
|
|
217
|
+
vertical-align: text-bottom;
|
|
218
|
+
}
|
|
219
|
+
}
|
package/dist/toggle.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
2
3
|
|
|
3
4
|
/* --- src/components/Toggle/toggle.css --- */
|
|
4
5
|
|
|
@@ -20,10 +21,6 @@
|
|
|
20
21
|
var(--leaf-toggle-width) - var(--leaf-toggle-padding) * 2 - var(--leaf-toggle-thumb)
|
|
21
22
|
);
|
|
22
23
|
|
|
23
|
-
position: relative;
|
|
24
|
-
display: inline-flex;
|
|
25
|
-
flex-shrink: 0;
|
|
26
|
-
align-items: center;
|
|
27
24
|
box-sizing: border-box;
|
|
28
25
|
width: var(--leaf-toggle-width);
|
|
29
26
|
height: var(--leaf-toggle-height);
|
|
@@ -33,7 +30,6 @@
|
|
|
33
30
|
border-radius: 12px;
|
|
34
31
|
background-color: var(--base-quaternary);
|
|
35
32
|
cursor: pointer;
|
|
36
|
-
vertical-align: middle;
|
|
37
33
|
appearance: none;
|
|
38
34
|
-webkit-appearance: none;
|
|
39
35
|
font: inherit;
|
|
@@ -41,10 +37,12 @@
|
|
|
41
37
|
transition: background-color 0.2s ease;
|
|
42
38
|
}
|
|
43
39
|
|
|
40
|
+
/* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
|
|
41
|
+
.leaf-toggle[hidden] {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
44
45
|
.leaf-toggle__thumb {
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
46
|
width: var(--leaf-toggle-thumb);
|
|
49
47
|
height: var(--leaf-toggle-thumb);
|
|
50
48
|
border-radius: 100px;
|
package/dist/tokens.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
2
3
|
|
|
3
4
|
/* --- ../tokens/src/primitive.css --- */
|
|
4
5
|
|
|
@@ -268,6 +269,7 @@
|
|
|
268
269
|
|
|
269
270
|
:root {
|
|
270
271
|
--spacing-0: 0px;
|
|
272
|
+
--spacing-2xs: 2px;
|
|
271
273
|
--spacing-xs: 4px;
|
|
272
274
|
--spacing-s: 8px;
|
|
273
275
|
--spacing-m: 12px;
|
|
@@ -283,14 +285,16 @@
|
|
|
283
285
|
|
|
284
286
|
/* --- ../tokens/src/border.css --- */
|
|
285
287
|
|
|
286
|
-
/* Border
|
|
288
|
+
/* Border tokens — độ dày viền + bo góc. */
|
|
287
289
|
|
|
288
290
|
:root {
|
|
289
|
-
--
|
|
290
|
-
--
|
|
291
|
-
--
|
|
292
|
-
--
|
|
293
|
-
|
|
294
|
-
--radius-
|
|
295
|
-
--radius-
|
|
291
|
+
--border-width-s: 0.5px;
|
|
292
|
+
--border-width-m: 1px;
|
|
293
|
+
--border-width-l: 1.5px;
|
|
294
|
+
--border-width-xl: 2px;
|
|
295
|
+
|
|
296
|
+
--radius-s: 4px;
|
|
297
|
+
--radius-m: 8px;
|
|
298
|
+
--radius-l: 12px;
|
|
299
|
+
--radius-full: 9999px; /* pill / circle */
|
|
296
300
|
}
|
package/dist/tooltip.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
2
3
|
|
|
3
4
|
/* --- src/components/Tooltip/tooltip.css --- */
|
|
4
5
|
|
|
@@ -13,13 +14,6 @@
|
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
@layer components {
|
|
16
|
-
.leaf-tooltip-trigger {
|
|
17
|
-
position: relative;
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
max-width: 100%;
|
|
20
|
-
vertical-align: middle;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
17
|
.leaf-tooltip {
|
|
24
18
|
--leaf-tooltip-pad-y: 8px;
|
|
25
19
|
--leaf-tooltip-pad-x: 16px;
|
|
@@ -34,6 +28,7 @@
|
|
|
34
28
|
/* Chiều rộng tam giác thật trong khung. */
|
|
35
29
|
--leaf-tooltip-caret-tip: 12px;
|
|
36
30
|
|
|
31
|
+
/* inline-flex — class Leaf; direction / align vẫn ở CSS (đổi theo data-position / data-align) */
|
|
37
32
|
display: inline-flex;
|
|
38
33
|
flex-direction: column;
|
|
39
34
|
align-items: center;
|
|
@@ -52,20 +47,17 @@
|
|
|
52
47
|
z-index: var(--leaf-z-tooltip, 110);
|
|
53
48
|
}
|
|
54
49
|
|
|
55
|
-
/* `
|
|
50
|
+
/* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
|
|
51
|
+
.leaf-tooltip-trigger[hidden],
|
|
56
52
|
.leaf-tooltip[hidden] {
|
|
57
53
|
display: none;
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
.leaf-tooltip__body {
|
|
61
|
-
position: relative;
|
|
62
|
-
z-index: 1;
|
|
63
57
|
box-sizing: border-box;
|
|
64
|
-
max-width: 100%;
|
|
65
58
|
padding: var(--leaf-tooltip-pad-y) var(--leaf-tooltip-pad-x);
|
|
66
59
|
border-radius: var(--leaf-tooltip-radius);
|
|
67
60
|
background-color: var(--base-quaternary);
|
|
68
|
-
text-align: left;
|
|
69
61
|
word-break: break-word;
|
|
70
62
|
}
|
|
71
63
|
|
|
@@ -74,9 +66,6 @@
|
|
|
74
66
|
* Mặc định: mũi nhọn xuống (position=top — caret dưới body).
|
|
75
67
|
*/
|
|
76
68
|
.leaf-tooltip__caret {
|
|
77
|
-
position: relative;
|
|
78
|
-
display: block;
|
|
79
|
-
flex-shrink: 0;
|
|
80
69
|
width: var(--leaf-tooltip-caret-w);
|
|
81
70
|
height: var(--leaf-tooltip-caret-h);
|
|
82
71
|
background-color: transparent;
|
package/dist/typography.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* @finhay-pro/leaf-design-system — generated by scripts/build-css.mjs. Do not edit. */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
2
3
|
|
|
3
4
|
/* --- src/styles/typography.css --- */
|
|
4
5
|
|
|
@@ -12,9 +13,7 @@
|
|
|
12
13
|
* weight (400 / 600 / 700 theo token). Letter spacing, margin, màu chữ không
|
|
13
14
|
* thuộc stylesheet này — màu dùng class text-* riêng.
|
|
14
15
|
*
|
|
15
|
-
* Toàn bộ nằm trong `@layer components`
|
|
16
|
-
* utilities`) luôn thắng: `class="heading-1 font-bold"` hay `class="body-3
|
|
17
|
-
* text-2xl"` đều override được mà không cần important modifier.
|
|
16
|
+
* Toàn bộ nằm trong `@layer components` — SCSS module (ngoài layer) override được.
|
|
18
17
|
*/
|
|
19
18
|
|
|
20
19
|
@layer components {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finhay-pro/leaf-design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "React component library của Finhay Leaf Design System",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
"./color.css": "./dist/color.css",
|
|
23
23
|
"./spacing.css": "./dist/spacing.css",
|
|
24
24
|
"./border.css": "./dist/border.css",
|
|
25
|
+
"./flex.css": "./dist/flex.css",
|
|
26
|
+
"./grid.css": "./dist/grid.css",
|
|
27
|
+
"./sizing.css": "./dist/sizing.css",
|
|
28
|
+
"./overflow.css": "./dist/overflow.css",
|
|
29
|
+
"./position.css": "./dist/position.css",
|
|
30
|
+
"./text-layout.css": "./dist/text-layout.css",
|
|
25
31
|
"./button.css": "./dist/button.css",
|
|
26
32
|
"./tabs.css": "./dist/tabs.css",
|
|
27
33
|
"./dialog.css": "./dist/dialog.css",
|