@finhay-pro/leaf-design-system 0.1.6 → 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.
Files changed (53) hide show
  1. package/README.md +175 -81
  2. package/dist/border.css +154 -17
  3. package/dist/button.css +2 -12
  4. package/dist/cdn/leaf-0.1.7.min.css +2 -0
  5. package/dist/cdn/leaf-0.1.7.min.js +2 -0
  6. package/dist/classes.css +1898 -268
  7. package/dist/color.css +27 -32
  8. package/dist/components/Button/Button.d.ts.map +1 -1
  9. package/dist/components/Button/Button.js +3 -3
  10. package/dist/components/Button/Button.js.map +1 -1
  11. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  12. package/dist/components/Dialog/Dialog.js +1 -1
  13. package/dist/components/Dialog/Dialog.js.map +1 -1
  14. package/dist/components/Logo/Logo.d.ts.map +1 -1
  15. package/dist/components/Logo/Logo.js +2 -2
  16. package/dist/components/Logo/Logo.js.map +1 -1
  17. package/dist/components/Skeleton/Skeleton.js +1 -1
  18. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  19. package/dist/components/Slider/Slider.js +2 -2
  20. package/dist/components/Slider/Slider.js.map +1 -1
  21. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  22. package/dist/components/Spinner/Spinner.js +2 -2
  23. package/dist/components/Spinner/Spinner.js.map +1 -1
  24. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  25. package/dist/components/Tabs/Tabs.js +3 -3
  26. package/dist/components/Tabs/Tabs.js.map +1 -1
  27. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  28. package/dist/components/Toggle/Toggle.js +1 -1
  29. package/dist/components/Toggle/Toggle.js.map +1 -1
  30. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  31. package/dist/components/Tooltip/Tooltip.js +2 -2
  32. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  33. package/dist/dialog.css +4 -36
  34. package/dist/flex.css +229 -0
  35. package/dist/grid.css +533 -0
  36. package/dist/logo.css +2 -7
  37. package/dist/overflow.css +72 -0
  38. package/dist/position.css +140 -0
  39. package/dist/sizing.css +377 -0
  40. package/dist/skeleton.css +0 -4
  41. package/dist/slider.css +3 -31
  42. package/dist/spacing.css +71 -4
  43. package/dist/spinner.css +2 -16
  44. package/dist/styles.css +1909 -276
  45. package/dist/tabs.css +2 -13
  46. package/dist/text-layout.css +219 -0
  47. package/dist/toggle.css +1 -9
  48. package/dist/tokens.css +11 -8
  49. package/dist/tooltip.css +2 -15
  50. package/dist/typography.css +1 -3
  51. package/package.json +7 -1
  52. package/dist/cdn/leaf-0.1.6.min.css +0 -2
  53. package/dist/cdn/leaf-0.1.6.min.js +0 -2
