@finhay-pro/leaf-design-system 0.2.0 → 0.2.2

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 (324) hide show
  1. package/README.md +245 -37
  2. package/dist/button.css +7 -0
  3. package/dist/calendar.css +19 -7
  4. package/dist/carousel.css +144 -0
  5. package/dist/cdn/leaf-0.2.2.min.css +2 -0
  6. package/dist/cdn/leaf-0.2.2.min.js +165 -0
  7. package/dist/classes.css +1699 -121
  8. package/dist/components/Button/Button.d.ts +2 -2
  9. package/dist/components/Button/Button.d.ts.map +1 -1
  10. package/dist/components/Button/Button.js +17 -15
  11. package/dist/components/Button/Button.js.map +1 -1
  12. package/dist/components/Calendar/Calendar.d.ts +12 -4
  13. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  14. package/dist/components/Calendar/Calendar.js +65 -26
  15. package/dist/components/Calendar/Calendar.js.map +1 -1
  16. package/dist/components/Carousel/Carousel.d.ts +35 -0
  17. package/dist/components/Carousel/Carousel.d.ts.map +1 -0
  18. package/dist/components/Carousel/Carousel.js +191 -0
  19. package/dist/components/Carousel/Carousel.js.map +1 -0
  20. package/dist/components/Carousel/index.d.ts +2 -0
  21. package/dist/components/Carousel/index.d.ts.map +1 -0
  22. package/dist/components/Carousel/index.js +2 -0
  23. package/dist/components/Carousel/index.js.map +1 -0
  24. package/dist/components/Checkbox/Checkbox.d.ts +2 -2
  25. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  26. package/dist/components/Checkbox/Checkbox.js +7 -3
  27. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  28. package/dist/components/Date/Date.d.ts +26 -0
  29. package/dist/components/Date/Date.d.ts.map +1 -0
  30. package/dist/components/Date/Date.js +26 -0
  31. package/dist/components/Date/Date.js.map +1 -0
  32. package/dist/components/Date/index.d.ts +2 -0
  33. package/dist/components/Date/index.d.ts.map +1 -0
  34. package/dist/components/Date/index.js +2 -0
  35. package/dist/components/Date/index.js.map +1 -0
  36. package/dist/components/Dialog/Dialog.d.ts +1 -2
  37. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  38. package/dist/components/Dialog/Dialog.js +2 -3
  39. package/dist/components/Dialog/Dialog.js.map +1 -1
  40. package/dist/components/Dropdown/Dropdown.d.ts +24 -10
  41. package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
  42. package/dist/components/Dropdown/Dropdown.js +245 -37
  43. package/dist/components/Dropdown/Dropdown.js.map +1 -1
  44. package/dist/components/Empty/Empty.d.ts +27 -0
  45. package/dist/components/Empty/Empty.d.ts.map +1 -0
  46. package/dist/components/Empty/Empty.js +22 -0
  47. package/dist/components/Empty/Empty.js.map +1 -0
  48. package/dist/components/Empty/index.d.ts +2 -0
  49. package/dist/components/Empty/index.d.ts.map +1 -0
  50. package/dist/components/Empty/index.js +2 -0
  51. package/dist/components/Empty/index.js.map +1 -0
  52. package/dist/components/FileViewer/FileViewer.d.ts +63 -0
  53. package/dist/components/FileViewer/FileViewer.d.ts.map +1 -0
  54. package/dist/components/FileViewer/FileViewer.js +73 -0
  55. package/dist/components/FileViewer/FileViewer.js.map +1 -0
  56. package/dist/components/FileViewer/FileViewerDialog.d.ts +27 -0
  57. package/dist/components/FileViewer/FileViewerDialog.d.ts.map +1 -0
  58. package/dist/components/FileViewer/FileViewerDialog.js +13 -0
  59. package/dist/components/FileViewer/FileViewerDialog.js.map +1 -0
  60. package/dist/components/FileViewer/index.d.ts +4 -0
  61. package/dist/components/FileViewer/index.d.ts.map +1 -0
  62. package/dist/components/FileViewer/index.js +4 -0
  63. package/dist/components/FileViewer/index.js.map +1 -0
  64. package/dist/components/Form/DynamicForm.d.ts +52 -0
  65. package/dist/components/Form/DynamicForm.d.ts.map +1 -0
  66. package/dist/components/Form/DynamicForm.js +135 -0
  67. package/dist/components/Form/DynamicForm.js.map +1 -0
  68. package/dist/components/Form/Form.d.ts +54 -0
  69. package/dist/components/Form/Form.d.ts.map +1 -0
  70. package/dist/components/Form/Form.js +127 -0
  71. package/dist/components/Form/Form.js.map +1 -0
  72. package/dist/components/Form/adapters.d.ts +66 -0
  73. package/dist/components/Form/adapters.d.ts.map +1 -0
  74. package/dist/components/Form/adapters.js +113 -0
  75. package/dist/components/Form/adapters.js.map +1 -0
  76. package/dist/components/Form/index.d.ts +24 -0
  77. package/dist/components/Form/index.d.ts.map +1 -0
  78. package/dist/components/Form/index.js +23 -0
  79. package/dist/components/Form/index.js.map +1 -0
  80. package/dist/components/Form/useForm.d.ts +25 -0
  81. package/dist/components/Form/useForm.d.ts.map +1 -0
  82. package/dist/components/Form/useForm.js +46 -0
  83. package/dist/components/Form/useForm.js.map +1 -0
  84. package/dist/components/Input/Input.d.ts +1 -2
  85. package/dist/components/Input/Input.d.ts.map +1 -1
  86. package/dist/components/Input/Input.js +3 -4
  87. package/dist/components/Input/Input.js.map +1 -1
  88. package/dist/components/Input/InputDate.d.ts +17 -7
  89. package/dist/components/Input/InputDate.d.ts.map +1 -1
  90. package/dist/components/Input/InputDate.js +48 -22
  91. package/dist/components/Input/InputDate.js.map +1 -1
  92. package/dist/components/Input/InputOtp.d.ts +2 -2
  93. package/dist/components/Input/InputOtp.d.ts.map +1 -1
  94. package/dist/components/Input/InputOtp.js +3 -3
  95. package/dist/components/Input/InputOtp.js.map +1 -1
  96. package/dist/components/Input/InputStepper.d.ts +3 -4
  97. package/dist/components/Input/InputStepper.d.ts.map +1 -1
  98. package/dist/components/Input/InputStepper.js +4 -5
  99. package/dist/components/Input/InputStepper.js.map +1 -1
  100. package/dist/components/Logo/Logo.d.ts +2 -2
  101. package/dist/components/Logo/Logo.d.ts.map +1 -1
  102. package/dist/components/Logo/Logo.js +3 -4
  103. package/dist/components/Logo/Logo.js.map +1 -1
  104. package/dist/components/MultiSelect/MultiSelect.d.ts +49 -0
  105. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -0
  106. package/dist/components/MultiSelect/MultiSelect.js +285 -0
  107. package/dist/components/MultiSelect/MultiSelect.js.map +1 -0
  108. package/dist/components/MultiSelect/index.d.ts +2 -0
  109. package/dist/components/MultiSelect/index.d.ts.map +1 -0
  110. package/dist/components/MultiSelect/index.js +2 -0
  111. package/dist/components/MultiSelect/index.js.map +1 -0
  112. package/dist/components/Number/Number.d.ts +32 -0
  113. package/dist/components/Number/Number.d.ts.map +1 -0
  114. package/dist/components/Number/Number.js +43 -0
  115. package/dist/components/Number/Number.js.map +1 -0
  116. package/dist/components/Number/index.d.ts +2 -0
  117. package/dist/components/Number/index.d.ts.map +1 -0
  118. package/dist/components/Number/index.js +2 -0
  119. package/dist/components/Number/index.js.map +1 -0
  120. package/dist/components/QrCode/QrCode.d.ts +27 -0
  121. package/dist/components/QrCode/QrCode.d.ts.map +1 -0
  122. package/dist/components/QrCode/QrCode.js +44 -0
  123. package/dist/components/QrCode/QrCode.js.map +1 -0
  124. package/dist/components/QrCode/index.d.ts +3 -0
  125. package/dist/components/QrCode/index.d.ts.map +1 -0
  126. package/dist/components/QrCode/index.js +3 -0
  127. package/dist/components/QrCode/index.js.map +1 -0
  128. package/dist/components/Radio/Radio.d.ts +4 -4
  129. package/dist/components/Radio/Radio.d.ts.map +1 -1
  130. package/dist/components/Radio/Radio.js +5 -5
  131. package/dist/components/Radio/Radio.js.map +1 -1
  132. package/dist/components/Skeleton/Skeleton.d.ts +2 -2
  133. package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
  134. package/dist/components/Skeleton/Skeleton.js +2 -3
  135. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  136. package/dist/components/Slider/Slider.d.ts +8 -6
  137. package/dist/components/Slider/Slider.d.ts.map +1 -1
  138. package/dist/components/Slider/Slider.js +16 -9
  139. package/dist/components/Slider/Slider.js.map +1 -1
  140. package/dist/components/Spinner/Spinner.d.ts +5 -2
  141. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  142. package/dist/components/Spinner/Spinner.js +5 -4
  143. package/dist/components/Spinner/Spinner.js.map +1 -1
  144. package/dist/components/Tabs/Tabs.d.ts +2 -3
  145. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  146. package/dist/components/Tabs/Tabs.js +4 -5
  147. package/dist/components/Tabs/Tabs.js.map +1 -1
  148. package/dist/components/Textarea/Textarea.d.ts +18 -0
  149. package/dist/components/Textarea/Textarea.d.ts.map +1 -0
  150. package/dist/components/Textarea/Textarea.js +41 -0
  151. package/dist/components/Textarea/Textarea.js.map +1 -0
  152. package/dist/components/Textarea/index.d.ts +2 -0
  153. package/dist/components/Textarea/index.d.ts.map +1 -0
  154. package/dist/components/Textarea/index.js +2 -0
  155. package/dist/components/Textarea/index.js.map +1 -0
  156. package/dist/components/Toast/Toast.d.ts +4 -3
  157. package/dist/components/Toast/Toast.d.ts.map +1 -1
  158. package/dist/components/Toast/Toast.js +7 -6
  159. package/dist/components/Toast/Toast.js.map +1 -1
  160. package/dist/components/Toggle/Toggle.d.ts +3 -3
  161. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  162. package/dist/components/Toggle/Toggle.js +5 -3
  163. package/dist/components/Toggle/Toggle.js.map +1 -1
  164. package/dist/components/Tooltip/Tooltip.d.ts +4 -5
  165. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  166. package/dist/components/Tooltip/Tooltip.js +10 -8
  167. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  168. package/dist/components/Upload/Upload.d.ts +89 -0
  169. package/dist/components/Upload/Upload.d.ts.map +1 -0
  170. package/dist/components/Upload/Upload.js +196 -0
  171. package/dist/components/Upload/Upload.js.map +1 -0
  172. package/dist/components/Upload/index.d.ts +2 -0
  173. package/dist/components/Upload/index.d.ts.map +1 -0
  174. package/dist/components/Upload/index.js +2 -0
  175. package/dist/components/Upload/index.js.map +1 -0
  176. package/dist/core/calendar.d.ts +13 -0
  177. package/dist/core/calendar.d.ts.map +1 -1
  178. package/dist/core/calendar.js +43 -0
  179. package/dist/core/calendar.js.map +1 -1
  180. package/dist/core/carousel.d.ts +42 -0
  181. package/dist/core/carousel.d.ts.map +1 -0
  182. package/dist/core/carousel.js +125 -0
  183. package/dist/core/carousel.js.map +1 -0
  184. package/dist/core/date.d.ts +46 -0
  185. package/dist/core/date.d.ts.map +1 -0
  186. package/dist/core/date.js +117 -0
  187. package/dist/core/date.js.map +1 -0
  188. package/dist/core/dialog.d.ts +2 -1
  189. package/dist/core/dialog.d.ts.map +1 -1
  190. package/dist/core/dialog.js +35 -9
  191. package/dist/core/dialog.js.map +1 -1
  192. package/dist/core/dropdown.d.ts +15 -2
  193. package/dist/core/dropdown.d.ts.map +1 -1
  194. package/dist/core/dropdown.js +29 -4
  195. package/dist/core/dropdown.js.map +1 -1
  196. package/dist/core/file/csv.d.ts +42 -0
  197. package/dist/core/file/csv.d.ts.map +1 -0
  198. package/dist/core/file/csv.js +159 -0
  199. package/dist/core/file/csv.js.map +1 -0
  200. package/dist/core/file/detect.d.ts +38 -0
  201. package/dist/core/file/detect.d.ts.map +1 -0
  202. package/dist/core/file/detect.js +218 -0
  203. package/dist/core/file/detect.js.map +1 -0
  204. package/dist/core/file/docx-render.d.ts +14 -0
  205. package/dist/core/file/docx-render.d.ts.map +1 -0
  206. package/dist/core/file/docx-render.js +173 -0
  207. package/dist/core/file/docx-render.js.map +1 -0
  208. package/dist/core/file/docx.d.ts +110 -0
  209. package/dist/core/file/docx.d.ts.map +1 -0
  210. package/dist/core/file/docx.js +632 -0
  211. package/dist/core/file/docx.js.map +1 -0
  212. package/dist/core/file/dom.d.ts +18 -0
  213. package/dist/core/file/dom.d.ts.map +1 -0
  214. package/dist/core/file/dom.js +57 -0
  215. package/dist/core/file/dom.js.map +1 -0
  216. package/dist/core/file/download.d.ts +26 -0
  217. package/dist/core/file/download.d.ts.map +1 -0
  218. package/dist/core/file/download.js +57 -0
  219. package/dist/core/file/download.js.map +1 -0
  220. package/dist/core/file/error.d.ts +34 -0
  221. package/dist/core/file/error.d.ts.map +1 -0
  222. package/dist/core/file/error.js +19 -0
  223. package/dist/core/file/error.js.map +1 -0
  224. package/dist/core/file/mime.d.ts +11 -0
  225. package/dist/core/file/mime.d.ts.map +1 -0
  226. package/dist/core/file/mime.js +61 -0
  227. package/dist/core/file/mime.js.map +1 -0
  228. package/dist/core/file/render.d.ts +45 -0
  229. package/dist/core/file/render.d.ts.map +1 -0
  230. package/dist/core/file/render.js +133 -0
  231. package/dist/core/file/render.js.map +1 -0
  232. package/dist/core/file/sheet-render.d.ts +30 -0
  233. package/dist/core/file/sheet-render.d.ts.map +1 -0
  234. package/dist/core/file/sheet-render.js +152 -0
  235. package/dist/core/file/sheet-render.js.map +1 -0
  236. package/dist/core/file/source.d.ts +56 -0
  237. package/dist/core/file/source.d.ts.map +1 -0
  238. package/dist/core/file/source.js +188 -0
  239. package/dist/core/file/source.js.map +1 -0
  240. package/dist/core/file/text.d.ts +9 -0
  241. package/dist/core/file/text.d.ts.map +1 -0
  242. package/dist/core/file/text.js +21 -0
  243. package/dist/core/file/text.js.map +1 -0
  244. package/dist/core/file/viewer.d.ts +160 -0
  245. package/dist/core/file/viewer.d.ts.map +1 -0
  246. package/dist/core/file/viewer.js +623 -0
  247. package/dist/core/file/viewer.js.map +1 -0
  248. package/dist/core/file/xlsx-format.d.ts +55 -0
  249. package/dist/core/file/xlsx-format.d.ts.map +1 -0
  250. package/dist/core/file/xlsx-format.js +476 -0
  251. package/dist/core/file/xlsx-format.js.map +1 -0
  252. package/dist/core/file/xlsx-write.d.ts +48 -0
  253. package/dist/core/file/xlsx-write.d.ts.map +1 -0
  254. package/dist/core/file/xlsx-write.js +219 -0
  255. package/dist/core/file/xlsx-write.js.map +1 -0
  256. package/dist/core/file/xlsx.d.ts +115 -0
  257. package/dist/core/file/xlsx.d.ts.map +1 -0
  258. package/dist/core/file/xlsx.js +402 -0
  259. package/dist/core/file/xlsx.js.map +1 -0
  260. package/dist/core/file/xml.d.ts +34 -0
  261. package/dist/core/file/xml.d.ts.map +1 -0
  262. package/dist/core/file/xml.js +102 -0
  263. package/dist/core/file/xml.js.map +1 -0
  264. package/dist/core/file/zip-write.d.ts +24 -0
  265. package/dist/core/file/zip-write.d.ts.map +1 -0
  266. package/dist/core/file/zip-write.js +131 -0
  267. package/dist/core/file/zip-write.js.map +1 -0
  268. package/dist/core/file/zip.d.ts +37 -0
  269. package/dist/core/file/zip.d.ts.map +1 -0
  270. package/dist/core/file/zip.js +195 -0
  271. package/dist/core/file/zip.js.map +1 -0
  272. package/dist/core/form.d.ts +88 -0
  273. package/dist/core/form.d.ts.map +1 -0
  274. package/dist/core/form.js +353 -0
  275. package/dist/core/form.js.map +1 -0
  276. package/dist/core/icons.d.ts +14 -0
  277. package/dist/core/icons.d.ts.map +1 -1
  278. package/dist/core/icons.js +14 -0
  279. package/dist/core/icons.js.map +1 -1
  280. package/dist/core/number.d.ts +45 -0
  281. package/dist/core/number.d.ts.map +1 -0
  282. package/dist/core/number.js +74 -0
  283. package/dist/core/number.js.map +1 -0
  284. package/dist/core/qr-code.d.ts +18 -0
  285. package/dist/core/qr-code.d.ts.map +1 -0
  286. package/dist/core/qr-code.js +702 -0
  287. package/dist/core/qr-code.js.map +1 -0
  288. package/dist/core/stepper.d.ts +6 -2
  289. package/dist/core/stepper.d.ts.map +1 -1
  290. package/dist/core/stepper.js +12 -9
  291. package/dist/core/stepper.js.map +1 -1
  292. package/dist/core/upload.d.ts +51 -0
  293. package/dist/core/upload.d.ts.map +1 -0
  294. package/dist/core/upload.js +114 -0
  295. package/dist/core/upload.js.map +1 -0
  296. package/dist/date.css +19 -0
  297. package/dist/dropdown.css +117 -0
  298. package/dist/empty.css +74 -0
  299. package/dist/file-viewer.css +502 -0
  300. package/dist/focus.css +18 -0
  301. package/dist/form.css +64 -0
  302. package/dist/index.d.ts +24 -0
  303. package/dist/index.d.ts.map +1 -1
  304. package/dist/index.js +26 -0
  305. package/dist/index.js.map +1 -1
  306. package/dist/multiselect.css +147 -0
  307. package/dist/number.css +53 -0
  308. package/dist/qr-code.css +21 -0
  309. package/dist/skeleton.css +8 -0
  310. package/dist/skill/leaf-design-system-0.2.2.zip +0 -0
  311. package/dist/slider.css +55 -1
  312. package/dist/spinner.css +9 -1
  313. package/dist/styles.css +1699 -121
  314. package/dist/tabs.css +7 -0
  315. package/dist/textarea.css +28 -0
  316. package/dist/upload.css +317 -0
  317. package/dist/utils/colorClass.d.ts +22 -0
  318. package/dist/utils/colorClass.d.ts.map +1 -0
  319. package/dist/utils/colorClass.js +93 -0
  320. package/dist/utils/colorClass.js.map +1 -0
  321. package/package.json +17 -3
  322. package/dist/cdn/leaf-0.2.0.min.css +0 -2
  323. package/dist/cdn/leaf-0.2.0.min.js +0 -2
  324. package/dist/skill/leaf-design-system-0.2.0.zip +0 -0
