@mindlogic-ai/logician-ui 5.0.0-alpha.2 → 5.0.0-alpha.21

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 (533) hide show
  1. package/README.md +1 -0
  2. package/dist/components/Avatar/Avatar.d.ts +68 -11
  3. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  4. package/dist/components/Avatar/Avatar.js +41 -5
  5. package/dist/components/Avatar/Avatar.js.map +1 -1
  6. package/dist/components/Avatar/Avatar.mjs +40 -5
  7. package/dist/components/Avatar/Avatar.mjs.map +1 -1
  8. package/dist/components/Avatar/index.d.ts +2 -2
  9. package/dist/components/Avatar/index.d.ts.map +1 -1
  10. package/dist/components/Badge/Badge.d.ts.map +1 -1
  11. package/dist/components/Badge/Badge.js +5 -3
  12. package/dist/components/Badge/Badge.js.map +1 -1
  13. package/dist/components/Badge/Badge.mjs +5 -3
  14. package/dist/components/Badge/Badge.mjs.map +1 -1
  15. package/dist/components/Badge/Badge.types.d.ts +7 -5
  16. package/dist/components/Badge/Badge.types.d.ts.map +1 -1
  17. package/dist/components/Banner/Banner.types.d.ts +24 -1
  18. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  19. package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
  20. package/dist/components/Button/Button.d.ts.map +1 -1
  21. package/dist/components/Button/Button.js +31 -3
  22. package/dist/components/Button/Button.js.map +1 -1
  23. package/dist/components/Button/Button.mjs +31 -3
  24. package/dist/components/Button/Button.mjs.map +1 -1
  25. package/dist/components/Button/Button.types.d.ts +38 -1
  26. package/dist/components/Button/Button.types.d.ts.map +1 -1
  27. package/dist/components/Card/Card.types.d.ts +12 -0
  28. package/dist/components/Card/Card.types.d.ts.map +1 -1
  29. package/dist/components/Code/shikiAdapter.d.ts +3 -1
  30. package/dist/components/Code/shikiAdapter.d.ts.map +1 -1
  31. package/dist/components/Code/shikiAdapter.js +29 -8
  32. package/dist/components/Code/shikiAdapter.js.map +1 -1
  33. package/dist/components/Code/shikiAdapter.mjs +29 -8
  34. package/dist/components/Code/shikiAdapter.mjs.map +1 -1
  35. package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
  36. package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
  37. package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
  38. package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
  39. package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
  40. package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
  41. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  42. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  43. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  44. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  45. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  46. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  47. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  48. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  49. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  50. package/dist/components/Confetti/confettiColors.js +5 -5
  51. package/dist/components/Confetti/confettiColors.mjs +5 -5
  52. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  53. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  54. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
  55. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
  56. package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
  57. package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
  58. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
  59. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
  60. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
  61. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  62. package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
  63. package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
  64. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
  65. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
  66. package/dist/components/Input/Input.d.ts.map +1 -1
  67. package/dist/components/Input/Input.js +4 -0
  68. package/dist/components/Input/Input.js.map +1 -1
  69. package/dist/components/Input/Input.mjs +4 -0
  70. package/dist/components/Input/Input.mjs.map +1 -1
  71. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  72. package/dist/components/LineGraph/LineGraph.js +4 -5
  73. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  74. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  75. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  76. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  77. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  78. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  79. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  80. package/dist/components/LineGraph/seriesColors.js +8 -7
  81. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  82. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  83. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  84. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  85. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  86. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  87. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  88. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  89. package/dist/components/Modal/ModalCloseButton.js +1 -1
  90. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  91. package/dist/components/NavList/NavList.d.ts +35 -0
  92. package/dist/components/NavList/NavList.d.ts.map +1 -0
  93. package/dist/components/NavList/NavList.js +113 -0
  94. package/dist/components/NavList/NavList.js.map +1 -0
  95. package/dist/components/NavList/NavList.mjs +111 -0
  96. package/dist/components/NavList/NavList.mjs.map +1 -0
  97. package/dist/components/NavList/NavList.styles.d.ts +90 -0
  98. package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
  99. package/dist/components/NavList/NavList.styles.js +104 -0
  100. package/dist/components/NavList/NavList.styles.js.map +1 -0
  101. package/dist/components/NavList/NavList.styles.mjs +97 -0
  102. package/dist/components/NavList/NavList.styles.mjs.map +1 -0
  103. package/dist/components/NavList/NavList.translations.json.js +19 -0
  104. package/dist/components/NavList/NavList.translations.json.js.map +1 -0
  105. package/dist/components/NavList/NavList.translations.json.mjs +14 -0
  106. package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
  107. package/dist/components/NavList/NavList.types.d.ts +140 -0
  108. package/dist/components/NavList/NavList.types.d.ts.map +1 -0
  109. package/dist/components/NavList/NavListContext.d.ts +30 -0
  110. package/dist/components/NavList/NavListContext.d.ts.map +1 -0
  111. package/dist/components/NavList/NavListContext.js +16 -0
  112. package/dist/components/NavList/NavListContext.js.map +1 -0
  113. package/dist/components/NavList/NavListContext.mjs +13 -0
  114. package/dist/components/NavList/NavListContext.mjs.map +1 -0
  115. package/dist/components/NavList/NavListGroup.d.ts +31 -0
  116. package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
  117. package/dist/components/NavList/NavListGroup.js +115 -0
  118. package/dist/components/NavList/NavListGroup.js.map +1 -0
  119. package/dist/components/NavList/NavListGroup.mjs +113 -0
  120. package/dist/components/NavList/NavListGroup.mjs.map +1 -0
  121. package/dist/components/NavList/NavListItem.d.ts +16 -0
  122. package/dist/components/NavList/NavListItem.d.ts.map +1 -0
  123. package/dist/components/NavList/NavListItem.js +284 -0
  124. package/dist/components/NavList/NavListItem.js.map +1 -0
  125. package/dist/components/NavList/NavListItem.mjs +282 -0
  126. package/dist/components/NavList/NavListItem.mjs.map +1 -0
  127. package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
  128. package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
  129. package/dist/components/NavList/NavListSkeleton.js +33 -0
  130. package/dist/components/NavList/NavListSkeleton.js.map +1 -0
  131. package/dist/components/NavList/NavListSkeleton.mjs +31 -0
  132. package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
  133. package/dist/components/NavList/index.d.ts +7 -0
  134. package/dist/components/NavList/index.d.ts.map +1 -0
  135. package/dist/components/Pagination/Pagination.d.ts +11 -10
  136. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  137. package/dist/components/Pagination/Pagination.js +11 -10
  138. package/dist/components/Pagination/Pagination.js.map +1 -1
  139. package/dist/components/Pagination/Pagination.mjs +11 -10
  140. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  141. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  142. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  143. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  144. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  145. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  146. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  147. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  148. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  149. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  150. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  151. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  152. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  153. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  154. package/dist/components/Select/Combobox.d.ts +1 -1
  155. package/dist/components/Select/Combobox.d.ts.map +1 -1
  156. package/dist/components/Select/Combobox.js +9 -2
  157. package/dist/components/Select/Combobox.js.map +1 -1
  158. package/dist/components/Select/Combobox.mjs +10 -3
  159. package/dist/components/Select/Combobox.mjs.map +1 -1
  160. package/dist/components/Select/Select.d.ts +1 -1
  161. package/dist/components/Select/Select.d.ts.map +1 -1
  162. package/dist/components/Select/Select.js +14 -2
  163. package/dist/components/Select/Select.js.map +1 -1
  164. package/dist/components/Select/Select.mjs +15 -3
  165. package/dist/components/Select/Select.mjs.map +1 -1
  166. package/dist/components/Select/Select.styles.d.ts +97 -1
  167. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  168. package/dist/components/Select/Select.styles.js +83 -0
  169. package/dist/components/Select/Select.styles.js.map +1 -1
  170. package/dist/components/Select/Select.styles.mjs +82 -1
  171. package/dist/components/Select/Select.styles.mjs.map +1 -1
  172. package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
  173. package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
  174. package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
  175. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  176. package/dist/components/Textarea/Textarea.js +4 -0
  177. package/dist/components/Textarea/Textarea.js.map +1 -1
  178. package/dist/components/Textarea/Textarea.mjs +4 -0
  179. package/dist/components/Textarea/Textarea.mjs.map +1 -1
  180. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  181. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  182. package/dist/components/Toast/Toast.styles.js +18 -10
  183. package/dist/components/Toast/Toast.styles.js.map +1 -1
  184. package/dist/components/Toast/Toast.styles.mjs +18 -10
  185. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  186. package/dist/components/Typography/Caption.d.ts.map +1 -1
  187. package/dist/components/Typography/Caption.js +1 -1
  188. package/dist/components/Typography/Caption.js.map +1 -1
  189. package/dist/components/Typography/Caption.mjs +1 -1
  190. package/dist/components/Typography/Caption.mjs.map +1 -1
  191. package/dist/components/Typography/H1.d.ts.map +1 -1
  192. package/dist/components/Typography/H1.js +1 -1
  193. package/dist/components/Typography/H1.js.map +1 -1
  194. package/dist/components/Typography/H1.mjs +1 -1
  195. package/dist/components/Typography/H1.mjs.map +1 -1
  196. package/dist/components/Typography/H2.d.ts.map +1 -1
  197. package/dist/components/Typography/H2.js +1 -1
  198. package/dist/components/Typography/H2.js.map +1 -1
  199. package/dist/components/Typography/H2.mjs +1 -1
  200. package/dist/components/Typography/H2.mjs.map +1 -1
  201. package/dist/components/Typography/H3.d.ts.map +1 -1
  202. package/dist/components/Typography/H3.js +1 -1
  203. package/dist/components/Typography/H3.js.map +1 -1
  204. package/dist/components/Typography/H3.mjs +1 -1
  205. package/dist/components/Typography/H3.mjs.map +1 -1
  206. package/dist/components/Typography/H4.d.ts.map +1 -1
  207. package/dist/components/Typography/H4.js +1 -1
  208. package/dist/components/Typography/H4.js.map +1 -1
  209. package/dist/components/Typography/H4.mjs +1 -1
  210. package/dist/components/Typography/H4.mjs.map +1 -1
  211. package/dist/components/Typography/H5.d.ts.map +1 -1
  212. package/dist/components/Typography/H5.js +1 -1
  213. package/dist/components/Typography/H5.js.map +1 -1
  214. package/dist/components/Typography/H5.mjs +1 -1
  215. package/dist/components/Typography/H5.mjs.map +1 -1
  216. package/dist/components/Typography/Link.d.ts.map +1 -1
  217. package/dist/components/Typography/Link.js +1 -1
  218. package/dist/components/Typography/Link.js.map +1 -1
  219. package/dist/components/Typography/Link.mjs +1 -1
  220. package/dist/components/Typography/Link.mjs.map +1 -1
  221. package/dist/components/Typography/Overline.d.ts.map +1 -1
  222. package/dist/components/Typography/Overline.js +1 -1
  223. package/dist/components/Typography/Overline.js.map +1 -1
  224. package/dist/components/Typography/Overline.mjs +1 -1
  225. package/dist/components/Typography/Overline.mjs.map +1 -1
  226. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  227. package/dist/components/Typography/Subtext.js +1 -1
  228. package/dist/components/Typography/Subtext.js.map +1 -1
  229. package/dist/components/Typography/Subtext.mjs +1 -1
  230. package/dist/components/Typography/Subtext.mjs.map +1 -1
  231. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  232. package/dist/components/Typography/Subtitle.js +1 -1
  233. package/dist/components/Typography/Subtitle.js.map +1 -1
  234. package/dist/components/Typography/Subtitle.mjs +1 -1
  235. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  236. package/dist/components/Typography/Text.d.ts.map +1 -1
  237. package/dist/components/Typography/Text.js +1 -1
  238. package/dist/components/Typography/Text.js.map +1 -1
  239. package/dist/components/Typography/Text.mjs +1 -1
  240. package/dist/components/Typography/Text.mjs.map +1 -1
  241. package/dist/hooks/useLanguage.d.ts +5 -0
  242. package/dist/hooks/useLanguage.d.ts.map +1 -1
  243. package/dist/hooks/useLanguage.js +7 -3
  244. package/dist/hooks/useLanguage.js.map +1 -1
  245. package/dist/hooks/useLanguage.mjs +7 -4
  246. package/dist/hooks/useLanguage.mjs.map +1 -1
  247. package/dist/hooks/useTranslate.d.ts.map +1 -1
  248. package/dist/hooks/useTranslate.js +8 -5
  249. package/dist/hooks/useTranslate.js.map +1 -1
  250. package/dist/hooks/useTranslate.mjs +8 -5
  251. package/dist/hooks/useTranslate.mjs.map +1 -1
  252. package/dist/index.d.ts +2 -1
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +13 -0
  255. package/dist/index.js.map +1 -1
  256. package/dist/index.mjs +7 -2
  257. package/dist/index.mjs.map +1 -1
  258. package/dist/theme/colors.d.ts +2 -2
  259. package/dist/theme/colors.d.ts.map +1 -1
  260. package/dist/theme/colors.js +54 -18
  261. package/dist/theme/colors.js.map +1 -1
  262. package/dist/theme/colors.mjs +55 -19
  263. package/dist/theme/colors.mjs.map +1 -1
  264. package/dist/theme/global.d.ts.map +1 -1
  265. package/dist/theme/global.js +19 -1
  266. package/dist/theme/global.js.map +1 -1
  267. package/dist/theme/global.mjs +19 -1
  268. package/dist/theme/global.mjs.map +1 -1
  269. package/dist/theme/index.d.ts.map +1 -1
  270. package/dist/theme/index.js +2 -0
  271. package/dist/theme/index.js.map +1 -1
  272. package/dist/theme/index.mjs +2 -0
  273. package/dist/theme/index.mjs.map +1 -1
  274. package/dist/theme/palette.generated.d.ts +232 -123
  275. package/dist/theme/palette.generated.d.ts.map +1 -1
  276. package/dist/theme/palette.generated.js +233 -123
  277. package/dist/theme/palette.generated.js.map +1 -1
  278. package/dist/theme/palette.generated.mjs +233 -124
  279. package/dist/theme/palette.generated.mjs.map +1 -1
  280. package/dist/theme/paletteSwatches.d.ts +20 -0
  281. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  282. package/dist/theme/recipes/avatar.d.ts +30 -0
  283. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  284. package/dist/theme/recipes/avatar.js +96 -0
  285. package/dist/theme/recipes/avatar.js.map +1 -0
  286. package/dist/theme/recipes/avatar.mjs +94 -0
  287. package/dist/theme/recipes/avatar.mjs.map +1 -0
  288. package/dist/translations/Defaults.translations.json.js +19 -1
  289. package/dist/translations/Defaults.translations.json.js.map +1 -1
  290. package/dist/translations/Defaults.translations.json.mjs +18 -2
  291. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  292. package/dist/utils/disabledControl.d.ts +8 -1
  293. package/dist/utils/disabledControl.d.ts.map +1 -1
  294. package/dist/utils/disabledControl.js +8 -1
  295. package/dist/utils/disabledControl.js.map +1 -1
  296. package/dist/utils/disabledControl.mjs +8 -1
  297. package/dist/utils/disabledControl.mjs.map +1 -1
  298. package/dist/utils/focusRing.d.ts +22 -0
  299. package/dist/utils/focusRing.d.ts.map +1 -1
  300. package/dist/utils/focusRing.js +22 -0
  301. package/dist/utils/focusRing.js.map +1 -1
  302. package/dist/utils/focusRing.mjs +21 -1
  303. package/dist/utils/focusRing.mjs.map +1 -1
  304. package/package.json +2 -1
  305. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  306. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  307. package/src/components/Appear/Appear.usage.mdx +107 -0
  308. package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
  309. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  310. package/src/components/Avatar/Avatar.tsx +118 -21
  311. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  312. package/src/components/Avatar/index.tsx +8 -1
  313. package/src/components/Badge/Badge.stories.tsx +193 -3
  314. package/src/components/Badge/Badge.tsx +5 -3
  315. package/src/components/Badge/Badge.types.ts +7 -5
  316. package/src/components/Badge/Badge.usage.mdx +265 -0
  317. package/src/components/Banner/Banner.stories.tsx +152 -2
  318. package/src/components/Banner/Banner.types.ts +30 -1
  319. package/src/components/Banner/Banner.usage.mdx +233 -0
  320. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  321. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  322. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  323. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  324. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  325. package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
  326. package/src/components/Button/Button.stories.tsx +332 -3
  327. package/src/components/Button/Button.tsx +46 -3
  328. package/src/components/Button/Button.types.ts +38 -1
  329. package/src/components/Button/Button.usage.mdx +358 -0
  330. package/src/components/Button/Button.variants.test.tsx +13 -1
  331. package/src/components/Card/Card.stories.tsx +106 -0
  332. package/src/components/Card/Card.types.ts +12 -0
  333. package/src/components/Card/Card.usage.mdx +216 -0
  334. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  335. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  336. package/src/components/Chip/Chip.usage.mdx +78 -0
  337. package/src/components/Code/Code.stories.tsx +60 -0
  338. package/src/components/Code/Code.test.tsx +116 -0
  339. package/src/components/Code/Code.usage.mdx +187 -0
  340. package/src/components/Code/shikiAdapter.ts +38 -9
  341. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  342. package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
  343. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  344. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  345. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  346. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  347. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  348. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  349. package/src/components/Confetti/Confetti.types.ts +5 -1
  350. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  351. package/src/components/Confetti/confettiColors.ts +5 -5
  352. package/src/components/Container/Container.stories.tsx +32 -0
  353. package/src/components/Container/Container.usage.mdx +130 -0
  354. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  355. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  356. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  357. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  358. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  359. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  360. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  361. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  362. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  363. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  364. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  365. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  366. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  367. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  368. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  369. package/src/components/FileList/FileList.stories.tsx +25 -0
  370. package/src/components/FileList/FileList.usage.mdx +165 -0
  371. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  372. package/src/components/Form/Form.stories.tsx +149 -0
  373. package/src/components/Form/Form.usage.mdx +203 -0
  374. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  375. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  376. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  377. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  378. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  379. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  380. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  381. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  382. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  383. package/src/components/Icon/Icon.stories.tsx +61 -1
  384. package/src/components/Icon/Icon.usage.mdx +158 -0
  385. package/src/components/IconButton/IconButton.stories.tsx +213 -5
  386. package/src/components/IconButton/IconButton.usage.mdx +275 -0
  387. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  388. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  389. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  390. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  391. package/src/components/Input/Input.stories.tsx +180 -0
  392. package/src/components/Input/Input.tsx +4 -0
  393. package/src/components/Input/Input.usage.mdx +278 -0
  394. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  395. package/src/components/LineGraph/LineGraph.tsx +4 -5
  396. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  397. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  398. package/src/components/LineGraph/seriesColors.test.ts +10 -9
  399. package/src/components/LineGraph/seriesColors.ts +18 -16
  400. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  401. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  402. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  403. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  404. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  405. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  406. package/src/components/Masonry/Masonry.types.ts +8 -3
  407. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  408. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  409. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  410. package/src/components/Menu/Menu.stories.tsx +146 -2
  411. package/src/components/Menu/Menu.usage.mdx +238 -0
  412. package/src/components/Menu/MenuItem.types.ts +8 -0
  413. package/src/components/Modal/Modal.stories.tsx +177 -1
  414. package/src/components/Modal/Modal.usage.mdx +262 -0
  415. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  416. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  417. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  418. package/src/components/NavList/NavList.stories.tsx +927 -0
  419. package/src/components/NavList/NavList.styles.ts +114 -0
  420. package/src/components/NavList/NavList.test.tsx +1306 -0
  421. package/src/components/NavList/NavList.translations.json +9 -0
  422. package/src/components/NavList/NavList.tsx +160 -0
  423. package/src/components/NavList/NavList.types.ts +155 -0
  424. package/src/components/NavList/NavList.usage.mdx +545 -0
  425. package/src/components/NavList/NavListContext.ts +25 -0
  426. package/src/components/NavList/NavListGroup.tsx +243 -0
  427. package/src/components/NavList/NavListItem.tsx +543 -0
  428. package/src/components/NavList/NavListSkeleton.tsx +57 -0
  429. package/src/components/NavList/index.ts +15 -0
  430. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  431. package/src/components/Pagination/Pagination.tsx +11 -10
  432. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  433. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  434. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  435. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  436. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  437. package/src/components/Popover/Popover.stories.tsx +104 -1
  438. package/src/components/Popover/Popover.usage.mdx +197 -0
  439. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  440. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  441. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  442. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  443. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  444. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  445. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  446. package/src/components/Radio/Radio.stories.tsx +119 -0
  447. package/src/components/Radio/Radio.usage.mdx +187 -0
  448. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  449. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  450. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  451. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  452. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  453. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  454. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  455. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  456. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  457. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  458. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  459. package/src/components/Select/Combobox.tsx +28 -3
  460. package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
  461. package/src/components/Select/Select.stories.tsx +290 -1
  462. package/src/components/Select/Select.styles.ts +89 -0
  463. package/src/components/Select/Select.tsx +28 -2
  464. package/src/components/Select/Select.usage.mdx +341 -0
  465. package/src/components/Shake/Shake.usage.mdx +107 -0
  466. package/src/components/Slider/Slider.stories.tsx +116 -0
  467. package/src/components/Slider/Slider.usage.mdx +179 -0
  468. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  469. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  470. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  471. package/src/components/Switch/Switch.stories.tsx +131 -6
  472. package/src/components/Switch/Switch.usage.mdx +199 -0
  473. package/src/components/Table/Table.stories.tsx +159 -1
  474. package/src/components/Table/Table.usage.mdx +235 -0
  475. package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
  476. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  477. package/src/components/Tabs/Tabs.usage.mdx +263 -0
  478. package/src/components/Tag/Tag.stories.tsx +181 -4
  479. package/src/components/Tag/Tag.usage.mdx +257 -0
  480. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  481. package/src/components/Textarea/Textarea.tsx +4 -0
  482. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  483. package/src/components/Toast/Toast.stories.tsx +185 -3
  484. package/src/components/Toast/Toast.styles.ts +18 -10
  485. package/src/components/Toast/Toast.usage.mdx +265 -0
  486. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  487. package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
  488. package/src/components/Tree/Tree.stories.tsx +89 -0
  489. package/src/components/Tree/Tree.usage.mdx +207 -0
  490. package/src/components/Typography/Caption.tsx +0 -1
  491. package/src/components/Typography/H1.tsx +0 -1
  492. package/src/components/Typography/H2.tsx +0 -1
  493. package/src/components/Typography/H3.tsx +0 -1
  494. package/src/components/Typography/H4.tsx +0 -1
  495. package/src/components/Typography/H5.tsx +0 -1
  496. package/src/components/Typography/Link.tsx +0 -1
  497. package/src/components/Typography/Overline.tsx +0 -1
  498. package/src/components/Typography/Subtext.tsx +0 -1
  499. package/src/components/Typography/Subtitle.tsx +0 -1
  500. package/src/components/Typography/Text.tsx +0 -1
  501. package/src/components/Typography/Typography.stories.tsx +117 -0
  502. package/src/components/Typography/Typography.usage.mdx +257 -0
  503. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  504. package/src/components/a11y.kwcag.test.tsx +66 -0
  505. package/src/components/claude.md +1 -1
  506. package/src/components/noRawScales.test.ts +5 -1
  507. package/src/foundations/BrandAssets.mdx +637 -0
  508. package/src/foundations/BrandAssets.stories.tsx +680 -0
  509. package/src/foundations/BrandColour.mdx +366 -0
  510. package/src/foundations/BrandColour.stories.tsx +343 -0
  511. package/src/guidelines/ComponentPageTemplate.mdx +84 -0
  512. package/src/guidelines/FeedbackActions.mdx +162 -23
  513. package/src/guidelines/_components/Lang.tsx +175 -0
  514. package/src/guidelines/_components/TokenTable.tsx +136 -0
  515. package/src/hooks/useLanguage.ts +8 -3
  516. package/src/hooks/useTranslate.test.tsx +46 -0
  517. package/src/hooks/useTranslate.ts +7 -5
  518. package/src/index.ts +7 -1
  519. package/src/theme/BazePalette.stories.tsx +111 -1
  520. package/src/theme/Palette.stories.tsx +2 -2
  521. package/src/theme/SemanticTokens.mdx +76 -17
  522. package/src/theme/claude.md +23 -9
  523. package/src/theme/colors.ts +71 -18
  524. package/src/theme/contrast.test.ts +57 -0
  525. package/src/theme/global.ts +20 -1
  526. package/src/theme/index.ts +2 -0
  527. package/src/theme/palette.generated.ts +233 -123
  528. package/src/theme/paletteSwatches.test.ts +1 -1
  529. package/src/theme/paletteSwatches.ts +35 -0
  530. package/src/theme/recipes/avatar.ts +92 -0
  531. package/src/translations/Defaults.translations.json +14 -0
  532. package/src/utils/disabledControl.ts +8 -1
  533. package/src/utils/focusRing.ts +23 -0