@@ -0,0 +1,140 @@
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/position.css --- */
5
+
6
+ /*
7
+ * Position classes — position, inset cơ bản, z-index scale.
8
+ *
9
+ * Nằm trong @layer components (cùng lý do với flex.css).
10
+ */
11
+
12
+ @layer components {
13
+ .static {
14
+ position: static;
15
+ }
16
+
17
+ .relative {
18
+ position: relative;
19
+ }
20
+
21
+ .absolute {
22
+ position: absolute;
23
+ }
24
+
25
+ .fixed {
26
+ position: fixed;
27
+ }
28
+
29
+ .sticky {
30
+ position: sticky;
31
+ }
32
+
33
+ .inset-0 {
34
+ inset: 0px;
35
+ }
36
+
37
+ .inset-auto {
38
+ inset: auto;
39
+ }
40
+
41
+ .inset-x-0 {
42
+ inset-inline: 0px;
43
+ }
44
+
45
+ .inset-y-0 {
46
+ inset-block: 0px;
47
+ }
48
+
49
+ .top-0 {
50
+ top: 0px;
51
+ }
52
+
53
+ .top-auto {
54
+ top: auto;
55
+ }
56
+
57
+ .top-full {
58
+ top: 100%;
59
+ }
60
+
61
+ .top-1\/2 {
62
+ top: calc(1 / 2 * 100%);
63
+ }
64
+
65
+ .right-0 {
66
+ right: 0px;
67
+ }
68
+
69
+ .right-auto {
70
+ right: auto;
71
+ }
72
+
73
+ .right-full {
74
+ right: 100%;
75
+ }
76
+
77
+ .right-1\/2 {
78
+ right: calc(1 / 2 * 100%);
79
+ }
80
+
81
+ .bottom-0 {
82
+ bottom: 0px;
83
+ }
84
+
85
+ .bottom-auto {
86
+ bottom: auto;
87
+ }
88
+
89
+ .bottom-full {
90
+ bottom: 100%;
91
+ }
92
+
93
+ .bottom-1\/2 {
94
+ bottom: calc(1 / 2 * 100%);
95
+ }
96
+
97
+ .left-0 {
98
+ left: 0px;
99
+ }
100
+
101
+ .left-auto {
102
+ left: auto;
103
+ }
104
+
105
+ .left-full {
106
+ left: 100%;
107
+ }
108
+
109
+ .left-1\/2 {
110
+ left: calc(1 / 2 * 100%);
111
+ }
112
+
113
+ .z-0 {
114
+ z-index: 0;
115
+ }
116
+
117
+ .z-10 {
118
+ z-index: 10;
119
+ }
120
+
121
+ .z-20 {
122
+ z-index: 20;
123
+ }
124
+
125
+ .z-30 {
126
+ z-index: 30;
127
+ }
128
+
129
+ .z-40 {
130
+ z-index: 40;
131
+ }
132
+
133
+ .z-50 {
134
+ z-index: 50;
135
+ }
136
+
137
+ .z-auto {
138
+ z-index: auto;
139
+ }
140
+ }
@@ -0,0 +1,377 @@
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/sizing.css --- */
5
+
6
+ /*
7
+ * Sizing classes — keyword + phân số.
8
+ *
9
+ * Chỉ size tương đối / keyword (`full`, `auto`, `1/2`…). Size cố định (w-80…)
10
+ * để app viết trong SCSS module.
11
+ *
12
+ * Nằm trong @layer components (cùng lý do với flex.css).
13
+ */
14
+
15
+ @layer components {
16
+ .w-0 {
17
+ width: 0px;
18
+ }
19
+
20
+ .w-px {
21
+ width: 1px;
22
+ }
23
+
24
+ .w-full {
25
+ width: 100%;
26
+ }
27
+
28
+ .w-auto {
29
+ width: auto;
30
+ }
31
+
32
+ .w-fit {
33
+ width: fit-content;
34
+ }
35
+
36
+ .w-min {
37
+ width: min-content;
38
+ }
39
+
40
+ .w-max {
41
+ width: max-content;
42
+ }
43
+
44
+ .w-screen {
45
+ width: 100vw;
46
+ }
47
+
48
+ .h-0 {
49
+ height: 0px;
50
+ }
51
+
52
+ .h-px {
53
+ height: 1px;
54
+ }
55
+
56
+ .h-full {
57
+ height: 100%;
58
+ }
59
+
60
+ .h-auto {
61
+ height: auto;
62
+ }
63
+
64
+ .h-fit {
65
+ height: fit-content;
66
+ }
67
+
68
+ .h-min {
69
+ height: min-content;
70
+ }
71
+
72
+ .h-max {
73
+ height: max-content;
74
+ }
75
+
76
+ .h-screen {
77
+ height: 100vh;
78
+ }
79
+
80
+ .h-dvh {
81
+ height: 100dvh;
82
+ }
83
+
84
+ .w-1\/2 {
85
+ width: calc(1 / 2 * 100%);
86
+ }
87
+
88
+ .w-1\/3 {
89
+ width: calc(1 / 3 * 100%);
90
+ }
91
+
92
+ .w-2\/3 {
93
+ width: calc(2 / 3 * 100%);
94
+ }
95
+
96
+ .w-1\/4 {
97
+ width: calc(1 / 4 * 100%);
98
+ }
99
+
100
+ .w-2\/4 {
101
+ width: calc(2 / 4 * 100%);
102
+ }
103
+
104
+ .w-3\/4 {
105
+ width: calc(3 / 4 * 100%);
106
+ }
107
+
108
+ .w-1\/5 {
109
+ width: calc(1 / 5 * 100%);
110
+ }
111
+
112
+ .w-2\/5 {
113
+ width: calc(2 / 5 * 100%);
114
+ }
115
+
116
+ .w-3\/5 {
117
+ width: calc(3 / 5 * 100%);
118
+ }
119
+
120
+ .w-4\/5 {
121
+ width: calc(4 / 5 * 100%);
122
+ }
123
+
124
+ .w-1\/6 {
125
+ width: calc(1 / 6 * 100%);
126
+ }
127
+
128
+ .w-2\/6 {
129
+ width: calc(2 / 6 * 100%);
130
+ }
131
+
132
+ .w-3\/6 {
133
+ width: calc(3 / 6 * 100%);
134
+ }
135
+
136
+ .w-4\/6 {
137
+ width: calc(4 / 6 * 100%);
138
+ }
139
+
140
+ .w-5\/6 {
141
+ width: calc(5 / 6 * 100%);
142
+ }
143
+
144
+ .w-1\/12 {
145
+ width: calc(1 / 12 * 100%);
146
+ }
147
+
148
+ .w-2\/12 {
149
+ width: calc(2 / 12 * 100%);
150
+ }
151
+
152
+ .w-3\/12 {
153
+ width: calc(3 / 12 * 100%);
154
+ }
155
+
156
+ .w-4\/12 {
157
+ width: calc(4 / 12 * 100%);
158
+ }
159
+
160
+ .w-5\/12 {
161
+ width: calc(5 / 12 * 100%);
162
+ }
163
+
164
+ .w-6\/12 {
165
+ width: calc(6 / 12 * 100%);
166
+ }
167
+
168
+ .w-7\/12 {
169
+ width: calc(7 / 12 * 100%);
170
+ }
171
+
172
+ .w-8\/12 {
173
+ width: calc(8 / 12 * 100%);
174
+ }
175
+
176
+ .w-9\/12 {
177
+ width: calc(9 / 12 * 100%);
178
+ }
179
+
180
+ .w-10\/12 {
181
+ width: calc(10 / 12 * 100%);
182
+ }
183
+
184
+ .w-11\/12 {
185
+ width: calc(11 / 12 * 100%);
186
+ }
187
+
188
+ .h-1\/2 {
189
+ height: calc(1 / 2 * 100%);
190
+ }
191
+
192
+ .h-1\/3 {
193
+ height: calc(1 / 3 * 100%);
194
+ }
195
+
196
+ .h-2\/3 {
197
+ height: calc(2 / 3 * 100%);
198
+ }
199
+
200
+ .h-1\/4 {
201
+ height: calc(1 / 4 * 100%);
202
+ }
203
+
204
+ .h-2\/4 {
205
+ height: calc(2 / 4 * 100%);
206
+ }
207
+
208
+ .h-3\/4 {
209
+ height: calc(3 / 4 * 100%);
210
+ }
211
+
212
+ .h-1\/5 {
213
+ height: calc(1 / 5 * 100%);
214
+ }
215
+
216
+ .h-2\/5 {
217
+ height: calc(2 / 5 * 100%);
218
+ }
219
+
220
+ .h-3\/5 {
221
+ height: calc(3 / 5 * 100%);
222
+ }
223
+
224
+ .h-4\/5 {
225
+ height: calc(4 / 5 * 100%);
226
+ }
227
+
228
+ .h-1\/6 {
229
+ height: calc(1 / 6 * 100%);
230
+ }
231
+
232
+ .h-2\/6 {
233
+ height: calc(2 / 6 * 100%);
234
+ }
235
+
236
+ .h-3\/6 {
237
+ height: calc(3 / 6 * 100%);
238
+ }
239
+
240
+ .h-4\/6 {
241
+ height: calc(4 / 6 * 100%);
242
+ }
243
+
244
+ .h-5\/6 {
245
+ height: calc(5 / 6 * 100%);
246
+ }
247
+
248
+ .h-1\/12 {
249
+ height: calc(1 / 12 * 100%);
250
+ }
251
+
252
+ .h-2\/12 {
253
+ height: calc(2 / 12 * 100%);
254
+ }
255
+
256
+ .h-3\/12 {
257
+ height: calc(3 / 12 * 100%);
258
+ }
259
+
260
+ .h-4\/12 {
261
+ height: calc(4 / 12 * 100%);
262
+ }
263
+
264
+ .h-5\/12 {
265
+ height: calc(5 / 12 * 100%);
266
+ }
267
+
268
+ .h-6\/12 {
269
+ height: calc(6 / 12 * 100%);
270
+ }
271
+
272
+ .h-7\/12 {
273
+ height: calc(7 / 12 * 100%);
274
+ }
275
+
276
+ .h-8\/12 {
277
+ height: calc(8 / 12 * 100%);
278
+ }
279
+
280
+ .h-9\/12 {
281
+ height: calc(9 / 12 * 100%);
282
+ }
283
+
284
+ .h-10\/12 {
285
+ height: calc(10 / 12 * 100%);
286
+ }
287
+
288
+ .h-11\/12 {
289
+ height: calc(11 / 12 * 100%);
290
+ }
291
+
292
+ .size-full {
293
+ width: 100%;
294
+ height: 100%;
295
+ }
296
+
297
+ .size-auto {
298
+ width: auto;
299
+ height: auto;
300
+ }
301
+
302
+ .min-w-0 {
303
+ min-width: 0px;
304
+ }
305
+
306
+ .min-w-full {
307
+ min-width: 100%;
308
+ }
309
+
310
+ .min-w-fit {
311
+ min-width: fit-content;
312
+ }
313
+
314
+ .min-w-min {
315
+ min-width: min-content;
316
+ }
317
+
318
+ .min-w-max {
319
+ min-width: max-content;
320
+ }
321
+
322
+ .max-w-full {
323
+ max-width: 100%;
324
+ }
325
+
326
+ .max-w-fit {
327
+ max-width: fit-content;
328
+ }
329
+
330
+ .max-w-min {
331
+ max-width: min-content;
332
+ }
333
+
334
+ .max-w-max {
335
+ max-width: max-content;
336
+ }
337
+
338
+ .max-w-none {
339
+ max-width: none;
340
+ }
341
+
342
+ .min-h-0 {
343
+ min-height: 0px;
344
+ }
345
+
346
+ .min-h-full {
347
+ min-height: 100%;
348
+ }
349
+
350
+ .min-h-fit {
351
+ min-height: fit-content;
352
+ }
353
+
354
+ .min-h-screen {
355
+ min-height: 100vh;
356
+ }
357
+
358
+ .min-h-dvh {
359
+ min-height: 100dvh;
360
+ }
361
+
362
+ .max-h-full {
363
+ max-height: 100%;
364
+ }
365
+
366
+ .max-h-fit {
367
+ max-height: fit-content;
368
+ }
369
+
370
+ .max-h-screen {
371
+ max-height: 100vh;
372
+ }
373
+
374
+ .max-h-none {
375
+ max-height: none;
376
+ }
377
+ }
package/dist/skeleton.css CHANGED
@@ -17,8 +17,6 @@
17
17
  --leaf-skeleton-height: 100%;
