tuiuiu.js 1.0.4 → 1.0.6-next.4ff3fbc

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 (292) hide show
  1. package/dist/app/render-loop.d.ts +2 -0
  2. package/dist/app/render-loop.d.ts.map +1 -1
  3. package/dist/app/render-loop.js +14 -3
  4. package/dist/app/render-loop.js.map +1 -1
  5. package/dist/atoms/button.d.ts +1 -1
  6. package/dist/atoms/button.d.ts.map +1 -1
  7. package/dist/atoms/button.js +13 -11
  8. package/dist/atoms/button.js.map +1 -1
  9. package/dist/atoms/progress-bar.d.ts.map +1 -1
  10. package/dist/atoms/progress-bar.js +15 -12
  11. package/dist/atoms/progress-bar.js.map +1 -1
  12. package/dist/atoms/scrollbar.d.ts +30 -0
  13. package/dist/atoms/scrollbar.d.ts.map +1 -0
  14. package/dist/atoms/scrollbar.js +46 -0
  15. package/dist/atoms/scrollbar.js.map +1 -0
  16. package/dist/atoms/slider.js +6 -6
  17. package/dist/atoms/slider.js.map +1 -1
  18. package/dist/atoms/spinner.d.ts.map +1 -1
  19. package/dist/atoms/spinner.js +3 -2
  20. package/dist/atoms/spinner.js.map +1 -1
  21. package/dist/atoms/switch.d.ts.map +1 -1
  22. package/dist/atoms/switch.js +3 -2
  23. package/dist/atoms/switch.js.map +1 -1
  24. package/dist/atoms/text-input.d.ts.map +1 -1
  25. package/dist/atoms/text-input.js +6 -5
  26. package/dist/atoms/text-input.js.map +1 -1
  27. package/dist/atoms/timer.d.ts +1 -1
  28. package/dist/atoms/timer.js +4 -4
  29. package/dist/atoms/timer.js.map +1 -1
  30. package/dist/atoms/tooltip.d.ts +4 -4
  31. package/dist/atoms/tooltip.js +19 -19
  32. package/dist/atoms/tooltip.js.map +1 -1
  33. package/dist/core/delta-render.d.ts.map +1 -1
  34. package/dist/core/delta-render.js +17 -12
  35. package/dist/core/delta-render.js.map +1 -1
  36. package/dist/core/index.d.ts +2 -2
  37. package/dist/core/index.d.ts.map +1 -1
  38. package/dist/core/index.js +15 -3
  39. package/dist/core/index.js.map +1 -1
  40. package/dist/core/renderer.d.ts +4 -2
  41. package/dist/core/renderer.d.ts.map +1 -1
  42. package/dist/core/renderer.js +70 -43
  43. package/dist/core/renderer.js.map +1 -1
  44. package/dist/core/theme-loader.d.ts +89 -0
  45. package/dist/core/theme-loader.d.ts.map +1 -0
  46. package/dist/core/theme-loader.js +228 -0
  47. package/dist/core/theme-loader.js.map +1 -0
  48. package/dist/core/theme-types.d.ts +577 -0
  49. package/dist/core/theme-types.d.ts.map +1 -0
  50. package/dist/core/theme-types.js +13 -0
  51. package/dist/core/theme-types.js.map +1 -0
  52. package/dist/core/theme.d.ts +155 -236
  53. package/dist/core/theme.d.ts.map +1 -1
  54. package/dist/core/theme.js +418 -709
  55. package/dist/core/theme.js.map +1 -1
  56. package/dist/design-system/core/renderer.d.ts +14 -3
  57. package/dist/design-system/core/renderer.d.ts.map +1 -1
  58. package/dist/design-system/core/renderer.js +77 -38
  59. package/dist/design-system/core/renderer.js.map +1 -1
  60. package/dist/design-system/feedback/badge.d.ts +2 -8
  61. package/dist/design-system/feedback/badge.d.ts.map +1 -1
  62. package/dist/design-system/feedback/badge.js +32 -8
  63. package/dist/design-system/feedback/badge.js.map +1 -1
  64. package/dist/design-system/feedback/progress-bar.d.ts.map +1 -1
  65. package/dist/design-system/feedback/progress-bar.js +15 -12
  66. package/dist/design-system/feedback/progress-bar.js.map +1 -1
  67. package/dist/design-system/feedback/spinner.d.ts.map +1 -1
  68. package/dist/design-system/feedback/spinner.js +4 -3
  69. package/dist/design-system/feedback/spinner.js.map +1 -1
  70. package/dist/design-system/feedback/timer.js +3 -3
  71. package/dist/design-system/feedback/timer.js.map +1 -1
  72. package/dist/design-system/layout/app.js +6 -6
  73. package/dist/design-system/layout/app.js.map +1 -1
  74. package/dist/design-system/navigation/file-manager.js +15 -15
  75. package/dist/design-system/navigation/file-manager.js.map +1 -1
  76. package/dist/design-system/visual/big-text.js +6 -6
  77. package/dist/design-system/visual/big-text.js.map +1 -1
  78. package/dist/design-system/visual/digits.js +7 -7
  79. package/dist/design-system/visual/digits.js.map +1 -1
  80. package/dist/design-system/visual/splash-screen.d.ts.map +1 -1
  81. package/dist/design-system/visual/splash-screen.js +23 -17
  82. package/dist/design-system/visual/splash-screen.js.map +1 -1
  83. package/dist/design-system/visual/tooltip.js +16 -16
  84. package/dist/design-system/visual/tooltip.js.map +1 -1
  85. package/dist/hooks/index.d.ts +1 -1
  86. package/dist/hooks/index.d.ts.map +1 -1
  87. package/dist/hooks/index.js +1 -1
  88. package/dist/hooks/index.js.map +1 -1
  89. package/dist/hooks/types.d.ts +2 -0
  90. package/dist/hooks/types.d.ts.map +1 -1
  91. package/dist/hooks/use-app.d.ts +5 -0
  92. package/dist/hooks/use-app.d.ts.map +1 -1
  93. package/dist/hooks/use-app.js +10 -0
  94. package/dist/hooks/use-app.js.map +1 -1
  95. package/dist/index.d.ts +3 -3
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +11 -3
  98. package/dist/index.js.map +1 -1
  99. package/dist/mcp/docs-data.d.ts.map +1 -1
  100. package/dist/mcp/docs-data.js +625 -28
  101. package/dist/mcp/docs-data.js.map +1 -1
  102. package/dist/mcp/server.js +1 -1
  103. package/dist/molecules/autocomplete.js +10 -10
  104. package/dist/molecules/autocomplete.js.map +1 -1
  105. package/dist/molecules/calendar.d.ts.map +1 -1
  106. package/dist/molecules/calendar.js +13 -12
  107. package/dist/molecules/calendar.js.map +1 -1
  108. package/dist/molecules/code-block.js +21 -21
  109. package/dist/molecules/code-block.js.map +1 -1
  110. package/dist/molecules/collapsible.d.ts +9 -5
  111. package/dist/molecules/collapsible.d.ts.map +1 -1
  112. package/dist/molecules/collapsible.js +39 -7
  113. package/dist/molecules/collapsible.js.map +1 -1
  114. package/dist/molecules/data-viz/bar-chart.js +8 -8
  115. package/dist/molecules/data-viz/bar-chart.js.map +1 -1
  116. package/dist/molecules/data-viz/gauge.d.ts.map +1 -1
  117. package/dist/molecules/data-viz/gauge.js +17 -17
  118. package/dist/molecules/data-viz/gauge.js.map +1 -1
  119. package/dist/molecules/data-viz/heatmap.js +11 -11
  120. package/dist/molecules/data-viz/heatmap.js.map +1 -1
  121. package/dist/molecules/data-viz/legend.js +3 -3
  122. package/dist/molecules/data-viz/legend.js.map +1 -1
  123. package/dist/molecules/data-viz/line-chart.js +4 -4
  124. package/dist/molecules/data-viz/line-chart.js.map +1 -1
  125. package/dist/molecules/data-viz/sparkline.js +1 -1
  126. package/dist/molecules/data-viz/sparkline.js.map +1 -1
  127. package/dist/molecules/markdown.js +23 -23
  128. package/dist/molecules/markdown.js.map +1 -1
  129. package/dist/molecules/multi-select.js +9 -9
  130. package/dist/molecules/multi-select.js.map +1 -1
  131. package/dist/molecules/radio-group.js +8 -8
  132. package/dist/molecules/radio-group.js.map +1 -1
  133. package/dist/molecules/select.d.ts.map +1 -1
  134. package/dist/molecules/select.js +15 -13
  135. package/dist/molecules/select.js.map +1 -1
  136. package/dist/molecules/table.js +3 -3
  137. package/dist/molecules/table.js.map +1 -1
  138. package/dist/molecules/tabs.d.ts +6 -2
  139. package/dist/molecules/tabs.d.ts.map +1 -1
  140. package/dist/molecules/tabs.js +25 -13
  141. package/dist/molecules/tabs.js.map +1 -1
  142. package/dist/molecules/tree.js +5 -5
  143. package/dist/molecules/tree.js.map +1 -1
  144. package/dist/organisms/command-palette.d.ts.map +1 -1
  145. package/dist/organisms/command-palette.js +19 -17
  146. package/dist/organisms/command-palette.js.map +1 -1
  147. package/dist/organisms/data-table.js +5 -5
  148. package/dist/organisms/data-table.js.map +1 -1
  149. package/dist/organisms/file-browser.js +15 -15
  150. package/dist/organisms/file-browser.js.map +1 -1
  151. package/dist/organisms/index.d.ts +2 -1
  152. package/dist/organisms/index.d.ts.map +1 -1
  153. package/dist/organisms/index.js +13 -1
  154. package/dist/organisms/index.js.map +1 -1
  155. package/dist/organisms/modal.d.ts +46 -0
  156. package/dist/organisms/modal.d.ts.map +1 -1
  157. package/dist/organisms/modal.js +110 -29
  158. package/dist/organisms/modal.js.map +1 -1
  159. package/dist/organisms/scroll-area.js +6 -6
  160. package/dist/organisms/scroll-area.js.map +1 -1
  161. package/dist/organisms/scroll-list.d.ts +168 -0
  162. package/dist/organisms/scroll-list.d.ts.map +1 -0
  163. package/dist/organisms/scroll-list.js +338 -0
  164. package/dist/organisms/scroll-list.js.map +1 -0
  165. package/dist/organisms/split-panel.d.ts.map +1 -1
  166. package/dist/organisms/split-panel.js +7 -4
  167. package/dist/organisms/split-panel.js.map +1 -1
  168. package/dist/primitives/divider.d.ts.map +1 -1
  169. package/dist/primitives/divider.js +4 -3
  170. package/dist/primitives/divider.js.map +1 -1
  171. package/dist/primitives/index.d.ts +1 -0
  172. package/dist/primitives/index.d.ts.map +1 -1
  173. package/dist/primitives/index.js +1 -0
  174. package/dist/primitives/index.js.map +1 -1
  175. package/dist/primitives/nodes.d.ts.map +1 -1
  176. package/dist/primitives/nodes.js +5 -3
  177. package/dist/primitives/nodes.js.map +1 -1
  178. package/dist/primitives/scroll.d.ts +127 -0
  179. package/dist/primitives/scroll.d.ts.map +1 -0
  180. package/dist/primitives/scroll.js +202 -0
  181. package/dist/primitives/scroll.js.map +1 -0
  182. package/dist/storybook/app.d.ts.map +1 -1
  183. package/dist/storybook/app.js +218 -84
  184. package/dist/storybook/app.js.map +1 -1
  185. package/dist/storybook/components/compare-view.d.ts.map +1 -1
  186. package/dist/storybook/components/compare-view.js +25 -19
  187. package/dist/storybook/components/compare-view.js.map +1 -1
  188. package/dist/storybook/components/hotkeys-panel.d.ts +12 -0
  189. package/dist/storybook/components/hotkeys-panel.d.ts.map +1 -0
  190. package/dist/storybook/components/hotkeys-panel.js +44 -0
  191. package/dist/storybook/components/hotkeys-panel.js.map +1 -0
  192. package/dist/storybook/components/index.d.ts +6 -0
  193. package/dist/storybook/components/index.d.ts.map +1 -1
  194. package/dist/storybook/components/index.js +9 -0
  195. package/dist/storybook/components/index.js.map +1 -1
  196. package/dist/storybook/components/log-viewer.d.ts +9 -4
  197. package/dist/storybook/components/log-viewer.d.ts.map +1 -1
  198. package/dist/storybook/components/log-viewer.js +97 -35
  199. package/dist/storybook/components/log-viewer.js.map +1 -1
  200. package/dist/storybook/components/navbar.d.ts +17 -0
  201. package/dist/storybook/components/navbar.d.ts.map +1 -0
  202. package/dist/storybook/components/navbar.js +52 -0
  203. package/dist/storybook/components/navbar.js.map +1 -0
  204. package/dist/storybook/components/pressed-keys.d.ts +29 -0
  205. package/dist/storybook/components/pressed-keys.d.ts.map +1 -0
  206. package/dist/storybook/components/pressed-keys.js +148 -0
  207. package/dist/storybook/components/pressed-keys.js.map +1 -0
  208. package/dist/storybook/components/preview.d.ts.map +1 -1
  209. package/dist/storybook/components/preview.js +44 -34
  210. package/dist/storybook/components/preview.js.map +1 -1
  211. package/dist/storybook/components/search-bar.d.ts +29 -0
  212. package/dist/storybook/components/search-bar.d.ts.map +1 -0
  213. package/dist/storybook/components/search-bar.js +101 -0
  214. package/dist/storybook/components/search-bar.js.map +1 -0
  215. package/dist/storybook/components/sidebar.d.ts.map +1 -1
  216. package/dist/storybook/components/sidebar.js +27 -21
  217. package/dist/storybook/components/sidebar.js.map +1 -1
  218. package/dist/storybook/components/status-bar.d.ts +22 -0
  219. package/dist/storybook/components/status-bar.d.ts.map +1 -0
  220. package/dist/storybook/components/status-bar.js +64 -0
  221. package/dist/storybook/components/status-bar.js.map +1 -0
  222. package/dist/storybook/store.d.ts +13 -1
  223. package/dist/storybook/store.d.ts.map +1 -1
  224. package/dist/storybook/store.js +21 -1
  225. package/dist/storybook/store.js.map +1 -1
  226. package/dist/storybook/stories/apps/index.d.ts.map +1 -1
  227. package/dist/storybook/stories/apps/index.js +82 -147
  228. package/dist/storybook/stories/apps/index.js.map +1 -1
  229. package/dist/storybook/stories/atoms/index.d.ts.map +1 -1
  230. package/dist/storybook/stories/atoms/index.js +57 -52
  231. package/dist/storybook/stories/atoms/index.js.map +1 -1
  232. package/dist/storybook/stories/molecules/index.d.ts +16 -0
  233. package/dist/storybook/stories/molecules/index.d.ts.map +1 -1
  234. package/dist/storybook/stories/molecules/index.js +299 -91
  235. package/dist/storybook/stories/molecules/index.js.map +1 -1
  236. package/dist/storybook/stories/organisms/index.d.ts.map +1 -1
  237. package/dist/storybook/stories/organisms/index.js +207 -120
  238. package/dist/storybook/stories/organisms/index.js.map +1 -1
  239. package/dist/templates/app.d.ts +28 -23
  240. package/dist/templates/app.d.ts.map +1 -1
  241. package/dist/templates/app.js +104 -17
  242. package/dist/templates/app.js.map +1 -1
  243. package/dist/themes/catppuccin.theme.d.ts +8 -0
  244. package/dist/themes/catppuccin.theme.d.ts.map +1 -0
  245. package/dist/themes/catppuccin.theme.js +538 -0
  246. package/dist/themes/catppuccin.theme.js.map +1 -0
  247. package/dist/themes/dark.theme.d.ts +8 -0
  248. package/dist/themes/dark.theme.d.ts.map +1 -0
  249. package/dist/themes/dark.theme.js +502 -0
  250. package/dist/themes/dark.theme.js.map +1 -0
  251. package/dist/themes/dracula.theme.d.ts +8 -0
  252. package/dist/themes/dracula.theme.d.ts.map +1 -0
  253. package/dist/themes/dracula.theme.js +518 -0
  254. package/dist/themes/dracula.theme.js.map +1 -0
  255. package/dist/themes/gruvbox.theme.d.ts +8 -0
  256. package/dist/themes/gruvbox.theme.d.ts.map +1 -0
  257. package/dist/themes/gruvbox.theme.js +529 -0
  258. package/dist/themes/gruvbox.theme.js.map +1 -0
  259. package/dist/themes/high-contrast-dark.theme.d.ts +8 -0
  260. package/dist/themes/high-contrast-dark.theme.d.ts.map +1 -0
  261. package/dist/themes/high-contrast-dark.theme.js +503 -0
  262. package/dist/themes/high-contrast-dark.theme.js.map +1 -0
  263. package/dist/themes/index.d.ts +58 -0
  264. package/dist/themes/index.d.ts.map +1 -0
  265. package/dist/themes/index.js +75 -0
  266. package/dist/themes/index.js.map +1 -0
  267. package/dist/themes/light.theme.d.ts +8 -0
  268. package/dist/themes/light.theme.d.ts.map +1 -0
  269. package/dist/themes/light.theme.js +502 -0
  270. package/dist/themes/light.theme.js.map +1 -0
  271. package/dist/themes/monochrome.theme.d.ts +8 -0
  272. package/dist/themes/monochrome.theme.d.ts.map +1 -0
  273. package/dist/themes/monochrome.theme.js +503 -0
  274. package/dist/themes/monochrome.theme.js.map +1 -0
  275. package/dist/themes/monokai.theme.d.ts +8 -0
  276. package/dist/themes/monokai.theme.d.ts.map +1 -0
  277. package/dist/themes/monokai.theme.js +518 -0
  278. package/dist/themes/monokai.theme.js.map +1 -0
  279. package/dist/themes/nord.theme.d.ts +8 -0
  280. package/dist/themes/nord.theme.d.ts.map +1 -0
  281. package/dist/themes/nord.theme.js +527 -0
  282. package/dist/themes/nord.theme.js.map +1 -0
  283. package/dist/themes/solarized-dark.theme.d.ts +8 -0
  284. package/dist/themes/solarized-dark.theme.d.ts.map +1 -0
  285. package/dist/themes/solarized-dark.theme.js +525 -0
  286. package/dist/themes/solarized-dark.theme.js.map +1 -0
  287. package/dist/themes/tokyo-night.theme.d.ts +8 -0
  288. package/dist/themes/tokyo-night.theme.d.ts.map +1 -0
  289. package/dist/themes/tokyo-night.theme.js +529 -0
  290. package/dist/themes/tokyo-night.theme.js.map +1 -0
  291. package/dist/version.js +1 -1
  292. package/package.json +1 -1