package/dist/styles.css CHANGED
@@ -323,6 +323,13 @@
323
323
  vertical-align: middle;
324
324
  text-decoration: none;
325
325
  appearance: none;
326
+ outline: none;
327
+ }
328
+
329
+ /* Chỉ báo focus bàn phím (WCAG 2.4.7) — :focus-visible nên click chuột không hiện ring. */
330
+ .leaf-button:focus-visible {
331
+ outline: 2px solid var(--text-highlight);
332
+ outline-offset: 2px;
326
333
  }
327
334
 
328
335
  .leaf-button__icon {
@@ -478,11 +485,11 @@
478
485
  /* --- src/components/Calendar/calendar.css --- */
479
486
 
480
487
  /*
481
- * Calendar — port từ vnsc Calendar (panel chọn ngày / giờ).
488
+ * Calendar — port từ vnsc Calendar (panel chọn ngày / giờ / tháng).
482
489
  *
483
490
  * Typography và màu tĩnh (nền, màu viền) là class Leaf trên markup. File này giữ khung
484
- * (padding, radius, độ dày viền), layout, size cố định (panel 256, ô 28, select 64), hover,
485
- * trạng thái ngày (data-selected / data-today / :disabled), vị trí dropdown
491
+ * (padding, radius, độ dày viền), layout, size cố định (panel 256, ô 28, ô tháng 40, select 64),
492
+ * hover, trạng thái ngày / tháng (data-selected / data-today / :disabled), vị trí dropdown
486
493
  * (data-placement), bóng đổ, reset button. Footer là `Button` (cần button.css).
487
494
  */
488
495
 
@@ -588,9 +595,10 @@
588
595
  color: var(--text-tertiary);
589
596
  }
590
597
 
598
+ /* Bóng theo token --overlay (80% alpha) × 44% ≈ độ đậm 35% trước đây. */
591
599
  .leaf-calendar__months,
592
600
  .leaf-calendar__list {
593
- box-shadow: 0 16px 40px rgb(0 0 0 / 0.35);
601
+ box-shadow: 0 16px 40px color-mix(in srgb, var(--overlay) 44%, transparent);
594
602
  }
595
603
 
596
604
  .leaf-calendar__months {
@@ -621,6 +629,15 @@
621
629
  gap: 4px;
622
630
  }
623
631
 
632
+ /* monthOnly — lưới 12 tháng thay cho lưới ngày. */
633
+ .leaf-calendar[data-month-only="true"] .leaf-calendar__months-grid {
634
+ row-gap: 8px;
635
+ }
636
+
637
+ .leaf-calendar[data-month-only="true"] .leaf-calendar__option {
638
+ height: 40px;
639
+ }
640
+
624
641
  .leaf-calendar__weekdays,
625
642
  .leaf-calendar__days {
626
643
  display: grid;
@@ -662,11 +679,12 @@
662
679
  }
663
680
 
664
681
  .leaf-calendar__day:not(:disabled):not([data-selected="true"]):hover,
