@finhay-pro/leaf-design-system 0.1.6 → 0.1.8

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 (122) hide show
  1. package/README.md +352 -163
  2. package/dist/button.css +12 -15
  3. package/dist/calendar.css +325 -0
  4. package/dist/cdn/leaf-0.1.8.min.css +2 -0
  5. package/dist/cdn/leaf-0.1.8.min.js +2 -0
  6. package/dist/checkbox.css +132 -0
  7. package/dist/classes.css +2256 -1513
  8. package/dist/color.css +27 -32
  9. package/dist/components/Calendar/Calendar.d.ts +49 -0
  10. package/dist/components/Calendar/Calendar.d.ts.map +1 -0
  11. package/dist/components/Calendar/Calendar.js +167 -0
  12. package/dist/components/Calendar/Calendar.js.map +1 -0
  13. package/dist/components/Calendar/index.d.ts +2 -0
  14. package/dist/components/Calendar/index.d.ts.map +1 -0
  15. package/dist/components/Calendar/index.js +2 -0
  16. package/dist/components/Calendar/index.js.map +1 -0
  17. package/dist/components/Checkbox/Checkbox.d.ts +25 -0
  18. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  19. package/dist/components/Checkbox/Checkbox.js +40 -0
  20. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  21. package/dist/components/Checkbox/index.d.ts +2 -0
  22. package/dist/components/Checkbox/index.d.ts.map +1 -0
  23. package/dist/components/Checkbox/index.js +2 -0
  24. package/dist/components/Checkbox/index.js.map +1 -0
  25. package/dist/components/Dropdown/Dropdown.d.ts +62 -0
  26. package/dist/components/Dropdown/Dropdown.d.ts.map +1 -0
  27. package/dist/components/Dropdown/Dropdown.js +197 -0
  28. package/dist/components/Dropdown/Dropdown.js.map +1 -0
  29. package/dist/components/Dropdown/LanguageDropdown.d.ts +15 -0
  30. package/dist/components/Dropdown/LanguageDropdown.d.ts.map +1 -0
  31. package/dist/components/Dropdown/LanguageDropdown.js +18 -0
  32. package/dist/components/Dropdown/LanguageDropdown.js.map +1 -0
  33. package/dist/components/Dropdown/index.d.ts +4 -0
  34. package/dist/components/Dropdown/index.d.ts.map +1 -0
  35. package/dist/components/Dropdown/index.js +5 -0
  36. package/dist/components/Dropdown/index.js.map +1 -0
  37. package/dist/components/Input/Input.d.ts +57 -0
  38. package/dist/components/Input/Input.d.ts.map +1 -0
  39. package/dist/components/Input/Input.js +78 -0
  40. package/dist/components/Input/Input.js.map +1 -0
  41. package/dist/components/Input/InputDate.d.ts +56 -0
  42. package/dist/components/Input/InputDate.d.ts.map +1 -0
  43. package/dist/components/Input/InputDate.js +119 -0
  44. package/dist/components/Input/InputDate.js.map +1 -0
  45. package/dist/components/Input/InputOtp.d.ts +33 -0
  46. package/dist/components/Input/InputOtp.d.ts.map +1 -0
  47. package/dist/components/Input/InputOtp.js +96 -0
  48. package/dist/components/Input/InputOtp.js.map +1 -0
  49. package/dist/components/Input/InputStepper.d.ts +42 -0
  50. package/dist/components/Input/InputStepper.d.ts.map +1 -0
  51. package/dist/components/Input/InputStepper.js +86 -0
  52. package/dist/components/Input/InputStepper.js.map +1 -0
  53. package/dist/components/Input/index.d.ts +5 -0
  54. package/dist/components/Input/index.d.ts.map +1 -0
  55. package/dist/components/Input/index.js +5 -0
  56. package/dist/components/Input/index.js.map +1 -0
  57. package/dist/components/Radio/Radio.d.ts +39 -0
  58. package/dist/components/Radio/Radio.d.ts.map +1 -0
  59. package/dist/components/Radio/Radio.js +50 -0
  60. package/dist/components/Radio/Radio.js.map +1 -0
  61. package/dist/components/Radio/index.d.ts +2 -0
  62. package/dist/components/Radio/index.d.ts.map +1 -0
  63. package/dist/components/Radio/index.js +2 -0
  64. package/dist/components/Radio/index.js.map +1 -0
  65. package/dist/components/Toast/Toast.d.ts +66 -0
  66. package/dist/components/Toast/Toast.d.ts.map +1 -0
  67. package/dist/components/Toast/Toast.js +77 -0
  68. package/dist/components/Toast/Toast.js.map +1 -0
  69. package/dist/components/Toast/index.d.ts +2 -0
  70. package/dist/components/Toast/index.d.ts.map +1 -0
  71. package/dist/components/Toast/index.js +2 -0
  72. package/dist/components/Toast/index.js.map +1 -0
  73. package/dist/core/calendar.d.ts +36 -0
  74. package/dist/core/calendar.d.ts.map +1 -0
  75. package/dist/core/calendar.js +65 -0
  76. package/dist/core/calendar.js.map +1 -0
  77. package/dist/core/dropdown.d.ts +66 -0
  78. package/dist/core/dropdown.d.ts.map +1 -0
  79. package/dist/core/dropdown.js +131 -0
  80. package/dist/core/dropdown.js.map +1 -0
  81. package/dist/core/language.d.ts +25 -0
  82. package/dist/core/language.d.ts.map +1 -0
  83. package/dist/core/language.js +17 -0
  84. package/dist/core/language.js.map +1 -0
  85. package/dist/core/otp.d.ts +30 -0
  86. package/dist/core/otp.d.ts.map +1 -0
  87. package/dist/core/otp.js +65 -0
  88. package/dist/core/otp.js.map +1 -0
  89. package/dist/core/stepper.d.ts +39 -0
  90. package/dist/core/stepper.d.ts.map +1 -0
  91. package/dist/core/stepper.js +109 -0
  92. package/dist/core/stepper.js.map +1 -0
  93. package/dist/core/toast.d.ts +67 -0
  94. package/dist/core/toast.d.ts.map +1 -0
  95. package/dist/core/toast.js +102 -0
  96. package/dist/core/toast.js.map +1 -0
  97. package/dist/dialog.css +15 -9
  98. package/dist/dropdown.css +303 -0
  99. package/dist/index.d.ts +6 -0
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +6 -0
  102. package/dist/index.js.map +1 -1
  103. package/dist/input-date.css +49 -0
  104. package/dist/input-otp.css +76 -0
  105. package/dist/input-stepper.css +179 -0
  106. package/dist/input.css +218 -0
  107. package/dist/logo.css +2 -2
  108. package/dist/radio.css +124 -0
  109. package/dist/slider.css +16 -14
  110. package/dist/spinner.css +3 -3
  111. package/dist/styles.css +2255 -1545
  112. package/dist/tabs.css +5 -4
  113. package/dist/toast.css +234 -0
  114. package/dist/toggle.css +4 -3
  115. package/dist/tokens.css +0 -33
  116. package/dist/tooltip.css +13 -12
  117. package/dist/typography.css +1 -3
  118. package/package.json +10 -3
  119. package/dist/border.css +0 -45
  120. package/dist/cdn/leaf-0.1.6.min.css +0 -2
  121. package/dist/cdn/leaf-0.1.6.min.js +0 -2
  122. package/dist/spacing.css +0 -839
package/dist/styles.css CHANGED
@@ -263,39 +263,6 @@
263
263
  --body-5-highlight-weight: 600;
264
264
  }
265
265
 
266
- /* --- ../tokens/src/spacing.css --- */
267
-
268
- /* Spacing tokens — Figma 34:1034. Dùng cho margin, padding, gap. */
269
-
270
- :root {
271
- --spacing-0: 0px;
272
- --spacing-xs: 4px;
273
- --spacing-s: 8px;
274
- --spacing-m: 12px;
275
- --spacing-l: 16px;
276
- --spacing-xl: 24px;
277
- --spacing-2xl: 36px;
278
- --spacing-3xl: 48px;
279
- --spacing-4xl: 60px;
280
- --spacing-5xl: 84px;
281
- --spacing-6xl: 120px;
282
- --spacing-7xl: 240px;
283
- }
284
-
285
- /* --- ../tokens/src/border.css --- */
286
-
287
- /* Border radius tokens — Figma 700:4390. Map sang spacing cùng bậc. */
288
-
289
- :root {
290
- --radius-0: var(--spacing-0);
291
- --radius-xs: var(--spacing-xs);
292
- --radius-s: var(--spacing-s);
293
- --radius-m: var(--spacing-m);
294
- --radius-l: var(--spacing-l);
295
- --radius-xl: var(--spacing-xl);
296
- --radius-2xl: var(--spacing-2xl);
297
- }
298
-
299
266
  /* --- src/components/Button/button.css --- */
300
267
 
301
268
  /*
@@ -318,9 +285,9 @@
318
285
  /* Mặc định: size lg — Figma Large: h 56 · px XL · py S · gap L · icon 30 */
319
286
  /* --leaf-button-width chỉ set khi prop width; không set → auto / icon-only = height */
320
287
  --leaf-button-height: 56px;
321
- --leaf-button-padding: var(--spacing-s) var(--spacing-xl);
322
- --leaf-button-icon-only-padding: var(--spacing-s);
323
- --leaf-button-gap: var(--spacing-l);
288
+ --leaf-button-padding: 8px 24px;
289
+ --leaf-button-icon-only-padding: 8px;
290
+ --leaf-button-gap: 16px;
324
291
  --leaf-button-icon-size: 30px;
325
292
  --leaf-button-font-size: var(--body-1-size);
326
293
  --leaf-button-line-height: var(--body-1-line-height);
@@ -345,16 +312,16 @@
345
312
  border-radius: 1000px;
346
313
  background-color: var(--leaf-button-bg);
347
314
  color: var(--leaf-button-fg);
348
- text-align: center;
349
- white-space: nowrap;
350
315
  font: inherit;
351
316
  font-family: var(--font-sans);
352
317
  font-size: var(--leaf-button-font-size);
353
318
  line-height: var(--leaf-button-line-height);
354
319
  font-weight: var(--leaf-button-font-weight);
355
320
  letter-spacing: var(--leaf-button-letter-spacing);
356
- text-decoration: none;
321
+ text-align: center;
322
+ white-space: nowrap;
357
323
  vertical-align: middle;
324
+ text-decoration: none;
358
325
  appearance: none;
359
326
  }
360
327
 
@@ -375,10 +342,7 @@
375
342
  height: 1em;
376
343
  }
377
344
 
378
- /*
379
- * `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn
380
- * (bản vanilla ẩn leading icon khi loading), không trông vào preflight của Tailwind.
381
- */
345
+ /* `hidden` luôn ẩn — rule trên set display; selector `[hidden]` specificity cao hơn nên thắng. */
382
346
  .leaf-button[hidden],