@@ -11,6 +11,7 @@
11
11
  import { Box, Text, Spacer } from '../../../primitives/nodes.js';
12
12
  import { Divider } from '../../../primitives/divider.js';
13
13
  import { story, defaultControls } from '../../core/registry.js';
14
+ import { StatusBar, Header } from '../../../templates/app.js';
14
15
  // Chart helper
15
16
  function textBar(value, max, width, filled = '█', empty = '░') {
16
17
  const filledWidth = Math.round((value / max) * width);
@@ -26,20 +27,20 @@ export const formPatternStories = [
26
27
  .render(() => Box({
27
28
  flexDirection: 'column',
28
29
  borderStyle: 'round',
29
- borderColor: 'cyan',
30
+ borderColor: 'primary',
30
31
  padding: 2,
31
32
  width: 40,
32
- }, Box({ marginBottom: 1 }, Text({ color: 'cyan', bold: true }, 'Login')), Box({ flexDirection: 'column', marginBottom: 1 }, Text({ color: 'gray' }, 'Username:'), Box({ borderStyle: 'single', borderColor: 'gray', paddingX: 1 }, Text({}, 'user@example.com'))), Box({ flexDirection: 'column', marginBottom: 1 }, Text({ color: 'gray' }, 'Password:'), Box({ borderStyle: 'single', borderColor: 'gray', paddingX: 1 }, Text({}, '********'))), Box({ flexDirection: 'row', gap: 2 }, Box({ backgroundColor: 'blue', paddingX: 2 }, Text({ color: 'white', bold: true }, 'Login')), Text({ color: 'gray', dim: true }, 'Forgot password?')))),
33
+ }, Box({ marginBottom: 1 }, Text({ color: 'primary', bold: true }, 'Login')), Box({ flexDirection: 'column', marginBottom: 1 }, Text({ color: 'muted' }, 'Username:'), Box({ borderStyle: 'single', borderColor: 'border', paddingX: 1 }, Text({}, 'user@example.com'))), Box({ flexDirection: 'column', marginBottom: 1 }, Text({ color: 'muted' }, 'Password:'), Box({ borderStyle: 'single', borderColor: 'border', paddingX: 1 }, Text({}, '********'))), Box({ flexDirection: 'row', gap: 2 }, Box({ backgroundColor: 'primary', paddingX: 2 }, Text({ color: 'primaryForeground', bold: true }, 'Login')), Text({ color: 'muted', dim: true }, 'Forgot password?')))),
33
34
  story('Form - Settings')
34
35
  .category('Organisms')
35
36
  .description('Settings form pattern')
36
37
  .render(() => Box({
37
38
  flexDirection: 'column',
38
39
  borderStyle: 'single',
39
- borderColor: 'gray',
40
+ borderColor: 'border',
40
41
  padding: 1,
41
42
  width: 50,
42
- }, Box({ marginBottom: 1 }, Text({ color: 'white', bold: true }, 'Settings')), Box({ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 1 }, Text({}, 'Dark Mode'), Text({ color: 'green' }, '[ON]')), Box({ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 1 }, Text({}, 'Notifications'), Text({ color: 'red' }, '[OFF]')), Box({ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 1 }, Text({}, 'Language'), Text({ color: 'cyan' }, 'English ▼')), Box({ flexDirection: 'row', justifyContent: 'space-between' }, Text({}, 'Volume'), Text({ color: 'yellow' }, '████████░░ 80%')))),
43
+ }, Box({ marginBottom: 1 }, Text({ color: 'foreground', bold: true }, 'Settings')), Box({ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 1 }, Text({}, 'Dark Mode'), Text({ color: 'success' }, '[ON]')), Box({ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 1 }, Text({}, 'Notifications'), Text({ color: 'error' }, '[OFF]')), Box({ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 1 }, Text({}, 'Language'), Text({ color: 'primary' }, 'English ▼')), Box({ flexDirection: 'row', justifyContent: 'space-between' }, Text({}, 'Volume'), Text({ color: 'warning' }, '████████░░ 80%')))),
43
44
  ];
44
45
  // ============================================================================
45
46
  // Layout Components
@@ -54,7 +55,7 @@ export const splitPanelStories = [
54
55
  .render((props) => {
55
56
  const leftWidth = Math.floor(58 * (props.ratio / 100));
56
57
  const rightWidth = 58 - leftWidth - 1;
57
- return Box({ width: 60, height: 10, flexDirection: 'row', borderStyle: 'single', borderColor: 'gray' }, Box({ width: leftWidth, height: '100%', backgroundColor: 'blue', padding: 1 }, Text({ color: 'white' }, 'Left Panel')), Box({ width: 1, height: '100%', backgroundColor: 'gray' }, Text({ color: 'white' }, '│')), Box({ width: rightWidth, height: '100%', backgroundColor: 'green', padding: 1 }, Text({ color: 'white' }, 'Right Panel')));
58
+ return Box({ width: 60, height: 10, flexDirection: 'row', borderStyle: 'single', borderColor: 'border' }, Box({ width: leftWidth, height: '100%', backgroundColor: 'info', padding: 1 }, Text({ color: 'foreground' }, 'Left Panel')), Box({ width: 1, height: '100%', backgroundColor: 'muted' }, Text({ color: 'foreground' }, '│')), Box({ width: rightWidth, height: '100%', backgroundColor: 'success', padding: 1 }, Text({ color: 'foreground' }, 'Right Panel')));
58
59
  }),
59
60
  story('SplitPanel - Vertical')
60
61
  .category('Organisms')
@@ -70,13 +71,13 @@ export const splitPanelStories = [
70
71
  height: 15,
71
72
  flexDirection: 'column',
72
73
  borderStyle: 'single',
73
- borderColor: 'gray',
74
- }, Box({ height: topHeight, width: '100%', backgroundColor: 'blue', padding: 1 }, Text({ color: 'white' }, 'Top Panel')), Box({ width: '100%' }, Text({ color: 'gray' }, '─'.repeat(38))), Box({ height: bottomHeight, width: '100%', backgroundColor: 'green', padding: 1 }, Text({ color: 'white' }, 'Bottom Panel')));
74
+ borderColor: 'border',
75
+ }, Box({ height: topHeight, width: '100%', backgroundColor: 'info', padding: 1 }, Text({ color: 'foreground' }, 'Top Panel')), Box({ width: '100%' }, Text({ color: 'muted' }, '─'.repeat(38))), Box({ height: bottomHeight, width: '100%', backgroundColor: 'success', padding: 1 }, Text({ color: 'foreground' }, 'Bottom Panel')));
75
76
  }),
76
77
  story('SplitPanel - Nested')
77
78
  .category('Organisms')
78
79
  .description('Nested split panels')
79
- .render(() => Box({ width: 60, height: 15, borderStyle: 'single', borderColor: 'gray' }, Box({ width: 17, height: '100%', backgroundColor: 'blue', padding: 1 }, Text({ color: 'white' }, 'Sidebar')), Box({ width: 1, height: '100%' }, Text({ color: 'gray' }, '│')), Box({ flexGrow: 1, height: '100%', flexDirection: 'column' }, Box({ height: 9, width: '100%', backgroundColor: 'green', padding: 1 }, Text({ color: 'white' }, 'Main Content')), Box({ width: '100%' }, Text({ color: 'gray' }, '─'.repeat(40))), Box({ height: 3, width: '100%', backgroundColor: 'magenta', padding: 1 }, Text({ color: 'white' }, 'Footer'))))),
80
+ .render(() => Box({ width: 60, height: 15, borderStyle: 'single', borderColor: 'border' }, Box({ width: 17, height: '100%', backgroundColor: 'info', padding: 1 }, Text({ color: 'foreground' }, 'Sidebar')), Box({ width: 1, height: '100%' }, Text({ color: 'muted' }, '│')), Box({ flexGrow: 1, height: '100%', flexDirection: 'column' }, Box({ height: 9, width: '100%', backgroundColor: 'success', padding: 1 }, Text({ color: 'foreground' }, 'Main Content')), Box({ width: '100%' }, Text({ color: 'muted' }, '─'.repeat(40))), Box({ height: 3, width: '100%', backgroundColor: 'secondary', padding: 1 }, Text({ color: 'foreground' }, 'Footer'))))),
80
81
  ];
81
82
  export const gridStories = [
82
83
  story('Grid - Basic')
@@ -89,19 +90,19 @@ export const gridStories = [
89
90
  .render((props) => {
90
91
  const cellWidth = Math.floor((50 - (props.columns - 1) * props.gap) / props.columns);
91
92
  const cells = Array.from({ length: 9 }, (_, i) => i + 1);
92
- const colors = ['blue', 'green', 'magenta'];
93
+ const colors = ['info', 'success', 'secondary'];
93
94
  return Box({ flexDirection: 'column', gap: props.gap, width: 50 }, ...Array.from({ length: Math.ceil(cells.length / props.columns) }, (_, rowIdx) => Box({ flexDirection: 'row', gap: props.gap }, ...cells
94
95
  .slice(rowIdx * props.columns, (rowIdx + 1) * props.columns)
95
96
  .map((cell, colIdx) => Box({
96
97
  width: cellWidth,
97
98
  backgroundColor: colors[(rowIdx * props.columns + colIdx) % 3],
98
99
  padding: 1,
99
- }, Text({ color: 'white' }, `Cell ${cell}`))))));
100
+ }, Text({ color: 'foreground' }, `Cell ${cell}`))))));
100
101
  }),
