@mindlogic-ai/logician-ui 5.0.0-alpha.3 → 5.0.0-alpha.5

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 (242) hide show
  1. package/dist/components/Banner/Banner.types.d.ts +24 -1
  2. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  3. package/dist/components/Card/Card.types.d.ts +12 -0
  4. package/dist/components/Card/Card.types.d.ts.map +1 -1
  5. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  6. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  7. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  8. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  9. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  10. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  11. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  12. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  13. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  14. package/dist/components/Confetti/confettiColors.js +5 -5
  15. package/dist/components/Confetti/confettiColors.mjs +5 -5
  16. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  17. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  18. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +4 -1
  19. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  20. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  21. package/dist/components/LineGraph/LineGraph.js +4 -5
  22. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  23. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  24. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  25. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  26. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  27. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  28. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  29. package/dist/components/LineGraph/seriesColors.js +8 -7
  30. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  31. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  32. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  33. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  34. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  35. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  36. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  37. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  38. package/dist/components/Modal/ModalCloseButton.js +1 -1
  39. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  40. package/dist/components/Pagination/Pagination.d.ts +11 -10
  41. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  42. package/dist/components/Pagination/Pagination.js +11 -10
  43. package/dist/components/Pagination/Pagination.js.map +1 -1
  44. package/dist/components/Pagination/Pagination.mjs +11 -10
  45. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  46. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  47. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  48. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  49. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  50. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  51. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  52. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  53. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  54. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  55. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  56. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  57. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  58. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  59. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  60. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  61. package/dist/components/Toast/Toast.styles.js +18 -10
  62. package/dist/components/Toast/Toast.styles.js.map +1 -1
  63. package/dist/components/Toast/Toast.styles.mjs +18 -10
  64. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  65. package/dist/theme/colors.d.ts +2 -2
  66. package/dist/theme/colors.d.ts.map +1 -1
  67. package/dist/theme/colors.js +22 -2
  68. package/dist/theme/colors.js.map +1 -1
  69. package/dist/theme/colors.mjs +23 -3
  70. package/dist/theme/colors.mjs.map +1 -1
  71. package/dist/theme/palette.generated.d.ts +98 -0
  72. package/dist/theme/palette.generated.d.ts.map +1 -1
  73. package/dist/theme/palette.generated.js +99 -0
  74. package/dist/theme/palette.generated.js.map +1 -1
  75. package/dist/theme/palette.generated.mjs +99 -1
  76. package/dist/theme/palette.generated.mjs.map +1 -1
  77. package/dist/theme/paletteSwatches.d.ts +20 -0
  78. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  81. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  82. package/src/components/Appear/Appear.usage.mdx +107 -0
  83. package/src/components/Avatar/Avatar.stories.tsx +71 -1
  84. package/src/components/Avatar/Avatar.usage.mdx +166 -0
  85. package/src/components/Banner/Banner.stories.tsx +152 -2
  86. package/src/components/Banner/Banner.types.ts +30 -1
  87. package/src/components/Banner/Banner.usage.mdx +233 -0
  88. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  89. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  90. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  91. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  92. package/src/components/Button/Button.stories.tsx +263 -3
  93. package/src/components/Button/Button.usage.mdx +342 -0
  94. package/src/components/Card/Card.stories.tsx +106 -0
  95. package/src/components/Card/Card.types.ts +12 -0
  96. package/src/components/Card/Card.usage.mdx +216 -0
  97. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  98. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  99. package/src/components/Chip/Chip.usage.mdx +78 -0
  100. package/src/components/Code/Code.stories.tsx +60 -0
  101. package/src/components/Code/Code.usage.mdx +187 -0
  102. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  103. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  104. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  105. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  106. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  107. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  108. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  109. package/src/components/Confetti/Confetti.types.ts +5 -1
  110. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  111. package/src/components/Confetti/confettiColors.ts +5 -5
  112. package/src/components/Container/Container.stories.tsx +32 -0
  113. package/src/components/Container/Container.usage.mdx +130 -0
  114. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  115. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  116. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  117. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  118. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  119. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  120. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  121. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  122. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  123. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  124. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  125. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  126. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  127. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  128. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  129. package/src/components/FileList/FileList.stories.tsx +25 -0
  130. package/src/components/FileList/FileList.usage.mdx +165 -0
  131. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  132. package/src/components/Form/Form.stories.tsx +149 -0
  133. package/src/components/Form/Form.usage.mdx +201 -0
  134. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +4 -1
  135. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  136. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  137. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  138. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  139. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  140. package/src/components/Icon/Icon.stories.tsx +61 -1
  141. package/src/components/Icon/Icon.usage.mdx +158 -0
  142. package/src/components/IconButton/IconButton.stories.tsx +209 -5
  143. package/src/components/IconButton/IconButton.usage.mdx +273 -0
  144. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  145. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  146. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  147. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  148. package/src/components/Input/Input.stories.tsx +180 -0
  149. package/src/components/Input/Input.usage.mdx +278 -0
  150. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  151. package/src/components/LineGraph/LineGraph.tsx +4 -5
  152. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  153. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  154. package/src/components/LineGraph/seriesColors.test.ts +11 -10
  155. package/src/components/LineGraph/seriesColors.ts +18 -16
  156. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  157. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  158. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  159. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  160. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  161. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  162. package/src/components/Masonry/Masonry.types.ts +8 -3
  163. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  164. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  165. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  166. package/src/components/Menu/Menu.stories.tsx +146 -2
  167. package/src/components/Menu/Menu.usage.mdx +230 -0
  168. package/src/components/Menu/MenuItem.types.ts +8 -0
  169. package/src/components/Modal/Modal.stories.tsx +177 -1
  170. package/src/components/Modal/Modal.usage.mdx +262 -0
  171. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  172. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  173. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  174. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  175. package/src/components/Pagination/Pagination.tsx +11 -10
  176. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  177. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  178. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  179. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  180. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  181. package/src/components/Popover/Popover.stories.tsx +104 -1
  182. package/src/components/Popover/Popover.usage.mdx +197 -0
  183. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  184. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  185. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  186. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  187. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  188. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  189. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  190. package/src/components/Radio/Radio.stories.tsx +119 -0
  191. package/src/components/Radio/Radio.usage.mdx +187 -0
  192. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  193. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  194. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  195. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  196. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  197. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  198. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  199. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  200. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  201. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  202. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  203. package/src/components/Select/Select.stories.tsx +209 -1
  204. package/src/components/Select/Select.usage.mdx +278 -0
  205. package/src/components/Shake/Shake.usage.mdx +107 -0
  206. package/src/components/Slider/Slider.stories.tsx +116 -0
  207. package/src/components/Slider/Slider.usage.mdx +179 -0
  208. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  209. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  210. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  211. package/src/components/Switch/Switch.stories.tsx +131 -6
  212. package/src/components/Switch/Switch.usage.mdx +199 -0
  213. package/src/components/Table/Table.stories.tsx +159 -1
  214. package/src/components/Table/Table.usage.mdx +235 -0
  215. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  216. package/src/components/Tabs/Tabs.usage.mdx +219 -0
  217. package/src/components/Tag/Tag.stories.tsx +181 -4
  218. package/src/components/Tag/Tag.usage.mdx +257 -0
  219. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  220. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  221. package/src/components/Toast/Toast.stories.tsx +185 -3
  222. package/src/components/Toast/Toast.styles.ts +18 -10
  223. package/src/components/Toast/Toast.usage.mdx +265 -0
  224. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  225. package/src/components/Tooltip/Tooltip.usage.mdx +211 -0
  226. package/src/components/Tree/Tree.stories.tsx +89 -0
  227. package/src/components/Tree/Tree.usage.mdx +207 -0
  228. package/src/components/Typography/Typography.stories.tsx +117 -0
  229. package/src/components/Typography/Typography.usage.mdx +251 -0
  230. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  231. package/src/components/noRawScales.test.ts +5 -1
  232. package/src/foundations/BrandAssets.mdx +637 -0
  233. package/src/foundations/BrandAssets.stories.tsx +680 -0
  234. package/src/foundations/BrandColour.mdx +65 -2
  235. package/src/theme/BazePalette.stories.tsx +111 -1
  236. package/src/theme/Palette.stories.tsx +2 -2
  237. package/src/theme/SemanticTokens.mdx +75 -16
  238. package/src/theme/claude.md +15 -9
  239. package/src/theme/colors.ts +33 -3
  240. package/src/theme/contrast.test.ts +32 -0
  241. package/src/theme/palette.generated.ts +99 -0
  242. package/src/theme/paletteSwatches.ts +35 -0
