@beehexa/design-rules 0.0.0-stage → 2611.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/README.md +56 -2
  2. package/dist/AGENTS.md +24 -0
  3. package/dist/catalog.json +1814 -0
  4. package/dist/docs/public/_redirects +7 -0
  5. package/dist/docs/public/apple-touch-icon.png +0 -0
  6. package/dist/docs/public/brand/logos/app/apple-touch-icon.png +0 -0
  7. package/dist/docs/public/brand/logos/app/avatar-800.png +0 -0
  8. package/dist/docs/public/brand/logos/app/icon-192.png +0 -0
  9. package/dist/docs/public/brand/logos/app/icon-512.png +0 -0
  10. package/dist/docs/public/brand/logos/app/icon-maskable-512.png +0 -0
  11. package/dist/docs/public/brand/logos/archive/d-550/beehexa-horizontal-1-light.svg +1 -0
  12. package/dist/docs/public/brand/logos/archive/d-550/beehexa-horizontal-2-dark.svg +1 -0
  13. package/dist/docs/public/brand/logos/archive/d-550/beehexa-horizontal-3-white.svg +1 -0
  14. package/dist/docs/public/brand/logos/archive/d-550/beehexa-horizontal-4-graphite.svg +1 -0
  15. package/dist/docs/public/brand/logos/archive/d-550/hexasync-horizontal-1-light.svg +1 -0
  16. package/dist/docs/public/brand/logos/archive/d-550/hexasync-horizontal-2-dark.svg +1 -0
  17. package/dist/docs/public/brand/logos/archive/d-550/hexasync-horizontal-3-white.svg +1 -0
  18. package/dist/docs/public/brand/logos/archive/d-550/hexasync-horizontal-4-graphite.svg +1 -0
  19. package/dist/docs/public/brand/logos/archive/d-550/ui/beehexa-d-550-dark.svg +1 -0
  20. package/dist/docs/public/brand/logos/archive/d-550/ui/beehexa-d-550-light.svg +1 -0
  21. package/dist/docs/public/brand/logos/archive/d-550/ui/beehexa-design-d-550-dark.svg +1 -0
  22. package/dist/docs/public/brand/logos/archive/d-550/ui/beehexa-design-d-550-light.svg +1 -0
  23. package/dist/docs/public/brand/logos/archive/d-550/ui/hexasync-d-550-dark.svg +1 -0
  24. package/dist/docs/public/brand/logos/archive/d-550/ui/hexasync-d-550-light.svg +1 -0
  25. package/dist/docs/public/brand/logos/archive/d-550/ui/png/beehexa-design-d-550-dark@3x.png +0 -0
  26. package/dist/docs/public/brand/logos/archive/d-550/ui/png/beehexa-design-d-550-light@3x.png +0 -0
  27. package/dist/docs/public/brand/logos/beehexa-logo.zip +0 -0
  28. package/dist/docs/public/brand/logos/fig/anatomy-en.png +0 -0
  29. package/dist/docs/public/brand/logos/fig/anatomy-vi.png +0 -0
  30. package/dist/docs/public/brand/logos/fig/beehexa-dark-12.png +0 -0
  31. package/dist/docs/public/brand/logos/fig/beehexa-dark-14.png +0 -0
  32. package/dist/docs/public/brand/logos/fig/beehexa-dark-28.png +0 -0
  33. package/dist/docs/public/brand/logos/fig/beehexa-dark-32.png +0 -0
  34. package/dist/docs/public/brand/logos/fig/beehexa-dark-56.png +0 -0
  35. package/dist/docs/public/brand/logos/fig/beehexa-graphite-28.png +0 -0
  36. package/dist/docs/public/brand/logos/fig/beehexa-graphite-32.png +0 -0
  37. package/dist/docs/public/brand/logos/fig/beehexa-light-14.png +0 -0
  38. package/dist/docs/public/brand/logos/fig/beehexa-light-21.png +0 -0
  39. package/dist/docs/public/brand/logos/fig/beehexa-light-22.png +0 -0
  40. package/dist/docs/public/brand/logos/fig/beehexa-light-24.png +0 -0
  41. package/dist/docs/public/brand/logos/fig/beehexa-light-28.png +0 -0
  42. package/dist/docs/public/brand/logos/fig/beehexa-light-32.png +0 -0
  43. package/dist/docs/public/brand/logos/fig/beehexa-light-36-7c3aed7c3aed.png +0 -0
  44. package/dist/docs/public/brand/logos/fig/beehexa-light-36-swap.png +0 -0
  45. package/dist/docs/public/brand/logos/fig/beehexa-light-36.png +0 -0
  46. package/dist/docs/public/brand/logos/fig/beehexa-light-56.png +0 -0
  47. package/dist/docs/public/brand/logos/fig/beehexa-white-20.png +0 -0
  48. package/dist/docs/public/brand/logos/fig/beehexa-white-32.png +0 -0
  49. package/dist/docs/public/brand/logos/fig/clearspace.png +0 -0
  50. package/dist/docs/public/brand/logos/fig/construction-en.png +0 -0
  51. package/dist/docs/public/brand/logos/fig/construction-vi.png +0 -0
  52. package/dist/docs/public/brand/logos/fig/container-en.png +0 -0
  53. package/dist/docs/public/brand/logos/fig/container-vi.png +0 -0
  54. package/dist/docs/public/brand/logos/fig/hexasync-dark-20.png +0 -0
  55. package/dist/docs/public/brand/logos/fig/hexasync-dark-28.png +0 -0
  56. package/dist/docs/public/brand/logos/fig/hexasync-dark-48.png +0 -0
  57. package/dist/docs/public/brand/logos/fig/hexasync-light-19.png +0 -0
  58. package/dist/docs/public/brand/logos/fig/hexasync-light-28.png +0 -0
  59. package/dist/docs/public/brand/logos/fig/hexasync-light-48.png +0 -0
  60. package/dist/docs/public/brand/logos/fig/icon-graphite-14.png +0 -0
  61. package/dist/docs/public/brand/logos/fig/icon-graphite-16.png +0 -0
  62. package/dist/docs/public/brand/logos/fig/icon-light-16.png +0 -0
  63. package/dist/docs/public/brand/logos/fig/icon-light-24.png +0 -0
  64. package/dist/docs/public/brand/logos/fig/icon-light-48.png +0 -0
  65. package/dist/docs/public/brand/logos/fig/icon-light-92.png +0 -0
  66. package/dist/docs/public/brand/logos/fig/meaning-bee-en.png +0 -0
  67. package/dist/docs/public/brand/logos/fig/meaning-bee-vi.png +0 -0
  68. package/dist/docs/public/brand/logos/fig/meaning-outline-en.png +0 -0
  69. package/dist/docs/public/brand/logos/fig/meaning-outline-vi.png +0 -0
  70. package/dist/docs/public/brand/logos/fig/meaning-stack-en.png +0 -0
  71. package/dist/docs/public/brand/logos/fig/meaning-stack-vi.png +0 -0
  72. package/dist/docs/public/brand/logos/fig/misuse-serif.png +0 -0
  73. package/dist/docs/public/brand/logos/icon/beehexa-icon-graphite.svg +1 -0
  74. package/dist/docs/public/brand/logos/icon/beehexa-icon-white.svg +1 -0
  75. package/dist/docs/public/brand/logos/icon/beehexa-icon-yellow.svg +1 -0
  76. package/dist/docs/public/brand/logos/lockups/beehexa-horizontal-1-light.svg +1 -0
  77. package/dist/docs/public/brand/logos/lockups/beehexa-horizontal-2-dark.svg +1 -0
  78. package/dist/docs/public/brand/logos/lockups/beehexa-horizontal-3-white.svg +1 -0
  79. package/dist/docs/public/brand/logos/lockups/beehexa-horizontal-4-graphite.svg +1 -0
  80. package/dist/docs/public/brand/logos/lockups/hexasync-horizontal-1-light.svg +1 -0
  81. package/dist/docs/public/brand/logos/lockups/hexasync-horizontal-2-dark.svg +1 -0
  82. package/dist/docs/public/brand/logos/lockups/hexasync-horizontal-3-white.svg +1 -0
  83. package/dist/docs/public/brand/logos/lockups/hexasync-horizontal-4-graphite.svg +1 -0
  84. package/dist/docs/public/brand/logos/ui/beehexa-dark.svg +1 -0
  85. package/dist/docs/public/brand/logos/ui/beehexa-design-dark.svg +1 -0
  86. package/dist/docs/public/brand/logos/ui/beehexa-design-light.svg +1 -0
  87. package/dist/docs/public/brand/logos/ui/beehexa-icon-yellow.svg +1 -0
  88. package/dist/docs/public/brand/logos/ui/beehexa-light.svg +1 -0
  89. package/dist/docs/public/brand/logos/ui/hexasync-dark.svg +1 -0
  90. package/dist/docs/public/brand/logos/ui/hexasync-light.svg +1 -0
  91. package/dist/docs/public/brand/logos/ui/png/beehexa-design-dark@3x.png +0 -0
  92. package/dist/docs/public/brand/logos/ui/png/beehexa-design-light@3x.png +0 -0
  93. package/dist/docs/public/favicon.ico +0 -0
  94. package/dist/docs/public/favicon.svg +1 -0
  95. package/dist/docs/public/fonts/LICENSE-Inter.txt +93 -0
  96. package/dist/docs/public/fonts/LICENSE-JetBrainsMono.txt +93 -0
  97. package/dist/docs/public/fonts/inter-latin-ext-opsz-wght-italic.woff2 +0 -0
  98. package/dist/docs/public/fonts/inter-latin-ext-opsz-wght-normal.woff2 +0 -0
  99. package/dist/docs/public/fonts/inter-latin-opsz-wght-italic.woff2 +0 -0
  100. package/dist/docs/public/fonts/inter-latin-opsz-wght-normal.woff2 +0 -0
  101. package/dist/docs/public/fonts/inter-vietnamese-opsz-wght-italic.woff2 +0 -0
  102. package/dist/docs/public/fonts/inter-vietnamese-opsz-wght-normal.woff2 +0 -0
  103. package/dist/docs/public/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  104. package/dist/docs/public/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  105. package/dist/docs/public/fonts/jetbrains-mono-vietnamese-wght-normal.woff2 +0 -0
  106. package/dist/docs/public/icon-192.png +0 -0
  107. package/dist/docs/public/icon-512.png +0 -0
  108. package/dist/docs/public/icon-maskable-512.png +0 -0
  109. package/dist/docs/public/robots.txt +4 -0
  110. package/dist/docs/public/site.webmanifest +21 -0
  111. package/dist/docs/scripts/color-pairs.mjs +46 -0
  112. package/dist/docs/scripts/contrast-exceptions.mjs +6 -0
  113. package/dist/docs/scripts/token-utils.d.mts +26 -0
  114. package/dist/docs/scripts/token-utils.mjs +114 -0
  115. package/dist/docs/src/brand/Beehexa-brandguide-full-mar12.pdf +0 -0
  116. package/dist/docs/src/brand/color+typoDirections.pdf +0 -0
  117. package/dist/docs/src/brand/structure-proposal.md +227 -0
  118. package/dist/docs/src/components/ChildPages.astro +25 -0
  119. package/dist/docs/src/components/CodeExample.astro +18 -0
  120. package/dist/docs/src/components/ColorDemo.astro +794 -0
  121. package/dist/docs/src/components/ColorExample.astro +32 -0
  122. package/dist/docs/src/components/ColorSwatch.astro +20 -0
  123. package/dist/docs/src/components/ComponentTabs.astro +21 -0
  124. package/dist/docs/src/components/DocsFooter.astro +25 -0
  125. package/dist/docs/src/components/HelpOptions.astro +20 -0
  126. package/dist/docs/src/components/IconBrowser.astro +257 -0
  127. package/dist/docs/src/components/IconDemo.astro +185 -0
  128. package/dist/docs/src/components/InDevelopment.astro +29 -0
  129. package/dist/docs/src/components/LayoutDemo.astro +384 -0
  130. package/dist/docs/src/components/Logo.astro +25 -0
  131. package/dist/docs/src/components/PhaseTable.astro +22 -0
  132. package/dist/docs/src/components/RoleGuides.astro +48 -0
  133. package/dist/docs/src/components/ShapeDemo.astro +239 -0
  134. package/dist/docs/src/components/ShapePin.astro +22 -0
  135. package/dist/docs/src/components/Sidebar.astro +206 -0
  136. package/dist/docs/src/components/SiteHeader.astro +211 -0
  137. package/dist/docs/src/components/SpacingDemo.astro +172 -0
  138. package/dist/docs/src/components/StatusBadge.astro +22 -0
  139. package/dist/docs/src/components/SystemAreas.astro +29 -0
  140. package/dist/docs/src/components/TableOfContents.astro +47 -0
  141. package/dist/docs/src/components/TokenTable.astro +40 -0
  142. package/dist/docs/src/components/TypeDemo.astro +249 -0
  143. package/dist/docs/src/components/logos/Fig.astro +28 -0
  144. package/dist/docs/src/components/logos/LogoAnatomy.astro +101 -0
  145. package/dist/docs/src/components/logos/LogoClearSpace.astro +81 -0
  146. package/dist/docs/src/components/logos/LogoColourVersions.astro +45 -0
  147. package/dist/docs/src/components/logos/LogoConstruction.astro +84 -0
  148. package/dist/docs/src/components/logos/LogoContainer.astro +84 -0
  149. package/dist/docs/src/components/logos/LogoHero.astro +42 -0
  150. package/dist/docs/src/components/logos/LogoInUse.astro +197 -0
  151. package/dist/docs/src/components/logos/LogoMeanings.astro +75 -0
  152. package/dist/docs/src/components/logos/LogoMinSize.astro +55 -0
  153. package/dist/docs/src/components/logos/LogoMistakes.astro +109 -0
  154. package/dist/docs/src/components/logos/LogoMisuse.astro +96 -0
  155. package/dist/docs/src/components/logos/LogoPair.astro +26 -0
  156. package/dist/docs/src/components/logos/LogoSvg.astro +68 -0
  157. package/dist/docs/src/content/components/button/accessibility.mdx +18 -0
  158. package/dist/docs/src/content/components/button/changelog.mdx +6 -0
  159. package/dist/docs/src/content/components/button/code.mdx +27 -0
  160. package/dist/docs/src/content/components/button/examples.mdx +21 -0
  161. package/dist/docs/src/content/components/button/meta.json +5 -0
  162. package/dist/docs/src/content/components/button/usage.mdx +18 -0
  163. package/dist/docs/src/content/foundations/guidelines/accessibility.mdx +19 -0
  164. package/dist/docs/src/content/foundations/guidelines/content.mdx +25 -0
  165. package/dist/docs/src/content/foundations/index.mdx +9 -0
  166. package/dist/docs/src/content/foundations/styles/border.mdx +89 -0
  167. package/dist/docs/src/content/foundations/styles/color/accessibility.mdx +32 -0
  168. package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +22 -0
  169. package/dist/docs/src/content/foundations/styles/color/index.mdx +65 -0
  170. package/dist/docs/src/content/foundations/styles/color/palette.mdx +57 -0
  171. package/dist/docs/src/content/foundations/styles/color/tokens.mdx +55 -0
  172. package/dist/docs/src/content/foundations/styles/color/usage.mdx +111 -0
  173. package/dist/docs/src/content/foundations/styles/data-visualization.mdx +11 -0
  174. package/dist/docs/src/content/foundations/styles/elevation.mdx +12 -0
  175. package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +72 -0
  176. package/dist/docs/src/content/foundations/styles/icons/code.mdx +171 -0
  177. package/dist/docs/src/content/foundations/styles/icons/index.mdx +62 -0
  178. package/dist/docs/src/content/foundations/styles/icons/library.mdx +19 -0
  179. package/dist/docs/src/content/foundations/styles/icons/usage.mdx +100 -0
  180. package/dist/docs/src/content/foundations/styles/illustration.mdx +9 -0
  181. package/dist/docs/src/content/foundations/styles/interaction-states.mdx +49 -0
  182. package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +81 -0
  183. package/dist/docs/src/content/foundations/styles/layout/breakpoints.mdx +56 -0
  184. package/dist/docs/src/content/foundations/styles/layout/grid.mdx +87 -0
  185. package/dist/docs/src/content/foundations/styles/layout/index.mdx +24 -0
  186. package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +45 -0
  187. package/dist/docs/src/content/foundations/styles/layout/page-widths.mdx +38 -0
  188. package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +65 -0
  189. package/dist/docs/src/content/foundations/styles/logos/index.mdx +64 -0
  190. package/dist/docs/src/content/foundations/styles/logos/placement-and-containers.mdx +96 -0
  191. package/dist/docs/src/content/foundations/styles/logos/product-logos.mdx +56 -0
  192. package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +70 -0
  193. package/dist/docs/src/content/foundations/styles/motion.mdx +11 -0
  194. package/dist/docs/src/content/foundations/styles/opacity.mdx +9 -0
  195. package/dist/docs/src/content/foundations/styles/radius.mdx +98 -0
  196. package/dist/docs/src/content/foundations/styles/size-and-density.mdx +41 -0
  197. package/dist/docs/src/content/foundations/styles/spacing.mdx +70 -0
  198. package/dist/docs/src/content/foundations/styles/typography/code.mdx +53 -0
  199. package/dist/docs/src/content/foundations/styles/typography/index.mdx +58 -0
  200. package/dist/docs/src/content/foundations/styles/typography/usage.mdx +144 -0
  201. package/dist/docs/src/content/foundations/styles/typography/vietnamese.mdx +46 -0
  202. package/dist/docs/src/content/foundations/styles/z-index.mdx +9 -0
  203. package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +36 -0
  204. package/dist/docs/src/content/foundations/tokens/index.mdx +27 -0
  205. package/dist/docs/src/content/get-started/content.mdx +14 -0
  206. package/dist/docs/src/content/get-started/design.mdx +30 -0
  207. package/dist/docs/src/content/get-started/develop.mdx +59 -0
  208. package/dist/docs/src/content/get-started/get-help.mdx +19 -0
  209. package/dist/docs/src/content/get-started/index.mdx +50 -0
  210. package/dist/docs/src/content/news/2026-10-16-site-structure.md +15 -0
  211. package/dist/docs/src/content/news/2026-10-20-docs-site.md +13 -0
  212. package/dist/docs/src/content/release-phases/index.mdx +12 -0
  213. package/dist/docs/src/content/tools/ai-agents.mdx +49 -0
  214. package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +138 -0
  215. package/dist/docs/src/content/tools/eslint.mdx +15 -0
  216. package/dist/docs/src/content/tools/index.mdx +7 -0
  217. package/dist/docs/src/content/tools/stylelint.mdx +19 -0
  218. package/dist/docs/src/content-vi/foundations/styles/border.mdx +89 -0
  219. package/dist/docs/src/content-vi/foundations/styles/color/accessibility.mdx +32 -0
  220. package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +22 -0
  221. package/dist/docs/src/content-vi/foundations/styles/color/index.mdx +65 -0
  222. package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +57 -0
  223. package/dist/docs/src/content-vi/foundations/styles/color/tokens.mdx +55 -0
  224. package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +111 -0
  225. package/dist/docs/src/content-vi/foundations/styles/data-visualization.mdx +11 -0
  226. package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +72 -0
  227. package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +170 -0
  228. package/dist/docs/src/content-vi/foundations/styles/icons/index.mdx +62 -0
  229. package/dist/docs/src/content-vi/foundations/styles/icons/library.mdx +19 -0
  230. package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +100 -0
  231. package/dist/docs/src/content-vi/foundations/styles/illustration.mdx +9 -0
  232. package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +49 -0
  233. package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +77 -0
  234. package/dist/docs/src/content-vi/foundations/styles/layout/breakpoints.mdx +56 -0
  235. package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +87 -0
  236. package/dist/docs/src/content-vi/foundations/styles/layout/index.mdx +24 -0
  237. package/dist/docs/src/content-vi/foundations/styles/layout/page-widths.mdx +34 -0
  238. package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +65 -0
  239. package/dist/docs/src/content-vi/foundations/styles/logos/index.mdx +64 -0
  240. package/dist/docs/src/content-vi/foundations/styles/logos/placement-and-containers.mdx +96 -0
  241. package/dist/docs/src/content-vi/foundations/styles/logos/product-logos.mdx +56 -0
  242. package/dist/docs/src/content-vi/foundations/styles/logos/using-the-logo.mdx +70 -0
  243. package/dist/docs/src/content-vi/foundations/styles/opacity.mdx +9 -0
  244. package/dist/docs/src/content-vi/foundations/styles/radius.mdx +98 -0
  245. package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +41 -0
  246. package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +70 -0
  247. package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +53 -0
  248. package/dist/docs/src/content-vi/foundations/styles/typography/index.mdx +58 -0
  249. package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +144 -0
  250. package/dist/docs/src/content-vi/foundations/styles/typography/vietnamese.mdx +46 -0
  251. package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +9 -0
  252. package/dist/docs/src/content.config.ts +68 -0
  253. package/dist/docs/src/lib/brand.ts +57 -0
  254. package/dist/docs/src/lib/contrast.ts +34 -0
  255. package/dist/docs/src/lib/i18n.ts +152 -0
  256. package/dist/docs/src/lib/icons.ts +46 -0
  257. package/dist/docs/src/lib/logo-geometry.ts +30 -0
  258. package/dist/docs/src/lib/lucide-categories.json +1 -0
  259. package/dist/docs/src/lib/lucide-data.ts +40 -0
  260. package/dist/docs/src/lib/navigation.ts +222 -0
  261. package/dist/docs/src/lib/release-phases.ts +10 -0
  262. package/dist/docs/src/lib/routes.ts +40 -0
  263. package/dist/docs/src/lib/token-descriptions-vi.ts +40 -0
  264. package/dist/docs/src/lib/tokens.ts +67 -0
  265. package/dist/docs/src/lib/tri-grid.ts +28 -0
  266. package/dist/docs/src/styles/chrome.css +122 -0
  267. package/dist/docs/src/styles/color.css +270 -0
  268. package/dist/docs/src/styles/docs.css +323 -0
  269. package/dist/docs/src/styles/global.css +66 -0
  270. package/dist/docs/src/styles/icons.css +135 -0
  271. package/dist/docs/src/styles/layout.css +165 -0
  272. package/dist/docs/src/styles/logos.css +236 -0
  273. package/dist/docs/src/styles/shapes.css +139 -0
  274. package/dist/docs/src/styles/tokens.css +461 -0
  275. package/dist/docs/src/styles/tokens.js +425 -0
  276. package/dist/docs/src/styles/typography.css +91 -0
  277. package/dist/docs/tokens/border.json +26 -0
  278. package/dist/docs/tokens/breakpoints.json +8 -0
  279. package/dist/docs/tokens/color.json +1350 -0
  280. package/dist/docs/tokens/elevation.json +26 -0
  281. package/dist/docs/tokens/layout.json +29 -0
  282. package/dist/docs/tokens/motion.json +12 -0
  283. package/dist/docs/tokens/radius.json +44 -0
  284. package/dist/docs/tokens/size.json +13 -0
  285. package/dist/docs/tokens/spacing.json +18 -0
  286. package/dist/docs/tokens/states.json +12 -0
  287. package/dist/docs/tokens/typography.json +220 -0
  288. package/dist/index.d.ts +19 -0
  289. package/dist/index.js +1823 -0
  290. package/package.json +31 -4
