@chenzy-design/tokens 0.1.0

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 (275) hide show
  1. package/LICENSE +21 -0
  2. package/dist/alias/index.d.ts +29 -0
  3. package/dist/alias/index.d.ts.map +1 -0
  4. package/dist/alias/index.js +68 -0
  5. package/dist/alias/index.js.map +1 -0
  6. package/dist/build.d.ts +2 -0
  7. package/dist/build.d.ts.map +1 -0
  8. package/dist/build.js +94 -0
  9. package/dist/build.js.map +1 -0
  10. package/dist/components/ai-chat-dialogue.d.ts +15 -0
  11. package/dist/components/ai-chat-dialogue.d.ts.map +1 -0
  12. package/dist/components/ai-chat-dialogue.js +15 -0
  13. package/dist/components/ai-chat-dialogue.js.map +1 -0
  14. package/dist/components/ai-chat-input.d.ts +9 -0
  15. package/dist/components/ai-chat-input.d.ts.map +1 -0
  16. package/dist/components/ai-chat-input.js +9 -0
  17. package/dist/components/ai-chat-input.js.map +1 -0
  18. package/dist/components/audio-player.d.ts +11 -0
  19. package/dist/components/audio-player.d.ts.map +1 -0
  20. package/dist/components/audio-player.js +11 -0
  21. package/dist/components/audio-player.js.map +1 -0
  22. package/dist/components/back-top.d.ts +17 -0
  23. package/dist/components/back-top.d.ts.map +1 -0
  24. package/dist/components/back-top.js +17 -0
  25. package/dist/components/back-top.js.map +1 -0
  26. package/dist/components/banner.d.ts +25 -0
  27. package/dist/components/banner.d.ts.map +1 -0
  28. package/dist/components/banner.js +26 -0
  29. package/dist/components/banner.js.map +1 -0
  30. package/dist/components/button.d.ts +15 -0
  31. package/dist/components/button.d.ts.map +1 -0
  32. package/dist/components/button.js +15 -0
  33. package/dist/components/button.js.map +1 -0
  34. package/dist/components/calendar.d.ts +23 -0
  35. package/dist/components/calendar.d.ts.map +1 -0
  36. package/dist/components/calendar.js +23 -0
  37. package/dist/components/calendar.js.map +1 -0
  38. package/dist/components/chat.d.ts +8 -0
  39. package/dist/components/chat.d.ts.map +1 -0
  40. package/dist/components/chat.js +8 -0
  41. package/dist/components/chat.js.map +1 -0
  42. package/dist/components/checkbox.d.ts +20 -0
  43. package/dist/components/checkbox.d.ts.map +1 -0
  44. package/dist/components/checkbox.js +21 -0
  45. package/dist/components/checkbox.js.map +1 -0
  46. package/dist/components/code-highlight.d.ts +10 -0
  47. package/dist/components/code-highlight.d.ts.map +1 -0
  48. package/dist/components/code-highlight.js +10 -0
  49. package/dist/components/code-highlight.js.map +1 -0
  50. package/dist/components/collapsible.d.ts +5 -0
  51. package/dist/components/collapsible.d.ts.map +1 -0
  52. package/dist/components/collapsible.js +5 -0
  53. package/dist/components/collapsible.js.map +1 -0
  54. package/dist/components/color-picker.d.ts +19 -0
  55. package/dist/components/color-picker.d.ts.map +1 -0
  56. package/dist/components/color-picker.js +19 -0
  57. package/dist/components/color-picker.js.map +1 -0
  58. package/dist/components/cropper.d.ts +9 -0
  59. package/dist/components/cropper.d.ts.map +1 -0
  60. package/dist/components/cropper.js +9 -0
  61. package/dist/components/cropper.js.map +1 -0
  62. package/dist/components/data-display.d.ts +28 -0
  63. package/dist/components/data-display.d.ts.map +1 -0
  64. package/dist/components/data-display.js +32 -0
  65. package/dist/components/data-display.js.map +1 -0
  66. package/dist/components/date-picker.d.ts +18 -0
  67. package/dist/components/date-picker.d.ts.map +1 -0
  68. package/dist/components/date-picker.js +18 -0
  69. package/dist/components/date-picker.js.map +1 -0
  70. package/dist/components/display.d.ts +34 -0
  71. package/dist/components/display.d.ts.map +1 -0
  72. package/dist/components/display.js +38 -0
  73. package/dist/components/display.js.map +1 -0
  74. package/dist/components/divider.d.ts +10 -0
  75. package/dist/components/divider.d.ts.map +1 -0
  76. package/dist/components/divider.js +10 -0
  77. package/dist/components/divider.js.map +1 -0
  78. package/dist/components/drag-move.d.ts +5 -0
  79. package/dist/components/drag-move.d.ts.map +1 -0
  80. package/dist/components/drag-move.js +5 -0
  81. package/dist/components/drag-move.js.map +1 -0
  82. package/dist/components/drawer.d.ts +26 -0
  83. package/dist/components/drawer.d.ts.map +1 -0
  84. package/dist/components/drawer.js +26 -0
  85. package/dist/components/drawer.js.map +1 -0
  86. package/dist/components/float-button.d.ts +12 -0
  87. package/dist/components/float-button.d.ts.map +1 -0
  88. package/dist/components/float-button.js +12 -0
  89. package/dist/components/float-button.js.map +1 -0
  90. package/dist/components/form.d.ts +14 -0
  91. package/dist/components/form.d.ts.map +1 -0
  92. package/dist/components/form.js +14 -0
  93. package/dist/components/form.js.map +1 -0
  94. package/dist/components/grid.d.ts +7 -0
  95. package/dist/components/grid.d.ts.map +1 -0
  96. package/dist/components/grid.js +7 -0
  97. package/dist/components/grid.js.map +1 -0
  98. package/dist/components/hot-keys.d.ts +10 -0
  99. package/dist/components/hot-keys.d.ts.map +1 -0
  100. package/dist/components/hot-keys.js +10 -0
  101. package/dist/components/hot-keys.js.map +1 -0
  102. package/dist/components/icon-button.d.ts +5 -0
  103. package/dist/components/icon-button.d.ts.map +1 -0
  104. package/dist/components/icon-button.js +5 -0
  105. package/dist/components/icon-button.js.map +1 -0
  106. package/dist/components/icon.d.ts +16 -0
  107. package/dist/components/icon.d.ts.map +1 -0
  108. package/dist/components/icon.js +16 -0
  109. package/dist/components/icon.js.map +1 -0
  110. package/dist/components/index.d.ts +660 -0
  111. package/dist/components/index.d.ts.map +1 -0
  112. package/dist/components/index.js +90 -0
  113. package/dist/components/index.js.map +1 -0
  114. package/dist/components/input.d.ts +17 -0
  115. package/dist/components/input.d.ts.map +1 -0
  116. package/dist/components/input.js +17 -0
  117. package/dist/components/input.js.map +1 -0
  118. package/dist/components/json-viewer.d.ts +12 -0
  119. package/dist/components/json-viewer.d.ts.map +1 -0
  120. package/dist/components/json-viewer.js +12 -0
  121. package/dist/components/json-viewer.js.map +1 -0
  122. package/dist/components/layout.d.ts +21 -0
  123. package/dist/components/layout.d.ts.map +1 -0
  124. package/dist/components/layout.js +21 -0
  125. package/dist/components/layout.js.map +1 -0
  126. package/dist/components/list.d.ts +21 -0
  127. package/dist/components/list.d.ts.map +1 -0
  128. package/dist/components/list.js +24 -0
  129. package/dist/components/list.js.map +1 -0
  130. package/dist/components/lottie-icon.d.ts +13 -0
  131. package/dist/components/lottie-icon.d.ts.map +1 -0
  132. package/dist/components/lottie-icon.js +13 -0
  133. package/dist/components/lottie-icon.js.map +1 -0
  134. package/dist/components/markdown-render.d.ts +9 -0
  135. package/dist/components/markdown-render.d.ts.map +1 -0
  136. package/dist/components/markdown-render.js +9 -0
  137. package/dist/components/markdown-render.js.map +1 -0
  138. package/dist/components/menu.d.ts +20 -0
  139. package/dist/components/menu.d.ts.map +1 -0
  140. package/dist/components/menu.js +22 -0
  141. package/dist/components/menu.js.map +1 -0
  142. package/dist/components/modal.d.ts +18 -0
  143. package/dist/components/modal.d.ts.map +1 -0
  144. package/dist/components/modal.js +18 -0
  145. package/dist/components/modal.js.map +1 -0
  146. package/dist/components/navigation.d.ts +28 -0
  147. package/dist/components/navigation.d.ts.map +1 -0
  148. package/dist/components/navigation.js +31 -0
  149. package/dist/components/navigation.js.map +1 -0
  150. package/dist/components/notification.d.ts +32 -0
  151. package/dist/components/notification.d.ts.map +1 -0
  152. package/dist/components/notification.js +34 -0
  153. package/dist/components/notification.js.map +1 -0
  154. package/dist/components/overflow-list.d.ts +13 -0
  155. package/dist/components/overflow-list.d.ts.map +1 -0
  156. package/dist/components/overflow-list.js +13 -0
  157. package/dist/components/overflow-list.js.map +1 -0
  158. package/dist/components/pin-code.d.ts +11 -0
  159. package/dist/components/pin-code.d.ts.map +1 -0
  160. package/dist/components/pin-code.js +11 -0
  161. package/dist/components/pin-code.js.map +1 -0
  162. package/dist/components/popconfirm.d.ts +23 -0
  163. package/dist/components/popconfirm.d.ts.map +1 -0
  164. package/dist/components/popconfirm.js +23 -0
  165. package/dist/components/popconfirm.js.map +1 -0
  166. package/dist/components/progress.d.ts +18 -0
  167. package/dist/components/progress.d.ts.map +1 -0
  168. package/dist/components/progress.js +18 -0
  169. package/dist/components/progress.js.map +1 -0
  170. package/dist/components/radio.d.ts +19 -0
  171. package/dist/components/radio.d.ts.map +1 -0
  172. package/dist/components/radio.js +21 -0
  173. package/dist/components/radio.js.map +1 -0
  174. package/dist/components/rating.d.ts +10 -0
  175. package/dist/components/rating.d.ts.map +1 -0
  176. package/dist/components/rating.js +10 -0
  177. package/dist/components/rating.js.map +1 -0
  178. package/dist/components/resizable.d.ts +10 -0
  179. package/dist/components/resizable.d.ts.map +1 -0
  180. package/dist/components/resizable.js +10 -0
  181. package/dist/components/resizable.js.map +1 -0
  182. package/dist/components/scroll-list.d.ts +16 -0
  183. package/dist/components/scroll-list.d.ts.map +1 -0
  184. package/dist/components/scroll-list.js +16 -0
  185. package/dist/components/scroll-list.js.map +1 -0
  186. package/dist/components/select.d.ts +22 -0
  187. package/dist/components/select.d.ts.map +1 -0
  188. package/dist/components/select.js +22 -0
  189. package/dist/components/select.js.map +1 -0
  190. package/dist/components/side-sheet.d.ts +26 -0
  191. package/dist/components/side-sheet.d.ts.map +1 -0
  192. package/dist/components/side-sheet.js +26 -0
  193. package/dist/components/side-sheet.js.map +1 -0
  194. package/dist/components/skeleton.d.ts +13 -0
  195. package/dist/components/skeleton.d.ts.map +1 -0
  196. package/dist/components/skeleton.js +13 -0
  197. package/dist/components/skeleton.js.map +1 -0
  198. package/dist/components/slider.d.ts +14 -0
  199. package/dist/components/slider.d.ts.map +1 -0
  200. package/dist/components/slider.js +14 -0
  201. package/dist/components/slider.js.map +1 -0
  202. package/dist/components/space.d.ts +7 -0
  203. package/dist/components/space.d.ts.map +1 -0
  204. package/dist/components/space.js +7 -0
  205. package/dist/components/space.js.map +1 -0
  206. package/dist/components/spin.d.ts +17 -0
  207. package/dist/components/spin.d.ts.map +1 -0
  208. package/dist/components/spin.js +17 -0
  209. package/dist/components/spin.js.map +1 -0
  210. package/dist/components/switch.d.ts +14 -0
  211. package/dist/components/switch.d.ts.map +1 -0
  212. package/dist/components/switch.js +14 -0
  213. package/dist/components/switch.js.map +1 -0
  214. package/dist/components/table.d.ts +21 -0
  215. package/dist/components/table.d.ts.map +1 -0
  216. package/dist/components/table.js +21 -0
  217. package/dist/components/table.js.map +1 -0
  218. package/dist/components/tabs.d.ts +29 -0
  219. package/dist/components/tabs.d.ts.map +1 -0
  220. package/dist/components/tabs.js +32 -0
  221. package/dist/components/tabs.js.map +1 -0
  222. package/dist/components/toast.d.ts +26 -0
  223. package/dist/components/toast.d.ts.map +1 -0
  224. package/dist/components/toast.js +27 -0
  225. package/dist/components/toast.js.map +1 -0
  226. package/dist/components/tooltip.d.ts +30 -0
  227. package/dist/components/tooltip.d.ts.map +1 -0
  228. package/dist/components/tooltip.js +34 -0
  229. package/dist/components/tooltip.js.map +1 -0
  230. package/dist/components/transfer.d.ts +20 -0
  231. package/dist/components/transfer.d.ts.map +1 -0
  232. package/dist/components/transfer.js +21 -0
  233. package/dist/components/transfer.js.map +1 -0
  234. package/dist/components/tree.d.ts +24 -0
  235. package/dist/components/tree.d.ts.map +1 -0
  236. package/dist/components/tree.js +25 -0
  237. package/dist/components/tree.js.map +1 -0
  238. package/dist/components/typography.d.ts +15 -0
  239. package/dist/components/typography.d.ts.map +1 -0
  240. package/dist/components/typography.js +15 -0
  241. package/dist/components/typography.js.map +1 -0
  242. package/dist/components/user-guide.d.ts +9 -0
  243. package/dist/components/user-guide.d.ts.map +1 -0
  244. package/dist/components/user-guide.js +9 -0
  245. package/dist/components/user-guide.js.map +1 -0
  246. package/dist/components/video-player.d.ts +12 -0
  247. package/dist/components/video-player.d.ts.map +1 -0
  248. package/dist/components/video-player.js +12 -0
  249. package/dist/components/video-player.js.map +1 -0
  250. package/dist/components/virtual.d.ts +13 -0
  251. package/dist/components/virtual.d.ts.map +1 -0
  252. package/dist/components/virtual.js +15 -0
  253. package/dist/components/virtual.js.map +1 -0
  254. package/dist/contrast-check.d.ts +2 -0
  255. package/dist/contrast-check.d.ts.map +1 -0
  256. package/dist/contrast-check.js +140 -0
  257. package/dist/contrast-check.js.map +1 -0
  258. package/dist/global/color.d.ts +63 -0
  259. package/dist/global/color.d.ts.map +1 -0
  260. package/dist/global/color.js +67 -0
  261. package/dist/global/color.js.map +1 -0
  262. package/dist/global/scales.d.ts +69 -0
  263. package/dist/global/scales.d.ts.map +1 -0
  264. package/dist/global/scales.js +69 -0
  265. package/dist/global/scales.js.map +1 -0
  266. package/dist/index.d.ts +16 -0
  267. package/dist/index.d.ts.map +1 -0
  268. package/dist/index.js +15 -0
  269. package/dist/index.js.map +1 -0
  270. package/dist/tokens.css +844 -0
  271. package/dist/uno-theme.d.ts +33 -0
  272. package/dist/uno-theme.d.ts.map +1 -0
  273. package/dist/uno-theme.js +33 -0
  274. package/dist/uno-theme.js.map +1 -0
  275. package/package.json +30 -0