@@ -15,7 +15,7 @@ Values and contrast for every token: **Setup/Theme/BAZE Palette**.
15
15
  | --- | --- | --- |
16
16
  | Raw scale (colour names) | `ink.1–12`, `inkDark.1–12`, `sand.*`, `slate.*`, `coral.*`, `red.base` … | never in components |
17
17
  | Semantic step (role names) | `neutral.1–12`, `secondary.1–12` | a specific neutral step no role names |
18
- | Semantic role | `bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*` | everything else |
18
+ | Semantic role | `bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*`, `data.*`, `diverging.*` | everything else |
19
19
 
20
20
  ```ts
21
21
  createLogicianTheme() // BAZE: { neutral: 'ink', secondary: 'sand' }
@@ -42,9 +42,11 @@ createLogicianTheme({ neutral: 'slate' }) // cool gray — app code unchanged
42
42
  | Run button (black + coral icon) · small coral marks | `action.bg` / `.fg` / `.iconOnSolid` · `action.mark` |
43
43
  | Send button, Button `accent` | `send.bg` / `.bgHover` / `.bgActive` / `.fg` |
44
44
  | Unread count | `count.bg` / `count.fg` |
45
- | Disabled (no opacity) | `disabled.bg` / `disabled.fg` |
45
+ | Disabled (no opacity) | `disabled.bg` / `disabled.fg` · fill-less ghost button: `disabled.fgGhost` |
46
46
  | Status | `danger` · `success` · `warning` · `info` → `.bg` `.border` `.fg` `.solid` `.onSolid` |
47
47
  | Decorative category (tiles, avatars, tags, charts) | `category.{hue}.surface` / `.fg` |
48
+ | Single-measure chart, usage bar, map, heatmap fill | `data.1`–`data.4` (4 = largest) |
49
+ | Chart fill above / below a real baseline (vs plan, vs average) | `diverging.pos.1–3` / `diverging.neg.1–3`, `diverging.mid` at the baseline |
48
50
 
49
51
  Emphasis is weight, not colour: headings use `fg.default`, never `primary.*`.
50
52
  Status colours mean status — don't borrow `success`/`warning` for decoration;
@@ -57,25 +59,82 @@ Use it for both, and for nothing decorative.
57
59
 
58
60
  - **Links** — `fg.link` / `fg.linkHover` (blue ink, #48607A / #AFC7E1), in chat
59
61
  messages, markdown and app copy alike. Never ink-black or coral for a link.
60
- - **Data visualisation** — usage/share bars, single-measure bar and line charts,
61
- maps, heatmaps, progress-by-share: a **blue monochrome ramp**, never a
62
- rainbow and never a grey ramp. Steps differ in lightness only (the saturated
63
- `blue.base` is left out); the largest value gets the strongest step.
64
-
65
- | Step | Light | Dark |
62
+ - **Data visualisation** — usage/share bars, single-measure bar charts, maps,
63
+ heatmaps, progress-by-share: the `data.*` ramp, a **blue monochrome ramp**,
64
+ never a rainbow and never a grey ramp. Steps differ in lightness only (the
65
+ saturated `blue.base` is left out). **The higher number is the larger value**:
66
+ `data.4` is the strongest step in both modes (dark mode flips the lightness,
67
+ so `data.4` is the lightest blue there).
68
+ - **Lines** — a single-measure line chart, and series 1 of a multi-series one,
69
+ stroke in `blue.base` (`#4674A4` / `#6892BD`, ≥ 4.5:1). A 2px line is not a
70
+ filled area: the ramp's darkest step `blue.ink` reads as slate grey at that
71
+ width, so lines take the saturated blue the ramp leaves out.
72
+
73
+ | Token | Light | Dark |
66
74
  | --- | --- | --- |
