@tcn/ui 0.2.0 → 0.3.1

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 (341) hide show
  1. package/dist/Color-ASIRERSW-B4GaVKuQ.js +990 -0
  2. package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +1 -0
  3. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js +1485 -0
  4. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +1 -0
  5. package/dist/actions/__docs__/components/gallery.d.ts +8 -0
  6. package/dist/actions/__docs__/components/gallery.d.ts.map +1 -0
  7. package/dist/actions/__docs__/components/gallery.js +20 -0
  8. package/dist/actions/__docs__/components/gallery.js.map +1 -0
  9. package/dist/actions/__docs__/components/showcase.d.ts +27 -0
  10. package/dist/actions/__docs__/components/showcase.d.ts.map +1 -0
  11. package/dist/actions/__docs__/components/showcase.js +15 -0
  12. package/dist/actions/__docs__/components/showcase.js.map +1 -0
  13. package/dist/actions/button/base_button/base_button.d.ts +2 -0
  14. package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
  15. package/dist/actions/button/base_button/base_button.js +18 -16
  16. package/dist/actions/button/base_button/base_button.js.map +1 -1
  17. package/dist/actions/button/button/button.js +6 -6
  18. package/dist/actions/button/button_group/button_group.js +1 -1
  19. package/dist/actions/button/select_group/select_group.js +13 -13
  20. package/dist/actions/button/select_group/single_select_group.js +6 -6
  21. package/dist/actions/button/slim_button/slim_button.js +2 -2
  22. package/dist/actions/types.d.ts +2 -0
  23. package/dist/actions/types.d.ts.map +1 -0
  24. package/dist/actions/types.js +2 -0
  25. package/dist/actions/types.js.map +1 -0
  26. package/dist/divider.module-FptFV0PX.js +5 -0
  27. package/dist/divider.module-FptFV0PX.js.map +1 -0
  28. package/dist/feedback/loading/loading.js +12 -12
  29. package/dist/feedback/loading/loading.js.map +1 -1
  30. package/dist/feedback/progress/progress_bar.js +1 -1
  31. package/dist/form/field/common/field_control/field_control.js +8 -8
  32. package/dist/form/field/common/status_input/status_input.js +6 -6
  33. package/dist/form/field/field.js +6 -6
  34. package/dist/form/field/h_field/h_field.js +11 -11
  35. package/dist/form/field/v_field/v_field.js +10 -10
  36. package/dist/form/field_set/field_set.js +3 -3
  37. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +6 -0
  38. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +1 -0
  39. package/dist/frame.css +1 -0
  40. package/dist/gallery.css +1 -0
  41. package/dist/inputs/checkbox/checkbox.js +11 -11
  42. package/dist/inputs/color_input/color_input.js +1 -1
  43. package/dist/inputs/color_input/color_input.js.map +1 -1
  44. package/dist/inputs/color_input/color_picker.js +6 -6
  45. package/dist/inputs/combo_box/combo_box.js +17 -17
  46. package/dist/inputs/date_picker/date_picker.js +19 -19
  47. package/dist/inputs/date_picker/date_picker_body.js +2 -2
  48. package/dist/inputs/date_picker/date_picker_input.js +20 -20
  49. package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
  50. package/dist/inputs/date_picker/date_picker_year_input.js +1 -1
  51. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  52. package/dist/inputs/date_picker/date_picker_year_selector.js +1 -1
  53. package/dist/inputs/input/input.js +5 -5
  54. package/dist/inputs/mask_input/key_capture_input.js +8 -8
  55. package/dist/inputs/mask_input/mask_input.js +5 -5
  56. package/dist/inputs/multi_combo_box/multi_combo_box.js +17 -17
  57. package/dist/inputs/multiselect/multiselect.js +14 -14
  58. package/dist/inputs/multiselect/multiselect_row.js +8 -8
  59. package/dist/inputs/phone_number_input/phone_number_input.js +12 -12
  60. package/dist/inputs/radio/radio.js +10 -10
  61. package/dist/inputs/radio/radio_row.js +3 -3
  62. package/dist/inputs/select/select.js +15 -15
  63. package/dist/inputs/slider/slider.js +11 -11
  64. package/dist/inputs/suggestions/suggestion_list.js +2 -2
  65. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  66. package/dist/inputs/switch/switch.js +5 -5
  67. package/dist/inputs/textarea/textarea.js +7 -7
  68. package/dist/inputs/unit_input/unit_input.js +5 -5
  69. package/dist/layouts/body/h_body.js +7 -7
  70. package/dist/layouts/body/v_body.js +6 -6
  71. package/dist/layouts/column/column.js +17 -17
  72. package/dist/layouts/divider/divider.js +24 -23
  73. package/dist/layouts/divider/divider.js.map +1 -1
  74. package/dist/layouts/footer/footer.js +7 -7
  75. package/dist/layouts/grid/grid.js +24 -24
  76. package/dist/layouts/header/header.js +2 -2
  77. package/dist/layouts/index.d.ts +6 -5
  78. package/dist/layouts/index.d.ts.map +1 -1
  79. package/dist/layouts/index.js +28 -26
  80. package/dist/layouts/index.js.map +1 -1
  81. package/dist/layouts/list/item.js +2 -2
  82. package/dist/layouts/list/list.js +7 -7
  83. package/dist/layouts/list/section_header.js +6 -6
  84. package/dist/layouts/scaffold/scaffold.d.ts +9 -0
  85. package/dist/layouts/scaffold/scaffold.d.ts.map +1 -0
  86. package/dist/layouts/scaffold/scaffold.js +55 -0
  87. package/dist/layouts/scaffold/scaffold.js.map +1 -0
  88. package/dist/layouts/sidebar_end/sidebar_end.js +14 -14
  89. package/dist/layouts/sidebar_start/sidebar_start.js +10 -10
  90. package/dist/layouts/utility_bar/utility_bar.js +10 -10
  91. package/dist/modal.css +1 -1
  92. package/dist/overlay/frame/frame.d.ts.map +1 -1
  93. package/dist/overlay/frame/frame.js +22 -5
  94. package/dist/overlay/frame/frame.js.map +1 -1
  95. package/dist/overlay/index.d.ts +9 -2
  96. package/dist/overlay/index.d.ts.map +1 -1
  97. package/dist/overlay/index.js +22 -10
  98. package/dist/overlay/index.js.map +1 -1
  99. package/dist/overlay/menu/menu.d.ts +1 -1
  100. package/dist/overlay/menu/menu.d.ts.map +1 -1
  101. package/dist/overlay/menu/menu.js +36 -36
  102. package/dist/overlay/menu/menu.js.map +1 -1
  103. package/dist/overlay/popper/base/base_popper.d.ts +11 -0
  104. package/dist/overlay/popper/base/base_popper.d.ts.map +1 -0
  105. package/dist/overlay/popper/base/base_popper.js +27 -0
  106. package/dist/overlay/popper/base/base_popper.js.map +1 -0
  107. package/dist/overlay/popper/base/dismissal_decorator.d.ts +16 -0
  108. package/dist/overlay/popper/base/dismissal_decorator.d.ts.map +1 -0
  109. package/dist/overlay/popper/base/dismissal_decorator.js +69 -0
  110. package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -0
  111. package/dist/overlay/popper/context_popper.d.ts +11 -0
  112. package/dist/overlay/popper/context_popper.d.ts.map +1 -0
  113. package/dist/overlay/popper/context_popper.js +33 -0
  114. package/dist/overlay/popper/context_popper.js.map +1 -0
  115. package/dist/overlay/popper/element_popper.d.ts +7 -0
  116. package/dist/overlay/popper/element_popper.d.ts.map +1 -0
  117. package/dist/overlay/popper/element_popper.js +33 -0
  118. package/dist/overlay/popper/element_popper.js.map +1 -0
  119. package/dist/overlay/popper/hooks/use_context_trigger.d.ts +7 -0
  120. package/dist/overlay/popper/hooks/use_context_trigger.d.ts.map +1 -0
  121. package/dist/overlay/popper/hooks/use_context_trigger.js +31 -0
  122. package/dist/overlay/popper/hooks/use_context_trigger.js.map +1 -0
  123. package/dist/overlay/popper/hooks/use_hover_trigger.d.ts +6 -0
  124. package/dist/overlay/popper/hooks/use_hover_trigger.d.ts.map +1 -0
  125. package/dist/overlay/popper/hooks/use_hover_trigger.js +17 -0
  126. package/dist/overlay/popper/hooks/use_hover_trigger.js.map +1 -0
  127. package/dist/overlay/popper/hooks/use_restore_focus.d.ts +2 -0
  128. package/dist/overlay/popper/hooks/use_restore_focus.d.ts.map +1 -0
  129. package/dist/overlay/popper/hooks/use_restore_focus.js +18 -0
  130. package/dist/overlay/popper/hooks/use_restore_focus.js.map +1 -0
  131. package/dist/overlay/popper/legacy/popper.d.ts.map +1 -0
  132. package/dist/overlay/popper/{popper.js → legacy/popper.js} +6 -6
  133. package/dist/overlay/popper/legacy/popper.js.map +1 -0
  134. package/dist/overlay/popper/preview_popper.d.ts +7 -0
  135. package/dist/overlay/popper/preview_popper.d.ts.map +1 -0
  136. package/dist/overlay/popper/preview_popper.js +46 -0
  137. package/dist/overlay/popper/preview_popper.js.map +1 -0
  138. package/dist/overlay/portal/portal_platform_context.js +4 -4
  139. package/dist/overlay/tethered/element_tethered.d.ts +8 -0
  140. package/dist/overlay/tethered/element_tethered.d.ts.map +1 -0
  141. package/dist/overlay/tethered/element_tethered.js +33 -0
  142. package/dist/overlay/tethered/element_tethered.js.map +1 -0
  143. package/dist/overlay/tethered/hooks/calculate_position.d.ts +19 -0
  144. package/dist/overlay/tethered/hooks/calculate_position.d.ts.map +1 -0
  145. package/dist/overlay/tethered/hooks/calculate_position.js +43 -0
  146. package/dist/overlay/tethered/hooks/calculate_position.js.map +1 -0
  147. package/dist/overlay/tethered/hooks/useTether.d.ts +19 -0
  148. package/dist/overlay/tethered/hooks/useTether.d.ts.map +1 -0
  149. package/dist/overlay/tethered/hooks/useTether.js +61 -0
  150. package/dist/overlay/tethered/hooks/useTether.js.map +1 -0
  151. package/dist/overlay/tethered/tethered.d.ts +20 -0
  152. package/dist/overlay/tethered/tethered.d.ts.map +1 -0
  153. package/dist/overlay/tethered/tethered.js +59 -0
  154. package/dist/overlay/tethered/tethered.js.map +1 -0
  155. package/dist/overlay/tethered/types.d.ts +3 -0
  156. package/dist/overlay/tethered/types.d.ts.map +1 -0
  157. package/dist/overlay/tethered/types.js +2 -0
  158. package/dist/overlay/tethered/types.js.map +1 -0
  159. package/dist/popper.css +1 -1
  160. package/dist/scaffold.css +1 -0
  161. package/dist/showcase-WfP6kBEb.js +58401 -0
  162. package/dist/showcase-WfP6kBEb.js.map +1 -0
  163. package/dist/showcase.css +1 -0
  164. package/dist/stacks/box/box.js +24 -24
  165. package/dist/stacks/h_collapsible_box.js +3 -3
  166. package/dist/stacks/h_stack.js +41 -41
  167. package/dist/stacks/spacer.js +11 -11
  168. package/dist/stacks/story_components/circle.js +10 -10
  169. package/dist/stacks/story_components/picture_placeholder.js +9 -9
  170. package/dist/stacks/story_components/rect.js +7 -7
  171. package/dist/stacks/story_components/style_box.js +4 -4
  172. package/dist/stacks/utils/use_is_collapsed.js +6 -6
  173. package/dist/stacks/v_collapsible_box.js +3 -3
  174. package/dist/stacks/v_stack.js +42 -42
  175. package/dist/stacks/z_stack.js +39 -39
  176. package/dist/surfaces/alert/alert.js +4 -4
  177. package/dist/surfaces/card/card.d.ts +2 -2
  178. package/dist/surfaces/card/card.d.ts.map +1 -1
  179. package/dist/surfaces/card/card.js +7 -7
  180. package/dist/surfaces/card/card.js.map +1 -1
  181. package/dist/surfaces/confirm/confirm.js +9 -9
  182. package/dist/surfaces/drawers/drawer_start/drawer_start.js +2 -2
  183. package/dist/surfaces/drawers/drawer_top/drawer_top.js +2 -2
  184. package/dist/surfaces/index.d.ts +2 -0
  185. package/dist/surfaces/index.d.ts.map +1 -1
  186. package/dist/surfaces/index.js +22 -18
  187. package/dist/surfaces/index.js.map +1 -1
  188. package/dist/surfaces/modal/modal.d.ts +3 -3
  189. package/dist/surfaces/modal/modal.d.ts.map +1 -1
  190. package/dist/surfaces/modal/modal.js +14 -14
  191. package/dist/surfaces/modal/modal.js.map +1 -1
  192. package/dist/surfaces/page/h_page.js +7 -7
  193. package/dist/surfaces/page/v_page.js +5 -5
  194. package/dist/surfaces/panel/h_panel.js +29 -30
  195. package/dist/surfaces/panel/h_panel.js.map +1 -1
  196. package/dist/surfaces/panel/v_panel.d.ts +3 -7
  197. package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
  198. package/dist/surfaces/panel/v_panel.js +12 -54
  199. package/dist/surfaces/panel/v_panel.js.map +1 -1
  200. package/dist/surfaces/pop_confirm/pop_confirm.d.ts +5 -0
  201. package/dist/surfaces/pop_confirm/pop_confirm.d.ts.map +1 -0
  202. package/dist/surfaces/pop_confirm/pop_confirm.js +37 -0
  203. package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -0
  204. package/dist/surfaces/popconfirm/pop_confirm.d.ts +5 -0
  205. package/dist/surfaces/popconfirm/pop_confirm.d.ts.map +1 -0
  206. package/dist/surfaces/popconfirm/pop_confirm.js +13 -0
  207. package/dist/surfaces/popconfirm/pop_confirm.js.map +1 -0
  208. package/dist/surfaces/popover/popover.d.ts +1 -1
  209. package/dist/surfaces/popover/popover.d.ts.map +1 -1
  210. package/dist/surfaces/popover/popover.js +1 -1
  211. package/dist/surfaces/popover/popover.js.map +1 -1
  212. package/dist/surfaces/tooltip/tooltip.d.ts +10 -0
  213. package/dist/surfaces/tooltip/tooltip.d.ts.map +1 -0
  214. package/dist/surfaces/tooltip/tooltip.js +38 -0
  215. package/dist/surfaces/tooltip/tooltip.js.map +1 -0
  216. package/dist/surfaces/window/window.d.ts +3 -3
  217. package/dist/surfaces/window/window.d.ts.map +1 -1
  218. package/dist/surfaces/window/window.js +15 -13
  219. package/dist/surfaces/window/window.js.map +1 -1
  220. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js +3777 -0
  221. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +1 -0
  222. package/dist/tethered.css +1 -0
  223. package/dist/themes/themes/ergo/ergo_theme.js +177 -206
  224. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  225. package/dist/tokens/badge/badge.js +9 -9
  226. package/dist/tokens/bubble/bubble.js +8 -8
  227. package/dist/tokens/chip/chip.js +3 -3
  228. package/dist/tooltip.css +1 -1
  229. package/dist/utility_bar.css +1 -1
  230. package/dist/utils/click_away_listener.d.ts +1 -0
  231. package/dist/utils/click_away_listener.d.ts.map +1 -1
  232. package/dist/utils/click_away_listener.js +12 -11
  233. package/dist/utils/click_away_listener.js.map +1 -1
  234. package/dist/utils/dnd/draggable/draggable.js +4 -4
  235. package/dist/utils/dnd/handle.js +8 -8
  236. package/dist/utils/focus_redirect.js +5 -5
  237. package/dist/utils/hooks/make_context_hook.js +4 -4
  238. package/dist/utils/hooks/use_media_query.js +2 -2
  239. package/dist/utils/hooks/use_media_query.js.map +1 -1
  240. package/dist/utils/index.d.ts +6 -5
  241. package/dist/utils/index.d.ts.map +1 -1
  242. package/dist/utils/index.js +26 -23
  243. package/dist/utils/index.js.map +1 -1
  244. package/dist/utils/mouse_leave_region.d.ts +8 -0
  245. package/dist/utils/mouse_leave_region.d.ts.map +1 -0
  246. package/dist/utils/mouse_leave_region.js +26 -0
  247. package/dist/utils/mouse_leave_region.js.map +1 -0
  248. package/dist/utils/types/dimensions.d.ts +11 -1
  249. package/dist/utils/types/dimensions.d.ts.map +1 -1
  250. package/package.json +3 -3
  251. package/src/actions/__docs__/actions.mdx +131 -0
  252. package/src/actions/__docs__/actions.stories.tsx +309 -0
  253. package/src/actions/__docs__/components/gallery.module.css +6 -0
  254. package/src/actions/__docs__/components/gallery.tsx +28 -0
  255. package/src/actions/__docs__/components/showcase.module.css +55 -0
  256. package/src/actions/__docs__/components/showcase.tsx +121 -0
  257. package/src/actions/button/base_button/base_button.tsx +5 -1
  258. package/src/actions/types.ts +6 -0
  259. package/src/inputs/color_input/color_input.tsx +1 -1
  260. package/src/inputs/date_picker/date_picker_input.tsx +1 -1
  261. package/src/inputs/date_picker/date_picker_year_input.tsx +1 -1
  262. package/src/inputs/suggestions/suggestion_list.tsx +1 -1
  263. package/src/layouts/index.ts +7 -5
  264. package/src/layouts/scaffold/scaffold.module.css +5 -0
  265. package/src/layouts/scaffold/scaffold.tsx +60 -0
  266. package/src/layouts/utility_bar/utility_bar.module.css +0 -3
  267. package/src/overlay/frame/frame.module.css +5 -0
  268. package/src/overlay/frame/frame.stories.tsx +1 -1
  269. package/src/overlay/frame/frame.tsx +19 -3
  270. package/src/overlay/index.ts +29 -2
  271. package/src/overlay/menu/menu.tsx +1 -1
  272. package/src/overlay/popper/__stories__/base_args.ts +75 -0
  273. package/src/overlay/popper/__stories__/context_popper.stories.tsx +77 -0
  274. package/src/overlay/popper/__stories__/element_popper.stories.tsx +80 -0
  275. package/src/overlay/popper/__stories__/preview_popper.stories.tsx +73 -0
  276. package/src/overlay/popper/base/base_popper.tsx +55 -0
  277. package/src/overlay/popper/base/dismissal_decorator.tsx +80 -0
  278. package/src/overlay/popper/context_popper.tsx +43 -0
  279. package/src/overlay/popper/element_popper.tsx +42 -0
  280. package/src/overlay/popper/hooks/use_context_trigger.ts +50 -0
  281. package/src/overlay/popper/hooks/use_hover_trigger.ts +24 -0
  282. package/src/overlay/popper/hooks/use_restore_focus.ts +16 -0
  283. package/src/overlay/popper/{popper.stories.tsx → legacy/popper.stories.tsx} +11 -5
  284. package/src/overlay/popper/{popper.tsx → legacy/popper.tsx} +3 -2
  285. package/src/overlay/popper/preview_popper.tsx +54 -0
  286. package/src/overlay/tethered/__stories__/element/element_tethered.stories.tsx +57 -0
  287. package/src/overlay/tethered/__stories__/element/element_tethered_stories.module.css +14 -0
  288. package/src/overlay/tethered/__stories__/shared/base_story_config.ts +52 -0
  289. package/src/overlay/tethered/__stories__/shared/components/sb_point.module.css +20 -0
  290. package/src/overlay/tethered/__stories__/shared/components/sb_point.tsx +34 -0
  291. package/src/overlay/tethered/__stories__/shared/components/sb_reference_points.tsx +54 -0
  292. package/src/overlay/tethered/__stories__/tethered/tethered.stories.tsx +90 -0
  293. package/src/overlay/tethered/__stories__/tethered/tethered_stories.module.css +25 -0
  294. package/src/overlay/tethered/element_tethered.tsx +62 -0
  295. package/src/overlay/tethered/hooks/calculate_position.ts +110 -0
  296. package/src/overlay/tethered/hooks/useTether.ts +85 -0
  297. package/src/overlay/tethered/tethered.module.css +8 -0
  298. package/src/overlay/tethered/tethered.tsx +72 -0
  299. package/src/overlay/tethered/types.ts +2 -0
  300. package/src/stacks/h_stack.stories.tsx +2 -2
  301. package/src/stacks/v_stack.stories.tsx +2 -2
  302. package/src/surfaces/card/card.stories.tsx +64 -0
  303. package/src/surfaces/card/card.tsx +4 -4
  304. package/src/surfaces/card/card_stories.module.css +13 -0
  305. package/src/surfaces/index.ts +2 -0
  306. package/src/surfaces/modal/__stories__/modal.stories.tsx +12 -1
  307. package/src/surfaces/modal/modal.module.css +2 -2
  308. package/src/surfaces/modal/modal.tsx +14 -12
  309. package/src/surfaces/panel/__stories__/panel.stories.tsx +1 -1
  310. package/src/surfaces/panel/v_panel.tsx +8 -53
  311. package/src/surfaces/pop_confirm/pop_confirm.stories.tsx +70 -0
  312. package/src/surfaces/pop_confirm/pop_confirm.tsx +30 -0
  313. package/src/surfaces/popconfirm/pop_confirm.tsx +18 -0
  314. package/src/surfaces/popover/popover.tsx +1 -1
  315. package/src/surfaces/tooltip/tooltip.stories.tsx +54 -0
  316. package/src/surfaces/tooltip/tooltip.tsx +59 -0
  317. package/src/surfaces/window/window.stories.tsx +15 -1
  318. package/src/surfaces/window/window.tsx +16 -12
  319. package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +7 -9
  320. package/src/themes/themes/ergo/__stories__/material.stories.tsx +2 -6
  321. package/src/themes/themes/ergo/__stories__/sb_materials.module.css +29 -21
  322. package/src/themes/themes/ergo/ergo_theme.css +177 -206
  323. package/src/utils/click_away_listener.tsx +1 -1
  324. package/src/utils/index.ts +7 -5
  325. package/src/utils/mouse_leave_region.tsx +38 -0
  326. package/src/utils/types/dimensions.ts +13 -1
  327. package/tsconfig.json +3 -0
  328. package/dist/overlay/popper/popper.d.ts.map +0 -1
  329. package/dist/overlay/popper/popper.js.map +0 -1
  330. package/dist/overlay/tooltip/tooltip.d.ts +0 -7
  331. package/dist/overlay/tooltip/tooltip.d.ts.map +0 -1
  332. package/dist/overlay/tooltip/tooltip.js +0 -20
  333. package/dist/overlay/tooltip/tooltip.js.map +0 -1
  334. package/dist/panel.module-DwGKncon.js +0 -5
  335. package/dist/panel.module-DwGKncon.js.map +0 -1
  336. package/src/overlay/tooltip/tooltip.stories.tsx +0 -22
  337. package/src/overlay/tooltip/tooltip.tsx +0 -24
  338. /package/dist/{panel.css → h_panel.css} +0 -0
  339. /package/dist/overlay/popper/{popper.d.ts → legacy/popper.d.ts} +0 -0
  340. /package/src/overlay/popper/{popper.module.css → legacy/popper.module.css} +0 -0
  341. /package/src/{overlay → surfaces}/tooltip/tooltip.module.css +0 -0