18
18
  --leaf-skeleton-radius: 12px;
19
19
 
20
- position: relative;
21
- overflow: hidden;
22
20
  box-sizing: border-box;
23
21
  width: var(--leaf-skeleton-width);
24
22
  height: var(--leaf-skeleton-height);
@@ -27,8 +25,6 @@
27
25
  }
28
26
 
29
27
  .leaf-skeleton__shimmer {
30
- position: absolute;
31
- inset: 0;
32
28
  background: linear-gradient(
33
29
  to right,
34
30
  transparent,
package/dist/slider.css CHANGED
@@ -29,11 +29,7 @@
29
29
  20px
30
30
  );
31
31
 
32
- display: flex;
33
- flex-direction: column;
34
- /* Figma gap S (8) giữa Title/Unit và khối track+labels. */
35
- gap: 8px;
36
- width: 100%;
32
+ /* flex / flex-col / w-full / gap-s — class Leaf trên markup */
37
33
  box-sizing: border-box;
38
34
  font-family: var(--font-sans);
39
35
  font-size: var(--body-5-size);
@@ -44,45 +40,21 @@
44
40
  -webkit-user-select: none;
45
41
  }
46
42
 
47
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn. */
43
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
48
44
  .leaf-slider[hidden] {
49
45
  display: none;
50
46
  }
51
47
 
52
48
  /* Figma gap XS (4) giữa track và Value labels. */
53
- .leaf-slider__body {
54
- display: flex;
55
- flex-direction: column;
56
- gap: 4px;
57
- width: 100%;
58
- }
49
+ /* body — layout từ class Leaf trên markup */
59
50
 
60
51
  .leaf-slider__header {
61
- display: flex;
62
- align-items: flex-start;
63
- justify-content: space-between;
64
- gap: 8px;
65
- width: 100%;
66
52
  color: var(--text-primary);
67
- white-space: nowrap;
68
53
  user-select: text;
69
54
  -webkit-user-select: text;
70
55
  }
71
56
 
72
- .leaf-slider__title,
73
- .leaf-slider__unit {
74
- min-width: 0;
75
- }
76
-
77
- .leaf-slider__unit {
78
- text-align: right;
79
- }
80
-
81
57
  .leaf-slider__control {
82
- position: relative;
83
- display: flex;
84
- align-items: center;
85
- width: 100%;
86
58
  height: var(--leaf-slider-control-height);
87
59
  outline: none;
88
60
  cursor: pointer;