@@ -39,7 +39,11 @@ token for which surface: **Setup/Theme/Using Semantic Tokens**.
39
39
  - **The twelve system hues are for categories only.** `category.{hue}.*`
40
40
  carries no status meaning.
41
41
  - **Blue means data and links.** `fg.link` for links; a blue monochrome ramp
42
- for single-measure charts (see Using Semantic Tokens).
42
+ (`data.1–4`) for single-measure charts (see Using Semantic Tokens).
43
+ - **Above and below a baseline is blue and orange.** Charts against a real
44
+ baseline (vs plan, vs average) use `diverging.*`: blue above, orange below,
45
+ `diverging.mid` at the baseline. Orange fills only, never red/green for
46
+ direction.
43
47
  - **No gradients.** A brand band is one solid colour.
44
48
 
45
49
  ## Neutrals
@@ -85,6 +89,7 @@ borrowing a hue.
85
89
  | The coral icon on the black run button (`action.iconOnSolid`) | Wide surfaces, light backgrounds, card fills |
86
90
  | The AI-working mark, the logo mark, large type (`action.mark`) | Promotion badges |
87
91
  | The unread count badge (`count.*`, a deeper coral red) | Warning and error text or borders; switches and checkboxes when on; links |
92
+ | The prize amount on an event screen, as display type (`action.mark`) | Event card headers, modal footer bands, small eyebrow text |
88
93
 
