@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
package/dist/classes.css CHANGED
@@ -36,9 +36,6 @@
36
36
  --leaf-button-bg: var(--button-base-primary);
37
37
  --leaf-button-fg: var(--button-content-primary);
38
38
 
39
- display: inline-flex;
40
- align-items: center;
41
- justify-content: center;
42
39
  box-sizing: border-box;
43
40
  width: var(--leaf-button-width, auto);
44
41
  height: var(--leaf-button-height);
@@ -50,8 +47,6 @@
50
47
  border-radius: 1000px;
51
48
  background-color: var(--leaf-button-bg);
52
49
  color: var(--leaf-button-fg);
53
- text-align: center;
54
- white-space: nowrap;
55
50
  font: inherit;
56
51
  font-family: var(--font-sans);
57
52
  font-size: var(--leaf-button-font-size);
@@ -59,15 +54,10 @@
59
54
  font-weight: var(--leaf-button-font-weight);
60
55
  letter-spacing: var(--leaf-button-letter-spacing);
61
56
  text-decoration: none;
62
- vertical-align: middle;
63
57
  appearance: none;
64
58
  }
65
59
 
66
60
  .leaf-button__icon {
67
- display: inline-flex;
68
- flex-shrink: 0;
69
- align-items: center;
70
- justify-content: center;
71
61
  width: var(--leaf-button-icon-size);
72
62
  height: var(--leaf-button-icon-size);
73
63
  font-size: var(--leaf-button-icon-size);
@@ -81,8 +71,8 @@
81
71
  }
82
72
 
83
73
  /*
84
- * `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn
85
- * (bản vanilla ẩn leading icon khi loading), không trông vào preflight của Tailwind.
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).
86
76
  */
87
77
  .leaf-button[hidden],