@@ -0,0 +1,309 @@
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 { SearchIcon } from '@tcn/icons/search_icon.js';
8
+ import { PlusIcon } from '@tcn/icons/plus_icon.js';
9
+ import { CrossIcon } from '@tcn/icons/cross_icon.js';
10
+ import type { ActionSeverity } from '../types.js';
11
+
12
+ /**
13
+ * These stories are used exclusively by the MDX documentation.
14
+ * They are hidden from the Storybook sidebar using tags.
15
+ */
16
+ const meta: Meta<typeof Button> = {
17
+ title: 'Catalog/Actions',
18
+ component: Button,
19
+ parameters: {
20
+ docs: {
21
+ story: { exclude: ['style'] },
22
+ },
23
+ },
24
+
25
+ // Hide these stories from the sidebar - they're only for MDX docs
26
+ tags: ['!autodocs', '!dev'],
27
+ };
28
+
29
+ export default meta;
30
+ type Story = StoryObj<typeof Button>;
31
+
32
+ // ============================================================================
33
+ // Utility Code
34
+ // ============================================================================
35
+
36
+ const tcnBrandedColors = [
37
+ {
38
+ name: 'Integrated Infrastructure',
39
+ action: '27, 15%, 43%',
40
+ },
41
+ {
42
+ name: 'Omnichannel Communications',
43
+ action: '197, 34%, 40%',
44
+ },
45
+ {
46
+ name: 'Workforce Engagement',
47
+ action: '23, 65%, 42%',
48
+ },
49
+ {
50
+ name: 'Integration and Automation',
51
+ action: '139, 21%, 39%',
52
+ },
53
+ {
54
+ name: 'Compliance and Data Management',
55
+ action: '49, 50%, 34%',
56
+ },
57
+ {
58
+ name: 'Intelligence, Reporting, and Analytics',
59
+ action: '214, 14%, 45%',
60
+ },
61
+ ];
62
+
63
+ const severityOptions: { name: string; severity: ActionSeverity }[] = [
64
+ {
65
+ name: 'Dangerous',
66
+ severity: 'dangerous',
67
+ },
68
+ {
69
+ name: 'Cautious',
70
+ severity: 'cautious',
71
+ },
72
+ {
73
+ name: 'Neutral',
74
+ severity: 'neutral',
75
+ },
76
+ {
77
+ name: 'Suggested',
78
+ severity: 'suggested',
79
+ },
80
+ {
81
+ name: 'Encouraged',
82
+ severity: 'encouraged',
83
+ },
84
+ ];
85
+
86
+ // ============================================================================
87
+ // HIERARCHY EXAMPLES
88
+ // ============================================================================
89
+
90
+ export const HierarchyShowcase: Story = {
91
+ render: () => (
92
+ <HStack gap="12px" vAlign="center">
93
+ <Button hierarchy="tertiary">Tertiary</Button>
94
+ <Button hierarchy="secondary">Secondary</Button>
95
+ <Button hierarchy="primary">Primary</Button>
96
+ </HStack>
97
+ ),
98
+ };
99
+
100
+ // ============================================================================
101
+ // SIZE EXAMPLES
102
+ // ============================================================================
103
+
104
+ export const SizeShowcase: Story = {
105
+ render: () => (
106
+ <HStack gap="12px" vAlign="center">
107
+ <Button size="sm">Small</Button>
108
+ <Button size="md">Medium</Button>
109
+ <Button size="lg">Large</Button>
110
+ </HStack>
111
+ ),
112
+ };
113
+
114
+ // ============================================================================
115
+ // DISABLED EXAMPLES
116
+ // ============================================================================
117
+
118
+ export const DisabledShowcase: Story = {
119
+ render: () => (
120
+ <HStack gap="12px" vAlign="center">
121
+ <VStack gap="12px" vAlign="center" width="200px">
122
+ <Button hierarchy="tertiary" disabled width="100%">
123
+ Tertiary Disabled
124
+ </Button>
125
+ <Button hierarchy="secondary" disabled width="100%">
126
+ Secondary Disabled
127
+ </Button>
128
+ <Button hierarchy="primary" disabled width="100%">
129
+ Primary Disabled
130
+ </Button>
131
+ </VStack>
132
+ </HStack>
133
+ ),
134
+ };
135
+
136
+ // ============================================================================
137
+ // WITH ICONS
138
+ // ============================================================================
139
+
140
+ export const IconShowcase: Story = {
141
+ render: () => (
142
+ <VStack gap="12px" vAlign="center">
143
+ <HStack gap="12px" vAlign="center">
144
+ <Button hierarchy="tertiary">
145
+ Cancel
146
+ <Spacer width="6px" />
147
+ <CrossIcon size="sm" />
148
+ </Button>
149
+ <Button hierarchy="secondary">
150
+ Search
151
+ <Spacer width="6px" />
152
+ <SearchIcon size="sm" />
153
+ </Button>
154
+ <Button hierarchy="primary">
155
+ Add
156
+ <Spacer width="6px" />
157
+ <PlusIcon size="sm" />
158
+ </Button>
159
+ </HStack>
160
+ <HStack gap="12px" vAlign="center">
161
+ <Button hierarchy="tertiary">
162
+ <CrossIcon size="sm" />
163
+ <Spacer width="6px" />
164
+ Cancel
165
+ </Button>
166
+ <Button hierarchy="secondary">
167
+ <SearchIcon size="sm" />
168
+ <Spacer width="6px" />
169
+ Search
170
+ </Button>
171
+ <Button hierarchy="primary">
172
+ <PlusIcon size="sm" />
173
+ <Spacer width="6px" />
174
+ Add
175
+ </Button>
176
+ </HStack>
177
+ </VStack>
178
+ ),
179
+ };
180
+
181
+ // ============================================================================
182
+ // CUSTOM COLORS
183
+ // ============================================================================
184
+
185
+ export const ColorShowcase: Story = {
186
+ render: () => (
187
+ <HStack vAlign="center" gap="12px">
188
+ <VStack gap="12px" vAlign="center" width="200px">
189
+ {tcnBrandedColors.map(({ name, action }) => (
190
+ <Button key={name} hierarchy="primary" color={action} width="100%">
191
+ {name}
192
+ </Button>
193
+ ))}
194
+ </VStack>
195
+ </HStack>
196
+ ),
197
+ };
198
+
199
+ // ============================================================================
200
+ // FULL WIDTH
201
+ // ============================================================================
202
+
203
+ export const FullWidth: Story = {
204
+ render: () => (
205
+ <HStack vAlign="center">
206
+ <VStack gap="12px" vAlign="center" width="200px">
207
+ <Button hierarchy="tertiary" width="100%">
208
+ Full Width Tertiary
209
+ </Button>
210
+ <Button hierarchy="secondary" width="100%">
211
+ Full Width Secondary
212
+ </Button>
213
+ <Button hierarchy="primary" width="100%">
214
+ Full Width Primary
215
+ </Button>
216
+ </VStack>
217
+ </HStack>
218
+ ),
219
+ };
220
+
221
+ export const SeverityShowcase: Story = {
222
+ render: () => (
223
+ <HStack vAlign="center">
224
+ <VStack gap="12px" vAlign="center" width="200px">
225
+ {severityOptions.map(({ name, severity }) => (
226
+ <Button key={name} hierarchy="primary" severity={severity} width="100%">
227
+ {name}
228
+ </Button>
229
+ ))}
230
+ </VStack>
231
+ </HStack>
232
+ ),
233
+ };
234
+
235
+ // ============================================================================
236
+ // SLIM BUTTON EXAMPLES
237
+ // ============================================================================
238
+
239
+ export const SlimButtonHierarchy: Story = {
240
+ render: () => (
241
+ <HStack gap="12px" vAlign="center">
242
+ <SlimButton hierarchy="tertiary">
243
+ <CrossIcon />
244
+ </SlimButton>
245
+ <SlimButton hierarchy="secondary">
246
+ <SearchIcon />
247
+ </SlimButton>
248
+ <SlimButton hierarchy="primary">
249
+ <PlusIcon />
250
+ </SlimButton>
251
+ </HStack>
252
+ ),
253
+ };
254
+
255
+ export const SlimButtonSizes: Story = {
256
+ render: () => (
257
+ <HStack gap="12px" vAlign="center">
258
+ <SlimButton size="sm" hierarchy="primary">
259
+ <PlusIcon />
260
+ </SlimButton>
261
+ <SlimButton size="md" hierarchy="primary">
262
+ <PlusIcon />
263
+ </SlimButton>
264
+ <SlimButton size="lg" hierarchy="primary">
265
+ <PlusIcon />
266
+ </SlimButton>
267
+ </HStack>
268
+ ),
269
+ };
270
+
271
+ export const SlimButtonDisabled: Story = {
272
+ render: () => (
273
+ <HStack gap="12px" vAlign="center">
274
+ <SlimButton hierarchy="tertiary" disabled>
275
+ <CrossIcon />
276
+ </SlimButton>
277
+ <SlimButton hierarchy="secondary" disabled>
278
+ <SearchIcon />
279
+ </SlimButton>
280
+ <SlimButton hierarchy="primary" disabled>
281
+ <PlusIcon />
282
+ </SlimButton>
283
+ </HStack>
284
+ ),
285
+ };
286
+
287
+ export const SlimButtonColors: Story = {
288
+ render: () => (
289
+ <HStack gap="12px" vAlign="center">
290
+ {tcnBrandedColors.map(({ name, action }) => (
291
+ <SlimButton key={name} hierarchy="primary" color={action}>
292
+ <SearchIcon />
293
+ </SlimButton>
294
+ ))}
295
+ </HStack>
296
+ ),
297
+ };
298
+
299
+ export const SlimButtonSeverity: Story = {
300
+ render: () => (
301
+ <HStack gap="12px" vAlign="center">
302
+ {severityOptions.map(({ name, severity }) => (
303
+ <SlimButton key={name} hierarchy="primary" severity={severity}>
304
+ <CrossIcon />
305
+ </SlimButton>
306
+ ))}
307
+ </HStack>
308
+ ),
309
+ };
@@ -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
+ };
@@ -5,11 +5,13 @@ import { HStack } from '../../../stacks/h_stack.js';
5
5
  import type { HStackOwnProps } from '../../../stacks/h_stack.js';