101
102
  story('Grid - Dashboard Layout')
102
103
  .category('Organisms')
103
104
  .description('Dashboard-style grid layout')
104
- .render(() => Box({ flexDirection: 'column', gap: 1, width: 60 }, Box({ flexDirection: 'row', gap: 1 }, Box({ backgroundColor: 'blue', padding: 1, flexGrow: 1 }, Text({ color: 'white', bold: true }, 'Users: 1.2k')), Box({ backgroundColor: 'green', padding: 1, flexGrow: 1 }, Text({ color: 'white', bold: true }, 'Revenue: $45k')), Box({ backgroundColor: 'magenta', padding: 1, flexGrow: 1 }, Text({ color: 'white', bold: true }, 'Orders: 892'))), Box({ flexDirection: 'row', gap: 1 }, Box({ backgroundColor: 'gray', padding: 1, width: 38 }, Text({ color: 'white' }, 'Chart Area\n▂▃▅▇█▇▅▃▂▃▅▇')), Box({ backgroundColor: 'cyan', padding: 1, flexGrow: 1 }, Text({ color: 'white' }, 'Activity\n• New user\n• Sale\n• Comment'))))),
105
+ .render(() => Box({ flexDirection: 'column', gap: 1, width: 60 }, Box({ flexDirection: 'row', gap: 1 }, Box({ backgroundColor: 'info', padding: 1, flexGrow: 1 }, Text({ color: 'foreground', bold: true }, 'Users: 1.2k')), Box({ backgroundColor: 'success', padding: 1, flexGrow: 1 }, Text({ color: 'foreground', bold: true }, 'Revenue: $45k')), Box({ backgroundColor: 'secondary', padding: 1, flexGrow: 1 }, Text({ color: 'foreground', bold: true }, 'Orders: 892'))), Box({ flexDirection: 'row', gap: 1 }, Box({ backgroundColor: 'muted', padding: 1, width: 38 }, Text({ color: 'foreground' }, 'Chart Area\n▂▃▅▇█▇▅▃▂▃▅▇')), Box({ backgroundColor: 'primary', padding: 1, flexGrow: 1 }, Text({ color: 'primaryForeground' }, 'Activity\n• New user\n• Sale\n• Comment'))))),
105
106
  ];
106
107
  export const stackStories = [
107
108
  story('VStack - Basic')
@@ -110,7 +111,7 @@ export const stackStories = [
110
111
  .controls({
111
112
  gap: defaultControls.range('Gap', 1, 0, 5),
112
113
  })
113
- .render((props) => Box({ flexDirection: 'column', gap: props.gap }, Box({ backgroundColor: 'blue', padding: 1 }, Text({ color: 'white' }, 'Item 1')), Box({ backgroundColor: 'green', padding: 1 }, Text({ color: 'white' }, 'Item 2')), Box({ backgroundColor: 'magenta', padding: 1 }, Text({ color: 'white' }, 'Item 3')))),
114
+ .render((props) => Box({ flexDirection: 'column', gap: props.gap }, Box({ backgroundColor: 'info', padding: 1 }, Text({ color: 'foreground' }, 'Item 1')), Box({ backgroundColor: 'success', padding: 1 }, Text({ color: 'foreground' }, 'Item 2')), Box({ backgroundColor: 'secondary', padding: 1 }, Text({ color: 'foreground' }, 'Item 3')))),
114
115
  story('HStack - Basic')
115
116
  .category('Organisms')
116
117
  .description('Horizontal stack layout')
@@ -118,17 +119,17 @@ export const stackStories = [
118
119
  gap: defaultControls.range('Gap', 2, 0, 5),
119
120
  justify: defaultControls.select('Justify', ['flex-start', 'center', 'flex-end', 'space-between'], 'flex-start'),
120
121
  })
121
- .render((props) => Box({ flexDirection: 'row', gap: props.gap, justifyContent: props.justify, width: 50 }, Box({ backgroundColor: 'blue', padding: 1 }, Text({ color: 'white' }, 'A')), Box({ backgroundColor: 'green', padding: 1 }, Text({ color: 'white' }, 'B')), Box({ backgroundColor: 'magenta', padding: 1 }, Text({ color: 'white' }, 'C')))),
122
+ .render((props) => Box({ flexDirection: 'row', gap: props.gap, justifyContent: props.justify, width: 50 }, Box({ backgroundColor: 'info', padding: 1 }, Text({ color: 'foreground' }, 'A')), Box({ backgroundColor: 'success', padding: 1 }, Text({ color: 'foreground' }, 'B')), Box({ backgroundColor: 'secondary', padding: 1 }, Text({ color: 'foreground' }, 'C')))),
122
123
  story('Stack - Nested')
123
124
  .category('Organisms')
124
125
  .description('Nested stacks for complex layouts')
125
- .render(() => Box({ flexDirection: 'column', gap: 1 }, Box({ flexDirection: 'row', gap: 2, justifyContent: 'space-between', width: 50 }, Text({ color: 'cyan', bold: true }, 'App Title'), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'gray' }, 'Home'), Text({ color: 'gray' }, 'About'), Text({ color: 'gray' }, 'Contact'))), Divider({}), Box({ flexDirection: 'row', gap: 2 }, Box({ flexDirection: 'column', gap: 1, width: 15 }, Text({ color: 'cyan' }, '> Dashboard'), Text({ color: 'gray' }, ' Users'), Text({ color: 'gray' }, ' Settings')), Box({ flexDirection: 'column', gap: 1 }, Text({ bold: true }, 'Dashboard'), Text({ color: 'gray' }, 'Welcome to your dashboard.'))))),
126
+ .render(() => Box({ flexDirection: 'column', gap: 1 }, Box({ flexDirection: 'row', gap: 2, justifyContent: 'space-between', width: 50 }, Text({ color: 'primary', bold: true }, 'App Title'), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'muted' }, 'Home'), Text({ color: 'muted' }, 'About'), Text({ color: 'muted' }, 'Contact'))), Divider({}), Box({ flexDirection: 'row', gap: 2 }, Box({ flexDirection: 'column', gap: 1, width: 15 }, Text({ color: 'primary' }, '> Dashboard'), Text({ color: 'muted' }, ' Users'), Text({ color: 'muted' }, ' Settings')), Box({ flexDirection: 'column', gap: 1 }, Text({ bold: true }, 'Dashboard'), Text({ color: 'muted' }, 'Welcome to your dashboard.'))))),
126
127
  ];
127
128
  export const layoutPatternStories = [
128
129
  story('Layout - Holy Grail')
129
130
  .category('Organisms')
130
131
  .description('Classic header-sidebar-main-footer layout')
131
- .render(() => Box({ flexDirection: 'column', width: 60, height: 15 }, Box({ backgroundColor: 'blue', paddingX: 1, width: '100%' }, Text({ color: 'white', bold: true }, 'Header')), Box({ flexDirection: 'row', flexGrow: 1 }, Box({ backgroundColor: 'green', width: 12, padding: 1 }, Text({ color: 'white' }, 'Sidebar')), Box({ flexGrow: 1, padding: 1 }, Text({}, 'Main Content Area')), Box({ backgroundColor: 'magenta', width: 12, padding: 1 }, Text({ color: 'white' }, 'Aside'))), Box({ backgroundColor: 'cyan', paddingX: 1, width: '100%' }, Text({ color: 'white' }, 'Footer')))),
132
+ .render(() => Box({ flexDirection: 'column', width: 60, height: 15 }, Box({ backgroundColor: 'info', paddingX: 1, width: '100%' }, Text({ color: 'foreground', bold: true }, 'Header')), Box({ flexDirection: 'row', flexGrow: 1 }, Box({ backgroundColor: 'success', width: 12, padding: 1 }, Text({ color: 'foreground' }, 'Sidebar')), Box({ flexGrow: 1, padding: 1 }, Text({}, 'Main Content Area')), Box({ backgroundColor: 'secondary', width: 12, padding: 1 }, Text({ color: 'secondaryForeground' }, 'Aside'))), Box({ backgroundColor: 'primary', paddingX: 1, width: '100%' }, Text({ color: 'primaryForeground' }, 'Footer')))),
132
133
  story('Layout - Sidebar Toggle')
133
134
  .category('Organisms')
134
135
  .description('Layout with collapsible sidebar')
@@ -137,22 +138,22 @@ export const layoutPatternStories = [
137
138
  })
138
139
  .render((props) => Box({ flexDirection: 'row', width: 60, height: 12 }, props.sidebarOpen
139
140
  ? Box({
140
- backgroundColor: 'blue',
141
+ backgroundColor: 'info',
141
142
  width: 20,
142
143
  padding: 1,
143
144
  flexDirection: 'column',
144
- }, Text({ color: 'white', bold: true }, 'Navigation'), Text({ color: 'cyan' }, '> Home'), Text({ color: 'gray' }, ' Files'), Text({ color: 'gray' }, ' Settings'))
145
- : null, Box({ flexGrow: 1, padding: 1, flexDirection: 'column' }, Text({ bold: true }, 'Content'), Text({ color: 'gray' }, props.sidebarOpen ? 'Sidebar is open' : 'Sidebar is closed'), Box({ marginTop: 1 }, Text({ color: 'gray', dim: true }, '[Toggle sidebar with control]'))))),
145
+ }, Text({ color: 'foreground', bold: true }, 'Navigation'), Text({ color: 'primary' }, '> Home'), Text({ color: 'muted' }, ' Files'), Text({ color: 'muted' }, ' Settings'))
146
+ : null, Box({ flexGrow: 1, padding: 1, flexDirection: 'column' }, Text({ bold: true }, 'Content'), Text({ color: 'muted' }, props.sidebarOpen ? 'Sidebar is open' : 'Sidebar is closed'), Box({ marginTop: 1 }, Text({ color: 'muted', dim: true }, '[Toggle sidebar with control]'))))),
146
147
  story('Layout - Card Grid')
147
148
  .category('Organisms')
148
149
  .description('Responsive card grid layout')
149
150
  .render(() => Box({ flexDirection: 'row', flexWrap: 'wrap', gap: 1, width: 60 }, ...Array.from({ length: 6 }, (_, i) => Box({
150
151
  width: 18,
151
152
  borderStyle: 'round',
152
- borderColor: ['cyan', 'green', 'magenta', 'yellow', 'blue', 'red'][i],
153
+ borderColor: ['primary', 'success', 'secondary', 'warning', 'info', 'error'][i],
153
154
  padding: 1,
154
155
  flexDirection: 'column',
155
- }, Text({ bold: true }, `Card ${i + 1}`), Text({ color: 'gray', dim: true }, 'Card content...'))))),
156
+ }, Text({ bold: true }, `Card ${i + 1}`), Text({ color: 'muted', dim: true }, 'Card content...'))))),
156
157
  ];
157
158
  // ============================================================================
158
159
  // Complex Charts
@@ -173,25 +174,25 @@ export const barChartStories = [
173
174
  { label: 'Go', value: 38 },
174
175
  ];
175
176
  const max = Math.max(...data.map((d) => d.value));
176
- return Box({ flexDirection: 'column', gap: 1 }, ...data.map((item) => Box({ flexDirection: 'row', gap: 1 }, Box({ width: 12 }, Text({ color: 'gray' }, item.label)), Text({ color: 'cyan' }, textBar(item.value, max, props.width)), Text({ color: 'gray', dim: true }, ` ${item.value}%`))));
177
+ return Box({ flexDirection: 'column', gap: 1 }, ...data.map((item) => Box({ flexDirection: 'row', gap: 1 }, Box({ width: 12 }, Text({ color: 'muted' }, item.label)), Text({ color: 'primary' }, textBar(item.value, max, props.width)), Text({ color: 'muted', dim: true }, ` ${item.value}%`))));
177
178
  }),
178
179
  story('BarChart - Colored')
179
180
  .category('Organisms')
180
181
  .description('Bar chart with colors')
181
182
  .render(() => {
182
183
  const data = [
183
- { label: 'Success', value: 85, color: 'green' },
184
- { label: 'Warning', value: 45, color: 'yellow' },
185
- { label: 'Error', value: 12, color: 'red' },
186
- { label: 'Info', value: 30, color: 'cyan' },
184
+ { label: 'Success', value: 85, color: 'success' },
185
+ { label: 'Warning', value: 45, color: 'warning' },
186
+ { label: 'Error', value: 12, color: 'error' },
187
+ { label: 'Info', value: 30, color: 'info' },
187
188
  ];
188
189
  const max = 100;
189
- return Box({ flexDirection: 'column', gap: 1 }, ...data.map((item) => Box({ flexDirection: 'row', gap: 1 }, Box({ width: 10 }, Text({ color: 'gray' }, item.label)), Text({ color: item.color }, textBar(item.value, max, 25)), Text({ color: item.color }, ` ${item.value}%`))));
190
+ return Box({ flexDirection: 'column', gap: 1 }, ...data.map((item) => Box({ flexDirection: 'row', gap: 1 }, Box({ width: 10 }, Text({ color: 'muted' }, item.label)), Text({ color: item.color }, textBar(item.value, max, 25)), Text({ color: item.color }, ` ${item.value}%`))));
190
191
  }),
191
192
  story('BarChart - Stacked')
192
193
  .category('Organisms')
193
194
  .description('Stacked bar chart representation')
