@tcn/ui 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (584) hide show
  1. package/README.md +2 -1
  2. package/dist/Color-ASIRERSW-B4GaVKuQ.js +990 -0
  3. package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +1 -0
  4. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js +1485 -0
  5. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +1 -0
  6. package/dist/actions/__docs__/components/gallery.d.ts +8 -0
  7. package/dist/actions/__docs__/components/gallery.d.ts.map +1 -0
  8. package/dist/actions/__docs__/components/gallery.js +20 -0
  9. package/dist/actions/__docs__/components/gallery.js.map +1 -0
  10. package/dist/actions/__docs__/components/showcase.d.ts +27 -0
  11. package/dist/actions/__docs__/components/showcase.d.ts.map +1 -0
  12. package/dist/actions/__docs__/components/showcase.js +15 -0
  13. package/dist/actions/__docs__/components/showcase.js.map +1 -0
  14. package/dist/actions/button/base_button/base_button.d.ts +2 -0
  15. package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
  16. package/dist/actions/button/base_button/base_button.js +30 -28
  17. package/dist/actions/button/base_button/base_button.js.map +1 -1
  18. package/dist/actions/button/button/button.js +6 -6
  19. package/dist/actions/button/button_group/button_group.d.ts +1 -1
  20. package/dist/actions/button/button_group/button_group.d.ts.map +1 -1
  21. package/dist/actions/button/button_group/button_group.js +11 -8
  22. package/dist/actions/button/button_group/button_group.js.map +1 -1
  23. package/dist/actions/button/select_group/select_group.js +15 -15
  24. package/dist/actions/button/select_group/select_group.js.map +1 -1
  25. package/dist/actions/button/select_group/single_select_group.js +6 -6
  26. package/dist/actions/button/slim_button/slim_button.js +2 -2
  27. package/dist/actions/types.d.ts +2 -0
  28. package/dist/actions/types.d.ts.map +1 -0
  29. package/dist/badge.css +1 -1
  30. package/dist/base_button.css +1 -1
  31. package/dist/body_text.css +1 -1
  32. package/dist/bottom_resize_handle.css +1 -1
  33. package/dist/bubble.css +1 -1
  34. package/dist/button.css +1 -1
  35. package/dist/button_group.css +1 -1
  36. package/dist/callout.css +1 -1
  37. package/dist/caption.css +1 -1
  38. package/dist/checkbox.css +1 -1
  39. package/dist/chip.css +1 -1
  40. package/dist/circle.css +1 -1
  41. package/dist/collapsible_box.css +1 -1
  42. package/dist/color_input.css +1 -1
  43. package/dist/color_picker.css +1 -1
  44. package/dist/column.css +1 -1
  45. package/dist/confirm.css +1 -1
  46. package/dist/css/layers.css +1 -0
  47. package/dist/date_picker.css +1 -1
  48. package/dist/date_picker_date.css +1 -1
  49. package/dist/date_picker_day.css +1 -1
  50. package/dist/date_picker_header.css +1 -1
  51. package/dist/date_picker_input.css +1 -1
  52. package/dist/date_picker_time_selector.css +1 -1
  53. package/dist/date_picker_year_input.css +1 -1
  54. package/dist/date_picker_year_selector.css +1 -1
  55. package/dist/divider.css +1 -1
  56. package/dist/draggable.css +1 -1
  57. package/dist/drawer_bottom.css +1 -1
  58. package/dist/drawer_end.css +1 -1
  59. package/dist/drawer_start.css +1 -1
  60. package/dist/drawer_top.css +1 -1
  61. package/dist/end_resize_handle.css +1 -1
  62. package/dist/feedback/loading/loading.js +12 -12
  63. package/dist/feedback/loading/loading.js.map +1 -1
  64. package/dist/feedback/progress/progress_bar.d.ts.map +1 -1
  65. package/dist/feedback/progress/progress_bar.js +34 -26
  66. package/dist/feedback/progress/progress_bar.js.map +1 -1
  67. package/dist/field_control.css +1 -1
  68. package/dist/field_set.css +1 -1
  69. package/dist/footer.css +1 -1
  70. package/dist/footnote.css +1 -1
  71. package/dist/form/field/common/field_control/field_control.js +1 -1
  72. package/dist/form/field/common/field_control/field_control.js.map +1 -1
  73. package/dist/form/field/common/field_description.js +3 -3
  74. package/dist/form/field/common/field_description.js.map +1 -1
  75. package/dist/form/field/common/field_error.js +8 -7
  76. package/dist/form/field/common/field_error.js.map +1 -1
  77. package/dist/form/field/common/field_header.js +7 -7
  78. package/dist/form/field/common/field_header.js.map +1 -1
  79. package/dist/form/field/common/status_input/status_input.d.ts.map +1 -1
  80. package/dist/form/field/common/status_input/status_input.js +20 -14
  81. package/dist/form/field/common/status_input/status_input.js.map +1 -1
  82. package/dist/form/field/field.js +5 -5
  83. package/dist/form/field/h_field/h_field.js +11 -11
  84. package/dist/form/field/h_field/h_field.js.map +1 -1
  85. package/dist/form/field/v_field/v_field.js +8 -8
  86. package/dist/form/field/v_field/v_field.js.map +1 -1
  87. package/dist/form/field_set/field_set.d.ts.map +1 -1
  88. package/dist/form/field_set/field_set.js +19 -12
  89. package/dist/form/field_set/field_set.js.map +1 -1
  90. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +6 -0
  91. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +1 -0
  92. package/dist/frame.css +1 -1
  93. package/dist/gallery.css +1 -0
  94. package/dist/grid.css +1 -1
  95. package/dist/h_body.css +1 -1
  96. package/dist/h_field.css +1 -1
  97. package/dist/h_panel.css +1 -1
  98. package/dist/header.css +1 -1
  99. package/dist/headline.css +1 -1
  100. package/dist/input.css +1 -1
  101. package/dist/inputs/checkbox/checkbox.js +15 -15
  102. package/dist/inputs/checkbox/checkbox.js.map +1 -1
  103. package/dist/inputs/checkbox/checkbox_row.d.ts +1 -1
  104. package/dist/inputs/checkbox/checkbox_row.d.ts.map +1 -1
  105. package/dist/inputs/checkbox/checkbox_row.js +19 -8
  106. package/dist/inputs/checkbox/checkbox_row.js.map +1 -1
  107. package/dist/inputs/color_input/color_input.d.ts.map +1 -1
  108. package/dist/inputs/color_input/color_input.js +32 -28
  109. package/dist/inputs/color_input/color_input.js.map +1 -1
  110. package/dist/inputs/color_input/color_picker.js +14 -14
  111. package/dist/inputs/color_input/color_picker.js.map +1 -1
  112. package/dist/inputs/combo_box/combo_box.js +16 -16
  113. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  114. package/dist/inputs/date_picker/date_picker.js +26 -26
  115. package/dist/inputs/date_picker/date_picker.js.map +1 -1
  116. package/dist/inputs/date_picker/date_picker_body.js +3 -3
  117. package/dist/inputs/date_picker/date_picker_body.js.map +1 -1
  118. package/dist/inputs/date_picker/date_picker_date.js +2 -2
  119. package/dist/inputs/date_picker/date_picker_date.js.map +1 -1
  120. package/dist/inputs/date_picker/date_picker_day.d.ts.map +1 -1
  121. package/dist/inputs/date_picker/date_picker_day.js +16 -8
  122. package/dist/inputs/date_picker/date_picker_day.js.map +1 -1
  123. package/dist/inputs/date_picker/date_picker_header.js +1 -1
  124. package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
  125. package/dist/inputs/date_picker/date_picker_input.js +18 -18
  126. package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
  127. package/dist/inputs/date_picker/date_picker_time_selector.d.ts.map +1 -1
  128. package/dist/inputs/date_picker/date_picker_time_selector.js +14 -11
  129. package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
  130. package/dist/inputs/date_picker/date_picker_year_input.js +4 -4
  131. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  132. package/dist/inputs/date_picker/date_picker_year_selector.d.ts.map +1 -1
  133. package/dist/inputs/date_picker/date_picker_year_selector.js +13 -10
  134. package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
  135. package/dist/inputs/index.d.ts +0 -4
  136. package/dist/inputs/index.d.ts.map +1 -1
  137. package/dist/inputs/index.js +53 -61
  138. package/dist/inputs/index.js.map +1 -1
  139. package/dist/inputs/input/input.js +6 -6
  140. package/dist/inputs/input/input.js.map +1 -1
  141. package/dist/inputs/mask_input/key_capture_input.js +7 -7
  142. package/dist/inputs/mask_input/mask_input.js +4 -4
  143. package/dist/inputs/multi_combo_box/multi_combo_box.js +17 -17
  144. package/dist/inputs/multiselect/multiselect.d.ts.map +1 -1
  145. package/dist/inputs/multiselect/multiselect.js +23 -22
  146. package/dist/inputs/multiselect/multiselect.js.map +1 -1
  147. package/dist/inputs/multiselect/multiselect_inline_values.d.ts.map +1 -1
  148. package/dist/inputs/multiselect/multiselect_inline_values.js +18 -17
  149. package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
  150. package/dist/inputs/multiselect/multiselect_values.js +20 -20
  151. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  152. package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
  153. package/dist/inputs/phone_number_input/phone_number_input.js +104 -91
  154. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  155. package/dist/inputs/radio/radio.js +18 -18
  156. package/dist/inputs/radio/radio.js.map +1 -1
  157. package/dist/inputs/radio/radio_row.js +3 -3
  158. package/dist/inputs/select/select.d.ts.map +1 -1
  159. package/dist/inputs/select/select.js +40 -40
  160. package/dist/inputs/select/select.js.map +1 -1
  161. package/dist/inputs/slider/slider.js +9 -9
  162. package/dist/inputs/slider/slider.js.map +1 -1
  163. package/dist/inputs/suggestions/suggestion_item.js +9 -9
  164. package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
  165. package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
  166. package/dist/inputs/suggestions/suggestion_list.js +29 -22
  167. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  168. package/dist/inputs/switch/switch.js +16 -16
  169. package/dist/inputs/switch/switch.js.map +1 -1
  170. package/dist/inputs/textarea/textarea.js +4 -4
  171. package/dist/inputs/textarea/textarea.js.map +1 -1
  172. package/dist/inputs/unit_input/unit_input.js +12 -12
  173. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  174. package/dist/layouts/body/h_body.js +7 -7
  175. package/dist/layouts/body/h_body.js.map +1 -1
  176. package/dist/layouts/body/v_body.js +6 -6
  177. package/dist/layouts/column/column.js +14 -14
  178. package/dist/layouts/column/column.js.map +1 -1
  179. package/dist/layouts/divider/divider.d.ts.map +1 -1
  180. package/dist/layouts/divider/divider.js +11 -12
  181. package/dist/layouts/divider/divider.js.map +1 -1
  182. package/dist/layouts/footer/footer.js +7 -7
  183. package/dist/layouts/grid/grid.d.ts.map +1 -1
  184. package/dist/layouts/grid/grid.js +40 -31
  185. package/dist/layouts/grid/grid.js.map +1 -1
  186. package/dist/layouts/header/header.js +5 -5
  187. package/dist/layouts/header/header.js.map +1 -1
  188. package/dist/layouts/list/item.js +2 -2
  189. package/dist/layouts/list/list.js +7 -7
  190. package/dist/layouts/list/section_header.d.ts.map +1 -1
  191. package/dist/layouts/list/section_header.js +17 -7
  192. package/dist/layouts/list/section_header.js.map +1 -1
  193. package/dist/layouts/scaffold/scaffold.js +16 -16
  194. package/dist/layouts/sidebar_end/sidebar_end.js +25 -25
  195. package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -1
  196. package/dist/layouts/sidebar_start/sidebar_start.js +21 -21
  197. package/dist/layouts/sidebar_start/sidebar_start.js.map +1 -1
  198. package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
  199. package/dist/layouts/utility_bar/utility_bar.js +12 -17
  200. package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
  201. package/dist/left_resize_handle.css +1 -1
  202. package/dist/loading.css +1 -1
  203. package/dist/menu.css +1 -1
  204. package/dist/modal.css +1 -1
  205. package/dist/multi_combo_box.css +1 -1
  206. package/dist/multiselect.css +1 -1
  207. package/dist/multiselect_values.css +1 -1
  208. package/dist/overlay/context_menu/context_menu.js +5 -5
  209. package/dist/overlay/context_menu/context_menu.js.map +1 -1
  210. package/dist/overlay/frame/frame.js +4 -4
  211. package/dist/overlay/menu/menu.js +35 -35
  212. package/dist/overlay/menu/menu.js.map +1 -1
  213. package/dist/overlay/popper/legacy/popper.d.ts.map +1 -1
  214. package/dist/overlay/popper/legacy/popper.js +12 -11
  215. package/dist/overlay/popper/legacy/popper.js.map +1 -1
  216. package/dist/overlay/popper/preview_popper.js +16 -16
  217. package/dist/overlay/popper/preview_popper.js.map +1 -1
  218. package/dist/overlay/portal/portal.css +1 -0
  219. package/dist/overlay/portal/portal_platform.d.ts.map +1 -1
  220. package/dist/overlay/portal/portal_platform.js +6 -5
  221. package/dist/overlay/portal/portal_platform.js.map +1 -1
  222. package/dist/overlay/portal/portal_platform_context.js +4 -4
  223. package/dist/page.css +1 -1
  224. package/dist/phone_number_input.css +1 -1
  225. package/dist/picture_placeholder.css +1 -1
  226. package/dist/popper.css +1 -1
  227. package/dist/progress_bar.css +1 -1
  228. package/dist/radio.css +1 -1
  229. package/dist/rect.css +1 -1
  230. package/dist/right_resize_handle.css +1 -1
  231. package/dist/scaffold.css +1 -1
  232. package/dist/select.css +1 -1
  233. package/dist/select_group.css +1 -1
  234. package/dist/showcase-WfP6kBEb.js +58401 -0
  235. package/dist/showcase-WfP6kBEb.js.map +1 -0
  236. package/dist/showcase.css +1 -0
  237. package/dist/sidebar_end.css +1 -1
  238. package/dist/sidebar_start.css +1 -1
  239. package/dist/slider.css +1 -1
  240. package/dist/slim_button.css +1 -1
  241. package/dist/stack.css +1 -1
  242. package/dist/stacks/box/bottom_resize_handle.js +1 -1
  243. package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
  244. package/dist/stacks/box/box.js +24 -24
  245. package/dist/stacks/box/box.js.map +1 -1
  246. package/dist/stacks/box/end_resize_handle.js +1 -1
  247. package/dist/stacks/box/end_resize_handle.js.map +1 -1
  248. package/dist/stacks/box/left_resize_handle.js +7 -7
  249. package/dist/stacks/box/left_resize_handle.js.map +1 -1
  250. package/dist/stacks/box/right_resize_handle.js +3 -3
  251. package/dist/stacks/box/right_resize_handle.js.map +1 -1
  252. package/dist/stacks/box/start_resize_handle.js +6 -6
  253. package/dist/stacks/box/start_resize_handle.js.map +1 -1
  254. package/dist/stacks/box/top_resize_handle.js +1 -1
  255. package/dist/stacks/box/top_resize_handle.js.map +1 -1
  256. package/dist/stacks/h_collapsible_box.d.ts.map +1 -1
  257. package/dist/stacks/h_collapsible_box.js +10 -6
  258. package/dist/stacks/h_collapsible_box.js.map +1 -1
  259. package/dist/stacks/h_stack.js +45 -45
  260. package/dist/stacks/h_stack.js.map +1 -1
  261. package/dist/stacks/spacer.js +16 -16
  262. package/dist/stacks/spacer.js.map +1 -1
  263. package/dist/stacks/story_components/circle.js +9 -9
  264. package/dist/stacks/story_components/circle.js.map +1 -1
  265. package/dist/stacks/story_components/picture_placeholder.d.ts.map +1 -1
  266. package/dist/stacks/story_components/picture_placeholder.js +13 -9
  267. package/dist/stacks/story_components/picture_placeholder.js.map +1 -1
  268. package/dist/stacks/story_components/rect.js +5 -5
  269. package/dist/stacks/story_components/rect.js.map +1 -1
  270. package/dist/stacks/story_components/style_box.js +4 -4
  271. package/dist/stacks/utils/use_is_collapsed.js +6 -6
  272. package/dist/stacks/v_collapsible_box.d.ts.map +1 -1
  273. package/dist/stacks/v_collapsible_box.js +12 -8
  274. package/dist/stacks/v_collapsible_box.js.map +1 -1
  275. package/dist/stacks/v_stack.js +45 -45
  276. package/dist/stacks/v_stack.js.map +1 -1
  277. package/dist/stacks/z_stack.js +39 -39
  278. package/dist/stacks/z_stack.js.map +1 -1
  279. package/dist/start_resize_handle.css +1 -1
  280. package/dist/status_input.css +1 -1
  281. package/dist/subheadline.css +1 -1
  282. package/dist/suggestion_item.css +1 -1
  283. package/dist/suggestion_list.css +1 -1
  284. package/dist/surfaces/alert/alert.js +3 -3
  285. package/dist/surfaces/alert/alert.js.map +1 -1
  286. package/dist/surfaces/card/card.js +4 -4
  287. package/dist/surfaces/confirm/confirm.d.ts.map +1 -1
  288. package/dist/surfaces/confirm/confirm.js +27 -20
  289. package/dist/surfaces/confirm/confirm.js.map +1 -1
  290. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +3 -3
  291. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -1
  292. package/dist/surfaces/drawers/drawer_end/drawer_end.js +4 -4
  293. package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -1
  294. package/dist/surfaces/drawers/drawer_start/drawer_start.js +3 -3
  295. package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -1
  296. package/dist/surfaces/drawers/drawer_top/drawer_top.js +3 -3
  297. package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -1
  298. package/dist/surfaces/modal/modal.js +5 -5
  299. package/dist/surfaces/page/h_page.js +7 -7
  300. package/dist/surfaces/page/h_page.js.map +1 -1
  301. package/dist/surfaces/page/v_page.js +7 -7
  302. package/dist/surfaces/page/v_page.js.map +1 -1
  303. package/dist/surfaces/panel/h_panel.js +14 -14
  304. package/dist/surfaces/panel/v_panel.js +9 -9
  305. package/dist/surfaces/pop_confirm/pop_confirm.js +6 -6
  306. package/dist/surfaces/popconfirm/pop_confirm.js +8 -8
  307. package/dist/surfaces/popover/popover.js +1 -1
  308. package/dist/surfaces/popover/popover.js.map +1 -1
  309. package/dist/surfaces/tooltip/tooltip.js +8 -8
  310. package/dist/surfaces/window/window.js +9 -9
  311. package/dist/switch.css +1 -1
  312. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js +3777 -0
  313. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +1 -0
  314. package/dist/tethered.css +1 -1
  315. package/dist/textarea.css +1 -1
  316. package/dist/themes/stylesheets/reset.css +1 -0
  317. package/dist/themes/stylesheets/reset.js +133 -131
  318. package/dist/themes/stylesheets/reset.js.map +1 -1
  319. package/dist/themes/theme.d.ts.map +1 -1
  320. package/dist/themes/theme.js +15 -6
  321. package/dist/themes/theme.js.map +1 -1
  322. package/dist/themes/themes/ergo/ergo_theme.css +1 -0
  323. package/dist/themes/themes/ergo/ergo_theme.js +505 -515
  324. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  325. package/dist/themes/themes/windows_98/windows_98.css +1 -0
  326. package/dist/themes/themes/windows_98/windows_98_theme.js +1034 -1168
  327. package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
  328. package/dist/title.css +1 -1
  329. package/dist/tokens/badge/badge.js +13 -13
  330. package/dist/tokens/badge/badge.js.map +1 -1
  331. package/dist/tokens/bubble/bubble.js +6 -5
  332. package/dist/tokens/bubble/bubble.js.map +1 -1
  333. package/dist/tokens/chip/chip.js +4 -3
  334. package/dist/tokens/chip/chip.js.map +1 -1
  335. package/dist/tooltip.css +1 -1
  336. package/dist/top_resize_handle.css +1 -1
  337. package/dist/typography/body_text/body_text.js +9 -9
  338. package/dist/typography/body_text/body_text.js.map +1 -1
  339. package/dist/typography/callout/callout.js +9 -9
  340. package/dist/typography/callout/callout.js.map +1 -1
  341. package/dist/typography/caption/caption.js +5 -5
  342. package/dist/typography/caption/caption.js.map +1 -1
  343. package/dist/typography/footnote/footnote.js +9 -9
  344. package/dist/typography/footnote/footnote.js.map +1 -1
  345. package/dist/typography/headline/headline.js +13 -13
  346. package/dist/typography/headline/headline.js.map +1 -1
  347. package/dist/typography/subheadline/subheadline.js +10 -10
  348. package/dist/typography/subheadline/subheadline.js.map +1 -1
  349. package/dist/typography/title/title.js +6 -6
  350. package/dist/typography/title/title.js.map +1 -1
  351. package/dist/unit_input.css +1 -1
  352. package/dist/utility_bar.css +1 -1
  353. package/dist/utils/click_away_listener.js +10 -10
  354. package/dist/utils/click_away_listener.js.map +1 -1
  355. package/dist/utils/dnd/draggable/draggable.js +4 -4
  356. package/dist/utils/dnd/handle.js +8 -8
  357. package/dist/utils/focus_redirect.js +5 -5
  358. package/dist/utils/hooks/make_context_hook.js +4 -4
  359. package/dist/utils/hooks/use_media_query.js +2 -2
  360. package/dist/utils/hooks/use_media_query.js.map +1 -1
  361. package/dist/v_body.css +1 -1
  362. package/dist/window.css +1 -1
  363. package/package.json +3 -3
  364. package/src/actions/__docs__/actions.mdx +194 -0
  365. package/src/actions/__docs__/actions.stories.tsx +481 -0
  366. package/src/actions/__docs__/components/gallery.module.css +6 -0
  367. package/src/actions/__docs__/components/gallery.tsx +28 -0
  368. package/src/actions/__docs__/components/showcase.module.css +55 -0
  369. package/src/actions/__docs__/components/showcase.tsx +121 -0
  370. package/src/actions/button/__stories__/button_group.stories.tsx +63 -0
  371. package/src/actions/button/__stories__/select_group.stories.tsx +47 -4
  372. package/src/actions/button/base_button/base_button.module.css +15 -13
  373. package/src/actions/button/base_button/base_button.tsx +6 -1
  374. package/src/actions/button/button/button.module.css +52 -50
  375. package/src/actions/button/button_group/button_group.module.css +54 -52
  376. package/src/actions/button/button_group/button_group.tsx +9 -4
  377. package/src/actions/button/select_group/select_group.module.css +54 -52
  378. package/src/actions/button/select_group/select_group.tsx +2 -2
  379. package/src/actions/button/slim_button/slim_button.module.css +7 -5
  380. package/src/actions/types.ts +6 -0
  381. package/src/css/layers.css +1 -0
  382. package/src/feedback/loading/loading.module.css +17 -15
  383. package/src/feedback/progress/progress_bar.module.css +52 -50
  384. package/src/feedback/progress/progress_bar.tsx +6 -1
  385. package/src/form/field/common/field_control/field_control.module.css +17 -15
  386. package/src/form/field/common/field_control/field_control.tsx +1 -1
  387. package/src/form/field/common/field_description.tsx +1 -1
  388. package/src/form/field/common/field_error.tsx +1 -1
  389. package/src/form/field/common/field_header.tsx +1 -1
  390. package/src/form/field/common/status_input/status_input.module.css +10 -8
  391. package/src/form/field/common/status_input/status_input.tsx +8 -5
  392. package/src/form/field/h_field/h_field.module.css +7 -5
  393. package/src/form/field/h_field/h_field.tsx +1 -1
  394. package/src/form/field/v_field/v_field.tsx +1 -1
  395. package/src/form/field_set/field_set.module.css +16 -14
  396. package/src/form/field_set/field_set.tsx +7 -4
  397. package/src/inputs/checkbox/checkbox.module.css +45 -43
  398. package/src/inputs/checkbox/checkbox.tsx +1 -1
  399. package/src/inputs/checkbox/checkbox_row.tsx +9 -2
  400. package/src/inputs/color_input/color_input.module.css +58 -56
  401. package/src/inputs/color_input/color_input.tsx +8 -4
  402. package/src/inputs/color_input/color_picker.module.css +13 -11
  403. package/src/inputs/color_input/color_picker.tsx +2 -2
  404. package/src/inputs/combo_box/combo_box.tsx +1 -1
  405. package/src/inputs/date_picker/date_picker.module.css +19 -17
  406. package/src/inputs/date_picker/date_picker.tsx +2 -2
  407. package/src/inputs/date_picker/date_picker_body.tsx +1 -1
  408. package/src/inputs/date_picker/date_picker_date.module.css +71 -69
  409. package/src/inputs/date_picker/date_picker_date.tsx +2 -2
  410. package/src/inputs/date_picker/date_picker_day.module.css +5 -3
  411. package/src/inputs/date_picker/date_picker_day.tsx +7 -2
  412. package/src/inputs/date_picker/date_picker_header.module.css +4 -2
  413. package/src/inputs/date_picker/date_picker_header.tsx +1 -1
  414. package/src/inputs/date_picker/date_picker_input.module.css +55 -53
  415. package/src/inputs/date_picker/date_picker_input.tsx +3 -3
  416. package/src/inputs/date_picker/date_picker_time_selector.module.css +30 -28
  417. package/src/inputs/date_picker/date_picker_time_selector.tsx +7 -4
  418. package/src/inputs/date_picker/date_picker_year_input.module.css +46 -44
  419. package/src/inputs/date_picker/date_picker_year_input.tsx +1 -1
  420. package/src/inputs/date_picker/date_picker_year_selector.module.css +48 -46
  421. package/src/inputs/date_picker/date_picker_year_selector.tsx +5 -2
  422. package/src/inputs/index.ts +0 -4
  423. package/src/inputs/input/input.module.css +56 -79
  424. package/src/inputs/input/input.tsx +1 -1
  425. package/src/inputs/multi_combo_box/multi_combo_box.module.css +4 -2
  426. package/src/inputs/multiselect/multiselect.module.css +4 -2
  427. package/src/inputs/multiselect/multiselect.tsx +2 -1
  428. package/src/inputs/multiselect/multiselect_inline_values.tsx +3 -2
  429. package/src/inputs/multiselect/multiselect_values.module.css +28 -26
  430. package/src/inputs/multiselect/multiselect_values.tsx +3 -3
  431. package/src/inputs/phone_number_input/phone_number_input.module.css +54 -52
  432. package/src/inputs/phone_number_input/phone_number_input.tsx +15 -6
  433. package/src/inputs/radio/radio.module.css +48 -66
  434. package/src/inputs/radio/radio.tsx +2 -2
  435. package/src/inputs/select/select.module.css +57 -59
  436. package/src/inputs/select/select.tsx +4 -2
  437. package/src/inputs/slider/slider.module.css +151 -149
  438. package/src/inputs/slider/slider.tsx +1 -1
  439. package/src/inputs/suggestions/suggestion_item.module.css +35 -53
  440. package/src/inputs/suggestions/suggestion_item.tsx +1 -1
  441. package/src/inputs/suggestions/suggestion_list.module.css +29 -27
  442. package/src/inputs/suggestions/suggestion_list.tsx +6 -3
  443. package/src/inputs/switch/switch.module.css +111 -109
  444. package/src/inputs/switch/switch.tsx +3 -3
  445. package/src/inputs/textarea/textarea.module.css +47 -65
  446. package/src/inputs/textarea/textarea.tsx +1 -1
  447. package/src/inputs/unit_input/unit_input.module.css +20 -18
  448. package/src/inputs/unit_input/unit_input.tsx +3 -3
  449. package/src/layouts/body/h_body.module.css +7 -4
  450. package/src/layouts/body/h_body.tsx +1 -1
  451. package/src/layouts/body/v_body.module.css +6 -4
  452. package/src/layouts/column/column.module.css +30 -28
  453. package/src/layouts/column/column.tsx +2 -2
  454. package/src/layouts/divider/divider.module.css +103 -101
  455. package/src/layouts/divider/divider.tsx +1 -2
  456. package/src/layouts/footer/footer.module.css +24 -21
  457. package/src/layouts/grid/grid.module.css +20 -18
  458. package/src/layouts/grid/grid.tsx +6 -1
  459. package/src/layouts/header/header.module.css +7 -5
  460. package/src/layouts/header/header.tsx +1 -1
  461. package/src/layouts/list/section_header.module.css +16 -14
  462. package/src/layouts/list/section_header.tsx +7 -1
  463. package/src/layouts/scaffold/scaffold.module.css +6 -4
  464. package/src/layouts/sidebar_end/sidebar_end.module.css +28 -26
  465. package/src/layouts/sidebar_end/sidebar_end.tsx +2 -2
  466. package/src/layouts/sidebar_start/sidebar_start.module.css +28 -26
  467. package/src/layouts/sidebar_start/sidebar_start.tsx +2 -2
  468. package/src/layouts/utility_bar/utility_bar.module.css +5 -3
  469. package/src/layouts/utility_bar/utility_bar.tsx +1 -6
  470. package/src/overlay/context_menu/context_menu.tsx +1 -1
  471. package/src/overlay/frame/frame.module.css +6 -4
  472. package/src/overlay/frame/frame_stories.module.css +14 -12
  473. package/src/overlay/menu/menu.module.css +30 -28
  474. package/src/overlay/menu/menu.tsx +2 -2
  475. package/src/overlay/popper/legacy/popper.module.css +10 -8
  476. package/src/overlay/popper/legacy/popper.tsx +2 -1
  477. package/src/overlay/popper/preview_popper.tsx +1 -1
  478. package/src/overlay/portal/portal.css +33 -31
  479. package/src/overlay/portal/portal_platform.tsx +5 -5
  480. package/src/overlay/tethered/tethered.module.css +9 -7
  481. package/src/stacks/box/bottom_resize_handle.module.css +11 -9
  482. package/src/stacks/box/bottom_resize_handle.tsx +1 -1
  483. package/src/stacks/box/box.tsx +1 -1
  484. package/src/stacks/box/end_resize_handle.module.css +16 -14
  485. package/src/stacks/box/end_resize_handle.tsx +1 -1
  486. package/src/stacks/box/left_resize_handle.module.css +11 -9
  487. package/src/stacks/box/left_resize_handle.tsx +1 -1
  488. package/src/stacks/box/right_resize_handle.module.css +11 -9
  489. package/src/stacks/box/right_resize_handle.tsx +1 -1
  490. package/src/stacks/box/start_resize_handle.module.css +16 -14
  491. package/src/stacks/box/start_resize_handle.tsx +1 -1
  492. package/src/stacks/box/top_resize_handle.module.css +11 -9
  493. package/src/stacks/box/top_resize_handle.tsx +1 -1
  494. package/src/stacks/collapsible_box.module.css +45 -29
  495. package/src/stacks/demo.module.css +5 -3
  496. package/src/stacks/h_collapsible_box.tsx +5 -1
  497. package/src/stacks/h_stack.tsx +1 -1
  498. package/src/stacks/spacer.tsx +1 -1
  499. package/src/stacks/stack.module.css +400 -393
  500. package/src/stacks/story_components/circle.module.css +8 -6
  501. package/src/stacks/story_components/circle.tsx +1 -1
  502. package/src/stacks/story_components/picture_placeholder.module.css +4 -2
  503. package/src/stacks/story_components/picture_placeholder.tsx +5 -1
  504. package/src/stacks/story_components/rect.module.css +9 -7
  505. package/src/stacks/story_components/rect.tsx +1 -1
  506. package/src/stacks/v_collapsible_box.tsx +5 -1
  507. package/src/stacks/v_stack.tsx +1 -1
  508. package/src/stacks/z_stack.tsx +1 -1
  509. package/src/surfaces/alert/alert.tsx +1 -1
  510. package/src/surfaces/card/card_stories.module.css +13 -11
  511. package/src/surfaces/confirm/confirm.module.css +37 -35
  512. package/src/surfaces/confirm/confirm.tsx +7 -4
  513. package/src/surfaces/drawers/drawer_bottom/drawer_bottom.module.css +4 -2
  514. package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +1 -1
  515. package/src/surfaces/drawers/drawer_end/drawer_end.module.css +4 -2
  516. package/src/surfaces/drawers/drawer_end/drawer_end.tsx +1 -1
  517. package/src/surfaces/drawers/drawer_start/drawer_start.module.css +4 -2
  518. package/src/surfaces/drawers/drawer_start/drawer_start.tsx +1 -1
  519. package/src/surfaces/drawers/drawer_top/drawer_top.module.css +4 -2
  520. package/src/surfaces/drawers/drawer_top/drawer_top.tsx +1 -1
  521. package/src/surfaces/modal/modal.module.css +5 -3
  522. package/src/surfaces/page/h_page.tsx +1 -1
  523. package/src/surfaces/page/page.module.css +12 -10
  524. package/src/surfaces/page/v_page.tsx +1 -1
  525. package/src/surfaces/panel/panel.module.css +8 -7
  526. package/src/surfaces/popover/popover.tsx +1 -1
  527. package/src/surfaces/tooltip/tooltip.module.css +4 -2
  528. package/src/surfaces/window/window.module.css +6 -4
  529. package/src/themes/stylesheets/reset.css +133 -131
  530. package/src/themes/theme.tsx +17 -0
  531. package/src/themes/themes/ergo/ergo_theme.css +505 -515
  532. package/src/themes/themes/windows_98/windows_98.css +1030 -1164
  533. package/src/tokens/badge/badge.module.css +13 -11
  534. package/src/tokens/badge/badge.tsx +2 -2
  535. package/src/tokens/bubble/bubble.module.css +12 -10
  536. package/src/tokens/bubble/bubble.tsx +1 -1
  537. package/src/tokens/chip/chip.module.css +14 -12
  538. package/src/tokens/chip/chip.tsx +1 -1
  539. package/src/typography/body_text/body_text.module.css +61 -59
  540. package/src/typography/body_text/body_text.tsx +1 -1
  541. package/src/typography/callout/callout.module.css +56 -54
  542. package/src/typography/callout/callout.tsx +1 -1
  543. package/src/typography/caption/caption.module.css +56 -54
  544. package/src/typography/caption/caption.tsx +1 -1
  545. package/src/typography/footnote/footnote.module.css +56 -54
  546. package/src/typography/footnote/footnote.tsx +1 -1
  547. package/src/typography/headline/headline.module.css +57 -55
  548. package/src/typography/headline/headline.tsx +1 -1
  549. package/src/typography/subheadline/subheadline.module.css +57 -55
  550. package/src/typography/subheadline/subheadline.tsx +1 -1
  551. package/src/typography/title/title.module.css +54 -52
  552. package/src/typography/title/title.tsx +1 -1
  553. package/src/utils/dnd/draggable/draggable.module.css +8 -6
  554. package/dist/form/field/common/types.js +0 -2
  555. package/dist/form/field/common/types.js.map +0 -1
  556. package/dist/inputs/mask_input/mask_config.js +0 -2
  557. package/dist/inputs/mask_input/mask_config.js.map +0 -1
  558. package/dist/inputs/mask_input/mask_cursor.js +0 -2
  559. package/dist/inputs/mask_input/mask_cursor.js.map +0 -1
  560. package/dist/inputs/multiselect/multiselect_row.d.ts +0 -10
  561. package/dist/inputs/multiselect/multiselect_row.d.ts.map +0 -1
  562. package/dist/inputs/multiselect/multiselect_row.js +0 -35
  563. package/dist/inputs/multiselect/multiselect_row.js.map +0 -1
  564. package/dist/inputs/switch/switch_row.d.ts +0 -8
  565. package/dist/inputs/switch/switch_row.d.ts.map +0 -1
  566. package/dist/inputs/switch/switch_row.js +0 -16
  567. package/dist/inputs/switch/switch_row.js.map +0 -1
  568. package/dist/inputs/textarea/textarea_row.d.ts +0 -8
  569. package/dist/inputs/textarea/textarea_row.d.ts.map +0 -1
  570. package/dist/inputs/textarea/textarea_row.js +0 -12
  571. package/dist/inputs/textarea/textarea_row.js.map +0 -1
  572. package/dist/overlay/tethered/types.js +0 -2
  573. package/dist/overlay/tethered/types.js.map +0 -1
  574. package/dist/portal_platform.css +0 -1
  575. package/dist/stacks/box/handle_props.js +0 -2
  576. package/dist/stacks/box/handle_props.js.map +0 -1
  577. package/dist/utils/calendar/calendar_date.js +0 -2
  578. package/dist/utils/calendar/calendar_date.js.map +0 -1
  579. package/dist/utils/dnd/types.js +0 -2
  580. package/dist/utils/dnd/types.js.map +0 -1
  581. package/src/inputs/multiselect/multiselect_row.tsx +0 -57
  582. package/src/inputs/switch/TODO.md +0 -3
  583. package/src/inputs/switch/switch_row.tsx +0 -33
  584. package/src/inputs/textarea/textarea_row.tsx +0 -24