67
- | 1 (largest) | `#48607A` (`blue.ink`) · white label | `#AFC7E1` (`blue.inkDark`) · ink label |
68
- | 2 | `#7492B3` · ink label | `#7492B3` · ink label |
69
- | 3 | `#AFC7E1` · ink label | `#48607A` · white label |
70
- | 4 | `#DFEBF9` (`blue.surface`) · ink label | `#232F3D` (`blue.surfaceDark`) · white label |
71
-
72
- Pick each label by measured contrast (≥ 4.5:1), not by step number.
73
- A chart that must tell several *categories* apart (multi-series lines) keeps
74
- `CHART_SERIES_HUES` in `LineGraph/seriesColors.ts`, which leaves blue out so
75
- no series reads as a link or an info state.
75
+ | `data.4` (largest) | `#48607A` (`blue.ink`) · white label | `#AFC7E1` (`blue.inkDark`) · ink label |
76
+ | `data.3` | `#7492B3` (`dataviz.blueMid`) · ink label | `#7492B3` · ink label |
77
+ | `data.2` | `#AFC7E1` (`blue.inkDark`) · ink label | `#48607A` (`blue.ink`) · white label |
78
+ | `data.1` (smallest) | `#DFEBF9` (`blue.surface`) · ink label | `#232F3D` (`blue.surfaceDark`) · white label |
79
+
80
+ Pick each label by measured contrast (≥ 4.5:1), not by step number. Ink is
81
+ `#252525`, white is `#FFFFFF`, in either mode; `contrast.test.ts` re-measures
82
+ every label in this section, including the diverging table below.
83
+
84
+ A chart that must tell several *categories* apart (multi-series lines) starts
85
+ with the same data blue (`blue.base`) and then cycles `CHART_SERIES_HUES` in
86
+ `LineGraph/seriesColors.ts` (teal, pink, indigo, purple, brown, …), which
87
+ leaves red, yellow and green out so no series reads as a status.
76
88
  `info` is also blue; status always comes with an icon and words, so a blue