194
- .render(() => Box({ flexDirection: 'column', gap: 1 }, Box({ flexDirection: 'row', gap: 1 }, Box({ width: 6 }, Text({ color: 'gray' }, 'Q1:')), Text({ backgroundColor: 'blue', color: 'white' }, '████████'), Text({ backgroundColor: 'green', color: 'white' }, '████'), Text({ backgroundColor: 'yellow', color: 'black' }, '██')), Box({ flexDirection: 'row', gap: 1 }, Box({ width: 6 }, Text({ color: 'gray' }, 'Q2:')), Text({ backgroundColor: 'blue', color: 'white' }, '██████████'), Text({ backgroundColor: 'green', color: 'white' }, '██████'), Text({ backgroundColor: 'yellow', color: 'black' }, '███')), Box({ flexDirection: 'row', gap: 1 }, Box({ width: 6 }, Text({ color: 'gray' }, 'Q3:')), Text({ backgroundColor: 'blue', color: 'white' }, '████████████'), Text({ backgroundColor: 'green', color: 'white' }, '████████'), Text({ backgroundColor: 'yellow', color: 'black' }, '████')), Box({ marginTop: 1, flexDirection: 'row', gap: 2 }, Box({}, Text({ color: 'blue' }, '■'), Text({ color: 'gray' }, ' Sales')), Box({}, Text({ color: 'green' }, '■'), Text({ color: 'gray' }, ' Marketing')), Box({}, Text({ color: 'yellow' }, '■'), Text({ color: 'gray' }, ' Support'))))),
195
+ .render(() => Box({ flexDirection: 'column', gap: 1 }, Box({ flexDirection: 'row', gap: 1 }, Box({ width: 6 }, Text({ color: 'muted' }, 'Q1:')), Text({ backgroundColor: 'info', color: 'foreground' }, '████████'), Text({ backgroundColor: 'success', color: 'foreground' }, '████'), Text({ backgroundColor: 'warning', color: 'background' }, '██')), Box({ flexDirection: 'row', gap: 1 }, Box({ width: 6 }, Text({ color: 'muted' }, 'Q2:')), Text({ backgroundColor: 'info', color: 'foreground' }, '██████████'), Text({ backgroundColor: 'success', color: 'foreground' }, '██████'), Text({ backgroundColor: 'warning', color: 'background' }, '███')), Box({ flexDirection: 'row', gap: 1 }, Box({ width: 6 }, Text({ color: 'muted' }, 'Q3:')), Text({ backgroundColor: 'info', color: 'foreground' }, '████████████'), Text({ backgroundColor: 'success', color: 'foreground' }, '████████'), Text({ backgroundColor: 'warning', color: 'background' }, '████')), Box({ marginTop: 1, flexDirection: 'row', gap: 2 }, Box({}, Text({ color: 'info' }, '■'), Text({ color: 'muted' }, ' Sales')), Box({}, Text({ color: 'success' }, '■'), Text({ color: 'muted' }, ' Marketing')), Box({}, Text({ color: 'warning' }, '■'), Text({ color: 'muted' }, ' Support'))))),
195
196
  ];
196
197
  export const heatmapStories = [
197
198
  story('Heatmap - Basic')
@@ -206,28 +207,28 @@ export const heatmapStories = [
206
207
  ];
207
208
  const getColor = (value) => {
208
209
  if (value > 9)
209
- return 'red';
210
+ return 'error';
210
211
  if (value > 6)
211
- return 'yellow';
212
+ return 'warning';
212
213
  if (value > 3)
213
- return 'green';
214
- return 'cyan';
214
+ return 'success';
215
+ return 'primary';
215
216
  };
216
- return Box({ flexDirection: 'column' }, ...data.map((row) => Box({ flexDirection: 'row' }, ...row.map((value) => Text({ backgroundColor: getColor(value), color: 'white' }, ` ${value.toString().padStart(2)} `)))));
217
+ return Box({ flexDirection: 'column' }, ...data.map((row) => Box({ flexDirection: 'row' }, ...row.map((value) => Text({ backgroundColor: getColor(value), color: 'foreground' }, ` ${value.toString().padStart(2)} `)))));
217
218
  }),
218
219
  story('Heatmap - Activity Grid')
219
220
  .category('Organisms')
220
221
  .description('GitHub-style activity heatmap')
221
222
  .render(() => {
222
223
  const blocks = ['░', '▒', '▓', '█'];
223
- const colors = ['gray', 'green', 'greenBright', 'greenBright'];
224
+ const colors = ['muted', 'success', 'success', 'success'];
224
225
  const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
225
226
  const weeks = 5;
226
227
  const getRandomIntensity = () => Math.floor(Math.random() * 4);
227
- return Box({ flexDirection: 'column' }, Box({ marginBottom: 1 }, Text({ color: 'gray' }, 'Activity (last 5 weeks)')), ...days.map((day) => Box({ flexDirection: 'row' }, Box({ width: 4 }, Text({ color: 'gray' }, day)), ...Array.from({ length: weeks }, () => {
228
+ return Box({ flexDirection: 'column' }, Box({ marginBottom: 1 }, Text({ color: 'muted' }, 'Activity (last 5 weeks)')), ...days.map((day) => Box({ flexDirection: 'row' }, Box({ width: 4 }, Text({ color: 'muted' }, day)), ...Array.from({ length: weeks }, () => {
228
229
  const intensity = getRandomIntensity();
229
230
  return Text({ color: colors[intensity] }, blocks[intensity] + ' ');
230
- }))), Box({ marginTop: 1, flexDirection: 'row', gap: 1 }, Text({ color: 'gray', dim: true }, 'Less'), Text({ color: 'gray' }, '░'), Text({ color: 'green' }, '▒'), Text({ color: 'greenBright' }, '▓'), Text({ color: 'greenBright' }, '█'), Text({ color: 'gray', dim: true }, 'More')));
231
+ }))), Box({ marginTop: 1, flexDirection: 'row', gap: 1 }, Text({ color: 'muted', dim: true }, 'Less'), Text({ color: 'muted' }, '░'), Text({ color: 'success' }, '▒'), Text({ color: 'success' }, '▓'), Text({ color: 'success' }, '█'), Text({ color: 'muted', dim: true }, 'More')));
231
232
  }),
232
233
  ];
233
234
  // ============================================================================
@@ -239,39 +240,39 @@ export const dashboardStories = [
239
240
  .description('Dashboard stats cards layout')
240
241
  .render(() => Box({ flexDirection: 'row', gap: 2 }, Box({
241
242
  borderStyle: 'round',
242
- borderColor: 'cyan',
243
+ borderColor: 'primary',
243
244
  padding: 1,
244
245
  width: 18,
245
- }, Box({ flexDirection: 'column' }, Text({ color: 'gray', dim: true }, 'Total Users'), Text({ color: 'cyan', bold: true }, '12,543'), Text({ color: 'green', dim: true }, '↑ 12.5%'))), Box({
246
+ }, Box({ flexDirection: 'column' }, Text({ color: 'muted', dim: true }, 'Total Users'), Text({ color: 'primary', bold: true }, '12,543'), Text({ color: 'success', dim: true }, '↑ 12.5%'))), Box({
246
247
  borderStyle: 'round',
247
- borderColor: 'green',
248
+ borderColor: 'success',
248
249
  padding: 1,
249
250
  width: 18,
250
- }, Box({ flexDirection: 'column' }, Text({ color: 'gray', dim: true }, 'Revenue'), Text({ color: 'green', bold: true }, '$45,231'), Text({ color: 'green', dim: true }, '↑ 8.2%'))), Box({
251
+ }, Box({ flexDirection: 'column' }, Text({ color: 'muted', dim: true }, 'Revenue'), Text({ color: 'success', bold: true }, '$45,231'), Text({ color: 'success', dim: true }, '↑ 8.2%'))), Box({
251
252
  borderStyle: 'round',
252
- borderColor: 'yellow',
253
+ borderColor: 'warning',
253
254
  padding: 1,
254
255
  width: 18,
255
- }, Box({ flexDirection: 'column' }, Text({ color: 'gray', dim: true }, 'Orders'), Text({ color: 'yellow', bold: true }, '892'), Text({ color: 'red', dim: true }, '↓ 3.1%'))))),
256
+ }, Box({ flexDirection: 'column' }, Text({ color: 'muted', dim: true }, 'Orders'), Text({ color: 'warning', bold: true }, '892'), Text({ color: 'error', dim: true }, '↓ 3.1%'))))),
256
257
  story('Pattern - Table')
257
258
  .category('Organisms')
258
259
  .description('Data table pattern')
259
260
  .render(() => Box({
260
261
  flexDirection: 'column',
261
262
  borderStyle: 'single',
262
- borderColor: 'gray',
263
+ borderColor: 'border',
263
264
  width: 60,
264
- }, Box({ flexDirection: 'row', backgroundColor: 'blue', paddingX: 1 }, Box({ width: 20 }, Text({ color: 'white', bold: true }, 'Name')), Box({ width: 15 }, Text({ color: 'white', bold: true }, 'Status')), Box({ width: 10 }, Text({ color: 'white', bold: true }, 'Role')), Text({ color: 'white', bold: true }, 'Actions')), Box({ flexDirection: 'row', paddingX: 1 }, Box({ width: 20 }, Text({}, 'Alice Johnson')), Box({ width: 15 }, Text({ color: 'green' }, '● Active')), Box({ width: 10 }, Text({}, 'Admin')), Text({ color: 'cyan' }, 'Edit | Del')), Box({ flexDirection: 'row', paddingX: 1, backgroundColor: 'gray' }, Box({ width: 20 }, Text({}, 'Bob Smith')), Box({ width: 15 }, Text({ color: 'green' }, '● Active')), Box({ width: 10 }, Text({}, 'User')), Text({ color: 'cyan' }, 'Edit | Del')), Box({ flexDirection: 'row', paddingX: 1 }, Box({ width: 20 }, Text({}, 'Carol White')), Box({ width: 15 }, Text({ color: 'yellow' }, '○ Pending')), Box({ width: 10 }, Text({}, 'User')), Text({ color: 'cyan' }, 'Edit | Del')), Box({ flexDirection: 'row', paddingX: 1, backgroundColor: 'gray' }, Box({ width: 20 }, Text({}, 'David Brown')), Box({ width: 15 }, Text({ color: 'red' }, '○ Inactive')), Box({ width: 10 }, Text({}, 'User')), Text({ color: 'cyan' }, 'Edit | Del')))),
265
+ }, Box({ flexDirection: 'row', backgroundColor: 'info', paddingX: 1 }, Box({ width: 20 }, Text({ color: 'foreground', bold: true }, 'Name')), Box({ width: 15 }, Text({ color: 'foreground', bold: true }, 'Status')), Box({ width: 10 }, Text({ color: 'foreground', bold: true }, 'Role')), Text({ color: 'foreground', bold: true }, 'Actions')), Box({ flexDirection: 'row', paddingX: 1 }, Box({ width: 20 }, Text({}, 'Alice Johnson')), Box({ width: 15 }, Text({ color: 'success' }, '● Active')), Box({ width: 10 }, Text({}, 'Admin')), Text({ color: 'primary' }, 'Edit | Del')), Box({ flexDirection: 'row', paddingX: 1, backgroundColor: 'muted' }, Box({ width: 20 }, Text({}, 'Bob Smith')), Box({ width: 15 }, Text({ color: 'success' }, '● Active')), Box({ width: 10 }, Text({}, 'User')), Text({ color: 'primary' }, 'Edit | Del')), Box({ flexDirection: 'row', paddingX: 1 }, Box({ width: 20 }, Text({}, 'Carol White')), Box({ width: 15 }, Text({ color: 'warning' }, '○ Pending')), Box({ width: 10 }, Text({}, 'User')), Text({ color: 'primary' }, 'Edit | Del')), Box({ flexDirection: 'row', paddingX: 1, backgroundColor: 'muted' }, Box({ width: 20 }, Text({}, 'David Brown')), Box({ width: 15 }, Text({ color: 'error' }, '○ Inactive')), Box({ width: 10 }, Text({}, 'User')), Text({ color: 'primary' }, 'Edit | Del')))),
265
266
  story('Pattern - Activity Feed')
266
267
  .category('Organisms')
267
268
  .description('Activity feed pattern')
268
269
  .render(() => Box({
269
270
  flexDirection: 'column',
270
271
  borderStyle: 'single',
271
- borderColor: 'gray',
272
+ borderColor: 'border',
272
273
  padding: 1,
273
274
  width: 45,
274
- }, Text({ color: 'white', bold: true }, 'Recent Activity'), Box({ marginTop: 1 }), Box({ flexDirection: 'row', gap: 1, marginBottom: 1 }, Text({ color: 'cyan' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'Alice uploaded a file'), Text({ color: 'gray', dim: true }, '2 minutes ago'))), Box({ flexDirection: 'row', gap: 1, marginBottom: 1 }, Text({ color: 'green' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'Bob completed a task'), Text({ color: 'gray', dim: true }, '15 minutes ago'))), Box({ flexDirection: 'row', gap: 1, marginBottom: 1 }, Text({ color: 'yellow' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'Carol added a comment'), Text({ color: 'gray', dim: true }, '1 hour ago'))), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'magenta' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'David joined the team'), Text({ color: 'gray', dim: true }, '3 hours ago'))))),
275
+ }, Text({ color: 'foreground', bold: true }, 'Recent Activity'), Box({ marginTop: 1 }), Box({ flexDirection: 'row', gap: 1, marginBottom: 1 }, Text({ color: 'primary' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'Alice uploaded a file'), Text({ color: 'muted', dim: true }, '2 minutes ago'))), Box({ flexDirection: 'row', gap: 1, marginBottom: 1 }, Text({ color: 'success' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'Bob completed a task'), Text({ color: 'muted', dim: true }, '15 minutes ago'))), Box({ flexDirection: 'row', gap: 1, marginBottom: 1 }, Text({ color: 'warning' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'Carol added a comment'), Text({ color: 'muted', dim: true }, '1 hour ago'))), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'secondary' }, '●'), Box({ flexDirection: 'column' }, Text({}, 'David joined the team'), Text({ color: 'muted', dim: true }, '3 hours ago'))))),
275
276
  ];
