@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.
Files changed (55) hide show
  1. package/README.md +197 -73
  2. package/dist/border.css +155 -17
  3. package/dist/button.css +11 -10
  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 +1915 -238
  7. package/dist/color.css +28 -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 +10 -2
  12. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  13. package/dist/components/Dialog/Dialog.js +3 -2
  14. package/dist/components/Dialog/Dialog.js.map +1 -1
  15. package/dist/components/Logo/Logo.d.ts.map +1 -1
  16. package/dist/components/Logo/Logo.js +2 -2
  17. package/dist/components/Logo/Logo.js.map +1 -1
  18. package/dist/components/Skeleton/Skeleton.js +1 -1
  19. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  20. package/dist/components/Slider/Slider.js +2 -2
  21. package/dist/components/Slider/Slider.js.map +1 -1
  22. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  23. package/dist/components/Spinner/Spinner.js +2 -2
  24. package/dist/components/Spinner/Spinner.js.map +1 -1
  25. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  26. package/dist/components/Tabs/Tabs.js +3 -3
  27. package/dist/components/Tabs/Tabs.js.map +1 -1
  28. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  29. package/dist/components/Toggle/Toggle.js +1 -1
  30. package/dist/components/Toggle/Toggle.js.map +1 -1
  31. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  32. package/dist/components/Tooltip/Tooltip.js +2 -2
  33. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  34. package/dist/dialog.css +19 -38
  35. package/dist/flex.css +229 -0
  36. package/dist/grid.css +533 -0
  37. package/dist/logo-assets.css +1 -0
  38. package/dist/logo.css +7 -6
  39. package/dist/overflow.css +72 -0
  40. package/dist/position.css +140 -0
  41. package/dist/sizing.css +377 -0
  42. package/dist/skeleton.css +1 -4
  43. package/dist/slider.css +8 -30
  44. package/dist/spacing.css +72 -4
  45. package/dist/spinner.css +4 -16
  46. package/dist/styles.css +1926 -246
  47. package/dist/tabs.css +9 -12
  48. package/dist/text-layout.css +219 -0
  49. package/dist/toggle.css +6 -8
  50. package/dist/tokens.css +12 -8
  51. package/dist/tooltip.css +4 -15
  52. package/dist/typography.css +2 -3
  53. package/package.json +7 -1
  54. package/dist/cdn/leaf-0.1.5.min.css +0 -2
  55. package/dist/cdn/leaf-0.1.5.min.js +0 -2
package/dist/classes.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/Button/button.css --- */
4
5
 
@@ -35,9 +36,6 @@
35
36
  --leaf-button-bg: var(--button-base-primary);
36
37
  --leaf-button-fg: var(--button-content-primary);
37
38
 
38
- display: inline-flex;
39
- align-items: center;
40
- justify-content: center;
41
39
  box-sizing: border-box;
42
40
  width: var(--leaf-button-width, auto);
43
41
  height: var(--leaf-button-height);
@@ -49,8 +47,6 @@
49
47
  border-radius: 1000px;
50
48
  background-color: var(--leaf-button-bg);
51
49
  color: var(--leaf-button-fg);
52
- text-align: center;
53
- white-space: nowrap;
54
50
  font: inherit;
55
51
  font-family: var(--font-sans);
56
52
  font-size: var(--leaf-button-font-size);
@@ -58,14 +54,10 @@
58
54
  font-weight: var(--leaf-button-font-weight);
59
55
  letter-spacing: var(--leaf-button-letter-spacing);
60
56
  text-decoration: none;
61
- vertical-align: middle;
57
+ appearance: none;
62
58
  }
63
59
 
64
60
  .leaf-button__icon {
65
- display: inline-flex;
66
- flex-shrink: 0;
67
- align-items: center;
68
- justify-content: center;
69
61
  width: var(--leaf-button-icon-size);
70
62
  height: var(--leaf-button-icon-size);
71
63
  font-size: var(--leaf-button-icon-size);
@@ -78,6 +70,15 @@
78
70
  height: 1em;
79
71
  }
80
72
 
73
+ /*
74
+ * Layout (`inline-flex`…) lấy từ class Leaf trên markup. `[hidden]` vẫn cần rule riêng
75
+ * vì class layout cũng set display (selector `[hidden]` specificity cao hơn nên thắng).
76
+ */
77
+ .leaf-button[hidden],
78
+ .leaf-button__icon[hidden] {
79
+ display: none;
80
+ }
81
+
81
82
  /* ── Size — Figma Medium/Small dùng padding (không ép height trong auto-layout);
82
83
  * vẫn set height mặc định khớp frame để icon-only / căn hàng ổn định.
83
84
  * Truyền height="auto" (prop) → chiều cao theo padding + nội dung. */
@@ -216,12 +217,7 @@
216
217
 
217
218
  @layer components {
218
219
  .leaf-dialog-backdrop {
219
- position: fixed;
220
- inset: 0;
221
220
  z-index: var(--leaf-z-dialog, 50);
222
- display: flex;
223
- align-items: center;
224
- justify-content: center;
225
221
  padding: 16px;
226
222
  box-sizing: border-box;
227
223
  /*
@@ -233,7 +229,7 @@
233
229
  backdrop-filter: blur(5px);
234
230
  }
235
231
 
236
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để HTML tĩnh ẩn được. */
232
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
237
233
  .leaf-dialog-backdrop[hidden] {
238
234
  display: none;
239
235
  }
@@ -246,17 +242,18 @@
246
242
  --leaf-dialog-close-size: 28px;
247
243
  --leaf-dialog-close-icon: 20px;
248
244
 
249
- display: flex;
250
- flex-direction: column;
251
245
  gap: var(--leaf-dialog-gap);
252
- /* Luôn co theo viewport; maxWidth/maxHeight chỉ là trần — mobile không bị tràn. */
253
- width: 100%;
254
- height: auto;
246
+ /*
247
+ * Width: luôn 100% trong trần maxWidth (responsive).
248
+ * Height: cố định khi có --leaf-dialog-height (content động không giật panel);
249
+ * không có → auto theo nội dung. maxHeight luôn là trần viewport.
250
+ * Layout flex/overflow/w-full lấy từ class Leaf trên markup.
251
+ */
255
252
  max-width: var(--leaf-dialog-max-width, 100%);
253
+ height: var(--leaf-dialog-height, auto);
256
254
  max-height: var(--leaf-dialog-max-height, 100%);
257
255
  margin: 0;
258
256
  padding: var(--leaf-dialog-padding);
259
- overflow: hidden;
260
257
  box-sizing: border-box;
261
258
  border-radius: var(--leaf-dialog-radius);
262
259
  background-color: var(--base-primary);
@@ -270,39 +267,29 @@
270
267
  }
271
268
 
272
269
  .leaf-dialog__header {
273
- display: flex;
274
- flex-shrink: 0;
275
- align-items: center;
276
- justify-content: space-between;
277
270
  gap: var(--leaf-dialog-gap);
278
- width: 100%;
279
- min-width: 0;
280
271
  }
281
272
 
282
- /* Cụm trái: back + title */
273
+ /* Cụm trái: back + title — flex/min-w từ class Leaf trên markup */
283
274
  .leaf-dialog__start {
284
- display: flex;
285
- align-items: center;
286
275
  gap: var(--leaf-dialog-gap);
287
- min-width: 0;
288
- flex: 1 1 auto;
289
276
  }
290
277
 
291
- /* Chỉ truncate layout — font/màu dùng class heading-3 text-primary trên markup. */
278
+ /*
279
+ * Title — heading-3 · --text-primary nằm ngay ở đây: markup không cần class typography /
280
+ * màu, nên utility trùng tên của app (vd. `text-primary`) không chen vào.
281
+ */
292
282
  .leaf-dialog__start > :where(h2, p) {
293
283
  margin: 0;
294
- min-width: 0;
295
- overflow: hidden;
296
- text-overflow: ellipsis;
297
- white-space: nowrap;
284
+ color: var(--text-primary);
285
+ font-family: var(--font-sans);
286
+ font-size: var(--heading-3-size);
287
+ line-height: var(--heading-3-line-height);
288
+ font-weight: var(--heading-3-weight);
298
289
  }
299
290
 
300
291
  .leaf-dialog__back,
301
292
  .leaf-dialog__close {
302
- display: inline-flex;
303
- flex-shrink: 0;
304
- align-items: center;
305
- justify-content: center;
306
293
  margin: 0;
307
294
  padding: 0;
308
295
  border: none;
@@ -350,13 +337,7 @@
350
337
  }
351
338
 
352
339
  .leaf-dialog__body {
353
- display: flex;
354
- flex: 1 1 auto;
355
- flex-direction: column;
356
340
  gap: var(--leaf-dialog-gap);
357
- min-height: 0;
358
- width: 100%;
359
- overflow: auto;
360
341
  }
361
342
  }
362
343
 
@@ -374,10 +355,6 @@
374
355
 
375
356
  @layer components {
376
357
  .leaf-logo {
377
- display: inline-flex;
378
- flex-shrink: 0;
379
- align-items: center;
380
- justify-content: center;
381
358
  margin: 0;
382
359
  padding: 0;
383
360
  border: none;
@@ -386,7 +363,6 @@
386
363
  background-position: center;
387
364
  background-size: contain;
388
365
  line-height: 0;
389
- vertical-align: middle;
390
366
  box-sizing: border-box;
391
367
  }
392
368
 
@@ -401,7 +377,12 @@
401
377
  display: block;
402
378
  height: var(--leaf-logo-size, 40px);
403
379
  width: auto;
404
- max-width: 100%;
380
+ /* max-w-full — class Leaf trên markup (React img) */
381
+ }
382
+
383
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
384
+ .leaf-logo[hidden] {
385
+ display: none;
405
386
  }
406
387
  }
407
388
 
@@ -421,8 +402,6 @@
421
402
  --leaf-skeleton-height: 100%;
422
403
  --leaf-skeleton-radius: 12px;
423
404
 
424
- position: relative;
425
- overflow: hidden;
426
405
  box-sizing: border-box;
427
406
  width: var(--leaf-skeleton-width);
428
407
  height: var(--leaf-skeleton-height);
@@ -431,8 +410,6 @@
431
410
  }
432
411
 
433
412
  .leaf-skeleton__shimmer {
434
- position: absolute;
435
- inset: 0;
436
413
  background: linear-gradient(
437
414
  to right,
438
415
  transparent,
@@ -480,11 +457,7 @@
480
457
  20px
481
458
  );
482
459
 
483
- display: flex;
484
- flex-direction: column;
485
- /* Figma gap S (8) giữa Title/Unit và khối track+labels. */
486
- gap: 8px;
487
- width: 100%;
460
+ /* flex / flex-col / w-full / gap-s — class Leaf trên markup */
488
461
  box-sizing: border-box;
489
462
  font-family: var(--font-sans);
490
463
  font-size: var(--body-5-size);
@@ -495,40 +468,21 @@
495
468
  -webkit-user-select: none;
496
469
  }