88
78
  .leaf-button__icon[hidden] {
@@ -227,12 +217,7 @@
227
217
 
228
218
  @layer components {
229
219
  .leaf-dialog-backdrop {
230
- position: fixed;
231
- inset: 0;
232
220
  z-index: var(--leaf-z-dialog, 50);
233
- display: flex;
234
- align-items: center;
235
- justify-content: center;
236
221
  padding: 16px;
237
222
  box-sizing: border-box;
238
223
  /*
@@ -244,7 +229,7 @@
244
229
  backdrop-filter: blur(5px);
245
230
  }
246
231
 
247
- /* `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. */
248
233
  .leaf-dialog-backdrop[hidden] {
249
234
  display: none;
250
235
  }
@@ -257,21 +242,18 @@
257
242
  --leaf-dialog-close-size: 28px;
258
243
  --leaf-dialog-close-icon: 20px;
259
244
 
260
- display: flex;
261
- flex-direction: column;
262
245
  gap: var(--leaf-dialog-gap);
263
246
  /*
264
247
  * Width: luôn 100% trong trần maxWidth (responsive).
265
248
  * Height: cố định khi có --leaf-dialog-height (content động không giật panel);
266
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.
267
251
  */
268
- width: 100%;
269
252
  max-width: var(--leaf-dialog-max-width, 100%);
270
253
  height: var(--leaf-dialog-height, auto);
271
254
  max-height: var(--leaf-dialog-max-height, 100%);
272
255
  margin: 0;
273
256
  padding: var(--leaf-dialog-padding);
274
- overflow: hidden;
275
257
  box-sizing: border-box;
276
258
  border-radius: var(--leaf-dialog-radius);
277
259
  background-color: var(--base-primary);
@@ -285,34 +267,20 @@
285
267
  }
286
268
 
287
269
  .leaf-dialog__header {
288
- display: flex;
289
- flex-shrink: 0;
290
- align-items: center;
291
- justify-content: space-between;
292
270
  gap: var(--leaf-dialog-gap);
293
- width: 100%;
294
- min-width: 0;
295
271
  }
296
272
 
297
- /* Cụm trái: back + title */
273
+ /* Cụm trái: back + title — flex/min-w từ class Leaf trên markup */
298
274
  .leaf-dialog__start {
299
- display: flex;
300
- align-items: center;
301
275
  gap: var(--leaf-dialog-gap);
302
- min-width: 0;
303
- flex: 1 1 auto;
304
276
  }
305
277
 
306
278
  /*
307
279
  * Title — heading-3 · --text-primary nằm ngay ở đây: markup không cần class typography /
308
- * màu, nên utility trùng tên của app (vd. `text-primary` sinh từ `@theme`) không chen vào.
280
+ * màu, nên utility trùng tên của app (vd. `text-primary`) không chen vào.
309
281
  */
310
282
  .leaf-dialog__start > :where(h2, p) {
311
283
  margin: 0;
312
- min-width: 0;
313
- overflow: hidden;
314
- text-overflow: ellipsis;
315
- white-space: nowrap;
316
284
  color: var(--text-primary);
317
285
  font-family: var(--font-sans);
318
286
  font-size: var(--heading-3-size);
@@ -322,10 +290,6 @@
322
290
 
323
291
  .leaf-dialog__back,
324
292
  .leaf-dialog__close {
325
- display: inline-flex;
326
- flex-shrink: 0;
327
- align-items: center;
328
- justify-content: center;
329
293
  margin: 0;
330
294
  padding: 0;
331
295
  border: none;
@@ -373,13 +337,7 @@
373
337
  }
374
338
 
375
339
  .leaf-dialog__body {
376
- display: flex;
377
- flex: 1 1 auto;
378
- flex-direction: column;
379
340
  gap: var(--leaf-dialog-gap);
380
- min-height: 0;
381
- width: 100%;
382
- overflow: auto;
383
341
  }
384
342
  }
385
343
 
@@ -397,10 +355,6 @@
397
355
 
398
356
  @layer components {
399
357
  .leaf-logo {
400
- display: inline-flex;
401
- flex-shrink: 0;
402
- align-items: center;
403
- justify-content: center;
404
358
  margin: 0;
405
359
  padding: 0;
406
360
  border: none;
@@ -409,7 +363,6 @@
409
363
  background-position: center;
410
364
  background-size: contain;
411
365
  line-height: 0;
412
- vertical-align: middle;
413
366
  box-sizing: border-box;
414
367
  }
415
368
 
@@ -424,10 +377,10 @@
424
377
  display: block;
425
378
  height: var(--leaf-logo-size, 40px);
426
379
  width: auto;
427
- max-width: 100%;
380
+ /* max-w-full — class Leaf trên markup (React img) */
428
381
  }
429
382
 
430
- /* `display` ở trên (kể cả `:empty`) thắng `[hidden]` của trình duyệt — khai báo lại, đứng sau. */
383
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
431
384
  .leaf-logo[hidden] {
432
385
  display: none;
433
386
  }
@@ -449,8 +402,6 @@
449
402
  --leaf-skeleton-height: 100%;
450
403
  --leaf-skeleton-radius: 12px;
451
404
 
452
- position: relative;
453
- overflow: hidden;
454
405
  box-sizing: border-box;
455
406
  width: var(--leaf-skeleton-width);
456
407
  height: var(--leaf-skeleton-height);
@@ -459,8 +410,6 @@
459
410
  }
460
411
 
461
412
  .leaf-skeleton__shimmer {
462
- position: absolute;
463
- inset: 0;
464
413
  background: linear-gradient(
465
414
  to right,
466
415
  transparent,
@@ -508,11 +457,7 @@
508
457
  20px
509
458
  );
510
459
 
511
- display: flex;
512
- flex-direction: column;
513
- /* Figma gap S (8) giữa Title/Unit và khối track+labels. */
514
- gap: 8px;
515
- width: 100%;
460
+ /* flex / flex-col / w-full / gap-s — class Leaf trên markup */
516
461
  box-sizing: border-box;
517
462
  font-family: var(--font-sans);
518
463
  font-size: var(--body-5-size);
@@ -523,45 +468,21 @@
523
468
  -webkit-user-select: none;
524
469
  }
525
470
 
526
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn. */
471
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
527
472
  .leaf-slider[hidden] {
528
473
  display: none;
529
474
  }
530
475
 
531
476
  /* Figma gap XS (4) giữa track và Value labels. */
532
- .leaf-slider__body {
533
- display: flex;
534
- flex-direction: column;
535
- gap: 4px;
536
- width: 100%;
537
- }
477
+ /* body — layout từ class Leaf trên markup */
538
478
 
539
479
  .leaf-slider__header {
540
- display: flex;
541
- align-items: flex-start;
542
- justify-content: space-between;
543
- gap: 8px;
544
- width: 100%;
545
480
  color: var(--text-primary);
546
- white-space: nowrap;
547
481
  user-select: text;
548
482
  -webkit-user-select: text;
549
483
  }
550
484
 
551
- .leaf-slider__title,
552
- .leaf-slider__unit {
553
- min-width: 0;
554
- }
555
-
556
- .leaf-slider__unit {
557
- text-align: right;
558
- }
559
-
560
485
  .leaf-slider__control {
561
- position: relative;
562
- display: flex;
563
- align-items: center;
564
- width: 100%;
565
486
  height: var(--leaf-slider-control-height);
566
487
  outline: none;
567
488
  cursor: pointer;
@@ -740,37 +661,23 @@
740
661
  --leaf-spinner-size: 24px;
741
662
  --leaf-spinner-duration: 1.2s;
742
663
 
743
- display: inline-flex;
744
- flex-shrink: 0;
745
- align-items: center;
746
- justify-content: center;
747
664
  width: var(--leaf-spinner-size);
748
665
  height: var(--leaf-spinner-size);
749
666
  color: var(--base-quinary);
750
- vertical-align: middle;
751
667
  line-height: 0;
752
668
  }
753
669
 
754
- .leaf-spinner__icon {
755
- display: block;
756
- width: 100%;
757
- height: 100%;
758
- }
670
+ /* icon: block size-full — class Leaf trên markup */
759
671
 
760
672
  /* Fullscreen overlay — pattern Spinner (portal + nền mờ). */
761
673
  .leaf-spinner-overlay {
762
- position: fixed;
763
- inset: 0;
764
674
  z-index: var(--leaf-z-spinner-overlay, 100);
765
- display: flex;
766
- align-items: center;
767
- justify-content: center;
768
675
  box-sizing: border-box;
769
676
  background-color: var(--overlay);
770
677
  color: var(--base-quinary);
771
678
  }
772
679
 
773
- /* `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. */
774
681
  .leaf-spinner[hidden],
775
682
  .leaf-spinner-overlay[hidden] {
776
683
  display: none;
@@ -867,10 +774,7 @@
867
774
  --leaf-tab-line-height: var(--body-3-line-height);
868
775
  --leaf-tab-font-weight: var(--body-3-highlight-weight);
869
776
 
870
- display: flex;
871
- flex-wrap: wrap;
872
- align-items: center;
873
- gap: 12px;
777
+ /* flex / wrap / items / gap-m — class Leaf trên markup */
874
778
  }
875
779
 
876
780
  .leaf-tabs[data-size="lg"] {
@@ -898,9 +802,6 @@
898
802
  }
899
803
 
900
804
  .leaf-tab {
901
- display: inline-flex;
902
- align-items: center;
903
- justify-content: center;
904
805
  border: none;
905
806
  margin: 0;
906
807
  padding: 0;
@@ -909,13 +810,11 @@
909
810
  color: inherit;
910
811
  font: inherit;
911
812
  font-family: var(--font-sans);
912
- text-align: center;
913
- white-space: nowrap;
914
813
  box-sizing: border-box;
915
814
  appearance: none;
916
815
  }
917
816
 
918
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn. */
817
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
919
818
  .leaf-tabs[hidden],
920
819
  .leaf-tab[hidden] {
921
820
  display: none;
@@ -927,9 +826,6 @@
927
826
  }
928
827
 
929
828
  .leaf-tab__label {
930
- display: inline-flex;
931
- align-items: center;
932
- justify-content: center;
933
829
  line-height: inherit;
934
830
  }
935
831
 
@@ -1110,10 +1006,6 @@
1110
1006
  var(--leaf-toggle-width) - var(--leaf-toggle-padding) * 2 - var(--leaf-toggle-thumb)
1111
1007
  );
