@beehexa/design-rules 2611.5.5 → 2611.8.1

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 (316) hide show
  1. package/README.md +1 -1
  2. package/dist/AGENTS.md +1 -1
  3. package/dist/catalog.json +3053 -777
  4. package/dist/docs/public/_redirects +2 -2
  5. package/dist/docs/public/r/action-bar.json +26 -0
  6. package/dist/docs/public/r/beehexa-theme.json +18 -0
  7. package/dist/docs/public/r/button-group.json +26 -0
  8. package/dist/docs/public/r/button.json +28 -0
  9. package/dist/docs/public/r/copy-button.json +26 -0
  10. package/dist/docs/public/r/dropdown-menu.json +56 -0
  11. package/dist/docs/public/r/index.json +66 -0
  12. package/dist/docs/public/r/segmented-control.json +31 -0
  13. package/dist/docs/public/r/toggle.json +26 -0
  14. package/dist/docs/public/r/toolbar.json +46 -0
  15. package/dist/docs/public/r/tooltip.json +41 -0
  16. package/dist/docs/scripts/color-pairs.mjs +2 -0
  17. package/dist/docs/src/components/ChildPages.astro +8 -1
  18. package/dist/docs/src/components/CodeExample.astro +123 -6
  19. package/dist/docs/src/components/ColorDemo.astro +21 -18
  20. package/dist/docs/src/components/ComponentTabs.astro +1 -1
  21. package/dist/docs/src/components/DocsFooter.astro +1 -1
  22. package/dist/docs/src/components/ElevationDemo.astro +2 -2
  23. package/dist/docs/src/components/HelpOptions.astro +8 -6
  24. package/dist/docs/src/components/IconBrowser.astro +2 -2
  25. package/dist/docs/src/components/LayoutDemo.astro +178 -99
  26. package/dist/docs/src/components/NativeControlsDemo.astro +169 -44
  27. package/dist/docs/src/components/NativeFlowDemo.astro +206 -0
  28. package/dist/docs/src/components/PhaseTable.astro +9 -5
  29. package/dist/docs/src/components/RoleGuides.astro +30 -22
  30. package/dist/docs/src/components/RuleDemo.astro +111 -0
  31. package/dist/docs/src/components/ShapeDemo.astro +25 -37
  32. package/dist/docs/src/components/SiteHeader.astro +1 -1
  33. package/dist/docs/src/components/SpacingDemo.astro +5 -3
  34. package/dist/docs/src/components/SwitchToggle.astro +13 -0
  35. package/dist/docs/src/components/SystemAreas.astro +9 -6
  36. package/dist/docs/src/components/TableOfContents.astro +1 -1
  37. package/dist/docs/src/components/TokenSearch.astro +64 -0
  38. package/dist/docs/src/components/TokenTable.astro +14 -9
  39. package/dist/docs/src/components/TypeDemo.astro +1 -1
  40. package/dist/docs/src/components/logos/LogoClearSpace.astro +1 -1
  41. package/dist/docs/src/content/components/action-bar/accessibility.mdx +32 -0
  42. package/dist/docs/src/content/components/action-bar/changelog.mdx +7 -0
  43. package/dist/docs/src/content/components/action-bar/code.mdx +69 -0
  44. package/dist/docs/src/content/components/action-bar/examples.mdx +16 -0
  45. package/dist/docs/src/content/components/action-bar/meta.json +9 -0
  46. package/dist/docs/src/content/components/action-bar/style.mdx +13 -0
  47. package/dist/docs/src/content/components/action-bar/usage.mdx +35 -0
  48. package/dist/docs/src/content/components/button/accessibility.mdx +10 -5
  49. package/dist/docs/src/content/components/button/changelog.mdx +26 -1
  50. package/dist/docs/src/content/components/button/code.mdx +130 -25
  51. package/dist/docs/src/content/components/button/examples.mdx +109 -23
  52. package/dist/docs/src/content/components/button/meta.json +5 -1
  53. package/dist/docs/src/content/components/button/style.mdx +72 -0
  54. package/dist/docs/src/content/components/button/usage.mdx +118 -29
  55. package/dist/docs/src/content/components/button-group/accessibility.mdx +32 -0
  56. package/dist/docs/src/content/components/button-group/changelog.mdx +7 -0
  57. package/dist/docs/src/content/components/button-group/code.mdx +39 -0
  58. package/dist/docs/src/content/components/button-group/examples.mdx +36 -0
  59. package/dist/docs/src/content/components/button-group/meta.json +9 -0
  60. package/dist/docs/src/content/components/button-group/style.mdx +12 -0
  61. package/dist/docs/src/content/components/button-group/usage.mdx +31 -0
  62. package/dist/docs/src/content/components/icon-button/accessibility.mdx +35 -0
  63. package/dist/docs/src/content/components/icon-button/changelog.mdx +7 -0
  64. package/dist/docs/src/content/components/icon-button/code.mdx +66 -0
  65. package/dist/docs/src/content/components/icon-button/examples.mdx +46 -0
  66. package/dist/docs/src/content/components/icon-button/meta.json +9 -0
  67. package/dist/docs/src/content/components/icon-button/style.mdx +13 -0
  68. package/dist/docs/src/content/components/icon-button/usage.mdx +42 -0
  69. package/dist/docs/src/content/components/menu-button/accessibility.mdx +36 -0
  70. package/dist/docs/src/content/components/menu-button/changelog.mdx +7 -0
  71. package/dist/docs/src/content/components/menu-button/code.mdx +55 -0
  72. package/dist/docs/src/content/components/menu-button/examples.mdx +26 -0
  73. package/dist/docs/src/content/components/menu-button/meta.json +9 -0
  74. package/dist/docs/src/content/components/menu-button/style.mdx +15 -0
  75. package/dist/docs/src/content/components/menu-button/usage.mdx +44 -0
  76. package/dist/docs/src/content/components/resizable-panel/meta.json +5 -1
  77. package/dist/docs/src/content/{foundations/styles/scrollbars.mdx → components/scrollbar/code.mdx} +20 -39
  78. package/dist/docs/src/content/components/scrollbar/meta.json +9 -0
  79. package/dist/docs/src/content/components/scrollbar/usage.mdx +36 -0
  80. package/dist/docs/src/content/components/segmented-control/accessibility.mdx +32 -0
  81. package/dist/docs/src/content/components/segmented-control/changelog.mdx +7 -0
  82. package/dist/docs/src/content/components/segmented-control/code.mdx +46 -0
  83. package/dist/docs/src/content/components/segmented-control/examples.mdx +26 -0
  84. package/dist/docs/src/content/components/segmented-control/meta.json +9 -0
  85. package/dist/docs/src/content/components/segmented-control/style.mdx +13 -0
  86. package/dist/docs/src/content/components/segmented-control/usage.mdx +38 -0
  87. package/dist/docs/src/content/components/split-button/accessibility.mdx +32 -0
  88. package/dist/docs/src/content/components/split-button/changelog.mdx +7 -0
  89. package/dist/docs/src/content/components/split-button/code.mdx +57 -0
  90. package/dist/docs/src/content/components/split-button/examples.mdx +26 -0
  91. package/dist/docs/src/content/components/split-button/meta.json +9 -0
  92. package/dist/docs/src/content/components/split-button/style.mdx +12 -0
  93. package/dist/docs/src/content/components/split-button/usage.mdx +28 -0
  94. package/dist/docs/src/content/components/switch/accessibility.mdx +28 -0
  95. package/dist/docs/src/content/components/switch/examples.mdx +35 -0
  96. package/dist/docs/src/content/components/switch/meta.json +9 -0
  97. package/dist/docs/src/content/components/switch/usage.mdx +44 -0
  98. package/dist/docs/src/content/components/toggle-button/accessibility.mdx +31 -0
  99. package/dist/docs/src/content/components/toggle-button/changelog.mdx +7 -0
  100. package/dist/docs/src/content/components/toggle-button/code.mdx +45 -0
  101. package/dist/docs/src/content/components/toggle-button/examples.mdx +36 -0
  102. package/dist/docs/src/content/components/toggle-button/meta.json +9 -0
  103. package/dist/docs/src/content/components/toggle-button/style.mdx +11 -0
  104. package/dist/docs/src/content/components/toggle-button/usage.mdx +33 -0
  105. package/dist/docs/src/content/components/toolbar/accessibility.mdx +33 -0
  106. package/dist/docs/src/content/components/toolbar/changelog.mdx +7 -0
  107. package/dist/docs/src/content/components/toolbar/code.mdx +81 -0
  108. package/dist/docs/src/content/components/toolbar/examples.mdx +16 -0
  109. package/dist/docs/src/content/components/toolbar/meta.json +9 -0
  110. package/dist/docs/src/content/components/toolbar/style.mdx +12 -0
  111. package/dist/docs/src/content/components/toolbar/usage.mdx +36 -0
  112. package/dist/docs/src/content/foundations/guidelines/accessibility/statement.mdx +4 -2
  113. package/dist/docs/src/content/foundations/guidelines/accessibility/testing.mdx +1 -1
  114. package/dist/docs/src/content/foundations/guidelines/content/messages.mdx +67 -0
  115. package/dist/docs/src/content/foundations/guidelines/content/numbers-dates-and-currency.mdx +72 -0
  116. package/dist/docs/src/content/foundations/guidelines/content/style-and-grammar.mdx +92 -0
  117. package/dist/docs/src/content/foundations/guidelines/content/terms.mdx +57 -0
  118. package/dist/docs/src/content/foundations/guidelines/content/voice-and-tone.mdx +48 -0
  119. package/dist/docs/src/content/foundations/guidelines/content.mdx +22 -17
  120. package/dist/docs/src/content/foundations/styles/border.mdx +1 -6
  121. package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +66 -6
  122. package/dist/docs/src/content/foundations/styles/color/usage.mdx +5 -5
  123. package/dist/docs/src/content/foundations/styles/data-visualization.mdx +2 -78
  124. package/dist/docs/src/content/foundations/styles/elevation.mdx +2 -2
  125. package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +1 -1
  126. package/dist/docs/src/content/foundations/styles/icons/code.mdx +1 -1
  127. package/dist/docs/src/content/foundations/styles/icons/library.mdx +2 -2
  128. package/dist/docs/src/content/foundations/styles/icons/usage.mdx +0 -3
  129. package/dist/docs/src/content/foundations/styles/interaction-states.mdx +13 -69
  130. package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +4 -9
  131. package/dist/docs/src/content/foundations/styles/layout/grid.mdx +1 -1
  132. package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +3 -0
  133. package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +3 -3
  134. package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +1 -1
  135. package/dist/docs/src/content/foundations/styles/motion.mdx +3 -1
  136. package/dist/docs/src/content/foundations/styles/radius.mdx +32 -28
  137. package/dist/docs/src/content/foundations/styles/size-and-density.mdx +7 -6
  138. package/dist/docs/src/content/foundations/styles/spacing.mdx +1 -1
  139. package/dist/docs/src/content/foundations/styles/typography/code.mdx +1 -1
  140. package/dist/docs/src/content/foundations/styles/typography/usage.mdx +7 -0
  141. package/dist/docs/src/content/foundations/styles/z-index.mdx +3 -16
  142. package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +51 -2
  143. package/dist/docs/src/content/foundations/tokens/index.mdx +91 -6
  144. package/dist/docs/src/content/get-started/content.mdx +25 -3
  145. package/dist/docs/src/content/get-started/design.mdx +34 -15
  146. package/dist/docs/src/content/get-started/develop.mdx +83 -28
  147. package/dist/docs/src/content/get-started/get-help.mdx +21 -5
  148. package/dist/docs/src/content/get-started/index.mdx +11 -12
  149. package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +176 -48
  150. package/dist/docs/src/content/tools/application-content.mdx +52 -13
  151. package/dist/docs/src/content/tools/editors.mdx +36 -28
  152. package/dist/docs/src/content/tools/mermaid.mdx +42 -9
  153. package/dist/docs/src/content/tools/vueflow.mdx +199 -60
  154. package/dist/docs/src/content-vi/components/action-bar/accessibility.mdx +32 -0
  155. package/dist/docs/src/content-vi/components/action-bar/changelog.mdx +7 -0
  156. package/dist/docs/src/content-vi/components/action-bar/code.mdx +69 -0
  157. package/dist/docs/src/content-vi/components/action-bar/examples.mdx +16 -0
  158. package/dist/docs/src/content-vi/components/action-bar/style.mdx +13 -0
  159. package/dist/docs/src/content-vi/components/action-bar/usage.mdx +35 -0
  160. package/dist/docs/src/content-vi/components/button/accessibility.mdx +56 -0
  161. package/dist/docs/src/content-vi/components/button/changelog.mdx +31 -0
  162. package/dist/docs/src/content-vi/components/button/code.mdx +139 -0
  163. package/dist/docs/src/content-vi/components/button/examples.mdx +126 -0
  164. package/dist/docs/src/content-vi/components/button/style.mdx +72 -0
  165. package/dist/docs/src/content-vi/components/button/usage.mdx +133 -0
  166. package/dist/docs/src/content-vi/components/button-group/accessibility.mdx +32 -0
  167. package/dist/docs/src/content-vi/components/button-group/changelog.mdx +7 -0
  168. package/dist/docs/src/content-vi/components/button-group/code.mdx +39 -0
  169. package/dist/docs/src/content-vi/components/button-group/examples.mdx +36 -0
  170. package/dist/docs/src/content-vi/components/button-group/style.mdx +12 -0
  171. package/dist/docs/src/content-vi/components/button-group/usage.mdx +31 -0
  172. package/dist/docs/src/content-vi/components/icon-button/accessibility.mdx +35 -0
  173. package/dist/docs/src/content-vi/components/icon-button/changelog.mdx +7 -0
  174. package/dist/docs/src/content-vi/components/icon-button/code.mdx +66 -0
  175. package/dist/docs/src/content-vi/components/icon-button/examples.mdx +46 -0
  176. package/dist/docs/src/content-vi/components/icon-button/style.mdx +13 -0
  177. package/dist/docs/src/content-vi/components/icon-button/usage.mdx +42 -0
  178. package/dist/docs/src/content-vi/components/menu-button/accessibility.mdx +36 -0
  179. package/dist/docs/src/content-vi/components/menu-button/changelog.mdx +7 -0
  180. package/dist/docs/src/content-vi/components/menu-button/code.mdx +55 -0
  181. package/dist/docs/src/content-vi/components/menu-button/examples.mdx +26 -0
  182. package/dist/docs/src/content-vi/components/menu-button/style.mdx +15 -0
  183. package/dist/docs/src/content-vi/components/menu-button/usage.mdx +44 -0
  184. package/dist/docs/src/content-vi/components/resizable-panel/accessibility.mdx +58 -0
  185. package/dist/docs/src/content-vi/components/resizable-panel/changelog.mdx +20 -0
  186. package/dist/docs/src/content-vi/components/resizable-panel/code.mdx +78 -0
  187. package/dist/docs/src/content-vi/components/resizable-panel/examples.mdx +83 -0
  188. package/dist/docs/src/content-vi/components/resizable-panel/usage.mdx +97 -0
  189. package/dist/docs/src/content-vi/components/scrollbar/code.mdx +71 -0
  190. package/dist/docs/src/content-vi/components/scrollbar/usage.mdx +36 -0
  191. package/dist/docs/src/content-vi/components/segmented-control/accessibility.mdx +32 -0
  192. package/dist/docs/src/content-vi/components/segmented-control/changelog.mdx +7 -0
  193. package/dist/docs/src/content-vi/components/segmented-control/code.mdx +46 -0
  194. package/dist/docs/src/content-vi/components/segmented-control/examples.mdx +26 -0
  195. package/dist/docs/src/content-vi/components/segmented-control/style.mdx +13 -0
  196. package/dist/docs/src/content-vi/components/segmented-control/usage.mdx +38 -0
  197. package/dist/docs/src/content-vi/components/split-button/accessibility.mdx +32 -0
  198. package/dist/docs/src/content-vi/components/split-button/changelog.mdx +7 -0
  199. package/dist/docs/src/content-vi/components/split-button/code.mdx +57 -0
  200. package/dist/docs/src/content-vi/components/split-button/examples.mdx +26 -0
  201. package/dist/docs/src/content-vi/components/split-button/style.mdx +12 -0
  202. package/dist/docs/src/content-vi/components/split-button/usage.mdx +28 -0
  203. package/dist/docs/src/content-vi/components/switch/accessibility.mdx +28 -0
  204. package/dist/docs/src/content-vi/components/switch/examples.mdx +35 -0
  205. package/dist/docs/src/content-vi/components/switch/usage.mdx +44 -0
  206. package/dist/docs/src/content-vi/components/toggle-button/accessibility.mdx +31 -0
  207. package/dist/docs/src/content-vi/components/toggle-button/changelog.mdx +7 -0
  208. package/dist/docs/src/content-vi/components/toggle-button/code.mdx +45 -0
  209. package/dist/docs/src/content-vi/components/toggle-button/examples.mdx +36 -0
  210. package/dist/docs/src/content-vi/components/toggle-button/style.mdx +11 -0
  211. package/dist/docs/src/content-vi/components/toggle-button/usage.mdx +33 -0
  212. package/dist/docs/src/content-vi/components/toolbar/accessibility.mdx +33 -0
  213. package/dist/docs/src/content-vi/components/toolbar/changelog.mdx +7 -0
  214. package/dist/docs/src/content-vi/components/toolbar/code.mdx +81 -0
  215. package/dist/docs/src/content-vi/components/toolbar/examples.mdx +16 -0
  216. package/dist/docs/src/content-vi/components/toolbar/style.mdx +12 -0
  217. package/dist/docs/src/content-vi/components/toolbar/usage.mdx +36 -0
  218. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/statement.mdx +4 -2
  219. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/testing.mdx +1 -1
  220. package/dist/docs/src/content-vi/foundations/guidelines/content/messages.mdx +67 -0
  221. package/dist/docs/src/content-vi/foundations/guidelines/content/numbers-dates-and-currency.mdx +71 -0
  222. package/dist/docs/src/content-vi/foundations/guidelines/content/style-and-grammar.mdx +91 -0
  223. package/dist/docs/src/content-vi/foundations/guidelines/content/terms.mdx +57 -0
  224. package/dist/docs/src/content-vi/foundations/guidelines/content/voice-and-tone.mdx +48 -0
  225. package/dist/docs/src/content-vi/foundations/guidelines/content.mdx +24 -19
  226. package/dist/docs/src/content-vi/foundations/styles/border.mdx +1 -5
  227. package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +65 -6
  228. package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +1 -1
  229. package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +7 -7
  230. package/dist/docs/src/content-vi/foundations/styles/data-visualization.mdx +1 -1
  231. package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +3 -3
  232. package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +2 -2
  233. package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +1 -1
  234. package/dist/docs/src/content-vi/foundations/styles/icons/library.mdx +2 -2
  235. package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +1 -4
  236. package/dist/docs/src/content-vi/foundations/styles/illustration.mdx +3 -3
  237. package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +13 -10
  238. package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +4 -9
  239. package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +1 -1
  240. package/dist/docs/src/content-vi/foundations/styles/layout/overlays.mdx +3 -0
  241. package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +4 -4
  242. package/dist/docs/src/content-vi/foundations/styles/logos/product-logos.mdx +1 -1
  243. package/dist/docs/src/content-vi/foundations/styles/logos/using-the-logo.mdx +1 -1
  244. package/dist/docs/src/content-vi/foundations/styles/motion.mdx +3 -1
  245. package/dist/docs/src/content-vi/foundations/styles/opacity.mdx +2 -2
  246. package/dist/docs/src/content-vi/foundations/styles/radius.mdx +32 -28
  247. package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +7 -6
  248. package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +1 -1
  249. package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +1 -1
  250. package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +7 -0
  251. package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +3 -16
  252. package/dist/docs/src/content-vi/foundations/tokens/all-tokens.mdx +51 -2
  253. package/dist/docs/src/content-vi/foundations/tokens/index.mdx +90 -5
  254. package/dist/docs/src/content-vi/get-started/content.mdx +36 -0
  255. package/dist/docs/src/content-vi/get-started/design.mdx +49 -0
  256. package/dist/docs/src/content-vi/get-started/develop.mdx +110 -0
  257. package/dist/docs/src/content-vi/get-started/get-help.mdx +35 -0
  258. package/dist/docs/src/content-vi/get-started/index.mdx +49 -0
  259. package/dist/docs/src/content-vi/release-phases/index.mdx +11 -0
  260. package/dist/docs/src/content-vi/tools/ai-agents.mdx +36 -0
  261. package/dist/docs/src/content-vi/tools/ant-design-vue-theme.mdx +676 -0
  262. package/dist/docs/src/content-vi/tools/application-content.mdx +171 -0
  263. package/dist/docs/src/content-vi/tools/editors.mdx +254 -0
  264. package/dist/docs/src/content-vi/tools/eslint.mdx +15 -0
  265. package/dist/docs/src/content-vi/tools/index.mdx +7 -0
  266. package/dist/docs/src/content-vi/tools/mermaid.mdx +179 -0
  267. package/dist/docs/src/content-vi/tools/stylelint.mdx +18 -0
  268. package/dist/docs/src/content-vi/tools/vueflow.mdx +264 -0
  269. package/dist/docs/src/content.config.ts +13 -2
  270. package/dist/docs/src/lib/dates.ts +8 -0
  271. package/dist/docs/src/lib/i18n.ts +1 -0
  272. package/dist/docs/src/lib/icons.ts +2 -2
  273. package/dist/docs/src/lib/lucide-svg.ts +14 -0
  274. package/dist/docs/src/lib/navigation.ts +7 -4
  275. package/dist/docs/src/lib/token-descriptions-vi.ts +254 -12
  276. package/dist/docs/src/lib/tokens.ts +3 -0
  277. package/dist/docs/src/lib/utils.ts +9 -0
  278. package/dist/docs/src/styles/chrome.css +7 -7
  279. package/dist/docs/src/styles/color.css +31 -31
  280. package/dist/docs/src/styles/docs.css +75 -46
  281. package/dist/docs/src/styles/elevation.css +1 -1
  282. package/dist/docs/src/styles/global.css +28 -11
  283. package/dist/docs/src/styles/icons.css +16 -16
  284. package/dist/docs/src/styles/kit.css +71 -10
  285. package/dist/docs/src/styles/layout.css +16 -11
  286. package/dist/docs/src/styles/logos.css +24 -24
  287. package/dist/docs/src/styles/opacity.css +3 -3
  288. package/dist/docs/src/styles/registry.css +10 -0
  289. package/dist/docs/src/styles/rules.css +24 -0
  290. package/dist/docs/src/styles/shapes.css +2 -2
  291. package/dist/docs/src/styles/tokens.css +213 -120
  292. package/dist/docs/src/styles/tokens.js +69 -32
  293. package/dist/docs/src/styles/typography.css +9 -9
  294. package/dist/docs/src/styles/zindex.css +6 -5
  295. package/dist/docs/tokens/button.json +51 -0
  296. package/dist/docs/tokens/color.json +13 -8
  297. package/dist/docs/tokens/components.json +39 -0
  298. package/dist/docs/tokens/content.json +103 -10
  299. package/dist/docs/tokens/diagram.json +490 -49
  300. package/dist/docs/tokens/editor.json +128 -22
  301. package/dist/docs/tokens/flow.json +412 -80
  302. package/dist/docs/tokens/layout.json +13 -4
  303. package/dist/docs/tokens/motion.json +14 -0
  304. package/dist/docs/tokens/radius.json +9 -9
  305. package/dist/docs/tokens/renderer.json +8 -0
  306. package/dist/docs/tokens/resize.json +84 -15
  307. package/dist/docs/tokens/scrollbar.json +42 -7
  308. package/dist/docs/tokens/size.json +6 -6
  309. package/dist/docs/tokens/spacing.json +1 -1
  310. package/dist/docs/tokens/switch.json +306 -51
  311. package/dist/docs/tokens/typography.json +1 -1
  312. package/dist/docs/tokens/visualization.json +465 -53
  313. package/dist/docs/tokens/z-index.json +0 -10
  314. package/dist/index.js +3053 -777
  315. package/package.json +1 -1
  316. package/dist/docs/src/brand/structure-proposal.md +0 -227