@@ -0,0 +1,384 @@
1
+ ---
2
+ // Illustrations for the Layout pages. The diagrams are drawn at real pixel sizes (a 1280 px
3
+ // window, a 1920 px window and a 360 px phone) and scale to fit; colours are role tokens set in layout.css.
4
+ import '../styles/layout.css';
5
+ import { tokensByPrefix } from '../lib/tokens';
6
+ import { langOf } from '../lib/i18n';
7
+
8
+ interface Props {
9
+ kind: 'anatomy' | 'grid' | 'widths' | 'controls' | 'breakpoints' | 'navlabels' | 'pageheader';
10
+ }
11
+ const { kind } = Astro.props;
12
+ const vi = langOf(Astro.url.pathname) === 'vi';
13
+ const L = (en: string, viText: string) => (vi ? viText : en);
14
+
15
+ // App frame sizes, in px. Each one is explained on the Layout pages.
16
+ const header = 48;
17
+ const sidebar = 280;
18
+ // At a 1280 px window (lg): 12 columns, gutter 24, page margin 24. On a phone (xs): 4 columns, 16 and 16.
19
+ const pad = { desktop: 24, phone: 16 };
20
+ const gutter = { desktop: 24, phone: 16 };
21
+
22
+ // Desktop content area at 1280 px, inside the page margins.
23
+ const cx = sidebar + pad.desktop; // 304
24
+ const cw = 1280 - sidebar - pad.desktop * 2; // 952
25
+ const colW = (cw - gutter.desktop * 11) / 12;
26
+ const col = (i: number) => cx + i * (colW + gutter.desktop);
27
+ const span = (n: number) => n * colW + (n - 1) * gutter.desktop;
28
+ const cards = [0, 1, 2, 3].map((i) => ({ x: col(i * 3), w: span(3) }));
29
+
30
+ // Phone content area at 360 px: four columns.
31
+ const pw = 360 - pad.phone * 2; // 328
32
+ const pColW = (pw - gutter.phone * 3) / 4;
33
+ const pcol = (i: number) => pad.phone + i * (pColW + gutter.phone);
34
+ const pspan = (n: number) => n * pColW + (n - 1) * gutter.phone;
35
+
36
+ const menu = [0, 1, 2, 3, 4, 5];
37
+
38
+ // Page widths on a 1920 px window with the side navigation open: page margin 32 px (xl).
39
+ // Wide and narrow pages are centred in the area beside the side navigation; the maximum includes the margins.
40
+ const W = 1920;
41
+ const H = 1080;
42
+ const area = { x: sidebar, w: W - sidebar };
43
+ const centre = area.x + area.w / 2;
44
+ const wm = 32;
45
+ // The page header spans the whole content area at every page width; only the content below it is capped.
46
+ const ph = { x: area.x + wm, w: area.w - wm * 2 };
47
+ const hb = 180;
48
+ const widths = [
49
+ { name: 'Full', max: L('No maximum', 'Không giới hạn'), use: L('Tables, lists, logs, builders.', 'Bảng, danh sách, log, trình dựng.'), frame: area.w },
50
+ { name: 'Wide', max: '1280 px', use: L('Dashboards, detail pages, settings overviews.', 'Dashboard, trang chi tiết, trang tổng quan cài đặt.'), frame: 1280 },
51
+ { name: 'Narrow', max: '768 px', use: L('Forms, settings forms, wizard steps.', 'Form, form cài đặt, các bước wizard.'), frame: 768 },
52
+ ].map((w) => {
53
+ // The maximum is the content itself; the page margins sit outside it.
54
+ const full = w.name === 'Full';
55
+ const x = full ? area.x + wm : centre - w.frame / 2;
56
+ const width = full ? area.w - wm * 2 : w.frame;
57
+ return { ...w, fx: x, frame: width, x, w: width };
58
+ });
59
+
60
+ // Breakpoints: the width of each band follows its range; the last one is open-ended.
61
+ const bps = tokensByPrefix('breakpoint').map((t) => ({ name: t.name.split('.')[1], min: parseInt(t.resolved, 10) }));
62
+ const bands = bps.map((b, i) => ({ ...b, size: (bps[i + 1]?.min ?? b.min + 480) - b.min }));
63
+ ---
64
+
65
+ {kind === 'anatomy' && (
66
+ <div class="ly-root">
67
+ <div class="ly-pair">
68
+ <figure>
69
+ <svg class="ly-svg" viewBox="0 0 1280 800" role="img" aria-label={L('App page at 1280 px: a 48 px header across the top, 280 px side navigation on the left, and the content beside it with 24 px page margins, a page title with its main action, a row of four cards and a large table panel.', 'Trang ứng dụng ở 1280 px: header 48 px chạy ngang phía trên, menu bên 280 px bên trái, và nội dung bên cạnh với lề trang 24 px, tiêu đề trang cùng thao tác chính, một hàng bốn card và một panel bảng lớn.')}>
70
+ <rect class="f-page" x="0" y="0" width="1280" height="800" />
71
+ <rect class="f-mark" x={sidebar} y={header} width={pad.desktop} height={800 - header} />
72
+ <rect class="f-mark" x={1280 - pad.desktop} y={header} width={pad.desktop} height={800 - header} />
73
+ <rect class="f-mark" x={sidebar} y={header} width={1280 - sidebar} height={pad.desktop} />
74
+ <rect class="f-mark" x={sidebar} y={800 - pad.desktop} width={1280 - sidebar} height={pad.desktop} />
75
+ <rect class="f-plain" x="0" y="0" width="1280" height={header} />
76
+ <rect class="f-line" x="0" y={header - 2} width="1280" height="2" />
77
+ <rect class="f-indicator" x="20" y="12" width="24" height="24" rx="6" />
78
+ <rect class="f-skel" x="52" y="16" width="88" height="16" rx="4" />
79
+ <rect class="f-field" x="480" y="8" width="400" height="32" rx="8" />
80
+ <circle class="f-skel" cx="1248" cy="24" r="16" />
81
+ <path class="s-dim" d="M924 2v44M918 2h12M918 46h12" />
82
+ <text class="t-dim" x="940" y="32" font-size="22">48</text>
83
+ <rect class="f-subtle" x="0" y={header} width={sidebar} height={800 - header} />
84
+ <rect class="f-line" x={sidebar - 2} y={header} width="2" height={800 - header} />
85
+ {menu.map((i) => (
86
+ <g>
87
+ <rect class={i === 0 ? 'f-selected' : 'f-subtle'} x="8" y={56 + i * 36} width={sidebar - 16} height="32" rx="6" />
88
+ {i === 0 && <rect class="f-indicator" x="8" y={62} width="4" height="20" rx="2" />}
89
+ <rect class="f-skel" x="20" y={64 + i * 36} width="16" height="16" rx="4" />
90
+ <rect class="f-skel" x="40" y={67 + i * 36} width={150 - i * 12} height="10" rx="5" />
91
+ </g>
92
+ ))}
93
+ <path class="s-dim" d={`M8 752h${sidebar - 16}M8 746v12M${sidebar - 8} 746v12`} />
94
+ <text class="t-dim" x={sidebar / 2} y="740" font-size="22" text-anchor="middle">{sidebar}</text>
95
+ <text class="t-dim" x={sidebar + pad.desktop / 2} y="470" font-size="20" text-anchor="middle">24</text>
96
+ <rect class="f-skel" x={cx} y="84" width="280" height="24" rx="6" />
97
+ <rect class="f-primary" x={cx + cw - 120} y="80" width="120" height="32" rx="8" />
98
+ {cards.map((c, i) => (
99
+ <g>
100
+ {i > 0 && <rect class="f-mark" x={c.x - gutter.desktop} y="136" width={gutter.desktop} height="112" />}
101
+ <rect class="f-surface" x={c.x} y="136" width={c.w} height="112" rx="12" />
102
+ <rect class="f-skel" x={c.x + 24} y="160" width="100" height="12" rx="6" />
103
+ <rect class="f-skel" x={c.x + 24} y="188" width="64" height="28" rx="6" />
104
+ </g>
105
+ ))}
106
+ <text class="t-dim" x={cards[1].x - gutter.desktop / 2} y="202" font-size="20" text-anchor="middle">24</text>
107
+ <rect class="f-surface" x={cx} y="272" width={cw} height={800 - pad.desktop - 272} rx="12" />
108
+ <rect class="f-skel" x={cx + 24} y="296" width="200" height="16" rx="8" />
109
+ {[0, 1, 2, 3, 4, 5, 6, 7].map((r) => (
110
+ <g>
111
+ <rect class="f-line" x={cx + 24} y={336 + r * 52} width={cw - 48} height="2" />
112
+ <rect class="f-skel-subtle" x={cx + 24} y={356 + r * 52} width="180" height="12" rx="6" />
113
+ <rect class="f-skel-subtle" x={cx + 320} y={356 + r * 52} width="120" height="12" rx="6" />
114
+ <rect class="f-skel-subtle" x={cx + 560} y={356 + r * 52} width="96" height="12" rx="6" />
115
+ </g>
116
+ ))}
117
+ <circle class="c-call" cx="320" cy="24" r="20" /><text class="t-call" x="320" y="24" font-size="22">1</text>
118
+ <circle class="c-call" cx={sidebar / 2} cy="400" r="20" /><text class="t-call" x={sidebar / 2} y="400" font-size="22">2</text>
119
+ <circle class="c-call" cx={sidebar + pad.desktop / 2} cy="420" r="20" /><text class="t-call" x={sidebar + pad.desktop / 2} y="420" font-size="22">3</text>
120
+ <circle class="c-call" cx={cx + 312} cy="96" r="20" /><text class="t-call" x={cx + 312} y="96" font-size="22">4</text>
121
+ <circle class="c-call" cx={cx + cw - 40} cy="304" r="20" /><text class="t-call" x={cx + cw - 40} y="304" font-size="22">5</text>
122
+ </svg>
123
+ <figcaption>{vi ? <Fragment><b>Cửa sổ rộng 1280 px.</b> Menu bên 280 px; nội dung 952 px giữa hai lề trang 24 px. Vùng tô màu là lề và gutter.</Fragment> : <Fragment><b>Window 1280 px wide.</b> Side navigation 280 px; content 952 px between 24 px page margins. Tinted areas are margins and gutters.</Fragment>}</figcaption>
124
+ </figure>
125
+ <figure class="ly-phone">
126
+ <svg class="ly-svg" viewBox="0 0 360 720" role="img" aria-label={L('Phone page at 360 px: a 48 px header with a menu button that opens the side navigation as a drawer, 16 px page margins, a page title, a 40 px main action across the width, and cards stacked in one or two columns.', 'Trang trên điện thoại ở 360 px: header 48 px với nút menu mở menu bên thành drawer, lề trang 16 px, tiêu đề trang, thao tác chính cao 40 px trải ngang, và các card xếp một hoặc hai cột.')}>
127
+ <rect class="f-page" x="0" y="0" width="360" height="720" />
128
+ <rect class="f-mark" x="0" y={header} width={pad.phone} height={720 - header} />
129
+ <rect class="f-mark" x={360 - pad.phone} y={header} width={pad.phone} height={720 - header} />
130
+ <rect class="f-mark" x="0" y={header} width="360" height={pad.phone} />
131
+ <rect class="f-mark" x="0" y={720 - pad.phone} width="360" height={pad.phone} />
132
+ <rect class="f-plain" x="0" y="0" width="360" height={header} />
133
+ <rect class="f-line" x="0" y={header - 2} width="360" height="2" />
134
+ <path class="s-icon" d="M18 16h20M18 24h20M18 32h20" />
135
+ <rect class="f-indicator" x="56" y="12" width="24" height="24" rx="6" />
136
+ <rect class="f-skel" x="88" y="16" width="72" height="16" rx="4" />
137
+ <circle class="f-skel" cx="328" cy="24" r="16" />
138
+ <rect class="f-skel" x={pad.phone} y="68" width="180" height="24" rx="6" />
139
+ <rect class="f-primary" x={pad.phone} y="108" width={pw} height="40" rx="8" />
140
+ <rect class="f-surface" x={pad.phone} y="164" width={pw} height="96" rx="12" />
141
+ <rect class="f-skel" x={pad.phone + 16} y="184" width="100" height="12" rx="6" />
142
+ <rect class="f-skel" x={pad.phone + 16} y="208" width="64" height="28" rx="6" />
143
+ <rect class="f-mark" x={pcol(2) - gutter.phone} y="276" width={gutter.phone} height="96" />
144
+ <rect class="f-surface" x={pcol(0)} y="276" width={pspan(2)} height="96" rx="12" />
145
+ <rect class="f-surface" x={pcol(2)} y="276" width={pspan(2)} height="96" rx="12" />
146
+ <rect class="f-skel" x={pcol(0) + 16} y="296" width="80" height="12" rx="6" />
147
+ <rect class="f-skel" x={pcol(2) + 16} y="296" width="80" height="12" rx="6" />
148
+ <rect class="f-surface" x={pad.phone} y="388" width={pw} height="316" rx="12" />
149
+ <rect class="f-skel" x={pad.phone + 16} y="404" width="120" height="14" rx="7" />
150
+ {[0, 1, 2, 3, 4].map((r) => (
151
+ <g>
152
+ <rect class="f-line" x={pad.phone + 16} y={436 + r * 52} width={pw - 32} height="2" />
153
+ <rect class="f-skel-subtle" x={pad.phone + 16} y={456 + r * 52} width="150" height="12" rx="6" />
154
+ </g>
155
+ ))}
156
+ </svg>
157
+ <figcaption>{vi ? <Fragment><b>Cửa sổ rộng 360 px.</b> Menu bên mở thành drawer từ nút menu.</Fragment> : <Fragment><b>Window 360 px wide.</b> The side navigation opens as a drawer from the menu button.</Fragment>}</figcaption>
158
+ </figure>
159
+ </div>
160
+ <ol class="ly-legend">
161
+ <li><span>{vi ? <Fragment><b>Header.</b> Cao 48 px, trải hết chiều ngang: logo, tìm kiếm, tài khoản.</Fragment> : <Fragment><b>Header.</b> 48 px high, across the full width: logo, search, account.</Fragment>}</span></li>
162
+ <li><span>{vi ? <Fragment><b>Menu bên.</b> 280 px khi mở, 64 px khi là rail. Thành drawer dưới 1024 px.</Fragment> : <Fragment><b>Side navigation.</b> 280 px open, 64 px as a rail. A drawer below 1024 px.</Fragment>}</span></li>
163
+ <li><span>{vi ? <Fragment><b>Lề trang.</b> 16, 24 hoặc 32 px, theo độ rộng cửa sổ.</Fragment> : <Fragment><b>Page margin.</b> 16, 24 or 32 px, by window width.</Fragment>}</span></li>
164
+ <li><span>{vi ? <Fragment><b>Page header.</b> Breadcrumb, tiêu đề và nút hành động của trang, cách nội dung 24 px.</Fragment> : <Fragment><b>Page header.</b> Breadcrumb, title and page actions, 24 px above the content.</Fragment>}</span></li>
165
+ <li><span>{vi ? <Fragment><b>Nội dung.</b> Trên lưới, Full, Wide hoặc Narrow. Các card cách nhau 24 px.</Fragment> : <Fragment><b>Content.</b> On the grid, full, wide or narrow. Cards 24 px apart.</Fragment>}</span></li>
166
+ </ol>
167
+ </div>
168
+ )}
169
+
170
+ {kind === 'grid' && (
171
+ <div class="ly-root">
172
+ <div class="ly-pair">
173
+ <figure>
174
+ <svg class="ly-svg" viewBox="0 0 1280 560" role="img" aria-label={L('Grid overlay at 1280 px: twelve columns with 24 px gutters inside 24 px page margins, next to the 280 px side navigation. Four cards span three columns each; below them a main panel spans eight columns and a side panel four.', 'Lưới ở 1280 px: mười hai cột với gutter 24 px trong lề trang 24 px, cạnh menu bên 280 px. Bốn card mỗi card chiếm ba cột; bên dưới là panel chính chiếm tám cột và panel bên chiếm bốn cột.')}>
175
+ <rect class="f-page" x="0" y="0" width="1280" height="560" />
176
+ <rect class="f-mark" x={sidebar} y={header} width={pad.desktop} height={560 - header} />
177
+ <rect class="f-mark" x={1280 - pad.desktop} y={header} width={pad.desktop} height={560 - header} />
178
+ {Array.from({ length: 12 }, (_, i) => <rect class="f-col" x={col(i)} y={header} width={colW} height={560 - header} />)}
179
+ <rect class="f-plain" x="0" y="0" width="1280" height={header} />
180
+ <rect class="f-line" x="0" y={header - 2} width="1280" height="2" />
181
+ <rect class="f-indicator" x="20" y="12" width="24" height="24" rx="6" />
182
+ <rect class="f-skel" x="52" y="16" width="88" height="16" rx="4" />
183
+ <rect class="f-subtle" x="0" y={header} width={sidebar} height={560 - header} />
184
+ <rect class="f-line" x={sidebar - 2} y={header} width="2" height={560 - header} />
185
+ {cards.map((c) => <rect class="f-block" x={c.x} y="96" width={c.w} height="112" rx="12" />)}
186
+ <rect class="f-block" x={col(0)} y="232" width={span(8)} height="296" rx="12" />
187
+ <rect class="f-block" x={col(8)} y="232" width={span(4)} height="296" rx="12" />
188
+ <text class="t-ink" x={col(0) + span(8) / 2} y="388" font-size="26" text-anchor="middle">span 8</text>
189
+ <text class="t-ink" x={col(8) + span(4) / 2} y="388" font-size="26" text-anchor="middle">span 4</text>
190
+ <text class="t-ink" x={cards[0].x + cards[0].w / 2} y="160" font-size="26" text-anchor="middle">span 3</text>
191
+ <text class="t-dim" x={col(1) - gutter.desktop / 2} y="84" font-size="20" text-anchor="middle">24</text>
192
+ <text class="t-dim" x={sidebar + pad.desktop / 2} y="84" font-size="20" text-anchor="middle">24</text>
193
+ <text class="t-dim" x={sidebar / 2} y="300" font-size="22" text-anchor="middle">{sidebar}</text>
194
+ </svg>
195
+ <figcaption>{vi ? <Fragment><b>Cửa sổ rộng 1280 px.</b> 12 cột, gutter 24 px, lề trang 24 px.</Fragment> : <Fragment><b>Window 1280 px wide.</b> 12 columns, 24 px gutters, 24 px page margins.</Fragment>}</figcaption>
196
+ </figure>
197
+ <figure class="ly-phone">
198
+ <svg class="ly-svg" viewBox="0 0 360 640" role="img" aria-label={L('Grid overlay at 360 px: four columns with 16 px gutters inside 16 px page margins. One card spans the full width, two span half, four small tiles span one column each, and a panel spans the full width.', 'Lưới ở 360 px: bốn cột với gutter 16 px trong lề trang 16 px. Một card trải hết chiều ngang, hai card mỗi card một nửa, bốn ô nhỏ mỗi ô một cột, và một panel trải hết chiều ngang.')}>
199
+ <rect class="f-page" x="0" y="0" width="360" height="640" />
200
+ <rect class="f-mark" x="0" y={header} width={pad.phone} height={640 - header} />
201
+ <rect class="f-mark" x={360 - pad.phone} y={header} width={pad.phone} height={640 - header} />
202
+ {Array.from({ length: 4 }, (_, i) => <rect class="f-col" x={pcol(i)} y={header} width={pColW} height={640 - header} />)}
203
+ <rect class="f-plain" x="0" y="0" width="360" height={header} />
204
+ <rect class="f-line" x="0" y={header - 2} width="360" height="2" />
205
+ <path class="s-icon" d="M18 16h20M18 24h20M18 32h20" />
206
+ <rect class="f-indicator" x="56" y="12" width="24" height="24" rx="6" />
207
+ <rect class="f-block" x={pcol(0)} y="64" width={pw} height="96" rx="12" />
208
+ <rect class="f-block" x={pcol(0)} y="176" width={pspan(2)} height="96" rx="12" />
209
+ <rect class="f-block" x={pcol(2)} y="176" width={pspan(2)} height="96" rx="12" />
210
+ {[0, 1, 2, 3].map((i) => <rect class="f-block" x={pcol(i)} y="288" width={pColW} height="72" rx="10" />)}
211
+ <rect class="f-block" x={pcol(0)} y="376" width={pw} height="248" rx="12" />
212
+ <text class="t-ink" x="180" y="120" font-size="22" text-anchor="middle">span 4</text>
213
+ <text class="t-ink" x={pcol(0) + pspan(2) / 2} y="232" font-size="22" text-anchor="middle">span 2</text>
214
+ <text class="t-ink" x={pcol(2) + pspan(2) / 2} y="232" font-size="22" text-anchor="middle">span 2</text>
215
+ <text class="t-ink" x={pcol(0) + pColW / 2} y="332" font-size="18" text-anchor="middle">1</text>
216
+ <text class="t-dim" x={pcol(1) - gutter.phone / 2} y="516" font-size="18" text-anchor="middle">16</text>
217
+ </svg>
218
+ <figcaption>{vi ? <Fragment><b>Cửa sổ rộng 360 px.</b> 4 cột, gutter và lề 16 px.</Fragment> : <Fragment><b>Window 360 px wide.</b> 4 columns, 16 px gutters and margins.</Fragment>}</figcaption>
219
+ </figure>
220
+ </div>
221
+ </div>
222
+ )}
223
+
224
+ {kind === 'widths' && (
225
+ <div class="ly-widths ly-root">
226
+ {widths.map((w) => (
227
+ <figure>
228
+ <svg class="ly-svg" viewBox={`0 0 ${W} ${H}`} role="img" aria-label={vi ? `Trang ${w.name} trên cửa sổ 1920 px, menu bên đang mở. Page header (breadcrumb, tiêu đề và nút hành động) trải hết vùng nội dung. Bên dưới, ${w.name === 'Full' ? 'nội dung lấp đầy vùng cạnh menu bên, trong lề trang 32 px' : `nội dung rộng tối đa ${w.max}, không tính lề trang, và được căn giữa trong vùng cạnh menu bên`}.` : `${w.name} page on a 1920 px window with the side navigation open. The page header (breadcrumb, title and page actions) spans the whole content area. Below it, ${w.name === 'Full' ? 'the content fills the area beside the side navigation, inside 32 px page margins' : `the content is at most ${w.max} wide, not counting the page margins, and is centred in the area beside the side navigation`}.`}>
229
+ <rect class="f-page" x="0" y="0" width={W} height={H} />
230
+ {w.name !== 'Full' && <rect class="f-mark" x={area.x} y={hb} width={w.fx - area.x} height={H - hb} />}
231
+ {w.name !== 'Full' && <rect class="f-mark" x={w.fx + w.frame} y={hb} width={area.x + area.w - w.fx - w.frame} height={H - hb} />}
232
+ <rect class="f-plain" x="0" y="0" width={W} height={header} />
233
+ <rect class="f-line" x="0" y={header - 2} width={W} height="2" />
234
+ <rect class="f-indicator" x="20" y="12" width="24" height="24" rx="6" />
235
+ <rect class="f-subtle" x="0" y={header} width={sidebar} height={H - header} />
236
+ <rect class="f-line" x={sidebar - 2} y={header} width="2" height={H - header} />
237
+ {menu.map((i) => <rect class="f-skel" x="32" y={80 + i * 64} width={200 - i * 16} height="24" rx="12" />)}
238
+ <rect class="f-skel-subtle" x={ph.x} y="80" width="96" height="16" rx="8" />
239
+ <rect class="f-skel-subtle" x={ph.x + 112} y="80" width="128" height="16" rx="8" />
240
+ <rect class="f-skel" x={ph.x} y="108" width="480" height="40" rx="10" />
241
+ {w.name !== 'Narrow' && <rect class="f-field" x={ph.x + ph.w - 384} y="104" width="168" height="48" rx="10" />}
242
+ {w.name !== 'Narrow' && <rect class="f-primary" x={ph.x + ph.w - 200} y="104" width="200" height="48" rx="10" />}
243
+ <rect class="f-line" x={ph.x} y={hb - 4} width={ph.w} height="4" />
244
+ {w.name === 'Full' && (
245
+ <g>
246
+ <rect class="f-surface" x={w.x} y="204" width={w.w} height={H - 204 - wm} rx="20" />
247
+ {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((r) => (
248
+ <g>
249
+ <rect class="f-line" x={w.x + 40} y={278 + r * 74} width={w.w - 80} height="4" />
250
+ <rect class="f-skel-subtle" x={w.x + 40} y={302 + r * 74} width="320" height="20" rx="10" />
251
+ <rect class="f-skel-subtle" x={w.x + 560} y={302 + r * 74} width="240" height="20" rx="10" />
252
+ <rect class="f-skel-subtle" x={w.x + 1000} y={302 + r * 74} width="200" height="20" rx="10" />
253
+ </g>
254
+ ))}
255
+ </g>
256
+ )}
257
+ {w.name === 'Wide' && (
258
+ <g>
259
+ {[0, 1, 2, 3].map((i) => <rect class="f-surface" x={w.x + i * ((w.w - 72) / 4 + 24)} y="204" width={(w.w - 72) / 4} height="184" rx="20" />)}
260
+ <rect class="f-surface" x={w.x} y="412" width={(w.w - 24) * 2 / 3} height={H - 412 - wm} rx="20" />
261
+ <rect class="f-surface" x={w.x + (w.w - 24) * 2 / 3 + 24} y="412" width={(w.w - 24) / 3} height={H - 412 - wm} rx="20" />
262
+ </g>
263
+ )}
264
+ {w.name === 'Narrow' && (
265
+ <g>
266
+ {[0, 1, 2, 3, 4].map((i) => (
267
+ <g>
268
+ <rect class="f-skel" x={w.x} y={212 + i * 146} width="200" height="20" rx="10" />
269
+ <rect class="f-field" x={w.x} y={248 + i * 146} width={w.w} height="64" rx="12" />
270
+ </g>
271
+ ))}
272
+ <rect class="f-primary" x={w.x} y="956" width="200" height="64" rx="12" />
273
+ </g>
274
+ )}
275
+ </svg>
276
+ <figcaption><b>{w.name}, {w.max.toLowerCase()}.</b> <span>{w.use}</span></figcaption>
277
+ </figure>
278
+ ))}
279
+ </div>
280
+ )}
281
+
282
+ {kind === 'controls' && (
283
+ <div class="ly-controls ly-root">
284
+ <figure>
285
+ <div class="ly-controls-stage">
286
+ <span class="ly-ruler"><span class="ly-field is-small">Search orders</span></span>
287
+ <span class="sp-btn is-small">Filter</span>
288
+ </div>
289
+ <figcaption><b>{L('Small, 24 px', 'Nhỏ, 24 px')}</b><span>{L('Dense tables and their toolbars, filters, tags.', 'Bảng dày đặc và thanh công cụ của chúng, bộ lọc, tag.')}</span></figcaption>
290
+ </figure>
291
+ <figure>
292
+ <div class="ly-controls-stage">
293
+ <span class="ly-ruler"><span class="ly-field is-default">Store URL</span></span>
294
+ <span class="sp-btn is-primary">Save</span>
295
+ </div>
296
+ <figcaption><b>{L('Default, 32 px', 'Mặc định, 32 px')}</b><span>{L('Forms, buttons, the header, toolbars. Everything else.', 'Form, nút, header, thanh công cụ. Mọi chỗ còn lại.')}</span></figcaption>
297
+ </figure>
298
+ <figure>
299
+ <div class="ly-controls-stage">
300
+ <span class="ly-ruler"><span class="ly-field is-large">Email</span></span>
301
+ <span class="sp-btn is-primary is-large">Sign in</span>
302
+ </div>
303
+ <figcaption><b>{L('Large, 40 px', 'Lớn, 40 px')}</b><span>{L('Sign-in and onboarding. Optional for the main action on touch screens.', 'Đăng nhập và onboarding. Có thể dùng cho thao tác chính trên màn hình cảm ứng.')}</span></figcaption>
304
+ </figure>
305
+ </div>
306
+ )}
307
+
308
+ {kind === 'breakpoints' && (
309
+ <figure class="ly-figure ly-root">
310
+ <ol class="ly-bp" aria-label={L('Breakpoints from narrow to wide', 'Các breakpoint từ hẹp đến rộng')}>
311
+ {bands.map((b) => (
312
+ <li style={`flex: ${b.size} 1 0`}>
313
+ <b>{b.name}</b>
314
+ <span>{b.min === 0 ? '0' : `${b.min}`}{b.name === 'xl' ? '+' : `–${b.min + b.size - 1}`}</span>
315
+ </li>
316
+ ))}
317
+ </ol>
318
+ <figcaption>{vi ? <Fragment>Độ rộng cửa sổ tính bằng px, vẽ đúng tỉ lệ; <code>xl</code> không có mốc trên. Mọi màn hình cũng phải dùng được ở 320 px.</Fragment> : <Fragment>Window width in px, drawn to scale; <code>xl</code> has no upper end. Every screen must also work at 320 px.</Fragment>}</figcaption>
319
+ </figure>
320
+ )}
321
+
322
+ {kind === 'navlabels' && (
323
+ <figure class="ly-figure ly-root">
324
+ <svg class="ly-svg" viewBox="0 0 760 248" role="img" aria-label={L('Side navigation 280 px wide. Three short labels fit. A long label is cut with an ellipsis, and its full text shows in a tooltip next to it.', 'Menu bên rộng 280 px. Ba nhãn ngắn vừa đủ. Một nhãn dài bị cắt bằng dấu ba chấm, và nội dung đầy đủ hiện trong tooltip bên cạnh.')}>
325
+ <rect class="f-page" x="0" y="0" width="760" height="248" />
326
+ <rect class="f-subtle" x="0" y="0" width={sidebar} height="248" />
327
+ <rect class="f-line" x={sidebar - 2} y="0" width="2" height="248" />
328
+ {(vi ? ['Đơn hàng', 'Sản phẩm', 'Cài đặt đồng bộ'] : ['Orders', 'Products', 'Sync settings']).map((label, i) => (
329
+ <g>
330
+ <rect class="f-subtle" x="8" y={16 + i * 36} width={sidebar - 16} height="32" rx="6" />
331
+ <rect class="f-skel" x="20" y={24 + i * 36} width="16" height="16" rx="4" />
332
+ <text class="t-label" x="40" y={37 + i * 36} font-size="14">{label}</text>
333
+ </g>
334
+ ))}
335
+ <rect class="f-selected" x="8" y="124" width={sidebar - 16} height="32" rx="6" />
336
+ <rect class="f-skel" x="20" y="132" width="16" height="16" rx="4" />
337
+ <text class="t-label" x="40" y="145" font-size="14">{L('Online store → ERP field mappi…', 'Ánh xạ trường Cửa hàng onli…')}</text>
338
+ <rect class="f-inverse" x={sidebar + 12} y="120" width="300" height="40" rx="6" />
339
+ <text class="t-inverse" x={sidebar + 24} y="145" font-size="14">{L('Online store → ERP field mapping rules', 'Ánh xạ trường Cửa hàng online → ERP')}</text>
340
+ <path class="s-dim" d={`M8 208h${sidebar - 16}M8 202v12M${sidebar - 8} 202v12`} />
341
+ <text class="t-dim" x={sidebar / 2} y="234" font-size="14" text-anchor="middle">{sidebar} px</text>
342
+ </svg>
343
+ <figcaption>{vi ? <Fragment><b>Nhãn dài</b> bị cắt bằng dấu ba chấm và hiện đầy đủ trong tooltip. Menu bên giữ nguyên độ rộng.</Fragment> : <Fragment><b>A long label</b> is cut with an ellipsis and shows in full in a tooltip. The side navigation keeps its width.</Fragment>}</figcaption>
344
+ </figure>
345
+ )}
346
+
347
+ {kind === 'pageheader' && (
348
+ <figure class="ly-figure ly-root">
349
+ <svg class="ly-svg" viewBox="0 0 1000 340" role="img" aria-label={L('Page header at the top of the content, 24 px from the side navigation and the header: a breadcrumb, then 8 px below it the title with a status badge on the left and two page actions on the right, then 4 px below the title a one-line description, then a row of tabs, and 24 px below that the start of the content.', 'Page header ở đầu vùng nội dung, cách menu bên và header 24 px: breadcrumb, cách 8 px bên dưới là tiêu đề với badge trạng thái bên trái và hai nút hành động bên phải, cách tiêu đề 4 px là một dòng mô tả, rồi tới hàng tab, và cách 24 px bên dưới là phần đầu của nội dung.')}>
350
+ <rect class="f-page" x="0" y="0" width="1000" height="340" />
351
+ <rect class="f-subtle" x="0" y="0" width="24" height="340" />
352
+ <rect class="f-mark" x="24" y="0" width="24" height="340" />
353
+ <rect class="f-mark" x="24" y="0" width="952" height="24" />
354
+ <rect class="f-mark" x="976" y="0" width="24" height="340" />
355
+ <rect class="f-skel" x="48" y="28" width="72" height="12" rx="6" />
356
+ <rect class="f-skel" x="132" y="28" width="96" height="12" rx="6" />
357
+ <rect class="f-skel" x="48" y="52" width="220" height="28" rx="6" />
358
+ <rect class="f-selected" x="280" y="56" width="72" height="20" rx="10" />
359
+ <rect class="f-field" x="760" y="50" width="96" height="32" rx="8" />
360
+ <rect class="f-primary" x="868" y="50" width="108" height="32" rx="8" />
361
+ <rect class="f-skel-subtle" x="48" y="88" width="420" height="12" rx="6" />
362
+ {[0, 1, 2].map((i) => <rect class={i === 0 ? 'f-skel' : 'f-skel-subtle'} x={48 + i * 96} y="120" width="72" height="12" rx="6" />)}
363
+ <rect class="f-indicator" x="48" y="144" width="72" height="3" />
364
+ <rect class="f-line" x="48" y="146" width="928" height="2" />
365
+ <rect class="f-surface" x="48" y="172" width="928" height="168" rx="12" />
366
+ <path class="s-dim" d="M300 40v12M294 40h12M294 52h12" /><text class="t-dim" x="314" y="51" font-size="14">8</text>
367
+ <path class="s-dim" d="M500 80v8M494 80h12M494 88h12" /><text class="t-dim" x="514" y="89" font-size="14">4</text>
368
+ <path class="s-dim" d="M600 148v24M594 148h12M594 172h12" /><text class="t-dim" x="614" y="165" font-size="14">24</text>
369
+ <text class="t-dim" x="36" y="200" font-size="14" text-anchor="middle">24</text>
370
+ <circle class="c-call" cx="250" cy="34" r="12" /><text class="t-call" x="250" y="34" font-size="13">1</text>
371
+ <circle class="c-call" cx="374" cy="66" r="12" /><text class="t-call" x="374" y="66" font-size="13">2</text>
372
+ <circle class="c-call" cx="740" cy="66" r="12" /><text class="t-call" x="740" y="66" font-size="13">3</text>
373
+ <circle class="c-call" cx="490" cy="94" r="12" /><text class="t-call" x="490" y="94" font-size="13">4</text>
374
+ <circle class="c-call" cx="350" cy="126" r="12" /><text class="t-call" x="350" y="126" font-size="13">5</text>
375
+ </svg>
376
+ <ol class="ly-legend">
377
+ <li><span>{vi ? <Fragment><b>Breadcrumb.</b> Các trang cấp trên của trang này.</Fragment> : <Fragment><b>Breadcrumb.</b> The pages above this one.</Fragment>}</span></li>
378
+ <li><span>{vi ? <Fragment><b>Tiêu đề và trạng thái.</b> <code>heading.large</code>, kèm badge khi trang có trạng thái.</Fragment> : <Fragment><b>Title and status.</b> <code>heading.large</code>, with a badge when the page has a state.</Fragment>}</span></li>
379
+ <li><span>{vi ? <Fragment><b>Nút hành động của trang.</b> Nút chính đứng cuối, bên phải.</Fragment> : <Fragment><b>Page actions.</b> The main action last, on the right.</Fragment>}</span></li>
380
+ <li><span>{vi ? <Fragment><b>Mô tả.</b> Không bắt buộc, một dòng.</Fragment> : <Fragment><b>Description.</b> Optional, one line.</Fragment>}</span></li>
381
+ <li><span>{vi ? <Fragment><b>Tab hoặc bộ lọc.</b> Không bắt buộc. Các góc nhìn của cùng một trang.</Fragment> : <Fragment><b>Tabs or filters.</b> Optional. Views of the same page.</Fragment>}</span></li>
382
+ </ol>
383
+ </figure>
384
+ )}
@@ -0,0 +1,25 @@
1
+ ---
2
+ import { logoImg, type LogoKind } from '../lib/brand';
3
+
4
+ // One logo, drawn once per tone when `tone` is "auto"; CSS in chrome.css shows the tone that
5
+ // fits the page theme.
6
+ interface Props {
7
+ kind: LogoKind;
8
+ // "auto" follows the site theme; "light" and "dark" are for a fixed background.
9
+ tone?: 'auto' | 'light' | 'dark';
10
+ iconHeight: number;
11
+ alt?: string;
12
+ class?: string;
13
+ }
14
+
15
+ const { kind, tone = 'auto', iconHeight, alt = '', class: className } = Astro.props;
16
+ const tones = tone === 'auto' ? (['light', 'dark'] as const) : ([tone] as const);
17
+ ---
18
+
19
+ {tones.map((t) => (
20
+ <img
21
+ class:list={[className, tone === 'auto' && (t === 'light' ? 'logo-light' : 'logo-dark')]}
22
+ alt={alt}
23
+ {...logoImg(kind, t, iconHeight)}
24
+ />
25
+ ))}
@@ -0,0 +1,22 @@
1
+ ---
2
+ import StatusBadge from './StatusBadge.astro';
3
+ import type { ReleasePhase } from '../lib/release-phases';
4
+
5
+ const phases: { id: ReleasePhase; meaning: string; production: string }[] = [
6
+ { id: 'early-access', meaning: 'Being explored. It may change a lot or be removed. Feedback wanted.', production: "Only with the design system team's agreement." },
7
+ { id: 'beta', meaning: 'Ready for controlled use. The API may still change, with notice in the changelog.', production: 'Yes, but follow the changelog.' },
8
+ { id: 'ga', meaning: 'Stable and supported. Breaking changes follow deprecation.', production: 'Yes.' },
9
+ { id: 'deprecated', meaning: 'Being replaced. A migration path is documented.', production: 'No new usage. Migrate existing usage.' },
10
+ ];
11
+ ---
12
+
13
+ <div class="table-wrap">
14
+ <table>
15
+ <thead><tr><th>Phase</th><th>Meaning</th><th>Can I use it in production?</th></tr></thead>
16
+ <tbody>
17
+ {phases.map((phase) => (
18
+ <tr><td><StatusBadge status={phase.id} link={false} /></td><td>{phase.meaning}</td><td>{phase.production}</td></tr>
19
+ ))}
20
+ </tbody>
21
+ </table>
22
+ </div>
@@ -0,0 +1,48 @@
1
+ ---
2
+ // Three role cards on Get started, each with the four pages to read first.
3
+ const roles = [
4
+ {
5
+ title: 'Design',
6
+ href: '/get-started/design/',
7
+ summary: 'Build screens from tokens and components.',
8
+ links: [
9
+ ['Start from tokens', '/foundations/tokens/'],
10
+ ['Use existing components', '/components/'],
11
+ ['Design for every state', '/foundations/styles/interaction-states/'],
12
+ ['Check accessibility early', '/foundations/guidelines/accessibility/'],
13
+ ],
14
+ },
15
+ {
16
+ title: 'Develop',
17
+ href: '/get-started/develop/',
18
+ summary: 'Ship the tokens, theme and lint rules.',
19
+ links: [
20
+ ['Use the token CSS', '/foundations/tokens/all-tokens/'],
21
+ ['Theme Ant Design Vue', '/tools/ant-design-vue-theme/'],
22
+ ['Add the lint rules', '/tools/stylelint/'],
23
+ ['Docs for AI agents', '/tools/ai-agents/'],
24
+ ],
25
+ },
26
+ {
27
+ title: 'Content',
28
+ href: '/get-started/content/',
29
+ summary: 'Write clear, consistent product copy.',
30
+ links: [
31
+ ['Content guidelines', '/foundations/guidelines/content/'],
32
+ ['Quick rules', '/get-started/content/#quick-rules'],
33
+ ['Button labels', '/components/button/usage/'],
34
+ ['Accessible wording', '/foundations/guidelines/accessibility/'],
35
+ ],
36
+ },
37
+ ];
38
+ ---
39
+
40
+ <div class="role-cards">
41
+ {roles.map((role) => (
42
+ <section class="role-card" aria-labelledby={`role-${role.title.toLowerCase()}`}>
43
+ <h3 id={`role-${role.title.toLowerCase()}`}><a href={role.href}>{role.title} guide →</a></h3>
44
+ <p>{role.summary}</p>
45
+ <ul>{role.links.map(([label, href]) => <li><a href={href}>{label}</a></li>)}</ul>
46
+ </section>
47
+ ))}
48
+ </div>