276
277
  export const fileBrowserStories = [
277
278
  story('Pattern - File Tree')
@@ -280,28 +281,28 @@ export const fileBrowserStories = [
280
281
  .render(() => Box({
281
282
  flexDirection: 'column',
282
283
  borderStyle: 'single',
283
- borderColor: 'gray',
284
+ borderColor: 'border',
284
285
  padding: 1,
285
286
  width: 40,
286
- }, Text({ color: 'white', bold: true }, 'Files'), Box({ marginTop: 1 }), Text({ color: 'yellow' }, '▼ 📁 src'), Text({ color: 'gray' }, ' ▼ 📁 components'), Text({ color: 'cyan' }, ' ▶ 📁 ui'), Text({}, ' 📄 button.ts'), Text({ inverse: true }, ' 📄 input.ts'), Text({}, ' 📄 modal.ts'), Text({ color: 'cyan' }, ' ▶ 📁 layout'), Text({ color: 'gray' }, ' ▼ 📁 utils'), Text({}, ' 📄 helpers.ts'), Text({ color: 'cyan' }, '▶ 📁 tests'), Text({}, '📄 package.json'), Text({}, '📄 README.md'))),
287
+ }, Text({ color: 'foreground', bold: true }, 'Files'), Box({ marginTop: 1 }), Text({ color: 'warning' }, '▼ 📁 src'), Text({ color: 'muted' }, ' ▼ 📁 components'), Text({ color: 'primary' }, ' ▶ 📁 ui'), Text({}, ' 📄 button.ts'), Text({ inverse: true }, ' 📄 input.ts'), Text({}, ' 📄 modal.ts'), Text({ color: 'primary' }, ' ▶ 📁 layout'), Text({ color: 'muted' }, ' ▼ 📁 utils'), Text({}, ' 📄 helpers.ts'), Text({ color: 'primary' }, '▶ 📁 tests'), Text({}, '📄 package.json'), Text({}, '📄 README.md'))),
287
288
  story('Pattern - File Preview')
288
289
  .category('Organisms')
289
290
  .description('File browser with preview pane')
290
291
  .render(() => Box({ flexDirection: 'row', width: 70, height: 15 }, Box({
291
292
  width: 25,
292
293
  borderStyle: 'single',
293
- borderColor: 'gray',
294
+ borderColor: 'border',
294
295
  flexDirection: 'column',
295
- }, Box({ paddingX: 1, backgroundColor: 'blue' }, Text({ color: 'white', bold: true }, 'Files')), Box({ padding: 1, flexDirection: 'column' }, Text({ color: 'yellow' }, '📁 src'), Text({ color: 'yellow' }, '📁 tests'), Text({ inverse: true }, '📄 package.json'), Text({}, '📄 README.md'), Text({}, '📄 tsconfig.json'))), Box({
296
+ }, Box({ paddingX: 1, backgroundColor: 'info' }, Text({ color: 'foreground', bold: true }, 'Files')), Box({ padding: 1, flexDirection: 'column' }, Text({ color: 'warning' }, '📁 src'), Text({ color: 'warning' }, '📁 tests'), Text({ inverse: true }, '📄 package.json'), Text({}, '📄 README.md'), Text({}, '📄 tsconfig.json'))), Box({
296
297
  flexGrow: 1,
297
298
  borderStyle: 'single',
298
- borderColor: 'cyan',
299
+ borderColor: 'primary',
299
300
  flexDirection: 'column',
300
- }, Box({ paddingX: 1, backgroundColor: 'cyan' }, Text({ color: 'white', bold: true }, 'package.json')), Box({ padding: 1, flexDirection: 'column' }, Text({ color: 'gray' }, '{'), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, ' "name": '), Text({ color: 'green' }, '"tuiuiu"')), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, ' "version": '), Text({ color: 'green' }, '"0.1.0"')), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, ' "type": '), Text({ color: 'green' }, '"module"')), Text({ color: 'gray' }, ' ...'))))),
301
+ }, Box({ paddingX: 1, backgroundColor: 'primary' }, Text({ color: 'primaryForeground', bold: true }, 'package.json')), Box({ padding: 1, flexDirection: 'column' }, Text({ color: 'muted' }, '{'), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, ' "name": '), Text({ color: 'success' }, '"tuiuiu"')), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, ' "version": '), Text({ color: 'success' }, '"0.1.0"')), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, ' "type": '), Text({ color: 'success' }, '"module"')), Text({ color: 'muted' }, ' ...'))))),
301
302
  story('Pattern - Breadcrumbs')
302
303
  .category('Organisms')
303
304
  .description('Breadcrumb navigation pattern')
304
- .render(() => Box({ flexDirection: 'column', gap: 2 }, Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, 'Home'), Text({ color: 'gray' }, ' > '), Text({ color: 'cyan' }, 'Documents'), Text({ color: 'gray' }, ' > '), Text({ color: 'cyan' }, 'Projects'), Text({ color: 'gray' }, ' > '), Text({ color: 'white', bold: true }, 'Report.pdf')), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, '🏠'), Text({ color: 'gray' }, ' / '), Text({ color: 'cyan' }, '📁 src'), Text({ color: 'gray' }, ' / '), Text({ color: 'cyan' }, '📁 components'), Text({ color: 'gray' }, ' / '), Text({ color: 'white', bold: true }, '📄 button.ts')))),
305
+ .render(() => Box({ flexDirection: 'column', gap: 2 }, Box({ flexDirection: 'row' }, Text({ color: 'primary' }, 'Home'), Text({ color: 'muted' }, ' > '), Text({ color: 'primary' }, 'Documents'), Text({ color: 'muted' }, ' > '), Text({ color: 'primary' }, 'Projects'), Text({ color: 'muted' }, ' > '), Text({ color: 'foreground', bold: true }, 'Report.pdf')), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, '🏠'), Text({ color: 'muted' }, ' / '), Text({ color: 'primary' }, '📁 src'), Text({ color: 'muted' }, ' / '), Text({ color: 'primary' }, '📁 components'), Text({ color: 'muted' }, ' / '), Text({ color: 'foreground', bold: true }, '📄 button.ts')))),
305
306
  ];
306
307
  export const chatStories = [
307
308
  story('Pattern - Chat Messages')
@@ -310,40 +311,40 @@ export const chatStories = [
310
311
  .render(() => Box({
311
312
  flexDirection: 'column',
312
313
  borderStyle: 'single',
313
- borderColor: 'gray',
314
+ borderColor: 'border',
314
315
  padding: 1,
315
316
  width: 50,
316
- }, Box({ flexDirection: 'column', marginBottom: 1 }, Text({ color: 'cyan', bold: true }, 'Alice'), Box({
317
+ }, Box({ flexDirection: 'column', marginBottom: 1 }, Text({ color: 'primary', bold: true }, 'Alice'), Box({
317
318
  borderStyle: 'round',
318
- borderColor: 'gray',
319
+ borderColor: 'border',
319
320
  paddingX: 1,
320
321
  marginLeft: 2,
321
- }, Text({}, 'Hey, how are you?')), Text({ color: 'gray', dim: true }, ' 10:30 AM')), Box({ flexDirection: 'column', alignItems: 'flex-end', marginBottom: 1 }, Text({ color: 'green', bold: true }, 'You'), Box({
322
+ }, Text({}, 'Hey, how are you?')), Text({ color: 'muted', dim: true }, ' 10:30 AM')), Box({ flexDirection: 'column', alignItems: 'flex-end', marginBottom: 1 }, Text({ color: 'success', bold: true }, 'You'), Box({
322
323
  borderStyle: 'round',
323
- borderColor: 'green',
324
+ borderColor: 'success',
324
325
  paddingX: 1,
325
326
  marginRight: 2,
326
- }, Text({}, "I'm good, thanks! Working on the TUI.")), Text({ color: 'gray', dim: true }, '10:32 AM ')), Box({ flexDirection: 'column' }, Text({ color: 'cyan', bold: true }, 'Alice'), Box({
327
+ }, Text({}, "I'm good, thanks! Working on the TUI.")), Text({ color: 'muted', dim: true }, '10:32 AM ')), Box({ flexDirection: 'column' }, Text({ color: 'primary', bold: true }, 'Alice'), Box({
327
328
  borderStyle: 'round',
328
- borderColor: 'gray',
329
+ borderColor: 'border',
329
330
  paddingX: 1,
330
331
  marginLeft: 2,
331
- }, Text({}, "That sounds interesting! Can't wait to see it.")), Text({ color: 'gray', dim: true }, ' 10:33 AM')))),
332
+ }, Text({}, "That sounds interesting! Can't wait to see it.")), Text({ color: 'muted', dim: true }, ' 10:33 AM')))),
332
333
  story('Pattern - Chat Input')
333
334
  .category('Organisms')
334
335
  .description('Chat input with actions')
335
336
  .render(() => Box({
336
337
  flexDirection: 'row',
337
338
  borderStyle: 'single',
338
- borderColor: 'cyan',
339
+ borderColor: 'primary',
339
340
  padding: 1,
340
341
  width: 50,
341
342
  gap: 1,
342
- }, Text({ color: 'gray' }, '📎'), Box({ flexGrow: 1 }, Text({ color: 'gray', dim: true }, 'Type a message...')), Text({ color: 'gray' }, '😊'), Text({ color: 'cyan' }, '➤'))),
343
+ }, Text({ color: 'muted' }, '📎'), Box({ flexGrow: 1 }, Text({ color: 'muted', dim: true }, 'Type a message...')), Text({ color: 'muted' }, '😊'), Text({ color: 'primary' }, '➤'))),
343
344
  story('Pattern - Typing Indicator')
344
345
  .category('Organisms')
345
346
  .description('Typing indicator pattern')
346
- .render(() => Box({ flexDirection: 'column', gap: 1 }, Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'gray', dim: true }, 'Alice is typing'), Text({ color: 'gray' }, '...')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'cyan' }, '●'), Text({ color: 'cyan', dim: true }, '●'), Text({ color: 'gray', dim: true }, '●')))),
347
+ .render(() => Box({ flexDirection: 'column', gap: 1 }, Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'muted', dim: true }, 'Alice is typing'), Text({ color: 'muted' }, '...')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'primary' }, '●'), Text({ color: 'primary', dim: true }, '●'), Text({ color: 'muted', dim: true }, '●')))),
347
348
  ];
348
349
  export const commandPaletteStories = [
349
350
  story('Pattern - Command Palette')
@@ -352,23 +353,23 @@ export const commandPaletteStories = [
352
353
  .render(() => Box({
353
354
  flexDirection: 'column',
354
355
  borderStyle: 'round',
355
- borderColor: 'cyan',
356
+ borderColor: 'primary',
356
357
  width: 50,
357
358
  }, Box({
358
359
  paddingX: 1,
359
360
  paddingY: 1,
360
361
  borderStyle: 'single',
361
- borderColor: 'gray',
362
- }, Text({ color: 'gray' }, '> '), Text({ color: 'white' }, 'open file'), Text({ color: 'gray', dim: true }, '...')), Box({ flexDirection: 'column', padding: 1 }, Box({ backgroundColor: 'blue', paddingX: 1, flexDirection: 'row' }, Text({ color: 'white' }, '📄 Open File'), Spacer({}), Text({ color: 'gray' }, 'Ctrl+O')), Box({ paddingX: 1, flexDirection: 'row' }, Text({}, '📁 Open Folder'), Spacer({}), Text({ color: 'gray' }, 'Ctrl+K O')), Box({ paddingX: 1, flexDirection: 'row' }, Text({}, '📝 Open Recent'), Spacer({}), Text({ color: 'gray' }, 'Ctrl+R')), Box({ paddingX: 1, flexDirection: 'row' }, Text({}, '🔍 Open in Explorer'), Spacer({}), Text({ color: 'gray' }, 'Ctrl+Shift+E'))), Box({ paddingX: 1, borderStyle: 'single', borderColor: 'gray' }, Text({ color: 'gray', dim: true }, '↑↓ Navigate '), Text({ color: 'gray', dim: true }, '↵ Select '), Text({ color: 'gray', dim: true }, 'Esc Close')))),
362
+ borderColor: 'border',
363
+ }, Text({ color: 'muted' }, '> '), Text({ color: 'foreground' }, 'open file'), Text({ color: 'muted', dim: true }, '...')), Box({ flexDirection: 'column', padding: 1 }, Box({ backgroundColor: 'info', paddingX: 1, flexDirection: 'row' }, Text({ color: 'foreground' }, '📄 Open File'), Spacer({}), Text({ color: 'muted' }, 'Ctrl+O')), Box({ paddingX: 1, flexDirection: 'row' }, Text({}, '📁 Open Folder'), Spacer({}), Text({ color: 'muted' }, 'Ctrl+K O')), Box({ paddingX: 1, flexDirection: 'row' }, Text({}, '📝 Open Recent'), Spacer({}), Text({ color: 'muted' }, 'Ctrl+R')), Box({ paddingX: 1, flexDirection: 'row' }, Text({}, '🔍 Open in Explorer'), Spacer({}), Text({ color: 'muted' }, 'Ctrl+Shift+E'))), Box({ paddingX: 1, borderStyle: 'single', borderColor: 'border' }, Text({ color: 'muted', dim: true }, '↑↓ Navigate '), Text({ color: 'muted', dim: true }, '↵ Select '), Text({ color: 'muted', dim: true }, 'Esc Close')))),
363
364
  story('Pattern - Quick Actions')
364
365
  .category('Organisms')
365
366
  .description('Quick action menu pattern')
