@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/classes.css CHANGED
@@ -61,6 +61,13 @@
61
61
  vertical-align: middle;
62
62
  text-decoration: none;
63
63
  appearance: none;
64
+ outline: none;
65
+ }
66
+
67
+ /* Chỉ báo focus bàn phím (WCAG 2.4.7) — :focus-visible nên click chuột không hiện ring. */
68
+ .leaf-button:focus-visible {
69
+ outline: 2px solid var(--text-highlight);
70
+ outline-offset: 2px;
64
71
  }
65
72
 
66
73
  .leaf-button__icon {
@@ -216,11 +223,11 @@
216
223
  /* --- src/components/Calendar/calendar.css --- */
217
224
 
218
225
  /*
219
- * Calendar — port từ vnsc Calendar (panel chọn ngày / giờ).
226
+ * Calendar — port từ vnsc Calendar (panel chọn ngày / giờ / tháng).
220
227
  *
221
228
  * Typography và màu tĩnh (nền, màu viền) là class Leaf trên markup. File này giữ khung
222
- * (padding, radius, độ dày viền), layout, size cố định (panel 256, ô 28, select 64), hover,
223
- * trạng thái ngày (data-selected / data-today / :disabled), vị trí dropdown
229
+ * (padding, radius, độ dày viền), layout, size cố định (panel 256, ô 28, ô tháng 40, select 64),
230
+ * hover, trạng thái ngày / tháng (data-selected / data-today / :disabled), vị trí dropdown
224
231
  * (data-placement), bóng đổ, reset button. Footer là `Button` (cần button.css).
225
232
  */
226
233
 
@@ -326,9 +333,10 @@
326
333
  color: var(--text-tertiary);
327
334
  }
328
335
 
336
+ /* Bóng theo token --overlay (80% alpha) × 44% ≈ độ đậm 35% trước đây. */
329
337
  .leaf-calendar__months,
330
338
  .leaf-calendar__list {
331
- box-shadow: 0 16px 40px rgb(0 0 0 / 0.35);
339
+ box-shadow: 0 16px 40px color-mix(in srgb, var(--overlay) 44%, transparent);
332
340
  }
333
341
 
334
342
  .leaf-calendar__months {
@@ -359,6 +367,15 @@
359
367
  gap: 4px;
360
368
  }
361
369
 
370
+ /* monthOnly — lưới 12 tháng thay cho lưới ngày. */
371
+ .leaf-calendar[data-month-only="true"] .leaf-calendar__months-grid {
372
+ row-gap: 8px;
373
+ }
374
+
375
+ .leaf-calendar[data-month-only="true"] .leaf-calendar__option {
376
+ height: 40px;
377
+ }
378
+
362
379
  .leaf-calendar__weekdays,
363
380
  .leaf-calendar__days {
364
381
  display: grid;
@@ -400,11 +417,12 @@
400
417
  }
401
418
 
402
419
  .leaf-calendar__day:not(:disabled):not([data-selected="true"]):hover,