77
89
  chart is never mistaken for an info notice.
78
90
 
91
+ ### Diverging: above and below a baseline
92
+
93
+ When the value has a **real zero or baseline** and both directions mean
94
+ something — actual vs plan, this month vs the average, change since last
95
+ week — use the `diverging.*` ramp. A one-sided value (a count, a share, a
96
+ usage total) keeps `data.*`, even if some bars are small.
97
+
98
+ - **Blue is above the baseline, orange is below** (`diverging.pos.*` /
99
+ `diverging.neg.*`). `3` is the largest distance from the baseline on either
100
+ side, and the two sides share their lightness per step, so the same
101
+ distance looks the same size in both directions.
102
+ - **The baseline itself is `diverging.mid`** (neutral step 3, so it follows
103
+ the neutral scheme). Never white or `bg.canvas`: a "no change" cell must
104
+ still read as a cell.
105
+ - **Never red and green for direction.** Above/below is not good/bad. When a
106
+ direction is good or bad, that is a status: say it with an icon and words,
107
+ as everywhere else.
108
+ - **Orange is for fills only** — bars, cells, areas. Never orange text or
109
+ icons; labels and axis text stay `fg.*`. Lines keep the stroke rules
110
+ above.
111
+ - **The legend names the direction in words** ("above plan" / "below plan"),
112
+ not only with the two colours.
113
+
114
+ | Token | Light | Dark |
115
+ | --- | --- | --- |
116
+ | `diverging.pos.3` (far above) | `#2C5D91` · white label | `#A9C7EB` · ink label |
117
+ | `diverging.pos.2` | `#5890CD` · ink label | `#5890CD` · ink label |
118
+ | `diverging.pos.1` (just above) | `#A9C7EB` · ink label | `#2C5D91` · white label |
119
+ | `diverging.mid` (at the baseline) | `#EDE9E2` (`neutral.3`) · ink label | `#2E2F2F` (`neutral.3`) · white label |
120
+ | `diverging.neg.1` (just below) | `#E4BBA0` · ink label | `#85491A` · white label |
121
+ | `diverging.neg.2` | `#BF7946` · **no in-cell label**; label outside the mark | `#BF7946` · **no in-cell label**; label outside the mark |
122
+ | `diverging.neg.3` (far below) | `#85491A` · white label | `#E4BBA0` · ink label |
123
+
124
+ `diverging.neg.2` clears neither label (ink 4.41:1, white 3.48:1), so values
125
+ for that step go beside or above the bar, not inside it. The `diverging.mid`
126
+ values shown are the `ink` scheme; with `neutral: 'slate'` it is slate step 3.
127
+
128
+ The diverging ramp is a dedicated data-viz ramp (OKLCH chroma ≈ 0.10–0.11 at
129
+ steps 2–3, 0.06 at step 1, the same on both sides): paired with the dusty
130
+ `data.*` blue (≈ 0.05), any warm hue reads as brown. Blue ↔ orange
131
+ also keeps the widest colour-blind separation of the pairs considered; gold
132
+ reads as a warning and purple collapses into blue for deuteranopes.
133
+
134
+ `data.*` and `diverging.*` are fills: under high contrast they keep their
135
+ value (like `bg.track`), and in-cell labels are audited at 4.5:1 in light and
136
+ dark.
137
+
79
138
  ## Modes