366
367
  .render(() => Box({
367
368
  flexDirection: 'column',
368
369
  borderStyle: 'single',
369
- borderColor: 'gray',
370
+ borderColor: 'border',
370
371
  width: 35,
371
- }, Box({ paddingX: 1, backgroundColor: 'blue' }, Text({ color: 'white', bold: true }, 'Quick Actions')), Box({ flexDirection: 'column', padding: 1 }, Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, '[N] '), Text({}, 'New File')), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, '[S] '), Text({}, 'Save')), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, '[F] '), Text({}, 'Find')), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, '[R] '), Text({}, 'Replace')), Divider({}), Box({ flexDirection: 'row' }, Text({ color: 'cyan' }, '[Q] '), Text({ color: 'gray' }, 'Quit'))))),
372
+ }, Box({ paddingX: 1, backgroundColor: 'info' }, Text({ color: 'foreground', bold: true }, 'Quick Actions')), Box({ flexDirection: 'column', padding: 1 }, Box({ flexDirection: 'row' }, Text({ color: 'primary' }, '[N] '), Text({}, 'New File')), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, '[S] '), Text({}, 'Save')), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, '[F] '), Text({}, 'Find')), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, '[R] '), Text({}, 'Replace')), Divider({}), Box({ flexDirection: 'row' }, Text({ color: 'primary' }, '[Q] '), Text({ color: 'muted' }, 'Quit'))))),
372
373
  ];
373
374
  export const navigationStories = [
374
375
  story('Pattern - Sidebar Nav')
@@ -377,23 +378,23 @@ export const navigationStories = [
377
378
  .render(() => Box({
378
379
  flexDirection: 'column',
379
380
  borderStyle: 'single',
380
- borderColor: 'gray',
381
+ borderColor: 'border',
381
382
  width: 25,
382
383
  height: 15,
383
- }, Box({ paddingX: 1, backgroundColor: 'blue' }, Text({ color: 'white', bold: true }, '🚀 AppName')), Box({ flexDirection: 'column', padding: 1, flexGrow: 1 }, Box({ backgroundColor: 'cyan', paddingX: 1 }, Text({ color: 'white' }, '🏠 Dashboard')), Box({ paddingX: 1 }, Text({ color: 'gray' }, '📊 Analytics')), Box({ paddingX: 1 }, Text({ color: 'gray' }, '👥 Users')), Box({ paddingX: 1 }, Text({ color: 'gray' }, '📁 Files')), Box({ paddingX: 1 }, Text({ color: 'gray' }, '⚙️ Settings')), Spacer({})), Box({ paddingX: 1, borderStyle: 'single', borderColor: 'gray' }, Text({ color: 'gray', dim: true }, '? Help')))),
384
+ }, Box({ paddingX: 1, backgroundColor: 'info' }, Text({ color: 'foreground', bold: true }, '🚀 AppName')), Box({ flexDirection: 'column', padding: 1, flexGrow: 1 }, Box({ backgroundColor: 'primary', paddingX: 1 }, Text({ color: 'primaryForeground' }, '🏠 Dashboard')), Box({ paddingX: 1 }, Text({ color: 'muted' }, '📊 Analytics')), Box({ paddingX: 1 }, Text({ color: 'muted' }, '👥 Users')), Box({ paddingX: 1 }, Text({ color: 'muted' }, '📁 Files')), Box({ paddingX: 1 }, Text({ color: 'muted' }, '⚙️ Settings')), Spacer({})), Box({ paddingX: 1, borderStyle: 'single', borderColor: 'border' }, Text({ color: 'muted', dim: true }, '? Help')))),
384
385
  story('Pattern - Tab Bar')
385
386
  .category('Organisms')
386
387
  .description('Tab bar navigation pattern')