1112
1008
 
1113
- position: relative;
1114
- display: inline-flex;
1115
- flex-shrink: 0;
1116
- align-items: center;
1117
1009
  box-sizing: border-box;
1118
1010
  width: var(--leaf-toggle-width);
1119
1011
  height: var(--leaf-toggle-height);
@@ -1123,7 +1015,6 @@
1123
1015
  border-radius: 12px;
1124
1016
  background-color: var(--base-quaternary);
1125
1017
  cursor: pointer;
1126
- vertical-align: middle;
1127
1018
  appearance: none;
1128
1019
  -webkit-appearance: none;
1129
1020
  font: inherit;
@@ -1131,15 +1022,12 @@
1131
1022
  transition: background-color 0.2s ease;
1132
1023
  }
1133
1024
 
1134
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn. */
1025
+ /* `hidden` luôn ẩn — display đến từ class layout; selector `[hidden]` specificity cao hơn nên thắng. */
1135
1026
  .leaf-toggle[hidden] {
1136
1027
  display: none;
1137
1028
  }
1138
1029
 
1139
1030
  .leaf-toggle__thumb {
1140
- display: flex;
1141
- align-items: center;
1142
- justify-content: center;
1143
1031
  width: var(--leaf-toggle-thumb);
1144
1032
  height: var(--leaf-toggle-thumb);
1145
1033
  border-radius: 100px;
@@ -1213,13 +1101,6 @@
1213
1101
  */
1214
1102
 
1215
1103
  @layer components {
1216
- .leaf-tooltip-trigger {
1217
- position: relative;
1218
- display: inline-flex;
1219
- max-width: 100%;
1220
- vertical-align: middle;
1221
- }
1222
-
1223
1104
  .leaf-tooltip {
1224
1105
  --leaf-tooltip-pad-y: 8px;
1225
1106
  --leaf-tooltip-pad-x: 16px;
@@ -1234,6 +1115,7 @@
1234
1115
  /* Chiều rộng tam giác thật trong khung. */
1235
1116
  --leaf-tooltip-caret-tip: 12px;
1236
1117
 
1118
+ /* inline-flex — class Leaf; direction / align vẫn ở CSS (đổi theo data-position / data-align) */
1237
1119
  display: inline-flex;
1238
1120
  flex-direction: column;
1239
1121
  align-items: center;
@@ -1252,21 +1134,17 @@
1252
1134
  z-index: var(--leaf-z-tooltip, 110);
1253
1135
  }
1254
1136
 
1255
- /* `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. */
1256
1138
  .leaf-tooltip-trigger[hidden],
1257
1139
  .leaf-tooltip[hidden] {
1258
1140
  display: none;
1259
1141
  }
1260
1142
 
1261
1143
  .leaf-tooltip__body {
1262
- position: relative;
1263
- z-index: 1;
1264
1144
  box-sizing: border-box;
1265
- max-width: 100%;
1266
1145
  padding: var(--leaf-tooltip-pad-y) var(--leaf-tooltip-pad-x);
1267
1146
  border-radius: var(--leaf-tooltip-radius);
1268
1147
  background-color: var(--base-quaternary);
1269
- text-align: left;
1270
1148
  word-break: break-word;
1271
1149
  }
1272
1150
 
@@ -1275,9 +1153,6 @@
1275
1153
  * Mặc định: mũi nhọn xuống (position=top — caret dưới body).
1276
1154
  */
1277
1155
  .leaf-tooltip__caret {
1278
- position: relative;
1279
- display: block;
1280
- flex-shrink: 0;
1281
1156
  width: var(--leaf-tooltip-caret-w);
1282
1157
  height: var(--leaf-tooltip-caret-h);
1283
1158
  background-color: transparent;
@@ -1413,24 +1288,19 @@
1413
1288
  /* --- src/styles/border.css --- */
1414
1289
 
1415
1290
  /*
1416
- * Border radius classes — map 1:1 sang --radius-* trong @finhay/leaf-tokens
1417
- * (Figma 700:4390).
1291
+ * Border classes — map 1:1 sang token trong @finhay/leaf-tokens.
1418
1292
  *
1419
- * Tên class `radius-*` (không dùng `rounded-*`) để không đụng utility bo góc mặc
1420
- * đị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.
1421
1298
  *
1422
- * Hậu tố = bậc token: 0 · xs · s · m · l · xl · 2xl.
1423
- * 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.
1424
1300
  */
1425
1301
 
1426
1302
  @layer utilities {
1427
- .radius-0 {
1428
- border-radius: var(--radius-0);
1429
- }
1430
-
1431
- .radius-xs {
1432
- border-radius: var(--radius-xs);
1433
- }
1303
+ /* Radius */
1434
1304
 
1435
1305
  .radius-s {
1436
1306
  border-radius: var(--radius-s);
@@ -1444,12 +1314,154 @@
1444
1314
  border-radius: var(--radius-l);
1445
1315
  }
1446
1316
 
1447
- .radius-xl {
1448
- 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;
1449
1450
  }
1450
1451
 
1451
- .radius-2xl {
1452
- border-radius: var(--radius-2xl);
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;
1460
+ }
1461
+
1462
+ .border-block-xl {
1463
+ border-block-width: var(--border-width-xl);
1464
+ border-block-style: solid;
1453
1465
  }
1454
1466
  }
1455
1467
 
@@ -1461,33 +1473,28 @@
1461
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**.
1462
1474
  *
1463
1475
  * text-* → color (text-primary, text-red)
1464
- * base-* → background-color (base-primary, base-red)
1476
+ * bg-* → background-color (bg-primary, bg-red) — token vẫn là --base-*
1465
1477
  * border-* → border-color (border-primary, border-red)
1466
1478
  *
1467
- * Ba bộ dùng chung một hậu tố nên đọc là đoán được: `text-red` / `base-red` /
1468
- * `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
1469
1481
  * bỏ chữ `system` trong tên class (token vẫn là `--system-red`), còn `border-*`
1470
1482
  * lấy màu từ thang base vì viền luôn là màu bề mặt. Secondary của system giữ
1471
1483
  * hậu tố `-secondary` (vd. `text-red-secondary` ↔ `--system-red-secondary`).
1472
1484
  *
1473
1485
  * Mỗi class chỉ set đúng 1 thuộc tính (color / background-color / border-color)
1474
- * — border-width và border-style do app tự lo. Class tự đổi giá trị theo
1475
- * `[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.
1476
1488
  *
1477
1489
  * Chỉ semantic token mới có class. Primitive (--neutral-500, --brand-300…) là
1478
1490
  * nguồn nội bộ, không dùng thẳng trong UI.
1479
1491
  *
1480
1492
  * ─ Vì sao `@layer utilities` ─────────────────────────────────────────────────
1481
1493
  *
1482
- * Màu của Leaf là token gốc, trùng tên thì phải thắng. Đặt chung layer với
1483
- * utility của Tailwind, và app import file này SAU `@import "tailwindcss"`, nên
1484
- * khi app cũng khai báo `--color-primary` / `--color-red` trong `@theme` thì
1485
- * `.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.
1486
1496
  *
1487
- * Biến thể trạng thái vẫn override được vì pseudo-class cộng thêm specificity:
1488
- * `hover:text-[var(--text-highlight)]`, `focus:…` thắng bình thường. Riêng biến
1489
- * thể responsive (`md:`, `lg:`) cùng specificity và được Tailwind ghi ra trước
1490
- * 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.
1491
1498
  */
1492
1499
 
1493
1500
  @layer utilities {
@@ -1563,79 +1570,79 @@
1563
1570
  color: var(--system-purple-secondary);
1564
1571
  }
1565
1572
 
1566
- /* Background — base */
1573
+ /* Background — surface (--base-*) + system */
1567
1574
 
1568
- .base-highlight {
1575
+ .bg-highlight {
1569
1576
  background-color: var(--text-highlight);
1570
1577
  }
1571
1578
 
1572
- .base-primary {
1579
+ .bg-primary {
1573
1580
  background-color: var(--base-primary);
1574
1581
  }
1575
1582
 
1576
- .base-secondary {
1583
+ .bg-secondary {
1577
1584
  background-color: var(--base-secondary);
1578
1585
  }
1579
1586
 
1580
- .base-tertiary {
1587
+ .bg-tertiary {
1581
1588
  background-color: var(--base-tertiary);
1582
1589
  }
1583
1590
 
1584
- .base-quaternary {
1591
+ .bg-quaternary {
1585
1592
  background-color: var(--base-quaternary);
1586
1593
  }
1587
1594
 
1588
- .base-quinary {
1595
+ .bg-quinary {
1589
1596
  background-color: var(--base-quinary);
1590
1597
  }
1591
1598
 
1592
1599
  /* Background — system */
1593
1600
 
1594
- .base-blue {
1601
+ .bg-blue {
1595
1602
  background-color: var(--system-blue);
1596
1603
  }
1597
1604
 
1598
- .base-green {
1605
+ .bg-green {
1599
1606
  background-color: var(--system-green);
1600
1607
  }
1601
1608
 
1602
- .base-yellow {
1609
+ .bg-yellow {
1603
1610
  background-color: var(--system-yellow);
1604
1611
  }
1605
1612
 
1606
- .base-orange {
1613
+ .bg-orange {
1607
1614
  background-color: var(--system-orange);
1608
1615
  }
1609
1616
 
1610
- .base-red {
1617
+ .bg-red {
1611
1618
  background-color: var(--system-red);
1612
1619
  }
1613
1620
 
1614
- .base-purple {
1621
+ .bg-purple {
1615
1622
  background-color: var(--system-purple);
1616
1623
  }
1617
1624
 
1618
- .base-blue-secondary {
1625
+ .bg-blue-secondary {
1619
1626
  background-color: var(--system-blue-secondary);
1620
1627
  }
1621
1628
 
1622
- .base-green-secondary {
1629
+ .bg-green-secondary {
1623
1630
  background-color: var(--system-green-secondary);
1624
1631
  }
1625
1632
 
1626
- .base-yellow-secondary {
1633
+ .bg-yellow-secondary {
1627
1634
  background-color: var(--system-yellow-secondary);
1628
1635
  }
1629
1636
 
1630
- .base-orange-secondary {
1637
+ .bg-orange-secondary {
1631
1638
  background-color: var(--system-orange-secondary);
1632
1639
  }
1633
1640
 
1634
- .base-red-secondary {
1641
+ .bg-red-secondary {
1635
1642
  background-color: var(--system-red-secondary);
1636
1643
  }
1637
1644
 
1638
- .base-purple-secondary {
1645
+ .bg-purple-secondary {
1639
1646
  background-color: var(--system-purple-secondary);
1640
1647
  }
1641
1648
 
@@ -1716,148 +1723,1500 @@
1716
1723
  }
1717
1724
  }
1718
1725
 
1719
- /* --- src/styles/spacing.css --- */
1726
+ /* --- src/styles/flex.css --- */
1720
1727
 
1721
1728
  /*
1722
- * Spacing classes — map 1:1 sang --spacing-* trong @finhay/leaf-tokens (Figma 34:1034).
1729
+ * Flex + alignment classes.
1723
1730
  *
1724
- * Tiền tố = thuộc tính (giống color): p-* / m-* / gap-* (+ biến thể hướng).
1725
- * 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.
1733
+ *
1734
+ * Nằm trong @layer components — SCSS module (ngoài layer) đè được class Leaf.
1726
1735
  *
1727
- * Chỉ set đúng 1 thuộc tính spacing — không đụng width/height/radius.
1728
- * Nằm trong @layer utilities để Leaf thắng khi trùng tên với utility Tailwind
1729
- * (import sau @import "tailwindcss"), giống color.css.
1736
+ * `.flex[hidden]`… specificity cao hơn class display nên `hidden` luôn ẩn.
1730
1737
  */
1731
1738
 
1732
- @layer utilities {
1733
- /* Padding */
1739
+ @layer components {
1740
+ .block {
1741
+ display: block;
1742
+ }
1734
1743
 
1735
- .p-0 {
1736
- padding: var(--spacing-0);
1744
+ .inline-block {
1745
+ display: inline-block;
1737
1746
  }
1738
1747
 
1739
- .p-xs {
1740
- padding: var(--spacing-xs);
1748
+ .inline {
1749
+ display: inline;
1741
1750
  }
1742
1751
 
1743
- .p-s {
1744
- padding: var(--spacing-s);
1752
+ .hidden {
1753
+ display: none;
1745
1754
  }
1746
1755
 
1747
- .p-m {
1748
- padding: var(--spacing-m);
1756
+ .flex {
1757
+ display: flex;
1749
1758
  }
1750
1759
 
1751
- .p-l {
1752
- padding: var(--spacing-l);
1760
+ .inline-flex {
1761
+ display: inline-flex;
1753
1762
  }
1754
1763
 
1755
- .p-xl {
1756
- padding: var(--spacing-xl);
1764
+ .block[hidden],
1765
+ .inline-block[hidden],
1766
+ .inline[hidden],
1767
+ .flex[hidden],
1768
+ .inline-flex[hidden] {
1769
+ display: none;
1757
1770
  }
1758
1771
 
1759
- .p-2xl {
1760
- padding: var(--spacing-2xl);
1772
+ .flex-row {
1773
+ flex-direction: row;
1761
1774
  }
1762
1775
 
1763
- .p-3xl {
1764
- padding: var(--spacing-3xl);
1776
+ .flex-row-reverse {
1777
+ flex-direction: row-reverse;
1765
1778
  }
1766
1779
 
1767
- .p-4xl {
1768
- padding: var(--spacing-4xl);
1780
+ .flex-col {
1781
+ flex-direction: column;
1769
1782
  }
1770
1783
 
1771
- .p-5xl {
1772
- padding: var(--spacing-5xl);
1784
+ .flex-col-reverse {
1785
+ flex-direction: column-reverse;
1773
1786
  }
1774
1787
 
1775
- .p-6xl {
1776
- padding: var(--spacing-6xl);
1788
+ .flex-wrap {
1789
+ flex-wrap: wrap;
1777
1790
  }
1778
1791
 
1779
- .p-7xl {
1780
- padding: var(--spacing-7xl);
1792
+ .flex-wrap-reverse {
1793
+ flex-wrap: wrap-reverse;
1781
1794
  }
1782
1795
 
1783
- .px-0 {
1784
- padding-inline: var(--spacing-0);
1796
+ .flex-nowrap {
1797
+ flex-wrap: nowrap;
1785
1798
  }
1786
1799
 
1787
- .px-xs {
1788
- padding-inline: var(--spacing-xs);
1800
+ .flex-1 {
1801
+ flex: 1;
1789
1802
  }
1790
1803
 
1791
- .px-s {
1792
- padding-inline: var(--spacing-s);
1804
+ .flex-auto {
1805
+ flex: auto;
1793
1806
  }
1794
1807
 
1795
- .px-m {
1796
- padding-inline: var(--spacing-m);
1808
+ .flex-initial {
1809
+ flex: 0 auto;
1797
1810
  }
1798
1811
 
1799
- .px-l {
1800
- padding-inline: var(--spacing-l);
1812
+ .flex-none {
1813
+ flex: none;
1801
1814
  }
1802
1815
 
1803
- .px-xl {
1804
- padding-inline: var(--spacing-xl);
1816
+ .grow {
1817
+ flex-grow: 1;
1805
1818
  }
1806
1819
 
1807
- .px-2xl {
1808
- padding-inline: var(--spacing-2xl);
1820
+ .grow-0 {
1821
+ flex-grow: 0;
1809
1822
  }
1810
1823
 
1811
- .px-3xl {
1812
- padding-inline: var(--spacing-3xl);
1824
+ .shrink {
1825
+ flex-shrink: 1;
1813
1826
  }
1814
1827
 
1815
- .px-4xl {
1816
- padding-inline: var(--spacing-4xl);
1828
+ .shrink-0 {
1829
+ flex-shrink: 0;
1817
1830
  }
1818
1831
 
1819
- .px-5xl {
1820
- padding-inline: var(--spacing-5xl);
1832
+ .basis-0 {
1833
+ flex-basis: 0px;
1821
1834
  }
1822
1835
 
1823
- .px-6xl {
1824
- padding-inline: var(--spacing-6xl);
1836
+ .basis-auto {
1837
+ flex-basis: auto;
1825
1838
  }
1826
1839
 
1827
- .px-7xl {
1828
- padding-inline: var(--spacing-7xl);
1840
+ .basis-full {
1841
+ flex-basis: 100%;
1829
1842
  }
1830
1843
 
1831
- .py-0 {
1832
- padding-block: var(--spacing-0);
1844
+ .justify-start {
1845
+ justify-content: flex-start;
1833
1846
  }
1834
1847
 
1835
- .py-xs {
1836
- padding-block: var(--spacing-xs);
1848
+ .justify-end {
1849
+ justify-content: flex-end;
1837
1850
  }
1838
1851
 
1839
- .py-s {
1840
- padding-block: var(--spacing-s);
1852
+ .justify-center {
1853
+ justify-content: center;
1841
1854
  }
1842
1855
 
1843
- .py-m {
1844
- padding-block: var(--spacing-m);
1856
+ .justify-between {
1857
+ justify-content: space-between;
1845
1858
  }
1846
1859
 
1847
- .py-l {
1848
- padding-block: var(--spacing-l);
1860
+ .justify-around {
1861
+ justify-content: space-around;
1849
1862
  }
1850
1863
 
1851
- .py-xl {
1852
- padding-block: var(--spacing-xl);
1864
+ .justify-evenly {
1865
+ justify-content: space-evenly;
1853
1866
  }
1854
1867
 
1855
- .py-2xl {
1856
- padding-block: var(--spacing-2xl);
1868
+ .justify-stretch {
1869
+ justify-content: stretch;
1857
1870
  }
1858
1871
 
1859
- .py-3xl {
1860
- padding-block: var(--spacing-3xl);
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);
3164
+ }
3165
+
3166
+ .px-3xl {
3167
+ padding-inline: var(--spacing-3xl);
3168
+ }
3169
+
3170
+ .px-4xl {
3171
+ padding-inline: var(--spacing-4xl);
3172
+ }
3173
+
3174
+ .px-5xl {
3175
+ padding-inline: var(--spacing-5xl);
3176
+ }
3177
+
3178
+ .px-6xl {
3179
+ padding-inline: var(--spacing-6xl);
3180
+ }
3181
+
3182
+ .px-7xl {
3183
+ padding-inline: var(--spacing-7xl);
3184
+ }
3185
+
3186
+ .py-0 {
3187
+ padding-block: var(--spacing-0);
3188
+ }
3189
+
3190
+ .py-2xs {
3191
+ padding-block: var(--spacing-2xs);
3192
+ }
3193
+
3194
+ .py-xs {
3195
+ padding-block: var(--spacing-xs);
3196
+ }
3197
+
3198
+ .py-s {
3199
+ padding-block: var(--spacing-s);
3200
+ }
3201
+
3202
+ .py-m {
3203
+ padding-block: var(--spacing-m);
3204
+ }
3205
+
3206
+ .py-l {
3207
+ padding-block: var(--spacing-l);
3208
+ }
3209
+
3210
+ .py-xl {
3211
+ padding-block: var(--spacing-xl);
3212
+ }
3213
+
3214
+ .py-2xl {
3215
+ padding-block: var(--spacing-2xl);
3216
+ }
3217
+
3218
+ .py-3xl {
3219
+ padding-block: var(--spacing-3xl);
1861
3220
  }
1862
3221
 
1863
3222
  .py-4xl {
@@ -1880,6 +3239,10 @@
1880
3239
  padding-top: var(--spacing-0);
1881
3240
  }
1882
3241
 
3242
+ .pt-2xs {
3243
+ padding-top: var(--spacing-2xs);
3244
+ }
3245
+
1883
3246
  .pt-xs {
1884
3247
  padding-top: var(--spacing-xs);
1885
3248
  }
@@ -1928,6 +3291,10 @@
1928
3291
  padding-right: var(--spacing-0);
1929
3292
  }
1930
3293
 
3294
+ .pr-2xs {
3295
+ padding-right: var(--spacing-2xs);
3296
+ }
3297
+
1931
3298
  .pr-xs {
1932
3299
  padding-right: var(--spacing-xs);
1933
3300
  }
@@ -1976,6 +3343,10 @@
1976
3343
  padding-bottom: var(--spacing-0);
1977
3344
  }
1978
3345
 
3346
+ .pb-2xs {
3347
+ padding-bottom: var(--spacing-2xs);
3348
+ }
3349
+
1979
3350
  .pb-xs {
1980
3351
  padding-bottom: var(--spacing-xs);
1981
3352
  }
@@ -2024,6 +3395,10 @@
2024
3395
  padding-left: var(--spacing-0);
2025
3396
  }
2026
3397
 
3398
+ .pl-2xs {
3399
+ padding-left: var(--spacing-2xs);
3400
+ }
3401
+
2027
3402
  .pl-xs {
2028
3403
  padding-left: var(--spacing-xs);
2029
3404
  }
@@ -2074,6 +3449,10 @@
2074
3449
  margin: var(--spacing-0);
2075
3450
  }
2076
3451
 
3452
+ .m-2xs {
3453
+ margin: var(--spacing-2xs);
3454
+ }
3455
+
2077
3456
  .m-xs {
2078
3457
  margin: var(--spacing-xs);
2079
3458
  }
@@ -2122,6 +3501,10 @@
2122
3501
  margin-inline: var(--spacing-0);
2123
3502
  }
2124
3503
 
3504
+ .mx-2xs {
3505
+ margin-inline: var(--spacing-2xs);
3506
+ }
3507
+
2125
3508
  .mx-xs {
2126
3509
  margin-inline: var(--spacing-xs);
2127
3510
  }
@@ -2170,6 +3553,10 @@
2170
3553
  margin-block: var(--spacing-0);
2171
3554
  }
2172
3555
 
3556
+ .my-2xs {
3557
+ margin-block: var(--spacing-2xs);
3558
+ }
3559
+
2173
3560
  .my-xs {
2174
3561
  margin-block: var(--spacing-xs);
2175
3562
  }
@@ -2218,6 +3605,10 @@
2218
3605
  margin-top: var(--spacing-0);
2219
3606
  }
2220
3607
 
3608
+ .mt-2xs {
3609
+ margin-top: var(--spacing-2xs);
3610
+ }
3611
+
2221
3612
  .mt-xs {
2222
3613
  margin-top: var(--spacing-xs);
2223
3614
  }
@@ -2266,6 +3657,10 @@
2266
3657
  margin-right: var(--spacing-0);
2267
3658
  }
2268
3659
 
3660
+ .mr-2xs {
3661
+ margin-right: var(--spacing-2xs);
3662
+ }
3663
+
2269
3664
  .mr-xs {
2270
3665
  margin-right: var(--spacing-xs);
2271
3666
  }
@@ -2314,6 +3709,10 @@
2314
3709
  margin-bottom: var(--spacing-0);
2315
3710
  }
2316
3711
 
3712
+ .mb-2xs {
3713
+ margin-bottom: var(--spacing-2xs);
3714
+ }
3715
+
2317
3716
  .mb-xs {
2318
3717
  margin-bottom: var(--spacing-xs);
2319
3718
  }
@@ -2362,6 +3761,10 @@
2362
3761
  margin-left: var(--spacing-0);
2363
3762
  }
2364
3763
 
3764
+ .ml-2xs {
3765
+ margin-left: var(--spacing-2xs);
3766
+ }
3767
+
2365
3768
  .ml-xs {
2366
3769
  margin-left: var(--spacing-xs);
2367
3770
  }
@@ -2412,6 +3815,10 @@
2412
3815
  gap: var(--spacing-0);
2413
3816
  }
2414
3817
 
3818
+ .gap-2xs {
3819
+ gap: var(--spacing-2xs);
3820
+ }
3821
+
2415
3822
  .gap-xs {
2416
3823
  gap: var(--spacing-xs);
2417
3824
  }
@@ -2460,6 +3867,10 @@
2460
3867
  column-gap: var(--spacing-0);
2461
3868
  }
2462
3869
 
3870
+ .gap-x-2xs {
3871
+ column-gap: var(--spacing-2xs);
3872
+ }
3873
+
2463
3874
  .gap-x-xs {
2464
3875
  column-gap: var(--spacing-xs);
2465
3876
  }
@@ -2508,6 +3919,10 @@
2508
3919
  row-gap: var(--spacing-0);
2509
3920
  }
2510
3921
 
3922
+ .gap-y-2xs {
3923
+ row-gap: var(--spacing-2xs);
3924
+ }
3925
+
2511
3926
  .gap-y-xs {
2512
3927
  row-gap: var(--spacing-xs);
2513
3928
  }
@@ -2553,6 +3968,223 @@
2553
3968
  }
2554
3969
  }
2555
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
+
2556
4188
  /* --- src/styles/typography.css --- */
2557
4189
 
2558
4190
  /*
@@ -2565,9 +4197,7 @@
2565
4197
  * weight (400 / 600 / 700 theo token). Letter spacing, margin, màu chữ không
2566
4198
  * thuộc stylesheet này — màu dùng class text-* riêng.
2567
4199
  *
2568
- * Toàn bộ nằm trong `@layer components` để utility của Tailwind (`@layer
2569
- * utilities`) luôn thắng: `class="heading-1 font-bold"` hay `class="body-3
2570
- * 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.
2571
4201
  */
2572
4202
 
2573
4203
  @layer components {