@@ -0,0 +1,179 @@
1
+ ---
2
+ title: Mermaid và sơ đồ thực thi
3
+ description: "Cấu hình Mermaid theo token gốc, trạng thái thực thi mô tả, tương tác và xuất ảnh."
4
+ order: 6
5
+ ---
6
+
7
+ Dùng `@beehexa/mermaid-tokens` cho mọi lần khởi tạo Mermaid. Gói trả về một `MermaidConfig`
8
+ mới từ `@beehexa/design-tokens`; Mermaid vẫn là peer dependency. Truyền `dark` và `locale`
9
+ đang dùng ở mỗi lần render. Đổi theme hay ngôn ngữ thì phải render lại: màu SVG và số đo
10
+ chữ không tự cập nhật chỉ nhờ CSS.
11
+
12
+ ```ts
13
+ import { createMermaidConfig, createCanvasTheme } from '@beehexa/mermaid-tokens';
14
+
15
+ mermaid.initialize(createMermaidConfig({ dark: true, locale: 'vi' }));
16
+ const canvas = createCanvasTheme({ dark: true, locale: 'vi' });
17
+ ```
18
+
19
+ Factory khóa `theme`, `look`, `themeVariables`, `themeCSS`, `fontFamily`, `fontSize` và
20
+ `htmlLabels` trước `layout`. Mermaid 12 nối mảng khóa an toàn này vào các khóa bảo mật mặc
21
+ định của nó. CSS init trong định nghĩa sơ đồ không được thay font token của thẻ nội dung
22
+ phong phú; cấu trúc, style trạng thái do định nghĩa sở hữu và các chỉ thị bố cục không liên
23
+ quan vẫn dùng được. Quy ước cấu hình này không khẳng định một ma trận kiểm thử render đã đạt.
24
+
25
+ ## Nghĩa trước màu
26
+
27
+ Vai trò `diagram.*` mô tả đồ thị thực thi vận hành, không phải sơ đồ giải thích mang thương
28
+ hiệu hay bảng màu chuỗi dữ liệu của biểu đồ. Cùng vai trò áp cho bản vẽ, inspector của nó
29
+ và ảnh xuất ra.
30
+
31
+ - Nút mặc định và chưa xác định dùng các cặp trung tính `node-*`.
32
+ - `state-ran-ok` nghĩa là **đã chạy mà không báo lỗi**, không phải thành công nghiệp vụ đã
33
+ được xác minh. Màu thông tin và dấu hoàn tất phân biệt nút đã chạy với nút chưa chạm tới
34
+ mà không dùng màu xanh thành công nghiệp vụ. Kết quả HTTP/nghiệp vụ giữ nhãn trạng thái
35
+ phù hợp riêng của chúng.
36
+ - Nút lỗi dùng `fail-*`, kèm dấu lỗi và chữ trạng thái.
37
+ - `log-reached` chỉ từ log dùng dấu đã tới. `log-unfinished` dùng màu cảnh báo, dấu ba chấm
38
+ và đường biên nét đứt; nó không bao giờ là lỗi đã chứng minh.
39
+ - Nút không bao giờ được tới dùng `unreached-*` và nhãn trạng thái rõ ràng; chúng không phải
40
+ control bị vô hiệu. Nhánh không đi qua dùng `nottaken-*` cùng đường biên nét đứt.
41
+ - Số lần lặp dùng cặp trung tính `badge-*`. Lặp lại tự nó không phải cảnh báo.
42
+ - Ký hiệu nhóm loại dùng `tile-*`. Chúng nhận diện loại bước, không phải trạng thái chạy.
43
+ - Chọn và hover dùng `selection-ring` như **hình học riêng nằm ngoài đường biên nút**. Không
44
+ bao giờ tô lại nút lỗi để thể hiện nó đang được chọn.
45
+ - Nhãn trường dùng `code-key`, giá trị dùng `code-value`, trên nền `code-bg`. Các trường mô
46
+ tả này không phải link. Khối code đầy đủ giữ cặp `color.code.*` hiện có.
47
+
48
+ Luôn giữ nhãn, dấu, hình dạng hoặc kiểu nét đứt: màu đơn thuần không phải bằng chứng.
49
+ Chỉ ghép màu chữ với đúng màu nền đã đặt tên của nó. Kiểm tra tương phản chữ SVG thật và
50
+ các nét có ý nghĩa ở cả hai theme; việc có token không chứng nhận sơ đồ đã render.
51
+
52
+ ## Chữ, khoảng cách và tương tác
53
+
54
+ `diagram.node-font` là alias của `font.body.default`, kể cả dòng cao hơn cho tiếng Việt.
55
+ Dùng đầy đủ style chữ gốc cho nhãn nút, tiêu đề inspector, metadata và code. Không thay độ
56
+ đậm hay line-height của chúng bằng công thức riêng của component. Để dấu tiếng Việt và
57
+ nhãn dài xuống dòng mà không bị cắt. `diagram.padding` là padding bên trong nút;
58
+ `diagram.export-padding` là khung bao bản vẽ khi fit/xuất. Tọa độ đồ thị và cấu trúc bố cục
59
+ hiện có không phải lựa chọn theo thang khoảng cách.
60
+
61
+ Luồng worker gọn gốc giữ đúng đầu ra `compactFlowMermaid` và `flowStylesheet()` công khai
62
+ từ `@beehexa/hexasync-template-model`. Cài stylesheet đó trước khi Mermaid đo nhãn, rồi đưa
63
+ nó vào SVG khi xuất độc lập. Thêm `hx-flow` vào root SVG và gắn `workerFlowSvgStyle(canvas)`
64
+ từ `@beehexa/mermaid-tokens` làm inline style. Hình học thẻ gốc, mask theo họ và nét trạng
65
+ thái có kiểu vẫn là gốc; adapter sở hữu màu gốc dạng giá trị cụ thể, cặp ô/ký hiệu nhóm
66
+ loại trung tính và bán kính ô chuẩn.
67
+
68
+ Gói worker đã cài sinh nhãn gọn và không có tùy chọn callback nhãn phong phú/DOM. Stylesheet
69
+ riêng của nó dùng `p::first-line`, không thể nhận diện toàn bộ tiêu đề đã xuống dòng tách
70
+ khỏi phụ đề. Muốn tiêu đề phong phú đầy đủ thì cần năng lực cấu trúc/nhãn công khai từ phía
71
+ upstream. Không thêm bộ sinh phía sau, sửa DOM nhãn hay mẹo first-line để giả lập năng lực
72
+ đó. CSS nhúng trong SVG cũng cung cấp cặp nhãn cạnh không trong suốt theo nguồn và đặc tính
73
+ `"cv05", "cv08"` rõ ràng cùng shorthand font đầy đủ; SVG/ảnh xuất không được phụ thuộc vào
74
+ quy tắc font-feature chung của document.
75
+
76
+ Nút xem trước tương tác bật bằng `bh-mermaid-interactive-node` trên nhóm SVG thật. Giữ
77
+ role/tabindex gốc, xử lý bàn phím và trạng thái chọn thật; gắn `aria-selected="true"` cho
78
+ role chọn được hỗ trợ hoặc `aria-pressed="true"` cho nút bật/tắt, không bao giờ chỉ vì mở
79
+ rộng. Stylesheet nhúng thêm `border.width.focused` / `diagram.selection-ring` bên ngoài nút
80
+ khi hover, focus-visible và khi chọn, với `state.focus.offset`; nó không bao giờ tô lại màu
81
+ nền/nét trạng thái chạy. `bh-mermaid-category-glyph` trên đường icon SVG tự vẽ dùng
82
+ `diagram.tile-glyph`, `border.width.default` và đầu/nối nét tròn. Tọa độ đường và biến đổi
83
+ vẫn là hình học đồ thị.
84
+
85
+ Import `@beehexa/mermaid-tokens/css` một lần cho HTML bao quanh SVG.
86
+ `data-bh-diagram="canvas|code|key|value|description|badge"` chọn các vai trò sẵn có
87
+ `diagram.canvas`, `code-bg`, `code-key`, `code-value`, `node-desc` và badge số lần lặp đi
88
+ cặp. Công thức badge gồm khung nhãn `radius.050` thông thường; dấu font nội dung và cấu
89
+ trúc ghép vẫn độc lập. Không cần công thức màu, viền hay nền canvas cục bộ.
90
+
91
+ Chữ `foreignObject` nhúng cũng đặt `-webkit-text-fill-color: currentcolor`. Điều này nối
92
+ bản sao HTML-sang-ảnh với màu nhãn SVG đã phân giải thay vì màu tô chữ kế thừa từ document
93
+ chứa; không chèn stylesheet ứng dụng thứ hai khi chụp PNG.
94
+
95
+ Phần tử pan/zoom thật dùng `bh-diagram-viewport`, chỉ có `data-bh-dragging="true"` trong
96
+ lúc kéo, cho hành vi grab/grabbing, touch-action và user-select. Ứng dụng giữ xử lý sự kiện,
97
+ pointer capture, biến đổi viewport, cắt và khung fit/xuất; không API bố cục Mermaid gốc nào
98
+ thay được cơ chế cử chỉ đó của ứng dụng. Nút phong phú có vòng ngoài trang trí dùng
99
+ `data-bh-clickable="true"` và `data-bh-ring="hover"` trên vòng hover. CSS nhúng quyết định
100
+ việc hiện khi trỏ/hover, không đổi hình học vòng hay trạng thái chọn/mở rộng riêng.
101
+
102
+ Nút điều hướng bằng chứng gốc dùng `data-bh-diagram="occurrence"` với `aria-current="true"`
103
+ để gạch chân lần xuất hiện hiện tại. Đây là trạng thái điều hướng, không phải màu trạng thái
104
+ thực thi; hành vi focus/bàn phím gốc giữ nguyên.
105
+
106
+ Bề mặt nút/cụm/actor/ghi chú hình chữ nhật, thẻ thực thi, ô nhóm loại và bề mặt nhãn nhỏ
107
+ dùng `radius.100` (8 px), kể cả khi xuất SVG. Hình tròn, hình thoi và đường cạnh giữ hình
108
+ học cấu trúc. Thẻ inspector và control/thanh công cụ viewport do bên dùng sở hữu dùng
109
+ `--bh-radius-100`; hộp thoại/drawer dùng `radius.150` (12 px). Theo
110
+ [thang radius theo vai trò](/vi/foundations/styles/radius/).
111
+
112
+ Bản xem trước khi soạn dùng `diagram.preview-height` cho cả hai ô chia và
113
+ `diagram.minimum-height` cho viewport bản vẽ; toàn màn hình thì lấp đầy phần tử chứa. Sơ đồ
114
+ chia chỉ đọc giữ mức tối thiểu bằng 0 để co theo phần tử chứa. Trình xem bằng chứng có cấu
115
+ trúc dùng `diagram.evidence-height`; nhiều ô thân request dùng
116
+ `diagram.evidence-minimum-height` để mọi phần vẫn với tới được.
117
+
118
+
119
+ Dùng một tấm phẳng không trong suốt. Không gradient, kính, chuyển động trang trí, chuyển
120
+ động chạy dọc hay chuyển tiếp trạng thái. Giữ các control zoom, fit, toàn màn hình/thoát và
121
+ xuất PNG. Tương tác không được ghi đè màu nền, nét, nét đứt hay dấu lỗi do định nghĩa sở
122
+ hữu. Control nằm ngoài phần tử SVG được chụp.
123
+
124
+ ## Xuất theo theme đã render
125
+
126
+ Phân giải giá trị token cụ thể cho các trường cấu hình Mermaid cần chúng. CSS luồng worker
127
+ gốc dùng thuộc tính `--hx-*` riêng; nguồn cung cấp màu ngữ nghĩa cho chúng và giữ màu cụ thể
128
+ gốc của cạnh/mũi tên bằng chứng. Chụp lại theme đã render và nền canvas không trong suốt
129
+ trên phần tử SVG. Xuất bản vẽ đang hiển thị, đầy đủ trang trí, theo khung tự nhiên với
130
+ `exportPadding`, không theo viewport đã biến đổi. Giữ bản chụp kể cả khi theme ứng dụng đổi
131
+ trước khi bản vẽ mới xong. Font, line-height theo ngôn ngữ, màu trạng thái và hình học chọn
132
+ bên ngoài phải còn nguyên khi chụp SVG/PNG. Ảnh trong suốt hay tấm trắng phía sau nhãn tối
133
+ không phải phương án dự phòng hợp lệ.
134
+
135
+ Toàn bộ nguồn của gói nằm trong `tokens/diagram.json`; bên dùng không được giữ bảng màu thứ
136
+ hai hay chép giá trị token đã sinh. Tham chiếu gói cục bộ chỉ dùng cho phát triển cục bộ cho
137
+ tới khi có bản phát hành được duyệt.
138
+
139
+ Dùng đúng API model đã cài: `compactWorkerFlow` cung cấp đồ thị gọn công khai và bảng ánh
140
+ xạ từ địa chỉ soạn sang id gọn, còn `compactFlowMermaid` tuần tự hóa đồ thị đó.
141
+ `RenderNodeOverlay` chỉ nhận `{ state?, repeat? }`; không truyền `roles`, hàm phân giải màu
142
+ của bên gọi, ghi đè nét hay tùy chọn trình vẽ không được hỗ trợ. Model gốc sở hữu việc đọc
143
+ trạng thái, badge lặp và nút `indeterminate` ngầm định khi có bất kỳ trạng thái vẽ nào.
144
+
145
+ Nhắc tới trong log chỉ xác lập `reached` hoặc `unfinished`, không bao giờ là bằng chứng có
146
+ kiểu `ranOk` hay `ranFailed`. Adapter `mermaidEvidenceStyles` của nguồn nhận id nút gọn, chỉ
147
+ số cạnh gọn công khai thật và `{ dark, locale }` rõ ràng. Bằng chứng có kiểu được ưu tiên
148
+ cho các bước có tên và các điểm nối chúng sở hữu, kể cả khi điểm nối của bước lỗi không có
149
+ trạng thái rõ ràng. Bên dùng giữ việc phân giải địa chỉ soạn, quy lỗi, các lần xuất hiện lặp
150
+ và dữ liệu thực thi; nguồn sở hữu màu theme và công thức tương tác. Không cần bảng màu thứ hai.
151
+
152
+ Nhấn mạnh cạnh dùng màu gốc dạng giá trị cụ thể, không dùng `var(...)` hay khai báo
153
+ custom property: DSL của Mermaid 12 từ chối các hàm đó. Không thêm `!important` trong DSL:
154
+ cơ chế nhân bản mũi tên có màu gốc coi hậu tố đó là một phần thuộc tính màu SVG. Sau khi
155
+ render/làm sạch, `preserveMermaidDefinitionPaint(svg)` đẩy nét cạnh gốc thật và thuộc tính
156
+ mũi tên có màu rõ ràng lên trên màu important trung tính của stylesheet worker, không đổi
157
+ đường, hình mũi tên hay ID. Chuyển tiếp chưa biết vẫn là chưa biết; các chỉ số toàn cục liên
158
+ tiếp đã ghi có thể chứng minh một cạnh trực tiếp duy nhất, nhưng hai đầu đã chạy thôi chưa
159
+ chứng minh một lần đi qua có kiểu.
160
+
161
+ <span id="shared-drawing-viewport-and-dock"></span>
162
+
163
+ ## Viewport bản vẽ và dock dùng chung
164
+
165
+ Data Flow là tham chiếu canvas chuẩn: `diagram.canvas` và `diagram.grid`, với khoảng lưới
166
+ `diagram.grid-gap` (16 px) và chấm `diagram.grid-dot` (1 px) theo tọa độ camera. Đây là hình
167
+ học đồ thị, không phải kích thước vùng bấm cho người đọc. `.bh-diagram-viewport` cung cấp
168
+ họa tiết chấm của nguồn; gắn `--bh-canvas-grid-x`, `--bh-canvas-grid-y` và
169
+ `--bh-canvas-grid-scale` của nó vào camera hiện có. Root SVG và thân stage mặc định
170
+ (`diagram.group-fill`) trong suốt trên màn hình, không phải tấm nhạt không trong suốt che
171
+ lưới. Đường biên/tiêu đề stage gốc giữ nguyên. Khi xuất vẫn dùng canvas gốc không trong
172
+ suốt đã chụp theo theme đang render.
173
+
174
+ Đặt control gốc thật **bên trong** viewport đó, ngoài bản vẽ đã biến đổi và phần tử SVG được
175
+ chụp. `bh-diagram-dock` trên Space gốc cùng `bh-control-group` `data-bh-variant="dock"` cung
176
+ cấp dock nổi góc dưới trái và họ control gốc dùng chung với Data Flow. Không có thanh công
177
+ cụ/hàng header riêng bên ngoài và không chừa dải trống. Chặn lan sự kiện con trỏ/con lăn/
178
+ bàn phím (trừ Escape) trên dock, giữ nguyên focus, popup và xử lý Escape của overlay gốc.
179
+ Giữ các khác biệt thao tác thật; không chép thao tác chỉ có ở Data Flow sang Mermaid.
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: Quy tắc Stylelint
3
+ description: "Quy tắc Stylelint đánh dấu giá trị thô ở chỗ đã có design token."
4
+ order: 1
5
+ ---
6
+
7
+ > Dự kiến. Plugin chưa được phát hành; trang này mô tả các quy tắc nó sẽ có.
8
+
9
+ ## Quy tắc
10
+
11
+ | Quy tắc | Đánh dấu |
12
+ | --- | --- |
13
+ | `beehexa/no-raw-color` | Mã hex, `rgb()` và tên màu. Dùng token `--bh-color-*`. |
14
+ | `beehexa/no-color-scale` | Token thang màu, màu thương hiệu và màu cố định (`--bh-color-graphite-9`, `--bh-color-brand-yellow`). Dùng role token. |
15
+ | `beehexa/no-state-opacity` | `opacity`, `filter` hoặc lớp phủ trong suốt ở `:hover`, `:active` hay `:disabled`. Dùng token màu của trạng thái đó. |
16
+ | `beehexa/no-raw-spacing` | Giá trị pixel và rem trong `margin`, `padding` và `gap`. Dùng `--bh-space-*`. |
17
+ | `beehexa/no-raw-radius` | Giá trị thô trong `border-radius`. Dùng `--bh-radius-*`. |
18
+ | `beehexa/known-tokens` | Biến `--bh-*` không tồn tại. |
@@ -0,0 +1,264 @@
1
+ ---
2
+ title: Theme VueFlow
3
+ description: "Tone màu chung của đồ thị theo token gốc, theme đi cặp và tích hợp VueFlow 1."
4
+ order: 5
5
+ ---
6
+
7
+ `@beehexa/vueflow-tokens` chuyển token chính thức sang VueFlow 1. Gói không chép mã nguồn
8
+ VueFlow, không đóng gói Vue, không sinh dữ liệu đồ thị và không đổi chiều quan hệ.
9
+
10
+ ## Cài đặt và áp dụng
11
+
12
+ Cài gói này, `@beehexa/design-tokens`, Vue 3, và các peer core, controls, minimap của
13
+ VueFlow 1. Nạp CSS core, theme, controls và minimap của upstream trong entry đồ thị lazy,
14
+ trước CSS của adapter; nạp CSS design token gốc một lần với root 16px/chữ thân 14px.
15
+ Các gói nguồn cục bộ vẫn là `0.0.0` riêng tư; đó không phải một bản phát hành registry.
16
+
17
+ ```vue
18
+ <script setup lang="ts">
19
+ import { computed } from 'vue'
20
+ import { VueFlow } from '@vue-flow/core'
21
+ import { Background } from '@vue-flow/background'
22
+ import { Controls } from '@vue-flow/controls'
23
+ import { MiniMap } from '@vue-flow/minimap'
24
+ import { createVueFlowTheme } from '@beehexa/vueflow-tokens'
25
+ import '@beehexa/design-tokens/css'
26
+ import '@vue-flow/core/dist/style.css'
27
+ import '@vue-flow/core/dist/theme-default.css'
28
+ import '@vue-flow/controls/dist/style.css'
29
+ import '@vue-flow/minimap/dist/style.css'
30
+ import '@beehexa/vueflow-tokens/css'
31
+
32
+ const props = defineProps<{ dark: boolean; locale: 'en' | 'vi' }>()
33
+ const theme = computed(() => createVueFlowTheme(props))
34
+ // nodes and edges remain application graph data; never recreate their IDs on theme changes.
35
+ </script>
36
+
37
+ <template>
38
+ <VueFlow :class="theme.class" :style="theme.style" v-bind="theme.flowOptions">
39
+ <Background v-bind="theme.background" />
40
+ <Controls />
41
+ <MiniMap v-bind="theme.minimap" />
42
+ </VueFlow>
43
+ </template>
44
+ ```
45
+
46
+ Factory trả về các biến theo phạm vi, binding viewport có kiểu `FlowProps` (không dùng
47
+ `FlowOptions` đã ngừng hỗ trợ), và binding cho Background/MiniMap. Nó lấy giá trị sáng
48
+ cùng phần ghi đè tối và các phương án chữ tiếng Việt từ gói token. Tính lại khi theme hoặc
49
+ ngôn ngữ đổi. Giữ handler ready/error và fit đồ thị với padding `0.2` khi phần tử chứa đo
50
+ được hoặc đổi kích thước. Dùng đúng tùy chọn `fitViewOnInit` thật của VueFlow 1; không
51
+ truyền tên tùy chọn viewport tự đặt.
52
+
53
+ ## Tone màu không phải trạng thái
54
+
55
+ `FlowTone` (`FLOW_TONES`) đặt tên tám tone màu chung: `blue`, `red`, `green`, `crimson`,
56
+ `yellow`, `teal`, `magenta` và `purple`. Mỗi tone đọc một bộ vai trò `flow.category.*` có sẵn
57
+ của nền tảng; các khóa nền tảng giữ nguyên tên, và gói không gán nghĩa nào cho tone. Bên dùng
58
+ tự quyết định loại nút hay loại quan hệ nào của mình dùng tone nào. Tone không được hiểu là
59
+ thành công, thất bại hay cảnh báo. Giữ nhãn loại và icon của nút; màu không bao giờ là cách
60
+ nhận diện duy nhất, và tone không xác nhận trạng thái của một lần chạy.
61
+
62
+ Mỗi tone cung cấp `foreground`, `background`, `border` và `hover` như một vai trò sáng/tối đi
63
+ cặp, không trong suốt. Dùng `getFlowTonePalette(tone)` cho binding dựa trên CSS; `border` của
64
+ nó là danh tính khung/cạnh. Các vai trò gốc này thay cho bảng màu lịch sử do ứng dụng tự giữ,
65
+ lớp phủ alpha, gradient và hàm chỉnh bảng màu. Không bao giờ nối hậu tố alpha hex vào biến
66
+ CSS, hay làm sáng một vai trò đã phân giải ở phía sau. Với Tag loại gốc, gắn
67
+ `getFlowToneBadgeStyles(tone)` vào prop `style` công khai và bỏ `color`. Công thức bất biến,
68
+ được cache này ghép foreground/background/border của tone thay vì đặt chữ trắng gốc lên nét
69
+ khung/cạnh. Kiểm tra tương phản chuẩn gồm cả tám cặp chữ nhỏ ở cả hai theme với mức WCAG AA
70
+ 4.5:1; bộ component gốc minh họa màu thật của chúng. Foreground và border của tone `teal` vẫn
71
+ là hai vai trò riêng.
72
+
73
+
74
+ Trạng thái chọn dùng `color.border.selected` cùng viền ngoài khi chọn; focus bàn phím dùng
75
+ riêng `color.border.focus`, độ dày viền focus và `state.focus.offset`. Lỗi dùng khung
76
+ danger cùng nét đứt/dấu hiệu không dựa vào màu và nhãn lỗi đọc được. Chọn hay focus không
77
+ được ghi đè danh tính tone, che lỗi, hay chỉ truyền đạt bằng màu.
78
+ Handle khi nghỉ dùng vai trò icon trung tính. Màu focus dành cho focus thật, không phải
79
+ trang trí luôn bật cho điểm nối.
80
+
81
+ ## Nội dung tùy chỉnh và kích thước
82
+
83
+ Dùng `getFlowNodeStyles({ tone, width, height, shape? }, state)` cho thân nút tùy chỉnh. Hàm
84
+ gắn font ngữ nghĩa, khoảng cách, cặp màu của tone và kích thước do bên dùng sở hữu;
85
+ `shape: 'circle'` bo tròn hẳn thân nút và `state.dashed` vẽ viền nét đứt. Giữ icon tùy chỉnh,
86
+ logo, nhãn, handle, ngữ nghĩa trợ năng và sự kiện trong ứng dụng. Chỉ báo loading có
87
+ ý nghĩa có thể chuyển động; hiệu ứng nút xuất hiện để trang trí, danh tính nhấp nháy, icon
88
+ xoay khi rảnh, biến đổi khi hover, nét đứt chạy trên cạnh, gradient và hiệu ứng kính không
89
+ thuộc theme.
90
+
91
+ Nội dung theo tone tùy chỉnh dùng `getFlowToneStyles(tone, part?)`; `foreground` đặt màu chữ
92
+ của tone, `border` đặt màu viền và `background` đặt bề mặt đi cặp. Ký hiệu theo tone dùng
93
+ `getFlowIconStyles(tone, options)`, với màu mặc định là màu viền của tone, không phải màu chữ.
94
+ Options nhận tên kích thước icon gốc hoặc kích thước số của API, một màu đã phân giải từ
95
+ nguồn, và disabled.
96
+ Khóa icon trạng thái (`status-success|warning|error|info|loading`) và khóa control
97
+ (`control-expand|collapse|help`) phân giải sang các vai trò icon vận hành/trung tính riêng.
98
+ `bh-flow-icon[data-bh-loading="true"]` cung cấp chuyển động loading có ý nghĩa, có hỗ trợ
99
+ giảm chuyển động. Không bao giờ tạo chuyển động cho icon loại khi rảnh.
100
+
101
+ Với chỉ báo quan hệ có nhãn, dùng `bh-flow-tone-mark` và `data-bh-tone="<FlowTone>"`: nguồn
102
+ quyết định hình tròn `space.075` và màu tô bằng màu viền của tone (`blue` khi không đặt).
103
+ Nhãn/số đếm phải giữ nghĩa không dựa vào màu; dấu này không truyền đạt trạng thái chạy.
104
+
105
+ Gói không cung cấp bảng kích thước nút, lưới hay bố cục: hình học nút thuộc về bên dùng, và
106
+ việc vẽ, bố cục và căn giữa theo nửa kích thước phải đọc cùng một nguồn của bên dùng. Giữ
107
+ nguyên tọa độ đồ thị hiện có khi áp theme.
108
+
109
+ Tọa độ bố cục đồ thị, kích thước tự nhiên, cơ chế flex/grid và biến đổi viewport không phải
110
+ giá trị bảng màu. Không tùy tiện làm tròn chúng theo thang khoảng cách. Việc áp tone không
111
+ được đổi ID, trạng thái mở rộng, vị trí đã lưu hay ngữ nghĩa quan hệ của đồ thị.
112
+
113
+ Thân nút thông thường, thẻ MiniMap và khung Controls dùng `radius.100` (8 px).
114
+ Controls bo các góc nút lộ ra mà không cắt focus. Logo của nút giữ `radius.075` (6 px)
115
+ lồng bên trong. Nút hình tròn giữ hình tròn thật, handle kết nối cũng vậy; bán kính
116
+ định tuyến cạnh vẫn là hình học đường đi. Thẻ inspector tùy chỉnh và control/thanh công cụ
117
+ đồ thị dùng `--bh-radius-100`; hộp thọai/drawer dùng `radius.150` (12 px). Theo
118
+ [thang radius theo vai trò](/vi/foundations/styles/radius/).
119
+ Menu thu phóng gốc của dock dùng `radius.overlay` (8 px), độc lập với Nút gọn
120
+ và mục menu giữ `radius.050` (4 px). Không suy ra bán kính bề mặt menu từ bán kính
121
+ nút cộng một độ lệch pixel cố định; quy ước này thuộc CSS đi kèm của Source.
122
+
123
+ Gắn tùy chọn tương phản cao của người dùng vào `data-bh-high-contrast="true"` trên phần tử
124
+ `bh-vue-flow` thật. CSS đi kèm làm dày viền focus của nút/cạnh/đường, button và
125
+ `role="button"` tùy chỉnh từ `border.width.focused` (2 px) lên `border.width.accent` (4 px),
126
+ giữ nguyên màu/khoảng lệch focus gốc. Không giữ công thức focus cho phần tử con do ứng dụng
127
+ tự làm.
128
+
129
+ Cùng phần tử đó nhận `data-bh-large-text="true"` và `data-bh-increased-spacing="true"` cho
130
+ các tùy chọn trợ năng người dùng bật: chữ nút 1.125em, và line-height 1.6 / letter-spacing
131
+ 0.02em. Giữ binding tùy chọn thật của người dùng; không lặp CSS phần tử con tại chỗ.
132
+
133
+ Bên dùng `WorkflowViewer` gốc dùng `.bh-workflow-canvas` với `data-bh-contrast="high"`. Công
134
+ thức đi kèm làm đậm đường biên nút, chữ mô tả, cạnh và mũi tên bằng màu chữ đậm theo theme. Màu
135
+ chọn và màu lỗi giữ nghĩa riêng; focus dùng độ dày viền nhấn. Bỏ thuộc tính sẽ trở về công thức
136
+ gốc, và đổi theme khi đang bật sẽ dùng màu chữ của theme mới mà không gắn lại đồ thị. Giữ các
137
+ thao tác điều hướng và trợ năng trong slot mở rộng `#dock` gốc của trình xem, cạnh các control
138
+ có sẵn, thay vì thay cả dock.
139
+
140
+ Thẻ thông thường có thể chủ động bật `NodeLook.sizing: 'content'`. Canvas gốc chỉ giữ cơ chế
141
+ độ rộng: hộp lớn theo nội dung trong khoảng `--wf-node-content-min-width` và
142
+ `--wf-node-content-max-width`. CSS đi kèm của Source sở hữu các vai trò đó (`diagram.card.width`
143
+ và gấp đôi vai trò ấy) cùng toàn bộ công thức trình bày: tiêu đề/loại xuống dòng, phần đầu thẻ
144
+ cao theo nội dung và mọi logo nguồn/đích nằm gọn trong thẻ. Không khai báo nào được định nghĩa
145
+ ở cả hai stylesheet. Giữ mọi logo; không cung cấp hình học đoán trước hay vá phần trong thẻ.
146
+
147
+ `WorkflowEdge.tone` gốc độc lập với `variant`: `blue`, `red` và `green` gắn
148
+ `--wf-edge-tone-<tone>` vào các vai trò viền nền tảng có sẵn `--bh-flow-category-task-border`,
149
+ `--bh-flow-category-dependency-border` và `--bh-flow-category-transformation-border` của theme
150
+ hiện tại (tên nền tảng giữ nguyên), cùng nét liền, nét đứt ngắn và gạch-chấm. Bên dùng tự ánh
151
+ xạ các loại quan hệ của mình sang các tone này. Màu và nét đứt của tone giữ nguyên khi hover,
152
+ chọn, trace, lỗi, có thể xảy ra và ngữ cảnh. Độ chắc chắn, ngữ cảnh và lỗi là dấu hiệu hình
153
+ dạng, không bao giờ là mẫu nét đứt mới, đổi màu tone hay giảm độ mờ, nên mỗi nét đứt của tone
154
+ vẫn là duy nhất (WCAG 1.4.1/1.4.11):
155
+
156
+ - **Có thể xảy ra** (`certainty: 'possible'`, ứng viên tuyến động hoặc nhánh SWITCH): hình thoi
157
+ nhỏ rỗng ở đầu nguồn, theo dấu luồng có điều kiện của BPMN 2.0.
158
+ - **Ngữ cảnh** (`context: true`, ngữ cảnh breadcrumb được giữ lại): mũi tên mở kiểu UML và nét
159
+ nghỉ mảnh hơn `--wf-edge-context-width`, biến riêng của gói gắn vào `border.width.default`
160
+ của nền tảng; khi làm nổi bật vẫn dày lên như thường.
161
+ - **Lỗi có tone** (`variant: 'failure'` có tone): màu và nét đứt của tone, cùng dấu Lucide
162
+ `CircleX` tô bằng `color.icon.danger` (`--wf-edge-failure-icon`) cạnh nhãn cạnh. Dấu này chỉ
163
+ để trang trí (`aria-hidden`); tên jump và chú giải vẫn giữ chữ. Lỗi không có tone giữ màu lỗi
164
+ và nét đứt `5 4`.
165
+
166
+ Có thể xảy ra và ngữ cảnh có thể kết hợp. Truyền tên nhóm đã bản địa hóa qua `familyLabel`:
167
+ chip và danh sách jump có tên `{family} jump to {target}`, đánh số `(n of m)` khi các jump song
168
+ song trùng tên. Bản địa hóa toàn bộ tên, cách đánh số và tiêu đề danh sách qua `texts.jumps`
169
+ (`WorkflowJumpTexts`) của trình xem, giữ từ chỉ nhóm ở đầu; tên nhóm đã dịch nằm trong câu mặc
170
+ định tiếng Anh chưa phải là tên đã bản địa hóa. Nguồn: `packages/vueflow-tokens/src/styles.css`
171
+ và cạnh gốc của `workflow-canvas`. Các binding này không chứng minh hình ảnh: kiểm tra thủ công
172
+ cả hai theme, dấu có thể xảy ra/ngữ cảnh/lỗi, tên jump với trình đọc màn hình và ảnh PNG xuất ra.
173
+
174
+ **Khung nhóm.** Một nhóm gốc (`WorkflowNode.group`, node dựng sẵn `wf-group`) là thẻ của node
175
+ làm phần đầu, kèm nút tròn mở rộng/thu gọn; khi mở rộng, các node con nằm trong khung bên dưới
176
+ phần đầu. Companion gắn khung vào các biến riêng của gói `--wf-group-*`, mỗi biến trỏ tới một
177
+ vai trò nền tảng có sẵn: viền `color.border`, độ dày viền `border.width.default`, bo góc
178
+ `radius.card`, nền `color.surface.subtle` và, với khung lồng trong khung,
179
+ `color.background.neutral` để các cấp tách bạch; khoảng đệm `space.stack` và khoảng cách dưới
180
+ phần đầu `space.150`. Không có token nền tảng riêng cho đồ thị nào đứng sau chúng. Bố cục gốc đọc
181
+ `--wf-group-padding` và `--wf-group-header-gap` từ canvas, nên giữ cả hai là độ dài thuần. Chế
182
+ độ tương phản cao vẽ viền khung bằng màu chữ. Khung là vùng chứa, không phải tone hay trạng
183
+ thái chạy: không tô khung theo tone hay trạng thái.
184
+
185
+ **Khung chọn.** Giữ Shift và kéo trên vùng trống của canvas gốc sẽ vẽ một khung chọn các thẻ nó
186
+ chạm tới (khung nhóm đang mở chỉ khi nằm trọn bên trong). Companion gắn khung chọn vào cùng công
187
+ thức chọn với `.bh-vue-flow .vue-flow__selection`: khung trong suốt (không tô nền, để vẫn thấy các
188
+ node đã quét qua) với viền nét đứt `border.width.selected` màu `color.border.focus`, ở cả theme sáng và tối. Lựa chọn vẫn dùng
189
+ vòng chọn của node; khung chọn không bao giờ là dấu hiệu loại hay trạng thái chạy.
190
+
191
+ **Ô tìm kiếm.** Ô tìm kiếm của viewer gốc (`/` hoặc nút Tìm trên dock) là một lớp phủ gồm ô nhập
192
+ tìm kiếm và các dòng kết quả. Companion gắn `--wf-find-*` và các vai trò dùng chung `--wf-list-*`:
193
+ `color.surface.overlay`, `elevation.shadow.overlay` và `radius.overlay`, không có viền (lớp phủ
194
+ tách khỏi trang bằng nền và bóng) và một đường phân cách `color.border` dưới ô nhập. Ô nhập và
195
+ trạng thái trống dùng `font.body.default`, chữ gợi ý `color.text.subtlest`, trạng thái trống
196
+ `color.text.subtle`. Mỗi dòng dùng `font.label.default` cho tên node, khoảng đệm `space.075` /
197
+ `space.item.x`, cao tối thiểu `size.control.default` (`size.target.touch` với con trỏ thô và
198
+ dưới 768 px) và bo góc `radius.item`; nhãn loại sau tên là `font.body.small` màu
199
+ `color.text.subtle`, node không có tên hiện mã định danh bằng `font.code.default`. Tên xuống dòng
200
+ ở ranh giới từ và không bao giờ bị cắt bớt; chỉ một từ rộng hơn cả dòng mới bị ngắt. Các dòng
201
+ dùng trạng thái mục trong lớp phủ, mỗi trạng thái cách nhau một bậc: dòng dưới con trỏ
202
+ `color.surface.overlay.hover`; dòng đang chọn bằng bàn phím `color.surface.overlay.selected`
203
+ kèm thanh đầu dòng `border.width.selected` màu `color.border.selected` làm dấu hiệu không dựa vào
204
+ màu; dòng đó khi rê chuột `color.surface.overlay.selected.hover`. Chữ giữ nguyên màu ở mọi trạng
205
+ thái; mọi cặp màu đều nằm trong danh sách kiểm tra tương phản. Tiêu điểm là vòng tiêu điểm của ô
206
+ nhập bao quanh cả ô (`border.width.focused`, `color.border.focus`, `state.focus.offset`). Khi
207
+ một dòng nằm dưới con trỏ hoặc được chọn bằng ↓ / ↑, canvas xem trước node của dòng đó bằng trạng
208
+ thái hover sẵn có và vòng ngoài của node (`diagram.selection-ring`); việc xem trước kết thúc khi
209
+ con trỏ rời danh sách, từ khóa thay đổi hoặc ô đóng lại, và không bao giờ đổi lựa chọn, đường
210
+ truy vết hay khung nhìn (node nằm ngoài màn hình không được kéo vào). Không tạo kiểu lại ô này
211
+ cho từng viewer.
212
+
213
+ Tiêu đề và nhãn loại trong hình thoi và hình elip chỉ xuống dòng ở ranh giới từ và không bao giờ
214
+ bị cắt bớt: khoảng đệm hai bên của chúng theo chiều rộng, nên ngắt giữa từ sẽ đọc thành hai từ và
215
+ dấu lược sẽ che mất tên của chính nút đó. Chỉ một từ rộng hơn cả vùng nội dung mới bị ngắt. Thẻ
216
+ thông thường vẫn có thể ngắt một tiêu đề dài liền mạch ở bất kỳ đâu.
217
+
218
+ ## Cạnh, control và xuất ảnh
219
+
220
+ `styleTargetEdge(edge, nodes, toneOf?)` giữ danh tính đích của cạnh có hướng trên cả nét và
221
+ mũi tên theo tone của nút đích (`toneOf(node)`, `blue` khi bỏ qua hoặc khi không có nút đích),
222
+ giữ dữ liệu khác của cạnh và tắt chuyển động chạy dọc trang trí. Ứng dụng có thể giữ nét đứt để
223
+ truyền đạt ngữ nghĩa quan hệ của riêng mình. Trình vẽ cạnh tùy chỉnh phải dùng nét được cung
224
+ cấp thay vì thay bằng bảng màu cạnh không liên quan. `FLOW_EDGE` gom độ dày, kích thước mũi
225
+ tên, bán kính đường và kích thước handle.
226
+
227
+ Đường cạnh tùy chỉnh dùng `getFlowEdgeStyles(tone, suppliedStyle?)` cho toàn bộ công thức
228
+ trình bày SVG. Nó ưu tiên nét đích có hướng được cung cấp hơn màu dự phòng của tone, giữ nét
229
+ đứt tĩnh được cung cấp, dùng `FLOW_EDGE.width`, không tô và nét không co giãn; bên dùng quyết
230
+ định nét đứt mang nghĩa gì.
231
+ Tọa độ đường, hình mũi tên và chiều quan hệ vẫn là hình học đồ thị.
232
+ Style cạnh và style container nút dùng kiểu `Styles` công khai của VueFlow, kể cả biến
233
+ theme tùy chỉnh. Hàm đơn giản hóa chi tiết nhận và trả về đúng quy ước gốc đó; ứng dụng
234
+ không cần ép kiểu hay chép object style để gán.
235
+ `styleTargetEdge` giữ loại mũi tên mở/đóng chỉ định rõ. `createVueFlowTheme({ nodeTone })`
236
+ tô nút MiniMap theo cùng cách (`blue` theo mặc định).
237
+
238
+ CSS đi kèm nhắm tới nút core/mặc định, handle, nhãn cạnh, vùng chọn, nút Controls và bề mặt
239
+ MiniMap thật của VueFlow. Controls giữ trạng thái thường, hover, vô hiệu và focus, và lớn lên
240
+ thành vùng chạm gốc với con trỏ thô. Import sau CSS upstream; bỏ các quy tắc tô core/
241
+ controls/minimap toàn cục cạnh tranh của bên dùng thay vì tăng độ ưu tiên selector.
242
+
243
+ Xuất ảnh với theme và font hiện tại từ bề mặt đồ thị đã đo. Không ép nền trắng hay bảng
244
+ màu font hệ thống độc lập. Giữ nguyên snapshot/fit/khôi phục, lọc overlay, phản hồi độ phân
245
+ giải và xử lý dự phòng khi chụp. Kiểm tra ảnh xuất thật, không chỉ việc gọi chụp thành công.
246
+
247
+ Toàn màn hình đồ thị dùng stacking context cục bộ cô lập ở `z-index.modal` (400), như các
248
+ bề mặt toàn màn hình khác, để inspector toàn cục mở từ đó vẫn nằm trên nó. Thứ tự khung con
249
+ riêng như z10/z15 nằm trong context đó; không gán 1001/1002 toàn cục cho control đồ thị.
250
+ Kiểm tra thứ tự inspector/hộp thọai thật, Escape và việc trả focus.
251
+
252
+ `getFlowDetailStyles(level, suppliedStyle)` bỏ bóng ở mức chi tiết tối thiểu; mức basic và
253
+ detailed trả lại style được cung cấp không đổi. Nó không bao giờ giảm độ mờ: trạng thái
254
+ nút, tương phản chữ, focus và ngữ nghĩa tone phải đọc được ở mọi mức zoom. Ngưỡng
255
+ viewport, metadata, vị trí đã đo và lịch xử lý vẫn là logic của bên dùng; không được bỏ
256
+ nút, quan hệ hay trường dữ liệu nào.
257
+
258
+ ## Kiểm tra
259
+
260
+ Thử sáng và tối, tiếng Anh và tiếng Việt, nút vừa chọn vừa focus và nút lỗi, nhãn dài, kích
261
+ thước do bên dùng sở hữu, mũi tên màu theo đích, zoom/snap/fit, nhóm mở rộng, vòng lặp, phần tử
262
+ chứa hẹp và toàn màn hình, thoát bằng ESC, Controls, MiniMap và xuất ảnh. Tính tương phản
263
+ cho cặp foreground/background thật và các viền có ý nghĩa trong mỗi theme đã render; chỉ
264
+ riêng token gốc và cấu hình có kiểu không chứng minh được trợ năng hay hình ảnh.
@@ -3,7 +3,7 @@ import { glob } from 'astro/loaders';
3
3
  import { z } from 'astro/zod';