89
94
  - **Points, not surfaces.** Nothing coral is larger than a button, badge or
90
95
  icon. Coral and the error red are only a few degrees apart in hue; at light
@@ -94,6 +99,34 @@ borrowing a hue.
94
99
  Super Agent diamond are status and identity marks, so they may appear next to
95
100
  a run signal.
96
101
 
102
+ ## Campaign and event surfaces
103
+
104
+ First decide whether the screen is product or marketing. A page that needs a
105
+ login, or has controls that change the account, is product. In-app event pages,
106
+ their intro modals and promo banners are product. Marketing is everything
107
+ outside the product that people see logged out: baze.co, SNS posts, print.
108
+
109
+ - **In the product, events follow the coral rule above.** No coral fills and
110
+ no text on coral. Emphasis comes from the illustration; a band behind a card
111
+ header or modal footer is `bg.muted` or `layer.*`, never `secondary.surface`
112
+ or coral.
113
+ - **The prize may be coral.** The reward amount as display type in
114
+ `action.mark` (24px and up, or 19px bold) is the screen's one coral moment.
115
+ Everything around it stays neutral.
116
+ - **Small text is never coral.** Eyebrows and labels use `fg.subtle`. Darkening
117
+ coral until small text passes contrast lands right next to the error text red
118
+ (`danger.fg`).
119
+ - **A thin decorative line counts as a point.** A coral line up to 4px with no
120
+ text or information on it is allowed, like the band under the FactChat promo
121
+ banner.
122
+ - **Event CTAs stay `primary`.** An event screen is a product screen, so
123
+ `Button variant="accent"` stays on marketing heroes (see Button usage), and a
124
+ reward claim is never coral.
125
+ - **A marketing page may have one full-bleed coral band.** Only ink or cream
126
+ content sits on it; elsewhere on that page coral is large type or art only.
127
+ The reference is baze.co/social: the offer section is the band, and
128
+ "80개 이상", "월 5,900원" and "9,000" are the large coral type.
129
+
97
130
  ## Status
98
131
 
99
132
  <Canvas of={BrandColour.Status} sourceState="none" />
@@ -186,7 +219,10 @@ BAZE의 화면은 따뜻한 무채색입니다. 크림·아이보리 바탕에
186
219
  - **열두 가지 시스템 색은 카테고리 구분에만 씁니다.** `category.{hue}.*`에는 상태의
187
220
  뜻이 없습니다.
188
221
  - **파란색은 데이터와 링크를 뜻합니다.** 링크는 `fg.link`, 하나의 값을 보여 주는