@@ -0,0 +1,140 @@
1
+ /**
2
+ * WCAG contrast audit for Alias tokens.
3
+ *
4
+ * Computes the relative-luminance contrast ratio for the body-level
5
+ * foreground/background token pairs that components actually render, and
6
+ * fails the build (non-zero exit) when any non-exempt pair is below the
7
+ * WCAG 2.1 AA threshold for normal text (4.5:1).
8
+ *
9
+ * Run: `pnpm -C packages/tokens a11y:contrast` (after `pnpm build`).
10
+ *
11
+ * Pairs marked `exempt` are reported (EXEMPT-FAIL) but never break the build.
12
+ * This now includes the solid status fills (success/warning/danger) carrying
13
+ * white text: the library targets 100% Semi Design color parity, and Semi's
14
+ * status colors paired with white text do NOT clear WCAG AA. That tradeoff is
15
+ * accepted, so those pairs are exempt. Semi-compliant pairs that DO clear AA
16
+ * (primary/link/text) remain hard gates.
17
+ */
18
+ import { palette } from './global/color.js';
19
+ import { aliasLight, aliasDark } from './alias/index.js';
20
+ const AA_NORMAL = 4.5;
21
+ /** Resolve an alias token to a concrete color for a given theme (dark inherits light). */
22
+ function resolve(token, theme) {
23
+ const v = theme === 'dark' ? (aliasDark[token] ?? aliasLight[token]) : aliasLight[token];
24
+ return v;
25
+ }
26
+ /** Parse #rrggbb / #rgb / rgb()/rgba() into RGBA (0-255 channels, 0-1 alpha). */
27
+ function parse(color) {
28
+ const c = color.trim();
29
+ if (c.startsWith('#')) {
30
+ let h = c.slice(1);
31
+ if (h.length === 3)
32
+ h = h.split('').map((x) => x + x).join('');
33
+ return {
34
+ r: parseInt(h.slice(0, 2), 16),
35
+ g: parseInt(h.slice(2, 4), 16),
36
+ b: parseInt(h.slice(4, 6), 16),
37
+ a: 1,
38
+ };
39
+ }
40
+ const m = c.match(/rgba?\(([^)]+)\)/i);
41
+ if (!m || !m[1])
42
+ throw new Error(`unparseable color: ${color}`);
43
+ const parts = m[1].split(',').map((s) => parseFloat(s.trim()));
44
+ return { r: parts[0] ?? 0, g: parts[1] ?? 0, b: parts[2] ?? 0, a: parts[3] ?? 1 };
45
+ }
46
+ /** Composite a (possibly translucent) foreground over an opaque background. */
47
+ function over(fg, bg) {
48
+ const a = fg.a;
49
+ return {
50
+ r: fg.r * a + bg.r * (1 - a),
51
+ g: fg.g * a + bg.g * (1 - a),
52
+ b: fg.b * a + bg.b * (1 - a),
53
+ a: 1,
54
+ };
55
+ }
56
+ function channel(c) {
57
+ const s = c / 255;
58
+ return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
59
+ }
60
+ function luminance(c) {
61
+ return 0.2126 * channel(c.r) + 0.7152 * channel(c.g) + 0.0722 * channel(c.b);
62
+ }
63
+ function contrast(fgColor, bgColor) {
64
+ const bg = parse(bgColor);
65
+ const fg = over(parse(fgColor), bg);
66
+ const l1 = luminance(fg);
67
+ const l2 = luminance(bg);
68
+ const hi = Math.max(l1, l2);
69
+ const lo = Math.min(l1, l2);
70
+ return (hi + 0.05) / (lo + 0.05);
71
+ }
72
+ /**
73
+ * Body-level token pairs that render real text. Secondary text (text-2) is
74
+ * audited only against the surfaces it actually sits on (bg-0 base canvas and
75
+ * bg-1 low fill); the higher elevation fills (bg-2/bg-3) are exempt because
76
+ * secondary text is not placed on them as body copy.
77
+ *
78
+ * The solid status fills (success/warning/danger with white text) are exempt:
79
+ * they mirror Semi Design exactly, and Semi's status colors with white text do
80
+ * not reach AA. We accept that to preserve 100% Semi color parity.
81
+ */
82
+ const PAIRS = [
83
+ // --- light: secondary text on surfaces ---
84
+ { theme: 'light', label: 'text-2 on bg-0', fg: 'color-text-2', bg: 'color-bg-0' },
85
+ { theme: 'light', label: 'text-2 on bg-1', fg: 'color-text-2', bg: 'color-bg-1' },
86
+ { theme: 'light', label: 'text-2 on bg-2', fg: 'color-text-2', bg: 'color-bg-2', exempt: true },
87
+ { theme: 'light', label: 'text-2 on bg-3', fg: 'color-text-2', bg: 'color-bg-3', exempt: true },
88
+ // --- light: solid status buttons (white inverse text) — Semi-parity tradeoff ---
89
+ { theme: 'light', label: 'text-inverse on success', fg: 'color-text-inverse', bg: 'color-success', exempt: true },
90
+ { theme: 'light', label: 'text-inverse on warning', fg: 'color-text-inverse', bg: 'color-warning', exempt: true },
91
+ { theme: 'light', label: 'text-inverse on danger', fg: 'color-text-inverse', bg: 'color-danger', exempt: true },
92
+ // --- dark: solid primary/status buttons (white inverse text) ---
93
+ // Semi's dark-mode primary fill is a bright blue (#54a9ff) that, like the
94
+ // status fills, does not clear AA under white text. Exempt for Semi parity.
95
+ { theme: 'dark', label: 'text-inverse on primary', fg: 'color-text-inverse', bg: 'color-primary', exempt: true },
96
+ { theme: 'dark', label: 'text-inverse on primary-hover', fg: 'color-text-inverse', bg: 'color-primary-hover', exempt: true },
97
+ { theme: 'dark', label: 'text-inverse on primary-active', fg: 'color-text-inverse', bg: 'color-primary-active', exempt: true },
98
+ { theme: 'dark', label: 'text-inverse on info', fg: 'color-text-inverse', bg: 'color-info', exempt: true },
99
+ { theme: 'dark', label: 'text-inverse on success', fg: 'color-text-inverse', bg: 'color-success', exempt: true },
100
+ { theme: 'dark', label: 'text-inverse on warning', fg: 'color-text-inverse', bg: 'color-warning', exempt: true },
101
+ { theme: 'dark', label: 'text-inverse on danger', fg: 'color-text-inverse', bg: 'color-danger', exempt: true },
102
+ // --- dark: primary as link/foreground on surfaces ---
103
+ { theme: 'dark', label: 'primary link on bg-0', fg: 'color-primary', bg: 'color-bg-0' },
104
+ { theme: 'dark', label: 'primary link on bg-1', fg: 'color-primary', bg: 'color-bg-1' },
105
+ // --- component consumption: solid status fills (Switch / Tag / Badge) ---
106
+ // White text on Semi status fills; exempt for Semi parity (see above).
107
+ { theme: 'light', label: 'solid primary fill text', fg: 'color-text-inverse', bg: 'color-primary' },
108
+ { theme: 'light', label: 'solid success fill text', fg: 'color-text-inverse', bg: 'color-success', exempt: true },
109
+ { theme: 'light', label: 'solid warning fill text', fg: 'color-text-inverse', bg: 'color-warning', exempt: true },
110
+ { theme: 'light', label: 'solid danger fill text', fg: 'color-text-inverse', bg: 'color-danger', exempt: true },
111
+ { theme: 'dark', label: 'solid success fill text', fg: 'color-text-inverse', bg: 'color-success', exempt: true },
112
+ { theme: 'dark', label: 'solid warning fill text', fg: 'color-text-inverse', bg: 'color-warning', exempt: true },
113
+ { theme: 'dark', label: 'solid danger fill text', fg: 'color-text-inverse', bg: 'color-danger', exempt: true },
114
+ ];
115
+ let bodyFailures = 0;
116
+ const lines = [];
117
+ for (const p of PAIRS) {
118
+ const fg = resolve(p.fg, p.theme);
119
+ const bg = resolve(p.bg, p.theme);
120
+ const ratio = contrast(fg, bg);
121
+ const ok = ratio >= AA_NORMAL;
122
+ let status;
123
+ if (ok)
124
+ status = 'PASS';
125
+ else if (p.exempt)
126
+ status = 'EXEMPT-FAIL';
127
+ else {
128
+ status = 'FAIL';
129
+ bodyFailures += 1;
130
+ }
131
+ lines.push(`[${p.theme}] ${status.padEnd(11)} ${ratio.toFixed(2).padStart(5)}:1 ${p.label} ` +
132
+ `(${fg} on ${bg})`);
133
+ }
134
+ console.log('WCAG AA contrast audit (normal text ≥ 4.5:1)\n');
135
+ console.log(lines.join('\n'));
136
+ console.log(`\n${bodyFailures === 0 ? 'OK' : 'FAILED'}: ${bodyFailures} body-level violation(s).`);
137
+ // keep palette imported for potential future direct-palette audits
138
+ void palette;
139
+ process.exit(bodyFailures === 0 ? 0 : 1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M,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,GAAG;QAChF,IAAI,EAAE,OAAO,EAAE,GAAG,CACrB,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;AAC9D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B,OAAO,CAAC,GAAG,CACT,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,KAAK,YAAY,2BAA2B,CACtF,CAAC;AAEF,mEAAmE;AACnE,KAAK,OAAO,CAAC;AAEb,OAAO,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Global color palette — raw atomic values, no semantics.
3
+ * Component code must NEVER reference these directly; consume Alias tokens instead.
4
+ * See specs/00-foundation/tokens.spec.md.
5
+ *
6
+ * Values are the real Semi Design palette (0 lightest → 9 darkest), captured
7
+ * from the Semi Design reference. The library targets 100% Semi color parity;
8
+ * note grey-0 is #f9f9f9 (not pure white) per Semi.
9
+ */
10
+ export declare const palette: {
11
+ readonly 'grey-0': "#f9f9f9";
12
+ readonly 'grey-1': "#e6e8ea";
13
+ readonly 'grey-2': "#c6cacd";
14
+ readonly 'grey-3': "#a7abb0";
15
+ readonly 'grey-4': "#888d92";
16
+ readonly 'grey-5': "#6b7075";
17
+ readonly 'grey-6': "#555b61";
18
+ readonly 'grey-7': "#41464c";
19
+ readonly 'grey-8': "#2e3238";
20
+ readonly 'grey-9': "#1c1f23";
21
+ readonly 'blue-0': "#eaf5ff";
22
+ readonly 'blue-1': "#cbe7fe";
23
+ readonly 'blue-2': "#98cdfd";
24
+ readonly 'blue-3': "#65b2fc";
25
+ readonly 'blue-4': "#3295fb";
26
+ readonly 'blue-5': "#0064fa";
27
+ readonly 'blue-6': "#0062d6";
28
+ readonly 'blue-7': "#004fb3";
29
+ readonly 'blue-8': "#003d8f";
30
+ readonly 'blue-9': "#002c6b";
31
+ readonly 'green-0': "#ecf7ec";
32
+ readonly 'green-1': "#d0f0d1";
33
+ readonly 'green-2': "#a4e0a7";
34
+ readonly 'green-3': "#7dd182";
35
+ readonly 'green-4': "#5ac262";
36
+ readonly 'green-5': "#3bb346";
37
+ readonly 'green-6': "#30953b";
38
+ readonly 'green-7': "#25772f";
39
+ readonly 'green-8': "#1b5924";
40
+ readonly 'green-9': "#113c18";
41
+ readonly 'red-0': "#fef2ed";
42
+ readonly 'red-1': "#feddd2";
43
+ readonly 'red-2': "#fdb7a5";
44
+ readonly 'red-3': "#fb9078";
45
+ readonly 'red-4': "#fa664c";
46
+ readonly 'red-5': "#f93920";
47
+ readonly 'red-6': "#d52515";
48
+ readonly 'red-7': "#b2140c";
49
+ readonly 'red-8': "#8e0805";
50
+ readonly 'red-9': "#6a0103";
51
+ readonly 'orange-0': "#fff8ea";
52
+ readonly 'orange-1': "#feeecc";
53
+ readonly 'orange-2': "#fed998";
54
+ readonly 'orange-3': "#fdc165";
55
+ readonly 'orange-4': "#fda633";
56
+ readonly 'orange-5': "#fc8800";
57
+ readonly 'orange-6': "#d26700";
58
+ readonly 'orange-7': "#a84a00";
59
+ readonly 'orange-8': "#7e3100";
60
+ readonly 'orange-9': "#541d00";
61
+ };
62
+ export type GlobalColorKey = keyof typeof palette;
63
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/global/color.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDV,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,OAAO,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Global color palette — raw atomic values, no semantics.
3
+ * Component code must NEVER reference these directly; consume Alias tokens instead.
4
+ * See specs/00-foundation/tokens.spec.md.
5
+ *
6
+ * Values are the real Semi Design palette (0 lightest → 9 darkest), captured
7
+ * from the Semi Design reference. The library targets 100% Semi color parity;
8
+ * note grey-0 is #f9f9f9 (not pure white) per Semi.
9
+ */
10
+ export const palette = {
11
+ // Neutral / grey scale (0 lightest → 9 darkest)
12
+ 'grey-0': '#f9f9f9',
13
+ 'grey-1': '#e6e8ea',
14
+ 'grey-2': '#c6cacd',
15
+ 'grey-3': '#a7abb0',
16
+ 'grey-4': '#888d92',
17
+ 'grey-5': '#6b7075',
18
+ 'grey-6': '#555b61',
19
+ 'grey-7': '#41464c',
20
+ 'grey-8': '#2e3238',
21
+ 'grey-9': '#1c1f23',
22
+ // Brand blue
23
+ 'blue-0': '#eaf5ff',
24
+ 'blue-1': '#cbe7fe',
25
+ 'blue-2': '#98cdfd',
26
+ 'blue-3': '#65b2fc',
27
+ 'blue-4': '#3295fb',
28
+ 'blue-5': '#0064fa',
29
+ 'blue-6': '#0062d6',
30
+ 'blue-7': '#004fb3',
31
+ 'blue-8': '#003d8f',
32
+ 'blue-9': '#002c6b',
33
+ // Green (success)
34
+ 'green-0': '#ecf7ec',
35
+ 'green-1': '#d0f0d1',
36
+ 'green-2': '#a4e0a7',
37
+ 'green-3': '#7dd182',
38
+ 'green-4': '#5ac262',
39
+ 'green-5': '#3bb346',
40
+ 'green-6': '#30953b',
41
+ 'green-7': '#25772f',
42
+ 'green-8': '#1b5924',
43
+ 'green-9': '#113c18',
44
+ // Red (danger)
45
+ 'red-0': '#fef2ed',
46
+ 'red-1': '#feddd2',
47
+ 'red-2': '#fdb7a5',
48
+ 'red-3': '#fb9078',
49
+ 'red-4': '#fa664c',
50
+ 'red-5': '#f93920',
51
+ 'red-6': '#d52515',
52
+ 'red-7': '#b2140c',
53
+ 'red-8': '#8e0805',
54
+ 'red-9': '#6a0103',
55
+ // Orange (warning) — Semi's warning ramp is orange, not yellow
56
+ 'orange-0': '#fff8ea',
57
+ 'orange-1': '#feeecc',
58
+ 'orange-2': '#fed998',
59
+ 'orange-3': '#fdc165',
60
+ 'orange-4': '#fda633',
61
+ 'orange-5': '#fc8800',
62
+ 'orange-6': '#d26700',
63
+ 'orange-7': '#a84a00',
64
+ 'orange-8': '#7e3100',
65
+ 'orange-9': '#541d00',
66
+ };
67
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","sourceRoot":"","sources":["../../src/global/color.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,gDAAgD;IAChD,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,aAAa;IACb,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,kBAAkB;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,eAAe;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,+DAA+D;IAC/D,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;CACb,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Global non-color scales — spacing, radius, typography, shadow, motion, z-index.
3
+ * Atomic values only. Consume via Alias / Component tokens.
4
+ */
5
+ export declare const spacing: {
6
+ readonly '1': "4px";
7
+ readonly '2': "8px";
8
+ readonly '3': "12px";
9
+ readonly '4': "16px";
10
+ readonly '5': "20px";
11
+ readonly '6': "24px";
12
+ readonly '8': "32px";
13
+ readonly '10': "40px";
14
+ readonly '12': "48px";
15
+ };
16
+ export declare const radius: {
17
+ readonly '1': "3px";
18
+ readonly '2': "6px";
19
+ readonly '3': "12px";
20
+ readonly full: "9999px";
21
+ };
22
+ export declare const fontSize: {
23
+ readonly '1': "12px";
24
+ readonly '2': "14px";
25
+ readonly '3': "16px";
26
+ readonly '4': "20px";
27
+ readonly '5': "24px";
28
+ readonly '6': "32px";
29
+ };
30
+ export declare const fontWeight: {
31
+ readonly regular: "400";
32
+ readonly medium: "500";
33
+ readonly semibold: "600";
34
+ };
35
+ export declare const lineHeight: {
36
+ readonly tight: "1.3";
37
+ readonly normal: "1.5";
38
+ readonly loose: "1.7";
39
+ };
40
+ export declare const shadow: {
41
+ readonly '1': "0 1px 2px rgba(0,0,0,.08)";
42
+ readonly '2': "0 4px 12px rgba(0,0,0,.12)";
43
+ readonly '3': "0 8px 24px rgba(0,0,0,.16)";
44
+ };
45
+ export declare const motion: {
46
+ readonly 'duration-fast': "120ms";
47
+ readonly 'duration-mid': "200ms";
48
+ readonly 'duration-slow': "320ms";
49
+ readonly 'ease-standard': "cubic-bezier(.4,0,.2,1)";
50
+ };
51
+ export declare const zIndex: {
52
+ readonly affix: "10";
53
+ readonly sticky: "900";
54
+ readonly dropdown: "1050";
55
+ readonly modal: "1000";
56
+ readonly popover: "1030";
57
+ readonly toast: "1080";
58
+ readonly tooltip: "1070";
59
+ };
60
+ /** Responsive breakpoints (min-width). Emitted as CSS vars AND used as build-time
61
+ * constants for media queries (CSS @media cannot use var()). See Grid/Layout specs. */
62
+ export declare const breakpoint: {
63
+ readonly sm: "576px";
64
+ readonly md: "768px";
65
+ readonly lg: "992px";
66
+ readonly xl: "1200px";
67
+ readonly xxl: "1600px";
68
+ };
69
+ //# sourceMappingURL=scales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../src/global/scales.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;CAUV,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;CAKT,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AAEX,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;CAKT,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;;;;CAQT,CAAC;AAEX;wFACwF;AACxF,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Global non-color scales — spacing, radius, typography, shadow, motion, z-index.
3
+ * Atomic values only. Consume via Alias / Component tokens.
4
+ */
5
+ export const spacing = {
6
+ '1': '4px',
7
+ '2': '8px',
8
+ '3': '12px',
9
+ '4': '16px',
10
+ '5': '20px',
11
+ '6': '24px',
12
+ '8': '32px',
13
+ '10': '40px',
14
+ '12': '48px',
15
+ };
16
+ export const radius = {
17
+ '1': '3px',
18
+ '2': '6px',
19
+ '3': '12px',
20
+ full: '9999px',
21
+ };
22
+ export const fontSize = {
23
+ '1': '12px',
24
+ '2': '14px',
25
+ '3': '16px',
26
+ '4': '20px',
27
+ '5': '24px',
28
+ '6': '32px',
29
+ };
30
+ export const fontWeight = {
31
+ regular: '400',
32
+ medium: '500',
33
+ semibold: '600',
34
+ };
35
+ export const lineHeight = {
36
+ tight: '1.3',
37
+ normal: '1.5',
38
+ loose: '1.7',
39
+ };
40
+ export const shadow = {
41
+ '1': '0 1px 2px rgba(0,0,0,.08)',
42
+ '2': '0 4px 12px rgba(0,0,0,.12)',
43
+ '3': '0 8px 24px rgba(0,0,0,.16)',
44
+ };
45
+ export const motion = {
46
+ 'duration-fast': '120ms',
47
+ 'duration-mid': '200ms',
48
+ 'duration-slow': '320ms',
49
+ 'ease-standard': 'cubic-bezier(.4,0,.2,1)',
50
+ };
51
+ export const zIndex = {
52
+ affix: '10',
53
+ sticky: '900',
54
+ dropdown: '1050',
55
+ modal: '1000',
56
+ popover: '1030',
57
+ toast: '1080',
58
+ tooltip: '1070',
59
+ };
60
+ /** Responsive breakpoints (min-width). Emitted as CSS vars AND used as build-time
61
+ * constants for media queries (CSS @media cannot use var()). See Grid/Layout specs. */
62
+ export const breakpoint = {
63
+ sm: '576px',
64
+ md: '768px',
65
+ lg: '992px',
66
+ xl: '1200px',
67
+ xxl: '1600px',
68
+ };
69
+ //# sourceMappingURL=scales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scales.js","sourceRoot":"","sources":["../../src/global/scales.ts"],"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,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,MAAM;CACP,CAAC;AAEX;wFACwF;AACxF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,GAAG,EAAE,QAAQ;CACL,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Public token API: typed key union + var() resolver.
3
+ * The actual values live in tokens.css (generated). Consumers reference vars.
4
+ */
5
+ import { aliasLight } from './alias/index.js';
6
+ import { componentTokens } from './components/index.js';
7
+ export declare const prefix: "--cd-";
8
+ export type AliasTokenKey = keyof typeof aliasLight;
9
+ export type ComponentTokenKey = keyof typeof componentTokens;
10
+ export type TokenKey = AliasTokenKey | ComponentTokenKey;
11
+ /** resolve a semantic/component token name to its CSS var() reference */
12
+ export declare function tk(name: TokenKey): string;
13
+ export { palette } from './global/color.js';
14
+ export { aliasLight, aliasDark } from './alias/index.js';
15
+ export { breakpoint } from './global/scales.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,eAAO,MAAM,MAAM,EAAG,OAAgB,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAC;AACpD,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,eAAe,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,iBAAiB,CAAC;AAEzD,yEAAyE;AACzE,wBAAgB,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEzC;AAED,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Public token API: typed key union + var() resolver.
3
+ * The actual values live in tokens.css (generated). Consumers reference vars.
4
+ */
5
+ import { aliasLight } from './alias/index.js';
6
+ import { componentTokens } from './components/index.js';
7
+ export const prefix = '--cd-';
8
+ /** resolve a semantic/component token name to its CSS var() reference */
9
+ export function tk(name) {
10
+ return `var(${prefix}${name})`;
11
+ }
12
+ export { palette } from './global/color.js';
13
+ export { aliasLight, aliasDark } from './alias/index.js';
14
+ export { breakpoint } from './global/scales.js';
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,CAAC,MAAM,MAAM,GAAG,OAAgB,CAAC;AAMvC,yEAAyE;AACzE,MAAM,UAAU,EAAE,CAAC,IAAc;IAC/B,OAAO,OAAO,MAAM,GAAG,IAAI,GAAG,CAAC;AACjC,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}