6
6
  import styles from './base_button.module.css';
7
7
  import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
8
+ import type { ActionSeverity } from '../../types.js';
8
9
 
9
10
  export interface BaseButtonOwnProps {
10
11
  hierarchy?: Hierarchy;
11
12
  size?: Size;
12
13
  color?: string;
14
+ severity?: ActionSeverity;
13
15
  }
14
16
 
15
17
  export type BaseButtonWithStackProps = BaseButtonOwnProps &
@@ -27,6 +29,7 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
27
29
  style,
28
30
  color,
29
31
  hierarchy = 'secondary',
32
+ severity = 'neutral',
30
33
  size = 'md',
31
34
  onTouchStart,
32
35
  onContextMenu,
@@ -55,7 +58,7 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
55
58
  };
56
59
 
57
60
  if (color) {
58
- finalStyle['--button-color'] = color;
61
+ finalStyle['--interactive-color'] = color;
59
62
  }
60
63
 
61
64
  return (
@@ -65,6 +68,7 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
65
68
  inline
66
69
  vAlign="center"
67
70
  hAlign="center"
71
+ data-severity={severity}
68
72
  data-hierarchy={hierarchy}
69
73
  data-size={size}
70
74
  data-is-disabled={Boolean(props.disabled)}
@@ -0,0 +1,6 @@
1
+ export type ActionSeverity =
2
+ | 'dangerous'
3
+ | 'cautious'
4
+ | 'neutral'
5
+ | 'suggested'
6
+ | 'encouraged';
@@ -11,7 +11,7 @@ import { ColorPicker } from './color_picker.js';
11
11
  import { Input } from '../input/input.js';
12
12
  import styles from './color_input.module.css';
13
13
 
14
- import { Popper } from '../../overlay/popper/popper.js';
14
+ import { Popper } from '../../overlay/popper/legacy/popper.js';
15
15
 
16
16
  export interface ColorInputProps
17
17
  extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange' | 'onError'> {
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2
2
  import { Hierarchy } from '../../utils/index.js';
3
3
  import { ZStack } from '../../stacks/z_stack.js';
4
- import { Popper } from '../../overlay/popper/popper.js';
4
+ import { Popper } from '../../overlay/popper/legacy/popper.js';
5
5
  import { clsx } from 'clsx';
6
6
  import { HTMLAttributes } from 'react';
7
7
  import { Button } from '../../actions/index.js';
@@ -2,7 +2,7 @@ import { Button } from '../../actions/index.js';
2
2
  import { clsx } from 'clsx';
3
3
  import styles from './date_picker_year_input.module.css';
4
4
  import { useState } from 'react';
5
- import { Popper } from '../../overlay/popper/popper.js';
5
+ import { Popper } from '../../overlay/popper/legacy/popper.js';
6
6
  import { DatePickerPresenter } from './date_picker_presenter.js';
7
7
  import { DatePickerYearSelector } from './date_picker_year_selector.js';
8
8
  import { useSignalValue } from '@tcn/state';
@@ -10,7 +10,7 @@ import { OptionProps, Option } from '../options/option.js';
10
10
  import styles from './suggestion_list.module.css';
11
11
 
12
12
  import { Button } from '../../actions/index.js';
13
- import { Popper } from '../../overlay/popper/popper.js';
13
+ import { Popper } from '../../overlay/popper/legacy/popper.js';
14
14
 
15
15
  const MAX_RESULTS = 50;
16
16
  const BATCH_SIZE = 50;
@@ -1,13 +1,15 @@
1
- export * from './body/h_body.js';
2
- export * from './body/v_body.js';
3
1
  export * from './column/column.js';
4
2
  export * from './divider/divider.js';
5
- export * from './footer/footer.js';
6
3
  export * from './grid/grid.js';
7
- export * from './header/header.js';
8
4
  export * from './list/item.js';
9
5
  export * from './list/list.js';
10
6
  export * from './list/section_header.js';
11
7
  export * from './sidebar_end/sidebar_end.js';
12
8
  export * from './sidebar_start/sidebar_start.js';
13
- export * from './utility_bar/utility_bar.js';
9
+ // Scaffold
10
+ export { Scaffold, type ScaffoldProps } from './scaffold/scaffold.js';
11
+ export { HBody, type HBodyProps } from './body/h_body.js';
12
+ export { VBody, type VBodyProps } from './body/v_body.js';
13
+ export { Footer, type FooterProps } from './footer/footer.js';
14
+ export { Header, type HeaderProps } from './header/header.js';
15
+ export { UtilityBar, type UtilityBarProps } from './utility_bar/utility_bar.js';
@@ -0,0 +1,5 @@
1
+ .scaffold-stack {
2
+ width: 100%;
3
+ height: 100%;
4
+ overflow: auto;
5
+ }
@@ -0,0 +1,60 @@
1
+ import React from 'react';
2
+ import { clsx } from 'clsx';
3
+ import { Box, type BoxProps } from '../../stacks/box/box.js';
4
+ import type { Alignment } from '../../stacks/types/alignment.js';
5
+ import { VStack } from '../../stacks/v_stack.js';
6
+ // Styles
7
+ import styles from './scaffold.module.css';
8
+
9
+ export interface ScaffoldProps extends Omit<BoxProps, 'as'> {
10
+ vAlign?: Alignment;
11
+ hAlign?: Alignment;
12
+ }
13
+
14
+ export const Scaffold = React.forwardRef<HTMLElement, ScaffoldProps>(function Scaffold(
15
+ {
16
+ children,
17
+ width,
18
+ height = '100%',
19
+ minWidth,
20
+ maxWidth,
21
+ minHeight,
22
+ maxHeight,
23
+ hAlign,
24
+ vAlign = 'start',
25
+ className,
26
+ ...props
27
+ }: ScaffoldProps,
28
+ ref
29
+ ) {
30
+ return (
31
+ <Box
32
+ ref={ref}
33
+ width={width}
34
+ height={height}
35
+ minWidth={minWidth}
36
+ maxWidth={maxWidth}
37
+ minHeight={minHeight}
38
+ maxHeight={maxHeight}
39
+ data-h-alignment={hAlign}
40
+ data-v-alignment={vAlign}
41
+ className={clsx(className, 'tcn-scaffold')}
42
+ {...props}
43
+ >
44
+ <VStack
45
+ as="section"
46
+ minWidth={minWidth}
47
+ maxWidth={maxWidth}
48
+ minHeight={minHeight}
49
+ maxHeight={maxHeight}
50
+ hAlign={hAlign}
51
+ vAlign={vAlign}
52
+ ref={ref}
53
+ className={clsx(styles['scaffold-stack'], 'tcn-scaffold-stack')}
54
+ zIndex={0}
55
+ >
56
+ {children}
57
+ </VStack>
58
+ </Box>
59
+ );
60
+ });