189
- 차트는 파란색 단색 단계를 씁니다(Using Semantic Tokens 참고).
222
+ 차트는 파란색 단색 단계(`data.1–4`)를 씁니다(Using Semantic Tokens 참고).
223
+ - **기준선 위아래는 파랑과 주황으로 나눕니다.** 계획 대비, 평균 대비처럼 실제 기준선이
224
+ 있는 차트는 `diverging.*`를 씁니다. 기준선 위는 파랑, 아래는 주황, 기준선 자리는
225
+ `diverging.mid`입니다. 주황은 면에만 쓰고, 방향을 빨강·초록으로 나타내지 않습니다.
190
226
  - **그라데이션은 쓰지 않습니다.** 브랜드 띠는 단색 하나로 칠합니다.
191
227
 
192
228
  ## 무채색
@@ -231,6 +267,7 @@ BAZE의 화면은 따뜻한 무채색입니다. 크림·아이보리 바탕에
231
267
  | 블랙 실행 버튼 위의 코랄 아이콘 (`action.iconOnSolid`) | 넓은 면, 옅은 배경, 카드 바탕 |
232
268
  | AI 작업 중 표시, 로고 마크, 큰 글씨 (`action.mark`) | 프로모션 배지 |
233
269
  | 읽지 않은 숫자 배지 (`count.*`, 조금 더 진한 코랄 레드) | 경고·오류 문구와 테두리, 켜진 스위치·체크박스, 링크 |
270
+ | 이벤트 화면의 보상 금액 큰 글씨 (`action.mark`) | 이벤트 카드 머리와 모달 하단 띠, 작은 머리말 글자 |
234
271
 
235
272
  - **면이 아니라 점으로 씁니다.** 버튼·배지·아이콘보다 큰 면을 코랄로 칠하지 않습니다.
236
273
  코랄과 오류 빨강은 색상 차이가 몇 도밖에 나지 않아 옅게 쓰면 같은 색이 됩니다.
@@ -239,6 +276,32 @@ BAZE의 화면은 따뜻한 무채색입니다. 크림·아이보리 바탕에
239
276
  버튼이 사라지고 그 자리에 로딩 표시가 나타납니다. 숫자 배지와 Super Agent 마름모는
240
277
  상태와 정체성을 나타내는 표시라 실행 신호와 함께 보여도 됩니다.
241
278
 
279
+ ## 캠페인·이벤트 화면
280
+
281
+ 먼저 그 화면이 제품인지 마케팅인지 가립니다. 로그인해야 들어갈 수 있거나 계정을
282
+ 바꾸는 조작이 있으면 제품입니다. 앱 안의 이벤트 페이지와 그 안내 모달, 프로모션
283
+ 배너도 제품입니다. 마케팅은 제품 밖에서 로그인 없이 보는 화면으로, baze.co, SNS
284
+ 게시물, 인쇄물이 여기에 해당합니다.
285
+
286
+ - **제품 안의 이벤트도 위의 코랄 규칙을 따릅니다.** 코랄로 면을 칠하지 않고 코랄
287
+ 위에 글자를 올리지 않습니다. 강조는 일러스트로 하고, 카드 머리나 모달 하단의 띠는
288
+ `bg.muted`나 `layer.*`로 칠합니다. `secondary.surface`나 코랄은 쓰지 않습니다.
289
+ - **보상 금액은 코랄로 쓸 수 있습니다.** 보상 금액을 `action.mark` 큰 글씨(24px
290
+ 이상, 또는 19px 굵게)로 쓰는 것이 그 화면의 하나뿐인 코랄입니다. 주변은 모두
291
+ 무채색으로 둡니다.
292
+ - **작은 글자는 코랄로 쓰지 않습니다.** 작은 머리말이나 라벨은 `fg.subtle`을 씁니다.
293
+ 작은 글자가 대비 기준을 넘을 때까지 코랄을 어둡게 하면 오류 문구의 빨강
294
+ (`danger.fg`)과 거의 같아집니다.
295
+ - **얇은 장식선은 점으로 봅니다.** 글자나 정보 없이 장식만 하는 4px 이하의 코랄 선은
296
+ 써도 됩니다. FactChat 프로모션 배너 아래의 띠가 그 예입니다.
297
+ - **이벤트의 행동 유도 버튼은 `primary`입니다.** 이벤트 화면도 제품 화면이므로
298
+ `Button variant="accent"`는 마케팅 히어로에만 씁니다(Button 사용법 참고). 보상 받기
299
+ 버튼도 코랄로 칠하지 않습니다.
300
+ - **마케팅 페이지에는 화면 폭을 가득 채우는 코랄 띠를 하나 둘 수 있습니다.** 그 위에는
301
+ 블랙이나 크림색 내용만 올리고, 페이지의 나머지 부분에서 코랄은 큰 글씨나 그림에만
302
+ 씁니다. 기준은 baze.co/social입니다. 혜택 섹션이 그 띠이고, "80개 이상",
303
+ "월 5,900원", "9,000"이 코랄 큰 글씨입니다.
304
+
242
305
  ## 상태
