@finhay-pro/leaf-design-system 0.2.1 → 0.2.3

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