80
139
 
81
140
  Every role flips with the colour mode (`_light` / `_dark`) and has a
@@ -143,16 +143,24 @@ is the maintainer's view.
143
143
 
144
144
  ### Layers and files
145
145
 
146
- | Layer | Where | Rule |
147
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
148
- | Raw scales `ink`/`inkDark`, `sand`/`sandDark`, `slate`/`slateDark` (1–12), `coral`, 12 system hues `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}` | `palette.generated.ts` → `colors` in `colors.ts` | Components and recipes **never** read them |
149
- | Semantic steps `neutral.1–12`, `secondary.1–12` | `createSemanticColors()` | Filled by the theme option (`neutral: 'ink' \| 'slate'`, `secondary: 'sand'`) |
150
- | Roles (`bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*`) | `ROLE_TOKEN_PATHS` + `createSemanticColors()` | The only colours a component reads |
146
+ | Layer | Where | Rule |
147
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
148
+ | Raw scales `ink`/`inkDark`, `sand`/`sandDark`, `slate`/`slateDark` (1–12), `coral`, 12 system hues `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`, `dataviz` | `palette.generated.ts` → `colors` in `colors.ts` | Components and recipes **never** read them |
149
+ | Semantic steps `neutral.1–12`, `secondary.1–12` | `createSemanticColors()` | Filled by the theme option (`neutral: 'ink' \| 'slate'`, `secondary: 'sand'`) |
150
+ | Roles (`bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`, `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`, status, `tooltip.*`, `category.*`, `data.*`, `diverging.*`) | `ROLE_TOKEN_PATHS` + `createSemanticColors()` | The only colours a component reads |
151
151
 
152
152
  - **Values come from the generator.** `scripts/palette/generate.mjs` ports the
153
153
  designer prototype (OKLCH, contrast-targeted steps) and `--check`s it against
154
154
  `scripts/palette/reference.json`. Change a value there, regenerate, commit
155
155
  `palette.generated.ts`. Never hand-edit the generated file.
156
+ - **Dark mode is a neutral charcoal**, not the prototype's warm dark ramp
157
+ (re-tuned 2026-10-27; light is still the prototype). `inkDark` steps 1–7
158
+ hold chroma ≤ 0.003 and only the text steps keep a trace of warmth
159
+ (≤ 0.008); the canvas is `#171717`; body text is its own anchor
160
+ (`fgDark`, ≈ 14:1; HC dark `fgHcDark`, ≈ 16:1), not cream; dark
161
+ `action.fg` uses the same anchor. HC dark `fg.muted` is the OKLCH midpoint
162
+ of `fg.subtle` and `fg.default`, so the three text levels stay distinct. A warm tint that is invisible in light
163
+ reads as sepia on a dark ground — keep new dark values near-neutral.
156
164
  - **High contrast** (`prefers-contrast: more`): a role whose HC value differs
157
165
  reads an internal helper `scheme.light.*` / `scheme.dark.*` (`{ base,
158
166
  _moreContrast }`) because Chakra cannot nest `_dark` inside `_moreContrast`