243
306
 
244
307
  <Canvas of={BrandColour.Status} sourceState="none" />
@@ -7,7 +7,19 @@ import {
7
7
  ROLE_TOKEN_PATHS,
8
8
  SYSTEM_HUE_NAMES,
9
9
  } from './colors';
10
- import { CORAL, RAMPS, SCHEMES, SYSTEM_HUES } from './palette.generated';
10
+ import {
11
+ CORAL,
12
+ DATAVIZ,
13
+ RAMPS,
14
+ SCHEMES,
15
+ SYSTEM_HUES,
16
+ } from './palette.generated';
17
+ import {
18
+ DATA_VIZ_LABEL_TOKEN,
19
+ DATA_VIZ_LABELS,
20
+ type DataVizKey,
21
+ resolveColor,
22
+ } from './paletteSwatches';
11
23
 
12
24
  /**
13
25
  * logician-ui 5.0 BAZE palette — the three token layers.
@@ -104,6 +116,12 @@ export const RawScales: Story = {
104
116
  <Chip key={k} hex={hex} label={k} />
105
117
  ))}
106
118
  </Flex>
119
+ <H4>dataviz</H4>
120
+ <Flex gap={2} wrap="wrap">
121
+ {Object.entries(DATAVIZ).map(([k, hex]) => (
122
+ <Chip key={k} hex={hex} label={k} />
123
+ ))}
124
+ </Flex>
107
125
  <H4>system hues</H4>
108
126
  <Grid templateColumns="120px repeat(8, 1fr)" gap={1} fontSize="11px">
109
127
  <span />
@@ -157,6 +175,98 @@ export const RoleTokens: Story = {
157
175
  ),
158
176
  };
159
177
 
178
+ const DATA_STEPS = (Object.keys(DATA_VIZ_LABELS) as DataVizKey[]).filter((k) =>
179
+ k.startsWith('data-')
180
+ );
181
+ /** Display order: far below → baseline → far above. */
182
+ const DIVERGING_STEPS: DataVizKey[] = [
183
+ 'diverging-neg-3',
184
+ 'diverging-neg-2',
185
+ 'diverging-neg-1',
186
+ 'diverging-mid',
187
+ 'diverging-pos-1',
188
+ 'diverging-pos-2',
189
+ 'diverging-pos-3',
190
+ ];
191
+
192
+ /** A fill with the in-cell label `DATA_VIZ_LABELS` gives it (or none). */
193
+ const DataCell = ({
194
+ flat,
195
+ hex,
196
+ mode,
197
+ }: {
198
+ flat: DataVizKey;
199
+ hex: string;
200
+ mode: 'light' | 'dark';
201
+ }) => {
202
+ const label = DATA_VIZ_LABELS[flat][mode];
203
+ const labelHex =
204
+ label && resolveColor(`{colors.${DATA_VIZ_LABEL_TOKEN[label]}}`, mode);
205
+ return (
206
+ <Stack gap={1}>
207
+ <Flex
208
+ bg={hex}
209
+ color={labelHex || undefined}
210
+ h="56px"
211
+ align="center"
212
+ justify="center"
213
+ fontSize="13px"
214
+ fontWeight="bold"
215
+ borderRadius="sm"
216
+ >
217
+ {labelHex && '42%'}
218
+ </Flex>
219
+ {/* Plain boxes: the panel paints its own mode, so text inherits its colour. */}
220
+ <Box fontFamily="mono" fontSize="11px">
221
+ {ROLE_TOKEN_PATHS[flat]}
222
+ </Box>
223
+ <Box fontSize="10px">
224
+ {hex} ·{' '}
225
+ {labelHex
226
+ ? `${label} label ${ratio(hex, labelHex).toFixed(2)}`
227
+ : 'no in-cell label'}
228
+ </Box>
229
+ </Stack>
230
+ );
231
+ };
232
+
233
+ /**
234
+ * Data-visualisation fills — `data.1–4` (single measure, 4 = largest) and
235
+ * `diverging.*` (blue above the baseline, orange below, `diverging.mid` at it)
236
+ * — in light and dark, each with the in-cell label it can carry.
237
+ */
238
+ export const DataViz: Story = {
239
+ render: () => (
240
+ <Stack gap={6} maxW="1100px">
241
+ {(['light', 'dark'] as const).map((mode) => {
242
+ const table = SCHEMES.ink[mode] as Record<string, string>;
243
+ return (
244
+ <Stack
245
+ key={mode}
246
+ gap={4}
247
+ p={4}
248
+ borderRadius="md"
249
+ bg={table['bg-canvas']}
250
+ color={table['fg-default']}
251
+ >
252
+ <Box fontWeight="bold">{mode}</Box>
253
+ <Grid templateColumns="repeat(4, 1fr)" gap={2}>
254
+ {DATA_STEPS.map((k) => (
255
+ <DataCell key={k} flat={k} hex={table[k]} mode={mode} />
256
+ ))}
257
+ </Grid>
258
+ <Grid templateColumns="repeat(7, 1fr)" gap={2}>
259
+ {DIVERGING_STEPS.map((k) => (
260
+ <DataCell key={k} flat={k} hex={table[k]} mode={mode} />
261
+ ))}
262
+ </Grid>
263
+ </Stack>
264
+ );
265
+ })}
266
+ </Stack>
267
+ ),
268
+ };
269
+
160
270
  /** Live tokens on this page's colour mode — flip the toolbar to check dark. */