665
- .leaf-calendar__option:not([data-selected="true"]):hover {
682
+ .leaf-calendar__option:not(:disabled):not([data-selected="true"]):hover {
666
683
  background-color: var(--base-tertiary);
667
684
  }
668
685
 
669
- .leaf-calendar__day[data-today="true"] {
686
+ .leaf-calendar__day[data-today="true"],
687
+ .leaf-calendar__option[data-today="true"] {
670
688
  border-color: var(--text-highlight);
671
689
  color: var(--text-highlight);
672
690
  }
@@ -679,7 +697,8 @@
679
697
  font-weight: var(--body-5-highlight-weight);
680
698
  }
681
699
 
682
- .leaf-calendar__day:disabled {
700
+ .leaf-calendar__day:disabled,
701
+ .leaf-calendar__option:disabled {
683
702
  border-color: transparent;
684
703
  background-color: transparent;
685
704
  color: var(--text-tertiary);
@@ -798,6 +817,148 @@
798
817
  }
799
818
  }
800
819
 
820
+ /* --- src/components/Carousel/carousel.css --- */
821
+
822
+ /*
823
+ * Carousel — cuộn ngang native, kéo khi free mode, snap khi free mode tắt.
824
+ * Nav dùng token semantic (--base-tertiary / --text-primary) để đổi đúng light/dark.
825
+ */
826
+
827
+ @layer components {
828
+ .leaf-carousel {
829
+ --leaf-carousel-space-between: 12px;
830
+ --leaf-carousel-slides-per-view: auto;
831
+
832
+ position: relative;
833
+ display: flex;
834
+ flex-direction: column;
835
+ width: 100%;
836
+ box-sizing: border-box;
837
+ }
838
+
839
+ .leaf-carousel__viewport {
840
+ overflow-x: auto;
841
+ overflow-y: hidden;
842
+ width: 100%;
843
+ -webkit-overflow-scrolling: touch;
844
+ scrollbar-width: none;
845
+ }
846
+
847
+ .leaf-carousel__viewport::-webkit-scrollbar {
848
+ display: none;
849
+ }
850
+
851
+ .leaf-carousel__viewport[data-free-mode="true"] {
852
+ touch-action: pan-y;
853
+ cursor: grab;
854
+ }
855
+
856
+ .leaf-carousel__viewport[data-free-mode="true"][data-dragging="true"] {
857
+ cursor: grabbing;
858
+ user-select: none;
859
+ -webkit-user-select: none;
860
+ }
861
+
862
+ .leaf-carousel__viewport[data-free-mode="false"] {
863
+ scroll-snap-type: x mandatory;
864
+ }
865
+
866
+ .leaf-carousel__track {
867
+ display: flex;
868
+ flex-direction: row;
869
+ align-items: stretch;
870
+ gap: var(--leaf-carousel-space-between);
871
+ width: max-content;
872
+ min-width: 100%;
873
+ box-sizing: border-box;
874
+ }
875
+
876
+ .leaf-carousel__slide {
877
+ flex: 0 0 auto;
878
+ box-sizing: border-box;
879
+ scroll-snap-align: start;
880
+ transform: scale(1);
881
+ opacity: 1;
882
+ transition:
883
+ transform 180ms ease,
884
+ opacity 180ms ease;
885
+ }
886
+
887
+ /* Kéo card: thu nhẹ + mờ nhẹ, thả tay transition về chỗ. */
888
+ .leaf-carousel__viewport[data-dragging="true"] .leaf-carousel__slide {
889
+ transform: scale(0.97);
890
+ opacity: 0.92;
891
+ }
892
+
893
+ .leaf-carousel[data-slides-per-view]:not([data-slides-per-view="auto"]) .leaf-carousel__slide {
894
+ flex: 0 0
895
+ calc(
896
+ (100% - (var(--leaf-carousel-slides-per-view) - 1) * var(--leaf-carousel-space-between)) /
897
+ var(--leaf-carousel-slides-per-view)
898
+ );
899
+ max-width: calc(
900
+ (100% - (var(--leaf-carousel-slides-per-view) - 1) * var(--leaf-carousel-space-between)) /
901
+ var(--leaf-carousel-slides-per-view)
902
+ );
903
+ }
904
+
905
+ .leaf-carousel__nav {
906
+ position: absolute;
907
+ top: 50%;
908
+ z-index: 1;
909
+ display: inline-flex;
910
+ align-items: center;
911
+ justify-content: center;
912
+ width: 28px;
913
+ height: 28px;
914
+ margin: 0;
915
+ padding: 0;
916
+ border: none;
917
+ border-radius: 999px;
918
+ /* Token semantic — đổi theo data-theme light/dark (không hard-code #fff). */
919
+ background-color: var(--base-tertiary);
920
+ color: var(--text-primary);
921
+ box-shadow: none;
922
+ transform: translateY(-50%);
923
+ cursor: pointer;
924
+ font: inherit;
925
+ appearance: none;
926
+ transition:
927
+ opacity 160ms ease,
928
+ background-color 160ms ease,
929
+ color 160ms ease;
930
+ }
931
+
932
+ .leaf-carousel__nav:focus-visible {
933
+ outline: 2px solid var(--text-highlight);
934
+ outline-offset: 2px;
935
+ }
936
+
937
+ .leaf-carousel__nav--prev {
938
+ left: 4px;
939
+ }
940
+
941
+ .leaf-carousel__nav--next {
942
+ right: 4px;
943
+ }
944
+
945
+ /* Icon nhỏ hơn ring (28px) — SVG RemixGlyph hoặc font <i class="ri-*">. */
946
+ .leaf-carousel__nav svg,
947
+ .leaf-carousel__nav i {
948
+ width: 14px;
949
+ height: 14px;
950
+ font-size: 14px;
951
+ line-height: 1;
952
+ display: block;
953
+ color: inherit;
954
+ }
955
+
956
+ .leaf-carousel__nav[data-nav-disabled="true"] {
957
+ opacity: 0;
958
+ pointer-events: none;
959
+ }
960
+ }
961
+
801
962
  /* --- src/components/Checkbox/checkbox.css --- */
802
963
 
803
964
  /*
@@ -928,6 +1089,23 @@
928
1089
  }
929
1090
  }
930
1091
 
1092
+ /* --- src/components/Date/date.css --- */
1093
+
1094
+ /*
1095
+ * Date — thẻ span/data hiển thị ngày đã format.
1096
+ * Typography / màu dùng class Leaf (body-*, text-*).
1097
+ */
1098
+
1099
+ @layer components {
1100
+ .leaf-date {
1101
+ display: inline;
1102
+ }
1103
+
1104
+ .leaf-date[hidden] {
1105
+ display: none;
1106
+ }
1107
+ }
1108
+
931
1109
  /* --- src/components/Dialog/dialog.css --- */
932
1110
 
933
1111
  /*
@@ -1401,169 +1579,920 @@
1401
1579
  .leaf-dropdown__option[aria-selected="true"] .leaf-dropdown__radio {
1402
1580
  opacity: 1;
1403
1581
  }
1404
- }
1405
1582
 
1406
- /* --- src/components/Input/input-date.css --- */
1583
+ /* ── Searchable (ô tìm trên trigger) ──────────────────────────────────── */
1407
1584
 
1408
- /*
1409
- * InputDate — Input trigger + popover Calendar.
1410
- *
1411
- * Popover neo theo khung trigger: dưới (data-placement="bottom", top = đáy khung qua
1412
- * --leaf-input-date-offset do React đo) hoặc lật lên trên (data-placement="top"). data-align
1413
- * căn trái / phải. data-open giữ viền + label highlight khi panel mở (invalid vẫn thắng).
1414
- * Phụ thuộc input.css + calendar.css.
1415
- */
1585
+ .leaf-dropdown[data-searchable="true"] .leaf-dropdown__trigger {
1586
+ cursor: text;
1587
+ }
1416
1588
 
1417
- @layer components {
1418
- .leaf-input-date {
1419
- position: relative;
1589
+ .leaf-dropdown[data-searchable="true"] .leaf-dropdown__trigger[data-readonly],
1590
+ .leaf-dropdown[data-searchable="true"][data-disabled="true"] .leaf-dropdown__trigger {
1591
+ cursor: default;
1420
1592
  }
1421
1593
 
1422
- .leaf-input-date__popover {
1423
- position: absolute;
1424
- z-index: var(--leaf-z-popover, 100);
1594
+ .leaf-dropdown[data-searchable="true"][data-disabled="true"] .leaf-dropdown__trigger {
1595
+ cursor: not-allowed;
1596
+ color: var(--text-tertiary);
1425
1597
  }
1426
1598
 
1427
- .leaf-input-date__popover[data-placement="bottom"] {
1428
- top: calc(var(--leaf-input-date-offset, 100%) + 8px);
1599
+ /* Ô nhập text (focus khớp cả khi click) → viền highlight như Input field, không outline. */
1600
+ .leaf-dropdown[data-searchable="true"]:not([data-invalid="true"])
1601
+ .leaf-dropdown__trigger:focus-within {
1602
+ outline: none;
1603
+ box-shadow: inset 0 0 0 1px var(--text-highlight);
1429
1604
  }
1430
1605
 
1431
- .leaf-input-date__popover[data-placement="top"] {
1432
- bottom: calc(100% + 8px);
1606
+ .leaf-dropdown[data-searchable="true"][data-appearance="outlined"]:not([data-invalid="true"])
1607
+ .leaf-dropdown__trigger:focus-within {
1608
+ border-color: var(--text-highlight);
1609
+ box-shadow: none;
1433
1610
  }
1434
1611
 
1435
- .leaf-input-date__popover[data-align="start"] {
1436
- left: 0;
1612
+ .leaf-dropdown__search {
1613
+ flex: 1 1 auto;
1614
+ min-width: 0;
1615
+ width: 100%;
1616
+ margin: 0;
1617
+ padding: 0;
1618
+ border: none;
1619
+ background: transparent;
1620
+ color: inherit;
1621
+ font: inherit;
1622
+ font-weight: inherit;
1623
+ outline: none;
1624
+ appearance: none;
1437
1625
  }
1438
1626
 
1439
- .leaf-input-date__popover[data-align="end"] {
1440
- right: 0;
1627
+ .leaf-dropdown__search::placeholder {
1628
+ color: var(--text-secondary);
1441
1629
  }
1442
1630
 
1443
- .leaf-input-date[data-open="true"] .leaf-input:not([data-invalid="true"]) {
1444
- --leaf-input-border: var(--text-highlight);
1445
- --leaf-input-label: var(--text-highlight);
1631
+ .leaf-dropdown__search:disabled {
1632
+ color: var(--text-tertiary);
1633
+ cursor: not-allowed;
1446
1634
  }
1447
1635
 
1448
- .leaf-input-date[hidden] {
1449
- display: none;
1636
+ .leaf-dropdown__search:disabled::placeholder {
1637
+ color: var(--text-tertiary);
1450
1638
  }
1451
- }
1452
1639
 
1453
- /* --- src/components/Input/input-otp.css --- */
1640
+ /* Thắng `.leaf-dropdown__option[aria-disabled="true"]` (cursor not-allowed). */
1641
+ .leaf-dropdown__option.leaf-dropdown__empty {
1642
+ cursor: default;
1643
+ color: var(--text-tertiary);
1644
+ }
1454
1645
 
1455
- /*
1456
- * InputOtp — Figma 1146:2159 (PIN code).
1457
- *
1458
- * Ô 48×56, nền base-tertiary, chữ số heading-3. Focus → viền highlight; data-invalid → viền
1459
- * đỏ mọi ô + message đỏ; data-disabled / :disabled → chữ secondary. Typography
1460
- * (heading-3, body-5) là class Leaf trên markup.
1461
- * HTML tĩnh: hành vi nhảy ô / dán nằm trong leaf.js (`data-leaf-input-otp`).
1462
- */
1646
+ .leaf-dropdown[data-searchable="true"][data-disabled="true"] .leaf-dropdown__chevron {
1647
+ color: var(--text-tertiary);
1648
+ }
1463
1649
 
1464
- @layer components {
1465
- .leaf-input-otp {
1466
- --leaf-input-otp-cell-width: 48px;
1467
- --leaf-input-otp-cell-height: 56px;
1468
- --leaf-input-otp-border: transparent;
1469
- --leaf-input-otp-message: var(--text-secondary);
1650
+ /* ── Invalid (mọi trigger field, không riêng searchable) ─────────────── */
1470
1651
 
1471
- display: flex;
1472
- flex-direction: column;
1473
- gap: 8px;
1652
+ .leaf-dropdown[data-trigger="field"][data-invalid="true"] .leaf-dropdown__trigger {
1653
+ box-shadow: inset 0 0 0 1px var(--system-red);
1474
1654
  }
1475
1655
 
1476
- .leaf-input-otp__cells {
1477
- display: flex;
1478
- gap: 4px;
1656
+ .leaf-dropdown[data-trigger="field"][data-invalid="true"][data-appearance="outlined"]
1657
+ .leaf-dropdown__trigger {
1658
+ border-color: var(--system-red);
1659
+ box-shadow: none;
1479
1660
  }
1480
1661
 
1481
- .leaf-input-otp__cell {
1482
- box-sizing: border-box;
1483
- width: var(--leaf-input-otp-cell-width);
1484
- height: var(--leaf-input-otp-cell-height);
1485
- margin: 0;
1486
- padding: 0;
1487
- border: 1px solid var(--leaf-input-otp-border);
1488
- border-radius: 12px;
1489
- outline: none;
1490
- background-color: var(--base-tertiary);
1491
- color: var(--text-primary);
1492
- text-align: center;
1493
- caret-color: var(--text-highlight);
1494
- appearance: none;
1495
- -webkit-appearance: none;
1496
- transition: border-color 0.15s ease;
1497
- }
1662
+ /* ── Message ─────────────────────────────────────────────────────────────
1663
+ * Gốc là flex hàng ngang → message phải xuống dòng. Dùng grid một cột: panel (absolute)
1664
+ * đặt vào hàng 1 nên containing block là ô của trigger — panel vẫn nằm ngay dưới trigger,
1665
+ * không bị message đẩy xuống. Khoảng cách 8px như Input.
1666
+ */
1498
1667
 
1499
- .leaf-input-otp__cell:focus {
1500
- border-color: var(--text-highlight);
1668
+ .leaf-dropdown[data-message="true"] {
1669
+ display: grid;
1670
+ grid-template-columns: minmax(0, 1fr);
1671
+ row-gap: 8px;
1501
1672
  }
1502
1673
 
1503
- .leaf-input-otp[data-invalid="true"] .leaf-input-otp__cell {
1504
- border-color: var(--system-red);
1674
+ .leaf-dropdown[data-trigger="text"][data-message="true"] {
1675
+ display: inline-grid;
1505
1676
  }
1506
1677
 
1507
- .leaf-input-otp__cell:disabled {
1508
- color: var(--text-secondary);
1509
- cursor: not-allowed;
1678
+ .leaf-dropdown[data-message="true"][hidden] {
1679
+ display: none;
1510
1680
  }
1511
1681
 
1512
- .leaf-input-otp__message {
1513
- margin: 0;
1514
- color: var(--leaf-input-otp-message);
1682
+ /* Ghi đủ "1 / 2": với phần tử absolute, line `auto` là mép container (gồm cả message). */
1683
+ .leaf-dropdown[data-message="true"] > .leaf-dropdown__trigger,
1684
+ .leaf-dropdown[data-message="true"] > .leaf-dropdown__list {
1685
+ grid-row: 1 / 2;
1686
+ grid-column: 1 / 2;
1515
1687
  }
1516
1688
 
1517
- .leaf-input-otp[data-invalid="true"] {
1518
- --leaf-input-otp-message: var(--system-red);
1689
+ .leaf-dropdown .leaf-dropdown__message {
1690
+ --leaf-input-message: var(--text-secondary);
1691
+ grid-row: 2 / 3;
1692
+ margin: 0;
1693
+ color: var(--leaf-input-message);
1519
1694
  }
1520
1695
 
1521
- .leaf-input-otp[hidden],
1522
- .leaf-input-otp__cells[hidden] {
1523
- display: none;
1696
+ .leaf-dropdown[data-invalid="true"] .leaf-dropdown__message {
1697
+ --leaf-input-message: var(--system-red);
1524
1698
  }
1525
1699
  }
1526
1700
 
1527
- /* --- src/components/Input/input-stepper.css --- */
1701
+ /* --- src/components/Empty/empty.css --- */
1528
1702
 
1529
1703
  /*
1530
- * InputStepper — Figma 1146:2159 (Buy / Sell).
1704
+ * Empty — trạng thái không có dữ liệu (illustration tuỳ chọn + description).
1531
1705
  *
1532
- * Tone qua data-tone (buy | sell — không có → base-tertiary); state qua :focus-within,
1533
- * data-invalid, data-disabled, data-filled. Nền 280 × (py 4 · px 12), radius 12; icon −/+ 20px.
1534
- * Label body-5 (secondary → primary khi focus), giá trị body-4-highlight (placeholder
1535
- * secondary, đã nhập primary). Typography là class Leaf trên markup.
1536
- * HTML tĩnh: −/+, mũi tên, format số nằm trong leaf.js (`data-leaf-input-stepper`).
1706
+ * data-size: md (mặc định) · sm — scale cả khung ảnh lẫn chữ description.
1707
+ * Ảnh CDN gắn trong React; HTML tĩnh tự <img> cùng URL.
1537
1708
  */
1538
1709
 
1539
1710
  @layer components {
1540
- .leaf-input-stepper {
1541
- --leaf-input-stepper-width: 280px;
1542
- --leaf-input-stepper-bg: var(--base-tertiary);
1543
- --leaf-input-stepper-focus: var(--text-highlight);
1544
- --leaf-input-stepper-border: transparent;
1545
- --leaf-input-stepper-label: var(--text-secondary);
1546
- --leaf-input-stepper-fg: var(--text-primary);
1547
- --leaf-input-stepper-icon: var(--text-primary);
1548
- --leaf-input-stepper-message: var(--text-secondary);
1711
+ .leaf-empty {
1712
+ --leaf-empty-image-size: 100px;
1713
+ --leaf-empty-description-size: var(--body-3-size);
1714
+ --leaf-empty-description-line-height: var(--body-3-line-height);
1549
1715
 
1716
+ box-sizing: border-box;
1550
1717
  display: flex;
1551
1718
  flex-direction: column;
1552
- gap: 4px;
1553
- width: var(--leaf-input-stepper-width);
1554
- max-width: 100%;
1719
+ align-items: center;
1720
+ justify-content: center;
1721
+ gap: 16px;
1722
+ width: 100%;
1723
+ height: 100%;
1724
+ margin: 0;
1725
+ padding: 0;
1726
+ text-align: center;
1555
1727
  }
1556
1728
 
1557
- .leaf-input-stepper[data-tone="buy"] {
1558
- --leaf-input-stepper-bg: var(--system-green-secondary);
1729
+ .leaf-empty[data-size="sm"] {
1730
+ --leaf-empty-image-size: 64px;
1731
+ --leaf-empty-description-size: var(--body-4-size);
1732
+ --leaf-empty-description-line-height: var(--body-4-line-height);
1733
+ gap: 12px;
1559
1734
  }
1560
1735
 
1561
- .leaf-input-stepper[data-tone="sell"] {
1562
- --leaf-input-stepper-bg: var(--system-red-secondary);
1563
- --leaf-input-stepper-focus: var(--system-red);
1736
+ .leaf-empty[data-size="md"],
1737
+ .leaf-empty:not([data-size]) {
1738
+ --leaf-empty-image-size: 100px;
1739
+ --leaf-empty-description-size: var(--body-3-size);
1740
+ --leaf-empty-description-line-height: var(--body-3-line-height);
1564
1741
  }
1565
1742
 
1566
- .leaf-input-stepper__shell {
1743
+ .leaf-empty__image {
1744
+ display: flex;
1745
+ flex-shrink: 0;
1746
+ align-items: center;
1747
+ justify-content: center;
1748
+ width: var(--leaf-empty-image-size);
1749
+ height: var(--leaf-empty-image-size);
1750
+ overflow: hidden;
1751
+ }
1752
+
1753
+ .leaf-empty__image > img {
1754
+ display: block;
1755
+ width: 100%;
1756
+ height: 100%;
1757
+ max-width: 100%;
1758
+ max-height: 100%;
1759
+ object-fit: contain;
1760
+ }
1761
+
1762
+ .leaf-empty__description {
1763
+ max-width: 28rem;
1764
+ margin: 0;
1765
+ color: var(--text-secondary);
1766
+ font-size: var(--leaf-empty-description-size);
1767
+ line-height: var(--leaf-empty-description-line-height);
1768
+ font-weight: var(--body-3-weight);
1769
+ overflow-wrap: anywhere;
1770
+ }
1771
+ }
1772
+
1773
+ /* --- src/components/FileViewer/file-viewer.css --- */
1774
+
1775
+ /*
1776
+ * FileViewer — xem file (PDF native, ảnh, video / audio, text, CSV / XLSX, DOCX) không thư viện ngoài.
1777
+ *
1778
+ * Root `.leaf-file-viewer`: data-state (idle · loading · ready · error · unsupported · external),
1779
+ * data-kind (pdf · image · …), data-fullscreen. Toàn bộ DOM bên trong do controller
1780
+ * (core/file/viewer.ts) dựng — React và leaf.js cùng markup. Nút toolbar là `Button` ghost sm,
1781
+ * loading là `Spinner`, sheet trống là `Empty` — cần import thêm button.css / spinner.css /
1782
+ * empty.css (hoặc styles.css).
1783
+ *
1784
+ * Kích thước: root theo `--leaf-file-viewer-height` (mặc định 480px), width 100%.
1785
+ */
1786
+
1787
+ @layer components {
1788
+ .leaf-file-viewer {
1789
+ --leaf-file-viewer-height: 480px;
1790
+ --leaf-file-viewer-radius: 12px;
1791
+ --leaf-file-viewer-border: var(--base-tertiary);
1792
+ --leaf-file-viewer-surface: var(--base-primary);
1793
+ --leaf-file-viewer-chrome: var(--base-secondary);
1794
+ --leaf-file-viewer-grid-line: var(--base-tertiary);
1795
+
1796
+ position: relative;
1797
+ display: flex;
1798
+ flex-direction: column;
1799
+ box-sizing: border-box;
1800
+ width: 100%;
1801
+ height: var(--leaf-file-viewer-height);
1802
+ min-height: 0;
1803
+ overflow: hidden;
1804
+ border: 1px solid var(--leaf-file-viewer-border);
1805
+ border-radius: var(--leaf-file-viewer-radius);
1806
+ background-color: var(--leaf-file-viewer-surface);
1807
+ color: var(--text-primary);
1808
+ font-family: var(--font-sans);
1809
+ }
1810
+
1811
+ /* Trong Dialog: lấp đầy body. */
1812
+ .leaf-dialog__body > .leaf-file-viewer {
1813
+ flex: 1 1 auto;
1814
+ }
1815
+
1816
+ .leaf-file-viewer[data-fullscreen="true"] {
1817
+ height: 100%;
1818
+ border: none;
1819
+ border-radius: 0;
1820
+ }
1821
+
1822
+ .leaf-file-viewer__toolbar {
1823
+ display: flex;
1824
+ flex-shrink: 0;
1825
+ align-items: center;
1826
+ gap: 12px;
1827
+ box-sizing: border-box;
1828
+ min-height: 44px;
1829
+ padding: 6px 8px 6px 16px;
1830
+ border-bottom: 1px solid var(--leaf-file-viewer-border);
1831
+ background-color: var(--leaf-file-viewer-chrome);
1832
+ }
1833
+
1834
+ .leaf-file-viewer__name {
1835
+ flex: 1 1 auto;
1836
+ min-width: 0;
1837
+ overflow: hidden;
1838
+ color: var(--text-primary);
1839
+ text-overflow: ellipsis;
1840
+ white-space: nowrap;
1841
+ }
1842
+
1843
+ .leaf-file-viewer__actions {
1844
+ display: flex;
1845
+ flex-shrink: 0;
1846
+ align-items: center;
1847
+ gap: 4px;
1848
+ max-width: 70%;
1849
+ overflow-x: auto;
1850
+ scrollbar-width: none;
1851
+ }
1852
+
1853
+ .leaf-file-viewer__actions::-webkit-scrollbar {
1854
+ display: none;
1855
+ }
1856
+
1857
+ .leaf-file-viewer__zoom {
1858
+ min-width: 44px;
1859
+ color: var(--text-secondary);
1860
+ text-align: center;
1861
+ font-variant-numeric: tabular-nums;
1862
+ }
1863
+
1864
+ .leaf-file-viewer__body {
1865
+ position: relative;
1866
+ display: flex;
1867
+ flex: 1 1 auto;
1868
+ min-height: 0;
1869
+ }
1870
+
1871
+ .leaf-file-viewer__content {
1872
+ --leaf-file-viewer-zoom: 1;
1873
+
1874
+ position: relative;
1875
+ flex: 1 1 auto;
1876
+ min-width: 0;
1877
+ min-height: 0;
1878
+ overflow: auto;
1879
+ outline: none;
1880
+ }
1881
+
1882
+ .leaf-file-viewer__content:focus-visible {
1883
+ outline: 2px solid var(--text-highlight);
1884
+ outline-offset: -2px;
1885
+ }
1886
+
1887
+ /* ── Trạng thái: loading · error · unsupported · external · idle ── */
1888
+
1889
+ .leaf-file-viewer__state {
1890
+ position: absolute;
1891
+ inset: 0;
1892
+ display: flex;
1893
+ flex-direction: column;
1894
+ align-items: center;
1895
+ justify-content: center;
1896
+ gap: 8px;
1897
+ box-sizing: border-box;
1898
+ padding: 24px;
1899
+ text-align: center;
1900
+ }
1901
+
1902
+ .leaf-file-viewer__state-icon {
1903
+ display: inline-flex;
1904
+ width: 40px;
1905
+ height: 40px;
1906
+ margin-bottom: 4px;
1907
+ color: var(--text-tertiary);
1908
+ }
1909
+
1910
+ .leaf-file-viewer__state[data-variant="error"] .leaf-file-viewer__state-icon {
1911
+ color: var(--system-red);
1912
+ }
1913
+
1914
+ .leaf-file-viewer__state-icon > svg {
1915
+ display: block;
1916
+ width: 100%;
1917
+ height: 100%;
1918
+ }
1919
+
1920
+ .leaf-file-viewer__message {
1921
+ margin: 0;
1922
+ color: var(--text-primary);
1923
+ }
1924
+
1925
+ .leaf-file-viewer__detail {
1926
+ max-width: 100%;
1927
+ margin: 0;
1928
+ overflow: hidden;
1929
+ color: var(--text-tertiary);
1930
+ text-overflow: ellipsis;
1931
+ white-space: nowrap;
1932
+ }
1933
+
1934
+ .leaf-file-viewer__state-actions {
1935
+ display: flex;
1936
+ flex-wrap: wrap;
1937
+ justify-content: center;
1938
+ gap: 8px;
1939
+ margin-top: 8px;
1940
+ }
1941
+
1942
+ /* ── Ảnh ── */
1943
+
1944
+ .leaf-file-viewer__stage {
1945
+ display: flex;
1946
+ align-items: center;
1947
+ justify-content: center;
1948
+ box-sizing: border-box;
1949
+ width: 100%;
1950
+ height: 100%;
1951
+ padding: 16px;
1952
+ overflow: hidden;
1953
+ touch-action: none;
1954
+ }
1955
+
1956
+ .leaf-file-viewer__stage[data-zoomed="true"] {
1957
+ cursor: grab;
1958
+ }
1959
+
1960
+ .leaf-file-viewer__stage[data-dragging="true"] {
1961
+ cursor: grabbing;
1962
+ user-select: none;
1963
+ -webkit-user-select: none;
1964
+ }
1965
+
1966
+ .leaf-file-viewer__image {
1967
+ display: block;
1968
+ max-width: 100%;
1969
+ max-height: 100%;
1970
+ object-fit: contain;
1971
+ transform-origin: center;
1972
+ transition: transform 0.15s ease-out;
1973
+ user-select: none;
1974
+ -webkit-user-select: none;
1975
+ }
1976
+
1977
+ .leaf-file-viewer__stage[data-dragging="true"] .leaf-file-viewer__image {
1978
+ transition: none;
1979
+ }
1980
+
1981
+ /* ── Video / audio / PDF ── */
1982
+
1983
+ .leaf-file-viewer__media {
1984
+ display: block;
1985
+ width: 100%;
1986
+ max-height: 100%;
1987
+ background-color: var(--leaf-file-viewer-chrome);
1988
+ }
1989
+
1990
+ audio.leaf-file-viewer__media {
1991
+ width: calc(100% - 32px);
1992
+ margin: 16px;
1993
+ background-color: transparent;
1994
+ }
1995
+
1996
+ .leaf-file-viewer__frame {
1997
+ display: block;
1998
+ width: 100%;
1999
+ height: 100%;
2000
+ border: none;
2001
+ background-color: var(--leaf-file-viewer-chrome);
2002
+ }
2003
+
2004
+ /* ── Text ── */
2005
+
2006
+ .leaf-file-viewer__text {
2007
+ box-sizing: border-box;
2008
+ min-height: 100%;
2009
+ margin: 0;
2010
+ padding: 16px;
2011
+ color: var(--text-primary);
2012
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
2013
+ font-size: calc(var(--body-4-size) * var(--leaf-file-viewer-zoom));
2014
+ line-height: 1.6;
2015
+ white-space: pre-wrap;
2016
+ overflow-wrap: anywhere;
2017
+ tab-size: 4;
2018
+ }
2019
+
2020
+ /* ── Bảng tính ── */
2021
+
2022
+ .leaf-file-viewer__table {
2023
+ --leaf-file-viewer-row-height: 28px;
2024
+
2025
+ border-collapse: separate;
2026
+ border-spacing: 0;
2027
+ table-layout: fixed;
2028
+ color: var(--text-primary);
2029
+ }
2030
+
2031
+ .leaf-file-viewer__table th,
2032
+ .leaf-file-viewer__table td {
2033
+ box-sizing: border-box;
2034
+ height: var(--leaf-file-viewer-row-height);
2035
+ padding: 0 8px;
2036
+ overflow: hidden;
2037
+ border-right: 1px solid var(--leaf-file-viewer-grid-line);
2038
+ border-bottom: 1px solid var(--leaf-file-viewer-grid-line);
2039
+ text-align: left;
2040
+ text-overflow: ellipsis;
2041
+ white-space: nowrap;
2042
+ }
2043
+
2044
+ .leaf-file-viewer__table thead th {
2045
+ position: sticky;
2046
+ top: 0;
2047
+ z-index: 2;
2048
+ background-color: var(--leaf-file-viewer-chrome);
2049
+ color: var(--text-secondary);
2050
+ font-weight: inherit;
2051
+ text-align: center;
2052
+ }
2053
+
2054
+ .leaf-file-viewer__table tbody th {
2055
+ position: sticky;
2056
+ left: 0;
2057
+ z-index: 1;
2058
+ background-color: var(--leaf-file-viewer-chrome);
2059
+ color: var(--text-secondary);
2060
+ font-weight: inherit;
2061
+ text-align: center;
2062
+ }
2063
+
2064
+ .leaf-file-viewer__table thead .leaf-file-viewer__corner {
2065
+ left: 0;
2066
+ z-index: 3;
2067
+ }
2068
+
2069
+ .leaf-file-viewer__table td[data-type="n"],
2070
+ .leaf-file-viewer__table td[data-type="d"] {
2071
+ text-align: right;
2072
+ font-variant-numeric: tabular-nums;
2073
+ }
2074
+
2075
+ .leaf-file-viewer__table td[data-type="b"],
2076
+ .leaf-file-viewer__table td[data-type="e"] {
2077
+ text-align: center;
2078
+ }
2079
+
2080
+ .leaf-file-viewer__table td[data-type="e"] {
2081
+ color: var(--system-red);
2082
+ }
2083
+
2084
+ .leaf-file-viewer__table td[rowspan],
2085
+ .leaf-file-viewer__table td[colspan] {
2086
+ vertical-align: middle;
2087
+ }
2088
+
2089
+ .leaf-file-viewer__spacer td {
2090
+ padding: 0;
2091
+ border: none;
2092
+ }
2093
+
2094
+ .leaf-file-viewer__sheets {
2095
+ display: flex;
2096
+ flex-shrink: 0;
2097
+ gap: 2px;
2098
+ padding: 0 8px;
2099
+ overflow-x: auto;
2100
+ border-top: 1px solid var(--leaf-file-viewer-border);
2101
+ background-color: var(--leaf-file-viewer-chrome);
2102
+ scrollbar-width: thin;
2103
+ }
2104
+
2105
+ .leaf-file-viewer__sheet {
2106
+ flex-shrink: 0;
2107
+ box-sizing: border-box;
2108
+ height: 36px;
2109
+ margin: 0;
2110
+ padding: 0 14px;
2111
+ border: none;
2112
+ border-top: 2px solid transparent;
2113
+ background: none;
2114
+ color: var(--text-secondary);
2115
+ font-family: inherit;
2116
+ white-space: nowrap;
2117
+ cursor: pointer;
2118
+ }
2119
+
2120
+ .leaf-file-viewer__sheet:hover {
2121
+ color: var(--text-primary);
2122
+ }
2123
+
2124
+ .leaf-file-viewer__sheet[aria-selected="true"] {
2125
+ border-top-color: var(--text-highlight);
2126
+ background-color: var(--leaf-file-viewer-surface);
2127
+ color: var(--text-primary);
2128
+ }
2129
+
2130
+ .leaf-file-viewer__sheet:focus-visible {
2131
+ outline: 2px solid var(--text-highlight);
2132
+ outline-offset: -2px;
2133
+ }
2134
+
2135
+ /* ── DOCX ── */
2136
+
2137
+ .leaf-file-viewer__doc {
2138
+ box-sizing: border-box;
2139
+ padding: 24px 16px;
2140
+ background-color: var(--leaf-file-viewer-chrome);
2141
+ }
2142
+
2143
+ /*
2144
+ * Trang tài liệu giữ màu giấy in (nền trắng, chữ đen) ở cả light / dark — giống Word / bản in,
2145
+ * màu chữ trong file (run color) được viết cho nền trắng. Override qua biến bên dưới.
2146
+ */
2147
+ .leaf-file-viewer__page {
2148
+ --leaf-file-viewer-page-bg: #fff;
2149
+ --leaf-file-viewer-page-fg: #1a1a1a;
2150
+ --leaf-file-viewer-page-rule: #9a9a9a;
2151
+ --leaf-file-viewer-page-link: #0b57d0;
2152
+
2153
+ box-sizing: border-box;
2154
+ width: 100%;
2155
+ max-width: calc(794px * var(--leaf-file-viewer-zoom));
2156
+ margin: 0 auto;
2157
+ padding: calc(56px * var(--leaf-file-viewer-zoom)) calc(64px * var(--leaf-file-viewer-zoom));
2158
+ border-radius: 4px;
2159
+ /* Tài liệu Word luôn nền trắng chữ đen như bản in, kể cả dark mode. */
2160
+ background-color: var(--leaf-file-viewer-page-bg);
2161
+ color: var(--leaf-file-viewer-page-fg);
2162
+ font-family: "Times New Roman", Times, serif;
2163
+ font-size: calc(16px * var(--leaf-file-viewer-zoom));
2164
+ line-height: 1.45;
2165
+ overflow-wrap: anywhere;
2166
+ box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
2167
+ }
2168
+
2169
+ .leaf-file-viewer__page + .leaf-file-viewer__page {
2170
+ margin-top: 16px;
2171
+ }
2172
+
2173
+ .leaf-file-viewer__page p,
2174
+ .leaf-file-viewer__page h1,
2175
+ .leaf-file-viewer__page h2,
2176
+ .leaf-file-viewer__page h3,
2177
+ .leaf-file-viewer__page h4,
2178
+ .leaf-file-viewer__page h5,
2179
+ .leaf-file-viewer__page h6 {
2180
+ margin: 0 0 0.6em;
2181
+ }
2182
+
2183
+ .leaf-file-viewer__page h1 {
2184
+ font-size: 1.75em;
2185
+ }
2186
+
2187
+ .leaf-file-viewer__page h2 {
2188
+ font-size: 1.4em;
2189
+ }
2190
+
2191
+ .leaf-file-viewer__page h3 {
2192
+ font-size: 1.2em;
2193
+ }
2194
+
2195
+ .leaf-file-viewer__page table {
2196
+ width: 100%;
2197
+ margin: 0 0 0.8em;
2198
+ border-collapse: collapse;
2199
+ }
2200
+
2201
+ .leaf-file-viewer__page td {
2202
+ padding: 0.3em 0.5em;
2203
+ border: 1px solid var(--leaf-file-viewer-page-rule);
2204
+ vertical-align: top;
2205
+ }
2206
+
2207
+ .leaf-file-viewer__page td > p:last-child {
2208
+ margin-bottom: 0;
2209
+ }
2210
+
2211
+ .leaf-file-viewer__page img {
2212
+ max-width: 100%;
2213
+ height: auto;
2214
+ }
2215
+
2216
+ .leaf-file-viewer__page a {
2217
+ color: var(--leaf-file-viewer-page-link);
2218
+ }
2219
+
2220
+ .leaf-file-viewer__marker {
2221
+ display: inline-block;
2222
+ box-sizing: border-box;
2223
+ padding-right: 0.35em;
2224
+ text-indent: 0;
2225
+ }
2226
+
2227
+ /* `[hidden]` luôn ẩn — rule gốc set display. */
2228
+ .leaf-file-viewer[hidden],
2229
+ .leaf-file-viewer__toolbar[hidden],
2230
+ .leaf-file-viewer__content[hidden],
2231
+ .leaf-file-viewer__state[hidden],
2232
+ .leaf-file-viewer__sheets[hidden] {
2233
+ display: none;
2234
+ }
2235
+
2236
+ @media (max-width: 640px) {
2237
+ .leaf-file-viewer__toolbar {
2238
+ padding-left: 12px;
2239
+ }
2240
+
2241
+ .leaf-file-viewer__zoom {
2242
+ display: none;
2243
+ }
2244
+
2245
+ .leaf-file-viewer__page {
2246
+ padding: calc(24px * var(--leaf-file-viewer-zoom))
2247
+ calc(20px * var(--leaf-file-viewer-zoom));
2248
+ }
2249
+ }
2250
+
2251
+ /* FileViewerDialog có `footer`: viewer co giãn, hàng nút căn phải bên dưới. */
2252
+ .leaf-file-viewer-dialog {
2253
+ display: flex;
2254
+ flex-direction: column;
2255
+ gap: 16px;
2256
+ height: 100%;
2257
+ min-height: 0;
2258
+ }
2259
+
2260
+ .leaf-file-viewer-dialog > .leaf-file-viewer {
2261
+ flex: 1 1 0;
2262
+ min-height: 0;
2263
+ }
2264
+
2265
+ .leaf-file-viewer-dialog__footer {
2266
+ display: flex;
2267
+ flex-wrap: wrap;
2268
+ justify-content: flex-end;
2269
+ gap: 8px;
2270
+ }
2271
+ }
2272
+
2273
+ /* --- src/components/Form/form.css --- */
2274
+
2275
+ /*
2276
+ * Form layout helpers — spacing cố định (Leaf không còn --spacing-*);
2277
+ * gap khớp thang Figma spacing md (16px).
2278
+ */
2279
+
2280
+ @layer components {
2281
+ .leaf-form {
2282
+ display: flex;
2283
+ flex-direction: column;
2284
+ gap: 16px;
2285
+ box-sizing: border-box;
2286
+ width: 100%;
2287
+ }
2288
+
2289
+ .leaf-form--grid-2 {
2290
+ display: grid;
2291
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2292
+ gap: 16px;
2293
+ align-items: start;
2294
+ }
2295
+
2296
+ .leaf-form--inline {
2297
+ display: flex;
2298
+ flex-direction: row;
2299
+ flex-wrap: wrap;
2300
+ gap: 16px;
2301
+ align-items: flex-start;
2302
+ }
2303
+
2304
+ .leaf-form__field {
2305
+ min-width: 0;
2306
+ }
2307
+
2308
+ .leaf-form[hidden],
2309
+ .leaf-form--grid-2[hidden],
2310
+ .leaf-form--inline[hidden] {
2311
+ display: none;
2312
+ }
2313
+
2314
+ .leaf-form__field--span-2 {
2315
+ grid-column: span 2;
2316
+ }
2317
+
2318
+ /* margin đủ 4 phía: <p> có margin mặc định của trình duyệt (lib không dựa vào CSS reset).
2319
+ * Cách control 8px như message của Input. */
2320
+ .leaf-form__message {
2321
+ margin: 8px 0 0;
2322
+ color: var(--system-red);
2323
+ }
2324
+
2325
+ /* Sau control dạng khung (MultiSelect…): thụt 12px cho thẳng chữ trong trigger, như Input. */
2326
+ .leaf-form__field > .leaf-dropdown + .leaf-form__message {
2327
+ padding-left: 12px;
2328
+ }
2329
+
2330
+ .leaf-form__message:not([data-invalid]) {
2331
+ color: var(--text-secondary);
2332
+ }
2333
+ }
2334
+
2335
+ /* --- src/components/Input/input-date.css --- */
2336
+
2337
+ /*
2338
+ * InputDate — Input trigger + popover Calendar.
2339
+ *
2340
+ * Popover neo theo khung trigger: dưới (data-placement="bottom", top = đáy khung qua
2341
+ * --leaf-input-date-offset do React đo) hoặc lật lên trên (data-placement="top"). data-align
2342
+ * căn trái / phải. data-open giữ viền + label highlight khi panel mở (invalid vẫn thắng).
2343
+ * Phụ thuộc input.css + calendar.css.
2344
+ */
2345
+
2346
+ @layer components {
2347
+ .leaf-input-date {
2348
+ position: relative;
2349
+ }
2350
+
2351
+ .leaf-input-date__popover {
2352
+ position: absolute;
2353
+ z-index: var(--leaf-z-popover, 100);
2354
+ }
2355
+
2356
+ .leaf-input-date__popover[data-placement="bottom"] {
2357
+ top: calc(var(--leaf-input-date-offset, 100%) + 8px);
2358
+ }
2359
+
2360
+ .leaf-input-date__popover[data-placement="top"] {
2361
+ bottom: calc(100% + 8px);
2362
+ }
2363
+
2364
+ .leaf-input-date__popover[data-align="start"] {
2365
+ left: 0;
2366
+ }
2367
+
2368
+ .leaf-input-date__popover[data-align="end"] {
2369
+ right: 0;
2370
+ }
2371
+
2372
+ .leaf-input-date[data-open="true"] .leaf-input:not([data-invalid="true"]) {
2373
+ --leaf-input-border: var(--text-highlight);
2374
+ --leaf-input-label: var(--text-highlight);
2375
+ }
2376
+
2377
+ .leaf-input-date[hidden] {
2378
+ display: none;
2379
+ }
2380
+ }
2381
+
2382
+ /* --- src/components/Input/input-otp.css --- */
2383
+
2384
+ /*
2385
+ * InputOtp — Figma 1146:2159 (PIN code).
2386
+ *
2387
+ * Ô 48×56, nền base-tertiary, chữ số heading-3. Focus → viền highlight; data-invalid → viền
2388
+ * đỏ mọi ô + message đỏ; data-disabled / :disabled → chữ secondary. Typography
2389
+ * (heading-3, body-5) là class Leaf trên markup.
2390
+ * HTML tĩnh: hành vi nhảy ô / dán nằm trong leaf.js (`data-leaf-input-otp`).
2391
+ */
2392
+
2393
+ @layer components {
2394
+ .leaf-input-otp {
2395
+ --leaf-input-otp-cell-width: 48px;
2396
+ --leaf-input-otp-cell-height: 56px;
2397
+ --leaf-input-otp-border: transparent;
2398
+ --leaf-input-otp-message: var(--text-secondary);
2399
+
2400
+ display: flex;
2401
+ flex-direction: column;
2402
+ gap: 8px;
2403
+ }
2404
+
2405
+ .leaf-input-otp__cells {
2406
+ display: flex;
2407
+ gap: 4px;
2408
+ }
2409
+
2410
+ .leaf-input-otp__cell {
2411
+ box-sizing: border-box;
2412
+ width: var(--leaf-input-otp-cell-width);
2413
+ height: var(--leaf-input-otp-cell-height);
2414
+ margin: 0;
2415
+ padding: 0;
2416
+ border: 1px solid var(--leaf-input-otp-border);
2417
+ border-radius: 12px;
2418
+ outline: none;
2419
+ background-color: var(--base-tertiary);
2420
+ color: var(--text-primary);
2421
+ text-align: center;
2422
+ caret-color: var(--text-highlight);
2423
+ appearance: none;
2424
+ -webkit-appearance: none;
2425
+ transition: border-color 0.15s ease;
2426
+ }
2427
+
2428
+ .leaf-input-otp__cell:focus {
2429
+ border-color: var(--text-highlight);
2430
+ }
2431
+
2432
+ .leaf-input-otp[data-invalid="true"] .leaf-input-otp__cell {
2433
+ border-color: var(--system-red);
2434
+ }
2435
+
2436
+ .leaf-input-otp__cell:disabled {
2437
+ color: var(--text-secondary);
2438
+ cursor: not-allowed;
2439
+ }
2440
+
2441
+ .leaf-input-otp__message {
2442
+ margin: 0;
2443
+ color: var(--leaf-input-otp-message);
2444
+ }
2445
+
2446
+ .leaf-input-otp[data-invalid="true"] {
2447
+ --leaf-input-otp-message: var(--system-red);
2448
+ }
2449
+
2450
+ .leaf-input-otp[hidden],
2451
+ .leaf-input-otp__cells[hidden] {
2452
+ display: none;
2453
+ }
2454
+ }
2455
+
2456
+ /* --- src/components/Input/input-stepper.css --- */
2457
+
2458
+ /*
2459
+ * InputStepper — Figma 1146:2159 (Buy / Sell).
2460
+ *
2461
+ * Tone qua data-tone (buy | sell — không có → base-tertiary); state qua :focus-within,
2462
+ * data-invalid, data-disabled, data-filled. Nền 280 × (py 4 · px 12), radius 12; icon −/+ 20px.
2463
+ * Label body-5 (secondary → primary khi focus), giá trị body-4-highlight (placeholder
2464
+ * secondary, đã nhập primary). Typography là class Leaf trên markup.
2465
+ * HTML tĩnh: −/+, mũi tên, format số nằm trong leaf.js (`data-leaf-input-stepper`).
2466
+ */
2467
+
2468
+ @layer components {
2469
+ .leaf-input-stepper {
2470
+ --leaf-input-stepper-width: 280px;
2471
+ --leaf-input-stepper-bg: var(--base-tertiary);
2472
+ --leaf-input-stepper-focus: var(--text-highlight);
2473
+ --leaf-input-stepper-border: transparent;
2474
+ --leaf-input-stepper-label: var(--text-secondary);
2475
+ --leaf-input-stepper-fg: var(--text-primary);
2476
+ --leaf-input-stepper-icon: var(--text-primary);
2477
+ --leaf-input-stepper-message: var(--text-secondary);
2478
+
2479
+ display: flex;
2480
+ flex-direction: column;
2481
+ gap: 4px;
2482
+ width: var(--leaf-input-stepper-width);
2483
+ max-width: 100%;
2484
+ }
2485
+
2486
+ .leaf-input-stepper[data-tone="buy"] {
2487
+ --leaf-input-stepper-bg: var(--system-green-secondary);
2488
+ }
2489
+
2490
+ .leaf-input-stepper[data-tone="sell"] {
2491
+ --leaf-input-stepper-bg: var(--system-red-secondary);
2492
+ --leaf-input-stepper-focus: var(--system-red);
2493
+ }
2494
+
2495
+ .leaf-input-stepper__shell {
1567
2496
  display: flex;
1568
2497
  align-items: center;
1569
2498
  gap: 8px;
@@ -1961,10 +2890,225 @@
1961
2890
  max-width: 100%;
1962
2891
  }
1963
2892
 
1964
- /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
1965
- .leaf-logo[hidden] {
1966
- display: none;
1967
- }
2893
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
2894
+ .leaf-logo[hidden] {
2895
+ display: none;
2896
+ }
2897
+ }
2898
+
2899
+ /* --- src/components/MultiSelect/multiselect.css --- */
2900
+
2901
+ /*
2902
+ * MultiSelect — chip trên trigger + filter trong panel.
2903
+ * Panel / option dùng class `leaf-dropdown*` từ dropdown.css. Rule đè class của Dropdown scope
2904
+ * dưới `.leaf-multiselect` để thắng bằng specificity, không phụ thuộc thứ tự import file CSS.
2905
+ */
2906
+
2907
+ @layer components {
2908
+ .leaf-multiselect__chips[hidden],
2909
+ .leaf-multiselect__chip[hidden],
2910
+ .leaf-multiselect__chip-remove[hidden],
2911
+ .leaf-multiselect__chip-icon[hidden],
2912
+ .leaf-multiselect__options[hidden],
2913
+ .leaf-multiselect .leaf-multiselect__panel[hidden] {
2914
+ display: none;
2915
+ }
2916
+
2917
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] {
2918
+ cursor: not-allowed;
2919
+ color: var(--text-tertiary);
2920
+ }
2921
+
2922
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] .leaf-dropdown__value,
2923
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] .leaf-dropdown__chevron {
2924
+ color: var(--text-tertiary);
2925
+ }
2926
+
2927
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] .leaf-multiselect__chip {
2928
+ color: var(--text-tertiary);
2929
+ }
2930
+
2931
+ .leaf-multiselect .leaf-dropdown__value.leaf-multiselect__value {
2932
+ overflow: visible;
2933
+ text-overflow: unset;
2934
+ white-space: normal;
2935
+ }
2936
+
2937
+ .leaf-multiselect__chips {
2938
+ display: flex;
2939
+ flex-wrap: wrap;
2940
+ gap: 6px;
2941
+ align-items: center;
2942
+ min-width: 0;
2943
+ /* Chip cao line-height + 2×2px padding: bù để trigger một hàng chip cao bằng lúc trống. */
2944
+ margin-block: -2px;
2945
+ }
2946
+
2947
+ .leaf-multiselect__chip {
2948
+ display: inline-flex;
2949
+ align-items: center;
2950
+ gap: 4px;
2951
+ max-width: 100%;
2952
+ padding: 2px 6px 2px 8px;
2953
+ box-sizing: border-box;
2954
+ border-radius: 8px;
2955
+ background-color: var(--base-tertiary);
2956
+ color: var(--text-primary);
2957
+ font-weight: var(--leaf-dropdown-weight);
2958
+ }
2959
+
2960
+ .leaf-multiselect__chip-label {
2961
+ min-width: 0;
2962
+ overflow: hidden;
2963
+ text-overflow: ellipsis;
2964
+ white-space: nowrap;
2965
+ }
2966
+
2967
+ .leaf-multiselect__chip-remove {
2968
+ display: inline-flex;
2969
+ flex-shrink: 0;
2970
+ align-items: center;
2971
+ justify-content: center;
2972
+ margin: 0;
2973
+ padding: 0;
2974
+ border: none;
2975
+ border-radius: 4px;
2976
+ background: transparent;
2977
+ color: var(--text-secondary);
2978
+ cursor: pointer;
2979
+ }
2980
+
2981
+ .leaf-multiselect__chip-remove:hover {
2982
+ color: var(--text-primary);
2983
+ }
2984
+
2985
+ .leaf-multiselect__chip-icon {
2986
+ display: block;
2987
+ width: 14px;
2988
+ height: 14px;
2989
+ }
2990
+
2991
+ .leaf-multiselect .leaf-multiselect__panel {
2992
+ /* list là div bọc filter + ul — giữ cuộn trên toàn panel */
2993
+ overflow: hidden;
2994
+ display: flex;
2995
+ flex-direction: column;
2996
+ padding: 0;
2997
+ }
2998
+
2999
+ .leaf-multiselect__filter {
3000
+ flex-shrink: 0;
3001
+ padding: 8px 12px;
3002
+ border-bottom: 1px solid var(--base-tertiary);
3003
+ }
3004
+
3005
+ .leaf-multiselect__filter-input {
3006
+ width: 100%;
3007
+ margin: 0;
3008
+ padding: 6px 8px;
3009
+ box-sizing: border-box;
3010
+ border: 1px solid var(--base-quaternary);
3011
+ border-radius: 8px;
3012
+ background-color: var(--base-primary);
3013
+ color: var(--text-primary);
3014
+ font: inherit;
3015
+ font-weight: var(--leaf-dropdown-weight);
3016
+ outline: none;
3017
+ }
3018
+
3019
+ .leaf-multiselect__filter-input::placeholder {
3020
+ color: var(--text-secondary);
3021
+ }
3022
+
3023
+ .leaf-multiselect__filter-input:focus {
3024
+ border-color: var(--text-highlight);
3025
+ }
3026
+
3027
+ .leaf-multiselect__options {
3028
+ display: flex;
3029
+ flex-direction: column;
3030
+ flex: 1 1 auto;
3031
+ min-height: 0;
3032
+ margin: 0;
3033
+ padding: 0;
3034
+ overflow-y: auto;
3035
+ list-style: none;
3036
+ }
3037
+
3038
+ .leaf-multiselect .leaf-dropdown__option.leaf-multiselect__empty {
3039
+ cursor: default;
3040
+ color: var(--text-tertiary);
3041
+ }
3042
+ }
3043
+
3044
+ /* --- src/components/Number/number.css --- */
3045
+
3046
+ /*
3047
+ * Number — thẻ span/data hiển thị số.
3048
+ *
3049
+ * Typography / màu chữ steady dùng class Leaf có sẵn (body-*, text-*).
3050
+ * Flash realtime: data-flash + data-color → nền color-mix 70% token Leaf + chữ --text-primary.
3051
+ */
3052
+
3053
+ @layer components {
3054
+ .leaf-number {
3055
+ display: inline;
3056
+ }
3057
+
3058
+ .leaf-number[data-flash] {
3059
+ color: var(--text-primary);
3060
+ }
3061
+
3062
+ .leaf-number[data-flash][data-color="highlight"] {
3063
+ background-color: color-mix(in srgb, var(--text-highlight) 70%, transparent);
3064
+ }
3065
+
3066
+ .leaf-number[data-flash][data-color="blue"] {
3067
+ background-color: color-mix(in srgb, var(--system-blue) 70%, transparent);
3068
+ }
3069
+
3070
+ .leaf-number[data-flash][data-color="green"] {
3071
+ background-color: color-mix(in srgb, var(--system-green) 70%, transparent);
3072
+ }
3073
+
3074
+ .leaf-number[data-flash][data-color="yellow"] {
3075
+ background-color: color-mix(in srgb, var(--system-yellow) 70%, transparent);
3076
+ }
3077
+
3078
+ .leaf-number[data-flash][data-color="orange"] {
3079
+ background-color: color-mix(in srgb, var(--system-orange) 70%, transparent);
3080
+ }
3081
+
3082
+ .leaf-number[data-flash][data-color="red"] {
3083
+ background-color: color-mix(in srgb, var(--system-red) 70%, transparent);
3084
+ }
3085
+
3086
+ .leaf-number[data-flash][data-color="purple"] {
3087
+ background-color: color-mix(in srgb, var(--system-purple) 70%, transparent);
3088
+ }
3089
+
3090
+ .leaf-number[hidden] {
3091
+ display: none;
3092
+ }
3093
+ }
3094
+
3095
+ /* --- src/components/QrCode/qr-code.css --- */
3096
+
3097
+ .leaf-qr-code {
3098
+ display: inline-flex;
3099
+ width: var(--leaf-qr-size, 192px);
3100
+ height: var(--leaf-qr-size, 192px);
3101
+ line-height: 0;
3102
+ }
3103
+
3104
+ .leaf-qr-code svg {
3105
+ display: block;
3106
+ width: 100%;
3107
+ height: 100%;
3108
+ }
3109
+
3110
+ .leaf-qr-code__module {
3111
+ fill: currentColor;
1968
3112
  }
1969
3113
 
1970
3114
  /* --- src/components/Radio/radio.css --- */
@@ -2125,6 +3269,14 @@
2125
3269
  );
2126
3270
  animation: leaf-skeleton-shimmer 2s infinite ease-in-out;
2127
3271
  }
3272
+
3273
+ /* Giảm chuyển động: bỏ shimmer, giữ nền placeholder tĩnh. */
3274
+ @media (prefers-reduced-motion: reduce) {
3275
+ .leaf-skeleton__shimmer {
3276
+ display: none;
3277
+ animation: none;
3278
+ }
3279
+ }
2128
3280
  }
2129
3281
 
2130
3282
  @keyframes leaf-skeleton-shimmer {
@@ -2144,7 +3296,8 @@
2144
3296
  * Giá trị liên tục trên rail (kéo / click chính xác tới từng step — như
2145
3297
  * TradeQuickSlider). Mốc chia đều đặt tuyệt đối theo `left: <%>`; thumb đặt ở
2146
3298
  * `--leaf-slider-fill`. Ở min thumb = `--text-primary`; khi > min =
2147
- * `--leaf-slider-active` (mặc định `--text-highlight`).
3299
+ * `--leaf-slider-active` (mặc định `--text-highlight`). Prop / attribute `data-color`
3300
+ * nhận hậu tố class `text-*` Leaf và map sang token tương ứng.
2148
3301
  *
2149
3302
  * Rail, mốc và thumb cùng nằm trong vùng lùi vào `--leaf-slider-inset` ở hai đầu
2150
3303
  * (nửa thumb) — nhờ vậy `left: X%` của cả ba khớp nhau và thumb không tràn ra ngoài.
@@ -2178,6 +3331,59 @@
2178
3331
  -webkit-user-select: none;
2179
3332
  }
2180
3333
 
3334
+ /* data-color = hậu tố text-* Leaf → --leaf-slider-active */
3335
+ .leaf-slider[data-color="highlight"] {
3336
+ --leaf-slider-active: var(--text-highlight);
3337
+ }
3338
+ .leaf-slider[data-color="primary"] {
3339
+ --leaf-slider-active: var(--text-primary);
3340
+ }
3341
+ .leaf-slider[data-color="secondary"] {
3342
+ --leaf-slider-active: var(--text-secondary);
3343
+ }
3344
+ .leaf-slider[data-color="tertiary"] {
3345
+ --leaf-slider-active: var(--text-tertiary);
3346
+ }
3347
+ .leaf-slider[data-color="quaternary"] {
3348
+ --leaf-slider-active: var(--text-quaternary);
3349
+ }
3350
+ .leaf-slider[data-color="blue"] {
3351
+ --leaf-slider-active: var(--system-blue);
3352
+ }
3353
+ .leaf-slider[data-color="green"] {
3354
+ --leaf-slider-active: var(--system-green);
3355
+ }
3356
+ .leaf-slider[data-color="yellow"] {
3357
+ --leaf-slider-active: var(--system-yellow);
3358
+ }
3359
+ .leaf-slider[data-color="orange"] {
3360
+ --leaf-slider-active: var(--system-orange);
3361
+ }
3362
+ .leaf-slider[data-color="red"] {
3363
+ --leaf-slider-active: var(--system-red);
3364
+ }
3365
+ .leaf-slider[data-color="purple"] {
3366
+ --leaf-slider-active: var(--system-purple);
3367
+ }
3368
+ .leaf-slider[data-color="blue-secondary"] {
3369
+ --leaf-slider-active: var(--system-blue-secondary);
3370
+ }
3371
+ .leaf-slider[data-color="green-secondary"] {
3372
+ --leaf-slider-active: var(--system-green-secondary);
3373
+ }
3374
+ .leaf-slider[data-color="yellow-secondary"] {
3375
+ --leaf-slider-active: var(--system-yellow-secondary);
3376
+ }
3377
+ .leaf-slider[data-color="orange-secondary"] {
3378
+ --leaf-slider-active: var(--system-orange-secondary);
3379
+ }
3380
+ .leaf-slider[data-color="red-secondary"] {
3381
+ --leaf-slider-active: var(--system-red-secondary);
3382
+ }
3383
+ .leaf-slider[data-color="purple-secondary"] {
3384
+ --leaf-slider-active: var(--system-purple-secondary);
3385
+ }
3386
+
2181
3387
  /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
2182
3388
  .leaf-slider[hidden],
2183
3389
  .leaf-slider__header[hidden],
@@ -2390,7 +3596,7 @@
2390
3596
  *
2391
3597
  * Variant animation qua data-animation; size qua data-size; overlay fullscreen
2392
3598
  * qua .leaf-spinner-overlay. Màu mặc định trắng (dark) / đen (light) qua --base-quinary —
2393
- * không dùng highlight; override bằng class text-* khi cần. Thiếu attribute → md · spin.
3599
+ * không dùng highlight; React đổi màu qua prop `color` (class `text-*`). Thiếu attribute → md · spin.
2394
3600
  */
2395
3601
 
2396
3602
  @layer components {
@@ -2470,6 +3676,14 @@
2470
3676
  .leaf-spinner[data-animation="breathe"] .leaf-spinner__icon {
2471
3677
  animation: leaf-spinner-breathe 1.2s ease-in-out infinite;
2472
3678
  }
3679
+
3680
+ /* Giảm chuyển động: vẫn còn tín hiệu "đang tải" nhưng chậm hẳn lại. */
3681
+ @media (prefers-reduced-motion: reduce) {
3682
+ .leaf-spinner[data-animation] .leaf-spinner__icon,
3683
+ .leaf-spinner:not([data-animation]) .leaf-spinner__icon {
3684
+ animation-duration: 3s;
3685
+ }
3686
+ }
2473
3687
  }
2474
3688
 
2475
3689
  @keyframes leaf-spinner-spin {
@@ -2571,6 +3785,13 @@
2571
3785
  font-family: var(--font-sans);
2572
3786
  box-sizing: border-box;
2573
3787
  appearance: none;
3788
+ outline: none;
3789
+ }
3790
+
3791
+ /* Chỉ báo focus bàn phím (WCAG 2.4.7) — :focus-visible nên click chuột không hiện ring. */
3792
+ .leaf-tab:focus-visible {
3793
+ outline: 2px solid var(--text-highlight);
3794
+ outline-offset: 2px;
2574
3795
  }
2575
3796
 
2576
3797
  /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
@@ -2749,6 +3970,32 @@
2749
3970
  }
2750
3971
  }
2751
3972
 
3973
+ /* --- src/components/Textarea/textarea.css --- */
3974
+
3975
+ /*
3976
+ * Textarea — neo Input field (cùng token / shell / state).
3977
+ * Root: .leaf-input.leaf-textarea — cần import input.css trước (hoặc styles.css).
3978
+ */
3979
+
3980
+ @layer components {
3981
+ .leaf-textarea .leaf-input__shell {
3982
+ align-items: flex-start;
3983
+ min-height: 96px;
3984
+ cursor: text;
3985
+ }
3986
+
3987
+ .leaf-textarea .leaf-input__main {
3988
+ align-items: stretch;
3989
+ width: 100%;
3990
+ }
3991
+
3992
+ .leaf-textarea__control {
3993
+ min-height: 64px;
3994
+ resize: vertical;
3995
+ field-sizing: content;
3996
+ }
3997
+ }
3998
+
2752
3999
  /* --- src/components/Toast/toast.css --- */
2753
4000
 
2754
4001
  /*
@@ -3308,6 +4555,321 @@
3308
4555
  }
3309
4556
  }
3310
4557
 
4558
+ /* --- src/components/Upload/upload.css --- */
4559
+
4560
+ /*
4561
+ * Upload — dropzone trong khung; count / error nằm trong zone.
4562
+ * List file (`showFileList`) optional bên dưới — icon xoá delete-bin-line.
4563
+ */
4564
+
4565
+ @layer components {
4566
+ .leaf-upload {
4567
+ --leaf-upload-bg: transparent;
4568
+ --leaf-upload-border: var(--text-highlight);
4569
+ --leaf-upload-fg: var(--text-primary);
4570
+ --leaf-upload-muted: var(--text-secondary);
4571
+ --leaf-upload-icon: var(--text-highlight);
4572
+ --leaf-upload-icon-bg: color-mix(in srgb, var(--text-highlight) 18%, transparent);
4573
+ --leaf-upload-radius: 12px;
4574
+ --leaf-upload-min-height: 160px;
4575
+
4576
+ position: relative;
4577
+ display: flex;
4578
+ flex-direction: column;
4579
+ gap: 8px;
4580
+ min-width: 0;
4581
+ }
4582
+
4583
+ .leaf-upload[hidden],
4584
+ .leaf-upload__zone[hidden],
4585
+ .leaf-upload__icon[hidden],
4586
+ .leaf-upload__icon > svg[hidden],
4587
+ .leaf-upload__list[hidden],
4588
+ .leaf-upload__file[hidden],
4589
+ .leaf-upload__remove[hidden],
4590
+ .leaf-upload__remove > svg[hidden] {
4591
+ display: none;
4592
+ }
4593
+
4594
+ .leaf-upload__label {
4595
+ color: var(--text-tertiary);
4596
+ }
4597
+
4598
+ .leaf-upload[data-filled="true"] .leaf-upload__label {
4599
+ color: var(--text-primary);
4600
+ }
4601
+
4602
+ .leaf-upload__zone {
4603
+ display: flex;
4604
+ flex-direction: column;
4605
+ align-items: center;
4606
+ justify-content: center;
4607
+ gap: 10px;
4608
+ box-sizing: border-box;
4609
+ width: 100%;
4610
+ min-height: var(--leaf-upload-min-height);
4611
+ padding: 24px 16px;
4612
+ border: 1.5px dashed var(--leaf-upload-border);
4613
+ border-radius: var(--leaf-upload-radius);
4614
+ background-color: var(--leaf-upload-bg);
4615
+ color: var(--leaf-upload-fg);
4616
+ text-align: center;
4617
+ cursor: pointer;
4618
+ transition:
4619
+ border-color 0.15s ease,
4620
+ color 0.15s ease,
4621
+ box-shadow 0.15s ease;
4622
+ }
4623
+
4624
+ .leaf-upload:not([data-disabled="true"]):not([data-at-max="true"]) .leaf-upload__zone:hover {
4625
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-highlight) 16%, transparent);
4626
+ }
4627
+
4628
+ .leaf-upload__zone:focus-visible {
4629
+ outline: 2px solid var(--text-highlight);
4630
+ outline-offset: 2px;
4631
+ }
4632
+
4633
+ .leaf-upload__icon {
4634
+ display: inline-flex;
4635
+ align-items: center;
4636
+ justify-content: center;
4637
+ width: 56px;
4638
+ height: 56px;
4639
+ border-radius: 999px;
4640
+ background-color: var(--leaf-upload-icon-bg);
4641
+ font-size: 28px;
4642
+ line-height: 1;
4643
+ color: var(--leaf-upload-icon);
4644
+ }
4645
+
4646
+ .leaf-upload__icon > svg {
4647
+ display: block;
4648
+ width: 1em;
4649
+ height: 1em;
4650
+ }
4651
+
4652
+ .leaf-upload__title,
4653
+ .leaf-upload__formats,
4654
+ .leaf-upload__count,
4655
+ .leaf-upload__error {
4656
+ margin: 0;
4657
+ max-width: 100%;
4658
+ }
4659
+
4660
+ .leaf-upload__title {
4661
+ color: var(--leaf-upload-fg);
4662
+ }
4663
+
4664
+ .leaf-upload__formats {
4665
+ color: var(--leaf-upload-muted);
4666
+ }
4667
+
4668
+ .leaf-upload__count {
4669
+ color: var(--text-highlight);
4670
+ }
4671
+
4672
+ .leaf-upload__error {
4673
+ color: var(--system-red);
4674
+ }
4675
+
4676
+ /* Một file: tên + nút xoá trong khung, căn giữa; tên dài cắt "…". */
4677
+ .leaf-upload__file {
4678
+ display: inline-flex;
4679
+ align-items: center;
4680
+ gap: 4px;
4681
+ max-width: 100%;
4682
+ min-width: 0;
4683
+ }
4684
+
4685
+ .leaf-upload__file > .leaf-upload__file-name {
4686
+ flex: 0 1 auto;
4687
+ color: var(--leaf-upload-fg);
4688
+ text-align: center;
4689
+ }
4690
+
4691
+ .leaf-upload__list {
4692
+ display: flex;
4693
+ flex-direction: column;
4694
+ gap: 8px;
4695
+ min-width: 0;
4696
+ }
4697
+
4698
+ .leaf-upload__list-label {
4699
+ color: var(--text-secondary);
4700
+ }
4701
+
4702
+ .leaf-upload__list-items {
4703
+ margin: 0;
4704
+ padding: 0;
4705
+ list-style: none;
4706
+ border: 1px solid var(--base-quaternary);
4707
+ border-radius: var(--leaf-upload-radius);
4708
+ overflow: hidden;
4709
+ }
4710
+
4711
+ .leaf-upload__list-item {
4712
+ display: flex;
4713
+ align-items: center;
4714
+ gap: 8px;
4715
+ padding: 10px 12px;
4716
+ border-bottom: 1px solid var(--base-quaternary);
4717
+ background-color: transparent;
4718
+ }
4719
+
4720
+ .leaf-upload__list-item:last-child {
4721
+ border-bottom: none;
4722
+ }
4723
+
4724
+ .leaf-upload__file-name {
4725
+ flex: 1;
4726
+ min-width: 0;
4727
+ overflow: hidden;
4728
+ text-overflow: ellipsis;
4729
+ white-space: nowrap;
4730
+ color: var(--text-primary);
4731
+ text-align: left;
4732
+ }
4733
+
4734
+ .leaf-upload__remove,
4735
+ .leaf-upload__view {
4736
+ display: inline-flex;
4737
+ align-items: center;
4738
+ justify-content: center;
4739
+ flex-shrink: 0;
4740
+ width: 28px;
4741
+ height: 28px;
4742
+ margin: 0;
4743
+ padding: 0;
4744
+ border: none;
4745
+ border-radius: 999px;
4746
+ background: transparent;
4747
+ color: var(--text-secondary);
4748
+ cursor: pointer;
4749
+ appearance: none;
4750
+ font-size: 16px;
4751
+ line-height: 1;
4752
+ }
4753
+
4754
+ .leaf-upload__remove > svg,
4755
+ .leaf-upload__view > svg {
4756
+ display: block;
4757
+ width: 1em;
4758
+ height: 1em;
4759
+ }
4760
+
4761
+ .leaf-upload__remove:hover {
4762
+ color: var(--system-red);
4763
+ background-color: color-mix(in srgb, var(--system-red) 12%, transparent);
4764
+ }
4765
+
4766
+ .leaf-upload__view:hover {
4767
+ color: var(--text-highlight);
4768
+ background-color: color-mix(in srgb, var(--text-highlight) 12%, transparent);
4769
+ }
4770
+
4771
+ .leaf-upload__remove:focus-visible,
4772
+ .leaf-upload__view:focus-visible {
4773
+ outline: 2px solid var(--text-highlight);
4774
+ outline-offset: 2px;
4775
+ }
4776
+
4777
+ /* Preview: thumbnail ảnh (hoặc icon file) + dung lượng trước tên file. */
4778
+ .leaf-upload__thumb {
4779
+ display: inline-flex;
4780
+ align-items: center;
4781
+ justify-content: center;
4782
+ flex-shrink: 0;
4783
+ width: 32px;
4784
+ height: 32px;
4785
+ overflow: hidden;
4786
+ border-radius: 6px;
4787
+ background-color: var(--base-tertiary);
4788
+ color: var(--text-secondary);
4789
+ font-size: 16px;
4790
+ }
4791
+
4792
+ .leaf-upload__thumb > img {
4793
+ display: block;
4794
+ width: 100%;
4795
+ height: 100%;
4796
+ object-fit: cover;
4797
+ }
4798
+
4799
+ .leaf-upload__thumb > svg {
4800
+ display: block;
4801
+ width: 1em;
4802
+ height: 1em;
4803
+ }
4804
+
4805
+ .leaf-upload__size {
4806
+ flex-shrink: 0;
4807
+ color: var(--text-secondary);
4808
+ }
4809
+
4810
+ .leaf-upload__input {
4811
+ position: absolute;
4812
+ width: 1px;
4813
+ height: 1px;
4814
+ padding: 0;
4815
+ margin: -1px;
4816
+ overflow: hidden;
4817
+ clip: rect(0, 0, 0, 0);
4818
+ white-space: nowrap;
4819
+ border: 0;
4820
+ }
4821
+
4822
+ /* ── State ───────────────────────────────────────────────────────────── */
4823
+
4824
+ .leaf-upload[data-dragging="true"] .leaf-upload__zone {
4825
+ --leaf-upload-border: var(--text-highlight);
4826
+ --leaf-upload-icon: var(--text-highlight);
4827
+ --leaf-upload-fg: var(--text-highlight);
4828
+ border-style: solid;
4829
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-highlight) 20%, transparent);
4830
+ }
4831
+
4832
+ .leaf-upload[data-invalid="true"] {
4833
+ --leaf-upload-border: var(--system-red);
4834
+ --leaf-upload-icon: var(--system-red);
4835
+ --leaf-upload-icon-bg: color-mix(in srgb, var(--system-red) 16%, transparent);
4836
+ }
4837
+
4838
+ .leaf-upload[data-invalid="true"] .leaf-upload__label,
4839
+ .leaf-upload[data-invalid="true"] .leaf-upload__count {
4840
+ color: var(--system-red);
4841
+ }
4842
+
4843
+ .leaf-upload[data-invalid="true"]:not([data-disabled="true"]):not([data-at-max="true"])
4844
+ .leaf-upload__zone:hover {
4845
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--system-red) 16%, transparent);
4846
+ }
4847
+
4848
+ .leaf-upload[data-disabled="true"],
4849
+ .leaf-upload[data-at-max="true"] {
4850
+ --leaf-upload-border: var(--base-quaternary);
4851
+ --leaf-upload-fg: var(--text-secondary);
4852
+ --leaf-upload-muted: var(--text-tertiary);
4853
+ --leaf-upload-icon: var(--text-tertiary);
4854
+ --leaf-upload-icon-bg: var(--base-tertiary);
4855
+ }
4856
+
4857
+ .leaf-upload[data-disabled="true"] .leaf-upload__label,
4858
+ .leaf-upload[data-at-max="true"] .leaf-upload__label {
4859
+ color: var(--text-tertiary);
4860
+ }
4861
+
4862
+ .leaf-upload[data-disabled="true"] .leaf-upload__zone,
4863
+ .leaf-upload[data-at-max="true"] .leaf-upload__zone {
4864
+ cursor: not-allowed;
4865
+ box-shadow: none;
4866
+ }
4867
+
4868
+ .leaf-upload[data-disabled="true"] .leaf-upload__remove {
4869
+ display: none;
4870
+ }
4871
+ }
4872
+
3311
4873
  /* --- src/styles/color.css --- */
3312
4874
 
3313
4875
  /*
@@ -3566,6 +5128,22 @@
3566
5128
  }
3567
5129
  }
3568
5130
 
5131
+ /* --- src/styles/focus.css --- */
5132
+
5133
+ /*
5134
+ * Leaf — không hiện outline khi focus bằng chuột / chạm trên control `.leaf-*`.
5135
+ *
5136
+ * Chỉ `:focus:not(:focus-visible)`: focus bằng bàn phím (`:focus-visible`) vẫn có ring token do
5137
+ * CSS từng component vẽ (WCAG 2.4.7). Chỉ nhắm chính phần tử có class `leaf-*`, KHÔNG nhắm phần
5138
+ * tử con — nút / link của app nằm trong Dialog, `.leaf-form`… giữ nguyên focus ring của app.
5139
+ */
5140
+
5141
+ @layer components {
5142
+ :where([class^="leaf-"], [class*=" leaf-"]):focus:not(:focus-visible) {
5143
+ outline: none;
5144
+ }
5145
+ }
5146
+
3569
5147
  /* --- src/styles/typography.css --- */
3570
5148
 
3571
5149
  /*