@@ -0,0 +1,481 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { HStack } from '../../stacks/h_stack.js';
3
+ import { VStack } from '../../stacks/v_stack.js';
4
+ import { Spacer } from '../../stacks/spacer.js';
5
+ import { Button } from '../button/button/button.js';
6
+ import { SlimButton } from '../button/slim_button/slim_button.js';
7
+ import { ButtonGroup } from '../button/button_group/button_group.js';
8
+ import { SearchIcon } from '@tcn/icons/search_icon.js';
9
+ import { PlusIcon } from '@tcn/icons/plus_icon.js';
10
+ import { CrossIcon } from '@tcn/icons/cross_icon.js';
11
+ import type { ActionSeverity } from '../types.js';
12
+
13
+ /**
14
+ * These stories are used exclusively by the MDX documentation.
15
+ * They are hidden from the Storybook sidebar using tags.
16
+ */
17
+ const meta: Meta<typeof Button> = {
18
+ title: 'Catalog/Actions',
19
+ component: Button,
20
+ parameters: {
21
+ docs: {
22
+ story: { exclude: ['style'] },
23
+ },
24
+ },
25
+
26
+ // Hide these stories from the sidebar - they're only for MDX docs
27
+ tags: ['!autodocs', '!dev'],
28
+ };
29
+
30
+ export default meta;
31
+ type Story = StoryObj<typeof Button>;
32
+
33
+ // ============================================================================
34
+ // Utility Code
35
+ // ============================================================================
36
+
37
+ const tcnBrandedColors = [
38
+ {
39
+ name: 'Integrated Infrastructure',
40
+ action: '27, 15%, 43%',
41
+ },
42
+ {
43
+ name: 'Omnichannel Communications',
44
+ action: '197, 34%, 40%',
45
+ },
46
+ {
47
+ name: 'Workforce Engagement',
48
+ action: '23, 65%, 42%',
49
+ },
50
+ {
51
+ name: 'Integration and Automation',
52
+ action: '139, 21%, 39%',
53
+ },
54
+ {
55
+ name: 'Compliance and Data Management',
56
+ action: '49, 50%, 34%',
57
+ },
58
+ {
59
+ name: 'Intelligence, Reporting, and Analytics',
60
+ action: '214, 14%, 45%',
61
+ },
62
+ ];
63
+
64
+ const severityOptions: { name: string; severity: ActionSeverity }[] = [
65
+ {
66
+ name: 'Dangerous',
67
+ severity: 'dangerous',
68
+ },
69
+ {
70
+ name: 'Cautious',
71
+ severity: 'cautious',
72
+ },
73
+ {
74
+ name: 'Neutral',
75
+ severity: 'neutral',
76
+ },
77
+ {
78
+ name: 'Suggested',
79
+ severity: 'suggested',
80
+ },
81
+ {
82
+ name: 'Encouraged',
83
+ severity: 'encouraged',
84
+ },
85
+ ];
86
+
87
+ // ============================================================================
88
+ // BASELINE
89
+ // ============================================================================
90
+
91
+ export const ButtonBaselineShowcase: Story = {
92
+ render: () => (
93
+ <HStack gap="12px" vAlign="center">
94
+ <Button>Baseline</Button>
95
+ </HStack>
96
+ ),
97
+ };
98
+
99
+ // ============================================================================
100
+ // HIERARCHY EXAMPLES
101
+ // ============================================================================
102
+
103
+ export const HierarchyShowcase: Story = {
104
+ render: () => (
105
+ <HStack gap="12px" vAlign="center">
106
+ <Button hierarchy="tertiary">Tertiary</Button>
107
+ <Button hierarchy="secondary">Secondary</Button>
108
+ <Button hierarchy="primary">Primary</Button>
109
+ </HStack>
110
+ ),
111
+ };
112
+
113
+ // ============================================================================
114
+ // SIZE EXAMPLES
115
+ // ============================================================================
116
+
117
+ export const SizeShowcase: Story = {
118
+ render: () => (
119
+ <HStack gap="12px" vAlign="center">
120
+ <Button size="sm">Small</Button>
121
+ <Button size="md">Medium</Button>
122
+ <Button size="lg">Large</Button>
123
+ </HStack>
124
+ ),
125
+ };
126
+
127
+ // ============================================================================
128
+ // DISABLED EXAMPLES
129
+ // ============================================================================
130
+
131
+ export const DisabledShowcase: Story = {
132
+ render: () => (
133
+ <HStack gap="12px" vAlign="center">
134
+ <VStack gap="12px" vAlign="center" width="200px">
135
+ <Button hierarchy="tertiary" disabled width="100%">
136
+ Tertiary Disabled
137
+ </Button>
138
+ <Button hierarchy="secondary" disabled width="100%">
139
+ Secondary Disabled
140
+ </Button>
141
+ <Button hierarchy="primary" disabled width="100%">
142
+ Primary Disabled
143
+ </Button>
144
+ </VStack>
145
+ </HStack>
146
+ ),
147
+ };
148
+
149
+ // ============================================================================
150
+ // WITH ICONS
151
+ // ============================================================================
152
+
153
+ export const IconShowcase: Story = {
154
+ render: () => (
155
+ <VStack gap="12px" vAlign="center">
156
+ <HStack gap="12px" vAlign="center">
157
+ <Button hierarchy="tertiary">
158
+ Cancel
159
+ <Spacer width="6px" />
160
+ <CrossIcon size="sm" />
161
+ </Button>
162
+ <Button hierarchy="secondary">
163
+ Search
164
+ <Spacer width="6px" />
165
+ <SearchIcon size="sm" />
166
+ </Button>
167
+ <Button hierarchy="primary">
168
+ Add
169
+ <Spacer width="6px" />
170
+ <PlusIcon size="sm" />
171
+ </Button>
172
+ </HStack>
173
+ <HStack gap="12px" vAlign="center">
174
+ <Button hierarchy="tertiary">
175
+ <CrossIcon size="sm" />
176
+ <Spacer width="6px" />
177
+ Cancel
178
+ </Button>
179
+ <Button hierarchy="secondary">
180
+ <SearchIcon size="sm" />
181
+ <Spacer width="6px" />
182
+ Search
183
+ </Button>
184
+ <Button hierarchy="primary">
185
+ <PlusIcon size="sm" />
186
+ <Spacer width="6px" />
187
+ Add
188
+ </Button>
189
+ </HStack>
190
+ </VStack>
191
+ ),
192
+ };
193
+
194
+ // ============================================================================
195
+ // CUSTOM COLORS
196
+ // ============================================================================
197
+
198
+ export const ColorShowcase: Story = {
199
+ render: () => (
200
+ <HStack vAlign="center" gap="12px">
201
+ <VStack gap="12px" vAlign="center" width="200px">
202
+ {tcnBrandedColors.map(({ name, action }) => (
203
+ <Button key={name} hierarchy="primary" color={action} width="100%">
204
+ {name}
205
+ </Button>
206
+ ))}
207
+ </VStack>
208
+ </HStack>
209
+ ),
210
+ };
211
+
212
+ // ============================================================================
213
+ // FULL WIDTH
214
+ // ============================================================================
215
+
216
+ export const FullWidth: Story = {
217
+ render: () => (
218
+ <HStack vAlign="center">
219
+ <VStack gap="12px" vAlign="center" width="200px">
220
+ <Button hierarchy="tertiary" width="100%">
221
+ Full Width Tertiary
222
+ </Button>
223
+ <Button hierarchy="secondary" width="100%">
224
+ Full Width Secondary
225
+ </Button>
226
+ <Button hierarchy="primary" width="100%">
227
+ Full Width Primary
228
+ </Button>
229
+ </VStack>
230
+ </HStack>
231
+ ),
232
+ };
233
+
234
+ export const SeverityShowcase: Story = {
235
+ render: () => (
236
+ <HStack vAlign="center" gap="12px">
237
+ <VStack gap="12px" vAlign="center" width="120px">
238
+ {severityOptions.map(({ name, severity }) => (
239
+ <Button key={name} hierarchy="tertiary" severity={severity} width="100%">
240
+ {name}
241
+ </Button>
242
+ ))}
243
+ </VStack>
244
+ <VStack gap="12px" vAlign="center" width="120px">
245
+ {severityOptions.map(({ name, severity }) => (
246
+ <Button key={name} hierarchy="secondary" severity={severity} width="100%">
247
+ {name}
248
+ </Button>
249
+ ))}
250
+ </VStack>
251
+ <VStack gap="12px" vAlign="center" width="120px">
252
+ {severityOptions.map(({ name, severity }) => (
253
+ <Button key={name} hierarchy="primary" severity={severity} width="100%">
254
+ {name}
255
+ </Button>
256
+ ))}
257
+ </VStack>
258
+ </HStack>
259
+ ),
260
+ };
261
+
262
+ // ============================================================================
263
+ // SLIM BUTTON EXAMPLES
264
+ // ============================================================================
265
+
266
+ export const SlimButtonBaselineShowcase: Story = {
267
+ render: () => (
268
+ <HStack gap="12px" vAlign="center">
269
+ <SlimButton>
270
+ <SearchIcon />
271
+ </SlimButton>
272
+ </HStack>
273
+ ),
274
+ };
275
+
276
+ export const SlimButtonHierarchy: Story = {
277
+ render: () => (
278
+ <HStack gap="12px" vAlign="center">
279
+ <SlimButton hierarchy="tertiary">
280
+ <CrossIcon />
281
+ </SlimButton>
282
+ <SlimButton hierarchy="secondary">
283
+ <SearchIcon />
284
+ </SlimButton>
285
+ <SlimButton hierarchy="primary">
286
+ <PlusIcon />
287
+ </SlimButton>
288
+ </HStack>
289
+ ),
290
+ };
291
+
292
+ export const SlimButtonSizes: Story = {
293
+ render: () => (
294
+ <HStack gap="12px" vAlign="center">
295
+ <SlimButton size="sm" hierarchy="primary">
296
+ <PlusIcon />
297
+ </SlimButton>
298
+ <SlimButton size="md" hierarchy="primary">
299
+ <PlusIcon />
300
+ </SlimButton>
301
+ <SlimButton size="lg" hierarchy="primary">
302
+ <PlusIcon />
303
+ </SlimButton>
304
+ </HStack>
305
+ ),
306
+ };
307
+
308
+ export const SlimButtonDisabled: Story = {
309
+ render: () => (
310
+ <HStack gap="12px" vAlign="center">
311
+ <SlimButton hierarchy="tertiary" disabled>
312
+ <CrossIcon />
313
+ </SlimButton>
314
+ <SlimButton hierarchy="secondary" disabled>
315
+ <SearchIcon />
316
+ </SlimButton>
317
+ <SlimButton hierarchy="primary" disabled>
318
+ <PlusIcon />
319
+ </SlimButton>
320
+ </HStack>
321
+ ),
322
+ };
323
+
324
+ export const SlimButtonColors: Story = {
325
+ render: () => (
326
+ <HStack gap="12px" vAlign="center">
327
+ {tcnBrandedColors.map(({ name, action }) => (
328
+ <SlimButton key={name} hierarchy="primary" color={action}>
329
+ <SearchIcon />
330
+ </SlimButton>
331
+ ))}
332
+ </HStack>
333
+ ),
334
+ };
335
+
336
+ export const SlimButtonSeverity: Story = {
337
+ render: () => (
338
+ <HStack gap="12px" vAlign="center">
339
+ {severityOptions.map(({ name, severity }) => (
340
+ <SlimButton key={name} hierarchy="primary" severity={severity}>
341
+ <CrossIcon />
342
+ </SlimButton>
343
+ ))}
344
+ </HStack>
345
+ ),
346
+ };
347
+
348
+ // ============================================================================
349
+ // BUTTON GROUP EXAMPLES
350
+ // ============================================================================
351
+
352
+ export const ButtonGroupBaselineShowcase: Story = {
353
+ render: () => (
354
+ <HStack gap="12px" vAlign="center">
355
+ <ButtonGroup>
356
+ <Button>First</Button>
357
+ <Button>Second</Button>
358
+ <Button>Third</Button>
359
+ </ButtonGroup>
360
+ </HStack>
361
+ ),
362
+ };
363
+
364
+ export const ButtonGroupHierarchy: Story = {
365
+ render: () => (
366
+ <VStack gap="12px" hAlign="start">
367
+ <ButtonGroup hierarchy="tertiary">
368
+ <Button>First</Button>
369
+ <Button>Second</Button>
370
+ <Button>Third</Button>
371
+ </ButtonGroup>
372
+ <ButtonGroup hierarchy="secondary">
373
+ <Button>First</Button>
374
+ <Button>Second</Button>
375
+ <Button>Third</Button>
376
+ </ButtonGroup>
377
+ <ButtonGroup hierarchy="primary">
378
+ <Button>First</Button>
379
+ <Button>Second</Button>
380
+ <Button>Third</Button>
381
+ </ButtonGroup>
382
+ </VStack>
383
+ ),
384
+ };
385
+
386
+ export const ButtonGroupSeverity: Story = {
387
+ render: () => (
388
+ <VStack gap="12px" hAlign="start">
389
+ <ButtonGroup hierarchy="tertiary">
390
+ <Button>First</Button>
391
+ <Button>Second</Button>
392
+ <Button severity="dangerous">Dangerous</Button>
393
+ </ButtonGroup>
394
+ <ButtonGroup hierarchy="secondary">
395
+ <Button>First</Button>
396
+ <Button>Second</Button>
397
+ <Button severity="cautious">Cautious</Button>
398
+ </ButtonGroup>
399
+ <ButtonGroup hierarchy="tertiary">
400
+ <Button>First</Button>
401
+ <Button>Second</Button>
402
+ <Button severity="neutral">Neutral</Button>
403
+ </ButtonGroup>
404
+ <ButtonGroup hierarchy="secondary">
405
+ <Button>First</Button>
406
+ <Button>Second</Button>
407
+ <Button severity="suggested">Suggested</Button>
408
+ </ButtonGroup>
409
+ <ButtonGroup hierarchy="primary">
410
+ <Button>First</Button>
411
+ <Button>Second</Button>
412
+ <Button severity="encouraged">Encouraged</Button>
413
+ </ButtonGroup>
414
+ </VStack>
415
+ ),
416
+ };
417
+
418
+ export const ButtonGroupSizes: Story = {
419
+ render: () => (
420
+ <VStack gap="12px" hAlign="start">
421
+ <ButtonGroup size="sm">
422
+ <Button>Small</Button>
423
+ <Button>Group</Button>
424
+ </ButtonGroup>
425
+ <ButtonGroup size="md">
426
+ <Button>Medium</Button>
427
+ <Button>Group</Button>
428
+ </ButtonGroup>
429
+ <ButtonGroup size="lg">
430
+ <Button>Large</Button>
431
+ <Button>Group</Button>
432
+ </ButtonGroup>
433
+ </VStack>
434
+ ),
435
+ };
436
+
437
+ export const ButtonGroupDisabled: Story = {
438
+ render: () => (
439
+ <VStack gap="12px" hAlign="start">
440
+ <ButtonGroup hierarchy="tertiary">
441
+ <Button>Active</Button>
442
+ <Button disabled>Disabled</Button>
443
+ <Button>Active</Button>
444
+ </ButtonGroup>
445
+ <ButtonGroup hierarchy="secondary">
446
+ <Button>Active</Button>
447
+ <Button disabled>Disabled</Button>
448
+ <Button>Active</Button>
449
+ </ButtonGroup>
450
+ <ButtonGroup hierarchy="primary">
451
+ <Button>Active</Button>
452
+ <Button disabled>Disabled</Button>
453
+ <Button>Active</Button>
454
+ </ButtonGroup>
455
+ </VStack>
456
+ ),
457
+ };
458
+
459
+ export const ButtonGroupWithIcons: Story = {
460
+ render: () => (
461
+ <VStack gap="12px" hAlign="start">
462
+ <ButtonGroup>
463
+ <Button>
464
+ First
465
+ <Spacer width="6px" />
466
+ <PlusIcon />
467
+ </Button>
468
+ <Button>
469
+ Second
470
+ <Spacer width="6px" />
471
+ <SearchIcon />
472
+ </Button>
473
+ <Button>
474
+ Third
475
+ <Spacer width="6px" />
476
+ <PlusIcon />
477
+ </Button>
478
+ </ButtonGroup>
479
+ </VStack>
480
+ ),
481
+ };
@@ -0,0 +1,6 @@
1
+ .container {
2
+ display: grid;
3
+ grid-template-columns: repeat(auto-fit, minmax(var(--min-column-width), 1fr));
4
+ gap: 20px;
5
+ max-width: var(--max-gallery-width);
6
+ }
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import styles from './gallery.module.css';
3
+
4
+ export interface GalleryProps {
5
+ children: React.ReactNode;
6
+ minColumnWidth?: string;
7
+ maxGalleryWidth?: string;
8
+ }
9
+
10
+ export const Gallery: React.FC<GalleryProps> = ({
11
+ children,
12
+ minColumnWidth = '300px',
13
+ maxGalleryWidth = '1200px',
14
+ }) => {
15
+ return (
16
+ <section
17
+ className={styles.container}
18
+ style={
19
+ {
20
+ '--min-column-width': minColumnWidth,
21
+ '--max-gallery-width': maxGalleryWidth,
22
+ } as React.CSSProperties
23
+ }
24
+ >
25
+ {children}
26
+ </section>
27
+ );
28
+ };
@@ -0,0 +1,55 @@
1
+ .showcase {
2
+ border: 1px solid var(--docs-border-color, #e5e7eb);
3
+ background-color: var(--docs-card-bg, #fff);
4
+ border-radius: 8px;
5
+ overflow: hidden;
6
+ height: fit-content;
7
+ }
8
+
9
+ .toolbar {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: space-between;
13
+ padding: 8px 16px;
14
+ }
15
+
16
+ .header {
17
+ min-height: 48px;
18
+ background-color: var(--docs-header-bg, #fafafa);
19
+ }
20
+
21
+ .title {
22
+ font-size: 14px;
23
+ font-weight: 600;
24
+ color: var(--docs-text-color, #1f2937);
25
+ margin: 0px !important;
26
+ }
27
+
28
+ .subtitle {
29
+ background-color: var(--docs-header-bg, #fafafa);
30
+ flex-grow: 1;
31
+ }
32
+
33
+ .documentation {
34
+ color: var(--docs-text-muted, #6b7280);
35
+ padding: 0px 16px;
36
+ }
37
+
38
+ .description {
39
+ font-size: 12px;
40
+ color: var(--docs-text-muted, #6b7280);
41
+ }
42
+
43
+ .content {
44
+ min-height: 200px;
45
+ background-color: red;
46
+ width: 100%;
47
+ border: none !important;
48
+ box-shadow: none !important;
49
+ margin: 0px !important;
50
+ border-radius: 0px !important;
51
+
52
+ :global(.docs-story) {
53
+ min-height: 200px !important;
54
+ }
55
+ }
@@ -0,0 +1,121 @@
1
+ import React from 'react';
2
+ import { Canvas } from '@storybook/addon-docs/blocks';
3
+ import { HStack } from '../../../stacks/index.js';
4
+ import styles from './showcase.module.css';
5
+ import clsx from 'clsx';
6
+
7
+ export interface ShowcaseProps {
8
+ /** Title displayed at the top of the card */
9
+ title?: string;
10
+ // A concise description of the showcase
11
+ description?: React.ReactNode;
12
+ /** The story to render */
13
+ of: any;
14
+ /** Width of the card */
15
+ minWidth?: string;
16
+ maxWidth?: string;
17
+ // Addition documentation for the showcase
18
+ children?: React.ReactNode;
19
+ }
20
+
21
+ /**
22
+ * Example card component for MDX documentation.
23
+ * Displays as a cohesive card with header, content, and footer.
24
+ */
25
+ export const Showcase: React.FC<ShowcaseProps> = ({
26
+ title,
27
+ description,
28
+ of,
29
+ minWidth = '300px',
30
+ maxWidth = '600px',
31
+ children,
32
+ }: ShowcaseProps) => (
33
+ <div
34
+ style={{
35
+ minWidth,
36
+ maxWidth,
37
+ height: 'fit-content',
38
+ }}
39
+ className={styles.showcase}
40
+ >
41
+ <HStack className={clsx(styles.header, styles.toolbar)}>
42
+ <h4 className={styles.title}>{title}</h4>
43
+ </HStack>
44
+ <HStack className={clsx(styles.subtitle, styles.toolbar)} vAlign="start">
45
+ <div className={styles.description}>{description}</div>
46
+ </HStack>
47
+ <HStack className={clsx(styles.subtitle, styles.toolbar)} vAlign="start">
48
+ <div className={styles.documentation}>{children}</div>
49
+ </HStack>
50
+ <Canvas
51
+ className={styles.content}
52
+ layout="centered"
53
+ of={of}
54
+ sourceState={'hidden'}
55
+ story={{
56
+ inline: true,
57
+ }}
58
+ />
59
+ </div>
60
+ );
61
+
62
+ /**
63
+ * Section component - displays examples in a flex row that wraps.
64
+ */
65
+ export const Section = ({
66
+ title,
67
+ description,
68
+ children,
69
+ maxWidth = '100%',
70
+ }: {
71
+ title: string;
72
+ description?: React.ReactNode;
73
+ children: React.ReactNode;
74
+ maxWidth?: string;
75
+ }) => {
76
+ return (
77
+ <section
78
+ style={{
79
+ maxWidth,
80
+ marginBottom: '48px',
81
+ }}
82
+ >
83
+ {/* Section Header */}
84
+ <div style={{ marginBottom: '24px' }}>
85
+ <h2
86
+ style={{
87
+ margin: '0 0 8px 0',
88
+ fontSize: '20px',
89
+ fontWeight: 600,
90
+ color: 'var(--docs-text-color, #1f2937)',
91
+ }}
92
+ >
93
+ {title}
94
+ </h2>
95
+ {description && (
96
+ <p
97
+ style={{
98
+ margin: 0,
99
+ fontSize: '14px',
100
+ color: 'var(--docs-text-muted, #6b7280)',
101
+ lineHeight: 1.6,
102
+ }}
103
+ >
104
+ {description}
105
+ </p>
106
+ )}
107
+ </div>
108
+
109
+ {/* Cards Grid - Flex row with wrap */}
110
+ <div
111
+ style={{
112
+ display: 'flex',
113
+ flexWrap: 'wrap',
114
+ gap: '20px',
115
+ }}
116
+ >
117
+ {children}
118
+ </div>
119
+ </section>
120
+ );
121
+ };