161
271
  export const Category: Story = {
162
272
  render: () => (
@@ -30,9 +30,9 @@ const meta = {
30
30
 
31
31
  Three layers; components read only the last one.
32
32
 
33
- 1. **Raw scales** — \`ink\` / \`inkDark\`, \`sand\` / \`sandDark\`, \`slate\` / \`slateDark\` (1–12), \`coral\`, and 12 system hues. Values come from \`scripts/palette/generate.mjs\`.
33
+ 1. **Raw scales** — \`ink\` / \`inkDark\`, \`sand\` / \`sandDark\`, \`slate\` / \`slateDark\` (1–12), \`coral\`, 12 system hues, and \`dataviz\`. Values come from \`scripts/palette/generate.mjs\`.
34
34
  2. **Semantic steps** — \`neutral.1–12\` and \`secondary.1–12\`, filled by the theme option: \`createLogicianTheme({ neutral: 'ink' | 'slate', secondary: 'sand' })\` (or \`<LogicianProvider theme={…}>\`).
35
- 3. **Role tokens** — \`bg.*\`, \`layer.*\`, \`fg.*\`, \`border.*\`, \`primary.*\`, \`action.*\`, status \`{bg,border,fg,solid,onSolid}\`, \`category.*\` …
35
+ 3. **Role tokens** — \`bg.*\`, \`layer.*\`, \`fg.*\`, \`border.*\`, \`primary.*\`, \`action.*\`, status \`{bg,border,fg,solid,onSolid}\`, \`category.*\`, data-viz fills \`data.*\` / \`diverging.*\` …
36
36
 
37
37
  Every value below is shown in light and dark. Contrast is audited in CI (\`contrast.test.ts\`) in light, dark and both high-contrast modes. The 4.x names still resolve as aliases until 6.0 and are listed at the bottom, not in the grid. Setup/Theme/BAZE Palette shows the raw scales and every role in all four modes.
38
38
  `,
@@ -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' }
@@ -45,6 +45,8 @@ createLogicianTheme({ neutral: 'slate' }) // cool gray — app code unchanged
45
45
  | Disabled (no opacity) | `disabled.bg` / `disabled.fg` |
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 | `#38332E` (`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,11 +143,11 @@ 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
@@ -166,8 +166,9 @@ _moreContrast }`) because Chakra cannot nest `_dark` inside `_moreContrast`
166
166
  ### Adding or changing a token
167
167
 
168
168
  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
169
+ 2. Register its contrast pair(s) in `contrast.test.ts` (`PAIRS`, `SEP`; a
170
+ data-viz fill goes in `DATA_VIZ_LABELS` (`paletteSwatches.ts`) with its in-cell label), or a reason in
171
+ `NO_PAIR`. The registry test fails until you do; the audit runs
171
172
  light / dark / hcLight / hcDark for every neutral scheme.
172
173
  3. Add it to `SemanticColorToken` and to SemanticTokens.mdx.
173
174
 
@@ -250,8 +251,13 @@ follow the scheme and high contrast. Base font size is 14px.
250
251
  badges/tags, the modal header band), never rows or panels.
251
252
  5. Disabled = `disabled.*`, not opacity. Focus = `focusRing`.
252
253
  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".
254
+ (usage bars, single-measure bar charts, maps) fills with `data.1–4` (4 =
255
+ largest), never a rainbow or grey ramp; line strokes (single-measure, and
256
+ series 1) use `blue.base`. Values against a real baseline (vs plan, vs
257
+ average) fill with `diverging.pos.1–3` (above, blue) / `diverging.neg.1–3`
258
+ (below, orange) and `diverging.mid` at the baseline — never red/green for
259
+ direction, never orange text or icons. Values and labels:
260
+ SemanticTokens.mdx → "Blue means data and links".
255
261
 
256
262
  ## Extending the Theme
257
263
 
@@ -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,9 @@
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}.*`, and the
21
+ * data-visualisation fills `data.1–4` and `diverging.{pos,neg}.1–3` /
22
+ * `diverging.mid`.
20
23
  *
21
24
  * Every value comes from `palette.generated.ts` (see
22
25
  * `scripts/palette/generate.mjs`), which ports the designer-reviewed prototype
@@ -36,7 +39,13 @@
36
39
  * `no-deprecated-tokens` lint rule. They are removed in 6.0.
37
40
  */
38
41
  import DEPRECATED from './deprecatedColorTokens.json';
39
- import { CORAL, RAMPS, SCHEMES, SYSTEM_HUES } from './palette.generated';
42
+ import {
43
+ CORAL,
44
+ DATAVIZ,
45
+ RAMPS,
46
+ SCHEMES,
47
+ SYSTEM_HUES,
48
+ } from './palette.generated';
40
49
 
41
50
  /** Raw scale that fills `neutral.1–12` and every neutral role. */
42
51
  export type NeutralScale = 'ink' | 'slate';
@@ -122,6 +131,9 @@ export const colors = {
122
131
  ),
123
132
  ])
124
133
  ),
134
+ dataviz: Object.fromEntries(
135
+ Object.entries(DATAVIZ).map(([k, val]) => [k, v(val)])
136
+ ),
125
137
  white: v('#FFFFFF'),
126
138
  } as Record<string, Record<string, TokenValue> | TokenValue>;
127
139
 
@@ -214,6 +226,20 @@ const PATHS: Record<FlatKey, string> = {
214
226
  'info-onSolid': 'info.onSolid',
215
227
  'tooltip-bg': 'tooltip.bg',
216
228
  'tooltip-fg': 'tooltip.fg',
229
+ // Data visualisation (fills only). Higher number = larger value, in both
230
+ // modes; the dark values flip lightness so the strongest step stays the
231
+ // most prominent on a dark canvas.
232
+ 'data-1': 'data.1',
233
+ 'data-2': 'data.2',
234
+ 'data-3': 'data.3',
235
+ 'data-4': 'data.4',
236
+ 'diverging-pos-1': 'diverging.pos.1',
237
+ 'diverging-pos-2': 'diverging.pos.2',
238
+ 'diverging-pos-3': 'diverging.pos.3',
239
+ 'diverging-neg-1': 'diverging.neg.1',
240
+ 'diverging-neg-2': 'diverging.neg.2',
241
+ 'diverging-neg-3': 'diverging.neg.3',
242
+ 'diverging-mid': 'diverging.mid',
217
243
  };
218
244
 
219
245
  /** Exposed for tests and docs: every role token generated from the scheme table. */
@@ -249,6 +275,7 @@ function buildRefIndex(neutral: NeutralScale, secondary: SecondaryScale) {
249
275
  for (const hue of SYSTEM_HUE_NAMES)
250
276
  for (const [k, hex] of Object.entries(SYSTEM_HUES[hue]))
251
277
  add(hex, `${hue}.${k}`);
278
+ for (const [k, hex] of Object.entries(DATAVIZ)) add(hex, `dataviz.${k}`);
252
279
  // The brand black/cream anchors exist only on ink; reachable from any scheme.
253
280
  if (neutral !== 'ink') addScale('ink');
254
281
  return (hex: string) => index.get(hex.toUpperCase()) ?? hex;
@@ -421,6 +448,9 @@ export type SemanticColorToken =
421
448
  | `danger.${'solidHover' | 'solidActive'}`
422
449
  | `tooltip.${'bg' | 'fg'}`
423
450
  | `category.${Hue}.${'surface' | 'fg'}`
451
+ | `data.${1 | 2 | 3 | 4}`
452
+ | `diverging.${'pos' | 'neg'}.${1 | 2 | 3}`
453
+ | 'diverging.mid'
424
454
  | DeprecatedSemanticColorToken;
425
455
 
426
456
  /**
@@ -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
@@ -137,6 +138,12 @@ const NO_PAIR: Record<string, string> = {
137
138
  track: 'unfilled track; the filled part (primary-main) carries the value',
138
139
  };
139
140
 
141
+ // Data-viz fills (`data.*`, `diverging.*`) are registered through
142
+ // DATA_VIZ_LABELS (paletteSwatches.ts): each fill with the in-cell label it may
143
+ // carry. Audited at 4.5:1 in light and dark, like the category pairs: the fills
144
+ // keep their value under high contrast (they are fills, like `track`), so an
145
+ // in-cell label is not held to the 7:1 high-contrast text target.
146
+
140
147
  // ───────────────────────────── resolver ─────────────────────────────
141
148
 
142
149
  const lum = (h: string) => {
@@ -253,6 +260,30 @@ describe.each(SCHEME_NAMES)('contrast — %s scheme', (neutral) => {
253
260
  expect(failures).toEqual([]);
254
261
  });
255
262
 
263
+ it('data-viz fills: each in-cell label clears 4.5:1, and "no label" means neither does (light and dark)', () => {
264
+ const failures = Object.entries(DATA_VIZ_LABELS).flatMap(([fill, labels]) =>
265
+ (['light', 'dark'] as const).flatMap((mode) => {
266
+ const bg = flat(fill, mode);
267
+ const label = labels[mode];
268
+ if (label) {
269
+ const c = ratio(resolve(DATA_VIZ_LABEL_TOKEN[label], mode), bg);
270
+ return c >= 4.5
271
+ ? []
272
+ : [`${label} on ${fill} ${mode}: ${c.toFixed(2)}`];
273
+ }
274
+ const best = Math.max(
275
+ ...Object.values(DATA_VIZ_LABEL_TOKEN).map((t) =>
276
+ ratio(resolve(t, mode), bg)
277
+ )
278
+ );
279
+ return best < 4.5
280
+ ? []
281
+ : [`${fill} ${mode} has no label but one clears ${best.toFixed(2)}`];
282
+ })
283
+ );
284
+ expect(failures).toEqual([]);
285
+ });
286
+
256
287
  it('every deprecated 4.x name resolves to its replacement in all modes', () => {
257
288
  for (const [oldName, newName] of Object.entries(DEPRECATED_COLOR_TOKENS))
258
289
  for (const mode of MODES)
@@ -267,6 +298,7 @@ describe('contrast registry', () => {
267
298
  ...PAIRS.flatMap(([a, b]) => [a, b]),
268
299
  ...SEP.flatMap(([a, b]) => [a, b]),
269
300
  ...Object.keys(NO_PAIR),
301
+ ...Object.keys(DATA_VIZ_LABELS),
270
302
  ]);
271
303
 
272
304
  it('every role token has a contrast pair or a NO_PAIR reason', () => {