403
- .leaf-calendar__option:not([data-selected="true"]):hover {
420
+ .leaf-calendar__option:not(:disabled):not([data-selected="true"]):hover {
404
421
  background-color: var(--base-tertiary);
405
422
  }
406
423
 
407
- .leaf-calendar__day[data-today="true"] {
424
+ .leaf-calendar__day[data-today="true"],
425
+ .leaf-calendar__option[data-today="true"] {
408
426
  border-color: var(--text-highlight);
409
427
  color: var(--text-highlight);
410
428
  }
@@ -417,7 +435,8 @@
417
435
  font-weight: var(--body-5-highlight-weight);
418
436
  }
419
437
 
420
- .leaf-calendar__day:disabled {
438
+ .leaf-calendar__day:disabled,
439
+ .leaf-calendar__option:disabled {
421
440
  border-color: transparent;
422
441
  background-color: transparent;
423
442
  color: var(--text-tertiary);
@@ -536,6 +555,148 @@
536
555
  }
537
556
  }
538
557
 
558
+ /* --- src/components/Carousel/carousel.css --- */
559
+
560
+ /*
561
+ * Carousel — cuộn ngang native, kéo khi free mode, snap khi free mode tắt.
562
+ * Nav dùng token semantic (--base-tertiary / --text-primary) để đổi đúng light/dark.
563
+ */
564
+
565
+ @layer components {
566
+ .leaf-carousel {
567
+ --leaf-carousel-space-between: 12px;
568
+ --leaf-carousel-slides-per-view: auto;
569
+
570
+ position: relative;
571
+ display: flex;
572
+ flex-direction: column;
573
+ width: 100%;
574
+ box-sizing: border-box;
575
+ }
576
+
577
+ .leaf-carousel__viewport {
578
+ overflow-x: auto;
579
+ overflow-y: hidden;
580
+ width: 100%;
581
+ -webkit-overflow-scrolling: touch;
582
+ scrollbar-width: none;
583
+ }
584
+
585
+ .leaf-carousel__viewport::-webkit-scrollbar {
586
+ display: none;
587
+ }
588
+
589
+ .leaf-carousel__viewport[data-free-mode="true"] {
590
+ touch-action: pan-y;
591
+ cursor: grab;
592
+ }
593
+
594
+ .leaf-carousel__viewport[data-free-mode="true"][data-dragging="true"] {
595
+ cursor: grabbing;
596
+ user-select: none;
597
+ -webkit-user-select: none;
598
+ }
599
+
600
+ .leaf-carousel__viewport[data-free-mode="false"] {
601
+ scroll-snap-type: x mandatory;
602
+ }
603
+
604
+ .leaf-carousel__track {
605
+ display: flex;
606
+ flex-direction: row;
607
+ align-items: stretch;
608
+ gap: var(--leaf-carousel-space-between);
609
+ width: max-content;
610
+ min-width: 100%;
611
+ box-sizing: border-box;
612
+ }
613
+
614
+ .leaf-carousel__slide {
615
+ flex: 0 0 auto;
616
+ box-sizing: border-box;
617
+ scroll-snap-align: start;
618
+ transform: scale(1);
619
+ opacity: 1;
620
+ transition:
621
+ transform 180ms ease,
622
+ opacity 180ms ease;
623
+ }
624
+
625
+ /* Kéo card: thu nhẹ + mờ nhẹ, thả tay transition về chỗ. */
626
+ .leaf-carousel__viewport[data-dragging="true"] .leaf-carousel__slide {
627
+ transform: scale(0.97);
628
+ opacity: 0.92;
629
+ }
630
+
631
+ .leaf-carousel[data-slides-per-view]:not([data-slides-per-view="auto"]) .leaf-carousel__slide {
632
+ flex: 0 0
633
+ calc(
634
+ (100% - (var(--leaf-carousel-slides-per-view) - 1) * var(--leaf-carousel-space-between)) /
635
+ var(--leaf-carousel-slides-per-view)
636
+ );
637
+ max-width: calc(
638
+ (100% - (var(--leaf-carousel-slides-per-view) - 1) * var(--leaf-carousel-space-between)) /
639
+ var(--leaf-carousel-slides-per-view)
640
+ );
641
+ }
642
+
643
+ .leaf-carousel__nav {
644
+ position: absolute;
645
+ top: 50%;
646
+ z-index: 1;
647
+ display: inline-flex;
648
+ align-items: center;
649
+ justify-content: center;
650
+ width: 28px;
651
+ height: 28px;
652
+ margin: 0;
653
+ padding: 0;
654
+ border: none;
655
+ border-radius: 999px;
656
+ /* Token semantic — đổi theo data-theme light/dark (không hard-code #fff). */
657
+ background-color: var(--base-tertiary);
658
+ color: var(--text-primary);
659
+ box-shadow: none;
660
+ transform: translateY(-50%);
661
+ cursor: pointer;
662
+ font: inherit;
663
+ appearance: none;
664
+ transition:
665
+ opacity 160ms ease,
666
+ background-color 160ms ease,
667
+ color 160ms ease;
668
+ }
669
+
670
+ .leaf-carousel__nav:focus-visible {
671
+ outline: 2px solid var(--text-highlight);
672
+ outline-offset: 2px;
673
+ }
674
+
675
+ .leaf-carousel__nav--prev {
676
+ left: 4px;
677
+ }
678
+
679
+ .leaf-carousel__nav--next {
680
+ right: 4px;
681
+ }
682
+
683
+ /* Icon nhỏ hơn ring (28px) — SVG RemixGlyph hoặc font <i class="ri-*">. */
684
+ .leaf-carousel__nav svg,
685
+ .leaf-carousel__nav i {
686
+ width: 14px;
687
+ height: 14px;
688
+ font-size: 14px;
689
+ line-height: 1;
690
+ display: block;
691
+ color: inherit;
692
+ }
693
+
694
+ .leaf-carousel__nav[data-nav-disabled="true"] {
695
+ opacity: 0;
696
+ pointer-events: none;
697
+ }
698
+ }
699
+
539
700
  /* --- src/components/Checkbox/checkbox.css --- */
540
701
 
541
702
  /*
@@ -666,6 +827,23 @@
666
827
  }
667
828
  }
668
829
 
830
+ /* --- src/components/Date/date.css --- */
831
+
832
+ /*
833
+ * Date — thẻ span/data hiển thị ngày đã format.
834
+ * Typography / màu dùng class Leaf (body-*, text-*).
835
+ */
836
+
837
+ @layer components {
838
+ .leaf-date {
839
+ display: inline;
840
+ }
841
+
842
+ .leaf-date[hidden] {
843
+ display: none;
844
+ }
845
+ }
846
+
669
847
  /* --- src/components/Dialog/dialog.css --- */
670
848
 
671
849
  /*
@@ -1139,169 +1317,920 @@
1139
1317
  .leaf-dropdown__option[aria-selected="true"] .leaf-dropdown__radio {
1140
1318
  opacity: 1;
1141
1319
  }
1142
- }
1143
1320
 
1144
- /* --- src/components/Input/input-date.css --- */
1321
+ /* ── Searchable (ô tìm trên trigger) ──────────────────────────────────── */
1145
1322
 
1146
- /*
1147
- * InputDate — Input trigger + popover Calendar.
1148
- *
1149
- * Popover neo theo khung trigger: dưới (data-placement="bottom", top = đáy khung qua
1150
- * --leaf-input-date-offset do React đo) hoặc lật lên trên (data-placement="top"). data-align
1151
- * căn trái / phải. data-open giữ viền + label highlight khi panel mở (invalid vẫn thắng).
1152
- * Phụ thuộc input.css + calendar.css.
1153
- */
1323
+ .leaf-dropdown[data-searchable="true"] .leaf-dropdown__trigger {
1324
+ cursor: text;
1325
+ }
1154
1326
 
1155
- @layer components {
1156
- .leaf-input-date {
1157
- position: relative;
1327
+ .leaf-dropdown[data-searchable="true"] .leaf-dropdown__trigger[data-readonly],
1328
+ .leaf-dropdown[data-searchable="true"][data-disabled="true"] .leaf-dropdown__trigger {
1329
+ cursor: default;
1158
1330
  }
1159
1331
 
1160
- .leaf-input-date__popover {
1161
- position: absolute;
1162
- z-index: var(--leaf-z-popover, 100);
1332
+ .leaf-dropdown[data-searchable="true"][data-disabled="true"] .leaf-dropdown__trigger {
1333
+ cursor: not-allowed;
1334
+ color: var(--text-tertiary);
1163
1335
  }
1164
1336
 
1165
- .leaf-input-date__popover[data-placement="bottom"] {
1166
- top: calc(var(--leaf-input-date-offset, 100%) + 8px);
1337
+ /* Ô nhập text (focus khớp cả khi click) → viền highlight như Input field, không outline. */
1338
+ .leaf-dropdown[data-searchable="true"]:not([data-invalid="true"])
1339
+ .leaf-dropdown__trigger:focus-within {
1340
+ outline: none;
1341
+ box-shadow: inset 0 0 0 1px var(--text-highlight);
1167
1342
  }
1168
1343
 
1169
- .leaf-input-date__popover[data-placement="top"] {
1170
- bottom: calc(100% + 8px);
1344
+ .leaf-dropdown[data-searchable="true"][data-appearance="outlined"]:not([data-invalid="true"])
1345
+ .leaf-dropdown__trigger:focus-within {
1346
+ border-color: var(--text-highlight);
1347
+ box-shadow: none;
1171
1348
  }
1172
1349
 
1173
- .leaf-input-date__popover[data-align="start"] {
1174
- left: 0;
1350
+ .leaf-dropdown__search {
1351
+ flex: 1 1 auto;
1352
+ min-width: 0;
1353
+ width: 100%;
1354
+ margin: 0;
1355
+ padding: 0;
1356
+ border: none;
1357
+ background: transparent;
1358
+ color: inherit;
1359
+ font: inherit;
1360
+ font-weight: inherit;
1361
+ outline: none;
1362
+ appearance: none;
1175
1363
  }
1176
1364
 
1177
- .leaf-input-date__popover[data-align="end"] {
1178
- right: 0;
1365
+ .leaf-dropdown__search::placeholder {
1366
+ color: var(--text-secondary);
1179
1367
  }
1180
1368
 
1181
- .leaf-input-date[data-open="true"] .leaf-input:not([data-invalid="true"]) {
1182
- --leaf-input-border: var(--text-highlight);
1183
- --leaf-input-label: var(--text-highlight);
1369
+ .leaf-dropdown__search:disabled {
1370
+ color: var(--text-tertiary);
1371
+ cursor: not-allowed;
1184
1372
  }
1185
1373
 
1186
- .leaf-input-date[hidden] {
1187
- display: none;
1374
+ .leaf-dropdown__search:disabled::placeholder {
1375
+ color: var(--text-tertiary);
1188
1376
  }
1189
- }
1190
1377
 
1191
- /* --- src/components/Input/input-otp.css --- */
1378
+ /* Thắng `.leaf-dropdown__option[aria-disabled="true"]` (cursor not-allowed). */
1379
+ .leaf-dropdown__option.leaf-dropdown__empty {
1380
+ cursor: default;
1381
+ color: var(--text-tertiary);
1382
+ }
1192
1383
 
1193
- /*
1194
- * InputOtp — Figma 1146:2159 (PIN code).
1195
- *
1196
- * Ô 48×56, nền base-tertiary, chữ số heading-3. Focus → viền highlight; data-invalid → viền
1197
- * đỏ mọi ô + message đỏ; data-disabled / :disabled → chữ secondary. Typography
1198
- * (heading-3, body-5) là class Leaf trên markup.
1199
- * HTML tĩnh: hành vi nhảy ô / dán nằm trong leaf.js (`data-leaf-input-otp`).
1200
- */
1384
+ .leaf-dropdown[data-searchable="true"][data-disabled="true"] .leaf-dropdown__chevron {
1385
+ color: var(--text-tertiary);
1386
+ }
1201
1387
 
1202
- @layer components {
1203
- .leaf-input-otp {
1204
- --leaf-input-otp-cell-width: 48px;
1205
- --leaf-input-otp-cell-height: 56px;
1206
- --leaf-input-otp-border: transparent;
1207
- --leaf-input-otp-message: var(--text-secondary);
1388
+ /* ── Invalid (mọi trigger field, không riêng searchable) ─────────────── */
1208
1389
 
1209
- display: flex;
1210
- flex-direction: column;
1211
- gap: 8px;
1390
+ .leaf-dropdown[data-trigger="field"][data-invalid="true"] .leaf-dropdown__trigger {
1391
+ box-shadow: inset 0 0 0 1px var(--system-red);
1212
1392
  }
1213
1393
 
1214
- .leaf-input-otp__cells {
1215
- display: flex;
1216
- gap: 4px;
1394
+ .leaf-dropdown[data-trigger="field"][data-invalid="true"][data-appearance="outlined"]
1395
+ .leaf-dropdown__trigger {
1396
+ border-color: var(--system-red);
1397
+ box-shadow: none;
1217
1398
  }
1218
1399
 
1219
- .leaf-input-otp__cell {
1220
- box-sizing: border-box;
1221
- width: var(--leaf-input-otp-cell-width);
1222
- height: var(--leaf-input-otp-cell-height);
1223
- margin: 0;
1224
- padding: 0;
1225
- border: 1px solid var(--leaf-input-otp-border);
1226
- border-radius: 12px;
1227
- outline: none;
1228
- background-color: var(--base-tertiary);
1229
- color: var(--text-primary);
1230
- text-align: center;
1231
- caret-color: var(--text-highlight);
1232
- appearance: none;
1233
- -webkit-appearance: none;
1234
- transition: border-color 0.15s ease;
1235
- }
1400
+ /* ── Message ─────────────────────────────────────────────────────────────
1401
+ * Gốc là flex hàng ngang → message phải xuống dòng. Dùng grid một cột: panel (absolute)
1402
+ * đặt vào hàng 1 nên containing block là ô của trigger — panel vẫn nằm ngay dưới trigger,
1403
+ * không bị message đẩy xuống. Khoảng cách 8px như Input.
1404
+ */
1236
1405
 
1237
- .leaf-input-otp__cell:focus {
1238
- border-color: var(--text-highlight);
1406
+ .leaf-dropdown[data-message="true"] {
1407
+ display: grid;
1408
+ grid-template-columns: minmax(0, 1fr);
1409
+ row-gap: 8px;
1239
1410
  }
1240
1411
 
1241
- .leaf-input-otp[data-invalid="true"] .leaf-input-otp__cell {
1242
- border-color: var(--system-red);
1412
+ .leaf-dropdown[data-trigger="text"][data-message="true"] {
1413
+ display: inline-grid;
1243
1414
  }
1244
1415
 
1245
- .leaf-input-otp__cell:disabled {
1246
- color: var(--text-secondary);
1247
- cursor: not-allowed;
1416
+ .leaf-dropdown[data-message="true"][hidden] {
1417
+ display: none;
1248
1418
  }
1249
1419
 
1250
- .leaf-input-otp__message {
1251
- margin: 0;
1252
- color: var(--leaf-input-otp-message);
1420
+ /* Ghi đủ "1 / 2": với phần tử absolute, line `auto` là mép container (gồm cả message). */
1421
+ .leaf-dropdown[data-message="true"] > .leaf-dropdown__trigger,
1422
+ .leaf-dropdown[data-message="true"] > .leaf-dropdown__list {
1423
+ grid-row: 1 / 2;
1424
+ grid-column: 1 / 2;
1253
1425
  }
1254
1426
 
1255
- .leaf-input-otp[data-invalid="true"] {
1256
- --leaf-input-otp-message: var(--system-red);
1427
+ .leaf-dropdown .leaf-dropdown__message {
1428
+ --leaf-input-message: var(--text-secondary);
1429
+ grid-row: 2 / 3;
1430
+ margin: 0;
1431
+ color: var(--leaf-input-message);
1257
1432
  }
1258
1433
 
1259
- .leaf-input-otp[hidden],
1260
- .leaf-input-otp__cells[hidden] {
1261
- display: none;
1434
+ .leaf-dropdown[data-invalid="true"] .leaf-dropdown__message {
1435
+ --leaf-input-message: var(--system-red);
1262
1436
  }
1263
1437
  }
1264
1438
 
1265
- /* --- src/components/Input/input-stepper.css --- */
1439
+ /* --- src/components/Empty/empty.css --- */
1266
1440
 
1267
1441
  /*
1268
- * InputStepper — Figma 1146:2159 (Buy / Sell).
1442
+ * Empty — trạng thái không có dữ liệu (illustration tuỳ chọn + description).
1269
1443
  *
1270
- * Tone qua data-tone (buy | sell — không có → base-tertiary); state qua :focus-within,
1271
- * data-invalid, data-disabled, data-filled. Nền 280 × (py 4 · px 12), radius 12; icon −/+ 20px.
1272
- * Label body-5 (secondary → primary khi focus), giá trị body-4-highlight (placeholder
1273
- * secondary, đã nhập primary). Typography là class Leaf trên markup.
1274
- * HTML tĩnh: −/+, mũi tên, format số nằm trong leaf.js (`data-leaf-input-stepper`).
1444
+ * data-size: md (mặc định) · sm — scale cả khung ảnh lẫn chữ description.
1445
+ * Ảnh CDN gắn trong React; HTML tĩnh tự <img> cùng URL.
1275
1446
  */
1276
1447
 
1277
1448
  @layer components {
1278
- .leaf-input-stepper {
1279
- --leaf-input-stepper-width: 280px;
1280
- --leaf-input-stepper-bg: var(--base-tertiary);
1281
- --leaf-input-stepper-focus: var(--text-highlight);
1282
- --leaf-input-stepper-border: transparent;
1283
- --leaf-input-stepper-label: var(--text-secondary);
1284
- --leaf-input-stepper-fg: var(--text-primary);
1285
- --leaf-input-stepper-icon: var(--text-primary);
1286
- --leaf-input-stepper-message: var(--text-secondary);
1449
+ .leaf-empty {
1450
+ --leaf-empty-image-size: 100px;
1451
+ --leaf-empty-description-size: var(--body-3-size);
1452
+ --leaf-empty-description-line-height: var(--body-3-line-height);
1287
1453
 
1454
+ box-sizing: border-box;
1288
1455
  display: flex;
1289
1456
  flex-direction: column;
1290
- gap: 4px;
1291
- width: var(--leaf-input-stepper-width);
1292
- max-width: 100%;
1457
+ align-items: center;
1458
+ justify-content: center;
1459
+ gap: 16px;
1460
+ width: 100%;
1461
+ height: 100%;
1462
+ margin: 0;
1463
+ padding: 0;
1464
+ text-align: center;
1293
1465
  }
1294
1466
 
1295
- .leaf-input-stepper[data-tone="buy"] {
1296
- --leaf-input-stepper-bg: var(--system-green-secondary);
1467
+ .leaf-empty[data-size="sm"] {
1468
+ --leaf-empty-image-size: 64px;
1469
+ --leaf-empty-description-size: var(--body-4-size);
1470
+ --leaf-empty-description-line-height: var(--body-4-line-height);
1471
+ gap: 12px;
1297
1472
  }
1298
1473
 
1299
- .leaf-input-stepper[data-tone="sell"] {
1300
- --leaf-input-stepper-bg: var(--system-red-secondary);
1301
- --leaf-input-stepper-focus: var(--system-red);
1474
+ .leaf-empty[data-size="md"],
1475
+ .leaf-empty:not([data-size]) {
1476
+ --leaf-empty-image-size: 100px;
1477
+ --leaf-empty-description-size: var(--body-3-size);
1478
+ --leaf-empty-description-line-height: var(--body-3-line-height);
1302
1479
  }
1303
1480
 
1304
- .leaf-input-stepper__shell {
1481
+ .leaf-empty__image {
1482
+ display: flex;
1483
+ flex-shrink: 0;
1484
+ align-items: center;
1485
+ justify-content: center;
1486
+ width: var(--leaf-empty-image-size);
1487
+ height: var(--leaf-empty-image-size);
1488
+ overflow: hidden;
1489
+ }
1490
+
1491
+ .leaf-empty__image > img {
1492
+ display: block;
1493
+ width: 100%;
1494
+ height: 100%;
1495
+ max-width: 100%;
1496
+ max-height: 100%;
1497
+ object-fit: contain;
1498
+ }
1499
+
1500
+ .leaf-empty__description {
1501
+ max-width: 28rem;
1502
+ margin: 0;
1503
+ color: var(--text-secondary);
1504
+ font-size: var(--leaf-empty-description-size);
1505
+ line-height: var(--leaf-empty-description-line-height);
1506
+ font-weight: var(--body-3-weight);
1507
+ overflow-wrap: anywhere;
1508
+ }
1509
+ }
1510
+
1511
+ /* --- src/components/FileViewer/file-viewer.css --- */
1512
+
1513
+ /*
1514
+ * FileViewer — xem file (PDF native, ảnh, video / audio, text, CSV / XLSX, DOCX) không thư viện ngoài.
1515
+ *
1516
+ * Root `.leaf-file-viewer`: data-state (idle · loading · ready · error · unsupported · external),
1517
+ * data-kind (pdf · image · …), data-fullscreen. Toàn bộ DOM bên trong do controller
1518
+ * (core/file/viewer.ts) dựng — React và leaf.js cùng markup. Nút toolbar là `Button` ghost sm,
1519
+ * loading là `Spinner`, sheet trống là `Empty` — cần import thêm button.css / spinner.css /
1520
+ * empty.css (hoặc styles.css).
1521
+ *
1522
+ * Kích thước: root theo `--leaf-file-viewer-height` (mặc định 480px), width 100%.
1523
+ */
1524
+
1525
+ @layer components {
1526
+ .leaf-file-viewer {
1527
+ --leaf-file-viewer-height: 480px;
1528
+ --leaf-file-viewer-radius: 12px;
1529
+ --leaf-file-viewer-border: var(--base-tertiary);
1530
+ --leaf-file-viewer-surface: var(--base-primary);
1531
+ --leaf-file-viewer-chrome: var(--base-secondary);
1532
+ --leaf-file-viewer-grid-line: var(--base-tertiary);
1533
+
1534
+ position: relative;
1535
+ display: flex;
1536
+ flex-direction: column;
1537
+ box-sizing: border-box;
1538
+ width: 100%;
1539
+ height: var(--leaf-file-viewer-height);
1540
+ min-height: 0;
1541
+ overflow: hidden;
1542
+ border: 1px solid var(--leaf-file-viewer-border);
1543
+ border-radius: var(--leaf-file-viewer-radius);
1544
+ background-color: var(--leaf-file-viewer-surface);
1545
+ color: var(--text-primary);
1546
+ font-family: var(--font-sans);
1547
+ }
1548
+
1549
+ /* Trong Dialog: lấp đầy body. */
1550
+ .leaf-dialog__body > .leaf-file-viewer {
1551
+ flex: 1 1 auto;
1552
+ }
1553
+
1554
+ .leaf-file-viewer[data-fullscreen="true"] {
1555
+ height: 100%;
1556
+ border: none;
1557
+ border-radius: 0;
1558
+ }
1559
+
1560
+ .leaf-file-viewer__toolbar {
1561
+ display: flex;
1562
+ flex-shrink: 0;
1563
+ align-items: center;
1564
+ gap: 12px;
1565
+ box-sizing: border-box;
1566
+ min-height: 44px;
1567
+ padding: 6px 8px 6px 16px;
1568
+ border-bottom: 1px solid var(--leaf-file-viewer-border);
1569
+ background-color: var(--leaf-file-viewer-chrome);
1570
+ }
1571
+
1572
+ .leaf-file-viewer__name {
1573
+ flex: 1 1 auto;
1574
+ min-width: 0;
1575
+ overflow: hidden;
1576
+ color: var(--text-primary);
1577
+ text-overflow: ellipsis;
1578
+ white-space: nowrap;
1579
+ }
1580
+
1581
+ .leaf-file-viewer__actions {
1582
+ display: flex;
1583
+ flex-shrink: 0;
1584
+ align-items: center;
1585
+ gap: 4px;
1586
+ max-width: 70%;
1587
+ overflow-x: auto;
1588
+ scrollbar-width: none;
1589
+ }
1590
+
1591
+ .leaf-file-viewer__actions::-webkit-scrollbar {
1592
+ display: none;
1593
+ }
1594
+
1595
+ .leaf-file-viewer__zoom {
1596
+ min-width: 44px;
1597
+ color: var(--text-secondary);
1598
+ text-align: center;
1599
+ font-variant-numeric: tabular-nums;
1600
+ }
1601
+
1602
+ .leaf-file-viewer__body {
1603
+ position: relative;
1604
+ display: flex;
1605
+ flex: 1 1 auto;
1606
+ min-height: 0;
1607
+ }
1608
+
1609
+ .leaf-file-viewer__content {
1610
+ --leaf-file-viewer-zoom: 1;
1611
+
1612
+ position: relative;
1613
+ flex: 1 1 auto;
1614
+ min-width: 0;
1615
+ min-height: 0;
1616
+ overflow: auto;
1617
+ outline: none;
1618
+ }
1619
+
1620
+ .leaf-file-viewer__content:focus-visible {
1621
+ outline: 2px solid var(--text-highlight);
1622
+ outline-offset: -2px;
1623
+ }
1624
+
1625
+ /* ── Trạng thái: loading · error · unsupported · external · idle ── */
1626
+
1627
+ .leaf-file-viewer__state {
1628
+ position: absolute;
1629
+ inset: 0;
1630
+ display: flex;
1631
+ flex-direction: column;
1632
+ align-items: center;
1633
+ justify-content: center;
1634
+ gap: 8px;
1635
+ box-sizing: border-box;
1636
+ padding: 24px;
1637
+ text-align: center;
1638
+ }
1639
+
1640
+ .leaf-file-viewer__state-icon {
1641
+ display: inline-flex;
1642
+ width: 40px;
1643
+ height: 40px;
1644
+ margin-bottom: 4px;
1645
+ color: var(--text-tertiary);
1646
+ }
1647
+
1648
+ .leaf-file-viewer__state[data-variant="error"] .leaf-file-viewer__state-icon {
1649
+ color: var(--system-red);
1650
+ }
1651
+
1652
+ .leaf-file-viewer__state-icon > svg {
1653
+ display: block;
1654
+ width: 100%;
1655
+ height: 100%;
1656
+ }
1657
+
1658
+ .leaf-file-viewer__message {
1659
+ margin: 0;
1660
+ color: var(--text-primary);
1661
+ }
1662
+
1663
+ .leaf-file-viewer__detail {
1664
+ max-width: 100%;
1665
+ margin: 0;
1666
+ overflow: hidden;
1667
+ color: var(--text-tertiary);
1668
+ text-overflow: ellipsis;
1669
+ white-space: nowrap;
1670
+ }
1671
+
1672
+ .leaf-file-viewer__state-actions {
1673
+ display: flex;
1674
+ flex-wrap: wrap;
1675
+ justify-content: center;
1676
+ gap: 8px;
1677
+ margin-top: 8px;
1678
+ }
1679
+
1680
+ /* ── Ảnh ── */
1681
+
1682
+ .leaf-file-viewer__stage {
1683
+ display: flex;
1684
+ align-items: center;
1685
+ justify-content: center;
1686
+ box-sizing: border-box;
1687
+ width: 100%;
1688
+ height: 100%;
1689
+ padding: 16px;
1690
+ overflow: hidden;
1691
+ touch-action: none;
1692
+ }
1693
+
1694
+ .leaf-file-viewer__stage[data-zoomed="true"] {
1695
+ cursor: grab;
1696
+ }
1697
+
1698
+ .leaf-file-viewer__stage[data-dragging="true"] {
1699
+ cursor: grabbing;
1700
+ user-select: none;
1701
+ -webkit-user-select: none;
1702
+ }
1703
+
1704
+ .leaf-file-viewer__image {
1705
+ display: block;
1706
+ max-width: 100%;
1707
+ max-height: 100%;
1708
+ object-fit: contain;
1709
+ transform-origin: center;
1710
+ transition: transform 0.15s ease-out;
1711
+ user-select: none;
1712
+ -webkit-user-select: none;
1713
+ }
1714
+
1715
+ .leaf-file-viewer__stage[data-dragging="true"] .leaf-file-viewer__image {
1716
+ transition: none;
1717
+ }
1718
+
1719
+ /* ── Video / audio / PDF ── */
1720
+
1721
+ .leaf-file-viewer__media {
1722
+ display: block;
1723
+ width: 100%;
1724
+ max-height: 100%;
1725
+ background-color: var(--leaf-file-viewer-chrome);
1726
+ }
1727
+
1728
+ audio.leaf-file-viewer__media {
1729
+ width: calc(100% - 32px);
1730
+ margin: 16px;
1731
+ background-color: transparent;
1732
+ }
1733
+
1734
+ .leaf-file-viewer__frame {
1735
+ display: block;
1736
+ width: 100%;
1737
+ height: 100%;
1738
+ border: none;
1739
+ background-color: var(--leaf-file-viewer-chrome);
1740
+ }
1741
+
1742
+ /* ── Text ── */
1743
+
1744
+ .leaf-file-viewer__text {
1745
+ box-sizing: border-box;
1746
+ min-height: 100%;
1747
+ margin: 0;
1748
+ padding: 16px;
1749
+ color: var(--text-primary);
1750
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
1751
+ font-size: calc(var(--body-4-size) * var(--leaf-file-viewer-zoom));
1752
+ line-height: 1.6;
1753
+ white-space: pre-wrap;
1754
+ overflow-wrap: anywhere;
1755
+ tab-size: 4;
1756
+ }
1757
+
1758
+ /* ── Bảng tính ── */
1759
+
1760
+ .leaf-file-viewer__table {
1761
+ --leaf-file-viewer-row-height: 28px;
1762
+
1763
+ border-collapse: separate;
1764
+ border-spacing: 0;
1765
+ table-layout: fixed;
1766
+ color: var(--text-primary);
1767
+ }
1768
+
1769
+ .leaf-file-viewer__table th,
1770
+ .leaf-file-viewer__table td {
1771
+ box-sizing: border-box;
1772
+ height: var(--leaf-file-viewer-row-height);
1773
+ padding: 0 8px;
1774
+ overflow: hidden;
1775
+ border-right: 1px solid var(--leaf-file-viewer-grid-line);
1776
+ border-bottom: 1px solid var(--leaf-file-viewer-grid-line);
1777
+ text-align: left;
1778
+ text-overflow: ellipsis;
1779
+ white-space: nowrap;
1780
+ }
1781
+
1782
+ .leaf-file-viewer__table thead th {
1783
+ position: sticky;
1784
+ top: 0;
1785
+ z-index: 2;
1786
+ background-color: var(--leaf-file-viewer-chrome);
1787
+ color: var(--text-secondary);
1788
+ font-weight: inherit;
1789
+ text-align: center;
1790
+ }
1791
+
1792
+ .leaf-file-viewer__table tbody th {
1793
+ position: sticky;
1794
+ left: 0;
1795
+ z-index: 1;
1796
+ background-color: var(--leaf-file-viewer-chrome);
1797
+ color: var(--text-secondary);
1798
+ font-weight: inherit;
1799
+ text-align: center;
1800
+ }
1801
+
1802
+ .leaf-file-viewer__table thead .leaf-file-viewer__corner {
1803
+ left: 0;
1804
+ z-index: 3;
1805
+ }
1806
+
1807
+ .leaf-file-viewer__table td[data-type="n"],
1808
+ .leaf-file-viewer__table td[data-type="d"] {
1809
+ text-align: right;
1810
+ font-variant-numeric: tabular-nums;
1811
+ }
1812
+
1813
+ .leaf-file-viewer__table td[data-type="b"],
1814
+ .leaf-file-viewer__table td[data-type="e"] {
1815
+ text-align: center;
1816
+ }
1817
+
1818
+ .leaf-file-viewer__table td[data-type="e"] {
1819
+ color: var(--system-red);
1820
+ }
1821
+
1822
+ .leaf-file-viewer__table td[rowspan],
1823
+ .leaf-file-viewer__table td[colspan] {
1824
+ vertical-align: middle;
1825
+ }
1826
+
1827
+ .leaf-file-viewer__spacer td {
1828
+ padding: 0;
1829
+ border: none;
1830
+ }
1831
+
1832
+ .leaf-file-viewer__sheets {
1833
+ display: flex;
1834
+ flex-shrink: 0;
1835
+ gap: 2px;
1836
+ padding: 0 8px;
1837
+ overflow-x: auto;
1838
+ border-top: 1px solid var(--leaf-file-viewer-border);
1839
+ background-color: var(--leaf-file-viewer-chrome);
1840
+ scrollbar-width: thin;
1841
+ }
1842
+
1843
+ .leaf-file-viewer__sheet {
1844
+ flex-shrink: 0;
1845
+ box-sizing: border-box;
1846
+ height: 36px;
1847
+ margin: 0;
1848
+ padding: 0 14px;
1849
+ border: none;
1850
+ border-top: 2px solid transparent;
1851
+ background: none;
1852
+ color: var(--text-secondary);
1853
+ font-family: inherit;
1854
+ white-space: nowrap;
1855
+ cursor: pointer;
1856
+ }
1857
+
1858
+ .leaf-file-viewer__sheet:hover {
1859
+ color: var(--text-primary);
1860
+ }
1861
+
1862
+ .leaf-file-viewer__sheet[aria-selected="true"] {
1863
+ border-top-color: var(--text-highlight);
1864
+ background-color: var(--leaf-file-viewer-surface);
1865
+ color: var(--text-primary);
1866
+ }
1867
+
1868
+ .leaf-file-viewer__sheet:focus-visible {
1869
+ outline: 2px solid var(--text-highlight);
1870
+ outline-offset: -2px;
1871
+ }
1872
+
1873
+ /* ── DOCX ── */
1874
+
1875
+ .leaf-file-viewer__doc {
1876
+ box-sizing: border-box;
1877
+ padding: 24px 16px;
1878
+ background-color: var(--leaf-file-viewer-chrome);
1879
+ }
1880
+
1881
+ /*
1882
+ * 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,
1883
+ * màu chữ trong file (run color) được viết cho nền trắng. Override qua biến bên dưới.
1884
+ */
1885
+ .leaf-file-viewer__page {
1886
+ --leaf-file-viewer-page-bg: #fff;
1887
+ --leaf-file-viewer-page-fg: #1a1a1a;
1888
+ --leaf-file-viewer-page-rule: #9a9a9a;
1889
+ --leaf-file-viewer-page-link: #0b57d0;
1890
+
1891
+ box-sizing: border-box;
1892
+ width: 100%;
1893
+ max-width: calc(794px * var(--leaf-file-viewer-zoom));
1894
+ margin: 0 auto;
1895
+ padding: calc(56px * var(--leaf-file-viewer-zoom)) calc(64px * var(--leaf-file-viewer-zoom));
1896
+ border-radius: 4px;
1897
+ /* Tài liệu Word luôn nền trắng chữ đen như bản in, kể cả dark mode. */
1898
+ background-color: var(--leaf-file-viewer-page-bg);
1899
+ color: var(--leaf-file-viewer-page-fg);
1900
+ font-family: "Times New Roman", Times, serif;
1901
+ font-size: calc(16px * var(--leaf-file-viewer-zoom));
1902
+ line-height: 1.45;
1903
+ overflow-wrap: anywhere;
1904
+ box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
1905
+ }
1906
+
1907
+ .leaf-file-viewer__page + .leaf-file-viewer__page {
1908
+ margin-top: 16px;
1909
+ }
1910
+
1911
+ .leaf-file-viewer__page p,
1912
+ .leaf-file-viewer__page h1,
1913
+ .leaf-file-viewer__page h2,
1914
+ .leaf-file-viewer__page h3,
1915
+ .leaf-file-viewer__page h4,
1916
+ .leaf-file-viewer__page h5,
1917
+ .leaf-file-viewer__page h6 {
1918
+ margin: 0 0 0.6em;
1919
+ }
1920
+
1921
+ .leaf-file-viewer__page h1 {
1922
+ font-size: 1.75em;
1923
+ }
1924
+
1925
+ .leaf-file-viewer__page h2 {
1926
+ font-size: 1.4em;
1927
+ }
1928
+
1929
+ .leaf-file-viewer__page h3 {
1930
+ font-size: 1.2em;
1931
+ }
1932
+
1933
+ .leaf-file-viewer__page table {
1934
+ width: 100%;
1935
+ margin: 0 0 0.8em;
1936
+ border-collapse: collapse;
1937
+ }
1938
+
1939
+ .leaf-file-viewer__page td {
1940
+ padding: 0.3em 0.5em;
1941
+ border: 1px solid var(--leaf-file-viewer-page-rule);
1942
+ vertical-align: top;
1943
+ }
1944
+
1945
+ .leaf-file-viewer__page td > p:last-child {
1946
+ margin-bottom: 0;
1947
+ }
1948
+
1949
+ .leaf-file-viewer__page img {
1950
+ max-width: 100%;
1951
+ height: auto;
1952
+ }
1953
+
1954
+ .leaf-file-viewer__page a {
1955
+ color: var(--leaf-file-viewer-page-link);
1956
+ }
1957
+
1958
+ .leaf-file-viewer__marker {
1959
+ display: inline-block;
1960
+ box-sizing: border-box;
1961
+ padding-right: 0.35em;
1962
+ text-indent: 0;
1963
+ }
1964
+
1965
+ /* `[hidden]` luôn ẩn — rule gốc set display. */
1966
+ .leaf-file-viewer[hidden],
1967
+ .leaf-file-viewer__toolbar[hidden],
1968
+ .leaf-file-viewer__content[hidden],
1969
+ .leaf-file-viewer__state[hidden],
1970
+ .leaf-file-viewer__sheets[hidden] {
1971
+ display: none;
1972
+ }
1973
+
1974
+ @media (max-width: 640px) {
1975
+ .leaf-file-viewer__toolbar {
1976
+ padding-left: 12px;
1977
+ }
1978
+
1979
+ .leaf-file-viewer__zoom {
1980
+ display: none;
1981
+ }
1982
+
1983
+ .leaf-file-viewer__page {
1984
+ padding: calc(24px * var(--leaf-file-viewer-zoom))
1985
+ calc(20px * var(--leaf-file-viewer-zoom));
1986
+ }
1987
+ }
1988
+
1989
+ /* FileViewerDialog có `footer`: viewer co giãn, hàng nút căn phải bên dưới. */
1990
+ .leaf-file-viewer-dialog {
1991
+ display: flex;
1992
+ flex-direction: column;
1993
+ gap: 16px;
1994
+ height: 100%;
1995
+ min-height: 0;
1996
+ }
1997
+
1998
+ .leaf-file-viewer-dialog > .leaf-file-viewer {
1999
+ flex: 1 1 0;
2000
+ min-height: 0;
2001
+ }
2002
+
2003
+ .leaf-file-viewer-dialog__footer {
2004
+ display: flex;
2005
+ flex-wrap: wrap;
2006
+ justify-content: flex-end;
2007
+ gap: 8px;
2008
+ }
2009
+ }
2010
+
2011
+ /* --- src/components/Form/form.css --- */
2012
+
2013
+ /*
2014
+ * Form layout helpers — spacing cố định (Leaf không còn --spacing-*);
2015
+ * gap khớp thang Figma spacing md (16px).
2016
+ */
2017
+
2018
+ @layer components {
2019
+ .leaf-form {
2020
+ display: flex;
2021
+ flex-direction: column;
2022
+ gap: 16px;
2023
+ box-sizing: border-box;
2024
+ width: 100%;
2025
+ }
2026
+
2027
+ .leaf-form--grid-2 {
2028
+ display: grid;
2029
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2030
+ gap: 16px;
2031
+ align-items: start;
2032
+ }
2033
+
2034
+ .leaf-form--inline {
2035
+ display: flex;
2036
+ flex-direction: row;
2037
+ flex-wrap: wrap;
2038
+ gap: 16px;
2039
+ align-items: flex-start;
2040
+ }
2041
+
2042
+ .leaf-form__field {
2043
+ min-width: 0;
2044
+ }
2045
+
2046
+ .leaf-form[hidden],
2047
+ .leaf-form--grid-2[hidden],
2048
+ .leaf-form--inline[hidden] {
2049
+ display: none;
2050
+ }
2051
+
2052
+ .leaf-form__field--span-2 {
2053
+ grid-column: span 2;
2054
+ }
2055
+
2056
+ /* 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).
2057
+ * Cách control 8px như message của Input. */
2058
+ .leaf-form__message {
2059
+ margin: 8px 0 0;
2060
+ color: var(--system-red);
2061
+ }
2062
+
2063
+ /* Sau control dạng khung (MultiSelect…): thụt 12px cho thẳng chữ trong trigger, như Input. */
2064
+ .leaf-form__field > .leaf-dropdown + .leaf-form__message {
2065
+ padding-left: 12px;
2066
+ }
2067
+
2068
+ .leaf-form__message:not([data-invalid]) {
2069
+ color: var(--text-secondary);
2070
+ }
2071
+ }
2072
+
2073
+ /* --- src/components/Input/input-date.css --- */
2074
+
2075
+ /*
2076
+ * InputDate — Input trigger + popover Calendar.
2077
+ *
2078
+ * Popover neo theo khung trigger: dưới (data-placement="bottom", top = đáy khung qua
2079
+ * --leaf-input-date-offset do React đo) hoặc lật lên trên (data-placement="top"). data-align
2080
+ * căn trái / phải. data-open giữ viền + label highlight khi panel mở (invalid vẫn thắng).
2081
+ * Phụ thuộc input.css + calendar.css.
2082
+ */
2083
+
2084
+ @layer components {
2085
+ .leaf-input-date {
2086
+ position: relative;
2087
+ }
2088
+
2089
+ .leaf-input-date__popover {
2090
+ position: absolute;
2091
+ z-index: var(--leaf-z-popover, 100);
2092
+ }
2093
+
2094
+ .leaf-input-date__popover[data-placement="bottom"] {
2095
+ top: calc(var(--leaf-input-date-offset, 100%) + 8px);
2096
+ }
2097
+
2098
+ .leaf-input-date__popover[data-placement="top"] {
2099
+ bottom: calc(100% + 8px);
2100
+ }
2101
+
2102
+ .leaf-input-date__popover[data-align="start"] {
2103
+ left: 0;
2104
+ }
2105
+
2106
+ .leaf-input-date__popover[data-align="end"] {
2107
+ right: 0;
2108
+ }
2109
+
2110
+ .leaf-input-date[data-open="true"] .leaf-input:not([data-invalid="true"]) {
2111
+ --leaf-input-border: var(--text-highlight);
2112
+ --leaf-input-label: var(--text-highlight);
2113
+ }
2114
+
2115
+ .leaf-input-date[hidden] {
2116
+ display: none;
2117
+ }
2118
+ }
2119
+
2120
+ /* --- src/components/Input/input-otp.css --- */
2121
+
2122
+ /*
2123
+ * InputOtp — Figma 1146:2159 (PIN code).
2124
+ *
2125
+ * Ô 48×56, nền base-tertiary, chữ số heading-3. Focus → viền highlight; data-invalid → viền
2126
+ * đỏ mọi ô + message đỏ; data-disabled / :disabled → chữ secondary. Typography
2127
+ * (heading-3, body-5) là class Leaf trên markup.
2128
+ * HTML tĩnh: hành vi nhảy ô / dán nằm trong leaf.js (`data-leaf-input-otp`).
2129
+ */
2130
+
2131
+ @layer components {
2132
+ .leaf-input-otp {
2133
+ --leaf-input-otp-cell-width: 48px;
2134
+ --leaf-input-otp-cell-height: 56px;
2135
+ --leaf-input-otp-border: transparent;
2136
+ --leaf-input-otp-message: var(--text-secondary);
2137
+
2138
+ display: flex;
2139
+ flex-direction: column;
2140
+ gap: 8px;
2141
+ }
2142
+
2143
+ .leaf-input-otp__cells {
2144
+ display: flex;
2145
+ gap: 4px;
2146
+ }
2147
+
2148
+ .leaf-input-otp__cell {
2149
+ box-sizing: border-box;
2150
+ width: var(--leaf-input-otp-cell-width);
2151
+ height: var(--leaf-input-otp-cell-height);
2152
+ margin: 0;
2153
+ padding: 0;
2154
+ border: 1px solid var(--leaf-input-otp-border);
2155
+ border-radius: 12px;
2156
+ outline: none;
2157
+ background-color: var(--base-tertiary);
2158
+ color: var(--text-primary);
2159
+ text-align: center;
2160
+ caret-color: var(--text-highlight);
2161
+ appearance: none;
2162
+ -webkit-appearance: none;
2163
+ transition: border-color 0.15s ease;
2164
+ }
2165
+
2166
+ .leaf-input-otp__cell:focus {
2167
+ border-color: var(--text-highlight);
2168
+ }
2169
+
2170
+ .leaf-input-otp[data-invalid="true"] .leaf-input-otp__cell {
2171
+ border-color: var(--system-red);
2172
+ }
2173
+
2174
+ .leaf-input-otp__cell:disabled {
2175
+ color: var(--text-secondary);
2176
+ cursor: not-allowed;
2177
+ }
2178
+
2179
+ .leaf-input-otp__message {
2180
+ margin: 0;
2181
+ color: var(--leaf-input-otp-message);
2182
+ }
2183
+
2184
+ .leaf-input-otp[data-invalid="true"] {
2185
+ --leaf-input-otp-message: var(--system-red);
2186
+ }
2187
+
2188
+ .leaf-input-otp[hidden],
2189
+ .leaf-input-otp__cells[hidden] {
2190
+ display: none;
2191
+ }
2192
+ }
2193
+
2194
+ /* --- src/components/Input/input-stepper.css --- */
2195
+
2196
+ /*
2197
+ * InputStepper — Figma 1146:2159 (Buy / Sell).
2198
+ *
2199
+ * Tone qua data-tone (buy | sell — không có → base-tertiary); state qua :focus-within,
2200
+ * data-invalid, data-disabled, data-filled. Nền 280 × (py 4 · px 12), radius 12; icon −/+ 20px.
2201
+ * Label body-5 (secondary → primary khi focus), giá trị body-4-highlight (placeholder
2202
+ * secondary, đã nhập primary). Typography là class Leaf trên markup.
2203
+ * HTML tĩnh: −/+, mũi tên, format số nằm trong leaf.js (`data-leaf-input-stepper`).
2204
+ */
2205
+
2206
+ @layer components {
2207
+ .leaf-input-stepper {
2208
+ --leaf-input-stepper-width: 280px;
2209
+ --leaf-input-stepper-bg: var(--base-tertiary);
2210
+ --leaf-input-stepper-focus: var(--text-highlight);
2211
+ --leaf-input-stepper-border: transparent;
2212
+ --leaf-input-stepper-label: var(--text-secondary);
2213
+ --leaf-input-stepper-fg: var(--text-primary);
2214
+ --leaf-input-stepper-icon: var(--text-primary);
2215
+ --leaf-input-stepper-message: var(--text-secondary);
2216
+
2217
+ display: flex;
2218
+ flex-direction: column;
2219
+ gap: 4px;
2220
+ width: var(--leaf-input-stepper-width);
2221
+ max-width: 100%;
2222
+ }
2223
+
2224
+ .leaf-input-stepper[data-tone="buy"] {
2225
+ --leaf-input-stepper-bg: var(--system-green-secondary);
2226
+ }
2227
+
2228
+ .leaf-input-stepper[data-tone="sell"] {
2229
+ --leaf-input-stepper-bg: var(--system-red-secondary);
2230
+ --leaf-input-stepper-focus: var(--system-red);
2231
+ }
2232
+
2233
+ .leaf-input-stepper__shell {
1305
2234
  display: flex;
1306
2235
  align-items: center;
1307
2236
  gap: 8px;
@@ -1699,10 +2628,225 @@
1699
2628
  max-width: 100%;
1700
2629
  }
1701
2630
 
1702
- /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
1703
- .leaf-logo[hidden] {
1704
- display: none;
1705
- }
2631
+ /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
2632
+ .leaf-logo[hidden] {
2633
+ display: none;
2634
+ }
2635
+ }
2636
+
2637
+ /* --- src/components/MultiSelect/multiselect.css --- */
2638
+
2639
+ /*
2640
+ * MultiSelect — chip trên trigger + filter trong panel.
2641
+ * Panel / option dùng class `leaf-dropdown*` từ dropdown.css. Rule đè class của Dropdown scope
2642
+ * dưới `.leaf-multiselect` để thắng bằng specificity, không phụ thuộc thứ tự import file CSS.
2643
+ */
2644
+
2645
+ @layer components {
2646
+ .leaf-multiselect__chips[hidden],
2647
+ .leaf-multiselect__chip[hidden],
2648
+ .leaf-multiselect__chip-remove[hidden],
2649
+ .leaf-multiselect__chip-icon[hidden],
2650
+ .leaf-multiselect__options[hidden],
2651
+ .leaf-multiselect .leaf-multiselect__panel[hidden] {
2652
+ display: none;
2653
+ }
2654
+
2655
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] {
2656
+ cursor: not-allowed;
2657
+ color: var(--text-tertiary);
2658
+ }
2659
+
2660
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] .leaf-dropdown__value,
2661
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] .leaf-dropdown__chevron {
2662
+ color: var(--text-tertiary);
2663
+ }
2664
+
2665
+ .leaf-multiselect .leaf-dropdown__trigger[aria-disabled="true"] .leaf-multiselect__chip {
2666
+ color: var(--text-tertiary);
2667
+ }
2668
+
2669
+ .leaf-multiselect .leaf-dropdown__value.leaf-multiselect__value {
2670
+ overflow: visible;
2671
+ text-overflow: unset;
2672
+ white-space: normal;
2673
+ }
2674
+
2675
+ .leaf-multiselect__chips {
2676
+ display: flex;
2677
+ flex-wrap: wrap;
2678
+ gap: 6px;
2679
+ align-items: center;
2680
+ min-width: 0;
2681
+ /* Chip cao line-height + 2×2px padding: bù để trigger một hàng chip cao bằng lúc trống. */
2682
+ margin-block: -2px;
2683
+ }
2684
+
2685
+ .leaf-multiselect__chip {
2686
+ display: inline-flex;
2687
+ align-items: center;
2688
+ gap: 4px;
2689
+ max-width: 100%;
2690
+ padding: 2px 6px 2px 8px;
2691
+ box-sizing: border-box;
2692
+ border-radius: 8px;
2693
+ background-color: var(--base-tertiary);
2694
+ color: var(--text-primary);
2695
+ font-weight: var(--leaf-dropdown-weight);
2696
+ }
2697
+
2698
+ .leaf-multiselect__chip-label {
2699
+ min-width: 0;
2700
+ overflow: hidden;
2701
+ text-overflow: ellipsis;
2702
+ white-space: nowrap;
2703
+ }
2704
+
2705
+ .leaf-multiselect__chip-remove {
2706
+ display: inline-flex;
2707
+ flex-shrink: 0;
2708
+ align-items: center;
2709
+ justify-content: center;
2710
+ margin: 0;
2711
+ padding: 0;
2712
+ border: none;
2713
+ border-radius: 4px;
2714
+ background: transparent;
2715
+ color: var(--text-secondary);
2716
+ cursor: pointer;
2717
+ }
2718
+
2719
+ .leaf-multiselect__chip-remove:hover {
2720
+ color: var(--text-primary);
2721
+ }
2722
+
2723
+ .leaf-multiselect__chip-icon {
2724
+ display: block;
2725
+ width: 14px;
2726
+ height: 14px;
2727
+ }
2728
+
2729
+ .leaf-multiselect .leaf-multiselect__panel {
2730
+ /* list là div bọc filter + ul — giữ cuộn trên toàn panel */
2731
+ overflow: hidden;
2732
+ display: flex;
2733
+ flex-direction: column;
2734
+ padding: 0;
2735
+ }
2736
+
2737
+ .leaf-multiselect__filter {
2738
+ flex-shrink: 0;
2739
+ padding: 8px 12px;
2740
+ border-bottom: 1px solid var(--base-tertiary);
2741
+ }
2742
+
2743
+ .leaf-multiselect__filter-input {
2744
+ width: 100%;
2745
+ margin: 0;
2746
+ padding: 6px 8px;
2747
+ box-sizing: border-box;
2748
+ border: 1px solid var(--base-quaternary);
2749
+ border-radius: 8px;
2750
+ background-color: var(--base-primary);
2751
+ color: var(--text-primary);
2752
+ font: inherit;
2753
+ font-weight: var(--leaf-dropdown-weight);
2754
+ outline: none;
2755
+ }
2756
+
2757
+ .leaf-multiselect__filter-input::placeholder {
2758
+ color: var(--text-secondary);
2759
+ }
2760
+
2761
+ .leaf-multiselect__filter-input:focus {
2762
+ border-color: var(--text-highlight);
2763
+ }
2764
+
2765
+ .leaf-multiselect__options {
2766
+ display: flex;
2767
+ flex-direction: column;
2768
+ flex: 1 1 auto;
2769
+ min-height: 0;
2770
+ margin: 0;
2771
+ padding: 0;
2772
+ overflow-y: auto;
2773
+ list-style: none;
2774
+ }
2775
+
2776
+ .leaf-multiselect .leaf-dropdown__option.leaf-multiselect__empty {
2777
+ cursor: default;
2778
+ color: var(--text-tertiary);
2779
+ }
2780
+ }
2781
+
2782
+ /* --- src/components/Number/number.css --- */
2783
+
2784
+ /*
2785
+ * Number — thẻ span/data hiển thị số.
2786
+ *
2787
+ * Typography / màu chữ steady dùng class Leaf có sẵn (body-*, text-*).
2788
+ * Flash realtime: data-flash + data-color → nền color-mix 70% token Leaf + chữ --text-primary.
2789
+ */
2790
+
2791
+ @layer components {
2792
+ .leaf-number {
2793
+ display: inline;
2794
+ }
2795
+
2796
+ .leaf-number[data-flash] {
2797
+ color: var(--text-primary);
2798
+ }
2799
+
2800
+ .leaf-number[data-flash][data-color="highlight"] {
2801
+ background-color: color-mix(in srgb, var(--text-highlight) 70%, transparent);
2802
+ }
2803
+
2804
+ .leaf-number[data-flash][data-color="blue"] {
2805
+ background-color: color-mix(in srgb, var(--system-blue) 70%, transparent);
2806
+ }
2807
+
2808
+ .leaf-number[data-flash][data-color="green"] {
2809
+ background-color: color-mix(in srgb, var(--system-green) 70%, transparent);
2810
+ }
2811
+
2812
+ .leaf-number[data-flash][data-color="yellow"] {
2813
+ background-color: color-mix(in srgb, var(--system-yellow) 70%, transparent);
2814
+ }
2815
+
2816
+ .leaf-number[data-flash][data-color="orange"] {
2817
+ background-color: color-mix(in srgb, var(--system-orange) 70%, transparent);
2818
+ }
2819
+
2820
+ .leaf-number[data-flash][data-color="red"] {
2821
+ background-color: color-mix(in srgb, var(--system-red) 70%, transparent);
2822
+ }
2823
+
2824
+ .leaf-number[data-flash][data-color="purple"] {
2825
+ background-color: color-mix(in srgb, var(--system-purple) 70%, transparent);
2826
+ }
2827
+
2828
+ .leaf-number[hidden] {
2829
+ display: none;
2830
+ }
2831
+ }
2832
+
2833
+ /* --- src/components/QrCode/qr-code.css --- */
2834
+
2835
+ .leaf-qr-code {
2836
+ display: inline-flex;
2837
+ width: var(--leaf-qr-size, 192px);
2838
+ height: var(--leaf-qr-size, 192px);
2839
+ line-height: 0;
2840
+ }
2841
+
2842
+ .leaf-qr-code svg {
2843
+ display: block;
2844
+ width: 100%;
2845
+ height: 100%;
2846
+ }
2847
+
2848
+ .leaf-qr-code__module {
2849
+ fill: currentColor;
1706
2850
  }
1707
2851
 
1708
2852
  /* --- src/components/Radio/radio.css --- */
@@ -1863,6 +3007,14 @@
1863
3007
  );
1864
3008
  animation: leaf-skeleton-shimmer 2s infinite ease-in-out;
1865
3009
  }
3010
+
3011
+ /* Giảm chuyển động: bỏ shimmer, giữ nền placeholder tĩnh. */
3012
+ @media (prefers-reduced-motion: reduce) {
3013
+ .leaf-skeleton__shimmer {
3014
+ display: none;
3015
+ animation: none;
3016
+ }
3017
+ }
1866
3018
  }
1867
3019
 
1868
3020
  @keyframes leaf-skeleton-shimmer {
@@ -1882,7 +3034,8 @@
1882
3034
  * Giá trị liên tục trên rail (kéo / click chính xác tới từng step — như
1883
3035
  * TradeQuickSlider). Mốc chia đều đặt tuyệt đối theo `left: <%>`; thumb đặt ở
1884
3036
  * `--leaf-slider-fill`. Ở min thumb = `--text-primary`; khi > min =
1885
- * `--leaf-slider-active` (mặc định `--text-highlight`).
3037
+ * `--leaf-slider-active` (mặc định `--text-highlight`). Prop / attribute `data-color`
3038
+ * nhận hậu tố class `text-*` Leaf và map sang token tương ứng.
1886
3039
  *
1887
3040
  * Rail, mốc và thumb cùng nằm trong vùng lùi vào `--leaf-slider-inset` ở hai đầu
1888
3041
  * (nửa thumb) — nhờ vậy `left: X%` của cả ba khớp nhau và thumb không tràn ra ngoài.
@@ -1916,6 +3069,59 @@
1916
3069
  -webkit-user-select: none;
1917
3070
  }
1918
3071
 
3072
+ /* data-color = hậu tố text-* Leaf → --leaf-slider-active */
3073
+ .leaf-slider[data-color="highlight"] {
3074
+ --leaf-slider-active: var(--text-highlight);
3075
+ }
3076
+ .leaf-slider[data-color="primary"] {
3077
+ --leaf-slider-active: var(--text-primary);
3078
+ }
3079
+ .leaf-slider[data-color="secondary"] {
3080
+ --leaf-slider-active: var(--text-secondary);
3081
+ }
3082
+ .leaf-slider[data-color="tertiary"] {
3083
+ --leaf-slider-active: var(--text-tertiary);
3084
+ }
3085
+ .leaf-slider[data-color="quaternary"] {
3086
+ --leaf-slider-active: var(--text-quaternary);
3087
+ }
3088
+ .leaf-slider[data-color="blue"] {
3089
+ --leaf-slider-active: var(--system-blue);
3090
+ }
3091
+ .leaf-slider[data-color="green"] {
3092
+ --leaf-slider-active: var(--system-green);
3093
+ }
3094
+ .leaf-slider[data-color="yellow"] {
3095
+ --leaf-slider-active: var(--system-yellow);
3096
+ }
3097
+ .leaf-slider[data-color="orange"] {
3098
+ --leaf-slider-active: var(--system-orange);
3099
+ }
3100
+ .leaf-slider[data-color="red"] {
3101
+ --leaf-slider-active: var(--system-red);
3102
+ }
3103
+ .leaf-slider[data-color="purple"] {
3104
+ --leaf-slider-active: var(--system-purple);
3105
+ }
3106
+ .leaf-slider[data-color="blue-secondary"] {
3107
+ --leaf-slider-active: var(--system-blue-secondary);
3108
+ }
3109
+ .leaf-slider[data-color="green-secondary"] {
3110
+ --leaf-slider-active: var(--system-green-secondary);
3111
+ }
3112
+ .leaf-slider[data-color="yellow-secondary"] {
3113
+ --leaf-slider-active: var(--system-yellow-secondary);
3114
+ }
3115
+ .leaf-slider[data-color="orange-secondary"] {
3116
+ --leaf-slider-active: var(--system-orange-secondary);
3117
+ }
3118
+ .leaf-slider[data-color="red-secondary"] {
3119
+ --leaf-slider-active: var(--system-red-secondary);
3120
+ }
3121
+ .leaf-slider[data-color="purple-secondary"] {
3122
+ --leaf-slider-active: var(--system-purple-secondary);
3123
+ }
3124
+
1919
3125
  /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
1920
3126
  .leaf-slider[hidden],
1921
3127
  .leaf-slider__header[hidden],
@@ -2128,7 +3334,7 @@
2128
3334
  *
2129
3335
  * Variant animation qua data-animation; size qua data-size; overlay fullscreen
2130
3336
  * qua .leaf-spinner-overlay. Màu mặc định trắng (dark) / đen (light) qua --base-quinary —
2131
- * không dùng highlight; override bằng class text-* khi cần. Thiếu attribute → md · spin.
3337
+ * không dùng highlight; React đổi màu qua prop `color` (class `text-*`). Thiếu attribute → md · spin.
2132
3338
  */
2133
3339
 
2134
3340
  @layer components {
@@ -2208,6 +3414,14 @@
2208
3414
  .leaf-spinner[data-animation="breathe"] .leaf-spinner__icon {
2209
3415
  animation: leaf-spinner-breathe 1.2s ease-in-out infinite;
2210
3416
  }
3417
+
3418
+ /* Giảm chuyển động: vẫn còn tín hiệu "đang tải" nhưng chậm hẳn lại. */
3419
+ @media (prefers-reduced-motion: reduce) {
3420
+ .leaf-spinner[data-animation] .leaf-spinner__icon,
3421
+ .leaf-spinner:not([data-animation]) .leaf-spinner__icon {
3422
+ animation-duration: 3s;
3423
+ }
3424
+ }
2211
3425
  }
2212
3426
 
2213
3427
  @keyframes leaf-spinner-spin {
@@ -2309,6 +3523,13 @@
2309
3523
  font-family: var(--font-sans);
2310
3524
  box-sizing: border-box;
2311
3525
  appearance: none;
3526
+ outline: none;
3527
+ }
3528
+
3529
+ /* Chỉ báo focus bàn phím (WCAG 2.4.7) — :focus-visible nên click chuột không hiện ring. */
3530
+ .leaf-tab:focus-visible {
3531
+ outline: 2px solid var(--text-highlight);
3532
+ outline-offset: 2px;
2312
3533
  }
2313
3534
 
2314
3535
  /* `hidden` luôn ẩn — rule gốc set display; selector `[hidden]` specificity cao hơn nên thắng. */
@@ -2487,6 +3708,32 @@
2487
3708
  }
2488
3709
  }
2489
3710
 
3711
+ /* --- src/components/Textarea/textarea.css --- */
3712
+
3713
+ /*
3714
+ * Textarea — neo Input field (cùng token / shell / state).
3715
+ * Root: .leaf-input.leaf-textarea — cần import input.css trước (hoặc styles.css).
3716
+ */
3717
+
3718
+ @layer components {
3719
+ .leaf-textarea .leaf-input__shell {
3720
+ align-items: flex-start;
3721
+ min-height: 96px;
3722
+ cursor: text;
3723
+ }
3724
+
3725
+ .leaf-textarea .leaf-input__main {
3726
+ align-items: stretch;
3727
+ width: 100%;
3728
+ }
3729
+
3730
+ .leaf-textarea__control {
3731
+ min-height: 64px;
3732
+ resize: vertical;
3733
+ field-sizing: content;
3734
+ }
3735
+ }
3736
+
2490
3737
  /* --- src/components/Toast/toast.css --- */
2491
3738
 
2492
3739
  /*
@@ -3046,6 +4293,321 @@
3046
4293
  }
3047
4294
  }
3048
4295
 
4296
+ /* --- src/components/Upload/upload.css --- */
4297
+
4298
+ /*
4299
+ * Upload — dropzone trong khung; count / error nằm trong zone.
4300
+ * List file (`showFileList`) optional bên dưới — icon xoá delete-bin-line.
4301
+ */
4302
+
4303
+ @layer components {
4304
+ .leaf-upload {
4305
+ --leaf-upload-bg: transparent;
4306
+ --leaf-upload-border: var(--text-highlight);
4307
+ --leaf-upload-fg: var(--text-primary);
4308
+ --leaf-upload-muted: var(--text-secondary);
4309
+ --leaf-upload-icon: var(--text-highlight);
4310
+ --leaf-upload-icon-bg: color-mix(in srgb, var(--text-highlight) 18%, transparent);
4311
+ --leaf-upload-radius: 12px;
4312
+ --leaf-upload-min-height: 160px;
4313
+
4314
+ position: relative;
4315
+ display: flex;
4316
+ flex-direction: column;
4317
+ gap: 8px;
4318
+ min-width: 0;
4319
+ }
4320
+
4321
+ .leaf-upload[hidden],
4322
+ .leaf-upload__zone[hidden],
4323
+ .leaf-upload__icon[hidden],
4324
+ .leaf-upload__icon > svg[hidden],
4325
+ .leaf-upload__list[hidden],
4326
+ .leaf-upload__file[hidden],
4327
+ .leaf-upload__remove[hidden],
4328
+ .leaf-upload__remove > svg[hidden] {
4329
+ display: none;
4330
+ }
4331
+
4332
+ .leaf-upload__label {
4333
+ color: var(--text-tertiary);
4334
+ }
4335
+
4336
+ .leaf-upload[data-filled="true"] .leaf-upload__label {
4337
+ color: var(--text-primary);
4338
+ }
4339
+
4340
+ .leaf-upload__zone {
4341
+ display: flex;
4342
+ flex-direction: column;
4343
+ align-items: center;
4344
+ justify-content: center;
4345
+ gap: 10px;
4346
+ box-sizing: border-box;
4347
+ width: 100%;
4348
+ min-height: var(--leaf-upload-min-height);
4349
+ padding: 24px 16px;
4350
+ border: 1.5px dashed var(--leaf-upload-border);
4351
+ border-radius: var(--leaf-upload-radius);
4352
+ background-color: var(--leaf-upload-bg);
4353
+ color: var(--leaf-upload-fg);
4354
+ text-align: center;
4355
+ cursor: pointer;
4356
+ transition:
4357
+ border-color 0.15s ease,
4358
+ color 0.15s ease,
4359
+ box-shadow 0.15s ease;
4360
+ }
4361
+
4362
+ .leaf-upload:not([data-disabled="true"]):not([data-at-max="true"]) .leaf-upload__zone:hover {
4363
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-highlight) 16%, transparent);
4364
+ }
4365
+
4366
+ .leaf-upload__zone:focus-visible {
4367
+ outline: 2px solid var(--text-highlight);
4368
+ outline-offset: 2px;
4369
+ }
4370
+
4371
+ .leaf-upload__icon {
4372
+ display: inline-flex;
4373
+ align-items: center;
4374
+ justify-content: center;
4375
+ width: 56px;
4376
+ height: 56px;
4377
+ border-radius: 999px;
4378
+ background-color: var(--leaf-upload-icon-bg);
4379
+ font-size: 28px;
4380
+ line-height: 1;
4381
+ color: var(--leaf-upload-icon);
4382
+ }
4383
+
4384
+ .leaf-upload__icon > svg {
4385
+ display: block;
4386
+ width: 1em;
4387
+ height: 1em;
4388
+ }
4389
+
4390
+ .leaf-upload__title,
4391
+ .leaf-upload__formats,
4392
+ .leaf-upload__count,
4393
+ .leaf-upload__error {
4394
+ margin: 0;
4395
+ max-width: 100%;
4396
+ }
4397
+
4398
+ .leaf-upload__title {
4399
+ color: var(--leaf-upload-fg);
4400
+ }
4401
+
4402
+ .leaf-upload__formats {
4403
+ color: var(--leaf-upload-muted);
4404
+ }
4405
+
4406
+ .leaf-upload__count {
4407
+ color: var(--text-highlight);
4408
+ }
4409
+
4410
+ .leaf-upload__error {
4411
+ color: var(--system-red);
4412
+ }
4413
+
4414
+ /* Một file: tên + nút xoá trong khung, căn giữa; tên dài cắt "…". */
4415
+ .leaf-upload__file {
4416
+ display: inline-flex;
4417
+ align-items: center;
4418
+ gap: 4px;
4419
+ max-width: 100%;
4420
+ min-width: 0;
4421
+ }
4422
+
4423
+ .leaf-upload__file > .leaf-upload__file-name {
4424
+ flex: 0 1 auto;
4425
+ color: var(--leaf-upload-fg);
4426
+ text-align: center;
4427
+ }
4428
+
4429
+ .leaf-upload__list {
4430
+ display: flex;
4431
+ flex-direction: column;
4432
+ gap: 8px;
4433
+ min-width: 0;
4434
+ }
4435
+
4436
+ .leaf-upload__list-label {
4437
+ color: var(--text-secondary);
4438
+ }
4439
+
4440
+ .leaf-upload__list-items {
4441
+ margin: 0;
4442
+ padding: 0;
4443
+ list-style: none;
4444
+ border: 1px solid var(--base-quaternary);
4445
+ border-radius: var(--leaf-upload-radius);
4446
+ overflow: hidden;
4447
+ }
4448
+
4449
+ .leaf-upload__list-item {
4450
+ display: flex;
4451
+ align-items: center;
4452
+ gap: 8px;
4453
+ padding: 10px 12px;
4454
+ border-bottom: 1px solid var(--base-quaternary);
4455
+ background-color: transparent;
4456
+ }
4457
+
4458
+ .leaf-upload__list-item:last-child {
4459
+ border-bottom: none;
4460
+ }
4461
+
4462
+ .leaf-upload__file-name {
4463
+ flex: 1;
4464
+ min-width: 0;
4465
+ overflow: hidden;
4466
+ text-overflow: ellipsis;
4467
+ white-space: nowrap;
4468
+ color: var(--text-primary);
4469
+ text-align: left;
4470
+ }
4471
+
4472
+ .leaf-upload__remove,
4473
+ .leaf-upload__view {
4474
+ display: inline-flex;
4475
+ align-items: center;
4476
+ justify-content: center;
4477
+ flex-shrink: 0;
4478
+ width: 28px;
4479
+ height: 28px;
4480
+ margin: 0;
4481
+ padding: 0;
4482
+ border: none;
4483
+ border-radius: 999px;
4484
+ background: transparent;
4485
+ color: var(--text-secondary);
4486
+ cursor: pointer;
4487
+ appearance: none;
4488
+ font-size: 16px;
4489
+ line-height: 1;
4490
+ }
4491
+
4492
+ .leaf-upload__remove > svg,
4493
+ .leaf-upload__view > svg {
4494
+ display: block;
4495
+ width: 1em;
4496
+ height: 1em;
4497
+ }
4498
+
4499
+ .leaf-upload__remove:hover {
4500
+ color: var(--system-red);
4501
+ background-color: color-mix(in srgb, var(--system-red) 12%, transparent);
4502
+ }
4503
+
4504
+ .leaf-upload__view:hover {
4505
+ color: var(--text-highlight);
4506
+ background-color: color-mix(in srgb, var(--text-highlight) 12%, transparent);
4507
+ }
4508
+
4509
+ .leaf-upload__remove:focus-visible,
4510
+ .leaf-upload__view:focus-visible {
4511
+ outline: 2px solid var(--text-highlight);
4512
+ outline-offset: 2px;
4513
+ }
4514
+
4515
+ /* Preview: thumbnail ảnh (hoặc icon file) + dung lượng trước tên file. */
4516
+ .leaf-upload__thumb {
4517
+ display: inline-flex;
4518
+ align-items: center;
4519
+ justify-content: center;
4520
+ flex-shrink: 0;
4521
+ width: 32px;
4522
+ height: 32px;
4523
+ overflow: hidden;
4524
+ border-radius: 6px;
4525
+ background-color: var(--base-tertiary);
4526
+ color: var(--text-secondary);
4527
+ font-size: 16px;
4528
+ }
4529
+
4530
+ .leaf-upload__thumb > img {
4531
+ display: block;
4532
+ width: 100%;
4533
+ height: 100%;
4534
+ object-fit: cover;
4535
+ }
4536
+
4537
+ .leaf-upload__thumb > svg {
4538
+ display: block;
4539
+ width: 1em;
4540
+ height: 1em;
4541
+ }
4542
+
4543
+ .leaf-upload__size {
4544
+ flex-shrink: 0;
4545
+ color: var(--text-secondary);
4546
+ }
4547
+
4548
+ .leaf-upload__input {
4549
+ position: absolute;
4550
+ width: 1px;
4551
+ height: 1px;
4552
+ padding: 0;
4553
+ margin: -1px;
4554
+ overflow: hidden;
4555
+ clip: rect(0, 0, 0, 0);
4556
+ white-space: nowrap;
4557
+ border: 0;
4558
+ }
4559
+
4560
+ /* ── State ───────────────────────────────────────────────────────────── */
4561
+
4562
+ .leaf-upload[data-dragging="true"] .leaf-upload__zone {
4563
+ --leaf-upload-border: var(--text-highlight);
4564
+ --leaf-upload-icon: var(--text-highlight);
4565
+ --leaf-upload-fg: var(--text-highlight);
4566
+ border-style: solid;
4567
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-highlight) 20%, transparent);
4568
+ }
4569
+
4570
+ .leaf-upload[data-invalid="true"] {
4571
+ --leaf-upload-border: var(--system-red);
4572
+ --leaf-upload-icon: var(--system-red);
4573
+ --leaf-upload-icon-bg: color-mix(in srgb, var(--system-red) 16%, transparent);
4574
+ }
4575
+
4576
+ .leaf-upload[data-invalid="true"] .leaf-upload__label,
4577
+ .leaf-upload[data-invalid="true"] .leaf-upload__count {
4578
+ color: var(--system-red);
4579
+ }
4580
+
4581
+ .leaf-upload[data-invalid="true"]:not([data-disabled="true"]):not([data-at-max="true"])
4582
+ .leaf-upload__zone:hover {
4583
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--system-red) 16%, transparent);
4584
+ }
4585
+
4586
+ .leaf-upload[data-disabled="true"],
4587
+ .leaf-upload[data-at-max="true"] {
4588
+ --leaf-upload-border: var(--base-quaternary);
4589
+ --leaf-upload-fg: var(--text-secondary);
4590
+ --leaf-upload-muted: var(--text-tertiary);
4591
+ --leaf-upload-icon: var(--text-tertiary);
4592
+ --leaf-upload-icon-bg: var(--base-tertiary);
4593
+ }
4594
+
4595
+ .leaf-upload[data-disabled="true"] .leaf-upload__label,
4596
+ .leaf-upload[data-at-max="true"] .leaf-upload__label {
4597
+ color: var(--text-tertiary);
4598
+ }
4599
+
4600
+ .leaf-upload[data-disabled="true"] .leaf-upload__zone,
4601
+ .leaf-upload[data-at-max="true"] .leaf-upload__zone {
4602
+ cursor: not-allowed;
4603
+ box-shadow: none;
4604
+ }
4605
+
4606
+ .leaf-upload[data-disabled="true"] .leaf-upload__remove {
4607
+ display: none;
4608
+ }
4609
+ }
4610
+
3049
4611
  /* --- src/styles/color.css --- */
3050
4612
 
3051
4613
  /*
@@ -3304,6 +4866,22 @@
3304
4866
  }
3305
4867
  }
3306
4868
 
4869
+ /* --- src/styles/focus.css --- */
4870
+
4871
+ /*
4872
+ * Leaf — không hiện outline khi focus bằng chuột / chạm trên control `.leaf-*`.
4873
+ *
4874
+ * Chỉ `:focus:not(:focus-visible)`: focus bằng bàn phím (`:focus-visible`) vẫn có ring token do
4875
+ * 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
4876
+ * tử con — nút / link của app nằm trong Dialog, `.leaf-form`… giữ nguyên focus ring của app.
4877
+ */
4878
+
4879
+ @layer components {
4880
+ :where([class^="leaf-"], [class*=" leaf-"]):focus:not(:focus-visible) {
4881
+ outline: none;
4882
+ }
4883
+ }
4884
+
3307
4885
  /* --- src/styles/typography.css --- */
3308
4886
 
3309
4887
  /*