497
470
 
498
- /* Figma gap XS (4) giữa track và Value labels. */
499
- .leaf-slider__body {
500
- display: flex;
501
- flex-direction: column;
502
- gap: 4px;
503
- width: 100%;
471
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
472
+ .leaf-slider[hidden] {
473
+ display: none;
504
474
  }
505
475
 
476
+ /* Figma gap XS (4) giữa track và Value labels. */
477
+ /* body — layout từ class Leaf trên markup */
478
+
506
479
  .leaf-slider__header {
507
- display: flex;
508
- align-items: flex-start;
509
- justify-content: space-between;
510
- gap: 8px;
511
- width: 100%;
512
480
  color: var(--text-primary);
513
- white-space: nowrap;
514
481
  user-select: text;
515
482
  -webkit-user-select: text;
516
483
  }
517
484
 
518
- .leaf-slider__title,
519
- .leaf-slider__unit {
520
- min-width: 0;
521
- }
522
-
523
- .leaf-slider__unit {
524
- text-align: right;
525
- }
526
-
527
485
  .leaf-slider__control {
528
- position: relative;
529
- display: flex;
530
- align-items: center;
531
- width: 100%;
532
486
  height: var(--leaf-slider-control-height);
533
487
  outline: none;
534
488
  cursor: pointer;
@@ -707,37 +661,24 @@
707
661
  --leaf-spinner-size: 24px;
708
662
  --leaf-spinner-duration: 1.2s;
709
663
 
710
- display: inline-flex;
711
- flex-shrink: 0;
712
- align-items: center;
713
- justify-content: center;
714
664
  width: var(--leaf-spinner-size);
715
665
  height: var(--leaf-spinner-size);
716
666
  color: var(--base-quinary);
717
- vertical-align: middle;
718
667
  line-height: 0;
719
668
  }
720
669
 
721
- .leaf-spinner__icon {
722
- display: block;
723
- width: 100%;
724
- height: 100%;
725
- }
670
+ /* icon: block size-full — class Leaf trên markup */
726
671
 
727
672
  /* Fullscreen overlay — pattern Spinner (portal + nền mờ). */
728
673
  .leaf-spinner-overlay {
729
- position: fixed;
730
- inset: 0;
731
674
  z-index: var(--leaf-z-spinner-overlay, 100);
732
- display: flex;
733
- align-items: center;
734
- justify-content: center;
735
675
  box-sizing: border-box;
736
676
  background-color: var(--overlay);
737
677
  color: var(--base-quinary);
738
678
  }
739
679
 
740
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để HTML tĩnh ẩn được. */
680
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
681
+ .leaf-spinner[hidden],
741
682
  .leaf-spinner-overlay[hidden] {
742
683
  display: none;
743
684
  }
@@ -833,10 +774,7 @@
833
774
  --leaf-tab-line-height: var(--body-3-line-height);
834
775
  --leaf-tab-font-weight: var(--body-3-highlight-weight);
835
776
 
836
- display: flex;
837
- flex-wrap: wrap;
838
- align-items: center;
839
- gap: 12px;
777
+ /* flex / wrap / items / gap-m — class Leaf trên markup */
840
778
  }
841
779
 
842
780
  .leaf-tabs[data-size="lg"] {
@@ -864,9 +802,6 @@
864
802
  }
865
803
 
866
804
  .leaf-tab {
867
- display: inline-flex;
868
- align-items: center;
869
- justify-content: center;
870
805
  border: none;
871
806
  margin: 0;
872
807
  padding: 0;
@@ -875,9 +810,14 @@
875
810
  color: inherit;
876
811
  font: inherit;
877
812
  font-family: var(--font-sans);
878
- text-align: center;
879
- white-space: nowrap;
880
813
  box-sizing: border-box;
814
+ appearance: none;
815
+ }
816
+
817
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
818
+ .leaf-tabs[hidden],
819
+ .leaf-tab[hidden] {
820
+ display: none;
881
821
  }
882
822
 
883
823
  .leaf-tab:disabled,
@@ -886,9 +826,6 @@
886
826
  }
887
827
 
888
828
  .leaf-tab__label {
889
- display: inline-flex;
890
- align-items: center;
891
- justify-content: center;
892
829
  line-height: inherit;
893
830
  }
894
831
 
@@ -1069,10 +1006,6 @@
1069
1006
  var(--leaf-toggle-width) - var(--leaf-toggle-padding) * 2 - var(--leaf-toggle-thumb)
1070
1007
  );
1071
1008
 
1072
- position: relative;
1073
- display: inline-flex;
1074
- flex-shrink: 0;
1075
- align-items: center;
1076
1009
  box-sizing: border-box;
1077
1010
  width: var(--leaf-toggle-width);
1078
1011
  height: var(--leaf-toggle-height);
@@ -1082,7 +1015,6 @@
1082
1015
  border-radius: 12px;
1083
1016
  background-color: var(--base-quaternary);
1084
1017
  cursor: pointer;
1085
- vertical-align: middle;
1086
1018
  appearance: none;
1087
1019
  -webkit-appearance: none;
1088
1020
  font: inherit;
@@ -1090,10 +1022,12 @@
1090
1022
  transition: background-color 0.2s ease;
1091
1023
  }
1092
1024
 