383
347
  .leaf-button__icon[hidden] {
384
348
  display: none;
@@ -391,8 +355,8 @@
391
355
  .leaf-button[data-size="md"] {
392
356
  /* Medium: px L · py S · gap M · icon 24 · frame 40 */
393
357
  --leaf-button-height: 40px;
394
- --leaf-button-padding: var(--spacing-s) var(--spacing-l);
395
- --leaf-button-gap: var(--spacing-m);
358
+ --leaf-button-padding: 8px 16px;
359
+ --leaf-button-gap: 12px;
396
360
  --leaf-button-icon-size: 24px;
397
361
  --leaf-button-font-size: var(--body-3-size);
398
362
  --leaf-button-line-height: var(--body-3-line-height);
@@ -403,9 +367,9 @@
403
367
  .leaf-button[data-size="sm"] {
404
368
  /* Small: px M · py XS · gap S · icon 20 · frame 28 */
405
369
  --leaf-button-height: 28px;
406
- --leaf-button-padding: var(--spacing-xs) var(--spacing-m);
407
- --leaf-button-icon-only-padding: var(--spacing-xs);
408
- --leaf-button-gap: var(--spacing-s);
370
+ --leaf-button-padding: 4px 12px;
371
+ --leaf-button-icon-only-padding: 4px;
372
+ --leaf-button-gap: 8px;
409
373
  --leaf-button-icon-size: 20px;
410
374
  --leaf-button-font-size: var(--body-4-size);
411
375
  --leaf-button-line-height: var(--body-4-line-height);
@@ -510,2341 +474,3089 @@
510
474
  }
511
475
  }
512
476
 
513
- /* --- src/components/Dialog/dialog.css --- */
477
+ /* --- src/components/Calendar/calendar.css --- */
514
478
 
515
479
  /*
516
- * Dialog — Figma 994:4149.
480
+ * Calendar — port từ vnsc Calendar (panel chọn ngày / giờ).
517
481
  *
518
- * Backdrop phủ toàn màn hình + blur; panel căn giữa. Header (back · title · close)
519
- * bật/tắt qua markup — React chỉ gắn/gỡ phần tử, không gắn class typography/màu
520
- * theo prop. Thiếu phần header → chỉ còn body (children).
482
+ * Typography và màu tĩnh (nền, màu viền) là class Leaf trên markup. File này giữ khung
483
+ * (padding, radius, độ dày viền), layout, size cố định (panel 256, ô 28, select 64), hover,
484
+ * trạng thái ngày (data-selected / data-today / :disabled), vị trí dropdown
485
+ * (data-placement), bóng đổ, reset button. Footer là `Button` (cần button.css).
521
486
  */
522
487
 
523
488
  @layer components {
524
- .leaf-dialog-backdrop {
525
- position: fixed;
526
- inset: 0;
527
- z-index: var(--leaf-z-dialog, 50);
528
- display: flex;
529
- align-items: center;
530
- justify-content: center;
531
- padding: 16px;
532
- box-sizing: border-box;
533
- /*
534
- * Overlay — Figma 995:6039: Overlay/Overlay + blur nhẹ. Chỉ khai báo bản
535
- * chuẩn: Safari 18+ hỗ trợ `backdrop-filter` không prefix, còn dòng
536
- * `-webkit-` đặt sau từng ghi đè và làm blur không chạy.
537
- */
538
- background-color: var(--overlay);
539
- backdrop-filter: blur(5px);
540
- }
541
-
542
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để HTML tĩnh ẩn được. */
543
- .leaf-dialog-backdrop[hidden] {
544
- display: none;
545
- }
546
-
547
- .leaf-dialog {
548
- --leaf-dialog-gap: 16px;
549
- --leaf-dialog-padding: 16px;
550
- --leaf-dialog-radius: 12px;
551
- --leaf-dialog-back-size: 24px;
552
- --leaf-dialog-close-size: 28px;
553
- --leaf-dialog-close-icon: 20px;
489
+ .leaf-calendar {
490
+ --leaf-calendar-width: 256px;
491
+ --leaf-calendar-cell: 28px;
554
492
 
555
493
  display: flex;
556
494
  flex-direction: column;
557
- gap: var(--leaf-dialog-gap);
558
- /*
559
- * Width: luôn 100% trong trần maxWidth (responsive).
560
- * Height: cố định khi có --leaf-dialog-height (content động không giật panel);
561
- * không có → auto theo nội dung. maxHeight luôn là trần viewport.
562
- */
563
- width: 100%;
564
- max-width: var(--leaf-dialog-max-width, 100%);
565
- height: var(--leaf-dialog-height, auto);
566
- max-height: var(--leaf-dialog-max-height, 100%);
567
- margin: 0;
568
- padding: var(--leaf-dialog-padding);
569
- overflow: hidden;
495
+ gap: 8px;
570
496
  box-sizing: border-box;
571
- border-radius: var(--leaf-dialog-radius);
572
- background-color: var(--base-primary);
573
- color: var(--text-primary);
574
- font-family: var(--font-sans);
575
- }
576
-
577
- /* Panel nhận focus khi mở (tabindex="-1") — không phải control nên không vẽ outline. */
578
- .leaf-dialog:focus {
579
- outline: none;
497
+ width: var(--leaf-calendar-width);
498
+ max-width: 100%;
499
+ padding: 12px;
500
+ border-width: 1px;
501
+ border-style: solid;
502
+ border-radius: 12px;
580
503
  }
581
504
 
582
- .leaf-dialog__header {
505
+ .leaf-calendar__header {
506
+ position: relative;
583
507
  display: flex;
584
- flex-shrink: 0;
585
508
  align-items: center;
586
509
  justify-content: space-between;
587
- gap: var(--leaf-dialog-gap);
588
- width: 100%;
589
- min-width: 0;
590
510
  }
591
511
 
592
- /* Cụm trái: back + title */
593
- .leaf-dialog__start {
594
- display: flex;
595
- align-items: center;
596
- gap: var(--leaf-dialog-gap);
597
- min-width: 0;
598
- flex: 1 1 auto;
512
+ .leaf-calendar[data-time-only="true"] {
513
+ --leaf-calendar-width: auto;
599
514
  }
600
515
 
601
- /*
602
- * Title — heading-3 · --text-primary nằm ngay ở đây: markup không cần class typography /
603
- * màu, nên utility trùng tên của app (vd. `text-primary` sinh từ `@theme`) không chen vào.
604
- */
605
- .leaf-dialog__start > :where(h2, p) {
516
+ /* Reset button của panel — không đụng footer `.leaf-button` (tự reset trong button.css). */
517
+ :is(
518
+ .leaf-calendar__nav,
519
+ .leaf-calendar__title,
520
+ .leaf-calendar__day,
521
+ .leaf-calendar__option,
522
+ .leaf-calendar__select
523
+ ) {
606
524
  margin: 0;
607
- min-width: 0;
608
- overflow: hidden;
609
- text-overflow: ellipsis;
610
- white-space: nowrap;
611
- color: var(--text-primary);
612
525
  font-family: var(--font-sans);
613
- font-size: var(--heading-3-size);
614
- line-height: var(--heading-3-line-height);
615
- font-weight: var(--heading-3-weight);
526
+ appearance: none;
527
+ cursor: pointer;
616
528
  }
617
529
 
618
- .leaf-dialog__back,
619
- .leaf-dialog__close {
530
+ .leaf-calendar__nav {
620
531
  display: inline-flex;
621
- flex-shrink: 0;
622
532
  align-items: center;
623
533
  justify-content: center;
624
- margin: 0;
534
+ border-radius: 8px;
535
+ width: var(--leaf-calendar-cell);
536
+ height: var(--leaf-calendar-cell);
625
537
  padding: 0;
626
538
  border: none;
627
- cursor: pointer;
628
- color: var(--text-primary);
629
- background: transparent;
630
- font: inherit;
631
- appearance: none;
632
- box-sizing: border-box;
633
- }
634
-
635
- .leaf-dialog__back {
636
- width: var(--leaf-dialog-back-size);
637
- height: var(--leaf-dialog-back-size);
539
+ background-color: var(--base-tertiary);
540
+ font-size: 16px;
541
+ line-height: 1;
542
+ transition: background-color 0.15s ease;
638
543
  }
639
544
 
640
- .leaf-dialog__back:hover,
641
- .leaf-dialog__close:hover {
642
- color: var(--text-highlight);
545
+ .leaf-calendar__nav[data-size="sm"] {
546
+ width: 24px;
547
+ height: 24px;
548
+ font-size: 14px;
643
549
  }
644
550
 
645
- .leaf-dialog__back:focus-visible,
646
- .leaf-dialog__close:focus-visible {
647
- outline: 2px solid var(--text-highlight);
648
- outline-offset: 2px;
551
+ .leaf-calendar__nav:hover {
552
+ background-color: var(--base-quaternary);
649
553
  }
650
554
 
651
- .leaf-dialog__icon {
555
+ .leaf-calendar__nav > svg,
556
+ .leaf-calendar__caret > svg {
652
557
  display: block;
653
558
  width: 1em;
654
559
  height: 1em;
655
560
  }
656
561
 
657
- .leaf-dialog__back .leaf-dialog__icon {
658
- font-size: var(--leaf-dialog-back-size);
562
+ .leaf-calendar__title {
563
+ display: inline-flex;
564
+ align-items: center;
565
+ gap: 4px;
566
+ border-radius: 8px;
567
+ padding: 2px 8px;
568
+ border: none;
569
+ background-color: transparent;
570
+ transition: background-color 0.15s ease;
659
571
  }
660
572
 
661
- .leaf-dialog__close {
662
- width: var(--leaf-dialog-close-size);
663
- min-height: var(--leaf-dialog-close-size);
664
- padding: 4px 6px;
665
- border-radius: 100px;
666
- background-color: var(--base-secondary);
667
- font-size: var(--leaf-dialog-close-icon);
573
+ .leaf-calendar__title:hover,
574
+ .leaf-calendar__title[aria-expanded="true"] {
575
+ background-color: var(--base-tertiary);
668
576
  }
669
577
 
670
- .leaf-dialog__body {
578
+ .leaf-calendar__heading {
671
579
  display: flex;
672
- flex: 1 1 auto;
673
580
  flex-direction: column;
674
- gap: var(--leaf-dialog-gap);
675
- min-height: 0;
676
- width: 100%;
677
- overflow: auto;
581
+ align-items: center;
678
582
  }
679
- }
680
583
 
681
- /* --- src/components/Logo/logo.css --- */
584
+ .leaf-calendar__caret {
585
+ display: inline-flex;
586
+ font-size: 12px;
587
+ color: var(--text-tertiary);
588
+ }
682
589
 
683
- /*
684
- * Logo — Figma 924:1074.
685
- *
686
- * React: chọn SVG trong assets.ts, render <img class="leaf-logo__img">.
687
- * HTML tĩnh: span.leaf-logo:empty + data-brand / data-mode / data-side — rule
688
- * background-image nằm ở logo-assets.css (generated bởi scripts/embed-logo-assets.mjs,
689
- * không gộp vào classes.css / styles.css; bản CDN đã gộp sẵn).
690
- * Size (chiều cao) qua --leaf-logo-size.
691
- */
590
+ .leaf-calendar__months,
591
+ .leaf-calendar__list {
592
+ box-shadow: 0 16px 40px rgb(0 0 0 / 0.35);
593
+ }
692
594
 
693
- @layer components {
694
- .leaf-logo {
695
- display: inline-flex;
696
- flex-shrink: 0;
595
+ .leaf-calendar__months {
596
+ position: absolute;
597
+ top: 100%;
598
+ right: 0;
599
+ left: 0;
600
+ z-index: 30;
601
+ display: flex;
602
+ flex-direction: column;
603
+ gap: 8px;
604
+ margin-top: 6px;
605
+ padding: 8px;
606
+ border-width: 1px;
607
+ border-style: solid;
608
+ border-radius: 12px;
609
+ }
610
+
611
+ .leaf-calendar__months-header {
612
+ display: flex;
697
613
  align-items: center;
698
- justify-content: center;
699
- margin: 0;
700
- padding: 0;
701
- border: none;
702
- background: transparent;
703
- background-repeat: no-repeat;
704
- background-position: center;
705
- background-size: contain;
706
- line-height: 0;
707
- vertical-align: middle;
708
- box-sizing: border-box;
614
+ justify-content: space-between;
709
615
  }
710
616
 
711
- /* HTML tĩnh — không có <img>, asset lấy từ data-* */
712
- .leaf-logo:empty {
713
- display: inline-block;
714
- height: var(--leaf-logo-size, 40px);
715
- width: calc(var(--leaf-logo-size, 40px) * var(--leaf-logo-aspect, 1));
617
+ .leaf-calendar__months-grid {
618
+ display: grid;
619
+ grid-template-columns: repeat(3, minmax(0, 1fr));
620
+ gap: 4px;
716
621
  }
717
622
 
718
- .leaf-logo__img {
719
- display: block;
720
- height: var(--leaf-logo-size, 40px);
721
- width: auto;
722
- max-width: 100%;
623
+ .leaf-calendar__weekdays,
624
+ .leaf-calendar__days {
625
+ display: grid;
626
+ grid-template-columns: repeat(7, minmax(0, 1fr));
627
+ gap: 2px;
723
628
  }
724
629
 
725
- /* `display` ở trên (kể cả `:empty`) thắng `[hidden]` của trình duyệt — khai báo lại, đứng sau. */
726
- .leaf-logo[hidden] {
727
- display: none;
630
+ .leaf-calendar__weekday {
631
+ padding-block: 2px;
632
+ text-align: center;
728
633
  }
729
- }
730
634
 
731
- /* --- src/components/Skeleton/skeleton.css --- */
635
+ .leaf-calendar__num,
636
+ .leaf-calendar__select,
637
+ .leaf-calendar__option--time {
638
+ font-variant-numeric: tabular-nums;
639
+ }
732
640
 
733
- /*
734
- * Skeleton — placeholder shimmer.
735
- *
736
- * Nền `--base-tertiary` (dark: #28292B). Kích thước / radius qua custom property
737
- * từ React (hoặc style inline khi HTML tĩnh). Thiếu biến → full width/height,
738
- * radius 12px.
739
- */
641
+ /* Ô ngày / tháng / giờ — màu theo state nên nằm ở đây, không gắn class màu trên markup. */
642
+ .leaf-calendar__day,
643
+ .leaf-calendar__option {
644
+ display: inline-flex;
645
+ align-items: center;
646
+ justify-content: center;
647
+ border-radius: 8px;
648
+ height: var(--leaf-calendar-cell);
649
+ padding: 0;
650
+ border: 1px solid transparent;
651
+ background-color: transparent;
652
+ color: var(--text-primary);
653
+ transition:
654
+ background-color 0.15s ease,
655
+ color 0.15s ease;
656
+ }
740
657
 
741
- @layer components {
742
- .leaf-skeleton {
743
- --leaf-skeleton-width: 100%;
744
- --leaf-skeleton-height: 100%;
745
- --leaf-skeleton-radius: 12px;
658
+ .leaf-calendar__option--time {
659
+ flex-shrink: 0;
660
+ height: 24px;
661
+ }
746
662
 
747
- position: relative;
748
- overflow: hidden;
749
- box-sizing: border-box;
750
- width: var(--leaf-skeleton-width);
751
- height: var(--leaf-skeleton-height);
752
- border-radius: var(--leaf-skeleton-radius);
663
+ .leaf-calendar__day:not(:disabled):not([data-selected="true"]):hover,
664
+ .leaf-calendar__option:not([data-selected="true"]):hover {
753
665
  background-color: var(--base-tertiary);
754
666
  }
755
667
 
756
- .leaf-skeleton__shimmer {
757
- position: absolute;
758
- inset: 0;
759
- background: linear-gradient(
760
- to right,
761
- transparent,
762
- color-mix(in srgb, var(--base-quinary) 10%, transparent),
763
- transparent
764
- );
765
- animation: leaf-skeleton-shimmer 2s infinite ease-in-out;
668
+ .leaf-calendar__day[data-today="true"] {
669
+ border-color: var(--text-highlight);
670
+ color: var(--text-highlight);
766
671
  }
767
- }
768
672
 
769
- @keyframes leaf-skeleton-shimmer {
770
- 0% {
771
- transform: translateX(-100%);
673
+ .leaf-calendar__day[data-selected="true"],
674
+ .leaf-calendar__option[data-selected="true"] {
675
+ border-color: transparent;
676
+ background-color: var(--text-highlight);
677
+ color: var(--text-quaternary);
678
+ font-weight: var(--body-5-highlight-weight);
772
679
  }
773
- 100% {
774
- transform: translateX(100%);
680
+
681
+ .leaf-calendar__day:disabled {
682
+ border-color: transparent;
683
+ background-color: transparent;
684
+ color: var(--text-tertiary);
685
+ opacity: 0.5;
686
+ cursor: not-allowed;
775
687
  }
776
- }
777
688
 
778
- /* --- src/components/Slider/slider.css --- */
689
+ .leaf-calendar__day:focus-visible,
690
+ .leaf-calendar__option:focus-visible,
691
+ .leaf-calendar__nav:focus-visible,
692
+ .leaf-calendar__title:focus-visible,
693
+ .leaf-calendar__select:focus-visible {
694
+ outline: 2px solid var(--text-highlight);
695
+ outline-offset: 1px;
696
+ }
779
697
 
780
- /*
781
- * Slider — Figma 730:12646.
782
- *
783
- * Giá trị liên tục trên rail (kéo / click chính xác tới từng step — như
784
- * TradeQuickSlider). Mốc chia đều đặt tuyệt đối theo `left: <%>`; thumb đặt ở
785
- * `--leaf-slider-fill`. Ở min thumb = `--text-primary`; khi > min =
786
- * `--leaf-slider-active` (mặc định `--text-highlight`).
787
- *
788
- * Rail, mốc và thumb cùng nằm trong vùng lùi vào `--leaf-slider-inset` ở hai đầu
789
- * (nửa thumb) — nhờ vậy `left: X%` của cả ba khớp nhau và thumb không tràn ra ngoài.
790
- */
698
+ .leaf-calendar__empty {
699
+ height: var(--leaf-calendar-cell);
700
+ }
791
701
 
792
- @layer components {
793
- .leaf-slider {
794
- --leaf-slider-active: var(--text-highlight);
795
- --leaf-slider-fill: 0%;
796
- --leaf-slider-mark: 6px;
797
- --leaf-slider-mark-active: 10px;
798
- --leaf-slider-rail-height: 2px;
799
- --leaf-slider-inset: calc(var(--leaf-slider-mark-active) / 2);
800
- --leaf-slider-control-height: max(
801
- var(--leaf-slider-mark-active),
802
- var(--leaf-slider-mark),
803
- 20px
804
- );
702
+ .leaf-calendar__divider {
703
+ height: 1px;
704
+ }
805
705
 
706
+ .leaf-calendar__time {
806
707
  display: flex;
807
- flex-direction: column;
808
- /* Figma gap S (8) giữa Title/Unit và khối track+labels. */
708
+ align-items: center;
709
+ justify-content: space-between;
809
710
  gap: 8px;
810
- width: 100%;
811
- box-sizing: border-box;
812
- font-family: var(--font-sans);
813
- font-size: var(--body-5-size);
814
- line-height: var(--body-5-line-height);
815
- font-weight: var(--body-5-weight);
816
- color: var(--text-primary);
817
- user-select: none;
818
- -webkit-user-select: none;
819
- }
820
-
821
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn. */
822
- .leaf-slider[hidden] {
823
- display: none;
824
711
  }
825
712
 
826
- /* Figma gap XS (4) giữa track và Value labels. */
827
- .leaf-slider__body {
713
+ .leaf-calendar__time-group {
828
714
  display: flex;
829
- flex-direction: column;
715
+ align-items: center;
830
716
  gap: 4px;
831
- width: 100%;
832
717
  }
833
718
 
834
- .leaf-slider__header {
835
- display: flex;
836
- align-items: flex-start;
719
+ .leaf-calendar__select-wrap {
720
+ position: relative;
721
+ }
722
+
723
+ .leaf-calendar__select {
724
+ display: inline-flex;
725
+ align-items: center;
837
726
  justify-content: space-between;
838
- gap: 8px;
839
- width: 100%;
727
+ padding-inline: 8px;
728
+ border-radius: 8px;
729
+ box-sizing: border-box;
730
+ width: 64px;
731
+ height: var(--leaf-calendar-cell);
732
+ padding-block: 0;
733
+ border: 1px solid var(--base-quaternary);
734
+ background-color: var(--base-tertiary);
840
735
  color: var(--text-primary);
841
- white-space: nowrap;
842
- user-select: text;
843
- -webkit-user-select: text;
844
736
  }
845
737
 
846
- .leaf-slider__title,
847
- .leaf-slider__unit {
848
- min-width: 0;
738
+ .leaf-calendar__select[aria-expanded="true"] {
739
+ border-color: var(--text-highlight);
849
740
  }
850
741
 
851
- .leaf-slider__unit {
852
- text-align: right;
742
+ .leaf-calendar__list {
743
+ position: absolute;
744
+ left: 0;
745
+ z-index: 20;
746
+ display: flex;
747
+ flex-direction: column;
748
+ gap: 2px;
749
+ padding: 4px;
750
+ border-width: 1px;
751
+ border-style: solid;
752
+ border-radius: 8px;
753
+ overflow-y: auto;
754
+ box-sizing: border-box;
755
+ width: 64px;
756
+ max-height: 160px;
853
757
  }
854
758
 
855
- .leaf-slider__control {
856
- position: relative;
759
+ .leaf-calendar__list[data-placement="bottom"] {
760
+ top: 100%;
761
+ margin-top: 4px;
762
+ }
763
+
764
+ .leaf-calendar__list[data-placement="top"] {
765
+ bottom: 100%;
766
+ margin-bottom: 4px;
767
+ }
768
+
769
+ .leaf-calendar__footer {
857
770
  display: flex;
858
- align-items: center;
859
- width: 100%;
860
- height: var(--leaf-slider-control-height);
861
- outline: none;
862
- cursor: pointer;
863
- /* Chỉ khoá gesture trên track — header / labels vẫn cho cuộn trang. */
864
- touch-action: none;
771
+ gap: 8px;
865
772
  }
866
773
 
867
- .leaf-slider__control:focus-visible {
868
- outline: 2px solid var(--leaf-slider-active);
869
- outline-offset: 4px;
870
- border-radius: 4px;
774
+ .leaf-calendar__footer > .leaf-button {
775
+ flex: 1;
776
+ }
777
+
778
+ .leaf-calendar[hidden],
779
+ .leaf-calendar__header[hidden],
780
+ .leaf-calendar__nav[hidden],
781
+ .leaf-calendar__title[hidden],
782
+ .leaf-calendar__heading[hidden],
783
+ .leaf-calendar__caret[hidden],
784
+ .leaf-calendar__months[hidden],
785
+ .leaf-calendar__months-header[hidden],
786
+ .leaf-calendar__months-grid[hidden],
787
+ .leaf-calendar__weekdays[hidden],
788
+ .leaf-calendar__days[hidden],
789
+ .leaf-calendar__time[hidden],
790
+ .leaf-calendar__time-group[hidden],
791
+ .leaf-calendar__select[hidden],
792
+ .leaf-calendar__footer[hidden],
793
+ .leaf-calendar__list[hidden],
794
+ .leaf-calendar__day[hidden],
795
+ .leaf-calendar__option[hidden] {
796
+ display: none;
871
797
  }
798
+ }
872
799
 
873
- .leaf-slider[data-dragging="true"] .leaf-slider__control {
874
- cursor: grabbing;
800
+ /* --- src/components/Checkbox/checkbox.css --- */
801
+
802
+ /*
803
+ * Checkbox — Figma 891:10191.
804
+ *
805
+ * Selection Unchecked / Checked / Indeterminate qua `:checked` / `:indeterminate`
806
+ * của input native; State Disabled qua `:disabled`. Input phủ kín box (opacity 0)
807
+ * nên click / focus / FormData là của trình duyệt — HTML tĩnh chỉ cần CSS
808
+ * (indeterminate là property DOM, set bằng JS: `input.indeterminate = true`).
809
+ */
810
+
811
+ @layer components {
812
+ .leaf-checkbox {
813
+ --leaf-checkbox-size: 20px;
814
+
815
+ display: inline-flex;
816
+ flex-direction: column;
817
+ align-items: flex-start;
818
+ gap: 8px;
819
+ vertical-align: top;
820
+ cursor: pointer;
875
821
  }
876
822
 
877
- .leaf-slider__rail {
878
- position: absolute;
879
- left: var(--leaf-slider-inset);
880
- right: var(--leaf-slider-inset);
881
- top: 50%;
882
- height: var(--leaf-slider-rail-height);
883
- transform: translateY(-50%);
884
- border-radius: 100px;
885
- background-color: var(--text-tertiary);
886
- pointer-events: none;
823
+ .leaf-checkbox__row {
824
+ position: relative;
825
+ display: inline-flex;
826
+ align-items: flex-start;
827
+ gap: 8px;
887
828
  }
888
829
 
889
- .leaf-slider__fill {
890
- display: block;
891
- height: 100%;
892
- width: var(--leaf-slider-fill);
893
- border-radius: inherit;
894
- background-color: var(--text-primary);
830
+ .leaf-checkbox[hidden],
831
+ .leaf-checkbox__row[hidden],
832
+ .leaf-checkbox__box[hidden] {
833
+ display: none;
895
834
  }
896
835
 
897
- /* Khung toạ độ cho mốc + thumb — trùng với rail, cao 0, nằm giữa control. */
898
- .leaf-slider__marks {
899
- position: absolute;
900
- z-index: 1;
901
- left: var(--leaf-slider-inset);
902
- right: var(--leaf-slider-inset);
903
- top: 50%;
904
- height: 0;
905
- pointer-events: none;
836
+ .leaf-checkbox__label,
837
+ .leaf-checkbox__text {
838
+ color: var(--text-primary);
906
839
  }
907
840
 
908
- .leaf-slider__mark {
841
+ .leaf-checkbox__input {
909
842
  position: absolute;
910
843
  top: 0;
911
844
  left: 0;
912
- display: block;
913
- box-sizing: border-box;
914
- width: var(--leaf-slider-mark);
915
- height: var(--leaf-slider-mark);
845
+ width: var(--leaf-checkbox-size);
846
+ height: var(--leaf-checkbox-size);
916
847
  margin: 0;
917
848
  padding: 0;
918
849
  border: none;
919
- border-radius: 50%;
920
- background-color: var(--text-tertiary);
921
- cursor: pointer;
850
+ opacity: 0;
851
+ cursor: inherit;
922
852
  appearance: none;
923
853
  -webkit-appearance: none;
924
- pointer-events: auto;
925
- transform: translate(-50%, -50%);
926
- transition: background-color 0.15s ease;
927
854
  }
928
855
 
929
- .leaf-slider__mark[data-state="passed"] {
930
- background-color: var(--text-primary);
856
+ .leaf-checkbox__box {
857
+ display: inline-flex;
858
+ flex-shrink: 0;
859
+ align-items: center;
860
+ justify-content: center;
861
+ border-radius: 4px;
862
+ box-sizing: border-box;
863
+ width: var(--leaf-checkbox-size);
864
+ height: var(--leaf-checkbox-size);
865
+ border: 1.5px solid var(--text-secondary);
866
+ background-color: transparent;
867
+ color: var(--icon-on-color);
868
+ transition:
869
+ background-color 0.15s ease,
870
+ border-color 0.15s ease;
931
871
  }
932
872
 
933
- /* Mốc trùng giá trị nằm dưới thumb — cùng màu để không lộ viền. */
934
- .leaf-slider__mark[data-state="active"] {
935
- background-color: var(--text-primary);
873
+ .leaf-checkbox__icon {
874
+ display: none;
875
+ width: 14px;
876
+ height: 14px;
936
877
  }
937
878
 
938
- .leaf-slider:not([data-at-min="true"]) .leaf-slider__mark[data-state="active"] {
939
- background-color: var(--leaf-slider-active);
879
+ /* Checked — nền highlight, check trắng. */
880
+ .leaf-checkbox__input:checked + .leaf-checkbox__box {
881
+ border-color: var(--text-highlight);
882
+ background-color: var(--text-highlight);
940
883
  }
941
884
 
942
- .leaf-slider__thumb {
943
- position: absolute;
944
- top: 0;
945
- left: var(--leaf-slider-fill);
885
+ .leaf-checkbox__input:checked:not(:indeterminate) + .leaf-checkbox__box .leaf-checkbox__check {
946
886
  display: block;
947
- box-sizing: border-box;
948
- width: var(--leaf-slider-mark-active);
949
- height: var(--leaf-slider-mark-active);
950
- border-radius: 50%;
951
- /* Figma Default (min): thumb trắng; Active (> min): highlight. */
952
- background-color: var(--text-primary);
953
- transform: translate(-50%, -50%);
954
- pointer-events: none;
955
- transition: background-color 0.15s ease;
956
- }
957
-
958
- .leaf-slider:not([data-at-min="true"]) .leaf-slider__thumb {
959
- background-color: var(--leaf-slider-active);
960
- }
961
-
962
- /* Label căn đúng dưới mốc: cùng vùng lùi với rail; nhãn hai đầu kéo ra sát mép. */
963
- .leaf-slider__labels {
964
- position: relative;
965
- margin-inline: var(--leaf-slider-inset);
966
- min-height: var(--body-5-line-height);
967
- user-select: text;
968
- -webkit-user-select: text;
969
887
  }
970
888
 
971
- .leaf-slider__label {
972
- position: absolute;
973
- top: 0;
974
- max-width: 40%;
975
- margin: 0;
976
- padding: 0;
977
- border: none;
978
- background: none;
979
- font: inherit;
980
- color: var(--text-secondary);
981
- white-space: nowrap;
982
- transform: translateX(-50%);
983
- text-align: center;
984
- cursor: pointer;
985
- appearance: none;
986
- -webkit-appearance: none;
889
+ /* Indeterminate — nền primary, gạch ngang tối. */
890
+ .leaf-checkbox__input:indeterminate + .leaf-checkbox__box {
891
+ border-color: var(--text-primary);
892
+ background-color: var(--text-primary);
893
+ color: var(--text-quaternary);
987
894
  }
988
895
 
989
- .leaf-slider__label[data-edge="start"] {
990
- transform: translateX(calc(-1 * var(--leaf-slider-inset)));
991
- text-align: left;
896
+ .leaf-checkbox__input:indeterminate + .leaf-checkbox__box .leaf-checkbox__dash {
897
+ display: block;
992
898
  }
993
899
 
994
- .leaf-slider__label[data-edge="end"] {
995
- transform: translateX(calc(-100% + var(--leaf-slider-inset)));
996
- text-align: right;
900
+ /* Disabled */
901
+ .leaf-checkbox__input:disabled + .leaf-checkbox__box {
902
+ border-color: var(--base-quaternary);
997
903
  }
998
904
 
999
- .leaf-slider__label[data-active="true"] {
1000
- color: var(--text-primary);
905
+ .leaf-checkbox__input:disabled:checked + .leaf-checkbox__box,
906
+ .leaf-checkbox__input:disabled:indeterminate + .leaf-checkbox__box {
907
+ border-color: var(--base-quaternary);
908
+ background-color: var(--base-quaternary);
909
+ color: var(--text-tertiary);
1001
910
  }
1002
911
 
1003
- .leaf-slider__label:disabled {
912
+ .leaf-checkbox:has(.leaf-checkbox__input:disabled) {
1004
913
  cursor: not-allowed;
1005
914
  }
1006
915
 
1007
- .leaf-slider[data-disabled="true"] {
1008
- opacity: 0.5;
1009
- pointer-events: none;
916
+ .leaf-checkbox:has(.leaf-checkbox__input:disabled) .leaf-checkbox__label {
917
+ color: var(--text-tertiary);
1010
918
  }
1011
919
 
1012
- .leaf-slider[data-disabled="true"] .leaf-slider__control {
1013
- touch-action: auto;
920
+ .leaf-checkbox__input:disabled ~ .leaf-checkbox__text {
921
+ color: var(--text-secondary);
1014
922
  }
1015
923
 
1016
- .leaf-slider[data-disabled="true"] .leaf-slider__control,
1017
- .leaf-slider[data-disabled="true"] .leaf-slider__mark,
1018
- .leaf-slider[data-disabled="true"] .leaf-slider__label {
1019
- cursor: not-allowed;
924
+ .leaf-checkbox__input:focus-visible + .leaf-checkbox__box {
925
+ outline: 2px solid var(--text-highlight);
926
+ outline-offset: 2px;
1020
927
  }
1021
928
  }
1022
929
 
1023
- /* --- src/components/Spinner/spinner.css --- */
930
+ /* --- src/components/Dialog/dialog.css --- */
1024
931
 
1025
932
  /*
1026
- * Spinner — SVG loader-line (Figma Button), viewBox 0 0 21 21.
933
+ * Dialog — Figma 994:4149.
1027
934
  *
1028
- * Variant animation qua data-animation; size qua data-size; overlay fullscreen
1029
- * qua .leaf-spinner-overlay. Màu mặc định trắng (dark) / đen (light) qua --base-quinary —
1030
- * không dùng highlight; override bằng class text-* khi cần. Thiếu attribute → md · spin.
935
+ * Backdrop phủ toàn màn hình + blur; panel căn giữa. Header (back · title · close)
936
+ * bật/tắt qua markup — React chỉ gắn/gỡ phần tử, không gắn class typography/màu
937
+ * theo prop. Thiếu phần header → chỉ còn body (children).
1031
938
  */
1032
939
 
1033
940
  @layer components {
1034
- .leaf-spinner {
1035
- --leaf-spinner-size: 24px;
1036
- --leaf-spinner-duration: 1.2s;
1037
-
1038
- display: inline-flex;
1039
- flex-shrink: 0;
1040
- align-items: center;
1041
- justify-content: center;
1042
- width: var(--leaf-spinner-size);
1043
- height: var(--leaf-spinner-size);
1044
- color: var(--base-quinary);
1045
- vertical-align: middle;
1046
- line-height: 0;
1047
- }
1048
-
1049
- .leaf-spinner__icon {
1050
- display: block;
1051
- width: 100%;
1052
- height: 100%;
1053
- }
1054
-
1055
- /* Fullscreen overlay — pattern Spinner (portal + nền mờ). */
1056
- .leaf-spinner-overlay {
941
+ .leaf-dialog-backdrop {
1057
942
  position: fixed;
1058
943
  inset: 0;
1059
- z-index: var(--leaf-z-spinner-overlay, 100);
1060
944
  display: flex;
1061
945
  align-items: center;
1062
946
  justify-content: center;
947
+ z-index: var(--leaf-z-dialog, 50);
948
+ padding: 16px;
1063
949
  box-sizing: border-box;
950
+ /*
951
+ * Overlay — Figma 995:6039: Overlay/Overlay + blur nhẹ. Chỉ khai báo bản
952
+ * chuẩn: Safari 18+ hỗ trợ `backdrop-filter` không prefix, còn dòng
953
+ * `-webkit-` đặt sau từng ghi đè và làm blur không chạy.
954
+ */
1064
955
  background-color: var(--overlay);
1065
- color: var(--base-quinary);
956
+ backdrop-filter: blur(5px);
1066
957
  }
1067
958
 
1068
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để HTML tĩnh ẩn được. */
1069
- .leaf-spinner[hidden],
1070
- .leaf-spinner-overlay[hidden] {
959
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
960
+ .leaf-dialog-backdrop[hidden],
961
+ .leaf-dialog[hidden],
962
+ .leaf-dialog__header[hidden],
963
+ .leaf-dialog__start[hidden],
964
+ .leaf-dialog__back[hidden],
965
+ .leaf-dialog__close[hidden],
966
+ .leaf-dialog__body[hidden] {
1071
967
  display: none;
1072
968
  }
1073
969
 
1074
- /* ── Size ────────────────────────────────────────────────────────────── */
970
+ .leaf-dialog {
971
+ --leaf-dialog-gap: 16px;
972
+ --leaf-dialog-padding: 16px;
973
+ --leaf-dialog-radius: 12px;
974
+ --leaf-dialog-back-size: 24px;
975
+ --leaf-dialog-close-size: 28px;
976
+ --leaf-dialog-close-icon: 20px;
1075
977
 
1076
- .leaf-spinner[data-size="lg"] {
1077
- --leaf-spinner-size: 30px;
978
+ display: flex;
979
+ flex-direction: column;
980
+ gap: var(--leaf-dialog-gap);
981
+ overflow: hidden;
982
+ /*
983
+ * Width: luôn 100% trong trần maxWidth (responsive).
984
+ * Height: cố định khi có --leaf-dialog-height (content động không giật panel);
985
+ * không có → auto theo nội dung. maxHeight luôn là trần viewport.
986
+ */
987
+ width: 100%;
988
+ max-width: var(--leaf-dialog-max-width, 100%);
989
+ height: var(--leaf-dialog-height, auto);
990
+ max-height: var(--leaf-dialog-max-height, 100%);
991
+ margin: 0;
992
+ padding: var(--leaf-dialog-padding);
993
+ box-sizing: border-box;
994
+ border-radius: var(--leaf-dialog-radius);
995
+ background-color: var(--base-primary);
996
+ color: var(--text-primary);
997
+ font-family: var(--font-sans);
1078
998
  }
1079
999
 
1080
- .leaf-spinner[data-size="sm"] {
1081
- --leaf-spinner-size: 20px;
1000
+ /* Panel nhận focus khi mở (tabindex="-1") — không phải control nên không vẽ outline. */
1001
+ .leaf-dialog:focus {
1002
+ outline: none;
1082
1003
  }
1083
1004
 
1084
- /* ── Animations ──────────────────────────────────────────────────────── */
1005
+ .leaf-dialog__header {
1006
+ display: flex;
1007
+ flex-shrink: 0;
1008
+ align-items: center;
1009
+ justify-content: space-between;
1010
+ gap: var(--leaf-dialog-gap);
1011
+ width: 100%;
1012
+ min-width: 0;
1013
+ }
1085
1014
 
1086
- /* spin — xoay cả icon (mặc định). */
1087
- .leaf-spinner[data-animation="spin"] .leaf-spinner__icon,
1088
- .leaf-spinner:not([data-animation]) .leaf-spinner__icon {
1089
- animation: leaf-spinner-spin var(--leaf-spinner-duration) linear infinite;
1015
+ /* Cụm trái: back + title */
1016
+ .leaf-dialog__start {
1017
+ display: flex;
1018
+ flex: auto;
1019
+ align-items: center;
1020
+ gap: var(--leaf-dialog-gap);
1021
+ min-width: 0;
1090
1022
  }
1091
1023
 
1092
1024
  /*
1093
- * fade — xoay + mask conic để tạo hiệu ứng đuôi mờ (kiểu iOS trên 1 path).
1025
+ * Title — heading-3 · --text-primary nằm ngay ở đây: markup không cần class typography /
1026
+ * màu, nên utility trùng tên của app (vd. `text-primary`) không chen vào.
1094
1027
  */
1095
- .leaf-spinner[data-animation="fade"] .leaf-spinner__icon {
1096
- animation: leaf-spinner-spin var(--leaf-spinner-duration) linear infinite;
1097
- mask-image: conic-gradient(from 0deg, transparent 0%, #000 70%, #000 100%);
1098
- -webkit-mask-image: conic-gradient(from 0deg, transparent 0%, #000 70%, #000 100%);
1028
+ .leaf-dialog__start > :where(h2, p) {
1029
+ min-width: 0;
1030
+ overflow: hidden;
1031
+ text-overflow: ellipsis;
1032
+ white-space: nowrap;
1033
+ margin: 0;
1034
+ color: var(--text-primary);
1035
+ font-family: var(--font-sans);
1036
+ font-size: var(--heading-3-size);
1037
+ line-height: var(--heading-3-line-height);
1038
+ font-weight: var(--heading-3-weight);
1099
1039
  }
1100
1040
 
1101
- /* pulse — scale nhịp. */
1102
- .leaf-spinner[data-animation="pulse"] .leaf-spinner__icon {
1103
- animation: leaf-spinner-pulse 1s ease-in-out infinite;
1041
+ .leaf-dialog__back,
1042
+ .leaf-dialog__close {
1043
+ display: inline-flex;
1044
+ flex-shrink: 0;
1045
+ align-items: center;
1046
+ justify-content: center;
1047
+ margin: 0;
1048
+ padding: 0;
1049
+ border: none;
1050
+ cursor: pointer;
1051
+ color: var(--text-primary);
1052
+ background: transparent;
1053
+ font: inherit;
1054
+ appearance: none;
1055
+ box-sizing: border-box;
1104
1056
  }
1105
1057
 
1106
- /* breathe — mờ/đậm cả icon. */
1107
- .leaf-spinner[data-animation="breathe"] .leaf-spinner__icon {
1108
- animation: leaf-spinner-breathe 1.2s ease-in-out infinite;
1058
+ .leaf-dialog__back {
1059
+ width: var(--leaf-dialog-back-size);
1060
+ height: var(--leaf-dialog-back-size);
1109
1061
  }
1110
- }
1111
1062
 
1112
- @keyframes leaf-spinner-spin {
1113
- to {
1114
- transform: rotate(360deg);
1063
+ .leaf-dialog__back:hover,
1064
+ .leaf-dialog__close:hover {
1065
+ color: var(--text-highlight);
1115
1066
  }
1116
- }
1117
1067
 
1118
- @keyframes leaf-spinner-pulse {
1119
- 0%,
1120
- 100% {
1121
- transform: scale(0.85);
1068
+ .leaf-dialog__back:focus-visible,
1069
+ .leaf-dialog__close:focus-visible {
1070
+ outline: 2px solid var(--text-highlight);
1071
+ outline-offset: 2px;
1122
1072
  }
1123
- 50% {
1124
- transform: scale(1);
1073
+
1074
+ .leaf-dialog__icon {
1075
+ display: block;
1076
+ width: 1em;
1077
+ height: 1em;
1125
1078
  }
1126
- }
1127
1079
 
1128
- @keyframes leaf-spinner-breathe {
1129
- 0%,
1130
- 100% {
1131
- opacity: 0.35;
1080
+ .leaf-dialog__back .leaf-dialog__icon {
1081
+ font-size: var(--leaf-dialog-back-size);
1132
1082
  }
1133
- 50% {
1134
- opacity: 1;
1083
+
1084
+ .leaf-dialog__close {
1085
+ width: var(--leaf-dialog-close-size);
1086
+ min-height: var(--leaf-dialog-close-size);
1087
+ padding: 4px 6px;
1088
+ border-radius: 100px;
1089
+ background-color: var(--base-secondary);
1090
+ font-size: var(--leaf-dialog-close-icon);
1091
+ }
1092
+
1093
+ .leaf-dialog__body {
1094
+ display: flex;
1095
+ flex: auto;
1096
+ flex-direction: column;
1097
+ gap: var(--leaf-dialog-gap);
1098
+ width: 100%;
1099
+ min-height: 0;
1100
+ overflow: auto;
1135
1101
  }
1136
1102
  }
1137
1103
 
1138
- /* --- src/components/Tabs/tabs.css --- */
1104
+ /* --- src/components/Dropdown/dropdown.css --- */
1139
1105
 
1140
1106
  /*
1141
- * Tabs — Figma 712:6996 (Tabs Items).
1142
- *
1143
- * `variant` map type trong Figma: subcontent | title | functional | buy | sell.
1144
- * Size: xl | lg | md | sm (tuỳ variant — Title chỉ S, Functional chỉ M, Buy/Sell chỉ L).
1145
- * Subcontent XL/LG selected = --base-quinary; MD/SM selected = --base-tertiary.
1146
- *
1147
- * Variant / size đặt trên tablist (`.leaf-tabs[data-variant][data-size]`), từng
1148
- * `.leaf-tab` chỉ cần `aria-selected`. Toàn bộ hình thức (kể cả typography của
1149
- * label) nằm ở đây — React và `leaf.js` chỉ gắn attribute, nên HTML tĩnh viết
1150
- * cùng markup là ra cùng kết quả.
1107
+ * Dropdown — chọn một giá trị từ danh sách.
1151
1108
  *
1152
- * Mặc định khi thiếu attribute: variant subcontent, size xl. Chỉ Subcontent đổi
1153
- * theo size; các variant khác có một size duy nhất nên không đọc `data-size`.
1109
+ * data-variant: list (mặc định — panel --base-secondary viền --base-tertiary, mục chọn nền
1110
+ * --base-tertiary) · radio (panel --base-quaternary, chấm radio --text-highlight bên phải).
1111
+ * data-trigger: field (ô full width, data-appearance filled | outlined) · text (chữ +
1112
+ * chevron, rộng theo nội dung). data-size: md (Body 4) · sm (Body 5). data-align: start |
1113
+ * end. Mở / đóng = `hidden` trên listbox + data-open trên gốc.
1114
+ * Thiếu attribute → list · field · filled · md · start.
1154
1115
  */
1155
1116
 
1156
1117
  @layer components {
1157
- .leaf-tabs {
1158
- /* Kích thước của Subcontent — mặc định xl, đổi theo data-size bên dưới. */
1159
- --leaf-tab-padding: 12px 16px;
1160
- --leaf-tab-gap: 8px;
1161
- --leaf-tab-font-size: var(--body-3-size);
1162
- --leaf-tab-line-height: var(--body-3-line-height);
1163
- --leaf-tab-font-weight: var(--body-3-highlight-weight);
1118
+ .leaf-dropdown {
1119
+ --leaf-dropdown-font-size: var(--body-4-size);
1120
+ --leaf-dropdown-line-height: var(--body-4-line-height);
1121
+ --leaf-dropdown-weight: var(--body-4-weight);
1122
+ --leaf-dropdown-weight-highlight: var(--body-4-highlight-weight);
1123
+ --leaf-dropdown-trigger-weight: var(--leaf-dropdown-weight-highlight);
1124
+ --leaf-dropdown-option-weight: var(--leaf-dropdown-weight-highlight);
1125
+ --leaf-dropdown-chevron-size: 16px;
1126
+ --leaf-dropdown-offset: 4px;
1127
+ --leaf-dropdown-radius: 12px;
1128
+ --leaf-dropdown-radio-size: 24px;
1129
+ --leaf-dropdown-radio-ring: 2px;
1164
1130
 
1131
+ position: relative;
1165
1132
  display: flex;
1166
- flex-wrap: wrap;
1167
- align-items: center;
1168
- gap: 12px;
1133
+ width: 100%;
1134
+ min-width: 0;
1135
+ box-sizing: border-box;
1136
+ font-family: var(--font-sans);
1137
+ font-size: var(--leaf-dropdown-font-size);
1138
+ line-height: var(--leaf-dropdown-line-height);
1139
+ color: var(--text-primary);
1169
1140
  }
1170
1141
 
1171
- .leaf-tabs[data-size="lg"] {
1172
- --leaf-tab-padding: 8px 16px;
1173
- --leaf-tab-gap: 8px;
1174
- --leaf-tab-font-size: var(--body-4-size);
1175
- --leaf-tab-line-height: var(--body-4-line-height);
1176
- --leaf-tab-font-weight: var(--body-4-highlight-weight);
1142
+ .leaf-dropdown[data-size="sm"] {
1143
+ --leaf-dropdown-font-size: var(--body-5-size);
1144
+ --leaf-dropdown-line-height: var(--body-5-line-height);
1145
+ --leaf-dropdown-weight: var(--body-5-weight);
1146
+ --leaf-dropdown-weight-highlight: var(--body-5-highlight-weight);
1147
+ --leaf-dropdown-option-weight: var(--leaf-dropdown-weight);
1148
+ --leaf-dropdown-radio-size: 18px;
1149
+ --leaf-dropdown-radio-ring: 1.5px;
1177
1150
  }
1178
1151
 
1179
- .leaf-tabs[data-size="md"] {
1180
- --leaf-tab-padding: 4px 12px;
1181
- --leaf-tab-gap: normal;
1182
- --leaf-tab-font-size: var(--body-4-size);
1183
- --leaf-tab-line-height: var(--body-4-line-height);
1184
- --leaf-tab-font-weight: var(--body-4-weight);
1152
+ .leaf-dropdown[data-trigger="text"] {
1153
+ --leaf-dropdown-trigger-weight: var(--leaf-dropdown-weight);
1154
+ --leaf-dropdown-chevron-size: 14px;
1155
+ display: inline-flex;
1156
+ width: max-content;
1157
+ max-width: 100%;
1158
+ vertical-align: middle;
1185
1159
  }
1186
1160
 
1187
- .leaf-tabs[data-size="sm"] {
1188
- --leaf-tab-padding: 4px 12px;
1189
- --leaf-tab-gap: normal;
1190
- --leaf-tab-font-size: var(--body-5-size);
1191
- --leaf-tab-line-height: var(--body-5-line-height);
1192
- --leaf-tab-font-weight: var(--body-5-weight);
1161
+ .leaf-dropdown[hidden],
1162
+ .leaf-dropdown__trigger[hidden],
1163
+ .leaf-dropdown__value[hidden],
1164
+ .leaf-dropdown__leading[hidden],
1165
+ .leaf-dropdown__flag[hidden],
1166
+ .leaf-dropdown__chevron[hidden],
1167
+ .leaf-dropdown__list[hidden],
1168
+ .leaf-dropdown__option[hidden],
1169
+ .leaf-dropdown__radio[hidden] {
1170
+ display: none;
1193
1171
  }
1194
1172
 
1195
- .leaf-tab {
1196
- display: inline-flex;
1173
+ /* ── Trigger ─────────────────────────────────────────────────────────── */
1174
+
1175
+ .leaf-dropdown__trigger {
1176
+ display: flex;
1197
1177
  align-items: center;
1198
- justify-content: center;
1199
- border: none;
1178
+ justify-content: space-between;
1179
+ gap: 8px;
1180
+ width: 100%;
1181
+ min-width: 0;
1200
1182
  margin: 0;
1201
- padding: 0;
1202
- cursor: pointer;
1203
- background-color: transparent;
1204
- color: inherit;
1205
- font: inherit;
1206
- font-family: var(--font-sans);
1207
- text-align: center;
1208
- white-space: nowrap;
1183
+ padding: 10px 12px;
1209
1184
  box-sizing: border-box;
1185
+ border: none;
1186
+ border-radius: var(--leaf-dropdown-radius);
1187
+ background-color: var(--base-secondary);
1188
+ color: var(--text-primary);
1189
+ font: inherit;
1190
+ font-weight: var(--leaf-dropdown-trigger-weight);
1191
+ text-align: left;
1192
+ cursor: pointer;
1193
+ user-select: none;
1210
1194
  appearance: none;
1211
1195
  }
1212
1196
 
1213
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn. */
1214
- .leaf-tabs[hidden],
1215
- .leaf-tab[hidden] {
1216
- display: none;
1197
+ .leaf-dropdown[data-appearance="outlined"] .leaf-dropdown__trigger {
1198
+ padding: 8px 12px;
1199
+ border: 1px solid var(--base-quaternary);
1200
+ background-color: transparent;
1217
1201
  }
1218
1202
 
1219
- .leaf-tab:disabled,
1220
- .leaf-tab[aria-disabled="true"] {
1221
- cursor: not-allowed;
1203
+ .leaf-dropdown[data-trigger="text"] .leaf-dropdown__trigger {
1204
+ justify-content: flex-start;
1205
+ padding: 0;
1206
+ border: none;
1207
+ border-radius: 4px;
1208
+ background-color: transparent;
1222
1209
  }
1223
1210
 
1224
- .leaf-tab__label {
1225
- display: inline-flex;
1226
- align-items: center;
1227
- justify-content: center;
1228
- line-height: inherit;
1211
+ .leaf-dropdown__trigger:focus-visible {
1212
+ outline: 2px solid var(--text-highlight);
1213
+ outline-offset: 2px;
1229
1214
  }
1230
1215
 
1231
- /* ── Subcontent (pill) — cũng là mặc định khi không có data-variant ──── */
1232
- /* XL / LG: idle tertiary · selected quinary. MD / SM: idle trong suốt · selected tertiary. */
1233
-
1234
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]) .leaf-tab {
1235
- gap: var(--leaf-tab-gap);
1236
- padding: var(--leaf-tab-padding);
1237
- border-radius: 1000px;
1238
- background-color: var(--base-tertiary);
1239
- color: var(--text-secondary);
1240
- font-size: var(--leaf-tab-font-size);
1241
- line-height: var(--leaf-tab-line-height);
1242
- font-weight: var(--leaf-tab-font-weight);
1216
+ .leaf-dropdown__trigger[aria-readonly="true"] {
1217
+ cursor: default;
1243
1218
  }
1244
1219
 
1245
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"])
1246
- .leaf-tab[aria-selected="true"] {
1247
- background-color: var(--base-quinary);
1248
- color: var(--text-quaternary);
1220
+ .leaf-dropdown__trigger:disabled {
1221
+ cursor: not-allowed;
1222
+ color: var(--text-tertiary);
1249
1223
  }
1250
1224
 
1251
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]) .leaf-tab:disabled,
1252
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"])
1253
- .leaf-tab[aria-disabled="true"] {
1254
- background-color: var(--base-tertiary);
1255
- color: var(--text-tertiary);
1225
+ .leaf-dropdown__value {
1226
+ flex: 1 1 auto;
1227
+ min-width: 0;
1228
+ overflow: hidden;
1229
+ text-overflow: ellipsis;
1230
+ white-space: nowrap;
1256
1231
  }
1257
1232
 
1258
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
1259
- [data-size="md"],
1260
- [data-size="sm"]
1261
- )
1262
- .leaf-tab {
1263
- background-color: transparent;
1233
+ .leaf-dropdown[data-trigger="text"] .leaf-dropdown__value {
1234
+ flex: 0 1 auto;
1264
1235
  }
1265
1236
 
1266
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
1267
- [data-size="md"],
1268
- [data-size="sm"]
1269
- )
1270
- .leaf-tab[aria-selected="true"] {
1271
- background-color: var(--base-tertiary);
1272
- color: var(--text-primary);
1237
+ .leaf-dropdown__value[data-placeholder] {
1238
+ color: var(--text-secondary);
1273
1239
  }
1274
1240
 
1275
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
1276
- [data-size="md"],
1277
- [data-size="sm"]
1278
- )
1279
- .leaf-tab:disabled,
1280
- .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
1281
- [data-size="md"],
1282
- [data-size="sm"]
1283
- )
1284
- .leaf-tab[aria-disabled="true"] {
1285
- background-color: transparent;
1241
+ .leaf-dropdown__trigger:disabled .leaf-dropdown__value {
1286
1242
  color: var(--text-tertiary);
1287
1243
  }
1288
1244
 
1289
- /* ── Title (underline) ───────────────────────────────────────────────── */
1245
+ .leaf-dropdown__leading {
1246
+ display: inline-flex;
1247
+ flex-shrink: 0;
1248
+ align-items: center;
1249
+ vertical-align: middle;
1250
+ }
1290
1251
 
1291
- .leaf-tabs[data-variant="title"] .leaf-tab {
1292
- flex-direction: column;
1293
- gap: 4px;
1294
- min-width: 100px;
1295
- color: var(--text-secondary);
1296
- font-size: var(--body-4-size);
1297
- line-height: var(--body-4-line-height);
1298
- font-weight: var(--body-4-weight);
1252
+ .leaf-dropdown__flag {
1253
+ display: block;
1254
+ width: 20px;
1255
+ height: 20px;
1256
+ object-fit: contain;
1299
1257
  }
1300
1258
 
1301
- .leaf-tabs[data-variant="title"] .leaf-tab[aria-selected="true"] {
1302
- color: var(--text-primary);
1303
- font-weight: var(--body-4-highlight-weight);
1259
+ .leaf-dropdown__value > .leaf-dropdown__leading {
1260
+ margin-right: 8px;
1304
1261
  }
1305
1262
 
1306
- .leaf-tabs[data-variant="title"] .leaf-tab::after {
1307
- content: "";
1263
+ .leaf-dropdown__chevron {
1308
1264
  display: block;
1309
- width: 100%;
1310
- height: 2px;
1311
- background-color: var(--text-primary);
1312
- opacity: 0;
1265
+ flex-shrink: 0;
1266
+ width: var(--leaf-dropdown-chevron-size);
1267
+ height: var(--leaf-dropdown-chevron-size);
1268
+ color: var(--text-secondary);
1269
+ transition: transform 0.2s ease;
1313
1270
  }
1314
1271
 
1315
- .leaf-tabs[data-variant="title"] .leaf-tab[aria-selected="true"]::after {
1316
- opacity: 1;
1272
+ .leaf-dropdown[data-open="true"] .leaf-dropdown__chevron {
1273
+ transform: rotate(180deg);
1317
1274
  }
1318
1275
 
1319
- .leaf-tabs[data-variant="title"] .leaf-tab:disabled,
1320
- .leaf-tabs[data-variant="title"] .leaf-tab[aria-disabled="true"] {
1276
+ .leaf-dropdown__trigger:disabled .leaf-dropdown__chevron {
1321
1277
  color: var(--text-tertiary);
1322
1278
  }
1323
1279
 
1324
- .leaf-tabs[data-variant="title"] .leaf-tab:disabled::after,
1325
- .leaf-tabs[data-variant="title"] .leaf-tab[aria-disabled="true"]::after {
1326
- opacity: 0;
1327
- }
1280
+ /* ── Panel ───────────────────────────────────────────────────────────── */
1328
1281
 
1329
- /* ── Functional ──────────────────────────────────────────────────────── */
1330
-
1331
- .leaf-tabs[data-variant="functional"] .leaf-tab {
1332
- height: 24px;
1333
- min-width: 100px;
1334
- padding: 4px 24px;
1335
- border-radius: 100px;
1336
- background-color: var(--base-tertiary);
1337
- color: var(--button-disabled-content);
1338
- font-size: var(--body-5-size);
1339
- line-height: var(--body-5-line-height);
1340
- font-weight: var(--body-5-weight);
1282
+ .leaf-dropdown__list {
1283
+ position: absolute;
1284
+ top: calc(100% + var(--leaf-dropdown-offset));
1285
+ left: 0;
1286
+ z-index: var(--leaf-z-dropdown, 30);
1287
+ display: flex;
1288
+ flex-direction: column;
1289
+ width: 100%;
1290
+ max-height: var(--leaf-dropdown-max-height, none);
1291
+ margin: 0;
1292
+ padding: 0;
1293
+ box-sizing: border-box;
1294
+ overflow-y: auto;
1295
+ list-style: none;
1296
+ border: 1px solid var(--base-tertiary);
1297
+ border-radius: var(--leaf-dropdown-radius);
1298
+ background-color: var(--base-secondary);
1299
+ font-weight: var(--leaf-dropdown-option-weight);
1341
1300
  }
1342
1301
 
1343
- .leaf-tabs[data-variant="functional"] .leaf-tab[aria-selected="true"] {
1344
- background-color: var(--button-base-primary);
1345
- color: var(--button-content-primary);
1302
+ .leaf-dropdown[data-trigger="text"] .leaf-dropdown__list {
1303
+ width: max-content;
1304
+ min-width: 100%;
1346
1305
  }
1347
1306
 
1348
- .leaf-tabs[data-variant="functional"] .leaf-tab:disabled,
1349
- .leaf-tabs[data-variant="functional"] .leaf-tab[aria-disabled="true"] {
1350
- background-color: var(--base-tertiary);
1351
- color: var(--button-disabled-content);
1307
+ .leaf-dropdown[data-align="end"] .leaf-dropdown__list {
1308
+ right: 0;
1309
+ left: auto;
1352
1310
  }
1353
1311
 
1354
- /* ── Buy / Sell ──────────────────────────────────────────────────────── */
1312
+ .leaf-dropdown__option {
1313
+ display: flex;
1314
+ align-items: center;
1315
+ gap: 8px;
1316
+ margin: 0;
1317
+ padding: 8px 12px;
1318
+ color: var(--text-secondary);
1319
+ cursor: pointer;
1320
+ transition:
1321
+ background-color 0.15s ease,
1322
+ color 0.15s ease;
1323
+ }
1355
1324
 
1356
- .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab {
1357
- min-width: 100px;
1358
- width: auto;
1359
- padding: 6px 4px;
1360
- border-radius: 100px;
1325
+ .leaf-dropdown__option[data-active],
1326
+ .leaf-dropdown__option[aria-selected="true"] {
1327
+ background-color: var(--base-tertiary);
1361
1328
  color: var(--text-primary);
1362
- font-size: var(--body-5-size);
1363
- line-height: var(--body-5-line-height);
1364
- font-weight: var(--body-5-weight);
1365
1329
  }
1366
1330
 
1367
- .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab[aria-selected="true"] {
1368
- font-weight: var(--body-5-highlight-weight);
1331
+ .leaf-dropdown__option[aria-disabled="true"] {
1332
+ background-color: transparent;
1333
+ color: var(--text-tertiary);
1334
+ cursor: not-allowed;
1369
1335
  }
1370
1336
 
1371
- .leaf-tabs[data-variant="buy"] .leaf-tab[aria-selected="true"] {
1372
- background-color: var(--button-base-secondary);
1373
- color: var(--text-highlight);
1337
+ .leaf-dropdown__label {
1338
+ flex: 1 1 auto;
1339
+ min-width: 0;
1340
+ overflow: hidden;
1341
+ text-overflow: ellipsis;
1342
+ white-space: nowrap;
1374
1343
  }
1375
1344
 
1376
- .leaf-tabs[data-variant="sell"] .leaf-tab[aria-selected="true"] {
1377
- background-color: var(--button-base-secondary-destruction);
1378
- color: var(--button-base-destruction);
1379
- }
1345
+ /* ── Variant radio ───────────────────────────────────────────────────── */
1380
1346
 
1381
- .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab:disabled,
1382
- .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab[aria-disabled="true"] {
1383
- color: var(--text-tertiary);
1384
- background-color: transparent;
1347
+ .leaf-dropdown[data-variant="radio"] {
1348
+ --leaf-dropdown-offset: 8px;
1385
1349
  }
1386
- }
1387
-
1388
- /* --- src/components/Toggle/toggle.css --- */
1389
1350
 
1390
- /*
1391
- * Toggle — Figma 730:12438.
1392
- *
1393
- * Size M/S qua data-size; Status On/Off qua aria-checked; Active Off qua
1394
- * :disabled. Thumb trượt bằng transform. Checkmark chỉ hiện ở size sm khi
1395
- * On + Active. Thiếu attribute → md · off · enabled.
1396
- */
1397
-
1398
- @layer components {
1399
- .leaf-toggle {
1400
- --leaf-toggle-width: 48px;
1401
- --leaf-toggle-height: 24px;
1402
- --leaf-toggle-padding: 3px;
1403
- --leaf-toggle-thumb: 18px;
1404
- --leaf-toggle-travel: calc(
1405
- var(--leaf-toggle-width) - var(--leaf-toggle-padding) * 2 - var(--leaf-toggle-thumb)
1406
- );
1407
-
1408
- position: relative;
1409
- display: inline-flex;
1410
- flex-shrink: 0;
1411
- align-items: center;
1412
- box-sizing: border-box;
1413
- width: var(--leaf-toggle-width);
1414
- height: var(--leaf-toggle-height);
1415
- margin: 0;
1416
- padding: var(--leaf-toggle-padding);
1351
+ .leaf-dropdown[data-variant="radio"] .leaf-dropdown__list {
1352
+ gap: 16px;
1353
+ padding: 16px;
1417
1354
  border: none;
1418
- border-radius: 12px;
1419
1355
  background-color: var(--base-quaternary);
1420
- cursor: pointer;
1421
- vertical-align: middle;
1422
- appearance: none;
1423
- -webkit-appearance: none;
1424
- font: inherit;
1425
- color: inherit;
1426
- transition: background-color 0.2s ease;
1356
+ font-weight: var(--leaf-dropdown-weight);
1357
+ }
1358
+
1359
+ .leaf-dropdown[data-variant="radio"] .leaf-dropdown__option {
1360
+ justify-content: space-between;
1361
+ gap: 16px;
1362
+ padding: 0;
1363
+ background-color: transparent;
1364
+ color: var(--text-primary);
1427
1365
  }
1428
1366
 
1429
- /* `display` ở trên thắng `[hidden]` của trình duyệt — khai báo lại để `hidden` luôn ẩn. */
1430
- .leaf-toggle[hidden] {
1431
- display: none;
1367
+ .leaf-dropdown[data-variant="radio"] .leaf-dropdown__option[aria-selected="true"] {
1368
+ font-weight: var(--leaf-dropdown-weight-highlight);
1432
1369
  }
1433
1370
 
1434
- .leaf-toggle__thumb {
1435
- display: flex;
1371
+ .leaf-dropdown[data-variant="radio"] .leaf-dropdown__option[data-active] {
1372
+ color: var(--text-highlight);
1373
+ }
1374
+
1375
+ .leaf-dropdown[data-variant="radio"] .leaf-dropdown__option[aria-disabled="true"] {
1376
+ color: var(--text-tertiary);
1377
+ }
1378
+
1379
+ .leaf-dropdown__radio {
1380
+ display: inline-flex;
1381
+ flex-shrink: 0;
1436
1382
  align-items: center;
1437
1383
  justify-content: center;
1438
- width: var(--leaf-toggle-thumb);
1439
- height: var(--leaf-toggle-thumb);
1440
- border-radius: 100px;
1441
- background-color: var(--text-secondary);
1442
- transform: translateX(0);
1443
- transition:
1444
- transform 0.2s ease,
1445
- background-color 0.2s ease;
1384
+ width: var(--leaf-dropdown-radio-size);
1385
+ height: var(--leaf-dropdown-radio-size);
1386
+ box-sizing: border-box;
1387
+ border: var(--leaf-dropdown-radio-ring) solid var(--text-highlight);
1388
+ border-radius: 9999px;
1389
+ opacity: 0;
1446
1390
  }
1447
1391
 
1448
- .leaf-toggle__check {
1449
- display: none;
1450
- width: 60%;
1451
- height: 60%;
1452
- color: var(--system-green);
1392
+ .leaf-dropdown__dot {
1393
+ display: block;
1394
+ width: 50%;
1395
+ height: 50%;
1396
+ border-radius: 9999px;
1397
+ background-color: var(--text-highlight);
1453
1398
  }
1454
1399
 
1455
- /* Status On + Active — track xanh, thumb trắng, trượt phải. */
1456
- .leaf-toggle[aria-checked="true"]:not(:disabled) {
1457
- background-color: var(--system-green);
1400
+ .leaf-dropdown__option[aria-selected="true"] .leaf-dropdown__radio {
1401
+ opacity: 1;
1458
1402
  }
1403
+ }
1459
1404
 
1460
- .leaf-toggle[aria-checked="true"]:not(:disabled) .leaf-toggle__thumb {
1461
- background-color: var(--icon-on-color);
1462
- transform: translateX(var(--leaf-toggle-travel));
1405
+ /* --- src/components/Input/input-date.css --- */
1406
+
1407
+ /*
1408
+ * InputDate — Input trigger + popover Calendar.
1409
+ *
1410
+ * Popover neo theo khung trigger: dưới (data-placement="bottom", top = đáy khung qua
1411
+ * --leaf-input-date-offset do React đo) hoặc lật lên trên (data-placement="top"). data-align
1412
+ * căn trái / phải. data-open giữ viền + label highlight khi panel mở (invalid vẫn thắng).
1413
+ * Phụ thuộc input.css + calendar.css.
1414
+ */
1415
+
1416
+ @layer components {
1417
+ .leaf-input-date {
1418
+ position: relative;
1463
1419
  }
1464
1420
 
1465
- /* Status On + Active Off (disabled on) — track quaternary, thumb tertiary, vẫn bên phải. */
1466
- .leaf-toggle[aria-checked="true"]:disabled .leaf-toggle__thumb {
1467
- background-color: var(--text-tertiary);
1468
- transform: translateX(var(--leaf-toggle-travel));
1421
+ .leaf-input-date__popover {
1422
+ position: absolute;
1423
+ z-index: var(--leaf-z-popover, 100);
1469
1424
  }
1470
1425
 
1471
- /* Status Off + Active Off — thumb tertiary, bên trái. */
1472
- .leaf-toggle:disabled:not([aria-checked="true"]) .leaf-toggle__thumb {
1473
- background-color: var(--text-tertiary);
1426
+ .leaf-input-date__popover[data-placement="bottom"] {
1427
+ top: calc(var(--leaf-input-date-offset, 100%) + 8px);
1474
1428
  }
1475
1429
 
1476
- /* Size S */
1477
- .leaf-toggle[data-size="sm"] {
1478
- --leaf-toggle-width: 32px;
1479
- --leaf-toggle-height: 16px;
1480
- --leaf-toggle-thumb: 10px;
1430
+ .leaf-input-date__popover[data-placement="top"] {
1431
+ bottom: calc(100% + 8px);
1481
1432
  }
1482
1433
 
1483
- /* Checkmark chỉ ở S · On · Active. */
1484
- .leaf-toggle[data-size="sm"][aria-checked="true"]:not(:disabled) .leaf-toggle__check {
1485
- display: block;
1434
+ .leaf-input-date__popover[data-align="start"] {
1435
+ left: 0;
1486
1436
  }
1487
1437
 
1488
- .leaf-toggle:disabled {
1489
- cursor: not-allowed;
1438
+ .leaf-input-date__popover[data-align="end"] {
1439
+ right: 0;
1490
1440
  }
1491
1441
 
1492
- .leaf-toggle:focus-visible {
1493
- outline: 2px solid var(--system-green);
1494
- outline-offset: 2px;
1442
+ .leaf-input-date[data-open="true"] .leaf-input:not([data-invalid="true"]) {
1443
+ --leaf-input-border: var(--text-highlight);
1444
+ --leaf-input-label: var(--text-highlight);
1445
+ }
1446
+
1447
+ .leaf-input-date[hidden] {
1448
+ display: none;
1495
1449
  }
1496
1450
  }
1497
1451
 
1498
- /* --- src/components/Tooltip/tooltip.css --- */
1452
+ /* --- src/components/Input/input-otp.css --- */
1499
1453
 
1500
1454
  /*
1501
- * Tooltip — Figma 891:4983.
1502
- *
1503
- * Size sm/md/lg; position top/bottom/left/right; align start/center/end.
1504
- * Nền --base-quaternary; chữ --text-primary.
1455
+ * InputOtp — Figma 1146:2159 (PIN code).
1505
1456
  *
1506
- * Caret Figma: khung hit-area rộng (40×4 / 44×6 / 16×4) nhưng tam giác thật
1507
- * chỉ 8×4 (sm) hoặc 12×6 (md/lg) nằm giữa khung — không vẽ full-width.
1457
+ * Ô 48×56, nền base-tertiary, chữ số heading-3. Focus → viền highlight; data-invalid → viền
1458
+ * đỏ mọi ô + message đỏ; data-disabled / :disabled → chữ secondary. Typography
1459
+ * (heading-3, body-5) là class Leaf trên markup.
1460
+ * HTML tĩnh: hành vi nhảy ô / dán nằm trong leaf.js (`data-leaf-input-otp`).
1508
1461
  */
1509
1462
 
1510
1463
  @layer components {
1511
- .leaf-tooltip-trigger {
1512
- position: relative;
1513
- display: inline-flex;
1514
- max-width: 100%;
1515
- vertical-align: middle;
1464
+ .leaf-input-otp {
1465
+ --leaf-input-otp-cell-width: 48px;
1466
+ --leaf-input-otp-cell-height: 56px;
1467
+ --leaf-input-otp-border: transparent;
1468
+ --leaf-input-otp-message: var(--text-secondary);
1469
+
1470
+ display: flex;
1471
+ flex-direction: column;
1472
+ gap: 8px;
1516
1473
  }
1517
1474
 
1518
- .leaf-tooltip {
1519
- --leaf-tooltip-pad-y: 8px;
1520
- --leaf-tooltip-pad-x: 16px;
1521
- --leaf-tooltip-radius: 8px;
1522
- --leaf-tooltip-max-width: 176px;
1523
- --leaf-tooltip-font-size: var(--body-4-size);
1524
- --leaf-tooltip-line-height: var(--body-4-line-height);
1525
- --leaf-tooltip-font-weight: var(--body-4-weight);
1526
- /* Khung caret dọc theo cạnh (top/bottom). */
1527
- --leaf-tooltip-caret-w: 44px;
1528
- --leaf-tooltip-caret-h: 6px;
1529
- /* Chiều rộng tam giác thật trong khung. */
1530
- --leaf-tooltip-caret-tip: 12px;
1475
+ .leaf-input-otp__cells {
1476
+ display: flex;
1477
+ gap: 4px;
1478
+ }
1531
1479
 
1532
- display: inline-flex;
1533
- flex-direction: column;
1534
- align-items: center;
1535
- max-width: var(--leaf-tooltip-max-width);
1480
+ .leaf-input-otp__cell {
1536
1481
  box-sizing: border-box;
1537
- font-family: var(--font-sans);
1538
- font-size: var(--leaf-tooltip-font-size);
1539
- line-height: var(--leaf-tooltip-line-height);
1540
- font-weight: var(--leaf-tooltip-font-weight);
1482
+ width: var(--leaf-input-otp-cell-width);
1483
+ height: var(--leaf-input-otp-cell-height);
1484
+ margin: 0;
1485
+ padding: 0;
1486
+ border: 1px solid var(--leaf-input-otp-border);
1487
+ border-radius: 12px;
1488
+ outline: none;
1489
+ background-color: var(--base-tertiary);
1541
1490
  color: var(--text-primary);
1542
- pointer-events: none;
1491
+ text-align: center;
1492
+ caret-color: var(--text-highlight);
1493
+ appearance: none;
1494
+ -webkit-appearance: none;
1495
+ transition: border-color 0.15s ease;
1543
1496
  }
1544
1497
 
1545
- .leaf-tooltip--portal {
1546
- position: fixed;
1547
- z-index: var(--leaf-z-tooltip, 110);
1498
+ .leaf-input-otp__cell:focus {
1499
+ border-color: var(--text-highlight);
1548
1500
  }
1549
1501
 
1550
- /* `display` của .leaf-tooltip thắng `[hidden]` của trình duyệt — bản vanilla ẩn bubble bằng hidden. */
1551
- .leaf-tooltip-trigger[hidden],
1552
- .leaf-tooltip[hidden] {
1502
+ .leaf-input-otp[data-invalid="true"] .leaf-input-otp__cell {
1503
+ border-color: var(--system-red);
1504
+ }
1505
+
1506
+ .leaf-input-otp__cell:disabled {
1507
+ color: var(--text-secondary);
1508
+ cursor: not-allowed;
1509
+ }
1510
+
1511
+ .leaf-input-otp__message {
1512
+ margin: 0;
1513
+ color: var(--leaf-input-otp-message);
1514
+ }
1515
+
1516
+ .leaf-input-otp[data-invalid="true"] {
1517
+ --leaf-input-otp-message: var(--system-red);
1518
+ }
1519
+
1520
+ .leaf-input-otp[hidden],
1521
+ .leaf-input-otp__cells[hidden] {
1553
1522
  display: none;
1554
1523
  }
1524
+ }
1555
1525
 
1556
- .leaf-tooltip__body {
1557
- position: relative;
1558
- z-index: 1;
1559
- box-sizing: border-box;
1526
+ /* --- src/components/Input/input-stepper.css --- */
1527
+
1528
+ /*
1529
+ * InputStepper — Figma 1146:2159 (Buy / Sell).
1530
+ *
1531
+ * Tone qua data-tone (buy | sell — không có → base-tertiary); state qua :focus-within,
1532
+ * data-invalid, data-disabled, data-filled. Nền 280 × (py 4 · px 12), radius 12; icon −/+ 20px.
1533
+ * Label body-5 (secondary → primary khi focus), giá trị body-4-highlight (placeholder
1534
+ * secondary, đã nhập primary). Typography là class Leaf trên markup.
1535
+ * HTML tĩnh: −/+, mũi tên, format số nằm trong leaf.js (`data-leaf-input-stepper`).
1536
+ */
1537
+
1538
+ @layer components {
1539
+ .leaf-input-stepper {
1540
+ --leaf-input-stepper-width: 280px;
1541
+ --leaf-input-stepper-bg: var(--base-tertiary);
1542
+ --leaf-input-stepper-focus: var(--text-highlight);
1543
+ --leaf-input-stepper-border: transparent;
1544
+ --leaf-input-stepper-label: var(--text-secondary);
1545
+ --leaf-input-stepper-fg: var(--text-primary);
1546
+ --leaf-input-stepper-icon: var(--text-primary);
1547
+ --leaf-input-stepper-message: var(--text-secondary);
1548
+
1549
+ display: flex;
1550
+ flex-direction: column;
1551
+ gap: 4px;
1552
+ width: var(--leaf-input-stepper-width);
1560
1553
  max-width: 100%;
1561
- padding: var(--leaf-tooltip-pad-y) var(--leaf-tooltip-pad-x);
1562
- border-radius: var(--leaf-tooltip-radius);
1563
- background-color: var(--base-quaternary);
1564
- text-align: left;
1565
- word-break: break-word;
1566
1554
  }
1567
1555
 
1568
- /*
1569
- * Caret = khung trong suốt + ::before là tam giác nhỏ ở giữa (đúng SVG Figma).
1570
- * Mặc định: mũi nhọn xuống (position=top — caret dưới body).
1571
- */
1572
- .leaf-tooltip__caret {
1573
- position: relative;
1574
- display: block;
1575
- flex-shrink: 0;
1576
- width: var(--leaf-tooltip-caret-w);
1577
- height: var(--leaf-tooltip-caret-h);
1578
- background-color: transparent;
1556
+ .leaf-input-stepper[data-tone="buy"] {
1557
+ --leaf-input-stepper-bg: var(--system-green-secondary);
1579
1558
  }
1580
1559
 
1581
- .leaf-tooltip__caret::before {
1582
- content: "";
1583
- position: absolute;
1584
- top: 0;
1585
- left: 50%;
1586
- width: var(--leaf-tooltip-caret-tip);
1587
- height: 100%;
1588
- background-color: var(--base-quaternary);
1589
- transform: translateX(-50%);
1590
- clip-path: polygon(0 0, 100% 0, 50% 100%);
1560
+ .leaf-input-stepper[data-tone="sell"] {
1561
+ --leaf-input-stepper-bg: var(--system-red-secondary);
1562
+ --leaf-input-stepper-focus: var(--system-red);
1591
1563
  }
1592
1564
 
1593
- /* ── Size ────────────────────────────────────────────────────────────── */
1565
+ .leaf-input-stepper__shell {
1566
+ display: flex;
1567
+ align-items: center;
1568
+ gap: 8px;
1569
+ box-sizing: border-box;
1570
+ padding: 4px 12px;
1571
+ border: 1px solid var(--leaf-input-stepper-border);
1572
+ border-radius: 12px;
1573
+ background-color: var(--leaf-input-stepper-bg);
1574
+ cursor: text;
1575
+ transition: border-color 0.15s ease;
1576
+ }
1594
1577
 
1595
- .leaf-tooltip[data-size="sm"] {
1596
- --leaf-tooltip-pad-y: 2px;
1597
- --leaf-tooltip-pad-x: 16px;
1598
- --leaf-tooltip-radius: 4px;
1599
- --leaf-tooltip-max-width: 208px;
1600
- --leaf-tooltip-font-size: var(--body-5-size);
1601
- --leaf-tooltip-line-height: var(--body-5-line-height);
1602
- --leaf-tooltip-font-weight: var(--body-5-weight);
1603
- --leaf-tooltip-caret-w: 40px;
1604
- --leaf-tooltip-caret-h: 4px;
1605
- --leaf-tooltip-caret-tip: 8px;
1606
- min-width: 64px;
1578
+ .leaf-input-stepper__body {
1579
+ display: flex;
1580
+ flex: 1;
1581
+ flex-direction: column;
1582
+ align-items: center;
1583
+ justify-content: center;
1584
+ gap: 4px;
1585
+ min-width: 0;
1607
1586
  }
1608
1587
 
1609
- .leaf-tooltip[data-size="lg"] {
1610
- --leaf-tooltip-pad-y: 16px;
1611
- --leaf-tooltip-pad-x: 16px;
1612
- --leaf-tooltip-radius: 12px;
1613
- --leaf-tooltip-max-width: 288px;
1614
- --leaf-tooltip-font-size: var(--body-3-size);
1615
- --leaf-tooltip-line-height: var(--body-3-line-height);
1616
- --leaf-tooltip-font-weight: var(--body-3-weight);
1617
- --leaf-tooltip-caret-w: 44px;
1618
- --leaf-tooltip-caret-h: 6px;
1619
- --leaf-tooltip-caret-tip: 12px;
1588
+ .leaf-input-stepper__value {
1589
+ display: inline-flex;
1590
+ align-items: center;
1591
+ justify-content: center;
1592
+ gap: 2px;
1593
+ min-width: 0;
1620
1594
  }
1621
1595
 
1622
- /* Sm left/right: khung caret 16×4 (Figma), không dùng 40×4 của top/bottom. */
1623
- .leaf-tooltip[data-size="sm"][data-position="left"],
1624
- .leaf-tooltip[data-size="sm"][data-position="right"] {
1625
- --leaf-tooltip-caret-w: 16px;
1596
+ .leaf-input-stepper__label {
1597
+ overflow: hidden;
1598
+ text-overflow: ellipsis;
1599
+ white-space: nowrap;
1600
+ color: var(--leaf-input-stepper-label);
1601
+ cursor: inherit;
1602
+ transition: color 0.15s ease;
1626
1603
  }
1627
1604
 
1628
- /* ── Position ────────────────────────────────────────────────────────── */
1605
+ .leaf-input-stepper__input {
1606
+ box-sizing: border-box;
1607
+ min-width: 0;
1608
+ max-width: 100%;
1609
+ margin: 0;
1610
+ padding: 0;
1611
+ border: none;
1612
+ border-radius: 0;
1613
+ outline: none;
1614
+ background: transparent;
1615
+ color: var(--leaf-input-stepper-fg);
1616
+ text-align: center;
1617
+ letter-spacing: inherit;
1618
+ appearance: none;
1619
+ -webkit-appearance: none;
1620
+ }
1629
1621
 
1630
- /*
1631
- * Vị trí caret theo data-position (không theo thứ tự DOM): markup vẫn đặt caret
1632
- * đúng phía nên kết quả không đổi, nhưng khi bubble tự lật phía (thiếu chỗ) thì
1633
- * chỉ cần đổi data-position là caret sang phía đối diện.
1634
- */
1635
- .leaf-tooltip:is(:not([data-position]), [data-position="top"], [data-position="left"])
1636
- > .leaf-tooltip__caret {
1637
- order: 1;
1622
+ .leaf-input-stepper__input::placeholder {
1623
+ color: var(--text-secondary);
1624
+ opacity: 1;
1638
1625
  }
1639
1626
 
1640
- .leaf-tooltip:is([data-position="bottom"], [data-position="right"]) > .leaf-tooltip__caret {
1641
- order: -1;
1627
+ .leaf-input-stepper__unit {
1628
+ color: var(--leaf-input-stepper-fg);
1642
1629
  }
1643
1630
 
1644
- .leaf-tooltip[data-position="bottom"] {
1645
- flex-direction: column;
1631
+ .leaf-input-stepper__button {
1632
+ display: inline-flex;
1633
+ flex-shrink: 0;
1634
+ align-items: center;
1635
+ justify-content: center;
1636
+ width: 20px;
1637
+ height: 20px;
1638
+ margin: 0;
1639
+ padding: 0;
1640
+ border: none;
1641
+ background: transparent;
1642
+ color: var(--leaf-input-stepper-icon);
1643
+ font-size: 20px;
1644
+ line-height: 1;
1645
+ cursor: pointer;
1646
+ appearance: none;
1646
1647
  }
1647
1648
 
1648
- .leaf-tooltip[data-position="bottom"] .leaf-tooltip__caret::before {
1649
- clip-path: polygon(50% 0, 0 100%, 100% 100%);
1649
+ .leaf-input-stepper__button > svg {
1650
+ display: block;
1651
+ width: 1em;
1652
+ height: 1em;
1650
1653
  }
1651
1654
 
1652
- .leaf-tooltip[data-position="left"] {
1653
- flex-direction: row;
1654
- align-items: center;
1655
+ .leaf-input-stepper__button:disabled {
1656
+ cursor: not-allowed;
1655
1657
  }
1656
1658
 
1657
- .leaf-tooltip[data-position="left"] .leaf-tooltip__caret {
1658
- width: var(--leaf-tooltip-caret-h);
1659
- height: var(--leaf-tooltip-caret-w);
1659
+ /* Chạm min / max (cả khối vẫn enabled) — mờ nút; disabled cả khối đã đổi màu icon. */
1660
+ .leaf-input-stepper:not([data-disabled="true"]) .leaf-input-stepper__button:disabled {
1661
+ opacity: 0.4;
1660
1662
  }
1661
1663
 
1662
- .leaf-tooltip[data-position="left"] .leaf-tooltip__caret::before {
1663
- top: 50%;
1664
- left: 0;
1665
- width: 100%;
1666
- height: var(--leaf-tooltip-caret-tip);
1667
- transform: translateY(-50%);
1668
- clip-path: polygon(0 0, 100% 50%, 0 100%);
1664
+ .leaf-input-stepper__message {
1665
+ margin: 0;
1666
+ padding-left: 4px;
1667
+ color: var(--leaf-input-stepper-message);
1669
1668
  }
1670
1669
 
1671
- .leaf-tooltip[data-position="right"] {
1672
- flex-direction: row;
1673
- align-items: center;
1670
+ .leaf-input-stepper[hidden],
1671
+ .leaf-input-stepper__shell[hidden],
1672
+ .leaf-input-stepper__body[hidden],
1673
+ .leaf-input-stepper__value[hidden],
1674
+ .leaf-input-stepper__button[hidden] {
1675
+ display: none;
1674
1676
  }
1675
1677
 
1676
- .leaf-tooltip[data-position="right"] .leaf-tooltip__caret {
1677
- width: var(--leaf-tooltip-caret-h);
1678
- height: var(--leaf-tooltip-caret-w);
1679
- }
1678
+ /* ── State ───────────────────────────────────────────────────────────── */
1680
1679
 
1681
- .leaf-tooltip[data-position="right"] .leaf-tooltip__caret::before {
1682
- top: 50%;
1683
- left: 0;
1684
- width: 100%;
1685
- height: var(--leaf-tooltip-caret-tip);
1686
- transform: translateY(-50%);
1687
- clip-path: polygon(100% 0, 0 50%, 100% 100%);
1680
+ .leaf-input-stepper:focus-within {
1681
+ --leaf-input-stepper-border: var(--leaf-input-stepper-focus);
1682
+ --leaf-input-stepper-label: var(--text-primary);
1688
1683
  }
1689
1684
 
1690
- /* ── Align (caret trên Top/Bottom) ───────────────────────────────────── */
1691
-
1692
- .leaf-tooltip[data-position="top"][data-align="start"],
1693
- .leaf-tooltip[data-position="bottom"][data-align="start"] {
1694
- align-items: flex-start;
1685
+ .leaf-input-stepper[data-invalid="true"] {
1686
+ --leaf-input-stepper-border: var(--system-red);
1687
+ --leaf-input-stepper-message: var(--system-red);
1695
1688
  }
1696
1689
 
1697
- .leaf-tooltip[data-position="top"][data-align="end"],
1698
- .leaf-tooltip[data-position="bottom"][data-align="end"] {
1699
- align-items: flex-end;
1690
+ .leaf-input-stepper[data-disabled="true"] {
1691
+ --leaf-input-stepper-border: transparent;
1692
+ --leaf-input-stepper-label: var(--text-tertiary);
1693
+ --leaf-input-stepper-fg: var(--text-secondary);
1694
+ --leaf-input-stepper-icon: var(--text-secondary);
1700
1695
  }
1701
1696
 
1702
- .leaf-tooltip[data-position="top"][data-align="center"],
1703
- .leaf-tooltip[data-position="bottom"][data-align="center"] {
1704
- align-items: center;
1697
+ .leaf-input-stepper[data-disabled="true"] .leaf-input-stepper__shell,
1698
+ .leaf-input-stepper[data-disabled="true"] .leaf-input-stepper__input {
1699
+ cursor: not-allowed;
1705
1700
  }
1706
1701
  }
1707
1702
 
1708
- /* --- src/styles/border.css --- */
1703
+ /* --- src/components/Input/input.css --- */
1709
1704
 
1710
1705
  /*
1711
- * Border radius classes — map 1:1 sang --radius-* trong @finhay/leaf-tokens
1712
- * (Figma 700:4390).
1706
+ * Input — Figma 1146:2159 (String / CTA) + search / date trigger.
1713
1707
  *
1714
- * Tên class `radius-*` (không dùng `rounded-*`) để không đụng utility bo góc mặc
1715
- * định của Tailwind (`rounded-xl`…). `border-*` đã dành cho màu viền.
1716
- *
1717
- * Hậu tố = bậc token: 0 · xs · s · m · l · xl · 2xl.
1718
- * Chỉ set border-radius — width / style / color do app tự lo.
1708
+ * Variant qua data-variant (field | inline) + data-shape (pill, chỉ inline); state qua
1709
+ * :focus-within, data-invalid, data-disabled, data-filled trên root. Màu đổi theo state
1710
+ * nên nằm ở đây (class màu Leaf ở layer utilities sẽ đè state nếu gắn lên markup).
1711
+ * Typography (body-4, body-5-highlight) là class Leaf trên markup.
1712
+ * Thiếu attribute → field · default · enabled.
1719
1713
  */
1720
1714
 
1721
- @layer utilities {
1722
- .radius-0 {
1723
- border-radius: var(--radius-0);
1715
+ @layer components {
1716
+ .leaf-input {
1717
+ --leaf-input-bg: var(--base-tertiary);
1718
+ --leaf-input-border: transparent;
1719
+ --leaf-input-radius: 12px;
1720
+ --leaf-input-min-height: 56px;
1721
+ --leaf-input-padding-y: 8px;
1722
+ --leaf-input-padding-x: 12px;
1723
+ --leaf-input-icon-size: 20px;
1724
+ --leaf-input-label: var(--text-tertiary);
1725
+ --leaf-input-fg: var(--text-primary);
1726
+ --leaf-input-icon: var(--text-primary);
1727
+ --leaf-input-placeholder: var(--text-tertiary);
1728
+ --leaf-input-message: var(--text-secondary);
1729
+
1730
+ display: flex;
1731
+ flex-direction: column;
1732
+ gap: 8px;
1733
+ min-width: 0;
1724
1734
  }
1725
1735
 
1726
- .radius-xs {
1727
- border-radius: var(--radius-xs);
1736
+ .leaf-input__shell {
1737
+ display: flex;
1738
+ align-items: center;
1739
+ gap: 8px;
1740
+ box-sizing: border-box;
1741
+ min-height: var(--leaf-input-min-height);
1742
+ padding: var(--leaf-input-padding-y) var(--leaf-input-padding-x);
1743
+ border: 1px solid var(--leaf-input-border);
1744
+ border-radius: var(--leaf-input-radius);
1745
+ background-color: var(--leaf-input-bg);
1746
+ cursor: text;
1747
+ transition: border-color 0.15s ease;
1728
1748
  }
1729
1749
 
1730
- .radius-s {
1731
- border-radius: var(--radius-s);
1750
+ .leaf-input__body {
1751
+ display: flex;
1752
+ flex: 1;
1753
+ flex-direction: column;
1754
+ gap: 4px;
1755
+ min-width: 0;
1732
1756
  }
1733
1757
 
1734
- .radius-m {
1735
- border-radius: var(--radius-m);
1758
+ .leaf-input__main {
1759
+ display: flex;
1760
+ align-items: center;
1761
+ gap: 8px;
1736
1762
  }
1737
1763
 
1738
- .radius-l {
1739
- border-radius: var(--radius-l);
1764
+ .leaf-input__label {
1765
+ overflow: hidden;
1766
+ text-overflow: ellipsis;
1767
+ white-space: nowrap;
1768
+ color: var(--leaf-input-label);
1769
+ cursor: inherit;
1770
+ transition: color 0.15s ease;
1740
1771
  }
1741
1772
 
1742
- .radius-xl {
1743
- border-radius: var(--radius-xl);
1773
+ .leaf-input__control {
1774
+ flex: 1;
1775
+ min-width: 0;
1776
+ box-sizing: border-box;
1777
+ margin: 0;
1778
+ padding: 0;
1779
+ border: none;
1780
+ border-radius: 0;
1781
+ outline: none;
1782
+ background: transparent;
1783
+ color: var(--leaf-input-fg);
1784
+ letter-spacing: inherit;
1785
+ appearance: none;
1786
+ -webkit-appearance: none;
1744
1787
  }
1745
1788
 
1746
- .radius-2xl {
1747
- border-radius: var(--radius-2xl);
1789
+ .leaf-input__control::placeholder,
1790
+ .leaf-input__placeholder {
1791
+ color: var(--leaf-input-placeholder);
1792
+ opacity: 1;
1748
1793
  }
1749
- }
1750
1794
 
1751
- /* --- src/styles/color.css --- */
1795
+ button.leaf-input__control {
1796
+ overflow: hidden;
1797
+ text-overflow: ellipsis;
1798
+ white-space: nowrap;
1799
+ text-align: left;
1800
+ cursor: pointer;
1801
+ }
1752
1802
 
1753
- /*
1754
- * Color classes — map 1:1 sang semantic token trong @finhay/leaf-tokens.
1755
- *
1756
- * Quy tắc tên: **tiền tố nói thuộc tính, phần sau nói vai trò của token**.
1757
- *
1758
- * text-* → color (text-primary, text-red)
1759
- * base-* → background-color (base-primary, base-red)
1760
- * border-* → border-color (border-primary, border-red)
1761
- *
1762
- * Ba bộ dùng chung một hậu tố nên đọc là đoán được: `text-red` / `base-red` /
1763
- * `border-red`, `text-primary` / `base-primary` / `border-primary`. Nhóm system
1764
- * bỏ chữ `system` trong tên class (token vẫn là `--system-red`), còn `border-*`
1765
- * lấy màu từ thang base vì viền luôn là màu bề mặt. Secondary của system giữ
1766
- * hậu tố `-secondary` (vd. `text-red-secondary` ↔ `--system-red-secondary`).
1767
- *
1768
- * Mỗi class chỉ set đúng 1 thuộc tính (color / background-color / border-color)
1769
- * — border-width và border-style do app tự lo. Class tự đổi giá trị theo
1770
- * `[data-theme="light"]` vì nó trỏ vào var, không hard-code màu.
1771
- *
1772
- * Chỉ semantic token mới có class. Primitive (--neutral-500, --brand-300…) là
1773
- * nguồn nội bộ, không dùng thẳng trong UI.
1774
- *
1775
- * ─ Vì sao `@layer utilities` ─────────────────────────────────────────────────
1776
- *
1777
- * Màu của Leaf là token gốc, trùng tên thì phải thắng. Đặt chung layer với
1778
- * utility của Tailwind, và app import file này SAU `@import "tailwindcss"`, nên
1779
- * khi app cũng khai báo `--color-primary` / `--color-red` trong `@theme` thì
1780
- * `.text-primary` của Leaf (cùng specificity, đứng sau) là cái có hiệu lực.
1781
- *
1782
- * Biến thể trạng thái vẫn override được vì pseudo-class cộng thêm specificity:
1783
- * `hover:text-[var(--text-highlight)]`, `focus:…` thắng bình thường. Riêng biến
1784
- * thể responsive (`md:`, `lg:`) cùng specificity và được Tailwind ghi ra trước
1785
- * file này nên phải thêm important modifier: `md:text-[var(--text-secondary)]!`.
1786
- */
1803
+ .leaf-input__control::-webkit-search-cancel-button,
1804
+ .leaf-input__control::-webkit-search-decoration {
1805
+ -webkit-appearance: none;
1806
+ }
1787
1807
 
1788
- @layer utilities {
1789
- /* Text color — content */
1808
+ .leaf-input__icon,
1809
+ .leaf-input__reveal {
1810
+ display: inline-flex;
1811
+ flex-shrink: 0;
1812
+ align-items: center;
1813
+ justify-content: center;
1814
+ width: var(--leaf-input-icon-size);
1815
+ height: var(--leaf-input-icon-size);
1816
+ font-size: var(--leaf-input-icon-size);
1817
+ line-height: 1;
1818
+ color: var(--leaf-input-icon);
1819
+ }
1790
1820
 
1791
- .text-highlight {
1792
- color: var(--text-highlight);
1821
+ .leaf-input__icon > svg,
1822
+ .leaf-input__reveal > svg {
1823
+ display: block;
1824
+ width: 1em;
1825
+ height: 1em;
1793
1826
  }
1794
1827
 
1795
- .text-primary {
1796
- color: var(--text-primary);
1828
+ .leaf-input__reveal {
1829
+ margin: 0;
1830
+ padding: 0;
1831
+ border: none;
1832
+ background: transparent;
1833
+ cursor: pointer;
1834
+ appearance: none;
1797
1835
  }
1798
1836
 
1799
- .text-secondary {
1800
- color: var(--text-secondary);
1837
+ .leaf-input__reveal:focus-visible {
1838
+ outline: 2px solid var(--text-highlight);
1839
+ outline-offset: 2px;
1840
+ border-radius: 4px;
1801
1841
  }
1802
1842
 
1803
- .text-tertiary {
1804
- color: var(--text-tertiary);
1843
+ .leaf-input__action {
1844
+ display: inline-flex;
1845
+ flex-shrink: 0;
1846
+ align-items: center;
1805
1847
  }
1806
1848
 
1807
- .text-quaternary {
1808
- color: var(--text-quaternary);
1849
+ .leaf-input__message {
1850
+ margin: 0;
1851
+ padding-left: 12px;
1852
+ color: var(--leaf-input-message);
1809
1853
  }
1810
1854
 
1811
- /* Text color — system */
1855
+ .leaf-input[hidden],
1856
+ .leaf-input__shell[hidden],
1857
+ .leaf-input__body[hidden],
1858
+ .leaf-input__main[hidden],
1859
+ .leaf-input__icon[hidden],
1860
+ .leaf-input__reveal[hidden],
1861
+ .leaf-input__action[hidden] {
1862
+ display: none;
1863
+ }
1812
1864
 
1813
- .text-blue {
1814
- color: var(--system-blue);
1865
+ /* ── State ───────────────────────────────────────────────────────────── */
1866
+
1867
+ .leaf-input[data-filled="true"] {
1868
+ --leaf-input-label: var(--text-primary);
1815
1869
  }
1816
1870
 
1817
- .text-green {
1818
- color: var(--system-green);
1871
+ .leaf-input:focus-within {
1872
+ --leaf-input-border: var(--text-highlight);
1873
+ --leaf-input-label: var(--text-highlight);
1819
1874
  }
1820
1875
 
1821
- .text-yellow {
1822
- color: var(--system-yellow);
1876
+ .leaf-input[data-invalid="true"] {
1877
+ --leaf-input-border: var(--system-red);
1878
+ --leaf-input-label: var(--system-red);
1879
+ --leaf-input-message: var(--system-red);
1823
1880
  }
1824
1881
 
1825
- .text-orange {
1826
- color: var(--system-orange);
1882
+ .leaf-input[data-disabled="true"] {
1883
+ --leaf-input-border: transparent;
1884
+ --leaf-input-label: var(--text-tertiary);
1885
+ --leaf-input-fg: var(--text-secondary);
1886
+ --leaf-input-icon: var(--text-secondary);
1827
1887
  }
1828
1888
 
1829
- .text-red {
1830
- color: var(--system-red);
1889
+ .leaf-input[data-disabled="true"] .leaf-input__shell,
1890
+ .leaf-input[data-disabled="true"] .leaf-input__control {
1891
+ cursor: not-allowed;
1831
1892
  }
1832
1893
 
1833
- .text-purple {
1834
- color: var(--system-purple);
1894
+ /* ── Variant inline (search) ─────────────────────────────────────────── */
1895
+
1896
+ .leaf-input[data-variant="inline"] {
1897
+ --leaf-input-bg: var(--base-secondary);
1898
+ --leaf-input-border: var(--base-quaternary);
1899
+ --leaf-input-min-height: 36px;
1900
+ --leaf-input-padding-y: 6px;
1901
+ --leaf-input-icon-size: 16px;
1902
+ --leaf-input-placeholder: var(--text-secondary);
1835
1903
  }
1836
1904
 
1837
- .text-blue-secondary {
1838
- color: var(--system-blue-secondary);
1905
+ .leaf-input[data-variant="inline"]:focus-within {
1906
+ --leaf-input-border: var(--text-highlight);
1839
1907
  }
1840
1908
 
1841
- .text-green-secondary {
1842
- color: var(--system-green-secondary);
1909
+ .leaf-input[data-variant="inline"][data-invalid="true"] {
1910
+ --leaf-input-border: var(--system-red);
1843
1911
  }
1844
1912
 
1845
- .text-yellow-secondary {
1846
- color: var(--system-yellow-secondary);
1913
+ .leaf-input[data-variant="inline"][data-shape="pill"] {
1914
+ --leaf-input-bg: transparent;
1915
+ --leaf-input-radius: 9999px;
1847
1916
  }
1917
+ }
1848
1918
 
1849
- .text-orange-secondary {
1850
- color: var(--system-orange-secondary);
1919
+ /* --- src/components/Logo/logo.css --- */
1920
+
1921
+ /*
1922
+ * Logo — Figma 924:1074.
1923
+ *
1924
+ * React: chọn SVG trong assets.ts, render <img class="leaf-logo__img">.
1925
+ * HTML tĩnh: span.leaf-logo:empty + data-brand / data-mode / data-side — rule
1926
+ * background-image nằm ở logo-assets.css (generated bởi scripts/embed-logo-assets.mjs,
1927
+ * không gộp vào classes.css / styles.css; bản CDN đã gộp sẵn).
1928
+ * Size (chiều cao) qua --leaf-logo-size.
1929
+ */
1930
+
1931
+ @layer components {
1932
+ .leaf-logo {
1933
+ display: inline-flex;
1934
+ flex-shrink: 0;
1935
+ align-items: center;
1936
+ justify-content: center;
1937
+ vertical-align: middle;
1938
+ margin: 0;
1939
+ padding: 0;
1940
+ border: none;
1941
+ background: transparent;
1942
+ background-repeat: no-repeat;
1943
+ background-position: center;
1944
+ background-size: contain;
1945
+ line-height: 0;
1946
+ box-sizing: border-box;
1851
1947
  }
1852
1948
 
1853
- .text-red-secondary {
1854
- color: var(--system-red-secondary);
1949
+ /* HTML tĩnh — không có <img>, asset lấy từ data-* */
1950
+ .leaf-logo:empty {
1951
+ display: inline-block;
1952
+ height: var(--leaf-logo-size, 40px);
1953
+ width: calc(var(--leaf-logo-size, 40px) * var(--leaf-logo-aspect, 1));
1855
1954
  }
1856
1955
 
1857
- .text-purple-secondary {
1858
- color: var(--system-purple-secondary);
1956
+ .leaf-logo__img {
1957
+ display: block;
1958
+ height: var(--leaf-logo-size, 40px);
1959
+ width: auto;
1960
+ max-width: 100%;
1961
+ }
1962
+
1963
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
1964
+ .leaf-logo[hidden] {
1965
+ display: none;
1859
1966
  }
1967
+ }
1860
1968
 
1861
- /* Background — base */
1969
+ /* --- src/components/Radio/radio.css --- */
1862
1970
 
1863
- .base-highlight {
1864
- background-color: var(--text-highlight);
1971
+ /*
1972
+ * Radio — Figma 1146:2081.
1973
+ *
1974
+ * Size S/M/L (18 · 24 · 30) qua data-size; Selected qua `:checked` của input
1975
+ * native; Disable qua `:disabled`. Input phủ kín vùng control (opacity 0) nên
1976
+ * click / focus / FormData đều là của trình duyệt — HTML tĩnh không cần JS.
1977
+ * Thiếu attribute → md · unchecked · enabled.
1978
+ */
1979
+
1980
+ @layer components {
1981
+ .leaf-radio {
1982
+ --leaf-radio-size: 24px;
1983
+ --leaf-radio-ring: 1.5px;
1984
+ --leaf-radio-color: var(--text-primary);
1985
+
1986
+ position: relative;
1987
+ display: inline-flex;
1988
+ align-items: center;
1989
+ gap: 8px;
1990
+ vertical-align: middle;
1991
+ cursor: pointer;
1865
1992
  }
1866
1993
 
1867
- .base-primary {
1868
- background-color: var(--base-primary);
1994
+ .leaf-radio[data-size="sm"] {
1995
+ --leaf-radio-size: 18px;
1869
1996
  }
1870
1997
 
1871
- .base-secondary {
1872
- background-color: var(--base-secondary);
1998
+ .leaf-radio[data-size="lg"] {
1999
+ --leaf-radio-size: 30px;
1873
2000
  }
1874
2001
 
1875
- .base-tertiary {
1876
- background-color: var(--base-tertiary);
2002
+ .leaf-radio[hidden],
2003
+ .leaf-radio__control[hidden] {
2004
+ display: none;
1877
2005
  }
1878
2006
 
1879
- .base-quaternary {
1880
- background-color: var(--base-quaternary);
2007
+ .leaf-radio__input {
2008
+ position: absolute;
2009
+ top: 0;
2010
+ left: 0;
2011
+ width: var(--leaf-radio-size);
2012
+ height: var(--leaf-radio-size);
2013
+ margin: 0;
2014
+ padding: 0;
2015
+ border: none;
2016
+ opacity: 0;
2017
+ cursor: inherit;
2018
+ appearance: none;
2019
+ -webkit-appearance: none;
1881
2020
  }
1882
2021
 
1883
- .base-quinary {
1884
- background-color: var(--base-quinary);
2022
+ .leaf-radio__control {
2023
+ display: inline-flex;
2024
+ flex-shrink: 0;
2025
+ align-items: center;
2026
+ justify-content: center;
2027
+ border-radius: 9999px;
2028
+ box-sizing: border-box;
2029
+ width: var(--leaf-radio-size);
2030
+ height: var(--leaf-radio-size);
2031
+ border: var(--leaf-radio-ring) solid var(--leaf-radio-color);
2032
+ transition: border-color 0.15s ease;
1885
2033
  }
1886
2034
 
1887
- /* Background — system */
1888
-
1889
- .base-blue {
1890
- background-color: var(--system-blue);
2035
+ .leaf-radio__dot {
2036
+ border-radius: 9999px;
2037
+ width: 50%;
2038
+ height: 50%;
2039
+ background-color: var(--leaf-radio-color);
2040
+ transform: scale(0);
2041
+ transition: transform 0.15s ease;
1891
2042
  }
1892
2043
 
1893
- .base-green {
1894
- background-color: var(--system-green);
2044
+ .leaf-radio__label {
2045
+ color: var(--text-primary);
1895
2046
  }
1896
2047
 
1897
- .base-yellow {
1898
- background-color: var(--system-yellow);
2048
+ /* Selected */
2049
+ .leaf-radio__input:checked + .leaf-radio__control {
2050
+ --leaf-radio-color: var(--text-highlight);
1899
2051
  }
1900
2052
 
1901
- .base-orange {
1902
- background-color: var(--system-orange);
2053
+ .leaf-radio__input:checked + .leaf-radio__control .leaf-radio__dot {
2054
+ transform: scale(1);
1903
2055
  }
1904
2056
 
1905
- .base-red {
1906
- background-color: var(--system-red);
2057
+ /* Disable — ring / dot xám, label tertiary. */
2058
+ .leaf-radio__input:disabled + .leaf-radio__control {
2059
+ --leaf-radio-color: var(--base-quaternary);
1907
2060
  }
1908
2061
 
1909
- .base-purple {
1910
- background-color: var(--system-purple);
2062
+ .leaf-radio__input:disabled ~ .leaf-radio__label {
2063
+ color: var(--text-tertiary);
1911
2064
  }
1912
2065
 
1913
- .base-blue-secondary {
1914
- background-color: var(--system-blue-secondary);
2066
+ .leaf-radio:has(.leaf-radio__input:disabled) {
2067
+ cursor: not-allowed;
1915
2068
  }
1916
2069
 
1917
- .base-green-secondary {
1918
- background-color: var(--system-green-secondary);
2070
+ .leaf-radio__input:focus-visible + .leaf-radio__control {
2071
+ outline: 2px solid var(--text-highlight);
2072
+ outline-offset: 2px;
1919
2073
  }
1920
2074
 
1921
- .base-yellow-secondary {
1922
- background-color: var(--system-yellow-secondary);
2075
+ .leaf-radio-group {
2076
+ display: flex;
2077
+ flex-direction: column;
2078
+ gap: 12px;
1923
2079
  }
1924
2080
 
1925
- .base-orange-secondary {
1926
- background-color: var(--system-orange-secondary);
2081
+ .leaf-radio-group[data-orientation="horizontal"] {
2082
+ flex-direction: row;
2083
+ flex-wrap: wrap;
1927
2084
  }
1928
2085
 
1929
- .base-red-secondary {
1930
- background-color: var(--system-red-secondary);
2086
+ .leaf-radio-group[hidden] {
2087
+ display: none;
1931
2088
  }
2089
+ }
1932
2090
 
1933
- .base-purple-secondary {
1934
- background-color: var(--system-purple-secondary);
1935
- }
2091
+ /* --- src/components/Skeleton/skeleton.css --- */
1936
2092
 
1937
- /* Border color — base */
2093
+ /*
2094
+ * Skeleton — placeholder shimmer.
2095
+ *
2096
+ * Nền `--base-tertiary` (dark: #28292B). Kích thước / radius qua custom property
2097
+ * từ React (hoặc style inline khi HTML tĩnh). Thiếu biến → full width/height,
2098
+ * radius 12px.
2099
+ */
1938
2100
 
1939
- .border-highlight {
1940
- border-color: var(--text-highlight);
1941
- }
2101
+ @layer components {
2102
+ .leaf-skeleton {
2103
+ --leaf-skeleton-width: 100%;
2104
+ --leaf-skeleton-height: 100%;
2105
+ --leaf-skeleton-radius: 12px;
1942
2106
 
1943
- .border-primary {
1944
- border-color: var(--base-primary);
2107
+ position: relative;
2108
+ overflow: hidden;
2109
+ box-sizing: border-box;
2110
+ width: var(--leaf-skeleton-width);
2111
+ height: var(--leaf-skeleton-height);
2112
+ border-radius: var(--leaf-skeleton-radius);
2113
+ background-color: var(--base-tertiary);
1945
2114
  }
1946
2115
 
1947
- .border-secondary {
1948
- border-color: var(--base-secondary);
2116
+ .leaf-skeleton__shimmer {
2117
+ position: absolute;
2118
+ inset: 0;
2119
+ background: linear-gradient(
2120
+ to right,
2121
+ transparent,
2122
+ color-mix(in srgb, var(--base-quinary) 10%, transparent),
2123
+ transparent
2124
+ );
2125
+ animation: leaf-skeleton-shimmer 2s infinite ease-in-out;
1949
2126
  }
2127
+ }
1950
2128
 
1951
- .border-tertiary {
1952
- border-color: var(--base-tertiary);
2129
+ @keyframes leaf-skeleton-shimmer {
2130
+ 0% {
2131
+ transform: translateX(-100%);
1953
2132
  }
1954
-
1955
- .border-quaternary {
1956
- border-color: var(--base-quaternary);
2133
+ 100% {
2134
+ transform: translateX(100%);
1957
2135
  }
2136
+ }
1958
2137
 
1959
- .border-quinary {
1960
- border-color: var(--base-quinary);
1961
- }
2138
+ /* --- src/components/Slider/slider.css --- */
1962
2139
 
1963
- /* Border color — system */
2140
+ /*
2141
+ * Slider — Figma 730:12646.
2142
+ *
2143
+ * Giá trị liên tục trên rail (kéo / click chính xác tới từng step — như
2144
+ * TradeQuickSlider). Mốc chia đều đặt tuyệt đối theo `left: <%>`; thumb đặt ở
2145
+ * `--leaf-slider-fill`. Ở min thumb = `--text-primary`; khi > min =
2146
+ * `--leaf-slider-active` (mặc định `--text-highlight`).
2147
+ *
2148
+ * Rail, mốc và thumb cùng nằm trong vùng lùi vào `--leaf-slider-inset` ở hai đầu
2149
+ * (nửa thumb) — nhờ vậy `left: X%` của cả ba khớp nhau và thumb không tràn ra ngoài.
2150
+ */
1964
2151
 
1965
- .border-blue {
1966
- border-color: var(--system-blue);
1967
- }
2152
+ @layer components {
2153
+ .leaf-slider {
2154
+ --leaf-slider-active: var(--text-highlight);
2155
+ --leaf-slider-fill: 0%;
2156
+ --leaf-slider-mark: 6px;
2157
+ --leaf-slider-mark-active: 10px;
2158
+ --leaf-slider-rail-height: 2px;
2159
+ --leaf-slider-inset: calc(var(--leaf-slider-mark-active) / 2);
2160
+ --leaf-slider-control-height: max(
2161
+ var(--leaf-slider-mark-active),
2162
+ var(--leaf-slider-mark),
2163
+ 20px
2164
+ );
1968
2165
 
1969
- .border-green {
1970
- border-color: var(--system-green);
2166
+ display: flex;
2167
+ flex-direction: column;
2168
+ gap: 8px;
2169
+ width: 100%;
2170
+ box-sizing: border-box;
2171
+ font-family: var(--font-sans);
2172
+ font-size: var(--body-5-size);
2173
+ line-height: var(--body-5-line-height);
2174
+ font-weight: var(--body-5-weight);
2175
+ color: var(--text-primary);
2176
+ user-select: none;
2177
+ -webkit-user-select: none;
1971
2178
  }
1972
2179
 
1973
- .border-yellow {
1974
- border-color: var(--system-yellow);
2180
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
2181
+ .leaf-slider[hidden],
2182
+ .leaf-slider__header[hidden],
2183
+ .leaf-slider__body[hidden],
2184
+ .leaf-slider__control[hidden] {
2185
+ display: none;
1975
2186
  }
1976
2187
 
1977
- .border-orange {
1978
- border-color: var(--system-orange);
2188
+ .leaf-slider__header {
2189
+ display: flex;
2190
+ align-items: flex-start;
2191
+ justify-content: space-between;
2192
+ gap: 8px;
2193
+ width: 100%;
2194
+ white-space: nowrap;
2195
+ color: var(--text-primary);
2196
+ user-select: text;
2197
+ -webkit-user-select: text;
1979
2198
  }
1980
2199
 
1981
- .border-red {
1982
- border-color: var(--system-red);
2200
+ .leaf-slider__title {
2201
+ min-width: 0;
1983
2202
  }
1984
2203
 
1985
- .border-purple {
1986
- border-color: var(--system-purple);
2204
+ .leaf-slider__unit {
2205
+ min-width: 0;
2206
+ text-align: right;
1987
2207
  }
1988
2208
 
1989
- .border-blue-secondary {
1990
- border-color: var(--system-blue-secondary);
2209
+ /* Figma gap XS (4) giữa track và Value labels. */
2210
+ .leaf-slider__body {
2211
+ display: flex;
2212
+ flex-direction: column;
2213
+ gap: 4px;
2214
+ width: 100%;
1991
2215
  }
1992
2216
 
1993
- .border-green-secondary {
1994
- border-color: var(--system-green-secondary);
2217
+ .leaf-slider__control {
2218
+ position: relative;
2219
+ display: flex;
2220
+ align-items: center;
2221
+ width: 100%;
2222
+ height: var(--leaf-slider-control-height);
2223
+ outline: none;
2224
+ cursor: pointer;
2225
+ /* Chỉ khoá gesture trên track — header / labels vẫn cho cuộn trang. */
2226
+ touch-action: none;
1995
2227
  }
1996
2228
 
1997
- .border-yellow-secondary {
1998
- border-color: var(--system-yellow-secondary);
2229
+ .leaf-slider__control:focus-visible {
2230
+ outline: 2px solid var(--leaf-slider-active);
2231
+ outline-offset: 4px;
2232
+ border-radius: 4px;
1999
2233
  }
2000
2234
 
2001
- .border-orange-secondary {
2002
- border-color: var(--system-orange-secondary);
2235
+ .leaf-slider[data-dragging="true"] .leaf-slider__control {
2236
+ cursor: grabbing;
2003
2237
  }
2004
2238
 
2005
- .border-red-secondary {
2006
- border-color: var(--system-red-secondary);
2239
+ .leaf-slider__rail {
2240
+ position: absolute;
2241
+ left: var(--leaf-slider-inset);
2242
+ right: var(--leaf-slider-inset);
2243
+ top: 50%;
2244
+ height: var(--leaf-slider-rail-height);
2245
+ transform: translateY(-50%);
2246
+ border-radius: 100px;
2247
+ background-color: var(--text-tertiary);
2248
+ pointer-events: none;
2007
2249
  }
2008
2250
 
2009
- .border-purple-secondary {
2010
- border-color: var(--system-purple-secondary);
2251
+ .leaf-slider__fill {
2252
+ display: block;
2253
+ height: 100%;
2254
+ width: var(--leaf-slider-fill);
2255
+ border-radius: inherit;
2256
+ background-color: var(--text-primary);
2011
2257
  }
2012
- }
2013
2258
 
2014
- /* --- src/styles/spacing.css --- */
2015
-
2016
- /*
2017
- * Spacing classes — map 1:1 sang --spacing-* trong @finhay/leaf-tokens (Figma 34:1034).
2018
- *
2019
- * Tiền tố = thuộc tính (giống color): p-* / m-* / gap-* (+ biến thể hướng).
2020
- * Hậu tố = bậc token: 0 · xs · s · m · l · xl · 2xl … 7xl.
2021
- *
2022
- * Chỉ set đúng 1 thuộc tính spacing — không đụng width/height/radius.
2023
- * Nằm trong @layer utilities để Leaf thắng khi trùng tên với utility Tailwind
2024
- * (import sau @import "tailwindcss"), giống color.css.
2025
- */
2259
+ /* Khung toạ độ cho mốc + thumb — trùng với rail, cao 0, nằm giữa control. */
2260
+ .leaf-slider__marks {
2261
+ position: absolute;
2262
+ z-index: 1;
2263
+ left: var(--leaf-slider-inset);
2264
+ right: var(--leaf-slider-inset);
2265
+ top: 50%;
2266
+ height: 0;
2267
+ pointer-events: none;
2268
+ }
2026
2269
 
2027
- @layer utilities {
2028
- /* Padding */
2270
+ .leaf-slider__mark {
2271
+ position: absolute;
2272
+ top: 0;
2273
+ left: 0;
2274
+ display: block;
2275
+ box-sizing: border-box;
2276
+ width: var(--leaf-slider-mark);
2277
+ height: var(--leaf-slider-mark);
2278
+ margin: 0;
2279
+ padding: 0;
2280
+ border: none;
2281
+ border-radius: 50%;
2282
+ background-color: var(--text-tertiary);
2283
+ cursor: pointer;
2284
+ appearance: none;
2285
+ -webkit-appearance: none;
2286
+ pointer-events: auto;
2287
+ transform: translate(-50%, -50%);
2288
+ transition: background-color 0.15s ease;
2289
+ }
2029
2290
 
2030
- .p-0 {
2031
- padding: var(--spacing-0);
2291
+ .leaf-slider__mark[data-state="passed"] {
2292
+ background-color: var(--text-primary);
2032
2293
  }
2033
2294
 
2034
- .p-xs {
2035
- padding: var(--spacing-xs);
2295
+ /* Mốc trùng giá trị nằm dưới thumb — cùng màu để không lộ viền. */
2296
+ .leaf-slider__mark[data-state="active"] {
2297
+ background-color: var(--text-primary);
2036
2298
  }
2037
2299
 
2038
- .p-s {
2039
- padding: var(--spacing-s);
2300
+ .leaf-slider:not([data-at-min="true"]) .leaf-slider__mark[data-state="active"] {
2301
+ background-color: var(--leaf-slider-active);
2040
2302
  }
2041
2303
 
2042
- .p-m {
2043
- padding: var(--spacing-m);
2304
+ .leaf-slider__thumb {
2305
+ position: absolute;
2306
+ top: 0;
2307
+ left: var(--leaf-slider-fill);
2308
+ display: block;
2309
+ box-sizing: border-box;
2310
+ width: var(--leaf-slider-mark-active);
2311
+ height: var(--leaf-slider-mark-active);
2312
+ border-radius: 50%;
2313
+ /* Figma Default (min): thumb trắng; Active (> min): highlight. */
2314
+ background-color: var(--text-primary);
2315
+ transform: translate(-50%, -50%);
2316
+ pointer-events: none;
2317
+ transition: background-color 0.15s ease;
2044
2318
  }
2045
2319
 
2046
- .p-l {
2047
- padding: var(--spacing-l);
2320
+ .leaf-slider:not([data-at-min="true"]) .leaf-slider__thumb {
2321
+ background-color: var(--leaf-slider-active);
2048
2322
  }
2049
2323
 
2050
- .p-xl {
2051
- padding: var(--spacing-xl);
2324
+ /* Label căn đúng dưới mốc: cùng vùng lùi với rail; nhãn hai đầu kéo ra sát mép. */
2325
+ .leaf-slider__labels {
2326
+ position: relative;
2327
+ margin-inline: var(--leaf-slider-inset);
2328
+ min-height: var(--body-5-line-height);
2329
+ user-select: text;
2330
+ -webkit-user-select: text;
2052
2331
  }
2053
2332
 
2054
- .p-2xl {
2055
- padding: var(--spacing-2xl);
2333
+ .leaf-slider__label {
2334
+ position: absolute;
2335
+ top: 0;
2336
+ max-width: 40%;
2337
+ margin: 0;
2338
+ padding: 0;
2339
+ border: none;
2340
+ background: none;
2341
+ font: inherit;
2342
+ color: var(--text-secondary);
2343
+ white-space: nowrap;
2344
+ transform: translateX(-50%);
2345
+ text-align: center;
2346
+ cursor: pointer;
2347
+ appearance: none;
2348
+ -webkit-appearance: none;
2056
2349
  }
2057
2350
 
2058
- .p-3xl {
2059
- padding: var(--spacing-3xl);
2351
+ .leaf-slider__label[data-edge="start"] {
2352
+ transform: translateX(calc(-1 * var(--leaf-slider-inset)));
2353
+ text-align: left;
2060
2354
  }
2061
2355
 
2062
- .p-4xl {
2063
- padding: var(--spacing-4xl);
2356
+ .leaf-slider__label[data-edge="end"] {
2357
+ transform: translateX(calc(-100% + var(--leaf-slider-inset)));
2358
+ text-align: right;
2064
2359
  }
2065
2360
 
2066
- .p-5xl {
2067
- padding: var(--spacing-5xl);
2361
+ .leaf-slider__label[data-active="true"] {
2362
+ color: var(--text-primary);
2068
2363
  }
2069
2364
 
2070
- .p-6xl {
2071
- padding: var(--spacing-6xl);
2365
+ .leaf-slider__label:disabled {
2366
+ cursor: not-allowed;
2072
2367
  }
2073
2368
 
2074
- .p-7xl {
2075
- padding: var(--spacing-7xl);
2369
+ .leaf-slider[data-disabled="true"] {
2370
+ opacity: 0.5;
2371
+ pointer-events: none;
2076
2372
  }
2077
2373
 
2078
- .px-0 {
2079
- padding-inline: var(--spacing-0);
2374
+ .leaf-slider[data-disabled="true"] .leaf-slider__control {
2375
+ touch-action: auto;
2080
2376
  }
2081
2377
 
2082
- .px-xs {
2083
- padding-inline: var(--spacing-xs);
2378
+ .leaf-slider[data-disabled="true"] .leaf-slider__control,
2379
+ .leaf-slider[data-disabled="true"] .leaf-slider__mark,
2380
+ .leaf-slider[data-disabled="true"] .leaf-slider__label {
2381
+ cursor: not-allowed;
2084
2382
  }
2383
+ }
2085
2384
 
2086
- .px-s {
2087
- padding-inline: var(--spacing-s);
2088
- }
2385
+ /* --- src/components/Spinner/spinner.css --- */
2089
2386
 
2090
- .px-m {
2091
- padding-inline: var(--spacing-m);
2092
- }
2387
+ /*
2388
+ * Spinner — SVG loader-line (Figma Button), viewBox 0 0 21 21.
2389
+ *
2390
+ * Variant animation qua data-animation; size qua data-size; overlay fullscreen
2391
+ * qua .leaf-spinner-overlay. Màu mặc định trắng (dark) / đen (light) qua --base-quinary —
2392
+ * không dùng highlight; override bằng class text-* khi cần. Thiếu attribute → md · spin.
2393
+ */
2093
2394
 
2094
- .px-l {
2095
- padding-inline: var(--spacing-l);
2096
- }
2395
+ @layer components {
2396
+ .leaf-spinner {
2397
+ --leaf-spinner-size: 24px;
2398
+ --leaf-spinner-duration: 1.2s;
2097
2399
 
2098
- .px-xl {
2099
- padding-inline: var(--spacing-xl);
2400
+ display: inline-flex;
2401
+ flex-shrink: 0;
2402
+ align-items: center;
2403
+ justify-content: center;
2404
+ vertical-align: middle;
2405
+ width: var(--leaf-spinner-size);
2406
+ height: var(--leaf-spinner-size);
2407
+ color: var(--base-quinary);
2408
+ line-height: 0;
2100
2409
  }
2101
2410
 
2102
- .px-2xl {
2103
- padding-inline: var(--spacing-2xl);
2411
+ .leaf-spinner__icon {
2412
+ display: block;
2413
+ width: 100%;
2414
+ height: 100%;
2104
2415
  }
2105
2416
 
2106
- .px-3xl {
2107
- padding-inline: var(--spacing-3xl);
2417
+ /* Fullscreen overlay — pattern Spinner (portal + nền mờ). */
2418
+ .leaf-spinner-overlay {
2419
+ position: fixed;
2420
+ inset: 0;
2421
+ display: flex;
2422
+ align-items: center;
2423
+ justify-content: center;
2424
+ z-index: var(--leaf-z-spinner-overlay, 100);
2425
+ box-sizing: border-box;
2426
+ background-color: var(--overlay);
2427
+ color: var(--base-quinary);
2108
2428
  }
2109
2429
 
2110
- .px-4xl {
2111
- padding-inline: var(--spacing-4xl);
2430
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
2431
+ .leaf-spinner[hidden],
2432
+ .leaf-spinner-overlay[hidden] {
2433
+ display: none;
2112
2434
  }
2113
2435
 
2114
- .px-5xl {
2115
- padding-inline: var(--spacing-5xl);
2116
- }
2436
+ /* ── Size ────────────────────────────────────────────────────────────── */
2117
2437
 
2118
- .px-6xl {
2119
- padding-inline: var(--spacing-6xl);
2438
+ .leaf-spinner[data-size="lg"] {
2439
+ --leaf-spinner-size: 30px;
2120
2440
  }
2121
2441
 
2122
- .px-7xl {
2123
- padding-inline: var(--spacing-7xl);
2442
+ .leaf-spinner[data-size="sm"] {
2443
+ --leaf-spinner-size: 20px;
2124
2444
  }
2125
2445
 
2126
- .py-0 {
2127
- padding-block: var(--spacing-0);
2128
- }
2446
+ /* ── Animations ──────────────────────────────────────────────────────── */
2129
2447
 
2130
- .py-xs {
2131
- padding-block: var(--spacing-xs);
2448
+ /* spin — xoay cả icon (mặc định). */
2449
+ .leaf-spinner[data-animation="spin"] .leaf-spinner__icon,
2450
+ .leaf-spinner:not([data-animation]) .leaf-spinner__icon {
2451
+ animation: leaf-spinner-spin var(--leaf-spinner-duration) linear infinite;
2132
2452
  }
2133
2453
 
2134
- .py-s {
2135
- padding-block: var(--spacing-s);
2454
+ /*
2455
+ * fade — xoay + mask conic để tạo hiệu ứng đuôi mờ (kiểu iOS trên 1 path).
2456
+ */
2457
+ .leaf-spinner[data-animation="fade"] .leaf-spinner__icon {
2458
+ animation: leaf-spinner-spin var(--leaf-spinner-duration) linear infinite;
2459
+ mask-image: conic-gradient(from 0deg, transparent 0%, #000 70%, #000 100%);
2460
+ -webkit-mask-image: conic-gradient(from 0deg, transparent 0%, #000 70%, #000 100%);
2136
2461
  }
2137
2462
 
2138
- .py-m {
2139
- padding-block: var(--spacing-m);
2463
+ /* pulse — scale nhịp. */
2464
+ .leaf-spinner[data-animation="pulse"] .leaf-spinner__icon {
2465
+ animation: leaf-spinner-pulse 1s ease-in-out infinite;
2140
2466
  }
2141
2467
 
2142
- .py-l {
2143
- padding-block: var(--spacing-l);
2468
+ /* breathe — mờ/đậm cả icon. */
2469
+ .leaf-spinner[data-animation="breathe"] .leaf-spinner__icon {
2470
+ animation: leaf-spinner-breathe 1.2s ease-in-out infinite;
2144
2471
  }
2472
+ }
2145
2473
 
2146
- .py-xl {
2147
- padding-block: var(--spacing-xl);
2474
+ @keyframes leaf-spinner-spin {
2475
+ to {
2476
+ transform: rotate(360deg);
2148
2477
  }
2478
+ }
2149
2479
 
2150
- .py-2xl {
2151
- padding-block: var(--spacing-2xl);
2480
+ @keyframes leaf-spinner-pulse {
2481
+ 0%,
2482
+ 100% {
2483
+ transform: scale(0.85);
2152
2484
  }
2153
-
2154
- .py-3xl {
2155
- padding-block: var(--spacing-3xl);
2485
+ 50% {
2486
+ transform: scale(1);
2156
2487
  }
2488
+ }
2157
2489
 
2158
- .py-4xl {
2159
- padding-block: var(--spacing-4xl);
2490
+ @keyframes leaf-spinner-breathe {
2491
+ 0%,
2492
+ 100% {
2493
+ opacity: 0.35;
2160
2494
  }
2161
-
2162
- .py-5xl {
2163
- padding-block: var(--spacing-5xl);
2495
+ 50% {
2496
+ opacity: 1;
2164
2497
  }
2498
+ }
2165
2499
 
2166
- .py-6xl {
2167
- padding-block: var(--spacing-6xl);
2168
- }
2500
+ /* --- src/components/Tabs/tabs.css --- */
2169
2501
 
2170
- .py-7xl {
2171
- padding-block: var(--spacing-7xl);
2172
- }
2502
+ /*
2503
+ * Tabs — Figma 712:6996 (Tabs Items).
2504
+ *
2505
+ * `variant` map type trong Figma: subcontent | title | functional | buy | sell.
2506
+ * Size: xl | lg | md | sm (tuỳ variant — Title chỉ S, Functional chỉ M, Buy/Sell chỉ L).
2507
+ * Subcontent XL/LG selected = --base-quinary; MD/SM selected = --base-tertiary.
2508
+ *
2509
+ * Variant / size đặt trên tablist (`.leaf-tabs[data-variant][data-size]`), từng
2510
+ * `.leaf-tab` chỉ cần `aria-selected`. Toàn bộ hình thức (kể cả typography của
2511
+ * label) nằm ở đây — React và `leaf.js` chỉ gắn attribute, nên HTML tĩnh viết
2512
+ * cùng markup là ra cùng kết quả.
2513
+ *
2514
+ * Mặc định khi thiếu attribute: variant subcontent, size xl. Chỉ Subcontent đổi
2515
+ * theo size; các variant khác có một size duy nhất nên không đọc `data-size`.
2516
+ */
2173
2517
 
2174
- .pt-0 {
2175
- padding-top: var(--spacing-0);
2176
- }
2518
+ @layer components {
2519
+ .leaf-tabs {
2520
+ /* Kích thước của Subcontent — mặc định xl, đổi theo data-size bên dưới. */
2521
+ --leaf-tab-padding: 12px 16px;
2522
+ --leaf-tab-gap: 8px;
2523
+ --leaf-tab-font-size: var(--body-3-size);
2524
+ --leaf-tab-line-height: var(--body-3-line-height);
2525
+ --leaf-tab-font-weight: var(--body-3-highlight-weight);
2177
2526
 
2178
- .pt-xs {
2179
- padding-top: var(--spacing-xs);
2527
+ display: flex;
2528
+ flex-wrap: wrap;
2529
+ align-items: center;
2530
+ gap: 12px;
2180
2531
  }
2181
2532
 
2182
- .pt-s {
2183
- padding-top: var(--spacing-s);
2533
+ .leaf-tabs[data-size="lg"] {
2534
+ --leaf-tab-padding: 8px 16px;
2535
+ --leaf-tab-gap: 8px;
2536
+ --leaf-tab-font-size: var(--body-4-size);
2537
+ --leaf-tab-line-height: var(--body-4-line-height);
2538
+ --leaf-tab-font-weight: var(--body-4-highlight-weight);
2184
2539
  }
2185
2540
 
2186
- .pt-m {
2187
- padding-top: var(--spacing-m);
2541
+ .leaf-tabs[data-size="md"] {
2542
+ --leaf-tab-padding: 4px 12px;
2543
+ --leaf-tab-gap: normal;
2544
+ --leaf-tab-font-size: var(--body-4-size);
2545
+ --leaf-tab-line-height: var(--body-4-line-height);
2546
+ --leaf-tab-font-weight: var(--body-4-weight);
2188
2547
  }
2189
2548
 
2190
- .pt-l {
2191
- padding-top: var(--spacing-l);
2549
+ .leaf-tabs[data-size="sm"] {
2550
+ --leaf-tab-padding: 4px 12px;
2551
+ --leaf-tab-gap: normal;
2552
+ --leaf-tab-font-size: var(--body-5-size);
2553
+ --leaf-tab-line-height: var(--body-5-line-height);
2554
+ --leaf-tab-font-weight: var(--body-5-weight);
2192
2555
  }
2193
2556
 
2194
- .pt-xl {
2195
- padding-top: var(--spacing-xl);
2557
+ .leaf-tab {
2558
+ display: inline-flex;
2559
+ align-items: center;
2560
+ justify-content: center;
2561
+ text-align: center;
2562
+ white-space: nowrap;
2563
+ border: none;
2564
+ margin: 0;
2565
+ padding: 0;
2566
+ cursor: pointer;
2567
+ background-color: transparent;
2568
+ color: inherit;
2569
+ font: inherit;
2570
+ font-family: var(--font-sans);
2571
+ box-sizing: border-box;
2572
+ appearance: none;
2196
2573
  }
2197
2574
 
2198
- .pt-2xl {
2199
- padding-top: var(--spacing-2xl);
2575
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
2576
+ .leaf-tabs[hidden],
2577
+ .leaf-tab[hidden],
2578
+ .leaf-tab__label[hidden] {
2579
+ display: none;
2200
2580
  }
2201
2581
 
2202
- .pt-3xl {
2203
- padding-top: var(--spacing-3xl);
2582
+ .leaf-tab:disabled,
2583
+ .leaf-tab[aria-disabled="true"] {
2584
+ cursor: not-allowed;
2204
2585
  }
2205
2586
 
2206
- .pt-4xl {
2207
- padding-top: var(--spacing-4xl);
2587
+ .leaf-tab__label {
2588
+ display: inline-flex;
2589
+ align-items: center;
2590
+ justify-content: center;
2591
+ line-height: inherit;
2208
2592
  }
2209
2593
 
2210
- .pt-5xl {
2211
- padding-top: var(--spacing-5xl);
2212
- }
2594
+ /* ── Subcontent (pill) — cũng là mặc định khi không có data-variant ──── */
2595
+ /* XL / LG: idle tertiary · selected quinary. MD / SM: idle trong suốt · selected tertiary. */
2213
2596
 
2214
- .pt-6xl {
2215
- padding-top: var(--spacing-6xl);
2597
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]) .leaf-tab {
2598
+ gap: var(--leaf-tab-gap);
2599
+ padding: var(--leaf-tab-padding);
2600
+ border-radius: 1000px;
2601
+ background-color: var(--base-tertiary);
2602
+ color: var(--text-secondary);
2603
+ font-size: var(--leaf-tab-font-size);
2604
+ line-height: var(--leaf-tab-line-height);
2605
+ font-weight: var(--leaf-tab-font-weight);
2216
2606
  }
2217
2607
 
2218
- .pt-7xl {
2219
- padding-top: var(--spacing-7xl);
2608
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"])
2609
+ .leaf-tab[aria-selected="true"] {
2610
+ background-color: var(--base-quinary);
2611
+ color: var(--text-quaternary);
2220
2612
  }
2221
2613
 
2222
- .pr-0 {
2223
- padding-right: var(--spacing-0);
2614
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]) .leaf-tab:disabled,
2615
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"])
2616
+ .leaf-tab[aria-disabled="true"] {
2617
+ background-color: var(--base-tertiary);
2618
+ color: var(--text-tertiary);
2224
2619
  }
2225
2620
 
2226
- .pr-xs {
2227
- padding-right: var(--spacing-xs);
2621
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
2622
+ [data-size="md"],
2623
+ [data-size="sm"]
2624
+ )
2625
+ .leaf-tab {
2626
+ background-color: transparent;
2228
2627
  }
2229
2628
 
2230
- .pr-s {
2231
- padding-right: var(--spacing-s);
2629
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
2630
+ [data-size="md"],
2631
+ [data-size="sm"]
2632
+ )
2633
+ .leaf-tab[aria-selected="true"] {
2634
+ background-color: var(--base-tertiary);
2635
+ color: var(--text-primary);
2232
2636
  }
2233
2637
 
2234
- .pr-m {
2235
- padding-right: var(--spacing-m);
2638
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
2639
+ [data-size="md"],
2640
+ [data-size="sm"]
2641
+ )
2642
+ .leaf-tab:disabled,
2643
+ .leaf-tabs:is(:not([data-variant]), [data-variant="subcontent"]):is(
2644
+ [data-size="md"],
2645
+ [data-size="sm"]
2646
+ )
2647
+ .leaf-tab[aria-disabled="true"] {
2648
+ background-color: transparent;
2649
+ color: var(--text-tertiary);
2236
2650
  }
2237
2651
 
2238
- .pr-l {
2239
- padding-right: var(--spacing-l);
2240
- }
2652
+ /* ── Title (underline) ───────────────────────────────────────────────── */
2241
2653
 
2242
- .pr-xl {
2243
- padding-right: var(--spacing-xl);
2654
+ .leaf-tabs[data-variant="title"] .leaf-tab {
2655
+ flex-direction: column;
2656
+ gap: 4px;
2657
+ min-width: 100px;
2658
+ color: var(--text-secondary);
2659
+ font-size: var(--body-4-size);
2660
+ line-height: var(--body-4-line-height);
2661
+ font-weight: var(--body-4-weight);
2244
2662
  }
2245
2663
 
2246
- .pr-2xl {
2247
- padding-right: var(--spacing-2xl);
2664
+ .leaf-tabs[data-variant="title"] .leaf-tab[aria-selected="true"] {
2665
+ color: var(--text-primary);
2666
+ font-weight: var(--body-4-highlight-weight);
2248
2667
  }
2249
2668
 
2250
- .pr-3xl {
2251
- padding-right: var(--spacing-3xl);
2669
+ .leaf-tabs[data-variant="title"] .leaf-tab::after {
2670
+ content: "";
2671
+ display: block;
2672
+ width: 100%;
2673
+ height: 2px;
2674
+ background-color: var(--text-primary);
2675
+ opacity: 0;
2252
2676
  }
2253
2677
 
2254
- .pr-4xl {
2255
- padding-right: var(--spacing-4xl);
2678
+ .leaf-tabs[data-variant="title"] .leaf-tab[aria-selected="true"]::after {
2679
+ opacity: 1;
2256
2680
  }
2257
2681
 
2258
- .pr-5xl {
2259
- padding-right: var(--spacing-5xl);
2682
+ .leaf-tabs[data-variant="title"] .leaf-tab:disabled,
2683
+ .leaf-tabs[data-variant="title"] .leaf-tab[aria-disabled="true"] {
2684
+ color: var(--text-tertiary);
2260
2685
  }
2261
2686
 
2262
- .pr-6xl {
2263
- padding-right: var(--spacing-6xl);
2687
+ .leaf-tabs[data-variant="title"] .leaf-tab:disabled::after,
2688
+ .leaf-tabs[data-variant="title"] .leaf-tab[aria-disabled="true"]::after {
2689
+ opacity: 0;
2264
2690
  }
2265
2691
 
2266
- .pr-7xl {
2267
- padding-right: var(--spacing-7xl);
2268
- }
2692
+ /* ── Functional ──────────────────────────────────────────────────────── */
2269
2693
 
2270
- .pb-0 {
2271
- padding-bottom: var(--spacing-0);
2694
+ .leaf-tabs[data-variant="functional"] .leaf-tab {
2695
+ height: 24px;
2696
+ min-width: 100px;
2697
+ padding: 4px 24px;
2698
+ border-radius: 100px;
2699
+ background-color: var(--base-tertiary);
2700
+ color: var(--button-disabled-content);
2701
+ font-size: var(--body-5-size);
2702
+ line-height: var(--body-5-line-height);
2703
+ font-weight: var(--body-5-weight);
2272
2704
  }
2273
2705
 
2274
- .pb-xs {
2275
- padding-bottom: var(--spacing-xs);
2706
+ .leaf-tabs[data-variant="functional"] .leaf-tab[aria-selected="true"] {
2707
+ background-color: var(--button-base-primary);
2708
+ color: var(--button-content-primary);
2276
2709
  }
2277
2710
 
2278
- .pb-s {
2279
- padding-bottom: var(--spacing-s);
2711
+ .leaf-tabs[data-variant="functional"] .leaf-tab:disabled,
2712
+ .leaf-tabs[data-variant="functional"] .leaf-tab[aria-disabled="true"] {
2713
+ background-color: var(--base-tertiary);
2714
+ color: var(--button-disabled-content);
2280
2715
  }
2281
2716
 
2282
- .pb-m {
2283
- padding-bottom: var(--spacing-m);
2284
- }
2717
+ /* ── Buy / Sell ──────────────────────────────────────────────────────── */
2285
2718
 
2286
- .pb-l {
2287
- padding-bottom: var(--spacing-l);
2719
+ .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab {
2720
+ min-width: 100px;
2721
+ width: auto;
2722
+ padding: 6px 4px;
2723
+ border-radius: 100px;
2724
+ color: var(--text-primary);
2725
+ font-size: var(--body-5-size);
2726
+ line-height: var(--body-5-line-height);
2727
+ font-weight: var(--body-5-weight);
2288
2728
  }
2289
2729
 
2290
- .pb-xl {
2291
- padding-bottom: var(--spacing-xl);
2730
+ .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab[aria-selected="true"] {
2731
+ font-weight: var(--body-5-highlight-weight);
2292
2732
  }
2293
2733
 
2294
- .pb-2xl {
2295
- padding-bottom: var(--spacing-2xl);
2734
+ .leaf-tabs[data-variant="buy"] .leaf-tab[aria-selected="true"] {
2735
+ background-color: var(--button-base-secondary);
2736
+ color: var(--text-highlight);
2296
2737
  }
2297
2738
 
2298
- .pb-3xl {
2299
- padding-bottom: var(--spacing-3xl);
2739
+ .leaf-tabs[data-variant="sell"] .leaf-tab[aria-selected="true"] {
2740
+ background-color: var(--button-base-secondary-destruction);
2741
+ color: var(--button-base-destruction);
2300
2742
  }
2301
2743
 
2302
- .pb-4xl {
2303
- padding-bottom: var(--spacing-4xl);
2744
+ .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab:disabled,
2745
+ .leaf-tabs:is([data-variant="buy"], [data-variant="sell"]) .leaf-tab[aria-disabled="true"] {
2746
+ color: var(--text-tertiary);
2747
+ background-color: transparent;
2304
2748
  }
2749
+ }
2305
2750
 
2306
- .pb-5xl {
2307
- padding-bottom: var(--spacing-5xl);
2308
- }
2751
+ /* --- src/components/Toast/toast.css --- */
2309
2752
 
2310
- .pb-6xl {
2311
- padding-bottom: var(--spacing-6xl);
2312
- }
2753
+ /*
2754
+ * Toast — thông báo ngắn góc màn hình.
2755
+ *
2756
+ * Status qua data-status: success (viền / icon / progress --text-highlight, nền
2757
+ * --system-green-secondary) · error (--system-red / --system-red-secondary) · warning
2758
+ * (--system-yellow / --system-yellow-secondary). Thiếu attribute → success.
2759
+ *
2760
+ * Nền thang 800 ở cả hai theme → toast gắn sẵn `data-theme="dark"` để chữ giữ màu sáng.
2761
+ * Thời gian tự đóng = animation của thanh progress (--leaf-toast-duration), dừng khi
2762
+ * hover / focus; hết animation thì JS đóng toast. data-state="closing" chạy hiệu ứng ra.
2763
+ */
2313
2764
 
2314
- .pb-7xl {
2315
- padding-bottom: var(--spacing-7xl);
2316
- }
2765
+ @layer components {
2766
+ .leaf-toaster {
2767
+ --leaf-toast-enter-x: 24px;
2768
+ --leaf-toast-enter-y: 0px;
2317
2769
 
2318
- .pl-0 {
2319
- padding-left: var(--spacing-0);
2770
+ position: fixed;
2771
+ top: 16px;
2772
+ right: 16px;
2773
+ z-index: var(--leaf-z-toast, 120);
2774
+ display: flex;
2775
+ flex-direction: column;
2776
+ align-items: flex-end;
2777
+ gap: 8px;
2778
+ max-width: calc(100vw - 32px);
2779
+ margin: 0;
2780
+ padding: 0;
2781
+ pointer-events: none;
2320
2782
  }
2321
2783
 
2322
- .pl-xs {
2323
- padding-left: var(--spacing-xs);
2784
+ .leaf-toaster[data-position="top-left"],
2785
+ .leaf-toaster[data-position="bottom-left"] {
2786
+ --leaf-toast-enter-x: -24px;
2787
+ right: auto;
2788
+ left: 16px;
2789
+ align-items: flex-start;
2324
2790
  }
2325
2791
 
2326
- .pl-s {
2327
- padding-left: var(--spacing-s);
2792
+ .leaf-toaster[data-position="top-center"],
2793
+ .leaf-toaster[data-position="bottom-center"] {
2794
+ --leaf-toast-enter-x: 0px;
2795
+ --leaf-toast-enter-y: -12px;
2796
+ right: auto;
2797
+ left: 50%;
2798
+ align-items: center;
2799
+ transform: translateX(-50%);
2328
2800
  }
2329
2801
 
2330
- .pl-m {
2331
- padding-left: var(--spacing-m);
2802
+ .leaf-toaster[data-position^="bottom"] {
2803
+ top: auto;
2804
+ bottom: 16px;
2332
2805
  }
2333
2806
 
2334
- .pl-l {
2335
- padding-left: var(--spacing-l);
2807
+ .leaf-toaster[data-position="bottom-center"] {
2808
+ --leaf-toast-enter-y: 12px;
2336
2809
  }
2337
2810
 
2338
- .pl-xl {
2339
- padding-left: var(--spacing-xl);
2811
+ .leaf-toaster > .leaf-toast {
2812
+ pointer-events: auto;
2340
2813
  }
2341
2814
 
2342
- .pl-2xl {
2343
- padding-left: var(--spacing-2xl);
2344
- }
2815
+ .leaf-toast {
2816
+ --leaf-toast-accent: var(--text-highlight);
2817
+ --leaf-toast-surface: var(--system-green-secondary);
2345
2818
 
2346
- .pl-3xl {
2347
- padding-left: var(--spacing-3xl);
2819
+ position: relative;
2820
+ display: flex;
2821
+ align-items: center;
2822
+ gap: 8px;
2823
+ width: 320px;
2824
+ max-width: 100%;
2825
+ margin: 0;
2826
+ padding: 12px;
2827
+ box-sizing: border-box;
2828
+ overflow: hidden;
2829
+ border: 1px solid var(--leaf-toast-accent);
2830
+ border-radius: 12px;
2831
+ background-color: var(--leaf-toast-surface);
2832
+ box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--overlay) 30%, transparent);
2833
+ color: var(--text-primary);
2834
+ font-family: var(--font-sans);
2835
+ animation: leaf-toast-in 300ms ease-out;
2348
2836
  }
2349
2837
 
2350
- .pl-4xl {
2351
- padding-left: var(--spacing-4xl);
2838
+ .leaf-toast[data-status="error"] {
2839
+ --leaf-toast-accent: var(--system-red);
2840
+ --leaf-toast-surface: var(--system-red-secondary);
2352
2841
  }
2353
2842
 
2354
- .pl-5xl {
2355
- padding-left: var(--spacing-5xl);
2843
+ .leaf-toast[data-status="warning"] {
2844
+ --leaf-toast-accent: var(--system-yellow);
2845
+ --leaf-toast-surface: var(--system-yellow-secondary);
2356
2846
  }
2357
2847
 
2358
- .pl-6xl {
2359
- padding-left: var(--spacing-6xl);
2848
+ .leaf-toast[data-state="closing"] {
2849
+ animation: leaf-toast-out 300ms ease-in forwards;
2850
+ pointer-events: none;
2360
2851
  }
2361
2852
 
2362
- .pl-7xl {
2363
- padding-left: var(--spacing-7xl);
2853
+ .leaf-toaster[hidden],
2854
+ .leaf-toast[hidden],
2855
+ .leaf-toast__icon[hidden],
2856
+ .leaf-toast__content[hidden],
2857
+ .leaf-toast__close[hidden],
2858
+ .leaf-toast__glyph[hidden],
2859
+ .leaf-toast__progress[hidden],
2860
+ .leaf-toast__progress-bar[hidden] {
2861
+ display: none;
2364
2862
  }
2365
2863
 
2366
- /* Margin */
2367
-
2368
- .m-0 {
2369
- margin: var(--spacing-0);
2864
+ .leaf-toast__icon {
2865
+ display: inline-flex;
2866
+ flex-shrink: 0;
2867
+ align-items: center;
2868
+ justify-content: center;
2869
+ padding: 6px;
2870
+ border-radius: 9999px;
2871
+ background-color: var(--leaf-toast-accent);
2872
+ color: var(--text-primary);
2370
2873
  }
2371
2874
 
2372
- .m-xs {
2373
- margin: var(--spacing-xs);
2875
+ .leaf-toast__glyph {
2876
+ display: block;
2877
+ width: 14px;
2878
+ height: 14px;
2374
2879
  }
2375
2880
 
2376
- .m-s {
2377
- margin: var(--spacing-s);
2881
+ .leaf-toast__content {
2882
+ display: flex;
2883
+ flex: 1 1 auto;
2884
+ flex-direction: column;
2885
+ min-width: 0;
2378
2886
  }
2379
2887
 
2380
- .m-m {
2381
- margin: var(--spacing-m);
2888
+ .leaf-toast__title,
2889
+ .leaf-toast__description {
2890
+ margin: 0;
2891
+ color: var(--text-primary);
2892
+ overflow-wrap: anywhere;
2382
2893
  }
2383
2894
 
2384
- .m-l {
2385
- margin: var(--spacing-l);
2895
+ .leaf-toast__title {
2896
+ font-size: var(--body-3-size);
2897
+ line-height: var(--body-3-line-height);
2898
+ font-weight: var(--body-3-highlight-weight);
2386
2899
  }
2387
2900
 
2388
- .m-xl {
2389
- margin: var(--spacing-xl);
2901
+ .leaf-toast__description {
2902
+ font-size: var(--body-4-size);
2903
+ line-height: var(--body-4-line-height);
2904
+ font-weight: var(--body-4-weight);
2390
2905
  }
2391
2906
 
2392
- .m-2xl {
2393
- margin: var(--spacing-2xl);
2907
+ .leaf-toast__close {
2908
+ display: inline-flex;
2909
+ flex-shrink: 0;
2910
+ align-items: center;
2911
+ justify-content: center;
2912
+ margin: 0;
2913
+ padding: 0;
2914
+ border: none;
2915
+ border-radius: 4px;
2916
+ background: transparent;
2917
+ color: var(--text-primary);
2918
+ font: inherit;
2919
+ cursor: pointer;
2920
+ appearance: none;
2394
2921
  }
2395
2922
 
2396
- .m-3xl {
2397
- margin: var(--spacing-3xl);
2923
+ .leaf-toast__close:focus-visible {
2924
+ outline: 2px solid var(--leaf-toast-accent);
2925
+ outline-offset: 2px;
2398
2926
  }
2399
2927
 
2400
- .m-4xl {
2401
- margin: var(--spacing-4xl);
2928
+ .leaf-toast__progress {
2929
+ position: absolute;
2930
+ bottom: 0;
2931
+ left: 0;
2932
+ width: 100%;
2933
+ height: 4px;
2934
+ background-color: color-mix(in srgb, var(--text-primary) 10%, transparent);
2402
2935
  }
2403
2936
 
2404
- .m-5xl {
2405
- margin: var(--spacing-5xl);
2937
+ .leaf-toast__progress-bar {
2938
+ width: 100%;
2939
+ height: 100%;
2940
+ background-color: var(--leaf-toast-accent);
2941
+ transform-origin: left center;
2942
+ animation: leaf-toast-progress var(--leaf-toast-duration, 4000ms) linear forwards;
2406
2943
  }
2407
2944
 
2408
- .m-6xl {
2409
- margin: var(--spacing-6xl);
2945
+ .leaf-toast:is(:hover, :focus-within) .leaf-toast__progress-bar,
2946
+ .leaf-toast[data-state="closing"] .leaf-toast__progress-bar {
2947
+ animation-play-state: paused;
2410
2948
  }
2411
2949
 
2412
- .m-7xl {
2413
- margin: var(--spacing-7xl);
2950
+ @keyframes leaf-toast-in {
2951
+ from {
2952
+ opacity: 0;
2953
+ transform: translate(var(--leaf-toast-enter-x, 24px), var(--leaf-toast-enter-y, 0px));
2954
+ }
2414
2955
  }
2415
2956
 
2416
- .mx-0 {
2417
- margin-inline: var(--spacing-0);
2957
+ @keyframes leaf-toast-out {
2958
+ to {
2959
+ opacity: 0;
2960
+ transform: translate(var(--leaf-toast-enter-x, 24px), var(--leaf-toast-enter-y, 0px));
2961
+ }
2418
2962
  }
2419
2963
 
2420
- .mx-xs {
2421
- margin-inline: var(--spacing-xs);
2964
+ @keyframes leaf-toast-progress {
2965
+ from {
2966
+ transform: scaleX(1);
2967
+ }
2968
+ to {
2969
+ transform: scaleX(0);
2970
+ }
2422
2971
  }
2423
2972
 
2424
- .mx-s {
2425
- margin-inline: var(--spacing-s);
2973
+ /* Giảm chuyển động: chỉ mờ dần, không trượt. Progress vẫn chạy vì nó là bộ đếm giờ. */
2974
+ @media (prefers-reduced-motion: reduce) {
2975
+ .leaf-toaster,
2976
+ .leaf-toast {
2977
+ --leaf-toast-enter-x: 0px;
2978
+ --leaf-toast-enter-y: 0px;
2979
+ }
2426
2980
  }
2981
+ }
2427
2982
 
2428
- .mx-m {
2429
- margin-inline: var(--spacing-m);
2430
- }
2983
+ /* --- src/components/Toggle/toggle.css --- */
2431
2984
 
2432
- .mx-l {
2433
- margin-inline: var(--spacing-l);
2434
- }
2985
+ /*
2986
+ * Toggle — Figma 730:12438.
2987
+ *
2988
+ * Size M/S qua data-size; Status On/Off qua aria-checked; Active Off qua
2989
+ * :disabled. Thumb trượt bằng transform. Checkmark chỉ hiện ở size sm khi
2990
+ * On + Active. Thiếu attribute → md · off · enabled.
2991
+ */
2435
2992
 
2436
- .mx-xl {
2437
- margin-inline: var(--spacing-xl);
2438
- }
2993
+ @layer components {
2994
+ .leaf-toggle {
2995
+ --leaf-toggle-width: 48px;
2996
+ --leaf-toggle-height: 24px;
2997
+ --leaf-toggle-padding: 3px;
2998
+ --leaf-toggle-thumb: 18px;
2999
+ --leaf-toggle-travel: calc(
3000
+ var(--leaf-toggle-width) - var(--leaf-toggle-padding) * 2 - var(--leaf-toggle-thumb)
3001
+ );
2439
3002
 
2440
- .mx-2xl {
2441
- margin-inline: var(--spacing-2xl);
3003
+ position: relative;
3004
+ display: inline-flex;
3005
+ flex-shrink: 0;
3006
+ align-items: center;
3007
+ vertical-align: middle;
3008
+ box-sizing: border-box;
3009
+ width: var(--leaf-toggle-width);
3010
+ height: var(--leaf-toggle-height);
3011
+ margin: 0;
3012
+ padding: var(--leaf-toggle-padding);
3013
+ border: none;
3014
+ border-radius: 12px;
3015
+ background-color: var(--base-quaternary);
3016
+ cursor: pointer;
3017
+ appearance: none;
3018
+ -webkit-appearance: none;
3019
+ font: inherit;
3020
+ color: inherit;
3021
+ transition: background-color 0.2s ease;
2442
3022
  }
2443
3023
 
2444
- .mx-3xl {
2445
- margin-inline: var(--spacing-3xl);
3024
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
3025
+ .leaf-toggle[hidden],
3026
+ .leaf-toggle__thumb[hidden] {
3027
+ display: none;
2446
3028
  }
2447
3029
 
2448
- .mx-4xl {
2449
- margin-inline: var(--spacing-4xl);
3030
+ .leaf-toggle__thumb {
3031
+ display: flex;
3032
+ align-items: center;
3033
+ justify-content: center;
3034
+ width: var(--leaf-toggle-thumb);
3035
+ height: var(--leaf-toggle-thumb);
3036
+ border-radius: 100px;
3037
+ background-color: var(--text-secondary);
3038
+ transform: translateX(0);
3039
+ transition:
3040
+ transform 0.2s ease,
3041
+ background-color 0.2s ease;
2450
3042
  }
2451
3043
 
2452
- .mx-5xl {
2453
- margin-inline: var(--spacing-5xl);
3044
+ .leaf-toggle__check {
3045
+ display: none;
3046
+ width: 60%;
3047
+ height: 60%;
3048
+ color: var(--system-green);
2454
3049
  }
2455
3050
 
2456
- .mx-6xl {
2457
- margin-inline: var(--spacing-6xl);
3051
+ /* Status On + Active — track xanh, thumb trắng, trượt phải. */
3052
+ .leaf-toggle[aria-checked="true"]:not(:disabled) {
3053
+ background-color: var(--system-green);
2458
3054
  }
2459
3055
 
2460
- .mx-7xl {
2461
- margin-inline: var(--spacing-7xl);
3056
+ .leaf-toggle[aria-checked="true"]:not(:disabled) .leaf-toggle__thumb {
3057
+ background-color: var(--icon-on-color);
3058
+ transform: translateX(var(--leaf-toggle-travel));
2462
3059
  }
2463
3060
 
2464
- .my-0 {
2465
- margin-block: var(--spacing-0);
3061
+ /* Status On + Active Off (disabled on) — track quaternary, thumb tertiary, vẫn bên phải. */
3062
+ .leaf-toggle[aria-checked="true"]:disabled .leaf-toggle__thumb {
3063
+ background-color: var(--text-tertiary);
3064
+ transform: translateX(var(--leaf-toggle-travel));
2466
3065
  }
2467
3066
 
2468
- .my-xs {
2469
- margin-block: var(--spacing-xs);
3067
+ /* Status Off + Active Off — thumb tertiary, bên trái. */
3068
+ .leaf-toggle:disabled:not([aria-checked="true"]) .leaf-toggle__thumb {
3069
+ background-color: var(--text-tertiary);
2470
3070
  }
2471
3071
 
2472
- .my-s {
2473
- margin-block: var(--spacing-s);
3072
+ /* Size S */
3073
+ .leaf-toggle[data-size="sm"] {
3074
+ --leaf-toggle-width: 32px;
3075
+ --leaf-toggle-height: 16px;
3076
+ --leaf-toggle-thumb: 10px;
2474
3077
  }
2475
3078
 
2476
- .my-m {
2477
- margin-block: var(--spacing-m);
3079
+ /* Checkmark chỉ ở S · On · Active. */
3080
+ .leaf-toggle[data-size="sm"][aria-checked="true"]:not(:disabled) .leaf-toggle__check {
3081
+ display: block;
2478
3082
  }
2479
3083
 
2480
- .my-l {
2481
- margin-block: var(--spacing-l);
3084
+ .leaf-toggle:disabled {
3085
+ cursor: not-allowed;
2482
3086
  }
2483
3087
 
2484
- .my-xl {
2485
- margin-block: var(--spacing-xl);
3088
+ .leaf-toggle:focus-visible {
3089
+ outline: 2px solid var(--system-green);
3090
+ outline-offset: 2px;
2486
3091
  }
3092
+ }
2487
3093
 
2488
- .my-2xl {
2489
- margin-block: var(--spacing-2xl);
2490
- }
3094
+ /* --- src/components/Tooltip/tooltip.css --- */
2491
3095
 
2492
- .my-3xl {
2493
- margin-block: var(--spacing-3xl);
2494
- }
3096
+ /*
3097
+ * Tooltip — Figma 891:4983.
3098
+ *
3099
+ * Size sm/md/lg; position top/bottom/left/right; align start/center/end.
3100
+ * Nền --base-quaternary; chữ --text-primary.
3101
+ *
3102
+ * Caret Figma: khung hit-area rộng (40×4 / 44×6 / 16×4) nhưng tam giác thật
3103
+ * chỉ 8×4 (sm) hoặc 12×6 (md/lg) nằm giữa khung — không vẽ full-width.
3104
+ */
2495
3105
 
2496
- .my-4xl {
2497
- margin-block: var(--spacing-4xl);
2498
- }
3106
+ @layer components {
3107
+ .leaf-tooltip {
3108
+ --leaf-tooltip-pad-y: 8px;
3109
+ --leaf-tooltip-pad-x: 16px;
3110
+ --leaf-tooltip-radius: 8px;
3111
+ --leaf-tooltip-max-width: 176px;
3112
+ --leaf-tooltip-font-size: var(--body-4-size);
3113
+ --leaf-tooltip-line-height: var(--body-4-line-height);
3114
+ --leaf-tooltip-font-weight: var(--body-4-weight);
3115
+ /* Khung caret dọc theo cạnh (top/bottom). */
3116
+ --leaf-tooltip-caret-w: 44px;
3117
+ --leaf-tooltip-caret-h: 6px;
3118
+ /* Chiều rộng tam giác thật trong khung. */
3119
+ --leaf-tooltip-caret-tip: 12px;
2499
3120
 
2500
- .my-5xl {
2501
- margin-block: var(--spacing-5xl);
3121
+ display: inline-flex;
3122
+ flex-direction: column;
3123
+ align-items: center;
3124
+ max-width: var(--leaf-tooltip-max-width);
3125
+ box-sizing: border-box;
3126
+ font-family: var(--font-sans);
3127
+ font-size: var(--leaf-tooltip-font-size);
3128
+ line-height: var(--leaf-tooltip-line-height);
3129
+ font-weight: var(--leaf-tooltip-font-weight);
3130
+ color: var(--text-primary);
3131
+ pointer-events: none;
2502
3132
  }
2503
3133
 
2504
- .my-6xl {
2505
- margin-block: var(--spacing-6xl);
3134
+ .leaf-tooltip-trigger {
3135
+ position: relative;
3136
+ display: inline-flex;
3137
+ max-width: 100%;
3138
+ vertical-align: middle;
2506
3139
  }
2507
3140
 
2508
- .my-7xl {
2509
- margin-block: var(--spacing-7xl);
3141
+ .leaf-tooltip--portal {
3142
+ position: fixed;
3143
+ z-index: var(--leaf-z-tooltip, 110);
2510
3144
  }
2511
3145
 
2512
- .mt-0 {
2513
- margin-top: var(--spacing-0);
3146
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
3147
+ .leaf-tooltip-trigger[hidden],
3148
+ .leaf-tooltip[hidden],
3149
+ .leaf-tooltip__caret[hidden] {
3150
+ display: none;
2514
3151
  }
2515
3152
 
2516
- .mt-xs {
2517
- margin-top: var(--spacing-xs);
3153
+ .leaf-tooltip__body {
3154
+ position: relative;
3155
+ z-index: 10;
3156
+ max-width: 100%;
3157
+ text-align: left;
3158
+ box-sizing: border-box;
3159
+ padding: var(--leaf-tooltip-pad-y) var(--leaf-tooltip-pad-x);
3160
+ border-radius: var(--leaf-tooltip-radius);
3161
+ background-color: var(--base-quaternary);
3162
+ word-break: break-word;
2518
3163
  }
2519
3164
 
2520
- .mt-s {
2521
- margin-top: var(--spacing-s);
3165
+ /*
3166
+ * Caret = khung trong suốt + ::before là tam giác nhỏ ở giữa (đúng SVG Figma).
3167
+ * Mặc định: mũi nhọn xuống (position=top — caret dưới body).
3168
+ */
3169
+ .leaf-tooltip__caret {
3170
+ position: relative;
3171
+ display: block;
3172
+ flex-shrink: 0;
3173
+ width: var(--leaf-tooltip-caret-w);
3174
+ height: var(--leaf-tooltip-caret-h);
3175
+ background-color: transparent;
2522
3176
  }
2523
3177
 
2524
- .mt-m {
2525
- margin-top: var(--spacing-m);
3178
+ .leaf-tooltip__caret::before {
3179
+ content: "";
3180
+ position: absolute;
3181
+ top: 0;
3182
+ left: 50%;
3183
+ width: var(--leaf-tooltip-caret-tip);
3184
+ height: 100%;
3185
+ background-color: var(--base-quaternary);
3186
+ transform: translateX(-50%);
3187
+ clip-path: polygon(0 0, 100% 0, 50% 100%);
2526
3188
  }
2527
3189
 
2528
- .mt-l {
2529
- margin-top: var(--spacing-l);
2530
- }
3190
+ /* ── Size ────────────────────────────────────────────────────────────── */
2531
3191
 
2532
- .mt-xl {
2533
- margin-top: var(--spacing-xl);
3192
+ .leaf-tooltip[data-size="sm"] {
3193
+ --leaf-tooltip-pad-y: 2px;
3194
+ --leaf-tooltip-pad-x: 16px;
3195
+ --leaf-tooltip-radius: 4px;
3196
+ --leaf-tooltip-max-width: 208px;
3197
+ --leaf-tooltip-font-size: var(--body-5-size);
3198
+ --leaf-tooltip-line-height: var(--body-5-line-height);
3199
+ --leaf-tooltip-font-weight: var(--body-5-weight);
3200
+ --leaf-tooltip-caret-w: 40px;
3201
+ --leaf-tooltip-caret-h: 4px;
3202
+ --leaf-tooltip-caret-tip: 8px;
3203
+ min-width: 64px;
2534
3204
  }
2535
3205
 
2536
- .mt-2xl {
2537
- margin-top: var(--spacing-2xl);
3206
+ .leaf-tooltip[data-size="lg"] {
3207
+ --leaf-tooltip-pad-y: 16px;
3208
+ --leaf-tooltip-pad-x: 16px;
3209
+ --leaf-tooltip-radius: 12px;
3210
+ --leaf-tooltip-max-width: 288px;
3211
+ --leaf-tooltip-font-size: var(--body-3-size);
3212
+ --leaf-tooltip-line-height: var(--body-3-line-height);
3213
+ --leaf-tooltip-font-weight: var(--body-3-weight);
3214
+ --leaf-tooltip-caret-w: 44px;
3215
+ --leaf-tooltip-caret-h: 6px;
3216
+ --leaf-tooltip-caret-tip: 12px;
2538
3217
  }
2539
3218
 
2540
- .mt-3xl {
2541
- margin-top: var(--spacing-3xl);
3219
+ /* Sm left/right: khung caret 16×4 (Figma), không dùng 40×4 của top/bottom. */
3220
+ .leaf-tooltip[data-size="sm"][data-position="left"],
3221
+ .leaf-tooltip[data-size="sm"][data-position="right"] {
3222
+ --leaf-tooltip-caret-w: 16px;
2542
3223
  }
2543
3224
 
2544
- .mt-4xl {
2545
- margin-top: var(--spacing-4xl);
2546
- }
3225
+ /* ── Position ────────────────────────────────────────────────────────── */
2547
3226
 
2548
- .mt-5xl {
2549
- margin-top: var(--spacing-5xl);
3227
+ /*
3228
+ * Vị trí caret theo data-position (không theo thứ tự DOM): markup vẫn đặt caret
3229
+ * đúng phía nên kết quả không đổi, nhưng khi bubble tự lật phía (thiếu chỗ) thì
3230
+ * chỉ cần đổi data-position là caret sang phía đối diện.
3231
+ */
3232
+ .leaf-tooltip:is(:not([data-position]), [data-position="top"], [data-position="left"])
3233
+ > .leaf-tooltip__caret {
3234
+ order: 1;
2550
3235
  }
2551
3236
 
2552
- .mt-6xl {
2553
- margin-top: var(--spacing-6xl);
3237
+ .leaf-tooltip:is([data-position="bottom"], [data-position="right"]) > .leaf-tooltip__caret {
3238
+ order: -1;
2554
3239
  }
2555
3240
 
2556
- .mt-7xl {
2557
- margin-top: var(--spacing-7xl);
3241
+ .leaf-tooltip[data-position="bottom"] {
3242
+ flex-direction: column;
2558
3243
  }
2559
3244
 
2560
- .mr-0 {
2561
- margin-right: var(--spacing-0);
3245
+ .leaf-tooltip[data-position="bottom"] .leaf-tooltip__caret::before {
3246
+ clip-path: polygon(50% 0, 0 100%, 100% 100%);
2562
3247
  }
2563
3248
 
2564
- .mr-xs {
2565
- margin-right: var(--spacing-xs);
3249
+ .leaf-tooltip[data-position="left"] {
3250
+ flex-direction: row;
3251
+ align-items: center;
2566
3252
  }
2567
3253
 
2568
- .mr-s {
2569
- margin-right: var(--spacing-s);
3254
+ .leaf-tooltip[data-position="left"] .leaf-tooltip__caret {
3255
+ width: var(--leaf-tooltip-caret-h);
3256
+ height: var(--leaf-tooltip-caret-w);
2570
3257
  }
2571
3258
 
2572
- .mr-m {
2573
- margin-right: var(--spacing-m);
3259
+ .leaf-tooltip[data-position="left"] .leaf-tooltip__caret::before {
3260
+ top: 50%;
3261
+ left: 0;
3262
+ width: 100%;
3263
+ height: var(--leaf-tooltip-caret-tip);
3264
+ transform: translateY(-50%);
3265
+ clip-path: polygon(0 0, 100% 50%, 0 100%);
2574
3266
  }
2575
3267
 
2576
- .mr-l {
2577
- margin-right: var(--spacing-l);
3268
+ .leaf-tooltip[data-position="right"] {
3269
+ flex-direction: row;
3270
+ align-items: center;
2578
3271
  }
2579
3272
 
2580
- .mr-xl {
2581
- margin-right: var(--spacing-xl);
3273
+ .leaf-tooltip[data-position="right"] .leaf-tooltip__caret {
3274
+ width: var(--leaf-tooltip-caret-h);
3275
+ height: var(--leaf-tooltip-caret-w);
2582
3276
  }
2583
3277
 
2584
- .mr-2xl {
2585
- margin-right: var(--spacing-2xl);
3278
+ .leaf-tooltip[data-position="right"] .leaf-tooltip__caret::before {
3279
+ top: 50%;
3280
+ left: 0;
3281
+ width: 100%;
3282
+ height: var(--leaf-tooltip-caret-tip);
3283
+ transform: translateY(-50%);
3284
+ clip-path: polygon(100% 0, 0 50%, 100% 100%);
2586
3285
  }
2587
3286
 
2588
- .mr-3xl {
2589
- margin-right: var(--spacing-3xl);
2590
- }
3287
+ /* ── Align (caret trên Top/Bottom) ───────────────────────────────────── */
2591
3288
 
2592
- .mr-4xl {
2593
- margin-right: var(--spacing-4xl);
3289
+ .leaf-tooltip[data-position="top"][data-align="start"],
3290
+ .leaf-tooltip[data-position="bottom"][data-align="start"] {
3291
+ align-items: flex-start;
2594
3292
  }
2595
3293
 
2596
- .mr-5xl {
2597
- margin-right: var(--spacing-5xl);
3294
+ .leaf-tooltip[data-position="top"][data-align="end"],
3295
+ .leaf-tooltip[data-position="bottom"][data-align="end"] {
3296
+ align-items: flex-end;
2598
3297
  }
2599
3298
 
2600
- .mr-6xl {
2601
- margin-right: var(--spacing-6xl);
3299
+ .leaf-tooltip[data-position="top"][data-align="center"],
3300
+ .leaf-tooltip[data-position="bottom"][data-align="center"] {
3301
+ align-items: center;
2602
3302
  }
3303
+ }
2603
3304
 
2604
- .mr-7xl {
2605
- margin-right: var(--spacing-7xl);
2606
- }
3305
+ /* --- src/styles/color.css --- */
2607
3306
 
2608
- .mb-0 {
2609
- margin-bottom: var(--spacing-0);
2610
- }
3307
+ /*
3308
+ * Color classes — map 1:1 sang semantic token trong @finhay/leaf-tokens.
3309
+ *
3310
+ * Quy tắc tên: **tiền tố nói thuộc tính, phần sau nói vai trò của token**.
3311
+ *
3312
+ * text-* → color (text-primary, text-red)
3313
+ * bg-* → background-color (bg-primary, bg-red) — token vẫn là --base-*
3314
+ * border-* → border-color (border-primary, border-red)
3315
+ *
3316
+ * Ba bộ dùng chung một hậu tố nên đọc là đoán được: `text-red` / `bg-red` /
3317
+ * `border-red`, `text-primary` / `bg-primary` / `border-primary`. Nhóm system
3318
+ * bỏ chữ `system` trong tên class (token vẫn là `--system-red`), còn `border-*`
3319
+ * lấy màu từ thang base vì viền luôn là màu bề mặt. Secondary của system giữ
3320
+ * hậu tố `-secondary` (vd. `text-red-secondary` ↔ `--system-red-secondary`).
3321
+ *
3322
+ * Mỗi class chỉ set đúng 1 thuộc tính (color / background-color / border-color)
3323
+ * — độ dày / style viền do app khai báo (Tailwind `border`, hoặc CSS của page).
3324
+ * Class tự đổi giá trị theo `[data-theme="light"]` vì nó trỏ vào var, không hard-code màu.
3325
+ *
3326
+ * Chỉ semantic token mới có class. Primitive (--neutral-500, --brand-300…) là
3327
+ * nguồn nội bộ, không dùng thẳng trong UI.
3328
+ *
3329
+ * ─ Vì sao `@layer utilities` ─────────────────────────────────────────────────
3330
+ *
3331
+ * Màu của Leaf là token gốc, trùng tên thì phải thắng. Đặt ở layer cao nhất
3332
+ * nên `.text-primary` của Leaf luôn có hiệu lực khi trùng tên.
3333
+ *
3334
+ * Biến thể trạng thái vẫn override được vì pseudo-class cộng thêm specificity.
3335
+ */
2611
3336
 
2612
- .mb-xs {
2613
- margin-bottom: var(--spacing-xs);
2614
- }
3337
+ @layer utilities {
3338
+ /* Text color — content */
2615
3339
 
2616
- .mb-s {
2617
- margin-bottom: var(--spacing-s);
3340
+ .text-highlight {
3341
+ color: var(--text-highlight);
2618
3342
  }
2619
3343
 
2620
- .mb-m {
2621
- margin-bottom: var(--spacing-m);
3344
+ .text-primary {
3345
+ color: var(--text-primary);
2622
3346
  }
2623
3347
 
2624
- .mb-l {
2625
- margin-bottom: var(--spacing-l);
3348
+ .text-secondary {
3349
+ color: var(--text-secondary);
2626
3350
  }
2627
3351
 
2628
- .mb-xl {
2629
- margin-bottom: var(--spacing-xl);
3352
+ .text-tertiary {
3353
+ color: var(--text-tertiary);
2630
3354
  }
2631
3355
 
2632
- .mb-2xl {
2633
- margin-bottom: var(--spacing-2xl);
3356
+ .text-quaternary {
3357
+ color: var(--text-quaternary);
2634
3358
  }
2635
3359
 
2636
- .mb-3xl {
2637
- margin-bottom: var(--spacing-3xl);
2638
- }
3360
+ /* Text color — system */
2639
3361
 
2640
- .mb-4xl {
2641
- margin-bottom: var(--spacing-4xl);
3362
+ .text-blue {
3363
+ color: var(--system-blue);
2642
3364
  }
2643
3365
 
2644
- .mb-5xl {
2645
- margin-bottom: var(--spacing-5xl);
3366
+ .text-green {
3367
+ color: var(--system-green);
2646
3368
  }
2647
3369
 
2648
- .mb-6xl {
2649
- margin-bottom: var(--spacing-6xl);
3370
+ .text-yellow {
3371
+ color: var(--system-yellow);
2650
3372
  }
2651
3373
 
2652
- .mb-7xl {
2653
- margin-bottom: var(--spacing-7xl);
3374
+ .text-orange {
3375
+ color: var(--system-orange);
2654
3376
  }
2655
3377
 
2656
- .ml-0 {
2657
- margin-left: var(--spacing-0);
3378
+ .text-red {
3379
+ color: var(--system-red);
2658
3380
  }
2659
3381
 
2660
- .ml-xs {
2661
- margin-left: var(--spacing-xs);
3382
+ .text-purple {
3383
+ color: var(--system-purple);
2662
3384
  }
2663
3385
 
2664
- .ml-s {
2665
- margin-left: var(--spacing-s);
3386
+ .text-blue-secondary {
3387
+ color: var(--system-blue-secondary);
2666
3388
  }
2667
3389
 
2668
- .ml-m {
2669
- margin-left: var(--spacing-m);
3390
+ .text-green-secondary {
3391
+ color: var(--system-green-secondary);
2670
3392
  }
2671
3393
 
2672
- .ml-l {
2673
- margin-left: var(--spacing-l);
3394
+ .text-yellow-secondary {
3395
+ color: var(--system-yellow-secondary);
2674
3396
  }
2675
3397
 
2676
- .ml-xl {
2677
- margin-left: var(--spacing-xl);
3398
+ .text-orange-secondary {
3399
+ color: var(--system-orange-secondary);
2678
3400
  }
2679
3401
 
2680
- .ml-2xl {
2681
- margin-left: var(--spacing-2xl);
3402
+ .text-red-secondary {
3403
+ color: var(--system-red-secondary);
2682
3404
  }
2683
3405
 
2684
- .ml-3xl {
2685
- margin-left: var(--spacing-3xl);
3406
+ .text-purple-secondary {
3407
+ color: var(--system-purple-secondary);
2686
3408
  }
2687
3409
 
2688
- .ml-4xl {
2689
- margin-left: var(--spacing-4xl);
2690
- }
3410
+ /* Background — surface (--base-*) + system */
2691
3411
 
2692
- .ml-5xl {
2693
- margin-left: var(--spacing-5xl);
3412
+ .bg-highlight {
3413
+ background-color: var(--text-highlight);
2694
3414
  }
2695
3415
 
2696
- .ml-6xl {
2697
- margin-left: var(--spacing-6xl);
3416
+ .bg-primary {
3417
+ background-color: var(--base-primary);
2698
3418
  }
2699
3419
 
2700
- .ml-7xl {
2701
- margin-left: var(--spacing-7xl);
3420
+ .bg-secondary {
3421
+ background-color: var(--base-secondary);
2702
3422
  }
2703
3423
 
2704
- /* Gap */
2705
-
2706
- .gap-0 {
2707
- gap: var(--spacing-0);
3424
+ .bg-tertiary {
3425
+ background-color: var(--base-tertiary);
2708
3426
  }
2709
3427
 
2710
- .gap-xs {
2711
- gap: var(--spacing-xs);
3428
+ .bg-quaternary {
3429
+ background-color: var(--base-quaternary);
2712
3430
  }
2713
3431
 
2714
- .gap-s {
2715
- gap: var(--spacing-s);
3432
+ .bg-quinary {
3433
+ background-color: var(--base-quinary);
2716
3434
  }
2717
3435
 
2718
- .gap-m {
2719
- gap: var(--spacing-m);
2720
- }
3436
+ /* Background — system */
2721
3437
 
2722
- .gap-l {
2723
- gap: var(--spacing-l);
3438
+ .bg-blue {
3439
+ background-color: var(--system-blue);
2724
3440
  }
2725
3441
 
2726
- .gap-xl {
2727
- gap: var(--spacing-xl);
3442
+ .bg-green {
3443
+ background-color: var(--system-green);
2728
3444
  }
2729
3445
 
2730
- .gap-2xl {
2731
- gap: var(--spacing-2xl);
3446
+ .bg-yellow {
3447
+ background-color: var(--system-yellow);
2732
3448
  }
2733
3449
 
2734
- .gap-3xl {
2735
- gap: var(--spacing-3xl);
3450
+ .bg-orange {
3451
+ background-color: var(--system-orange);
2736
3452
  }
2737
3453
 
2738
- .gap-4xl {
2739
- gap: var(--spacing-4xl);
3454
+ .bg-red {
3455
+ background-color: var(--system-red);
2740
3456
  }
2741
3457
 
2742
- .gap-5xl {
2743
- gap: var(--spacing-5xl);
3458
+ .bg-purple {
3459
+ background-color: var(--system-purple);
2744
3460
  }
2745
3461
 
2746
- .gap-6xl {
2747
- gap: var(--spacing-6xl);
3462
+ .bg-blue-secondary {
3463
+ background-color: var(--system-blue-secondary);
2748
3464
  }
2749
3465
 
2750
- .gap-7xl {
2751
- gap: var(--spacing-7xl);
3466
+ .bg-green-secondary {
3467
+ background-color: var(--system-green-secondary);
2752
3468
  }
2753
3469
 
2754
- .gap-x-0 {
2755
- column-gap: var(--spacing-0);
3470
+ .bg-yellow-secondary {
3471
+ background-color: var(--system-yellow-secondary);
2756
3472
  }
2757
3473
 
2758
- .gap-x-xs {
2759
- column-gap: var(--spacing-xs);
3474
+ .bg-orange-secondary {
3475
+ background-color: var(--system-orange-secondary);
2760
3476
  }
2761
3477
 
2762
- .gap-x-s {
2763
- column-gap: var(--spacing-s);
3478
+ .bg-red-secondary {
3479
+ background-color: var(--system-red-secondary);
2764
3480
  }
2765
3481
 
2766
- .gap-x-m {
2767
- column-gap: var(--spacing-m);
3482
+ .bg-purple-secondary {
3483
+ background-color: var(--system-purple-secondary);
2768
3484
  }
2769
3485
 
2770
- .gap-x-l {
2771
- column-gap: var(--spacing-l);
2772
- }
3486
+ /* Border color — base */
2773
3487
 
2774
- .gap-x-xl {
2775
- column-gap: var(--spacing-xl);
3488
+ .border-highlight {
3489
+ border-color: var(--text-highlight);
2776
3490
  }
2777
3491
 
2778
- .gap-x-2xl {
2779
- column-gap: var(--spacing-2xl);
3492
+ .border-primary {
3493
+ border-color: var(--base-primary);
2780
3494
  }
2781
3495
 
2782
- .gap-x-3xl {
2783
- column-gap: var(--spacing-3xl);
3496
+ .border-secondary {
3497
+ border-color: var(--base-secondary);
2784
3498
  }
2785
3499
 
2786
- .gap-x-4xl {
2787
- column-gap: var(--spacing-4xl);
3500
+ .border-tertiary {
3501
+ border-color: var(--base-tertiary);
2788
3502
  }
2789
3503
 
2790
- .gap-x-5xl {
2791
- column-gap: var(--spacing-5xl);
3504
+ .border-quaternary {
3505
+ border-color: var(--base-quaternary);
2792
3506
  }
2793
3507
 
2794
- .gap-x-6xl {
2795
- column-gap: var(--spacing-6xl);
3508
+ .border-quinary {
3509
+ border-color: var(--base-quinary);
2796
3510
  }
2797
3511
 
2798
- .gap-x-7xl {
2799
- column-gap: var(--spacing-7xl);
2800
- }
3512
+ /* Border color — system */
2801
3513
 
2802
- .gap-y-0 {
2803
- row-gap: var(--spacing-0);
3514
+ .border-blue {
3515
+ border-color: var(--system-blue);
2804
3516
  }
2805
3517
 
2806
- .gap-y-xs {
2807
- row-gap: var(--spacing-xs);
3518
+ .border-green {
3519
+ border-color: var(--system-green);
2808
3520
  }
2809
3521
 
2810
- .gap-y-s {
2811
- row-gap: var(--spacing-s);
3522
+ .border-yellow {
3523
+ border-color: var(--system-yellow);
2812
3524
  }
2813
3525
 
2814
- .gap-y-m {
2815
- row-gap: var(--spacing-m);
3526
+ .border-orange {
3527
+ border-color: var(--system-orange);
2816
3528
  }
2817
3529
 
2818
- .gap-y-l {
2819
- row-gap: var(--spacing-l);
3530
+ .border-red {
3531
+ border-color: var(--system-red);
2820
3532
  }
2821
3533
 
2822
- .gap-y-xl {
2823
- row-gap: var(--spacing-xl);
3534
+ .border-purple {
3535
+ border-color: var(--system-purple);
2824
3536
  }
2825
3537
 
2826
- .gap-y-2xl {
2827
- row-gap: var(--spacing-2xl);
3538
+ .border-blue-secondary {
3539
+ border-color: var(--system-blue-secondary);
2828
3540
  }
2829
3541
 
2830
- .gap-y-3xl {
2831
- row-gap: var(--spacing-3xl);
3542
+ .border-green-secondary {
3543
+ border-color: var(--system-green-secondary);
2832
3544
  }
2833
3545
 
2834
- .gap-y-4xl {
2835
- row-gap: var(--spacing-4xl);
3546
+ .border-yellow-secondary {
3547
+ border-color: var(--system-yellow-secondary);
2836
3548
  }
2837
3549
 
2838
- .gap-y-5xl {
2839
- row-gap: var(--spacing-5xl);
3550
+ .border-orange-secondary {
3551
+ border-color: var(--system-orange-secondary);
2840
3552
  }
2841
3553
 
2842
- .gap-y-6xl {
2843
- row-gap: var(--spacing-6xl);
3554
+ .border-red-secondary {
3555
+ border-color: var(--system-red-secondary);
2844
3556
  }
2845
3557
 
2846
- .gap-y-7xl {
2847
- row-gap: var(--spacing-7xl);
3558
+ .border-purple-secondary {
3559
+ border-color: var(--system-purple-secondary);
2848
3560
  }
2849
3561
  }
2850
3562
 
@@ -2860,9 +3572,7 @@
2860
3572
  * weight (400 / 600 / 700 theo token). Letter spacing, margin, màu chữ không
2861
3573
  * thuộc stylesheet này — màu dùng class text-* riêng.
2862
3574
  *
2863
- * Toàn bộ nằm trong `@layer components` để utility của Tailwind (`@layer
2864
- * utilities`) luôn thắng: `class="heading-1 font-bold"` hay `class="body-3
2865
- * text-2xl"` đều override được mà không cần important modifier.
3575
+ * Toàn bộ nằm trong `@layer components` — SCSS module (ngoài layer) override được.
2866
3576
  */
2867
3577
 
2868
3578
  @layer components {