@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
@@ -1 +1 @@
1
- {"version":3,"file":"headline.js","sources":["../../../src/typography/headline/headline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './headline.module.css';\n\nexport interface HeadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type HeadlineProps = WithDetailedHTMLProps<HeadlineOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Headline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: HeadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['headline'], 'headline', className)}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Headline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAsBO,SAASA,EAAS;AAAA,EACvB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAkB;AAChB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,UAAa,YAAYX,CAAS;AAAA,MACzD,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"headline.js","sources":["../../../src/typography/headline/headline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './headline.module.css';\n\nexport interface HeadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type HeadlineProps = WithDetailedHTMLProps<HeadlineOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Headline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: HeadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['headline'], className, 'tcn-headline')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Headline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAsBO,SAASA,EAAS;AAAA,EACvB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAkB;AAChB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,UAAaX,GAAW,cAAc;AAAA,MAC7D,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -1,11 +1,11 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { clsx as u } from "clsx";
3
- import { s as c } from "../../subheadline.module-C-v7zMkQ.js";
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { clsx as p } from "clsx";
3
+ import { s as u } from "../../subheadline.module-C-v7zMkQ.js";
4
4
  function j({
5
- size: e = "md",
5
+ size: n = "md",
6
6
  emphasis: l = "normal",
7
7
  hierarchy: o = "primary",
8
- color: n,
8
+ color: e,
9
9
  children: s,
10
10
  className: t,
11
11
  style: i = {},
@@ -14,18 +14,18 @@ function j({
14
14
  padBottom: f,
15
15
  padTop: m,
16
16
  pad: h,
17
- selectable: g = !0
17
+ selectable: c = !0
18
18
  }) {
19
19
  let a;
20
- return e === "lg" ? a = "h3" : e === "md" ? a = "h4" : a = "h5", h && (i.padding = h), r && (i.paddingInlineStart = r), d && (i.paddingInlineEnd = d), m && (i.paddingTop = m), f && (i.paddingBottom = f), n && (i.color = n), /* @__PURE__ */ p(
20
+ return n === "lg" ? a = "h3" : n === "md" ? a = "h4" : a = "h5", h && (i.padding = h), r && (i.paddingInlineStart = r), d && (i.paddingInlineEnd = d), m && (i.paddingTop = m), f && (i.paddingBottom = f), e && (i.color = e), /* @__PURE__ */ g(
21
21
  a,
22
22
  {
23
23
  "data-hierarchy": o,
24
24
  "data-emphasis": l,
25
- "data-selectable": g,
26
- className: u(c.subheadline, "subheadline", t),
25
+ "data-selectable": c,
26
+ className: p(u.subheadline, t, "tcn-subheadline"),
27
27
  style: i,
28
- "data-size": e,
28
+ "data-size": n,
29
29
  children: s
30
30
  }
31
31
  );
@@ -1 +1 @@
1
- {"version":3,"file":"subheadline.js","sources":["../../../src/typography/subheadline/subheadline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './subheadline.module.css';\n\nexport interface SubheadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type SubheadlineProps = WithDetailedHTMLProps<\n SubheadlineOwnProps,\n 'h3' | 'h4' | 'h5'\n>;\n\nexport function Subheadline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: SubheadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h3';\n } else if (size === 'md') {\n As = 'h4';\n } else {\n As = 'h5';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['subheadline'], 'subheadline', className)}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Subheadline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAyBO,SAASA,EAAY;AAAA,EAC1B,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAqB;AACnB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,aAAgB,eAAeX,CAAS;AAAA,MAC/D,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"subheadline.js","sources":["../../../src/typography/subheadline/subheadline.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport styles from './subheadline.module.css';\n\nexport interface SubheadlineOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n}\n\nexport type SubheadlineProps = WithDetailedHTMLProps<\n SubheadlineOwnProps,\n 'h3' | 'h4' | 'h5'\n>;\n\nexport function Subheadline({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n}: SubheadlineProps) {\n let As: React.ElementType;\n\n if (size === 'lg') {\n As = 'h3';\n } else if (size === 'md') {\n As = 'h4';\n } else {\n As = 'h5';\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['subheadline'], className, 'tcn-subheadline')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Subheadline","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","As","jsx","clsx","styles"],"mappings":";;;AAyBO,SAASA,EAAY;AAAA,EAC1B,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AACf,GAAqB;AACnB,MAAIC;AAEJ,SAAIb,MAAS,OACXa,IAAK,OACIb,MAAS,OAClBa,IAAK,OAELA,IAAK,MAGHF,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAW;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBX;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWG,EAAKC,EAAO,aAAgBX,GAAW,iBAAiB;AAAA,MACnE,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -5,27 +5,27 @@ import '../../title.css';const I = "_title_64bd0fd", T = { title: I }, N = x(fun
5
5
  size: n = "md",
6
6
  emphasis: m = "normal",
7
7
  hierarchy: c = "primary",
8
- color: e,
8
+ color: r,
9
9
  children: p,
10
10
  className: g,
11
11
  style: i = {},
12
- padStart: r,
12
+ padStart: e,
13
13
  padEnd: a,
14
14
  padBottom: f,
15
- padTop: l,
16
- pad: d,
15
+ padTop: d,
16
+ pad: l,
17
17
  selectable: h = !0,
18
18
  as: o
19
19
  }, s) {
20
20
  let t = o;
21
- return o == null && (n === "lg" ? t = "h1" : n === "md" ? t = "h2" : t = "h3"), d && (i.padding = d), r && (i.paddingInlineStart = r), a && (i.paddingInlineEnd = a), l && (i.paddingTop = l), f && (i.paddingBottom = f), e && (i.color = e), /* @__PURE__ */ u(
21
+ return o == null && (n === "lg" ? t = "h1" : n === "md" ? t = "h2" : t = "h3"), l && (i.padding = l), e && (i.paddingInlineStart = e), a && (i.paddingInlineEnd = a), d && (i.paddingTop = d), f && (i.paddingBottom = f), r && (i.color = r), /* @__PURE__ */ u(
22
22
  t,
23
23
  {
24
24
  ref: s,
25
25
  "data-hierarchy": c,
26
26
  "data-emphasis": m,
27
27
  "data-selectable": h,
28
- className: b(T.title, "title", "tcn-typography", "tcn-title", g),
28
+ className: b(T.title, g, "tcn-typography", "tcn-title"),
29
29
  style: i,
30
30
  "data-size": n,
31
31
  children: p
@@ -1 +1 @@
1
- {"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n },\n ref\n) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['title'], 'title', 'tcn-typography', 'tcn-title', className)}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n});\n"],"names":["Title","forwardRef","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","as","ref","As","jsx","clsx","styles"],"mappings":";;;8CAuBaA,IAAQC,EAA2C,SAC9D;AAAA,EACE,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,IAAAC;AACF,GACAC,GACA;AACA,MAAIC,IAAwBF;AAE5B,SAAIA,KAAM,SACJb,MAAS,OACXe,IAAK,OACIf,MAAS,OAClBe,IAAK,OAELA,IAAK,OAILJ,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAa;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAgBZ;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWK,EAAKC,EAAO,OAAU,SAAS,kBAAkB,aAAab,CAAS;AAAA,MAClF,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n },\n ref\n) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['title'], className, 'tcn-typography', 'tcn-title')}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n});\n"],"names":["Title","forwardRef","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","as","ref","As","jsx","clsx","styles"],"mappings":";;;8CAuBaA,IAAQC,EAA2C,SAC9D;AAAA,EACE,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,IAAAC;AACF,GACAC,GACA;AACA,MAAIC,IAAwBF;AAE5B,SAAIA,KAAM,SACJb,MAAS,OACXe,IAAK,OACIf,MAAS,OAClBe,IAAK,OAELA,IAAK,OAILJ,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAa;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAgBZ;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWK,EAAKC,EAAO,OAAUb,GAAW,kBAAkB,WAAW;AAAA,MACzE,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1 +1 @@
1
- ._unit-input_4bd8bc8{position:relative;opacity:1}._unit-input-flex-box_8db2f9b{z-index:inherit}._unit-input-number_c95f85a{padding-inline-end:8px}._unit-input-number_c95f85a,._unit-input-select_1bbbad9{position:relative;z-index:1}._unit-input-number_c95f85a:focus,._unit-input-select_1bbbad9:focus{z-index:2}
1
+ @layer tcn-system{:where(._unit-input_4bd8bc8){position:relative;opacity:1}:where(._unit-input-flex-box_8db2f9b){z-index:inherit}:where(._unit-input-number_c95f85a){padding-inline-end:8px}:where(._unit-input-number_c95f85a),:where(._unit-input-select_1bbbad9){position:relative;z-index:1}:where(._unit-input-number_c95f85a:focus),:where(._unit-input-select_1bbbad9:focus){z-index:2}}
@@ -1 +1 @@
1
- ._utility-bar_3a92315{width:100%;min-height:0}
1
+ @layer tcn-system{:where(._utility-bar_3a92315){width:100%;min-height:0}}
@@ -1,4 +1,4 @@
1
- import m, { useRef as p, useCallback as L, useEffect as W } from "react";
1
+ import d, { useRef as p, useCallback as L, useEffect as W } from "react";
2
2
  import { useForkRef as T } from "./hooks/use_fork_ref.js";
3
3
  const C = {
4
4
  onClick: "click",
@@ -8,16 +8,16 @@ const C = {
8
8
  onTouchStart: "touchstart",
9
9
  onTouchEnd: "touchend"
10
10
  };
11
- function w(o, t, d, s) {
12
- if (!d)
11
+ function w(o, t, m, s) {
12
+ if (!m)
13
13
  return !0;
14
14
  let n;
15
15
  return o.composedPath ? n = [t, ...s].find((e) => o.composedPath().indexOf(e) > -1) !== void 0 : n = !document.documentElement.contains(o.target) || [t, ...s].find((e) => e?.contains(o.target)) !== void 0, n;
16
16
  }
17
- const F = m.forwardRef(
18
- function({ children: t, mouseEvent: d, touchEvent: s, onClickAway: n, refs: e = [], isException: a }, R) {
19
- const f = p(null), v = p(!0), E = C[d || "onClick"], l = g[s || "onTouchEnd"], k = T(R, f, t.ref), i = m.useRef(!1);
20
- m.useEffect(() => (window.setTimeout(() => {
17
+ const F = d.forwardRef(
18
+ function({ children: t, mouseEvent: m, touchEvent: s, onClickAway: n, refs: e = [], isException: a }, R) {
19
+ const f = p(null), v = p(!0), l = C[m || "onClick"], E = g[s || "onTouchEnd"], k = T(R, f, t.ref), i = d.useRef(!1);
20
+ d.useEffect(() => (window.setTimeout(() => {
21
21
  i.current = !0;
22
22
  }, 0), () => {
23
23
  i.current = !1;
@@ -44,9 +44,9 @@ const F = m.forwardRef(
44
44
  },
45
45
  [n, e, a]
46
46
  );
47
- return W(() => (document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), document.addEventListener(E, c), document.addEventListener(l, c), () => {
48
- document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r), document.removeEventListener(E, c), document.removeEventListener(l, c);
49
- }), [l, E, c, r]), m.cloneElement(t, {
47
+ return W(() => (document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), document.addEventListener(l, c), document.addEventListener(E, c), () => {
48
+ document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r), document.removeEventListener(l, c), document.removeEventListener(E, c);
49
+ }), [E, l, c, r]), d.cloneElement(t, {
50
50
  ...t.props,
51
51
  ref: k
52
52
  });
@@ -1 +1 @@
1
- {"version":3,"file":"click_away_listener.js","sources":["../../src/utils/click_away_listener.tsx"],"sourcesContent":["import React, { useEffect, useCallback, useRef } from 'react';\nimport { useForkRef } from './hooks/use_fork_ref.js';\nexport interface ClickAwayListenerProps {\n children: React.ReactElement;\n onClickAway: (event: React.MouseEvent | React.TouchEvent) => void;\n mouseEvent?: 'onMouseUp' | 'onMouseDown' | 'onClick';\n touchEvent?: 'onTouchStart' | 'onTouchEnd';\n isException?: (target: HTMLElement) => boolean;\n // An array of refs that wont trigger the click away listener\n refs?: React.RefObject<Element>[];\n}\nconst eventMap = {\n onClick: 'click',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n};\nconst touchMap = {\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n};\n\nexport function isEventWithinElement(\n event: MouseEvent | TouchEvent,\n node: HTMLElement | null,\n activated: boolean,\n refs: (Element | null)[]\n) {\n if (!activated) {\n return true;\n }\n\n let isWithinElement: boolean;\n\n if (event.composedPath) {\n isWithinElement =\n [node, ...refs].find((ref: any) => {\n return event.composedPath().indexOf(ref) > -1;\n }) !== undefined;\n } else {\n isWithinElement =\n !document.documentElement.contains(event.target as any) ||\n [node, ...refs].find((ref: any) => {\n return ref?.contains(event.target);\n }) !== undefined;\n }\n\n return isWithinElement;\n}\n\nexport const ClickAwayListener = React.forwardRef<HTMLElement, ClickAwayListenerProps>(\n function ClickAwayListener(\n { children, mouseEvent, touchEvent, onClickAway, refs = [], isException },\n ref\n ) {\n const nodeRef = useRef<HTMLElement | null>(null);\n const startedActionWithinElementRef = useRef<boolean>(true);\n const DOMMouseEvent = eventMap[mouseEvent || 'onClick'];\n const DOMTouchEvent = touchMap[touchEvent || 'onTouchEnd'];\n const newRef = useForkRef(ref, nodeRef, (children as any).ref);\n const activatedRef = React.useRef(false);\n\n React.useEffect(() => {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n window.setTimeout(() => {\n activatedRef.current = true;\n }, 0);\n return () => {\n activatedRef.current = false;\n };\n }, []);\n\n const trackAction = useCallback(\n (event: any) => {\n startedActionWithinElementRef.current = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n },\n [refs]\n );\n\n const eventHandler = useCallback(\n (event: any) => {\n const startedFromWithinElement = startedActionWithinElementRef.current;\n const isWithinElement = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n\n if (\n !isWithinElement &&\n !startedFromWithinElement &&\n (!isException || !isException(event.target))\n ) {\n onClickAway(event);\n }\n },\n [onClickAway, refs, isException]\n );\n\n useEffect(() => {\n document.addEventListener('mousedown', trackAction);\n document.addEventListener('touchstart', trackAction);\n document.addEventListener(DOMMouseEvent, eventHandler);\n document.addEventListener(DOMTouchEvent, eventHandler);\n return () => {\n document.removeEventListener('mousedown', trackAction);\n document.removeEventListener('touchstart', trackAction);\n document.removeEventListener(DOMMouseEvent, eventHandler);\n document.removeEventListener(DOMTouchEvent, eventHandler);\n };\n }, [DOMTouchEvent, DOMMouseEvent, eventHandler, trackAction]);\n\n return React.cloneElement(children, {\n ...children.props,\n ref: newRef,\n });\n }\n);\n"],"names":["eventMap","touchMap","isEventWithinElement","event","node","activated","refs","isWithinElement","ref","ClickAwayListener","React","children","mouseEvent","touchEvent","onClickAway","isException","nodeRef","useRef","startedActionWithinElementRef","DOMMouseEvent","DOMTouchEvent","newRef","useForkRef","activatedRef","trackAction","useCallback","r","eventHandler","startedFromWithinElement","useEffect"],"mappings":";;AAWA,MAAMA,IAAW;AAAA,EACf,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AACb,GACMC,IAAW;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AACd;AAEO,SAASC,EACdC,GACAC,GACAC,GACAC,GACA;AACA,MAAI,CAACD;AACH,WAAO;AAGT,MAAIE;AAEJ,SAAIJ,EAAM,eACRI,IACE,CAACH,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbL,EAAM,aAAA,EAAe,QAAQK,CAAG,IAAI,EAC5C,MAAM,SAETD,IACE,CAAC,SAAS,gBAAgB,SAASJ,EAAM,MAAa,KACtD,CAACC,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbA,GAAK,SAASL,EAAM,MAAM,CAClC,MAAM,QAGJI;AACT;AAEO,MAAME,IAAoBC,EAAM;AAAA,EACrC,SACE,EAAE,UAAAC,GAAU,YAAAC,GAAY,YAAAC,GAAY,aAAAC,GAAa,MAAAR,IAAO,CAAA,GAAI,aAAAS,EAAA,GAC5DP,GACA;AACA,UAAMQ,IAAUC,EAA2B,IAAI,GACzCC,IAAgCD,EAAgB,EAAI,GACpDE,IAAgBnB,EAASY,KAAc,SAAS,GAChDQ,IAAgBnB,EAASY,KAAc,YAAY,GACnDQ,IAASC,EAAWd,GAAKQ,GAAUL,EAAiB,GAAG,GACvDY,IAAeb,EAAM,OAAO,EAAK;AAEvC,IAAAA,EAAM,UAAU,OAGd,OAAO,WAAW,MAAM;AACtB,MAAAa,EAAa,UAAU;AAAA,IACzB,GAAG,CAAC,GACG,MAAM;AACX,MAAAA,EAAa,UAAU;AAAA,IACzB,IACC,CAAA,CAAE;AAEL,UAAMC,IAAcC;AAAA,MAClB,CAACtB,MAAe;AACd,QAAAe,EAA8B,UAAUhB;AAAA,UACtCC;AAAA,UACAa,EAAQ;AAAA,UACRO,EAAa;AAAA,UACbjB,EAAK,IAAI,CAAAoB,MAAKA,EAAE,OAAO;AAAA,QAAA;AAAA,MAE3B;AAAA,MACA,CAACpB,CAAI;AAAA,IAAA,GAGDqB,IAAeF;AAAA,MACnB,CAACtB,MAAe;AACd,cAAMyB,IAA2BV,EAA8B;AAQ/D,QACE,CARsBhB;AAAA,UACtBC;AAAA,UACAa,EAAQ;AAAA,UACRO,EAAa;AAAA,UACbjB,EAAK,IAAI,CAAAoB,MAAKA,EAAE,OAAO;AAAA,QAAA,KAKvB,CAACE,MACA,CAACb,KAAe,CAACA,EAAYZ,EAAM,MAAM,MAE1CW,EAAYX,CAAK;AAAA,MAErB;AAAA,MACA,CAACW,GAAaR,GAAMS,CAAW;AAAA,IAAA;AAGjC,WAAAc,EAAU,OACR,SAAS,iBAAiB,aAAaL,CAAW,GAClD,SAAS,iBAAiB,cAAcA,CAAW,GACnD,SAAS,iBAAiBL,GAAeQ,CAAY,GACrD,SAAS,iBAAiBP,GAAeO,CAAY,GAC9C,MAAM;AACX,eAAS,oBAAoB,aAAaH,CAAW,GACrD,SAAS,oBAAoB,cAAcA,CAAW,GACtD,SAAS,oBAAoBL,GAAeQ,CAAY,GACxD,SAAS,oBAAoBP,GAAeO,CAAY;AAAA,IAC1D,IACC,CAACP,GAAeD,GAAeQ,GAAcH,CAAW,CAAC,GAErDd,EAAM,aAAaC,GAAU;AAAA,MAClC,GAAGA,EAAS;AAAA,MACZ,KAAKU;AAAA,IAAA,CACN;AAAA,EACH;AACF;"}
1
+ {"version":3,"file":"click_away_listener.js","sources":["../../src/utils/click_away_listener.tsx"],"sourcesContent":["import React, { useEffect, useCallback, useRef } from 'react';\nimport { useForkRef } from './hooks/use_fork_ref.js';\nexport interface ClickAwayListenerProps {\n children: React.ReactElement;\n onClickAway: (event: React.MouseEvent | React.TouchEvent) => void;\n mouseEvent?: 'onMouseUp' | 'onMouseDown' | 'onClick';\n touchEvent?: 'onTouchStart' | 'onTouchEnd';\n isException?: (target: HTMLElement) => boolean;\n // An array of refs that wont trigger the click away listener\n refs?: React.RefObject<Element>[];\n}\nconst eventMap = {\n onClick: 'click',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n};\nconst touchMap = {\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n};\n\nexport function isEventWithinElement(\n event: MouseEvent | TouchEvent,\n node: HTMLElement | null,\n activated: boolean,\n refs: (Element | null)[]\n) {\n if (!activated) {\n return true;\n }\n\n let isWithinElement: boolean;\n\n if (event.composedPath) {\n isWithinElement =\n [node, ...refs].find((ref: any) => {\n return event.composedPath().indexOf(ref) > -1;\n }) !== undefined;\n } else {\n isWithinElement =\n !document.documentElement.contains(event.target as any) ||\n [node, ...refs].find((ref: any) => {\n return ref?.contains(event.target);\n }) !== undefined;\n }\n\n return isWithinElement;\n}\n\nexport const ClickAwayListener = React.forwardRef<HTMLElement, ClickAwayListenerProps>(\n function ClickAwayListener(\n { children, mouseEvent, touchEvent, onClickAway, refs = [], isException },\n ref\n ) {\n const nodeRef = useRef<HTMLElement | null>(null);\n const startedActionWithinElementRef = useRef<boolean>(true);\n const DOMMouseEvent = eventMap[mouseEvent || 'onClick'];\n const DOMTouchEvent = touchMap[touchEvent || 'onTouchEnd'];\n const newRef = useForkRef(ref, nodeRef, (children as any).ref);\n const activatedRef = React.useRef(false);\n\n React.useEffect(() => {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n window.setTimeout(() => {\n activatedRef.current = true;\n }, 0);\n return () => {\n activatedRef.current = false;\n };\n }, []);\n\n const trackAction = useCallback(\n (event: any) => {\n startedActionWithinElementRef.current = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n },\n [refs]\n );\n\n const eventHandler = useCallback(\n (event: any) => {\n const startedFromWithinElement = startedActionWithinElementRef.current;\n const isWithinElement = isEventWithinElement(\n event,\n nodeRef.current,\n activatedRef.current,\n refs.map(r => r.current)\n );\n\n if (\n !isWithinElement &&\n !startedFromWithinElement &&\n (!isException || !isException(event.target))\n ) {\n onClickAway(event);\n }\n },\n [onClickAway, refs, isException]\n );\n\n useEffect(() => {\n document.addEventListener('mousedown', trackAction);\n document.addEventListener('touchstart', trackAction);\n document.addEventListener(DOMMouseEvent, eventHandler);\n document.addEventListener(DOMTouchEvent, eventHandler);\n return () => {\n document.removeEventListener('mousedown', trackAction);\n document.removeEventListener('touchstart', trackAction);\n document.removeEventListener(DOMMouseEvent, eventHandler);\n document.removeEventListener(DOMTouchEvent, eventHandler);\n };\n }, [DOMTouchEvent, DOMMouseEvent, eventHandler, trackAction]);\n\n return React.cloneElement(children, {\n ...children.props,\n ref: newRef,\n });\n }\n);\n"],"names":["eventMap","touchMap","isEventWithinElement","event","node","activated","refs","isWithinElement","ref","ClickAwayListener","React","children","mouseEvent","touchEvent","onClickAway","isException","nodeRef","useRef","startedActionWithinElementRef","DOMMouseEvent","DOMTouchEvent","newRef","useForkRef","activatedRef","trackAction","useCallback","r","eventHandler","startedFromWithinElement","useEffect"],"mappings":";;AAWA,MAAMA,IAAW;AAAA,EACf,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AACb,GACMC,IAAW;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AACd;AAEO,SAASC,EACdC,GACAC,GACAC,GACAC,GACA;AACA,MAAI,CAACD;AACH,WAAO;AAGT,MAAIE;AAEJ,SAAIJ,EAAM,eACRI,IACE,CAACH,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbL,EAAM,aAAA,EAAe,QAAQK,CAAG,IAAI,EAC5C,MAAM,SAETD,IACE,CAAC,SAAS,gBAAgB,SAASJ,EAAM,MAAa,KACtD,CAACC,GAAM,GAAGE,CAAI,EAAE,KAAK,CAACE,MACbA,GAAK,SAASL,EAAM,MAAM,CAClC,MAAM,QAGJI;AACT;AAEO,MAAME,IAAoBC,EAAM;AAAA,EACrC,SACE,EAAE,UAAAC,GAAU,YAAAC,GAAY,YAAAC,GAAY,aAAAC,GAAa,MAAAR,IAAO,CAAA,GAAI,aAAAS,EAAA,GAC5DP,GACA;AACA,UAAMQ,IAAUC,EAA2B,IAAI,GACzCC,IAAgCD,EAAgB,EAAI,GACpDE,IAAgBnB,EAASY,KAAc,SAAS,GAChDQ,IAAgBnB,EAASY,KAAc,YAAY,GACnDQ,IAASC,EAAWd,GAAKQ,GAAUL,EAAiB,GAAG,GACvDY,IAAeb,EAAM,OAAO,EAAK;AAEvCA,IAAAA,EAAM,UAAU,OAGd,OAAO,WAAW,MAAM;AACtB,MAAAa,EAAa,UAAU;AAAA,IACzB,GAAG,CAAC,GACG,MAAM;AACX,MAAAA,EAAa,UAAU;AAAA,IACzB,IACC,CAAA,CAAE;AAEL,UAAMC,IAAcC;AAAA,MAClB,CAACtB,MAAe;AACd,QAAAe,EAA8B,UAAUhB;AAAA,UACtCC;AAAA,UACAa,EAAQ;AAAA,UACRO,EAAa;AAAA,UACbjB,EAAK,IAAI,CAAAoB,MAAKA,EAAE,OAAO;AAAA,QAAA;AAAA,MAE3B;AAAA,MACA,CAACpB,CAAI;AAAA,IAAA,GAGDqB,IAAeF;AAAA,MACnB,CAACtB,MAAe;AACd,cAAMyB,IAA2BV,EAA8B;AAQ/D,QACE,CARsBhB;AAAA,UACtBC;AAAA,UACAa,EAAQ;AAAA,UACRO,EAAa;AAAA,UACbjB,EAAK,IAAI,CAAAoB,MAAKA,EAAE,OAAO;AAAA,QAAA,KAKvB,CAACE,MACA,CAACb,KAAe,CAACA,EAAYZ,EAAM,MAAM,MAE1CW,EAAYX,CAAK;AAAA,MAErB;AAAA,MACA,CAACW,GAAaR,GAAMS,CAAW;AAAA,IAAA;AAGjC,WAAAc,EAAU,OACR,SAAS,iBAAiB,aAAaL,CAAW,GAClD,SAAS,iBAAiB,cAAcA,CAAW,GACnD,SAAS,iBAAiBL,GAAeQ,CAAY,GACrD,SAAS,iBAAiBP,GAAeO,CAAY,GAC9C,MAAM;AACX,eAAS,oBAAoB,aAAaH,CAAW,GACrD,SAAS,oBAAoB,cAAcA,CAAW,GACtD,SAAS,oBAAoBL,GAAeQ,CAAY,GACxD,SAAS,oBAAoBP,GAAeO,CAAY;AAAA,IAC1D,IACC,CAACP,GAAeD,GAAeQ,GAAcH,CAAW,CAAC,GAErDd,EAAM,aAAaC,GAAU;AAAA,MAClC,GAAGA,EAAS;AAAA,MACZ,KAAKU;AAAA,IAAA,CACN;AAAA,EACH;AACF;"}
@@ -7,19 +7,19 @@ import '../../../draggable.css';const c = "_draggable_db40376", m = { draggable:
7
7
  children: a,
8
8
  draggable: t = !0
9
9
  }) => {
10
- const o = p({}), r = n(
10
+ const o = p({}), e = n(
11
11
  () => ({
12
12
  "--position-x": `${o.position.x}px`,
13
13
  "--position-y": `${o.position.y}px`
14
14
  }),
15
15
  [o.position]
16
- ), e = i.cloneElement(a, {
16
+ ), r = i.cloneElement(a, {
17
17
  className: l("tcn-draggable", m.draggable, a.props.className),
18
- style: { ...r, ...a.props.style },
18
+ style: { ...e, ...a.props.style },
19
19
  "data-is-dragging": o.isDragging,
20
20
  "data-is-draggable": t
21
21
  });
22
- return /* @__PURE__ */ s(g.Provider, { value: o, children: e });
22
+ return /* @__PURE__ */ s(g.Provider, { value: o, children: r });
23
23
  };
24
24
  export {
25
25
  y as Draggable
@@ -2,17 +2,17 @@ import s, { useRef as f, useEffect as u } from "react";
2
2
  import a from "clsx";
3
3
  import { useDragContainer as l } from "./context.js";
4
4
  import { useForkRef as m } from "../hooks/use_fork_ref.js";
5
- const d = ({ children: e }) => {
6
- const { registerHandle: t, unregisterHandle: n } = l(), r = f(null);
5
+ const d = ({ children: r }) => {
6
+ const { registerHandle: t, unregisterHandle: n } = l(), e = f(null);
7
7
  u(() => {
8
- if (r.current != null)
9
- return t(r), () => {
10
- r.current != null && n(r);
8
+ if (e.current != null)
9
+ return t(e), () => {
10
+ e.current != null && n(e);
11
11
  };
12
12
  }, [t, n]);
13
- const o = m(r, e.props.ref);
14
- return s.cloneElement(e, {
15
- className: a("tcn-drag-handle", e.props.className),
13
+ const o = m(e, r.props.ref);
14
+ return s.cloneElement(r, {
15
+ className: a("tcn-drag-handle", r.props.className),
16
16
  ref: o
17
17
  });
18
18
  };
@@ -1,7 +1,7 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import e from "react";
3
- const d = e.forwardRef(function({ onRedirect: t }, o) {
4
- return /* @__PURE__ */ i(
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import i from "react";
3
+ const n = i.forwardRef(function({ onRedirect: t }, o) {
4
+ return /* @__PURE__ */ e(
5
5
  "div",
6
6
  {
7
7
  ref: o,
@@ -19,6 +19,6 @@ const d = e.forwardRef(function({ onRedirect: t }, o) {
19
19
  );
20
20
  });
21
21
  export {
22
- d as FocusRedirect
22
+ n as FocusRedirect
23
23
  };
24
24
  //# sourceMappingURL=focus_redirect.js.map
@@ -1,9 +1,9 @@
1
1
  import r from "react";
2
- const i = (e, t) => () => {
3
- const o = r.useContext(e);
4
- if (o === void 0)
2
+ const i = (o, t) => () => {
3
+ const e = r.useContext(o);
4
+ if (e === void 0)
5
5
  throw t ? new Error(`Context ${t} was accessed outside of a context provider!`) : new Error("Context must be used within a Context Provider!");
6
- return o;
6
+ return e;
7
7
  };
8
8
  export {
9
9
  i as makeContextHook
@@ -1,5 +1,5 @@
1
1
  import s from "react";
2
- function h(t) {
2
+ function d(t) {
3
3
  const [c, a] = s.useState(!1);
4
4
  return s.useEffect(() => {
5
5
  const e = window.matchMedia(t);
@@ -11,6 +11,6 @@ function h(t) {
11
11
  }, [t]), c;
12
12
  }
13
13
  export {
14
- h as useMediaQuery
14
+ d as useMediaQuery
15
15
  };
16
16
  //# sourceMappingURL=use_media_query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use_media_query.js","sources":["../../../src/utils/hooks/use_media_query.ts"],"sourcesContent":["import React from 'react';\n\n/**\n * Custom hook that returns a boolean indicating if the current viewport\n * matches the given media query.\n *\n * @param query - The media query to match against (e.g. \"(min-width: 768px)\")\n * @returns boolean indicating if the media query matches\n */\nexport function useMediaQuery(query: string): boolean {\n const [matches, setMatches] = React.useState(false);\n\n React.useEffect(() => {\n const mediaQuery = window.matchMedia(query);\n\n // Set initial value\n setMatches(mediaQuery.matches);\n\n // Create event listener\n const handler = (event: MediaQueryListEvent) => {\n setMatches(event.matches);\n };\n\n // Add the listener\n mediaQuery.addEventListener('change', handler);\n\n // Clean up\n return () => mediaQuery.removeEventListener('change', handler);\n }, [query]);\n\n return matches;\n}\n"],"names":["useMediaQuery","query","matches","setMatches","React","mediaQuery","handler","event"],"mappings":";AASO,SAASA,EAAcC,GAAwB;AACpD,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAM,SAAS,EAAK;AAElD,SAAAA,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,OAAO,WAAWJ,CAAK;AAG1C,IAAAE,EAAWE,EAAW,OAAO;AAG7B,UAAMC,IAAU,CAACC,MAA+B;AAC9C,MAAAJ,EAAWI,EAAM,OAAO;AAAA,IAC1B;AAGA,WAAAF,EAAW,iBAAiB,UAAUC,CAAO,GAGtC,MAAMD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,EAC/D,GAAG,CAACL,CAAK,CAAC,GAEHC;AACT;"}
1
+ {"version":3,"file":"use_media_query.js","sources":["../../../src/utils/hooks/use_media_query.ts"],"sourcesContent":["import React from 'react';\n\n/**\n * Custom hook that returns a boolean indicating if the current viewport\n * matches the given media query.\n *\n * @param query - The media query to match against (e.g. \"(min-width: 768px)\")\n * @returns boolean indicating if the media query matches\n */\nexport function useMediaQuery(query: string): boolean {\n const [matches, setMatches] = React.useState(false);\n\n React.useEffect(() => {\n const mediaQuery = window.matchMedia(query);\n\n // Set initial value\n setMatches(mediaQuery.matches);\n\n // Create event listener\n const handler = (event: MediaQueryListEvent) => {\n setMatches(event.matches);\n };\n\n // Add the listener\n mediaQuery.addEventListener('change', handler);\n\n // Clean up\n return () => mediaQuery.removeEventListener('change', handler);\n }, [query]);\n\n return matches;\n}\n"],"names":["useMediaQuery","query","matches","setMatches","React","mediaQuery","handler","event"],"mappings":";AASO,SAASA,EAAcC,GAAwB;AACpD,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAM,SAAS,EAAK;AAElDA,SAAAA,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,OAAO,WAAWJ,CAAK;AAG1C,IAAAE,EAAWE,EAAW,OAAO;AAG7B,UAAMC,IAAU,CAACC,MAA+B;AAC9C,MAAAJ,EAAWI,EAAM,OAAO;AAAA,IAC1B;AAGA,WAAAF,EAAW,iBAAiB,UAAUC,CAAO,GAGtC,MAAMD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,EAC/D,GAAG,CAACL,CAAK,CAAC,GAEHC;AACT;"}
package/dist/v_body.css CHANGED
@@ -1 +1 @@
1
- ._v-body_d8f1917{min-height:0;flex-grow:1;width:100%}
1
+ @layer tcn-system{._v-body_d8f1917{min-height:0;flex-grow:1;width:100%}}
package/dist/window.css CHANGED
@@ -1 +1 @@
1
- ._window_7610fdb{position:relative;box-sizing:border-box}
1
+ @layer tcn-system{:where(._window_7610fdb){position:relative;box-sizing:border-box}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tcn/ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "author": "TCN",
@@ -134,8 +134,8 @@
134
134
  "dependencies": {
135
135
  "clsx": "^2.1.1",
136
136
  "react-color": "^2.19.3",
137
- "@tcn/icons": "2.2.0",
138
- "@tcn/state": "1.1.0"
137
+ "@tcn/icons": "2.2.1",
138
+ "@tcn/state": "1.1.1"
139
139
  },
140
140
  "scripts": {
141
141
  "build": "vite build",
@@ -0,0 +1,194 @@
1
+ import { Canvas, Meta, Markdown } from '@storybook/addon-docs/blocks';
2
+ import * as ActionStories from './actions.stories';
3
+ import { Showcase, Section } from './components/showcase';
4
+ import { Gallery } from './components/gallery';
5
+
6
+ <Meta title="Catalog/Actions" of={ActionStories} />
7
+
8
+ # Actions
9
+
10
+ Interactive elements that triggers an action, or event. For example submitting a form, closing a modal, or deleting an entity.
11
+
12
+ - [Actions](#actions)
13
+ - [Button](#button)
14
+ - [Utility (Slim Button)](#utility)
15
+ - [Button Group](#button-group)
16
+
17
+ ## Button
18
+
19
+ Relaxed, text based actions for high level page, or surface decisions (Cancel, Save, etc.)
20
+
21
+ <Gallery minColumnWidth="350px">
22
+
23
+ <Showcase
24
+ title="Baseline"
25
+ description="The default, out-of-the-box button with no additional props."
26
+ of={ActionStories.ButtonBaselineShowcase}
27
+ width="180px"
28
+ />
29
+
30
+ <Showcase
31
+ title="Hierarchy"
32
+ description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
33
+ of={ActionStories.HierarchyShowcase}
34
+ width="380px"
35
+ />
36
+
37
+ <Showcase
38
+ title="Size"
39
+ description="Used to customize the size of actions in relation to one another on a surface. Use sparingly, do not use as a replacement for hierarchy."
40
+ of={ActionStories.SizeShowcase}
41
+ width="320px"
42
+ />
43
+
44
+ <Showcase
45
+ title="Disabled"
46
+ description="Prevents interaction and reduces visual prominence."
47
+ of={ActionStories.DisabledShowcase}
48
+ width="420px"
49
+ />
50
+
51
+ <Showcase
52
+ title="With Icons"
53
+ description="Icons can be added to buttons with the use of Icon and Spacer components."
54
+ of={ActionStories.IconShowcase}
55
+ width="300px"
56
+ />
57
+
58
+ <Showcase
59
+ title="Severity"
60
+ description="Visual indication of the severity of consequential, one-time actions."
61
+ of={ActionStories.SeverityShowcase}
62
+ width="300px"
63
+ >
64
+ <Markdown>
65
+ {`
66
+ **🚧 This concept is being actively developed.**
67
+
68
+ Severity gives users a clear, visual indication of the impact and importance of an action.
69
+
70
+ Should be the primary exception of color variance in actions and generally replacing the need for using custom colors.
71
+
72
+ Use sparingly for consequential, one-time actions such as:
73
+
74
+ - Deleting an entity permanently - **dangerous**
75
+ - Discarding the UIs current state or unsaved changes when leaving the page - **cautious**
76
+ - Prompting a user to pick a preferred option out of multiple otherwise valid options - **suggested**
77
+ - Client confirmation for important migration - **encouraged**
78
+ `}
79
+ </Markdown>
80
+ </Showcase>
81
+
82
+ <Showcase
83
+ title="Custom Colors"
84
+ description="
85
+ Override accent color for heavily brand or product specific actions.
86
+ Use sparingly, should be avoided to create cohesion and consistency between UIs."
87
+ of={ActionStories.ColorShowcase}
88
+ width="420px"
89
+ />
90
+
91
+ <Showcase
92
+ title="Full Width"
93
+ description="Fill container width for mobile or prominent CTAs."
94
+ of={ActionStories.FullWidth}
95
+ width="340px"
96
+ />
97
+
98
+ </Gallery>
99
+
100
+
101
+
102
+ ## Utility
103
+
104
+ Compact, icon-based actions. Used as re-usable tooling for item rows, utility bars, or supplemental behavior on elements (Close Panel, Copy Entity, ect)
105
+
106
+ <Gallery>
107
+
108
+ <Showcase
109
+ title="Baseline"
110
+ description="The default, out-of-the-box utility button with no additional props."
111
+ of={ActionStories.SlimButtonBaselineShowcase}
112
+ width="180px"
113
+ />
114
+
115
+ <Showcase
116
+ title="Hierarchy"
117
+ description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
118
+ of={ActionStories.SlimButtonHierarchy}
119
+ width="240px"
120
+ />
121
+
122
+ <Showcase
123
+ title="Size"
124
+ description="Used to customize the size of actions in relation to one another on a surface. Use sparingly, do not use as a replacement for hierarchy."
125
+ of={ActionStories.SlimButtonSizes}
126
+ width="220px"
127
+ />
128
+
129
+ <Showcase
130
+ title="Disabled"
131
+ description="Prevents interaction and reduces visual prominence."
132
+ of={ActionStories.SlimButtonDisabled}
133
+ width="240px"
134
+ />
135
+
136
+ <Showcase
137
+ title="Severity"
138
+ description="Visual indication of the severity of consequential, one-time actions."
139
+ of={ActionStories.SlimButtonSeverity}
140
+ width="140px"
141
+ />
142
+
143
+ <Showcase
144
+ title="Custom Colors"
145
+ description="Override accent color for heavily brand or product specific actions. Use sparingly, should be avoided to create cohesion and consistency between UIs."
146
+ of={ActionStories.SlimButtonColors}
147
+ width="140px"
148
+ />
149
+
150
+ </Gallery>
151
+
152
+ ## Button Group
153
+
154
+ Visually grouped and styled buttons for closely related actions. The `hierarchy` and `size` props set on the ButtonGroup are automatically inherited by all child Button elements, ensuring visual consistency without needing to configure each button individually.
155
+
156
+ <Gallery minColumnWidth="380px">
157
+
158
+ <Showcase
159
+ title="Baseline"
160
+ description="The default, out-of-the-box button group with no additional props."
161
+ of={ActionStories.ButtonGroupBaselineShowcase}
162
+ />
163
+
164
+ <Showcase
165
+ title="Hierarchy"
166
+ description="Set hierarchy on the parent ButtonGroup to style all child buttons uniformly. Individual buttons do not need hierarchy props—they inherit from the group."
167
+ of={ActionStories.ButtonGroupHierarchy}
168
+ />
169
+
170
+ <Showcase
171
+ title="Size"
172
+ description="Set size on the parent ButtonGroup to control all child button sizes uniformly. Individual buttons inherit the group's size automatically."
173
+ of={ActionStories.ButtonGroupSizes}
174
+ />
175
+
176
+ <Showcase
177
+ title="Disabled"
178
+ description="Individual buttons within a group can be disabled while others remain active."
179
+ of={ActionStories.ButtonGroupDisabled}
180
+ />
181
+
182
+ <Showcase
183
+ title="Severity"
184
+ description="Severity can still be set on individual buttons within a group if a specific action should be elevated."
185
+ of={ActionStories.ButtonGroupSeverity}
186
+ />
187
+
188
+ <Showcase
189
+ title="With Icons"
190
+ description="Buttons within groups can contain icons, either standalone or combined with text."
191
+ of={ActionStories.ButtonGroupWithIcons}
192
+ />
193
+
194
+ </Gallery>