1025
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
1026
+ .leaf-toggle[hidden] {
1027
+ display: none;
1028
+ }
1029
+
1093
1030
  .leaf-toggle__thumb {
1094
- display: flex;
1095
- align-items: center;
1096
- justify-content: center;
1097
1031
  width: var(--leaf-toggle-thumb);
1098
1032
  height: var(--leaf-toggle-thumb);
1099
1033
  border-radius: 100px;
@@ -1167,13 +1101,6 @@
1167
1101
  */
1168
1102
 
1169
1103
  @layer components {
1170
- .leaf-tooltip-trigger {
1171
- position: relative;
1172
- display: inline-flex;
1173
- max-width: 100%;
1174
- vertical-align: middle;
1175
- }
1176
-
1177
1104
  .leaf-tooltip {
1178
1105
  --leaf-tooltip-pad-y: 8px;
1179
1106
  --leaf-tooltip-pad-x: 16px;
@@ -1188,6 +1115,7 @@
1188
1115
  /* Chiều rộng tam giác thật trong khung. */
1189
1116
  --leaf-tooltip-caret-tip: 12px;
1190
1117
 
1118
+ /* inline-flex — class Leaf; direction / align vẫn ở CSS (đổi theo data-position / data-align) */
1191
1119
  display: inline-flex;
1192
1120
  flex-direction: column;
1193
1121
  align-items: center;
@@ -1206,20 +1134,17 @@
1206
1134
  z-index: var(--leaf-z-tooltip, 110);
1207
1135
  }
1208
1136
 
1209
- /* `display` của .leaf-tooltip thắng `[hidden]` của trình duyệt — bản vanilla ẩn bubble bằng hidden. */
1137
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
1138
+ .leaf-tooltip-trigger[hidden],
1210
1139
  .leaf-tooltip[hidden] {
1211
1140
  display: none;
1212
1141
  }
1213
1142
 
1214
1143
  .leaf-tooltip__body {
1215
- position: relative;
1216
- z-index: 1;
1217
1144
  box-sizing: border-box;
1218
- max-width: 100%;
1219
1145
  padding: var(--leaf-tooltip-pad-y) var(--leaf-tooltip-pad-x);
1220
1146
  border-radius: var(--leaf-tooltip-radius);
1221
1147
  background-color: var(--base-quaternary);
1222
- text-align: left;
1223
1148
  word-break: break-word;
1224
1149
  }
1225
1150
 
@@ -1228,9 +1153,6 @@
1228
1153
  * Mặc định: mũi nhọn xuống (position=top — caret dưới body).
1229
1154
  */
1230
1155
  .leaf-tooltip__caret {
1231
- position: relative;
1232
- display: block;
1233
- flex-shrink: 0;
1234
1156
  width: var(--leaf-tooltip-caret-w);
1235
1157
  height: var(--leaf-tooltip-caret-h);
1236
1158
  background-color: transparent;
@@ -1366,24 +1288,19 @@
1366
1288
  /* --- src/styles/border.css --- */
1367
1289
 
1368
1290
  /*
1369
- * Border radius classes — map 1:1 sang --radius-* trong @finhay/leaf-tokens
1370
- * (Figma 700:4390).
1291
+ * Border classes — map 1:1 sang token trong @finhay/leaf-tokens.
1371
1292
  *
1372
- * Tên class `radius-*` (không dùng `rounded-*`) để không đụng utility bo góc mặc
1373
- * định của Tailwind (`rounded-xl`…). `border-*` đã dành cho màu viền.
1293
+ * Width: `border-s|m|l|xl` (+ biến thể cạnh `border-top-s`…).
1294
+ * Mỗi class set width + `border-style: solid` để một class là thấy viền
1295
+ * (không trông vào CSS reset).
1296
+ * Hậu tố width khác hậu tố màu (`border-primary`… chỉ set border-color).
1297
+ * Không có bậc 0 — không viền thì không gắn class.
1374
1298
  *
1375
- * Hậu tố = bậc token: 0 · xs · s · m · l · xl · 2xl.
1376
- * Chỉ set border-radius — width / style / color do app tự lo.
1299
+ * Radius: `radius-*` → border-radius. Hậu tố: s (4) · m (8) · l (12) · full.
1377
1300
  */
1378
1301
 
1379
1302
  @layer utilities {
1380
- .radius-0 {
1381
- border-radius: var(--radius-0);
1382
- }
1383
-
1384
- .radius-xs {
1385
- border-radius: var(--radius-xs);
1386
- }
1303
+ /* Radius */
1387
1304
 
1388
1305
  .radius-s {
1389
1306
  border-radius: var(--radius-s);
@@ -1397,12 +1314,154 @@
1397
1314
  border-radius: var(--radius-l);
1398
1315
  }
1399
1316
 
1400
- .radius-xl {
1401
- border-radius: var(--radius-xl);
1317
+ .radius-full {
1318
+ border-radius: var(--radius-full);
1319
+ }
1320
+
1321
+ /* All sides */
1322
+
1323
+ .border-s {
1324
+ border-width: var(--border-width-s);
1325
+ border-style: solid;
1326
+ }
1327
+
1328
+ .border-m {
1329
+ border-width: var(--border-width-m);
1330
+ border-style: solid;
1331
+ }
1332
+
1333
+ .border-l {
1334
+ border-width: var(--border-width-l);
1335
+ border-style: solid;
1336
+ }
1337
+
1338
+ .border-xl {
1339
+ border-width: var(--border-width-xl);
1340
+ border-style: solid;
1341
+ }
1342
+
1343
+ /* Per side */
1344
+
1345
+ .border-top-s {
1346
+ border-top-width: var(--border-width-s);
1347
+ border-top-style: solid;
1348
+ }
1349
+
1350
+ .border-top-m {
1351
+ border-top-width: var(--border-width-m);
1352
+ border-top-style: solid;
1353
+ }
1354
+
1355
+ .border-top-l {
1356
+ border-top-width: var(--border-width-l);
1357
+ border-top-style: solid;
1358
+ }
1359
+
1360
+ .border-top-xl {
1361
+ border-top-width: var(--border-width-xl);
1362
+ border-top-style: solid;
1363
+ }
1364
+
1365
+ .border-right-s {
1366
+ border-right-width: var(--border-width-s);
1367
+ border-right-style: solid;
1368
+ }
1369
+
1370
+ .border-right-m {
1371
+ border-right-width: var(--border-width-m);
1372
+ border-right-style: solid;
1373
+ }
1374
+
1375
+ .border-right-l {
1376
+ border-right-width: var(--border-width-l);
1377
+ border-right-style: solid;
1378
+ }
1379
+
1380
+ .border-right-xl {
1381
+ border-right-width: var(--border-width-xl);
1382
+ border-right-style: solid;
1383
+ }
1384
+
1385
+ .border-bottom-s {
1386
+ border-bottom-width: var(--border-width-s);
1387
+ border-bottom-style: solid;
1388
+ }
1389
+
1390
+ .border-bottom-m {
1391
+ border-bottom-width: var(--border-width-m);
1392
+ border-bottom-style: solid;
1393
+ }
1394
+
1395
+ .border-bottom-l {
1396
+ border-bottom-width: var(--border-width-l);
1397
+ border-bottom-style: solid;
1398
+ }
1399
+
1400
+ .border-bottom-xl {
1401
+ border-bottom-width: var(--border-width-xl);
1402
+ border-bottom-style: solid;
1403
+ }
1404
+
1405
+ .border-left-s {
1406
+ border-left-width: var(--border-width-s);
1407
+ border-left-style: solid;
1408
+ }
1409
+
1410
+ .border-left-m {
1411
+ border-left-width: var(--border-width-m);
1412
+ border-left-style: solid;
1413
+ }
1414
+
1415
+ .border-left-l {
1416
+ border-left-width: var(--border-width-l);
1417
+ border-left-style: solid;
1418
+ }
1419
+
1420
+ .border-left-xl {
1421
+ border-left-width: var(--border-width-xl);
1422
+ border-left-style: solid;
1423
+ }
1424
+
1425
+ /* Logical */
1426
+
1427
+ .border-inline-s {
1428
+ border-inline-width: var(--border-width-s);
1429
+ border-inline-style: solid;
1430
+ }
1431
+
1432
+ .border-inline-m {
1433
+ border-inline-width: var(--border-width-m);
1434
+ border-inline-style: solid;
1435
+ }
1436
+
1437
+ .border-inline-l {
1438
+ border-inline-width: var(--border-width-l);
1439
+ border-inline-style: solid;
1440
+ }
1441
+
1442
+ .border-inline-xl {
1443
+ border-inline-width: var(--border-width-xl);
1444
+ border-inline-style: solid;
1445
+ }
1446
+
1447
+ .border-block-s {
1448
+ border-block-width: var(--border-width-s);
1449
+ border-block-style: solid;
1450
+ }
1451
+
1452
+ .border-block-m {
1453
+ border-block-width: var(--border-width-m);
1454
+ border-block-style: solid;
1455
+ }
1456
+
1457
+ .border-block-l {
1458
+ border-block-width: var(--border-width-l);
1459
+ border-block-style: solid;
1402
1460
  }
1403
1461
 
1404
- .radius-2xl {
1405
- border-radius: var(--radius-2xl);
1462
+ .border-block-xl {
1463
+ border-block-width: var(--border-width-xl);
1464
+ border-block-style: solid;
1406
1465
  }
1407
1466
  }
1408
1467
 
@@ -1414,33 +1473,28 @@
1414
1473
  * Quy tắc tên: **tiền tố nói thuộc tính, phần sau nói vai trò của token**.
1415
1474
  *
1416
1475
  * text-* → color (text-primary, text-red)
1417
- * base-* → background-color (base-primary, base-red)
1476
+ * bg-* → background-color (bg-primary, bg-red) — token vẫn là --base-*
1418
1477
  * border-* → border-color (border-primary, border-red)
1419
1478
  *
1420
- * Ba bộ dùng chung một hậu tố nên đọc là đoán được: `text-red` / `base-red` /
1421
- * `border-red`, `text-primary` / `base-primary` / `border-primary`. Nhóm system
1479
+ * Ba bộ dùng chung một hậu tố nên đọc là đoán được: `text-red` / `bg-red` /
1480
+ * `border-red`, `text-primary` / `bg-primary` / `border-primary`. Nhóm system
1422
1481
  * bỏ chữ `system` trong tên class (token vẫn là `--system-red`), còn `border-*`
1423
1482
  * lấy màu từ thang base vì viền luôn là màu bề mặt. Secondary của system giữ
1424
1483
  * hậu tố `-secondary` (vd. `text-red-secondary` ↔ `--system-red-secondary`).
1425
1484
  *
1426
1485
  * Mỗi class chỉ set đúng 1 thuộc tính (color / background-color / border-color)
1427
- * — border-width và border-style do app tự lo. Class tự đổi giá trị theo
1428
- * `[data-theme="light"]` vì nó trỏ vào var, không hard-code màu.
1486
+ * — độ dày / style viền dùng class width (`border-s`…) trong `border.css`.
1487
+ * Class tự đổi giá trị theo `[data-theme="light"]` vì nó trỏ vào var, không hard-code màu.
1429
1488
  *
1430
1489
  * Chỉ semantic token mới có class. Primitive (--neutral-500, --brand-300…) là
1431
1490
  * nguồn nội bộ, không dùng thẳng trong UI.
1432
1491
  *
1433
1492
  * ─ Vì sao `@layer utilities` ─────────────────────────────────────────────────
1434
1493
  *
1435
- * Màu của Leaf là token gốc, trùng tên thì phải thắng. Đặt chung layer với
1436
- * utility của Tailwind, và app import file này SAU `@import "tailwindcss"`, nên
1437
- * khi app cũng khai báo `--color-primary` / `--color-red` trong `@theme` thì
1438
- * `.text-primary` của Leaf (cùng specificity, đứng sau) là cái có hiệu lực.
1494
+ * Màu của Leaf là token gốc, trùng tên thì phải thắng. Đặt ở layer cao nhất
1495
+ * nên `.text-primary` của Leaf luôn có hiệu lực khi trùng tên.
1439
1496
  *
1440
- * Biến thể trạng thái vẫn override được vì pseudo-class cộng thêm specificity:
1441
- * `hover:text-[var(--text-highlight)]`, `focus:…` thắng bình thường. Riêng biến
1442
- * thể responsive (`md:`, `lg:`) cùng specificity và được Tailwind ghi ra trước
1443
- * file này nên phải thêm important modifier: `md:text-[var(--text-secondary)]!`.
1497
+ * Biến thể trạng thái vẫn override được vì pseudo-class cộng thêm specificity.
1444
1498
  */
1445
1499
 
1446
1500
  @layer utilities {
@@ -1516,79 +1570,79 @@
1516
1570
  color: var(--system-purple-secondary);
1517
1571
  }
1518
1572
 
1519
- /* Background — base */
1573
+ /* Background — surface (--base-*) + system */
1520
1574
 
1521
- .base-highlight {
1575
+ .bg-highlight {
1522
1576
  background-color: var(--text-highlight);
1523
1577
  }
1524
1578
 
1525
- .base-primary {
1579
+ .bg-primary {
1526
1580
  background-color: var(--base-primary);
1527
1581
  }
1528
1582
 
1529
- .base-secondary {
1583
+ .bg-secondary {
1530
1584
  background-color: var(--base-secondary);
1531
1585
  }
1532
1586
 
1533
- .base-tertiary {
1587
+ .bg-tertiary {
1534
1588
  background-color: var(--base-tertiary);
1535
1589
  }
1536
1590
 
1537
- .base-quaternary {
1591
+ .bg-quaternary {
1538
1592
  background-color: var(--base-quaternary);
1539
1593
  }
1540
1594
 
1541
- .base-quinary {
1595
+ .bg-quinary {
1542
1596
  background-color: var(--base-quinary);
1543
1597
  }
1544
1598
 
1545
1599
  /* Background — system */
1546
1600
 
1547
- .base-blue {
1601
+ .bg-blue {
1548
1602
  background-color: var(--system-blue);
1549
1603
  }
1550
1604
 
1551
- .base-green {
1605
+ .bg-green {
1552
1606
  background-color: var(--system-green);
1553
1607
  }
1554
1608
 
1555
- .base-yellow {
1609
+ .bg-yellow {
1556
1610
  background-color: var(--system-yellow);
1557
1611
  }
1558
1612
 
1559
- .base-orange {
1613
+ .bg-orange {
1560
1614
  background-color: var(--system-orange);
1561
1615
  }
1562
1616
 
1563
- .base-red {
1617
+ .bg-red {
1564
1618
  background-color: var(--system-red);
1565
1619
  }
1566
1620
 
1567
- .base-purple {
1621
+ .bg-purple {
1568
1622
  background-color: var(--system-purple);
1569
1623
  }
1570
1624
 
1571
- .base-blue-secondary {
1625
+ .bg-blue-secondary {
1572
1626
  background-color: var(--system-blue-secondary);
1573
1627
  }
1574
1628
 
1575
- .base-green-secondary {
1629
+ .bg-green-secondary {
1576
1630
  background-color: var(--system-green-secondary);
1577
1631
  }
1578
1632
 
1579
- .base-yellow-secondary {
1633
+ .bg-yellow-secondary {
1580
1634
  background-color: var(--system-yellow-secondary);
1581
1635
  }
1582
1636
 
1583
- .base-orange-secondary {
1637
+ .bg-orange-secondary {
1584
1638
  background-color: var(--system-orange-secondary);
1585
1639
  }
1586
1640
 
1587
- .base-red-secondary {
1641
+ .bg-red-secondary {
1588
1642
  background-color: var(--system-red-secondary);
1589
1643
  }
1590
1644
 
1591
- .base-purple-secondary {
1645
+ .bg-purple-secondary {
1592
1646
  background-color: var(--system-purple-secondary);
1593
1647
  }
1594
1648
 
@@ -1669,96 +1723,1444 @@
1669
1723
  }
1670
1724
  }
1671
1725
 
1672
- /* --- src/styles/spacing.css --- */
1726
+ /* --- src/styles/flex.css --- */
1673
1727
 
1674
1728
  /*
1675
- * Spacing classes — map 1:1 sang --spacing-* trong @finhay/leaf-tokens (Figma 34:1034).
1729
+ * Flex + alignment classes.
1676
1730
  *
1677
- * Tiền tố = thuộc tính (giống color): p-* / m-* / gap-* (+ biến thể hướng).
1678
- * Hậu tố = bậc token: 0 · xs · s · m · l · xl · 2xl … 7xl.
1731
+ * Display, hướng, wrap, grow/shrink/basis, và căn chỉnh (justify / items / self /
1732
+ * content). Nhóm căn chỉnh dùng chung cho grid.
1679
1733
  *
1680
- * Chỉ set đúng 1 thuộc tính spacing — không đụng width/height/radius.
1681
- * Nằm trong @layer utilities để Leaf thắng khi trùng tên với utility Tailwind
1682
- * (import sau @import "tailwindcss"), giống color.css.
1734
+ * Nằm trong @layer components — SCSS module (ngoài layer) đè được class Leaf.
1735
+ *
1736
+ * `.flex[hidden]`… specificity cao hơn class display nên `hidden` luôn ẩn.
1683
1737
  */
1684
1738
 
1685
- @layer utilities {
1686
- /* Padding */
1739
+ @layer components {
1740
+ .block {
1741
+ display: block;
1742
+ }
1687
1743
 
1688
- .p-0 {
1689
- padding: var(--spacing-0);
1744
+ .inline-block {
1745
+ display: inline-block;
1690
1746
  }
1691
1747
 
1692
- .p-xs {
1693
- padding: var(--spacing-xs);
1748
+ .inline {
1749
+ display: inline;
1694
1750
  }
1695
1751
 
1696
- .p-s {
1697
- padding: var(--spacing-s);
1752
+ .hidden {
1753
+ display: none;
1698
1754
  }
1699
1755
 
1700
- .p-m {
1701
- padding: var(--spacing-m);
1756
+ .flex {
1757
+ display: flex;
1702
1758
  }
1703
1759
 
1704
- .p-l {
1705
- padding: var(--spacing-l);
1760
+ .inline-flex {
1761
+ display: inline-flex;
1706
1762
  }
1707
1763
 
1708
- .p-xl {
1709
- padding: var(--spacing-xl);
1764
+ .block[hidden],
1765
+ .inline-block[hidden],
1766
+ .inline[hidden],
1767
+ .flex[hidden],
1768
+ .inline-flex[hidden] {
1769
+ display: none;
1710
1770
  }
1711
1771
 
1712
- .p-2xl {
1713
- padding: var(--spacing-2xl);
1772
+ .flex-row {
1773
+ flex-direction: row;
1714
1774
  }
1715
1775
 
1716
- .p-3xl {
1717
- padding: var(--spacing-3xl);
1776
+ .flex-row-reverse {
1777
+ flex-direction: row-reverse;
1718
1778
  }
1719
1779
 
1720
- .p-4xl {
1721
- padding: var(--spacing-4xl);
1780
+ .flex-col {
1781
+ flex-direction: column;
1722
1782
  }
1723
1783
 
1724
- .p-5xl {
1725
- padding: var(--spacing-5xl);
1784
+ .flex-col-reverse {
1785
+ flex-direction: column-reverse;
1726
1786
  }
1727
1787
 
1728
- .p-6xl {
1729
- padding: var(--spacing-6xl);
1788
+ .flex-wrap {
1789
+ flex-wrap: wrap;
1730
1790
  }
1731
1791
 
1732
- .p-7xl {
1733
- padding: var(--spacing-7xl);
1792
+ .flex-wrap-reverse {
1793
+ flex-wrap: wrap-reverse;
1734
1794
  }
1735
1795
 
1736
- .px-0 {
1737
- padding-inline: var(--spacing-0);
1796
+ .flex-nowrap {
1797
+ flex-wrap: nowrap;
1738
1798
  }
1739
1799
 
1740
- .px-xs {
1741
- padding-inline: var(--spacing-xs);
1800
+ .flex-1 {
1801
+ flex: 1;
1742
1802
  }
1743
1803
 
1744
- .px-s {
1745
- padding-inline: var(--spacing-s);
1804
+ .flex-auto {
1805
+ flex: auto;
1746
1806
  }
1747
1807
 
1748
- .px-m {
1749
- padding-inline: var(--spacing-m);
1808
+ .flex-initial {
1809
+ flex: 0 auto;
1750
1810
  }
1751
1811
 
1752
- .px-l {
1753
- padding-inline: var(--spacing-l);
1812
+ .flex-none {
1813
+ flex: none;
1754
1814
  }
1755
1815
 
1756
- .px-xl {
1757
- padding-inline: var(--spacing-xl);
1816
+ .grow {
1817
+ flex-grow: 1;
1758
1818
  }
1759
1819
 
1760
- .px-2xl {
1761
- padding-inline: var(--spacing-2xl);
1820
+ .grow-0 {
1821
+ flex-grow: 0;
1822
+ }
1823
+
1824
+ .shrink {
1825
+ flex-shrink: 1;
1826
+ }
1827
+
1828
+ .shrink-0 {
1829
+ flex-shrink: 0;
1830
+ }
1831
+
1832
+ .basis-0 {
1833
+ flex-basis: 0px;
1834
+ }
1835
+
1836
+ .basis-auto {
1837
+ flex-basis: auto;
1838
+ }
1839
+
1840
+ .basis-full {
1841
+ flex-basis: 100%;
1842
+ }
1843
+
1844
+ .justify-start {
1845
+ justify-content: flex-start;
1846
+ }
1847
+
1848
+ .justify-end {
1849
+ justify-content: flex-end;
1850
+ }
1851
+
1852
+ .justify-center {
1853
+ justify-content: center;
1854
+ }
1855
+
1856
+ .justify-between {
1857
+ justify-content: space-between;
1858
+ }
1859
+
1860
+ .justify-around {
1861
+ justify-content: space-around;
1862
+ }
1863
+
1864
+ .justify-evenly {
1865
+ justify-content: space-evenly;
1866
+ }
1867
+
1868
+ .justify-stretch {
1869
+ justify-content: stretch;
1870
+ }
1871
+
1872
+ .justify-normal {
1873
+ justify-content: normal;
1874
+ }
1875
+
1876
+ .items-start {
1877
+ align-items: flex-start;
1878
+ }
1879
+
1880
+ .items-end {
1881
+ align-items: flex-end;
1882
+ }
1883
+
1884
+ .items-center {
1885
+ align-items: center;
1886
+ }
1887
+
1888
+ .items-baseline {
1889
+ align-items: baseline;
1890
+ }
1891
+
1892
+ .items-stretch {
1893
+ align-items: stretch;
1894
+ }
1895
+
1896
+ .self-auto {
1897
+ align-self: auto;
1898
+ }
1899
+
1900
+ .self-start {
1901
+ align-self: flex-start;
1902
+ }
1903
+
1904
+ .self-end {
1905
+ align-self: flex-end;
1906
+ }
1907
+
1908
+ .self-center {
1909
+ align-self: center;
1910
+ }
1911
+
1912
+ .self-baseline {
1913
+ align-self: baseline;
1914
+ }
1915
+
1916
+ .self-stretch {
1917
+ align-self: stretch;
1918
+ }
1919
+
1920
+ .content-start {
1921
+ align-content: flex-start;
1922
+ }
1923
+
1924
+ .content-end {
1925
+ align-content: flex-end;
1926
+ }
1927
+
1928
+ .content-center {
1929
+ align-content: center;
1930
+ }
1931
+
1932
+ .content-between {
1933
+ align-content: space-between;
1934
+ }
1935
+
1936
+ .content-around {
1937
+ align-content: space-around;
1938
+ }
1939
+
1940
+ .content-evenly {
1941
+ align-content: space-evenly;
1942
+ }
1943
+
1944
+ .content-stretch {
1945
+ align-content: stretch;
1946
+ }
1947
+
1948
+ .content-normal {
1949
+ align-content: normal;
1950
+ }
1951
+ }
1952
+
1953
+ /* --- src/styles/grid.css --- */
1954
+
1955
+ /*
1956
+ * Grid classes.
1957
+ *
1958
+ * Display, template columns/rows, span/start/end, flow, auto-cols/rows, và
1959
+ * place/justify-items/self. Gap dùng class spacing (`gap-*`).
1960
+ *
1961
+ * Nằm trong @layer components (cùng lý do với flex.css).
1962
+ */
1963
+
1964
+ @layer components {
1965
+ .grid {
1966
+ display: grid;
1967
+ }
1968
+
1969
+ .inline-grid {
1970
+ display: inline-grid;
1971
+ }
1972
+
1973
+ /* `hidden` luôn ẩn — cùng lý do với flex.css. */
1974
+ .grid[hidden],
1975
+ .inline-grid[hidden] {
1976
+ display: none;
1977
+ }
1978
+
1979
+ .grid-cols-1 {
1980
+ grid-template-columns: repeat(1, minmax(0, 1fr));
1981
+ }
1982
+
1983
+ .grid-cols-2 {
1984
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1985
+ }
1986
+
1987
+ .grid-cols-3 {
1988
+ grid-template-columns: repeat(3, minmax(0, 1fr));
1989
+ }
1990
+
1991
+ .grid-cols-4 {
1992
+ grid-template-columns: repeat(4, minmax(0, 1fr));
1993
+ }
1994
+
1995
+ .grid-cols-5 {
1996
+ grid-template-columns: repeat(5, minmax(0, 1fr));
1997
+ }
1998
+
1999
+ .grid-cols-6 {
2000
+ grid-template-columns: repeat(6, minmax(0, 1fr));
2001
+ }
2002
+
2003
+ .grid-cols-7 {
2004
+ grid-template-columns: repeat(7, minmax(0, 1fr));
2005
+ }
2006
+
2007
+ .grid-cols-8 {
2008
+ grid-template-columns: repeat(8, minmax(0, 1fr));
2009
+ }
2010
+
2011
+ .grid-cols-9 {
2012
+ grid-template-columns: repeat(9, minmax(0, 1fr));
2013
+ }
2014
+
2015
+ .grid-cols-10 {
2016
+ grid-template-columns: repeat(10, minmax(0, 1fr));
2017
+ }
2018
+
2019
+ .grid-cols-11 {
2020
+ grid-template-columns: repeat(11, minmax(0, 1fr));
2021
+ }
2022
+
2023
+ .grid-cols-12 {
2024
+ grid-template-columns: repeat(12, minmax(0, 1fr));
2025
+ }
2026
+
2027
+ .grid-cols-none {
2028
+ grid-template-columns: none;
2029
+ }
2030
+
2031
+ .grid-cols-subgrid {
2032
+ grid-template-columns: subgrid;
2033
+ }
2034
+
2035
+ .col-span-1 {
2036
+ grid-column: span 1 / span 1;
2037
+ }
2038
+
2039
+ .col-span-2 {
2040
+ grid-column: span 2 / span 2;
2041
+ }
2042
+
2043
+ .col-span-3 {
2044
+ grid-column: span 3 / span 3;
2045
+ }
2046
+
2047
+ .col-span-4 {
2048
+ grid-column: span 4 / span 4;
2049
+ }
2050
+
2051
+ .col-span-5 {
2052
+ grid-column: span 5 / span 5;
2053
+ }
2054
+
2055
+ .col-span-6 {
2056
+ grid-column: span 6 / span 6;
2057
+ }
2058
+
2059
+ .col-span-7 {
2060
+ grid-column: span 7 / span 7;
2061
+ }
2062
+
2063
+ .col-span-8 {
2064
+ grid-column: span 8 / span 8;
2065
+ }
2066
+
2067
+ .col-span-9 {
2068
+ grid-column: span 9 / span 9;
2069
+ }
2070
+
2071
+ .col-span-10 {
2072
+ grid-column: span 10 / span 10;
2073
+ }
2074
+
2075
+ .col-span-11 {
2076
+ grid-column: span 11 / span 11;
2077
+ }
2078
+
2079
+ .col-span-12 {
2080
+ grid-column: span 12 / span 12;
2081
+ }
2082
+
2083
+ .col-span-full {
2084
+ grid-column: 1 / -1;
2085
+ }
2086
+
2087
+ .col-auto {
2088
+ grid-column: auto;
2089
+ }
2090
+
2091
+ .col-start-1 {
2092
+ grid-column-start: 1;
2093
+ }
2094
+
2095
+ .col-start-2 {
2096
+ grid-column-start: 2;
2097
+ }
2098
+
2099
+ .col-start-3 {
2100
+ grid-column-start: 3;
2101
+ }
2102
+
2103
+ .col-start-4 {
2104
+ grid-column-start: 4;
2105
+ }
2106
+
2107
+ .col-start-5 {
2108
+ grid-column-start: 5;
2109
+ }
2110
+
2111
+ .col-start-6 {
2112
+ grid-column-start: 6;
2113
+ }
2114
+
2115
+ .col-start-7 {
2116
+ grid-column-start: 7;
2117
+ }
2118
+
2119
+ .col-start-8 {
2120
+ grid-column-start: 8;
2121
+ }
2122
+
2123
+ .col-start-9 {
2124
+ grid-column-start: 9;
2125
+ }
2126
+
2127
+ .col-start-10 {
2128
+ grid-column-start: 10;
2129
+ }
2130
+
2131
+ .col-start-11 {
2132
+ grid-column-start: 11;
2133
+ }
2134
+
2135
+ .col-start-12 {
2136
+ grid-column-start: 12;
2137
+ }
2138
+
2139
+ .col-start-13 {
2140
+ grid-column-start: 13;
2141
+ }
2142
+
2143
+ .col-start-auto {
2144
+ grid-column-start: auto;
2145
+ }
2146
+
2147
+ .col-end-1 {
2148
+ grid-column-end: 1;
2149
+ }
2150
+
2151
+ .col-end-2 {
2152
+ grid-column-end: 2;
2153
+ }
2154
+
2155
+ .col-end-3 {
2156
+ grid-column-end: 3;
2157
+ }
2158
+
2159
+ .col-end-4 {
2160
+ grid-column-end: 4;
2161
+ }
2162
+
2163
+ .col-end-5 {
2164
+ grid-column-end: 5;
2165
+ }
2166
+
2167
+ .col-end-6 {
2168
+ grid-column-end: 6;
2169
+ }
2170
+
2171
+ .col-end-7 {
2172
+ grid-column-end: 7;
2173
+ }
2174
+
2175
+ .col-end-8 {
2176
+ grid-column-end: 8;
2177
+ }
2178
+
2179
+ .col-end-9 {
2180
+ grid-column-end: 9;
2181
+ }
2182
+
2183
+ .col-end-10 {
2184
+ grid-column-end: 10;
2185
+ }
2186
+
2187
+ .col-end-11 {
2188
+ grid-column-end: 11;
2189
+ }
2190
+
2191
+ .col-end-12 {
2192
+ grid-column-end: 12;
2193
+ }
2194
+
2195
+ .col-end-13 {
2196
+ grid-column-end: 13;
2197
+ }
2198
+
2199
+ .col-end-auto {
2200
+ grid-column-end: auto;
2201
+ }
2202
+
2203
+ .grid-rows-1 {
2204
+ grid-template-rows: repeat(1, minmax(0, 1fr));
2205
+ }
2206
+
2207
+ .grid-rows-2 {
2208
+ grid-template-rows: repeat(2, minmax(0, 1fr));
2209
+ }
2210
+
2211
+ .grid-rows-3 {
2212
+ grid-template-rows: repeat(3, minmax(0, 1fr));
2213
+ }
2214
+
2215
+ .grid-rows-4 {
2216
+ grid-template-rows: repeat(4, minmax(0, 1fr));
2217
+ }
2218
+
2219
+ .grid-rows-5 {
2220
+ grid-template-rows: repeat(5, minmax(0, 1fr));
2221
+ }
2222
+
2223
+ .grid-rows-6 {
2224
+ grid-template-rows: repeat(6, minmax(0, 1fr));
2225
+ }
2226
+
2227
+ .grid-rows-none {
2228
+ grid-template-rows: none;
2229
+ }
2230
+
2231
+ .grid-rows-subgrid {
2232
+ grid-template-rows: subgrid;
2233
+ }
2234
+
2235
+ .row-span-1 {
2236
+ grid-row: span 1 / span 1;
2237
+ }
2238
+
2239
+ .row-span-2 {
2240
+ grid-row: span 2 / span 2;
2241
+ }
2242
+
2243
+ .row-span-3 {
2244
+ grid-row: span 3 / span 3;
2245
+ }
2246
+
2247
+ .row-span-4 {
2248
+ grid-row: span 4 / span 4;
2249
+ }
2250
+
2251
+ .row-span-5 {
2252
+ grid-row: span 5 / span 5;
2253
+ }
2254
+
2255
+ .row-span-6 {
2256
+ grid-row: span 6 / span 6;
2257
+ }
2258
+
2259
+ .row-span-full {
2260
+ grid-row: 1 / -1;
2261
+ }
2262
+
2263
+ .row-auto {
2264
+ grid-row: auto;
2265
+ }
2266
+
2267
+ .row-start-1 {
2268
+ grid-row-start: 1;
2269
+ }
2270
+
2271
+ .row-start-2 {
2272
+ grid-row-start: 2;
2273
+ }
2274
+
2275
+ .row-start-3 {
2276
+ grid-row-start: 3;
2277
+ }
2278
+
2279
+ .row-start-4 {
2280
+ grid-row-start: 4;
2281
+ }
2282
+
2283
+ .row-start-5 {
2284
+ grid-row-start: 5;
2285
+ }
2286
+
2287
+ .row-start-6 {
2288
+ grid-row-start: 6;
2289
+ }
2290
+
2291
+ .row-start-7 {
2292
+ grid-row-start: 7;
2293
+ }
2294
+
2295
+ .row-start-auto {
2296
+ grid-row-start: auto;
2297
+ }
2298
+
2299
+ .row-end-1 {
2300
+ grid-row-end: 1;
2301
+ }
2302
+
2303
+ .row-end-2 {
2304
+ grid-row-end: 2;
2305
+ }
2306
+
2307
+ .row-end-3 {
2308
+ grid-row-end: 3;
2309
+ }
2310
+
2311
+ .row-end-4 {
2312
+ grid-row-end: 4;
2313
+ }
2314
+
2315
+ .row-end-5 {
2316
+ grid-row-end: 5;
2317
+ }
2318
+
2319
+ .row-end-6 {
2320
+ grid-row-end: 6;
2321
+ }
2322
+
2323
+ .row-end-7 {
2324
+ grid-row-end: 7;
2325
+ }
2326
+
2327
+ .row-end-auto {
2328
+ grid-row-end: auto;
2329
+ }
2330
+
2331
+ .grid-flow-row {
2332
+ grid-auto-flow: row;
2333
+ }
2334
+
2335
+ .grid-flow-col {
2336
+ grid-auto-flow: column;
2337
+ }
2338
+
2339
+ .grid-flow-dense {
2340
+ grid-auto-flow: dense;
2341
+ }
2342
+
2343
+ .grid-flow-row-dense {
2344
+ grid-auto-flow: row dense;
2345
+ }
2346
+
2347
+ .grid-flow-col-dense {
2348
+ grid-auto-flow: column dense;
2349
+ }
2350
+
2351
+ .auto-cols-auto {
2352
+ grid-auto-columns: auto;
2353
+ }
2354
+
2355
+ .auto-cols-min {
2356
+ grid-auto-columns: min-content;
2357
+ }
2358
+
2359
+ .auto-cols-max {
2360
+ grid-auto-columns: max-content;
2361
+ }
2362
+
2363
+ .auto-cols-fr {
2364
+ grid-auto-columns: minmax(0, 1fr);
2365
+ }
2366
+
2367
+ .auto-rows-auto {
2368
+ grid-auto-rows: auto;
2369
+ }
2370
+
2371
+ .auto-rows-min {
2372
+ grid-auto-rows: min-content;
2373
+ }
2374
+
2375
+ .auto-rows-max {
2376
+ grid-auto-rows: max-content;
2377
+ }
2378
+
2379
+ .auto-rows-fr {
2380
+ grid-auto-rows: minmax(0, 1fr);
2381
+ }
2382
+
2383
+ .justify-items-start {
2384
+ justify-items: start;
2385
+ }
2386
+
2387
+ .justify-items-end {
2388
+ justify-items: end;
2389
+ }
2390
+
2391
+ .justify-items-center {
2392
+ justify-items: center;
2393
+ }
2394
+
2395
+ .justify-items-stretch {
2396
+ justify-items: stretch;
2397
+ }
2398
+
2399
+ .justify-self-auto {
2400
+ justify-self: auto;
2401
+ }
2402
+
2403
+ .justify-self-start {
2404
+ justify-self: flex-start;
2405
+ }
2406
+
2407
+ .justify-self-end {
2408
+ justify-self: flex-end;
2409
+ }
2410
+
2411
+ .justify-self-center {
2412
+ justify-self: center;
2413
+ }
2414
+
2415
+ .justify-self-stretch {
2416
+ justify-self: stretch;
2417
+ }
2418
+
2419
+ .place-content-center {
2420
+ place-content: center;
2421
+ }
2422
+
2423
+ .place-content-start {
2424
+ place-content: start;
2425
+ }
2426
+
2427
+ .place-content-end {
2428
+ place-content: end;
2429
+ }
2430
+
2431
+ .place-content-between {
2432
+ place-content: space-between;
2433
+ }
2434
+
2435
+ .place-content-around {
2436
+ place-content: space-around;
2437
+ }
2438
+
2439
+ .place-content-evenly {
2440
+ place-content: space-evenly;
2441
+ }
2442
+
2443
+ .place-content-stretch {
2444
+ place-content: stretch;
2445
+ }
2446
+
2447
+ .place-items-start {
2448
+ place-items: start;
2449
+ }
2450
+
2451
+ .place-items-end {
2452
+ place-items: end;
2453
+ }
2454
+
2455
+ .place-items-center {
2456
+ place-items: center;
2457
+ }
2458
+
2459
+ .place-items-stretch {
2460
+ place-items: stretch;
2461
+ }
2462
+
2463
+ .place-self-auto {
2464
+ place-self: auto;
2465
+ }
2466
+
2467
+ .place-self-start {
2468
+ place-self: start;
2469
+ }
2470
+
2471
+ .place-self-end {
2472
+ place-self: end;
2473
+ }
2474
+
2475
+ .place-self-center {
2476
+ place-self: center;
2477
+ }
2478
+
2479
+ .place-self-stretch {
2480
+ place-self: stretch;
2481
+ }
2482
+ }
2483
+
2484
+ /* --- src/styles/overflow.css --- */
2485
+
2486
+ /*
2487
+ * Overflow classes.
2488
+ *
2489
+ * Nằm trong @layer components (cùng lý do với flex.css).
2490
+ */
2491
+
2492
+ @layer components {
2493
+ .overflow-auto {
2494
+ overflow: auto;
2495
+ }
2496
+
2497
+ .overflow-hidden {
2498
+ overflow: hidden;
2499
+ }
2500
+
2501
+ .overflow-clip {
2502
+ overflow: clip;
2503
+ }
2504
+
2505
+ .overflow-visible {
2506
+ overflow: visible;
2507
+ }
2508
+
2509
+ .overflow-scroll {
2510
+ overflow: scroll;
2511
+ }
2512
+
2513
+ .overflow-x-auto {
2514
+ overflow-x: auto;
2515
+ }
2516
+
2517
+ .overflow-x-hidden {
2518
+ overflow-x: hidden;
2519
+ }
2520
+
2521
+ .overflow-x-clip {
2522
+ overflow-x: clip;
2523
+ }
2524
+
2525
+ .overflow-x-visible {
2526
+ overflow-x: visible;
2527
+ }
2528
+
2529
+ .overflow-x-scroll {
2530
+ overflow-x: scroll;
2531
+ }
2532
+
2533
+ .overflow-y-auto {
2534
+ overflow-y: auto;
2535
+ }
2536
+
2537
+ .overflow-y-hidden {
2538
+ overflow-y: hidden;
2539
+ }
2540
+
2541
+ .overflow-y-clip {
2542
+ overflow-y: clip;
2543
+ }
2544
+
2545
+ .overflow-y-visible {
2546
+ overflow-y: visible;
2547
+ }
2548
+
2549
+ .overflow-y-scroll {
2550
+ overflow-y: scroll;
2551
+ }
2552
+ }
2553
+
2554
+ /* --- src/styles/position.css --- */
2555
+
2556
+ /*
2557
+ * Position classes — position, inset cơ bản, z-index scale.
2558
+ *
2559
+ * Nằm trong @layer components (cùng lý do với flex.css).
2560
+ */
2561
+
2562
+ @layer components {
2563
+ .static {
2564
+ position: static;
2565
+ }
2566
+
2567
+ .relative {
2568
+ position: relative;
2569
+ }
2570
+
2571
+ .absolute {
2572
+ position: absolute;
2573
+ }
2574
+
2575
+ .fixed {
2576
+ position: fixed;
2577
+ }
2578
+
2579
+ .sticky {
2580
+ position: sticky;
2581
+ }
2582
+
2583
+ .inset-0 {
2584
+ inset: 0px;
2585
+ }
2586
+
2587
+ .inset-auto {
2588
+ inset: auto;
2589
+ }
2590
+
2591
+ .inset-x-0 {
2592
+ inset-inline: 0px;
2593
+ }
2594
+
2595
+ .inset-y-0 {
2596
+ inset-block: 0px;
2597
+ }
2598
+
2599
+ .top-0 {
2600
+ top: 0px;
2601
+ }
2602
+
2603
+ .top-auto {
2604
+ top: auto;
2605
+ }
2606
+
2607
+ .top-full {
2608
+ top: 100%;
2609
+ }
2610
+
2611
+ .top-1\/2 {
2612
+ top: calc(1 / 2 * 100%);
2613
+ }
2614
+
2615
+ .right-0 {
2616
+ right: 0px;
2617
+ }
2618
+
2619
+ .right-auto {
2620
+ right: auto;
2621
+ }
2622
+
2623
+ .right-full {
2624
+ right: 100%;
2625
+ }
2626
+
2627
+ .right-1\/2 {
2628
+ right: calc(1 / 2 * 100%);
2629
+ }
2630
+
2631
+ .bottom-0 {
2632
+ bottom: 0px;
2633
+ }
2634
+
2635
+ .bottom-auto {
2636
+ bottom: auto;
2637
+ }
2638
+
2639
+ .bottom-full {
2640
+ bottom: 100%;
2641
+ }
2642
+
2643
+ .bottom-1\/2 {
2644
+ bottom: calc(1 / 2 * 100%);
2645
+ }
2646
+
2647
+ .left-0 {
2648
+ left: 0px;
2649
+ }
2650
+
2651
+ .left-auto {
2652
+ left: auto;
2653
+ }
2654
+
2655
+ .left-full {
2656
+ left: 100%;
2657
+ }
2658
+
2659
+ .left-1\/2 {
2660
+ left: calc(1 / 2 * 100%);
2661
+ }
2662
+
2663
+ .z-0 {
2664
+ z-index: 0;
2665
+ }
2666
+
2667
+ .z-10 {
2668
+ z-index: 10;
2669
+ }
2670
+
2671
+ .z-20 {
2672
+ z-index: 20;
2673
+ }
2674
+
2675
+ .z-30 {
2676
+ z-index: 30;
2677
+ }
2678
+
2679
+ .z-40 {
2680
+ z-index: 40;
2681
+ }
2682
+
2683
+ .z-50 {
2684
+ z-index: 50;
2685
+ }
2686
+
2687
+ .z-auto {
2688
+ z-index: auto;
2689
+ }
2690
+ }
2691
+
2692
+ /* --- src/styles/sizing.css --- */
2693
+
2694
+ /*
2695
+ * Sizing classes — keyword + phân số.
2696
+ *
2697
+ * Chỉ size tương đối / keyword (`full`, `auto`, `1/2`…). Size cố định (w-80…)
2698
+ * để app viết trong SCSS module.
2699
+ *
2700
+ * Nằm trong @layer components (cùng lý do với flex.css).
2701
+ */
2702
+
2703
+ @layer components {
2704
+ .w-0 {
2705
+ width: 0px;
2706
+ }
2707
+
2708
+ .w-px {
2709
+ width: 1px;
2710
+ }
2711
+
2712
+ .w-full {
2713
+ width: 100%;
2714
+ }
2715
+
2716
+ .w-auto {
2717
+ width: auto;
2718
+ }
2719
+
2720
+ .w-fit {
2721
+ width: fit-content;
2722
+ }
2723
+
2724
+ .w-min {
2725
+ width: min-content;
2726
+ }
2727
+
2728
+ .w-max {
2729
+ width: max-content;
2730
+ }
2731
+
2732
+ .w-screen {
2733
+ width: 100vw;
2734
+ }
2735
+
2736
+ .h-0 {
2737
+ height: 0px;
2738
+ }
2739
+
2740
+ .h-px {
2741
+ height: 1px;
2742
+ }
2743
+
2744
+ .h-full {
2745
+ height: 100%;
2746
+ }
2747
+
2748
+ .h-auto {
2749
+ height: auto;
2750
+ }
2751
+
2752
+ .h-fit {
2753
+ height: fit-content;
2754
+ }
2755
+
2756
+ .h-min {
2757
+ height: min-content;
2758
+ }
2759
+
2760
+ .h-max {
2761
+ height: max-content;
2762
+ }
2763
+
2764
+ .h-screen {
2765
+ height: 100vh;
2766
+ }
2767
+
2768
+ .h-dvh {
2769
+ height: 100dvh;
2770
+ }
2771
+
2772
+ .w-1\/2 {
2773
+ width: calc(1 / 2 * 100%);
2774
+ }
2775
+
2776
+ .w-1\/3 {
2777
+ width: calc(1 / 3 * 100%);
2778
+ }
2779
+
2780
+ .w-2\/3 {
2781
+ width: calc(2 / 3 * 100%);
2782
+ }
2783
+
2784
+ .w-1\/4 {
2785
+ width: calc(1 / 4 * 100%);
2786
+ }
2787
+
2788
+ .w-2\/4 {
2789
+ width: calc(2 / 4 * 100%);
2790
+ }
2791
+
2792
+ .w-3\/4 {
2793
+ width: calc(3 / 4 * 100%);
2794
+ }
2795
+
2796
+ .w-1\/5 {
2797
+ width: calc(1 / 5 * 100%);
2798
+ }
2799
+
2800
+ .w-2\/5 {
2801
+ width: calc(2 / 5 * 100%);
2802
+ }
2803
+
2804
+ .w-3\/5 {
2805
+ width: calc(3 / 5 * 100%);
2806
+ }
2807
+
2808
+ .w-4\/5 {
2809
+ width: calc(4 / 5 * 100%);
2810
+ }
2811
+
2812
+ .w-1\/6 {
2813
+ width: calc(1 / 6 * 100%);
2814
+ }
2815
+
2816
+ .w-2\/6 {
2817
+ width: calc(2 / 6 * 100%);
2818
+ }
2819
+
2820
+ .w-3\/6 {
2821
+ width: calc(3 / 6 * 100%);
2822
+ }
2823
+
2824
+ .w-4\/6 {
2825
+ width: calc(4 / 6 * 100%);
2826
+ }
2827
+
2828
+ .w-5\/6 {
2829
+ width: calc(5 / 6 * 100%);
2830
+ }
2831
+
2832
+ .w-1\/12 {
2833
+ width: calc(1 / 12 * 100%);
2834
+ }
2835
+
2836
+ .w-2\/12 {
2837
+ width: calc(2 / 12 * 100%);
2838
+ }
2839
+
2840
+ .w-3\/12 {
2841
+ width: calc(3 / 12 * 100%);
2842
+ }
2843
+
2844
+ .w-4\/12 {
2845
+ width: calc(4 / 12 * 100%);
2846
+ }
2847
+
2848
+ .w-5\/12 {
2849
+ width: calc(5 / 12 * 100%);
2850
+ }
2851
+
2852
+ .w-6\/12 {
2853
+ width: calc(6 / 12 * 100%);
2854
+ }
2855
+
2856
+ .w-7\/12 {
2857
+ width: calc(7 / 12 * 100%);
2858
+ }
2859
+
2860
+ .w-8\/12 {
2861
+ width: calc(8 / 12 * 100%);
2862
+ }
2863
+
2864
+ .w-9\/12 {
2865
+ width: calc(9 / 12 * 100%);
2866
+ }
2867
+
2868
+ .w-10\/12 {
2869
+ width: calc(10 / 12 * 100%);
2870
+ }
2871
+
2872
+ .w-11\/12 {
2873
+ width: calc(11 / 12 * 100%);
2874
+ }
2875
+
2876
+ .h-1\/2 {
2877
+ height: calc(1 / 2 * 100%);
2878
+ }
2879
+
2880
+ .h-1\/3 {
2881
+ height: calc(1 / 3 * 100%);
2882
+ }
2883
+
2884
+ .h-2\/3 {
2885
+ height: calc(2 / 3 * 100%);
2886
+ }
2887
+
2888
+ .h-1\/4 {
2889
+ height: calc(1 / 4 * 100%);
2890
+ }
2891
+
2892
+ .h-2\/4 {
2893
+ height: calc(2 / 4 * 100%);
2894
+ }
2895
+
2896
+ .h-3\/4 {
2897
+ height: calc(3 / 4 * 100%);
2898
+ }
2899
+
2900
+ .h-1\/5 {
2901
+ height: calc(1 / 5 * 100%);
2902
+ }
2903
+
2904
+ .h-2\/5 {
2905
+ height: calc(2 / 5 * 100%);
2906
+ }
2907
+
2908
+ .h-3\/5 {
2909
+ height: calc(3 / 5 * 100%);
2910
+ }
2911
+
2912
+ .h-4\/5 {
2913
+ height: calc(4 / 5 * 100%);
2914
+ }
2915
+
2916
+ .h-1\/6 {
2917
+ height: calc(1 / 6 * 100%);
2918
+ }
2919
+
2920
+ .h-2\/6 {
2921
+ height: calc(2 / 6 * 100%);
2922
+ }
2923
+
2924
+ .h-3\/6 {
2925
+ height: calc(3 / 6 * 100%);
2926
+ }
2927
+
2928
+ .h-4\/6 {
2929
+ height: calc(4 / 6 * 100%);
2930
+ }
2931
+
2932
+ .h-5\/6 {
2933
+ height: calc(5 / 6 * 100%);
2934
+ }
2935
+
2936
+ .h-1\/12 {
2937
+ height: calc(1 / 12 * 100%);
2938
+ }
2939
+
2940
+ .h-2\/12 {
2941
+ height: calc(2 / 12 * 100%);
2942
+ }
2943
+
2944
+ .h-3\/12 {
2945
+ height: calc(3 / 12 * 100%);
2946
+ }
2947
+
2948
+ .h-4\/12 {
2949
+ height: calc(4 / 12 * 100%);
2950
+ }
2951
+
2952
+ .h-5\/12 {
2953
+ height: calc(5 / 12 * 100%);
2954
+ }
2955
+
2956
+ .h-6\/12 {
2957
+ height: calc(6 / 12 * 100%);
2958
+ }
2959
+
2960
+ .h-7\/12 {
2961
+ height: calc(7 / 12 * 100%);
2962
+ }
2963
+
2964
+ .h-8\/12 {
2965
+ height: calc(8 / 12 * 100%);
2966
+ }
2967
+
2968
+ .h-9\/12 {
2969
+ height: calc(9 / 12 * 100%);
2970
+ }
2971
+
2972
+ .h-10\/12 {
2973
+ height: calc(10 / 12 * 100%);
2974
+ }
2975
+
2976
+ .h-11\/12 {
2977
+ height: calc(11 / 12 * 100%);
2978
+ }
2979
+
2980
+ .size-full {
2981
+ width: 100%;
2982
+ height: 100%;
2983
+ }
2984
+
2985
+ .size-auto {
2986
+ width: auto;
2987
+ height: auto;
2988
+ }
2989
+
2990
+ .min-w-0 {
2991
+ min-width: 0px;
2992
+ }
2993
+
2994
+ .min-w-full {
2995
+ min-width: 100%;
2996
+ }
2997
+
2998
+ .min-w-fit {
2999
+ min-width: fit-content;
3000
+ }
3001
+
3002
+ .min-w-min {
3003
+ min-width: min-content;
3004
+ }
3005
+
3006
+ .min-w-max {
3007
+ min-width: max-content;
3008
+ }
3009
+
3010
+ .max-w-full {
3011
+ max-width: 100%;
3012
+ }
3013
+
3014
+ .max-w-fit {
3015
+ max-width: fit-content;
3016
+ }
3017
+
3018
+ .max-w-min {
3019
+ max-width: min-content;
3020
+ }
3021
+
3022
+ .max-w-max {
3023
+ max-width: max-content;
3024
+ }
3025
+
3026
+ .max-w-none {
3027
+ max-width: none;
3028
+ }
3029
+
3030
+ .min-h-0 {
3031
+ min-height: 0px;
3032
+ }
3033
+
3034
+ .min-h-full {
3035
+ min-height: 100%;
3036
+ }
3037
+
3038
+ .min-h-fit {
3039
+ min-height: fit-content;
3040
+ }
3041
+
3042
+ .min-h-screen {
3043
+ min-height: 100vh;
3044
+ }
3045
+
3046
+ .min-h-dvh {
3047
+ min-height: 100dvh;
3048
+ }
3049
+
3050
+ .max-h-full {
3051
+ max-height: 100%;
3052
+ }
3053
+
3054
+ .max-h-fit {
3055
+ max-height: fit-content;
3056
+ }
3057
+
3058
+ .max-h-screen {
3059
+ max-height: 100vh;
3060
+ }
3061
+
3062
+ .max-h-none {
3063
+ max-height: none;
3064
+ }
3065
+ }
3066
+
3067
+ /* --- src/styles/spacing.css --- */
3068
+
3069
+ /*
3070
+ * Spacing classes — map 1:1 sang --spacing-* trong @finhay/leaf-tokens (Figma 34:1034).
3071
+ *
3072
+ * Tiền tố = thuộc tính (giống color): p-* / m-* / gap-* (+ biến thể hướng).
3073
+ * Hậu tố = bậc token: 0 · 2xs · xs · s · m · l · xl · 2xl … 7xl.
3074
+ *
3075
+ * Chỉ set đúng 1 thuộc tính spacing — không đụng width/height.
3076
+ * Nằm trong @layer utilities để Leaf thắng khi trùng tên, giống color.css.
3077
+ */
3078
+
3079
+ @layer utilities {
3080
+ /* Padding */
3081
+
3082
+ .p-0 {
3083
+ padding: var(--spacing-0);
3084
+ }
3085
+
3086
+ .p-2xs {
3087
+ padding: var(--spacing-2xs);
3088
+ }
3089
+
3090
+ .p-xs {
3091
+ padding: var(--spacing-xs);
3092
+ }
3093
+
3094
+ .p-s {
3095
+ padding: var(--spacing-s);
3096
+ }
3097
+
3098
+ .p-m {
3099
+ padding: var(--spacing-m);
3100
+ }
3101
+
3102
+ .p-l {
3103
+ padding: var(--spacing-l);
3104
+ }
3105
+
3106
+ .p-xl {
3107
+ padding: var(--spacing-xl);
3108
+ }
3109
+
3110
+ .p-2xl {
3111
+ padding: var(--spacing-2xl);
3112
+ }
3113
+
3114
+ .p-3xl {
3115
+ padding: var(--spacing-3xl);
3116
+ }
3117
+
3118
+ .p-4xl {
3119
+ padding: var(--spacing-4xl);
3120
+ }
3121
+
3122
+ .p-5xl {
3123
+ padding: var(--spacing-5xl);
3124
+ }
3125
+
3126
+ .p-6xl {
3127
+ padding: var(--spacing-6xl);
3128
+ }
3129
+
3130
+ .p-7xl {
3131
+ padding: var(--spacing-7xl);
3132
+ }
3133
+
3134
+ .px-0 {
3135
+ padding-inline: var(--spacing-0);
3136
+ }
3137
+
3138
+ .px-2xs {
3139
+ padding-inline: var(--spacing-2xs);
3140
+ }
3141
+
3142
+ .px-xs {
3143
+ padding-inline: var(--spacing-xs);
3144
+ }
3145
+
3146
+ .px-s {
3147
+ padding-inline: var(--spacing-s);
3148
+ }
3149
+
3150
+ .px-m {
3151
+ padding-inline: var(--spacing-m);
3152
+ }
3153
+
3154
+ .px-l {
3155
+ padding-inline: var(--spacing-l);
3156
+ }
3157
+
3158
+ .px-xl {
3159
+ padding-inline: var(--spacing-xl);
3160
+ }
3161
+
3162
+ .px-2xl {
3163
+ padding-inline: var(--spacing-2xl);
1762
3164
  }
1763
3165
 
1764
3166
  .px-3xl {
@@ -1785,6 +3187,10 @@
1785
3187
  padding-block: var(--spacing-0);
1786
3188
  }
1787
3189
 
3190
+ .py-2xs {
3191
+ padding-block: var(--spacing-2xs);
3192
+ }
3193
+
1788
3194
  .py-xs {
1789
3195
  padding-block: var(--spacing-xs);
1790
3196
  }
@@ -1833,6 +3239,10 @@
1833
3239
  padding-top: var(--spacing-0);
1834
3240
  }
1835
3241
 
3242
+ .pt-2xs {
3243
+ padding-top: var(--spacing-2xs);
3244
+ }
3245
+
1836
3246
  .pt-xs {
1837
3247
  padding-top: var(--spacing-xs);
1838
3248
  }
@@ -1881,6 +3291,10 @@
1881
3291
  padding-right: var(--spacing-0);
1882
3292
  }
1883
3293
 
3294
+ .pr-2xs {
3295
+ padding-right: var(--spacing-2xs);
3296
+ }
3297
+
1884
3298
  .pr-xs {
1885
3299
  padding-right: var(--spacing-xs);
1886
3300
  }
@@ -1929,6 +3343,10 @@
1929
3343
  padding-bottom: var(--spacing-0);
1930
3344
  }
1931
3345
 
3346
+ .pb-2xs {
3347
+ padding-bottom: var(--spacing-2xs);
3348
+ }
3349
+
1932
3350
  .pb-xs {
1933
3351
  padding-bottom: var(--spacing-xs);
1934
3352
  }
@@ -1977,6 +3395,10 @@
1977
3395
  padding-left: var(--spacing-0);
1978
3396
  }
1979
3397
 
3398
+ .pl-2xs {
3399
+ padding-left: var(--spacing-2xs);
3400
+ }
3401
+
1980
3402
  .pl-xs {
1981
3403
  padding-left: var(--spacing-xs);
1982
3404
  }
@@ -2027,6 +3449,10 @@
2027
3449
  margin: var(--spacing-0);
2028
3450
  }
2029
3451
 
3452
+ .m-2xs {
3453
+ margin: var(--spacing-2xs);
3454
+ }
3455
+
2030
3456
  .m-xs {
2031
3457
  margin: var(--spacing-xs);
2032
3458
  }
@@ -2075,6 +3501,10 @@
2075
3501
  margin-inline: var(--spacing-0);
2076
3502
  }
2077
3503
 
3504
+ .mx-2xs {
3505
+ margin-inline: var(--spacing-2xs);
3506
+ }
3507
+
2078
3508
  .mx-xs {
2079
3509
  margin-inline: var(--spacing-xs);
2080
3510
  }
@@ -2123,6 +3553,10 @@
2123
3553
  margin-block: var(--spacing-0);
2124
3554
  }
2125
3555
 
3556
+ .my-2xs {
3557
+ margin-block: var(--spacing-2xs);
3558
+ }
3559
+
2126
3560
  .my-xs {
2127
3561
  margin-block: var(--spacing-xs);
2128
3562
  }
@@ -2171,6 +3605,10 @@
2171
3605
  margin-top: var(--spacing-0);
2172
3606
  }
2173
3607
 
3608
+ .mt-2xs {
3609
+ margin-top: var(--spacing-2xs);
3610
+ }
3611
+
2174
3612
  .mt-xs {
2175
3613
  margin-top: var(--spacing-xs);
2176
3614
  }
@@ -2219,6 +3657,10 @@
2219
3657
  margin-right: var(--spacing-0);
2220
3658
  }
2221
3659
 
3660
+ .mr-2xs {
3661
+ margin-right: var(--spacing-2xs);
3662
+ }
3663
+
2222
3664
  .mr-xs {
2223
3665
  margin-right: var(--spacing-xs);
2224
3666
  }
@@ -2267,6 +3709,10 @@
2267
3709
  margin-bottom: var(--spacing-0);
2268
3710
  }
2269
3711
 
3712
+ .mb-2xs {
3713
+ margin-bottom: var(--spacing-2xs);
3714
+ }
3715
+
2270
3716
  .mb-xs {
2271
3717
  margin-bottom: var(--spacing-xs);
2272
3718
  }
@@ -2315,6 +3761,10 @@
2315
3761
  margin-left: var(--spacing-0);
2316
3762
  }
2317
3763
 
3764
+ .ml-2xs {
3765
+ margin-left: var(--spacing-2xs);
3766
+ }
3767
+
2318
3768
  .ml-xs {
2319
3769
  margin-left: var(--spacing-xs);
2320
3770
  }
@@ -2365,6 +3815,10 @@
2365
3815
  gap: var(--spacing-0);
2366
3816
  }
2367
3817
 
3818
+ .gap-2xs {
3819
+ gap: var(--spacing-2xs);
3820
+ }
3821
+
2368
3822
  .gap-xs {
2369
3823
  gap: var(--spacing-xs);
2370
3824
  }
@@ -2413,6 +3867,10 @@
2413
3867
  column-gap: var(--spacing-0);
2414
3868
  }
2415
3869
 
3870
+ .gap-x-2xs {
3871
+ column-gap: var(--spacing-2xs);
3872
+ }
3873
+
2416
3874
  .gap-x-xs {
2417
3875
  column-gap: var(--spacing-xs);
2418
3876
  }
@@ -2461,6 +3919,10 @@
2461
3919
  row-gap: var(--spacing-0);
2462
3920
  }
2463
3921
 
3922
+ .gap-y-2xs {
3923
+ row-gap: var(--spacing-2xs);
3924
+ }
3925
+
2464
3926
  .gap-y-xs {
2465
3927
  row-gap: var(--spacing-xs);
2466
3928
  }
@@ -2506,6 +3968,223 @@
2506
3968
  }
2507
3969
  }
2508
3970
 
3971
+ /* --- src/styles/text-layout.css --- */
3972
+
3973
+ /*
3974
+ * Text layout classes — căn chữ, whitespace, truncate, line-clamp, transform,
3975
+ * decoration, vertical-align.
3976
+ *
3977
+ * Tên file `text-layout.css` để tránh lẫn với class màu `text-*` và typography.css.
3978
+ * Không gồm wrap-break-*, italic, tabular-nums, cursor.
3979
+ *
3980
+ * Nằm trong @layer components (cùng lý do với flex.css).
3981
+ */
3982
+
3983
+ @layer components {
3984
+ .text-left {
3985
+ text-align: left;
3986
+ }
3987
+
3988
+ .text-center {
3989
+ text-align: center;
3990
+ }
3991
+
3992
+ .text-right {
3993
+ text-align: right;
3994
+ }
3995
+
3996
+ .text-justify {
3997
+ text-align: justify;
3998
+ }
3999
+
4000
+ .text-start {
4001
+ text-align: start;
4002
+ }
4003
+
4004
+ .text-end {
4005
+ text-align: end;
4006
+ }
4007
+
4008
+ .whitespace-normal {
4009
+ white-space: normal;
4010
+ }
4011
+
4012
+ .whitespace-nowrap {
4013
+ white-space: nowrap;
4014
+ }
4015
+
4016
+ .whitespace-pre {
4017
+ white-space: pre;
4018
+ }
4019
+
4020
+ .whitespace-pre-line {
4021
+ white-space: pre-line;
4022
+ }
4023
+
4024
+ .whitespace-pre-wrap {
4025
+ white-space: pre-wrap;
4026
+ }
4027
+
4028
+ .whitespace-break-spaces {
4029
+ white-space: break-spaces;
4030
+ }
4031
+
4032
+ .truncate {
4033
+ overflow: hidden;
4034
+ text-overflow: ellipsis;
4035
+ white-space: nowrap;
4036
+ }
4037
+
4038
+ .text-ellipsis {
4039
+ text-overflow: ellipsis;
4040
+ }
4041
+
4042
+ .text-clip {
4043
+ text-overflow: clip;
4044
+ }
4045
+
4046
+ .text-wrap {
4047
+ text-wrap: wrap;
4048
+ }
4049
+
4050
+ .text-nowrap {
4051
+ text-wrap: nowrap;
4052
+ }
4053
+
4054
+ .text-balance {
4055
+ text-wrap: balance;
4056
+ }
4057
+
4058
+ .text-pretty {
4059
+ text-wrap: pretty;
4060
+ }
4061
+
4062
+ .break-normal {
4063
+ overflow-wrap: normal;
4064
+ word-break: normal;
4065
+ }
4066
+
4067
+ .break-all {
4068
+ word-break: break-all;
4069
+ }
4070
+
4071
+ .break-keep {
4072
+ word-break: keep-all;
4073
+ }
4074
+
4075
+ .line-clamp-1 {
4076
+ overflow: hidden;
4077
+ display: -webkit-box;
4078
+ -webkit-box-orient: vertical;
4079
+ -webkit-line-clamp: 1;
4080
+ }
4081
+
4082
+ .line-clamp-2 {
4083
+ overflow: hidden;
4084
+ display: -webkit-box;
4085
+ -webkit-box-orient: vertical;
4086
+ -webkit-line-clamp: 2;
4087
+ }
4088
+
4089
+ .line-clamp-3 {
4090
+ overflow: hidden;
4091
+ display: -webkit-box;
4092
+ -webkit-box-orient: vertical;
4093
+ -webkit-line-clamp: 3;
4094
+ }
4095
+
4096
+ .line-clamp-4 {
4097
+ overflow: hidden;
4098
+ display: -webkit-box;
4099
+ -webkit-box-orient: vertical;
4100
+ -webkit-line-clamp: 4;
4101
+ }
4102
+
4103
+ .line-clamp-5 {
4104
+ overflow: hidden;
4105
+ display: -webkit-box;
4106
+ -webkit-box-orient: vertical;
4107
+ -webkit-line-clamp: 5;
4108
+ }
4109
+
4110
+ .line-clamp-6 {
4111
+ overflow: hidden;
4112
+ display: -webkit-box;
4113
+ -webkit-box-orient: vertical;
4114
+ -webkit-line-clamp: 6;
4115
+ }
4116
+
4117
+ .line-clamp-none {
4118
+ overflow: visible;
4119
+ display: block;
4120
+ -webkit-box-orient: horizontal;
4121
+ -webkit-line-clamp: unset;
4122
+ }
4123
+
4124
+ /* line-clamp set display — `hidden` vẫn phải ẩn (cùng lý do với flex.css). */
4125
+ .line-clamp-1[hidden],
4126
+ .line-clamp-2[hidden],
4127
+ .line-clamp-3[hidden],
4128
+ .line-clamp-4[hidden],
4129
+ .line-clamp-5[hidden],
4130
+ .line-clamp-6[hidden],
4131
+ .line-clamp-none[hidden] {
4132
+ display: none;
4133
+ }
4134
+
4135
+ .uppercase {
4136
+ text-transform: uppercase;
4137
+ }
4138
+
4139
+ .lowercase {
4140
+ text-transform: lowercase;
4141
+ }
4142
+
4143
+ .capitalize {
4144
+ text-transform: capitalize;
4145
+ }
4146
+
4147
+ .normal-case {
4148
+ text-transform: none;
4149
+ }
4150
+
4151
+ .underline {
4152
+ text-decoration-line: underline;
4153
+ }
4154
+
4155
+ .line-through {
4156
+ text-decoration-line: line-through;
4157
+ }
4158
+
4159
+ .no-underline {
4160
+ text-decoration-line: none;
4161
+ }
4162
+
4163
+ .align-top {
4164
+ vertical-align: top;
4165
+ }
4166
+
4167
+ .align-middle {
4168
+ vertical-align: middle;
4169
+ }
4170
+
4171
+ .align-bottom {
4172
+ vertical-align: bottom;
4173
+ }
4174
+
4175
+ .align-baseline {
4176
+ vertical-align: baseline;
4177
+ }
4178
+
4179
+ .align-text-top {
4180
+ vertical-align: text-top;
4181
+ }
4182
+
4183
+ .align-text-bottom {
4184
+ vertical-align: text-bottom;
4185
+ }
4186
+ }
4187
+
2509
4188
  /* --- src/styles/typography.css --- */
2510
4189
 
2511
4190
  /*
@@ -2518,9 +4197,7 @@
2518
4197
  * weight (400 / 600 / 700 theo token). Letter spacing, margin, màu chữ không
2519
4198
  * thuộc stylesheet này — màu dùng class text-* riêng.
2520
4199
  *
2521
- * Toàn bộ nằm trong `@layer components` để utility của Tailwind (`@layer
2522
- * utilities`) luôn thắng: `class="heading-1 font-bold"` hay `class="body-3
2523
- * text-2xl"` đều override được mà không cần important modifier.
4200
+ * Toàn bộ nằm trong `@layer components` — SCSS module (ngoài layer) override được.
2524
4201
  */
2525
4202
 
2526
4203
  @layer components {