@@ -166,8 +174,9 @@ _moreContrast }`) because Chakra cannot nest `_dark` inside `_moreContrast`
166
174
  ### Adding or changing a token
167
175
 
168
176
  1. Add it to the generator (`buildScheme`) and to `PATHS` in `colors.ts`.
169
- 2. Register its contrast pair(s) in `contrast.test.ts` (`PAIRS`, `SEP`), or a
170
- reason in `NO_PAIR`. The registry test fails until you do; the audit runs
177
+ 2. Register its contrast pair(s) in `contrast.test.ts` (`PAIRS`, `SEP`; a
178
+ data-viz fill goes in `DATA_VIZ_LABELS` (`paletteSwatches.ts`) with its in-cell label), or a reason in
179
+ `NO_PAIR`. The registry test fails until you do; the audit runs
171
180
  light / dark / hcLight / hcDark for every neutral scheme.
172
181
  3. Add it to `SemanticColorToken` and to SemanticTokens.mdx.
173
182
 
@@ -250,8 +259,13 @@ follow the scheme and high contrast. Base font size is 14px.
250
259
  badges/tags, the modal header band), never rows or panels.
251
260
  5. Disabled = `disabled.*`, not opacity. Focus = `focusRing`.
252
261
  6. Blue means data and links: links are `fg.link`; data visualisation
253
- (usage bars, single-measure charts, maps) is a blue monochrome ramp, never a
254
- rainbow or grey ramp. Values: SemanticTokens.mdx → "Blue means data and links".
262
+ (usage bars, single-measure bar charts, maps) fills with `data.1–4` (4 =
263
+ largest), never a rainbow or grey ramp; line strokes (single-measure, and
264
+ series 1) use `blue.base`. Values against a real baseline (vs plan, vs
265
+ average) fill with `diverging.pos.1–3` (above, blue) / `diverging.neg.1–3`
266
+ (below, orange) and `diverging.mid` at the baseline — never red/green for
267
+ direction, never orange text or icons. Values and labels:
268
+ SemanticTokens.mdx → "Blue means data and links".
255
269
 
256
270
  ## Extending the Theme
257
271
 
@@ -7,7 +7,8 @@
7
7
  * black), `sand.1–12` / `sandDark.1–12` (beige-brown), `slate.1–12` /
8
8
  * `slateDark.1–12` (today's cool gray rebuilt on the same contrast targets),
9
9
  * `coral.*`, and the 12 system hues (`red` … `brown`, each
10
- * `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`).
10
+ * `{base, baseDark, hc, hcDark, surface, ink, surfaceDark, inkDark}`), and
11
+ * `dataviz.*` (the data-visualisation values no hue step covers).
11
12
  * The step number is the job (Radix-style): 1–3 backgrounds, 4–6 dividers
12
13
  * and borders, 7 control border (3:1), 8 icon/placeholder (4.5:1), 9–11
13
14
  * text, 12 maximum contrast.
@@ -16,7 +17,10 @@
16
17
  * them (default `ink` / `sand`).
17
18
  * 3. **Semantic roles** — `bg.*`, `layer.*`, `fg.*`, `border.*`, `primary.*`,
18
19
  * `secondary.*`, `action.*`, `send.*`, `count.*`, `disabled.*`, `focus.ring`,
19
- * the four status families, `tooltip.*`, `category.{hue}.*`.
20
+ * the four status families, `tooltip.*`, `category.{hue}.*` (plus the
21
+ * nameless `category.neutral.*`), the `bg.logo` / `fg.onLogo` tile, and the
22
+ * data-visualisation fills `data.1–4` and `diverging.{pos,neg}.1–3` /
23
+ * `diverging.mid`.
20
24
  *
21
25
  * Every value comes from `palette.generated.ts` (see
22
26
  * `scripts/palette/generate.mjs`), which ports the designer-reviewed prototype
@@ -36,7 +40,13 @@
36
40
  * `no-deprecated-tokens` lint rule. They are removed in 6.0.
37
41
  */
38
42
  import DEPRECATED from './deprecatedColorTokens.json';
39
- import { CORAL, RAMPS, SCHEMES, SYSTEM_HUES } from './palette.generated';
43
+ import {
44
+ CORAL,
45
+ DATAVIZ,
46
+ RAMPS,
47
+ SCHEMES,
48
+ SYSTEM_HUES,
49
+ } from './palette.generated';
40
50
 
41
51
  /** Raw scale that fills `neutral.1–12` and every neutral role. */
42
52
  export type NeutralScale = 'ink' | 'slate';
@@ -86,17 +96,25 @@ function rampTokens(
86
96
  return out;
87
97
  }
88
98
 
99
+ /** Brand anchor (generator name) → raw token: `{name}.key` or `{name}Dark.key`. */
100
+ const ANCHOR_TOKENS = [
101
+ ['cream', 'light', 'cream'],
102
+ ['press', 'light', 'press'],
103
+ ['fgDark', 'dark', 'fg'],
104
+ ['primaryDark', 'dark', 'primary'],
105
+ ['primaryHoverDark', 'dark', 'primaryHover'],
106
+ ['pressDark', 'dark', 'press'],
107
+ ] as const;
108
+
89
109
  function scaleTokens(name: 'ink' | 'sand' | 'slate') {
90
110
  const r = RAMPS[name];
91
- const a = r.anchors as Partial<
92
- Record<'cream' | 'press' | 'primaryDark' | 'pressDark', string>
93
- >;
111
+ const a = r.anchors as Record<string, string | undefined>;
94
112
  const light: Record<string, string> = {};
95
113
  const dark: Record<string, string> = { canvas: r.canvasDark };
96
- if (a.cream) light.cream = a.cream;
97
- if (a.press) light.press = a.press;
98
- if (a.primaryDark) dark.primary = a.primaryDark;
99
- if (a.pressDark) dark.press = a.pressDark;
114
+ for (const [anchor, mode, key] of ANCHOR_TOKENS) {
115
+ const hex = a[anchor];
116
+ if (hex) (mode === 'light' ? light : dark)[key] = hex;
117
+ }
100
118
  return {
101
119
  [name]: rampTokens(r.light, light),
102
120
  [`${name}Dark`]: rampTokens(r.dark, dark),
@@ -122,6 +140,9 @@ export const colors = {
122
140
  ),
123
141
  ])
124
142
  ),
143
+ dataviz: Object.fromEntries(
144
+ Object.entries(DATAVIZ).map(([k, val]) => [k, v(val)])
145
+ ),
125
146
  white: v('#FFFFFF'),
126
147
  } as Record<string, Record<string, TokenValue> | TokenValue>;
127
148
 
@@ -189,6 +210,7 @@ const PATHS: Record<FlatKey, string> = {
189
210
  'count-fg': 'count.fg',
190
211
  'disabled-bg': 'disabled.bg',
191
212
  'disabled-fg': 'disabled.fg',
213
+ 'disabled-fgGhost': 'disabled.fgGhost',
192
214
  focus: 'focus.ring',
193
215
  'danger-bg': 'danger.bg',
194
216
  'danger-border': 'danger.border',
@@ -214,6 +236,20 @@ const PATHS: Record<FlatKey, string> = {
214
236
  'info-onSolid': 'info.onSolid',
215
237
  'tooltip-bg': 'tooltip.bg',
216
238
  'tooltip-fg': 'tooltip.fg',
239
+ // Data visualisation (fills only). Higher number = larger value, in both
240
+ // modes; the dark values flip lightness so the strongest step stays the
241
+ // most prominent on a dark canvas.
242
+ 'data-1': 'data.1',
243
+ 'data-2': 'data.2',
244
+ 'data-3': 'data.3',
245
+ 'data-4': 'data.4',
246
+ 'diverging-pos-1': 'diverging.pos.1',
247
+ 'diverging-pos-2': 'diverging.pos.2',
248
+ 'diverging-pos-3': 'diverging.pos.3',
249
+ 'diverging-neg-1': 'diverging.neg.1',
250
+ 'diverging-neg-2': 'diverging.neg.2',
251
+ 'diverging-neg-3': 'diverging.neg.3',
252
+ 'diverging-mid': 'diverging.mid',
217
253
  };
218
254
 
219
255
  /** Exposed for tests and docs: every role token generated from the scheme table. */
@@ -237,10 +273,9 @@ function buildRefIndex(neutral: NeutralScale, secondary: SecondaryScale) {
237
273
  for (const s of STEPS) add(RAMPS[name].dark[s], `${name}Dark.${s}`);
238
274
  add(RAMPS[name].canvasDark, `${name}Dark.canvas`);
239
275
  const a = RAMPS[name].anchors as Record<string, string>;
240
- if (a.cream) add(a.cream, `${name}.cream`);
241
- if (a.press) add(a.press, `${name}.press`);
242
- if (a.primaryDark) add(a.primaryDark, `${name}Dark.primary`);
243
- if (a.pressDark) add(a.pressDark, `${name}Dark.press`);
276
+ for (const [anchor, mode, key] of ANCHOR_TOKENS)
277
+ if (a[anchor])
278
+ add(a[anchor], `${name}${mode === 'dark' ? 'Dark' : ''}.${key}`);
244
279
  };
245
280
  addScale(neutral);
246
281
  addScale(secondary);
@@ -249,6 +284,7 @@ function buildRefIndex(neutral: NeutralScale, secondary: SecondaryScale) {
249
284
  for (const hue of SYSTEM_HUE_NAMES)
250
285
  for (const [k, hex] of Object.entries(SYSTEM_HUES[hue]))
251
286
  add(hex, `${hue}.${k}`);
287
+ for (const [k, hex] of Object.entries(DATAVIZ)) add(hex, `dataviz.${k}`);
252
288
  // The brand black/cream anchors exist only on ink; reachable from any scheme.
253
289
  if (neutral !== 'ink') addScale('ink');
254
290
  return (hex: string) => index.get(hex.toUpperCase()) ?? hex;
@@ -328,6 +364,11 @@ export function createSemanticColors({
328
364
  'fg.emphasized': 'fg.default',
329
365
  'bg.invalid.subtle': 'danger.bg',
330
366
  'bg.highlighted': 'warning.bg',
367
+ // The no-identity pair, shaped like a category pair so a `colorPalette`
368
+ // can point at it (`colorPalette="category.neutral"`, the avatar recipe's
369
+ // default). Not a 13th hue — `hueForName` never returns it.
370
+ 'category.neutral.surface': 'bg.muted',
371
+ 'category.neutral.fg': 'secondary.fgStrong',
331
372
  // Every other name Chakra's own recipes read (menu/combobox `_highlighted`
332
373
  // is `bg.emphasized/60`, radiomark borders are `border.emphasized`, the
333
374
  // field recipe reads `fg.error` …). 4.x got these for free because its
@@ -377,6 +418,15 @@ export function createSemanticColors({
377
418
  } as never);
378
419
  }
379
420
 
421
+ // Logo tile: model, chatbot and brand marks are drawn for a light ground,
422
+ // so the tile stays light in both modes (white, then the warm cream anchor
423
+ // in dark so it does not glare on the dark canvas), and the text on it stays
424
+ // dark in both modes. Avatar `variant="logo"` reads the pair.
425
+ setPath(tree, 'bg.logo', {
426
+ value: { _light: '{colors.white}', _dark: '{colors.ink.cream}' },
427
+ } as never);
428
+ setPath(tree, 'fg.onLogo', { value: `{colors.${neutral}.11}` });
429
+
380
430
  // Deprecated 4.x names → 5.0 replacement (removed in 6.0).
381
431
  for (const [oldName, newName] of Object.entries(DEPRECATED.aliases))
382
432
  setPath(tree, oldName, { value: `{colors.${newName}}` });
@@ -404,23 +454,26 @@ type StatusFamily = 'danger' | 'success' | 'warning' | 'info';
404
454
  export type SemanticColorToken =
405
455
  | `neutral.${Step}`
406
456
  | `secondary.${Step}`
407
- | `bg.${'canvas' | 'surface' | 'raised' | 'subtle' | 'muted' | 'sunken' | 'track' | 'inverse' | 'panel' | 'highlighted'}`
457
+ | `bg.${'canvas' | 'surface' | 'raised' | 'subtle' | 'muted' | 'sunken' | 'track' | 'inverse' | 'panel' | 'highlighted' | 'logo'}`
408
458
  | 'bg.invalid.subtle'
409
459
  | `layer.${1 | 2 | 3}`
410
460
  | `layer.${1 | 2 | 3}.${'hover' | 'active'}`
411
- | `fg.${'default' | 'emphasized' | 'muted' | 'subtle' | 'icon' | 'placeholder' | 'onPrimary' | 'link' | 'linkHover' | 'inverse'}`
461
+ | `fg.${'default' | 'emphasized' | 'muted' | 'subtle' | 'icon' | 'placeholder' | 'onPrimary' | 'onLogo' | 'link' | 'linkHover' | 'inverse'}`
412
462
  | `border.${'subtle' | 'default' | 'strong' | 'control'}`
413
463
  | `primary.${'main' | 'hover' | 'active' | 'wash' | 'washActive' | 'selected'}`
414
464
  | `secondary.${'surface' | 'surfaceStrong' | 'border' | 'fg' | 'fgStrong'}`
415
465
  | `action.${'mark' | 'iconOnSolid' | 'bg' | 'bgHover' | 'bgActive' | 'fg' | 'border'}`
416
466
  | `send.${'bg' | 'bgHover' | 'bgActive' | 'fg'}`
417
467
  | `count.${'bg' | 'fg'}`
418
- | `disabled.${'bg' | 'fg'}`
468
+ | `disabled.${'bg' | 'fg' | 'fgGhost'}`
419
469
  | 'focus.ring'
420
470
  | `${StatusFamily}.${'bg' | 'border' | 'fg' | 'solid' | 'onSolid'}`
421
471
  | `danger.${'solidHover' | 'solidActive'}`
422
472
  | `tooltip.${'bg' | 'fg'}`
423
- | `category.${Hue}.${'surface' | 'fg'}`
473
+ | `category.${Hue | 'neutral'}.${'surface' | 'fg'}`
474
+ | `data.${1 | 2 | 3 | 4}`
475
+ | `diverging.${'pos' | 'neg'}.${1 | 2 | 3}`
476
+ | 'diverging.mid'
424
477
  | DeprecatedSemanticColorToken;
425
478
 
426
479
  /**
@@ -10,6 +10,7 @@ import {
10
10
  } from './colors';
11
11
  import { system } from './index';
12
12
  import { SCHEMES } from './palette.generated';
13
+ import { DATA_VIZ_LABEL_TOKEN, DATA_VIZ_LABELS } from './paletteSwatches';
13
14
 
14
15
  /**
15
16
  * Contrast audit for the BAZE semantic tokens — the same check as section 3-1
@@ -129,6 +130,8 @@ const NO_PAIR: Record<string, string> = {
129
130
  'disabled controls are exempt from WCAG contrast (1.4.3 / 1.4.11)',
130
131
  'disabled-fg':
131
132
  'disabled controls are exempt from WCAG contrast (1.4.3 / 1.4.11)',
133
+ 'disabled-fgGhost':
134
+ 'disabled controls are exempt from WCAG contrast (1.4.3 / 1.4.11)',
132
135
  'danger-border':
133
136
  'decorative edge of a status surface; the fg/icon carries the status',
134
137
  'success-border': 'decorative edge of a status surface',
@@ -137,6 +140,12 @@ const NO_PAIR: Record<string, string> = {
137
140
  track: 'unfilled track; the filled part (primary-main) carries the value',
138
141
  };
139
142
 
143
+ // Data-viz fills (`data.*`, `diverging.*`) are registered through
144
+ // DATA_VIZ_LABELS (paletteSwatches.ts): each fill with the in-cell label it may
145
+ // carry. Audited at 4.5:1 in light and dark, like the category pairs: the fills
146
+ // keep their value under high contrast (they are fills, like `track`), so an
147
+ // in-cell label is not held to the 7:1 high-contrast text target.
148
+
140
149
  // ───────────────────────────── resolver ─────────────────────────────
141
150
 
142
151
  const lum = (h: string) => {
@@ -253,6 +262,52 @@ describe.each(SCHEME_NAMES)('contrast — %s scheme', (neutral) => {
253
262
  expect(failures).toEqual([]);
254
263
  });
255
264
 
265
+ it('the nameless avatar pair (category.neutral) reads as text (≥ 4.5:1, all modes)', () => {
266
+ const failures = MODES.flatMap((mode) => {
267
+ const c = ratio(
268
+ resolve('category.neutral.fg', mode),
269
+ resolve('category.neutral.surface', mode)
270
+ );
271
+ return c >= 4.5 ? [] : [`${mode}: ${c.toFixed(2)}`];
272
+ });
273
+ expect(failures).toEqual([]);
274
+ });
275
+
276
+ it('logo tile stays light in both modes and its text reads (≥ 4.5:1)', () => {
277
+ const failures = MODES.flatMap((mode) => {
278
+ const tile = resolve('bg.logo', mode);
279
+ const c = ratio(resolve('fg.onLogo', mode), tile);
280
+ const out = c >= 4.5 ? [] : [`fg.onLogo ${mode}: ${c.toFixed(2)}`];
281
+ // "Light": a logo drawn for white must keep a light ground in dark mode.
282
+ return lum(tile) > 0.7 ? out : [...out, `bg.logo ${mode} is not light`];
283
+ });
284
+ expect(failures).toEqual([]);
285
+ });
286
+
287
+ it('data-viz fills: each in-cell label clears 4.5:1, and "no label" means neither does (light and dark)', () => {
288
+ const failures = Object.entries(DATA_VIZ_LABELS).flatMap(([fill, labels]) =>
289
+ (['light', 'dark'] as const).flatMap((mode) => {
290
+ const bg = flat(fill, mode);
291
+ const label = labels[mode];
292
+ if (label) {
293
+ const c = ratio(resolve(DATA_VIZ_LABEL_TOKEN[label], mode), bg);
294
+ return c >= 4.5
295
+ ? []
296
+ : [`${label} on ${fill} ${mode}: ${c.toFixed(2)}`];
297
+ }
298
+ const best = Math.max(
299
+ ...Object.values(DATA_VIZ_LABEL_TOKEN).map((t) =>
300
+ ratio(resolve(t, mode), bg)
301
+ )
302
+ );
303
+ return best < 4.5
304
+ ? []
305
+ : [`${fill} ${mode} has no label but one clears ${best.toFixed(2)}`];
306
+ })
307
+ );
308
+ expect(failures).toEqual([]);
309
+ });
310
+
256
311
  it('every deprecated 4.x name resolves to its replacement in all modes', () => {
257
312
  for (const [oldName, newName] of Object.entries(DEPRECATED_COLOR_TOKENS))
258
313
  for (const mode of MODES)
@@ -267,6 +322,7 @@ describe('contrast registry', () => {
267
322
  ...PAIRS.flatMap(([a, b]) => [a, b]),
268
323
  ...SEP.flatMap(([a, b]) => [a, b]),
269
324
  ...Object.keys(NO_PAIR),
325
+ ...Object.keys(DATA_VIZ_LABELS),
270
326
  ]);
271
327
 
272
328
  it('every role token has a contrast pair or a NO_PAIR reason', () => {
@@ -291,6 +347,7 @@ describe('contrast registry', () => {
291
347
  /^secondary\.\d+$/,
292
348
  /^scheme\.(light|dark)\.\w+$/, // internal high-contrast helpers
293
349
  /^category\.\w+\.(surface|fg)$/, // audited by the category test
350
+ /^(bg\.logo|fg\.onLogo)$/, // audited by the logo tile test
294
351
  // kept 4.x names / Chakra globals that reuse a role value verbatim
295
352
  /^(bg|fg|border)$/,
296
353
  /^bg\.(panel|raised|inverse|sunken|highlighted|invalid\.subtle)$/,
@@ -35,10 +35,29 @@ export const globalCss = defineGlobalStyles({
35
35
  },
36
36
 
37
37
  'html, body': {
38
- // Mode-aware primary text (neutral.11 light / cream dark).
38
+ // Mode-aware primary text (neutral.11 light / off-white dark).
39
39
  color: 'fg.default',
40
40
  },
41
41
 
42
+ // Korean breaks between 어절, not mid-word — but only Korean. Japanese and
43
+ // Chinese have no spaces, so `keep-all` turns a whole sentence into one
44
+ // unbreakable run that overflows its box. Set once on <html> by language
45
+ // and let it inherit (`word-break` is inherited), so a component that asks
46
+ // for `break-all` (emails, keys, file names) still gets it. The Typography
47
+ // components used to hard-code `keep-all` on themselves, which left every
48
+ // ja screen to undo it one call site at a time.
49
+ 'html:lang(ko)': {
50
+ wordBreak: 'keep-all',
51
+ },
52
+ // Japanese wraps at phrase boundaries (文節) where the browser can find them
53
+ // (Chromium 119+, ja only). Elsewhere the rule is skipped and ja keeps the
54
+ // default `normal`, which breaks between characters — never `keep-all`.
55
+ 'html:lang(ja)': {
56
+ '@supports (word-break: auto-phrase)': {
57
+ wordBreak: 'auto-phrase',
58
+ },
59
+ },
60
+
42
61
  '#__next': {
43
62
  height: 'var(--chakra-vh)',
44
63
  },
@@ -15,6 +15,7 @@ import {
15
15
  import { globalCss } from './global';
16
16
  import { animationStyles, durations, easings, keyframes } from './motion';
17
17
  import { accordionSlotRecipe } from './recipes/accordion';
18
+ import { avatarSlotRecipe } from './recipes/avatar';
18
19
  import { tableSlotRecipe } from './recipes/table';
19
20
 
20
21
  /**
@@ -403,6 +404,7 @@ export function createLogicianTheme(options: LogicianThemeOptions = {}) {
403
404
  },
404
405
  slotRecipes: {
405
406
  accordion: accordionSlotRecipe,
407
+ avatar: avatarSlotRecipe,
406
408
  table: tableSlotRecipe,
407
409
  select: selectSlotRecipe,
408
410
  },