387
- .render(() => Box({ flexDirection: 'column', width: 50 }, Box({ flexDirection: 'row', borderStyle: 'single', borderColor: 'gray' }, Box({ backgroundColor: 'blue', paddingX: 2 }, Text({ color: 'white', bold: true }, 'Overview')), Box({ paddingX: 2 }, Text({ color: 'gray' }, 'Details')), Box({ paddingX: 2 }, Text({ color: 'gray' }, 'Settings')), Box({ paddingX: 2 }, Text({ color: 'gray' }, 'Logs'))), Box({
388
+ .render(() => Box({ flexDirection: 'column', width: 50 }, Box({ flexDirection: 'row', borderStyle: 'single', borderColor: 'border' }, Box({ backgroundColor: 'info', paddingX: 2 }, Text({ color: 'foreground', bold: true }, 'Overview')), Box({ paddingX: 2 }, Text({ color: 'muted' }, 'Details')), Box({ paddingX: 2 }, Text({ color: 'muted' }, 'Settings')), Box({ paddingX: 2 }, Text({ color: 'muted' }, 'Logs'))), Box({
388
389
  borderStyle: 'single',
389
- borderColor: 'blue',
390
+ borderColor: 'info',
390
391
  padding: 1,
391
392
  height: 8,
392
393
  }, Text({}, 'Overview content goes here...')))),
393
394
  story('Pattern - Pagination')
394
395
  .category('Organisms')
395
396
  .description('Pagination controls pattern')
396
- .render(() => Box({ flexDirection: 'row', gap: 1, justifyContent: 'center', width: 50 }, Text({ color: 'gray' }, '« First'), Text({ color: 'cyan' }, '‹ Prev'), Text({ color: 'gray' }, '1'), Text({ color: 'white', inverse: true }, ' 2 '), Text({ color: 'gray' }, '3'), Text({ color: 'gray' }, '4'), Text({ color: 'gray' }, '...'), Text({ color: 'gray' }, '10'), Text({ color: 'cyan' }, 'Next ›'), Text({ color: 'gray' }, 'Last »'))),
397
+ .render(() => Box({ flexDirection: 'row', gap: 1, justifyContent: 'center', width: 50 }, Text({ color: 'muted' }, '« First'), Text({ color: 'primary' }, '‹ Prev'), Text({ color: 'muted' }, '1'), Text({ color: 'foreground', inverse: true }, ' 2 '), Text({ color: 'muted' }, '3'), Text({ color: 'muted' }, '4'), Text({ color: 'muted' }, '...'), Text({ color: 'muted' }, '10'), Text({ color: 'primary' }, 'Next ›'), Text({ color: 'muted' }, 'Last »'))),
397
398
  ];
398
399
  /**
399
400
  * Overlay stories - Modal, Popup, Tooltip, Toast
@@ -410,7 +411,7 @@ const overlayStories = [
410
411
  // Backdrop simulation
411
412
  Box({
412
413
  flexGrow: 1,
413
- backgroundColor: 'gray',
414
+ backgroundColor: 'muted',
414
415
  justifyContent: 'center',
415
416
  alignItems: 'center',
416
417
  },
@@ -419,15 +420,15 @@ const overlayStories = [
419
420
  flexDirection: 'column',
420
421
  width: 40,
421
422
  borderStyle: 'double',
422
- borderColor: 'cyan',
423
- backgroundColor: 'black',
423
+ borderColor: 'primary',
424
+ backgroundColor: 'background',
424
425
  },
425
426
  // Header
426
- Box({ paddingX: 1, justifyContent: 'space-between', borderStyle: 'single', borderColor: 'gray' }, Text({ color: 'cyan', bold: true }, props.title), props.showClose && Text({ color: 'gray' }, '[×]')),
427
+ Box({ paddingX: 1, justifyContent: 'space-between', borderStyle: 'single', borderColor: 'border' }, Text({ color: 'primary', bold: true }, props.title), props.showClose && Text({ color: 'muted' }, '[×]')),
427
428
  // Body
428
429
  Box({ padding: 1, flexGrow: 1 }, Text({}, 'Are you sure you want to proceed with this action?')),
429
430
  // Footer
430
- Box({ paddingX: 1, paddingY: 1, gap: 2, justifyContent: 'flex-end', borderStyle: 'single', borderColor: 'gray' }, Text({ color: 'gray', inverse: true }, ' Cancel '), Text({ color: 'cyan', inverse: true }, ' Confirm ')))))),
431
+ Box({ paddingX: 1, paddingY: 1, gap: 2, justifyContent: 'flex-end', borderStyle: 'single', borderColor: 'border' }, Text({ color: 'muted', inverse: true }, ' Cancel '), Text({ color: 'primary', inverse: true }, ' Confirm ')))))),
431
432
  story('Modal - Alert')
432
433
  .category('Organisms')
433
434
  .description('Alert modal with icon')
@@ -437,9 +438,9 @@ const overlayStories = [
437
438
  .render((props) => {
438
439
  const alertType = props.type || 'warning';
439
440
  const icons = { info: 'ℹ', warning: '⚠', error: '✗', success: '✓' };
440
- const colors = { info: 'cyan', warning: 'yellow', error: 'red', success: 'green' };
441
+ const colors = { info: 'info', warning: 'warning', error: 'error', success: 'success' };
441
442
  const icon = icons[alertType] || '⚠';
442
- const color = colors[alertType] || 'yellow';
443
+ const color = colors[alertType] || 'warning';
443
444
  return Box({
444
445
  flexDirection: 'column',
445
446
  width: 45,
@@ -456,11 +457,11 @@ const overlayStories = [
456
457
  .render((props) => {
457
458
  const renderTooltip = () => Box({
458
459
  borderStyle: 'single',
459
- borderColor: 'yellow',
460
- backgroundColor: 'yellow',
460
+ borderColor: 'warning',
461
+ backgroundColor: 'warning',
461
462
  paddingX: 1,
462
- }, Text({ color: 'black' }, 'Helpful tooltip text'));
463
- return Box({ flexDirection: 'column', alignItems: 'center', gap: 1, padding: 2 }, props.position === 'top' && renderTooltip(), Box({ flexDirection: 'row', gap: 1 }, props.position === 'left' && renderTooltip(), Box({ borderStyle: 'single', borderColor: 'cyan', paddingX: 2, paddingY: 1 }, Text({ color: 'cyan' }, 'Hover me')), props.position === 'right' && renderTooltip()), props.position === 'bottom' && renderTooltip());
463
+ }, Text({ color: 'background' }, 'Helpful tooltip text'));
464
+ return Box({ flexDirection: 'column', alignItems: 'center', gap: 1, padding: 2 }, props.position === 'top' && renderTooltip(), Box({ flexDirection: 'row', gap: 1 }, props.position === 'left' && renderTooltip(), Box({ borderStyle: 'single', borderColor: 'primary', paddingX: 2, paddingY: 1 }, Text({ color: 'primary' }, 'Hover me')), props.position === 'right' && renderTooltip()), props.position === 'bottom' && renderTooltip());
464
465
  }),
465
466
  story('Toast - Notification')
466
467
  .category('Organisms')
@@ -470,7 +471,7 @@ const overlayStories = [
470
471
  })
471
472
  .render((props) => {
472
473
  const icons = { info: 'ℹ', success: '✓', warning: '⚠', error: '✗' };
473
- const colors = { info: 'cyan', success: 'green', warning: 'yellow', error: 'red' };
474
+ const colors = { info: 'info', success: 'success', warning: 'warning', error: 'error' };
474
475
  const messages = {
475
476
  info: 'New update available',
476
477
  success: 'Changes saved successfully!',
@@ -485,36 +486,36 @@ const overlayStories = [
485
486
  borderColor: color,
486
487
  paddingX: 1,
487
488
  width: 35,
488
- }, Text({ color: color }, `${icon} `), Text({}, message), Text({ color: 'gray', dim: true }, ' ×')));
489
+ }, Text({ color: color }, `${icon} `), Text({}, message), Text({ color: 'muted', dim: true }, ' ×')));
489
490
  }),
490
491
  story('Toast - Stack')
491
492
  .category('Organisms')
492
493
  .description('Multiple stacked toasts')
493
- .render(() => Box({ flexDirection: 'column', alignItems: 'flex-end', gap: 1, width: 50 }, Box({ borderStyle: 'round', borderColor: 'green', paddingX: 1, width: 35 }, Text({ color: 'green' }, '✓ '), Text({}, 'File uploaded'), Text({ color: 'gray' }, ' ×')), Box({ borderStyle: 'round', borderColor: 'cyan', paddingX: 1, width: 35 }, Text({ color: 'cyan' }, 'ℹ '), Text({}, '2 new messages'), Text({ color: 'gray' }, ' ×')), Box({ borderStyle: 'round', borderColor: 'yellow', paddingX: 1, width: 35 }, Text({ color: 'yellow' }, '⚠ '), Text({}, 'Low disk space'), Text({ color: 'gray' }, ' ×')))),
494
+ .render(() => Box({ flexDirection: 'column', alignItems: 'flex-end', gap: 1, width: 50 }, Box({ borderStyle: 'round', borderColor: 'success', paddingX: 1, width: 35 }, Text({ color: 'success' }, '✓ '), Text({}, 'File uploaded'), Text({ color: 'muted' }, ' ×')), Box({ borderStyle: 'round', borderColor: 'info', paddingX: 1, width: 35 }, Text({ color: 'info' }, 'ℹ '), Text({}, '2 new messages'), Text({ color: 'muted' }, ' ×')), Box({ borderStyle: 'round', borderColor: 'warning', paddingX: 1, width: 35 }, Text({ color: 'warning' }, '⚠ '), Text({}, 'Low disk space'), Text({ color: 'muted' }, ' ×')))),
494
495
  story('Popup - Dropdown Menu')
495
496
  .category('Organisms')
496
497
  .description('Dropdown popup menu')
497
498
  .render(() => Box({ flexDirection: 'column', width: 40 },
498
499
  // Trigger
499
- Box({ borderStyle: 'single', borderColor: 'cyan', paddingX: 1 }, Text({ color: 'cyan' }, '⚙ Settings ▼')),
500
+ Box({ borderStyle: 'single', borderColor: 'primary', paddingX: 1 }, Text({ color: 'primary' }, '⚙ Settings ▼')),
500
501
  // Dropdown
501
502
  Box({
502
503
  flexDirection: 'column',
503
504
  borderStyle: 'single',
504
- borderColor: 'gray',
505
+ borderColor: 'border',
505
506
  marginLeft: 2,
506
507
  width: 25,
507
- }, Box({ paddingX: 1, backgroundColor: 'blue' }, Text({ color: 'white' }, '👤 Profile')), Box({ paddingX: 1 }, Text({ color: 'gray' }, '🔔 Notifications')), Box({ paddingX: 1 }, Text({ color: 'gray' }, '🎨 Appearance')), Divider({ color: 'gray' }), Box({ paddingX: 1 }, Text({ color: 'red' }, '🚪 Logout'))))),
508
+ }, Box({ paddingX: 1, backgroundColor: 'info' }, Text({ color: 'foreground' }, '👤 Profile')), Box({ paddingX: 1 }, Text({ color: 'muted' }, '🔔 Notifications')), Box({ paddingX: 1 }, Text({ color: 'muted' }, '🎨 Appearance')), Divider({ color: 'border' }), Box({ paddingX: 1 }, Text({ color: 'error' }, '🚪 Logout'))))),
508
509
  story('Popup - Context Menu')
509
510
  .category('Organisms')
510
511
  .description('Right-click context menu')
511
- .render(() => Box({ flexDirection: 'column', width: 50, height: 12 }, Text({ color: 'gray', dim: true }, 'Right-click area simulation:'), Box({ flexDirection: 'row', marginTop: 1 }, Box({ width: 20, height: 8, borderStyle: 'single', borderColor: 'gray' }, Text({ color: 'gray', dim: true }, 'Content...')), Box({
512
+ .render(() => Box({ flexDirection: 'column', width: 50, height: 12 }, Text({ color: 'muted', dim: true }, 'Right-click area simulation:'), Box({ flexDirection: 'row', marginTop: 1 }, Box({ width: 20, height: 8, borderStyle: 'single', borderColor: 'border' }, Text({ color: 'muted', dim: true }, 'Content...')), Box({
512
513
  flexDirection: 'column',
513
514
  borderStyle: 'single',
514
- borderColor: 'cyan',
515
+ borderColor: 'primary',
515
516
  marginLeft: 2,
516
517
  width: 20,
517
- }, Box({ paddingX: 1 }, Text({}, '📋 Copy')), Box({ paddingX: 1 }, Text({}, '✂️ Cut')), Box({ paddingX: 1 }, Text({}, '📄 Paste')), Divider({ color: 'gray' }), Box({ paddingX: 1 }, Text({}, '🗑️ Delete')), Box({ paddingX: 1 }, Text({}, 'ℹ️ Properties')))))),
518
+ }, Box({ paddingX: 1 }, Text({}, '📋 Copy')), Box({ paddingX: 1 }, Text({}, '✂️ Cut')), Box({ paddingX: 1 }, Text({}, '📄 Paste')), Divider({ color: 'border' }), Box({ paddingX: 1 }, Text({}, '🗑️ Delete')), Box({ paddingX: 1 }, Text({}, 'ℹ️ Properties')))))),
518
519
  ];
519
520
  /**
520
521
  * Status bar stories
@@ -525,18 +526,18 @@ const statusBarStories = [
525
526
  .description('Application status bar')
526
527
  .render(() => Box({ flexDirection: 'column', width: 60 },
527
528
  // Content area
528
- Box({ height: 5, borderStyle: 'single', borderColor: 'gray', padding: 1 }, Text({ color: 'gray' }, 'Main content area...')),
529
+ Box({ height: 5, borderStyle: 'single', borderColor: 'border', padding: 1 }, Text({ color: 'muted' }, 'Main content area...')),
529
530
  // Status bar
530
- Box({ backgroundColor: 'blue', paddingX: 1, justifyContent: 'space-between' }, Box({ gap: 2 }, Text({ color: 'white' }, 'NORMAL'), Text({ color: 'white' }, 'main.ts'), Text({ color: 'white' }, 'TypeScript')), Box({ gap: 2 }, Text({ color: 'white' }, 'Ln 42, Col 15'), Text({ color: 'white' }, 'UTF-8'), Text({ color: 'white' }, 'LF'))))),
531
+ Box({ backgroundColor: 'info', paddingX: 1, justifyContent: 'space-between' }, Box({ gap: 2 }, Text({ color: 'foreground' }, 'NORMAL'), Text({ color: 'foreground' }, 'main.ts'), Text({ color: 'foreground' }, 'TypeScript')), Box({ gap: 2 }, Text({ color: 'foreground' }, 'Ln 42, Col 15'), Text({ color: 'foreground' }, 'UTF-8'), Text({ color: 'foreground' }, 'LF'))))),
531
532
  story('StatusBar - With Icons')
532
533
  .category('Organisms')
533
534
  .description('Status bar with status icons')
534
535
  .render(() => Box({
535
- backgroundColor: 'gray',
536
+ backgroundColor: 'muted',
536
537
  paddingX: 1,
537
538
  width: 60,
538
539
  justifyContent: 'space-between',
539
- }, Box({ gap: 2 }, Text({ color: 'green' }, '✓ Connected'), Text({ color: 'cyan' }, '↻ Syncing...'), Text({ color: 'yellow' }, '⚠ 2 warnings')), Box({ gap: 2 }, Text({ color: 'white' }, '🔋 85%'), Text({ color: 'white' }, '📶 Strong'), Text({ color: 'white' }, '14:32')))),
540
+ }, Box({ gap: 2 }, Text({ color: 'success' }, '✓ Connected'), Text({ color: 'primary' }, '↻ Syncing...'), Text({ color: 'warning' }, '⚠ 2 warnings')), Box({ gap: 2 }, Text({ color: 'foreground' }, '🔋 85%'), Text({ color: 'foreground' }, '📶 Strong'), Text({ color: 'foreground' }, '14:32')))),
540
541
  story('StatusBar - Progress')
541
542
  .category('Organisms')
542
543
  .description('Status bar with progress indicator')
@@ -548,12 +549,98 @@ const statusBarStories = [
548
549
  const filled = Math.floor((props.progress / 100) * width);
549
550
  const bar = '█'.repeat(filled) + '░'.repeat(width - filled);
550
551
  return Box({
551
- backgroundColor: 'blue',
552
+ backgroundColor: 'info',
552
553
  paddingX: 1,
553
554
  width: 60,
554
555
  justifyContent: 'space-between',
555
- }, Box({ gap: 1 }, Text({ color: 'white' }, 'Building...'), Text({ color: 'cyan' }, `[${bar}]`), Text({ color: 'white' }, `${props.progress}%`)), Text({ color: 'yellow' }, 'Press Ctrl+C to cancel'));
556
+ }, Box({ gap: 1 }, Text({ color: 'foreground' }, 'Building...'), Text({ color: 'primary' }, `[${bar}]`), Text({ color: 'foreground' }, `${props.progress}%`)), Text({ color: 'warning' }, 'Press Ctrl+C to cancel'));
556
557
  }),
558
+ story('StatusBar - Interactive')
559
+ .category('Organisms')
560
+ .description('StatusBar with selectable variant and custom color')
561
+ .controls({
562
+ variant: defaultControls.select('Variant', ['default', 'primary', 'info', 'success', 'warning', 'danger'], 'primary'),
563
+ customColor: defaultControls.color('Custom Color', ''),
564
+ leftText: defaultControls.text('Left Text', 'Ready'),
565
+ centerText: defaultControls.text('Center Text', 'file.ts'),
566
+ rightText: defaultControls.text('Right Text', 'Ln 42, Col 8'),
567
+ })
568
+ .render((props) => StatusBar({
569
+ variant: props.customColor ? undefined : props.variant,
570
+ color: props.customColor || undefined,
571
+ left: props.leftText, // String → auto-colored!
572
+ center: props.centerText || undefined,
573
+ right: props.rightText,
574
+ })),
575
+ story('StatusBar - All Variants')
576
+ .category('Organisms')
577
+ .description('StatusBar component showing all semantic variants')
578
+ .render(() => Box({ flexDirection: 'column', gap: 1, width: 60 }, Text({ bold: true, color: 'primary' }, 'StatusBar Variants:'), StatusBar({
579
+ variant: 'default',
580
+ left: '● Default', // Strings are auto-colored based on variant!
581
+ right: 'Ready',
582
+ }), StatusBar({
583
+ variant: 'primary',
584
+ left: '● Primary',
585
+ right: 'Active',
586
+ }), StatusBar({
587
+ variant: 'success',
588
+ left: '✓ Success',
589
+ right: 'Connected',
590
+ }), StatusBar({
591
+ variant: 'warning',
592
+ left: '⚠ Warning',
593
+ right: '2 issues',
594
+ }), StatusBar({
595
+ variant: 'danger',
596
+ left: '✗ Danger',
597
+ right: 'Error!',
598
+ }), StatusBar({
599
+ variant: 'info',
600
+ left: 'ℹ Info',
601
+ right: 'Building...',
602
+ }))),
603
+ story('Header - Interactive')
604
+ .category('Organisms')
605
+ .description('Header with selectable variant and custom color')
606
+ .controls({
607
+ variant: defaultControls.select('Variant', ['default', 'primary', 'secondary', 'success', 'warning', 'danger'], 'primary'),
608
+ customColor: defaultControls.color('Custom Color', ''),
609
+ title: defaultControls.text('Title', 'My Application'),
610
+ subtitle: defaultControls.text('Subtitle', 'v1.0.0'),
611
+ border: defaultControls.boolean('Show Border', false),
612
+ })
613
+ .render((props) => Header({
614
+ title: props.title,
615
+ subtitle: props.subtitle || undefined,
616
+ variant: props.customColor ? undefined : props.variant,
617
+ color: props.customColor || undefined,
618
+ border: props.border,
619
+ })),
620
+ story('Header - All Variants')
621
+ .category('Organisms')
622
+ .description('Header component showing all semantic variants')
623
+ .render(() => Box({ flexDirection: 'column', gap: 1, width: 60 }, Header({
624
+ title: 'Default Header',
625
+ subtitle: 'v1.0.0',
626
+ variant: 'default',
627
+ }), Header({
628
+ title: 'Primary Header',
629
+ subtitle: 'v1.0.0',
630
+ variant: 'primary',
631
+ }), Header({
632
+ title: 'Success Header',
633
+ subtitle: 'All systems go',
634
+ variant: 'success',
635
+ }), Header({
636
+ title: 'Warning Header',
637
+ subtitle: 'Attention required',
638
+ variant: 'warning',
639
+ }), Header({
640
+ title: 'Danger Header',
641
+ subtitle: 'Critical error',
642
+ variant: 'danger',
643
+ }))),
557
644
  story('Window - Basic')
558
645
  .category('Organisms')
559
646
  .description('Window with title bar')
@@ -566,16 +653,16 @@ const statusBarStories = [
566
653
  width: 45,
567
654
  height: 12,
568
655
  borderStyle: 'double',
569
- borderColor: props.focused ? 'cyan' : 'gray',
656
+ borderColor: props.focused ? 'primary' : 'border',
570
657
  },
571
658
  // Title bar
572
659
  Box({
573
- backgroundColor: props.focused ? 'blue' : 'gray',
660
+ backgroundColor: props.focused ? 'info' : 'muted',
574
661
  paddingX: 1,
575
662
  justifyContent: 'space-between',
576
- }, Text({ color: 'white', bold: props.focused }, props.title), Box({ gap: 1 }, Text({ color: 'white' }, '─'), Text({ color: 'white' }, '□'), Text({ color: 'red' }, '×'))),
663
+ }, Text({ color: 'foreground', bold: props.focused }, props.title), Box({ gap: 1 }, Text({ color: 'foreground' }, '─'), Text({ color: 'foreground' }, '□'), Text({ color: 'error' }, '×'))),
577
664
  // Content
578
- Box({ padding: 1, flexGrow: 1 }, Text({ color: 'gray' }, 'Window content goes here...')))),
665
+ Box({ padding: 1, flexGrow: 1 }, Text({ color: 'muted' }, 'Window content goes here...')))),
579
666
  story('Window - With Menu')
580
667
  .category('Organisms')
581
668
  .description('Window with menu bar')
@@ -584,16 +671,16 @@ const statusBarStories = [
584
671
  width: 50,
585
672
  height: 15,
586
673
  borderStyle: 'double',
587
- borderColor: 'cyan',
674
+ borderColor: 'primary',
588
675
  },
589
676
  // Title bar
590
- Box({ backgroundColor: 'blue', paddingX: 1, justifyContent: 'space-between' }, Text({ color: 'white', bold: true }, 'Text Editor'), Box({ gap: 1 }, Text({ color: 'white' }, '─ □ ×'))),
677
+ Box({ backgroundColor: 'info', paddingX: 1, justifyContent: 'space-between' }, Text({ color: 'foreground', bold: true }, 'Text Editor'), Box({ gap: 1 }, Text({ color: 'foreground' }, '─ □ ×'))),
591
678
  // Menu bar
592
- Box({ borderStyle: 'single', borderColor: 'gray', paddingX: 1, gap: 2 }, Text({ color: 'white', underline: true }, 'F'), Text({ color: 'gray' }, 'ile'), Text({ color: 'white', underline: true }, 'E'), Text({ color: 'gray' }, 'dit'), Text({ color: 'white', underline: true }, 'V'), Text({ color: 'gray' }, 'iew'), Text({ color: 'white', underline: true }, 'H'), Text({ color: 'gray' }, 'elp')),
679
+ Box({ borderStyle: 'single', borderColor: 'border', paddingX: 1, gap: 2 }, Text({ color: 'foreground', underline: true }, 'F'), Text({ color: 'muted' }, 'ile'), Text({ color: 'foreground', underline: true }, 'E'), Text({ color: 'muted' }, 'dit'), Text({ color: 'foreground', underline: true }, 'V'), Text({ color: 'muted' }, 'iew'), Text({ color: 'foreground', underline: true }, 'H'), Text({ color: 'muted' }, 'elp')),
593
680
  // Content
594
- Box({ padding: 1, flexGrow: 1 }, Text({ color: 'gray' }, 'Document content...')),
681
+ Box({ padding: 1, flexGrow: 1 }, Text({ color: 'muted' }, 'Document content...')),
595
682
  // Status bar
596
- Box({ backgroundColor: 'gray', paddingX: 1, justifyContent: 'space-between' }, Text({ color: 'white' }, 'Ready'), Text({ color: 'white' }, 'Ln 1, Col 1')))),
683
+ Box({ backgroundColor: 'muted', paddingX: 1, justifyContent: 'space-between' }, Text({ color: 'foreground' }, 'Ready'), Text({ color: 'foreground' }, 'Ln 1, Col 1')))),
597
684
  story('Window - Dialog')
598
685
  .category('Organisms')
599
686
  .description('Dialog window with buttons')
@@ -601,14 +688,14 @@ const statusBarStories = [
601
688
  flexDirection: 'column',
602
689
  width: 40,
603
690
  borderStyle: 'double',
604
- borderColor: 'yellow',
691
+ borderColor: 'warning',
605
692
  },
606
693
  // Title bar
607
- Box({ backgroundColor: 'yellow', paddingX: 1 }, Text({ color: 'black', bold: true }, '⚠ Warning')),
694
+ Box({ backgroundColor: 'warning', paddingX: 1 }, Text({ color: 'background', bold: true }, '⚠ Warning')),
608
695
  // Content
609
696
  Box({ padding: 1 }, Text({}, 'Are you sure you want to delete this file? This action cannot be undone.')),
610
697
  // Buttons
611
- Box({ paddingX: 1, paddingBottom: 1, gap: 2, justifyContent: 'flex-end' }, Text({ color: 'gray', inverse: true }, ' No '), Text({ color: 'red', inverse: true }, ' Yes ')))),
698
+ Box({ paddingX: 1, paddingBottom: 1, gap: 2, justifyContent: 'flex-end' }, Text({ color: 'muted', inverse: true }, ' No '), Text({ color: 'error', inverse: true }, ' Yes ')))),
612
699
  ];
613
700
  /**
614
701
  * Real-time Dashboard stories
@@ -623,35 +710,35 @@ const realtimeDashboardStories = [
623
710
  const randomSparkline = (len) => Array.from({ length: len }, () => sparkChars[Math.floor(Math.random() * 8)]).join('');
624
711
  return Box({ flexDirection: 'column', gap: 1 },
625
712
  // Header
626
- Box({ borderStyle: 'double', borderColor: 'cyan', paddingX: 1 }, Text({ color: 'cyan', bold: true }, '🖥️ Real-time Dashboard'), Spacer({}), Text({ color: 'green' }, '● Live'), Text({ color: 'gray' }, ' | '), Text({ color: 'gray', dim: true }, 'Uptime: 02:34:56')),
713
+ Box({ borderStyle: 'double', borderColor: 'primary', paddingX: 1 }, Text({ color: 'primary', bold: true }, '🖥️ Real-time Dashboard'), Spacer({}), Text({ color: 'success' }, '● Live'), Text({ color: 'muted' }, ' | '), Text({ color: 'muted', dim: true }, 'Uptime: 02:34:56')),
627
714
  // Row 1
628
- Box({ flexDirection: 'row', gap: 1 }, Box({ borderStyle: 'round', borderColor: 'green', padding: 1, width: 28 }, Box({ flexDirection: 'column' }, Text({ color: 'gray', dim: true }, 'CPU Usage'), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'green' }, '[████████████░░░░░░░░]'), Text({ color: 'green', bold: true }, '58.3%')), Text({ color: 'green', dim: true }, randomSparkline(25)))), Box({ borderStyle: 'round', borderColor: 'cyan', padding: 1, width: 28 }, Box({ flexDirection: 'column' }, Text({ color: 'gray', dim: true }, 'Memory'), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'cyan' }, '[██████████░░░░░░░░░░]'), Text({ color: 'cyan', bold: true }, '52.1%')), Text({ color: 'gray' }, '8.3 GB / 16.0 GB')))),
715
+ Box({ flexDirection: 'row', gap: 1 }, Box({ borderStyle: 'round', borderColor: 'success', padding: 1, width: 28 }, Box({ flexDirection: 'column' }, Text({ color: 'muted', dim: true }, 'CPU Usage'), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'success' }, '[████████████░░░░░░░░]'), Text({ color: 'success', bold: true }, '58.3%')), Text({ color: 'success', dim: true }, randomSparkline(25)))), Box({ borderStyle: 'round', borderColor: 'primary', padding: 1, width: 28 }, Box({ flexDirection: 'column' }, Text({ color: 'muted', dim: true }, 'Memory'), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'primary' }, '[██████████░░░░░░░░░░]'), Text({ color: 'primary', bold: true }, '52.1%')), Text({ color: 'muted' }, '8.3 GB / 16.0 GB')))),
629
716
  // Row 2
630
- Box({ flexDirection: 'row', gap: 1 }, Box({ borderStyle: 'round', borderColor: 'blue', padding: 1, width: 40 }, Box({ flexDirection: 'column' }, Box({ flexDirection: 'row' }, Text({ color: 'gray', dim: true }, 'Requests/sec'), Spacer({}), Text({ color: 'gray', dim: true }, 'Total: 1.2M')), Text({ color: 'blue', bold: true }, '892 req/s'), Text({ color: 'blue' }, randomSparkline(35)))), Box({ borderStyle: 'round', borderColor: 'yellow', padding: 1, width: 18 }, Box({ flexDirection: 'column' }, Text({ color: 'gray', dim: true }, 'Active Spinners'), Text({ color: 'cyan' }, '⠋ Fetching...'), Text({ color: 'green' }, '◜ Processing...'), Text({ color: 'yellow' }, '🕐 Syncing...')))),
717
+ Box({ flexDirection: 'row', gap: 1 }, Box({ borderStyle: 'round', borderColor: 'info', padding: 1, width: 40 }, Box({ flexDirection: 'column' }, Box({ flexDirection: 'row' }, Text({ color: 'muted', dim: true }, 'Requests/sec'), Spacer({}), Text({ color: 'muted', dim: true }, 'Total: 1.2M')), Text({ color: 'info', bold: true }, '892 req/s'), Text({ color: 'info' }, randomSparkline(35)))), Box({ borderStyle: 'round', borderColor: 'warning', padding: 1, width: 18 }, Box({ flexDirection: 'column' }, Text({ color: 'muted', dim: true }, 'Active Spinners'), Text({ color: 'primary' }, '⠋ Fetching...'), Text({ color: 'success' }, '◜ Processing...'), Text({ color: 'warning' }, '🕐 Syncing...')))),
631
718
  // Footer
632
- Box({ backgroundColor: 'blue', paddingX: 1 }, Text({ color: 'white' }, '● 234 connections'), Spacer({}), Text({ color: 'white' }, 'Render: 30 FPS'), Text({ color: 'gray' }, ' | '), Text({ color: 'white' }, '14:32:45')));
719
+ Box({ backgroundColor: 'info', paddingX: 1 }, Text({ color: 'foreground' }, '● 234 connections'), Spacer({}), Text({ color: 'foreground' }, 'Render: 30 FPS'), Text({ color: 'muted' }, ' | '), Text({ color: 'foreground' }, '14:32:45')));
633
720
  }),
634
721
  story('Dashboard - Gauges')
635
722
  .category('Organisms')
636
723
  .description('Gauge widgets for metrics')
637
724
  .render(() => Box({ flexDirection: 'row', gap: 2 },
638
725
  // CPU Gauge
639
- Box({ borderStyle: 'round', borderColor: 'green', padding: 1, width: 20 }, Box({ flexDirection: 'column', alignItems: 'center' }, Text({ color: 'gray', dim: true }, 'CPU'), Text({ color: 'green', bold: true }, '58%'), Text({ color: 'green' }, '▁▂▃▄▅▆▇█▇▆▅▄▃▂▁'))),
726
+ Box({ borderStyle: 'round', borderColor: 'success', padding: 1, width: 20 }, Box({ flexDirection: 'column', alignItems: 'center' }, Text({ color: 'muted', dim: true }, 'CPU'), Text({ color: 'success', bold: true }, '58%'), Text({ color: 'success' }, '▁▂▃▄▅▆▇█▇▆▅▄▃▂▁'))),
640
727
  // Memory Gauge
641
- Box({ borderStyle: 'round', borderColor: 'cyan', padding: 1, width: 20 }, Box({ flexDirection: 'column', alignItems: 'center' }, Text({ color: 'gray', dim: true }, 'Memory'), Text({ color: 'cyan', bold: true }, '8.3GB'), Text({ color: 'cyan' }, '████████░░░░░░░░'))),
728
+ Box({ borderStyle: 'round', borderColor: 'primary', padding: 1, width: 20 }, Box({ flexDirection: 'column', alignItems: 'center' }, Text({ color: 'muted', dim: true }, 'Memory'), Text({ color: 'primary', bold: true }, '8.3GB'), Text({ color: 'primary' }, '████████░░░░░░░░'))),
642
729
  // Disk Gauge
643
- Box({ borderStyle: 'round', borderColor: 'yellow', padding: 1, width: 20 }, Box({ flexDirection: 'column', alignItems: 'center' }, Text({ color: 'gray', dim: true }, 'Disk'), Text({ color: 'yellow', bold: true }, '78%'), Text({ color: 'yellow' }, '████████████░░░░'))))),
730
+ Box({ borderStyle: 'round', borderColor: 'warning', padding: 1, width: 20 }, Box({ flexDirection: 'column', alignItems: 'center' }, Text({ color: 'muted', dim: true }, 'Disk'), Text({ color: 'warning', bold: true }, '78%'), Text({ color: 'warning' }, '████████████░░░░'))))),
644
731
  story('Dashboard - Sparklines')
645
732
  .category('Organisms')
646
733
  .description('Sparkline charts for time series')
647
734
  .controls({
648
735
  showLabels: defaultControls.boolean('Show Labels', true),
649
736
  })
650
- .render((props) => Box({ flexDirection: 'column', gap: 1, width: 50 }, Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'gray' }, 'CPU:')), Text({ color: 'green' }, '▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▂▃'), Text({ color: 'green', bold: true }, ' 58%')), Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'gray' }, 'Memory:')), Text({ color: 'cyan' }, '▄▄▄▄▅▅▅▅▅▅▆▆▆▆▆▆▅▅▅▅▅▅▄▄▄▄▄▄▄▄▄'), Text({ color: 'cyan', bold: true }, ' 52%')), Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'gray' }, 'Network:')), Text({ color: 'magenta' }, '▂▃▅▇█▆▄▂▁▂▃▅▇█▆▄▂▁▂▃▅▇█▆▄▂▁▂▃▅'), Text({ color: 'magenta', bold: true }, ' 45MB/s')), Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'gray' }, 'Errors:')), Text({ color: 'red' }, '▁▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▃▁▁▁▁▁▁▁▁▁▁▁'), Text({ color: 'green', bold: true }, ' 0.1%')))),
737
+ .render((props) => Box({ flexDirection: 'column', gap: 1, width: 50 }, Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'muted' }, 'CPU:')), Text({ color: 'success' }, '▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▂▃'), Text({ color: 'success', bold: true }, ' 58%')), Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'muted' }, 'Memory:')), Text({ color: 'primary' }, '▄▄▄▄▅▅▅▅▅▅▆▆▆▆▆▆▅▅▅▅▅▅▄▄▄▄▄▄▄▄▄'), Text({ color: 'primary', bold: true }, ' 52%')), Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'muted' }, 'Network:')), Text({ color: 'secondary' }, '▂▃▅▇█▆▄▂▁▂▃▅▇█▆▄▂▁▂▃▅▇█▆▄▂▁▂▃▅'), Text({ color: 'secondary', bold: true }, ' 45MB/s')), Box({ flexDirection: 'row', gap: 1 }, props.showLabels && Box({ width: 10 }, Text({ color: 'muted' }, 'Errors:')), Text({ color: 'error' }, '▁▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▃▁▁▁▁▁▁▁▁▁▁▁'), Text({ color: 'success', bold: true }, ' 0.1%')))),
651
738
  story('Spinner - Animated')
652
739
  .category('Organisms')
653
740
  .description('Spinner styles (run real example for animation)')
654
- .render(() => Box({ flexDirection: 'column', gap: 1 }, Text({ color: 'gray', dim: true }, 'Note: For real animation, run: pnpm tsx examples/realtime-dashboard.ts'), Box({ marginTop: 1 }), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'cyan' }, '⠋'), Text({}, 'dots - Braille dots')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'green' }, '◜'), Text({}, 'arc - Arc spinner')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'yellow' }, '◐'), Text({}, 'circle - Circle')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'magenta' }, '🕐'), Text({}, 'clock - Clock emoji')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'blue' }, '🌍'), Text({}, 'earth - Globe')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'red' }, '←'), Text({}, 'arrow - Directional')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'cyan' }, '[=== ]'), Text({}, 'bouncingBar - Progress bar')))),
741
+ .render(() => Box({ flexDirection: 'column', gap: 1 }, Text({ color: 'muted', dim: true }, 'Note: For real animation, run: pnpm tsx examples/realtime-dashboard.ts'), Box({ marginTop: 1 }), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'primary' }, '⠋'), Text({}, 'dots - Braille dots')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'success' }, '◜'), Text({}, 'arc - Arc spinner')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'warning' }, '◐'), Text({}, 'circle - Circle')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'secondary' }, '🕐'), Text({}, 'clock - Clock emoji')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'info' }, '🌍'), Text({}, 'earth - Globe')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'error' }, '←'), Text({}, 'arrow - Directional')), Box({ flexDirection: 'row', gap: 1 }, Text({ color: 'primary' }, '[=== ]'), Text({}, 'bouncingBar - Progress bar')))),
655
742
  ];
656
743
  /**
657
744
  * All organism stories