4
4
 
5
5
  export const releasePhases = ['early-access', 'beta', 'ga', 'deprecated'] as const;
6
- export const componentTabs = ['examples', 'code', 'usage', 'accessibility', 'changelog'] as const;
6
+ export const componentTabs = ['examples', 'code', 'usage', 'style', 'accessibility', 'changelog'] as const;
7
7
 
8
8
  // Get started, Foundations, Tools and Release phases. The file path is the URL:
9
9
  // src/content/foundations/styles/color.mdx -> /foundations/styles/color/
@@ -45,6 +45,8 @@ const components = defineCollection({
45
45
  description: z.string(),
46
46
  status: z.enum(releasePhases).optional(),
47
47
  group: z.string(),
48
+ // Vietnamese title and description; the group name is translated in i18n.ts.
49
+ vi: z.object({ title: z.string(), description: z.string() }).optional(),
48
50
  }),
49
51
  });
50
52
 
@@ -56,6 +58,15 @@ const componentPages = defineCollection({
56
58
  }),
57
59
  });
58
60
 
61
+ // Vietnamese texts of component tabs, at the same paths under src/content-vi/components/.
62
+ // A tab without one is shown in English under /vi/ with a notice.
63
+ const componentPagesVi = defineCollection({
64
+ loader: glob({ base: './src/content-vi/components', pattern: '*/*.{md,mdx}' }),
65
+ schema: z.object({
66
+ description: z.string().optional(),
67
+ }),
68
+ });
69
+
59
70
  const news = defineCollection({
60
71
  loader: glob({ base: './src/content/news', pattern: '*.{md,mdx}' }),
61
72
  schema: z.object({
@@ -65,4 +76,4 @@ const news = defineCollection({
65
76
  }),
66
77
  });
67
78
 
68
- export const collections = { docs, docsVi, components, componentPages, news };
79
+ export const collections = { docs, docsVi, components, componentPages, componentPagesVi, news };
@@ -0,0 +1,8 @@
1
+ import type { Lang } from './i18n';
2
+
3
+ // Dates on this site are written in full, the same way everywhere:
4
+ // "20 tháng 10 năm 2026" in Vietnamese and "20 October 2026" in English.
5
+ export function formatDate(date: Date, lang: Lang) {
6
+ if (lang === 'vi') return `${date.getUTCDate()} tháng ${date.getUTCMonth() + 1} năm ${date.getUTCFullYear()}`;
7
+ return new Intl.DateTimeFormat('en-GB', { day: 'numeric', month: 'long', year: 'numeric', timeZone: 'UTC' }).format(date);
8
+ }
@@ -118,6 +118,7 @@ const names: Record<string, string> = {
118
118
  Overview: 'Tổng quan',
119
119
  'All components': 'Tất cả component',
120
120
  Actions: 'Hành động',
121
+ Forms: 'Biểu mẫu',
121
122
  // Page names for the sidebar, breadcrumb and pager, used while a page has no Vietnamese text.
122
123
  Design: 'Thiết kế',
123
124
  Develop: 'Phát triển',
@@ -19,12 +19,12 @@ export const iconActions = [
19
19
  { meaning: 'Sync, refresh, retry', meaningVi: 'Đồng bộ, làm mới, thử lại', icon: 'refresh-cw', note: 'Spins while a sync runs.', noteVi: 'Xoay khi đang đồng bộ.' },
20
20
  { meaning: 'Add, create', meaningVi: 'Thêm, tạo', icon: 'plus' },
21
21
  { meaning: 'Edit', meaningVi: 'Sửa', icon: 'pencil' },
22
- { meaning: 'Delete, remove', meaningVi: 'Xoá, gỡ', icon: 'trash', note: 'Destructive: always with a label or a confirmation.', noteVi: 'Mang tính phá huỷ: luôn có nhãn hoặc bước xác nhận.' },
22
+ { meaning: 'Delete, remove', meaningVi: 'Xóa, gỡ', icon: 'trash', note: 'Destructive: always with a label or a confirmation.', noteVi: 'Mang tính phá hủy: luôn có nhãn hoặc bước xác nhận.' },
23
23
  { meaning: 'Copy', meaningVi: 'Sao chép', icon: 'copy' },
24
24
  { meaning: 'Search', meaningVi: 'Tìm kiếm', icon: 'search' },
25
25
  { meaning: 'Settings', meaningVi: 'Cài đặt', icon: 'settings' },
26
26
  { meaning: 'Filter', meaningVi: 'Lọc', icon: 'funnel' },
27
- { meaning: 'Close, dismiss, clear', meaningVi: 'Đóng, bỏ qua, xoá nội dung', icon: 'x' },
27
+ { meaning: 'Close, dismiss, clear', meaningVi: 'Đóng, bỏ qua, xóa nội dung', icon: 'x' },
28
28
  { meaning: 'More actions', meaningVi: 'Thao tác khác', icon: 'ellipsis', note: 'Vertical (ellipsis-vertical) only at the end of a table row.', noteVi: 'Dạng dọc (ellipsis-vertical) chỉ dùng ở cuối dòng bảng.' },
29
29
  { meaning: 'Opens another site', meaningVi: 'Mở trang khác', icon: 'external-link' },
30
30
  { meaning: 'Download, export', meaningVi: 'Tải xuống, xuất', icon: 'download' },
@@ -0,0 +1,14 @@
1
+ // Lucide icons (lucide-static, the version in src/lib/icons.ts) as one-line SVG markup for HTML code examples.
2
+ // The markup is Lucide's own; this only drops the fixed 24 px size (CSS sets it), marks the icon as
3
+ // decorative and lets an example add a class. Use @lucide/astro in .astro components instead.
4
+ export function lucideSvg(source: string, className?: string): string {
5
+ return source
6
+ .trim()
7
+ .replace(/\s*\n\s*/g, ' ')
8
+ .replace(/ xmlns="[^"]*"/, '')
9
+ .replace(/ width="24" height="24"/, '')
10
+ .replace(/ class="[^"]*"/, className ? ` class="${className}"` : '')
11
+ .replace('<svg', '<svg aria-hidden="true"')
12
+ .replace(/ \/?>/g, (m) => m.trim())
13
+ .replace(/> </g, '><');
14
+ }
@@ -4,8 +4,7 @@ import type { ReleasePhase } from './release-phases';
4
4
  import { name, type Lang } from './i18n';
5
5
 
6
6
  // Top-level sections, in sidebar order. Every section except News is a branch of the one
7
- // sidebar tree; the header only switches between the design system and News (as on
8
- // atlassian.design, checked 23/10/2026).
7
+ // sidebar tree; the header only switches between the design system and News.
9
8
  export const sections = [
10
9
  { id: 'get-started', label: 'Get started', href: '/get-started/' },
11
10
  { id: 'foundations', label: 'Foundations', href: '/foundations/' },
@@ -47,6 +46,7 @@ export const tabLabels: Record<(typeof componentTabs)[number], string> = {
47
46
  examples: 'Examples',
48
47
  code: 'Code',
49
48
  usage: 'Usage',
49
+ style: 'Style',
50
50
  accessibility: 'Accessibility',
51
51
  changelog: 'Changelog',
52
52
  };
@@ -55,6 +55,8 @@ export interface NavItem {
55
55
  title: string;
56
56
  href: string;
57
57
  status?: ReleasePhase;
58
+ // One-line summary from the page's description, shown on section index cards.
59
+ description?: string;
58
60
  // Sub-pages, such as the pages under Logos. The first child is the parent page itself.
59
61
  children?: NavItem[];
60
62
  }
@@ -99,7 +101,7 @@ export async function getSidebar(section: SectionId, lang: Lang = 'en'): Promise
99
101
  // Same ids and order as English; title and sidebar label from the Vietnamese text if there is one.
100
102
  const entries = english.map((entry) => {
101
103
  const v = vi.find((e) => e.id === entry.id);
102
- if (v) return { ...entry, data: { ...entry.data, title: v.data.title, sidebarLabel: v.data.sidebarLabel ?? entry.data.sidebarLabel } };
104
+ if (v) return { ...entry, data: { ...entry.data, title: v.data.title, description: v.data.description, sidebarLabel: v.data.sidebarLabel ?? entry.data.sidebarLabel } };
103
105
  // No Vietnamese text yet: the page stays in English, its name in the tree does not.
104
106
  return lang === 'vi' ? { ...entry, data: { ...entry.data, title: name(entry.data.title, lang) } } : entry;
105
107
  });
@@ -120,6 +122,7 @@ export async function getSidebar(section: SectionId, lang: Lang = 'en'): Promise
120
122
  title: entry.data.sidebarLabel ? name(entry.data.sidebarLabel, lang) : isSectionIndex ? name('Overview', lang) : entry.data.title,
121
123
  href: docHref(entry),
122
124
  status: entry.data.status,
125
+ description: entry.data.description,
123
126
  });
124
127
  }
125
128
 
@@ -162,7 +165,7 @@ async function getComponentSidebar(lang: Lang): Promise<NavGroup[]> {
162
165
  const byGroup = new Map<string, NavItem[]>();
163
166
  for (const component of components) {
164
167
  const items = byGroup.get(component.data.group) ?? [];
165
- items.push({ title: component.data.title, href: `/components/${component.id}/`, status: component.data.status });
168
+ items.push({ title: (lang === 'vi' && component.data.vi?.title) || component.data.title, href: `/components/${component.id}/`, status: component.data.status });
166
169
  byGroup.set(component.data.group, items);
167
170
  }
168
171
  return [