@tcn/ui 0.0.3 → 0.0.4

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 (348) hide show
  1. package/dist/actions/button/base_button/base_button.js +8 -8
  2. package/dist/actions/button/base_button/base_button.js.map +1 -1
  3. package/dist/actions/button/button/button.js +5 -5
  4. package/dist/actions/button/button/button.js.map +1 -1
  5. package/dist/actions/button/button_group/button_group.d.ts.map +1 -1
  6. package/dist/actions/button/button_group/button_group.js +2 -5
  7. package/dist/actions/button/button_group/button_group.js.map +1 -1
  8. package/dist/actions/button/select_group/select_group.js +7 -7
  9. package/dist/actions/button/select_group/select_group.js.map +1 -1
  10. package/dist/actions/button/slim_button/slim_button.d.ts.map +1 -1
  11. package/dist/actions/button/slim_button/slim_button.js +4 -4
  12. package/dist/actions/button/slim_button/slim_button.js.map +1 -1
  13. package/dist/feedback/progress/progress_bar.js +1 -1
  14. package/dist/form/field/common/field_control/field_control.js +6 -6
  15. package/dist/form/field/common/field_control/field_control.js.map +1 -1
  16. package/dist/form/field/common/field_description.js +1 -1
  17. package/dist/form/field/common/field_error.js +3 -4
  18. package/dist/form/field/common/field_error.js.map +1 -1
  19. package/dist/form/field/common/field_header.js +8 -8
  20. package/dist/form/field/common/field_header.js.map +1 -1
  21. package/dist/form/field/common/field_label.js +1 -1
  22. package/dist/form/field/common/status_input/status_input.d.ts.map +1 -1
  23. package/dist/form/field/common/status_input/status_input.js +9 -15
  24. package/dist/form/field/common/status_input/status_input.js.map +1 -1
  25. package/dist/form/field/h_field/h_field.js +9 -9
  26. package/dist/form/field/h_field/h_field.js.map +1 -1
  27. package/dist/form/field/v_field/v_field.js +8 -8
  28. package/dist/form/field/v_field/v_field.js.map +1 -1
  29. package/dist/form/field_set/field_set.d.ts.map +1 -1
  30. package/dist/form/field_set/field_set.js +12 -19
  31. package/dist/form/field_set/field_set.js.map +1 -1
  32. package/dist/inputs/checkbox/checkbox.js +12 -12
  33. package/dist/inputs/checkbox/checkbox.js.map +1 -1
  34. package/dist/inputs/color_input/color_input.d.ts.map +1 -1
  35. package/dist/inputs/color_input/color_input.js +13 -17
  36. package/dist/inputs/color_input/color_input.js.map +1 -1
  37. package/dist/inputs/color_input/color_picker.js +6 -6
  38. package/dist/inputs/color_input/color_picker.js.map +1 -1
  39. package/dist/inputs/combo_box/combo_box.js +15 -15
  40. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  41. package/dist/inputs/date_picker/date_picker.js +6 -6
  42. package/dist/inputs/date_picker/date_picker.js.map +1 -1
  43. package/dist/inputs/date_picker/date_picker_date.js +13 -13
  44. package/dist/inputs/date_picker/date_picker_date.js.map +1 -1
  45. package/dist/inputs/date_picker/date_picker_day.js +1 -1
  46. package/dist/inputs/date_picker/date_picker_header.js +24 -24
  47. package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
  48. package/dist/inputs/date_picker/date_picker_input.js +19 -19
  49. package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
  50. package/dist/inputs/date_picker/date_picker_time_selector.d.ts.map +1 -1
  51. package/dist/inputs/date_picker/date_picker_time_selector.js +6 -9
  52. package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
  53. package/dist/inputs/date_picker/date_picker_year_input.js +3 -3
  54. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  55. package/dist/inputs/date_picker/date_picker_year_selector.d.ts.map +1 -1
  56. package/dist/inputs/date_picker/date_picker_year_selector.js +18 -24
  57. package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
  58. package/dist/inputs/input/input.js +4 -4
  59. package/dist/inputs/input/input.js.map +1 -1
  60. package/dist/inputs/multi_combo_box/multi_combo_box.js +1 -1
  61. package/dist/inputs/multi_combo_box/multi_combo_box.js.map +1 -1
  62. package/dist/inputs/multiselect/multiselect_values.js +8 -8
  63. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  64. package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
  65. package/dist/inputs/phone_number_input/phone_number_input.js +28 -31
  66. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  67. package/dist/inputs/radio/radio.js +14 -14
  68. package/dist/inputs/radio/radio.js.map +1 -1
  69. package/dist/inputs/select/select.js +16 -16
  70. package/dist/inputs/select/select.js.map +1 -1
  71. package/dist/inputs/slider/slider.js +7 -7
  72. package/dist/inputs/slider/slider.js.map +1 -1
  73. package/dist/inputs/suggestions/suggestion_item.js +3 -3
  74. package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
  75. package/dist/inputs/suggestions/suggestion_list.js +8 -8
  76. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  77. package/dist/inputs/switch/switch.js +14 -14
  78. package/dist/inputs/switch/switch.js.map +1 -1
  79. package/dist/inputs/textarea/textarea.js +6 -6
  80. package/dist/inputs/textarea/textarea.js.map +1 -1
  81. package/dist/inputs/unit_input/unit_input.js +5 -5
  82. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  83. package/dist/layouts/body/h_body.js +10 -10
  84. package/dist/layouts/body/h_body.js.map +1 -1
  85. package/dist/layouts/body/v_body.js +8 -8
  86. package/dist/layouts/body/v_body.js.map +1 -1
  87. package/dist/layouts/column/column.js +16 -16
  88. package/dist/layouts/column/column.js.map +1 -1
  89. package/dist/layouts/divider/divider.js +9 -9
  90. package/dist/layouts/divider/divider.js.map +1 -1
  91. package/dist/layouts/footer/footer.js +7 -7
  92. package/dist/layouts/footer/footer.js.map +1 -1
  93. package/dist/layouts/grid/grid.d.ts.map +1 -1
  94. package/dist/layouts/grid/grid.js +22 -31
  95. package/dist/layouts/grid/grid.js.map +1 -1
  96. package/dist/layouts/header/header.js +11 -11
  97. package/dist/layouts/header/header.js.map +1 -1
  98. package/dist/layouts/list/item.js +6 -6
  99. package/dist/layouts/list/item.js.map +1 -1
  100. package/dist/layouts/list/list.js +6 -6
  101. package/dist/layouts/list/list.js.map +1 -1
  102. package/dist/layouts/sidebar_end/sidebar_end.js +15 -15
  103. package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -1
  104. package/dist/layouts/sidebar_start/sidebar_start.js +16 -16
  105. package/dist/layouts/sidebar_start/sidebar_start.js.map +1 -1
  106. package/dist/layouts/utility_bar/utility_bar.js +14 -14
  107. package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
  108. package/dist/modal.css +1 -1
  109. package/dist/overlay/menu/menu.js +8 -8
  110. package/dist/overlay/menu/menu.js.map +1 -1
  111. package/dist/overlay/tooltip/tooltip.js +10 -10
  112. package/dist/overlay/tooltip/tooltip.js.map +1 -1
  113. package/dist/stacks/box/bottom_resize_handle.js +9 -9
  114. package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
  115. package/dist/stacks/box/box.js +42 -42
  116. package/dist/stacks/box/box.js.map +1 -1
  117. package/dist/stacks/box/end_resize_handle.js +6 -6
  118. package/dist/stacks/box/end_resize_handle.js.map +1 -1
  119. package/dist/stacks/box/left_resize_handle.js +3 -3
  120. package/dist/stacks/box/left_resize_handle.js.map +1 -1
  121. package/dist/stacks/box/right_resize_handle.js +8 -8
  122. package/dist/stacks/box/right_resize_handle.js.map +1 -1
  123. package/dist/stacks/box/start_resize_handle.js +7 -7
  124. package/dist/stacks/box/start_resize_handle.js.map +1 -1
  125. package/dist/stacks/box/top_resize_handle.js +8 -8
  126. package/dist/stacks/box/top_resize_handle.js.map +1 -1
  127. package/dist/stacks/h_collapsible_box.js +5 -5
  128. package/dist/stacks/h_collapsible_box.js.map +1 -1
  129. package/dist/stacks/h_stack.js +26 -26
  130. package/dist/stacks/h_stack.js.map +1 -1
  131. package/dist/stacks/spacer.js +5 -5
  132. package/dist/stacks/spacer.js.map +1 -1
  133. package/dist/stacks/story_components/circle.js +6 -6
  134. package/dist/stacks/story_components/circle.js.map +1 -1
  135. package/dist/stacks/story_components/picture_placeholder.js +8 -8
  136. package/dist/stacks/story_components/picture_placeholder.js.map +1 -1
  137. package/dist/stacks/story_components/rect.js +11 -11
  138. package/dist/stacks/story_components/rect.js.map +1 -1
  139. package/dist/stacks/v_collapsible_box.js +8 -8
  140. package/dist/stacks/v_collapsible_box.js.map +1 -1
  141. package/dist/stacks/v_stack.js +35 -35
  142. package/dist/stacks/v_stack.js.map +1 -1
  143. package/dist/stacks/z_stack.js +34 -34
  144. package/dist/stacks/z_stack.js.map +1 -1
  145. package/dist/surfaces/alert/alert.js +8 -8
  146. package/dist/surfaces/alert/alert.js.map +1 -1
  147. package/dist/surfaces/card/card.js +8 -8
  148. package/dist/surfaces/card/card.js.map +1 -1
  149. package/dist/surfaces/confirm/confirm.d.ts.map +1 -1
  150. package/dist/surfaces/confirm/confirm.js +13 -20
  151. package/dist/surfaces/confirm/confirm.js.map +1 -1
  152. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +5 -5
  153. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -1
  154. package/dist/surfaces/drawers/drawer_end/drawer_end.js +8 -8
  155. package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -1
  156. package/dist/surfaces/drawers/drawer_start/drawer_start.js +4 -4
  157. package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -1
  158. package/dist/surfaces/drawers/drawer_top/drawer_top.js +4 -4
  159. package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -1
  160. package/dist/surfaces/modal/modal.d.ts +2 -4
  161. package/dist/surfaces/modal/modal.d.ts.map +1 -1
  162. package/dist/surfaces/modal/modal.js +16 -7
  163. package/dist/surfaces/modal/modal.js.map +1 -1
  164. package/dist/surfaces/page/h_page.js +6 -6
  165. package/dist/surfaces/page/h_page.js.map +1 -1
  166. package/dist/surfaces/page/v_page.js +9 -9
  167. package/dist/surfaces/page/v_page.js.map +1 -1
  168. package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
  169. package/dist/surfaces/panel/h_panel.js +18 -24
  170. package/dist/surfaces/panel/h_panel.js.map +1 -1
  171. package/dist/surfaces/panel/v_panel.js +9 -9
  172. package/dist/surfaces/panel/v_panel.js.map +1 -1
  173. package/dist/surfaces/popover/popover.js +34 -34
  174. package/dist/surfaces/popover/popover.js.map +1 -1
  175. package/dist/surfaces/window/window.d.ts.map +1 -1
  176. package/dist/surfaces/window/window.js +6 -14
  177. package/dist/surfaces/window/window.js.map +1 -1
  178. package/dist/themes/index.d.ts +0 -2
  179. package/dist/themes/index.d.ts.map +1 -1
  180. package/dist/themes/index.js +5 -266
  181. package/dist/themes/index.js.map +1 -1
  182. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  183. package/dist/tokens/badge/badge.js +13 -13
  184. package/dist/tokens/badge/badge.js.map +1 -1
  185. package/dist/tokens/bubble/bubble.js +16 -17
  186. package/dist/tokens/bubble/bubble.js.map +1 -1
  187. package/dist/tokens/chip/chip.js +10 -11
  188. package/dist/tokens/chip/chip.js.map +1 -1
  189. package/dist/typography/body_text/body_text.js +21 -21
  190. package/dist/typography/body_text/body_text.js.map +1 -1
  191. package/dist/typography/callout/callout.js +16 -16
  192. package/dist/typography/callout/callout.js.map +1 -1
  193. package/dist/typography/caption/caption.js +13 -13
  194. package/dist/typography/caption/caption.js.map +1 -1
  195. package/dist/typography/footnote/footnote.js +14 -14
  196. package/dist/typography/footnote/footnote.js.map +1 -1
  197. package/dist/typography/headline/headline.js +12 -12
  198. package/dist/typography/headline/headline.js.map +1 -1
  199. package/dist/typography/subheadline/subheadline.js +13 -13
  200. package/dist/typography/subheadline/subheadline.js.map +1 -1
  201. package/dist/typography/title/title.js +22 -22
  202. package/dist/typography/title/title.js.map +1 -1
  203. package/package.json +21 -2
  204. package/src/actions/button/__stories__/button.stories.tsx +1 -1
  205. package/src/actions/button/__stories__/button_group.stories.tsx +1 -1
  206. package/src/actions/button/__stories__/select_group.stories.tsx +1 -1
  207. package/src/actions/button/__stories__/slim_button.stories.tsx +1 -1
  208. package/src/actions/button/base_button/base_button.tsx +2 -2
  209. package/src/actions/button/button/button.tsx +3 -3
  210. package/src/actions/button/button_group/button_group.tsx +4 -7
  211. package/src/actions/button/select_group/select_group.tsx +3 -3
  212. package/src/actions/button/slim_button/slim_button.tsx +3 -2
  213. package/src/feedback/lazy/lazy.stories.tsx +1 -1
  214. package/src/feedback/loading/__storybook__/loading.stories.tsx +1 -1
  215. package/src/feedback/progress/progress_bar.stories.tsx +1 -1
  216. package/src/form/field/common/field_control/field_control.tsx +2 -2
  217. package/src/form/field/common/field_header.tsx +2 -2
  218. package/src/form/field/common/status_input/status_input.tsx +3 -6
  219. package/src/form/field/field.stories.tsx +2 -1
  220. package/src/form/field/h_field/h_field.stories.tsx +10 -1
  221. package/src/form/field/h_field/h_field.tsx +2 -2
  222. package/src/form/field/v_field/v_field.stories.tsx +10 -1
  223. package/src/form/field/v_field/v_field.tsx +2 -2
  224. package/src/form/field_set/field_set.stories.tsx +9 -1
  225. package/src/form/field_set/field_set.tsx +4 -7
  226. package/src/inputs/checkbox/checkbox.stories.tsx +9 -1
  227. package/src/inputs/checkbox/checkbox.tsx +2 -2
  228. package/src/inputs/color_input/color_input.stories.tsx +9 -1
  229. package/src/inputs/color_input/color_input.tsx +2 -6
  230. package/src/inputs/color_input/color_picker.tsx +2 -2
  231. package/src/inputs/combo_box/combo_box.stories.tsx +14 -5
  232. package/src/inputs/combo_box/combo_box.tsx +2 -2
  233. package/src/inputs/date_picker/date_picker.stories.tsx +18 -10
  234. package/src/inputs/date_picker/date_picker.tsx +3 -3
  235. package/src/inputs/date_picker/date_picker_date.tsx +3 -3
  236. package/src/inputs/date_picker/date_picker_header.tsx +2 -2
  237. package/src/inputs/date_picker/date_picker_input.stories.tsx +15 -7
  238. package/src/inputs/date_picker/date_picker_input.tsx +3 -3
  239. package/src/inputs/date_picker/date_picker_time_selector.tsx +5 -8
  240. package/src/inputs/date_picker/date_picker_year_input.tsx +2 -2
  241. package/src/inputs/date_picker/date_picker_year_selector.tsx +3 -9
  242. package/src/inputs/input/input.stories.tsx +9 -1
  243. package/src/inputs/input/input.tsx +2 -2
  244. package/src/inputs/mask_input/key_capture_input.stories.tsx +9 -1
  245. package/src/inputs/mask_input/mask_input.stories.tsx +10 -1
  246. package/src/inputs/multi_combo_box/multi_combo_box.stories.tsx +10 -1
  247. package/src/inputs/multi_combo_box/multi_combo_box.tsx +2 -2
  248. package/src/inputs/multiselect/multiselect_values.tsx +2 -2
  249. package/src/inputs/multiselect/mutliselect.stories.tsx +10 -1
  250. package/src/inputs/phone_number_input/phone_number_input.stories.tsx +10 -1
  251. package/src/inputs/phone_number_input/phone_number_input.tsx +6 -9
  252. package/src/inputs/radio/radio.stories.tsx +14 -6
  253. package/src/inputs/radio/radio.tsx +2 -2
  254. package/src/inputs/select/select.stories.tsx +18 -9
  255. package/src/inputs/select/select.tsx +2 -2
  256. package/src/inputs/slider/slider.stories.tsx +9 -1
  257. package/src/inputs/slider/slider.tsx +2 -2
  258. package/src/inputs/suggestions/suggestion_item.tsx +2 -2
  259. package/src/inputs/suggestions/suggestion_list.stories.tsx +21 -12
  260. package/src/inputs/suggestions/suggestion_list.tsx +3 -3
  261. package/src/inputs/switch/switch.stories.tsx +9 -1
  262. package/src/inputs/switch/switch.tsx +4 -4
  263. package/src/inputs/textarea/textarea.stories.tsx +9 -1
  264. package/src/inputs/textarea/textarea.tsx +2 -2
  265. package/src/inputs/unit_input/unit_input.stories.tsx +9 -1
  266. package/src/inputs/unit_input/unit_input.tsx +4 -4
  267. package/src/layouts/body/h_body.tsx +2 -2
  268. package/src/layouts/body/v_body.tsx +2 -2
  269. package/src/layouts/column/column.tsx +3 -3
  270. package/src/layouts/divider/__stories__/divider.stories.tsx +59 -19
  271. package/src/layouts/divider/divider.tsx +3 -3
  272. package/src/layouts/footer/footer.tsx +2 -2
  273. package/src/layouts/grid/grid.stories.tsx +42 -34
  274. package/src/layouts/grid/grid.tsx +2 -7
  275. package/src/layouts/header/header.tsx +2 -2
  276. package/src/layouts/list/item.tsx +2 -2
  277. package/src/layouts/list/list.tsx +2 -2
  278. package/src/layouts/sidebar_end/sidebar_end.tsx +2 -2
  279. package/src/layouts/sidebar_start/sidebar_start.tsx +2 -2
  280. package/src/layouts/utility_bar/utility_bar.tsx +2 -2
  281. package/src/overlay/context_menu/context_menu.stories.tsx +13 -5
  282. package/src/overlay/menu/menu.stories.tsx +22 -14
  283. package/src/overlay/menu/menu.tsx +3 -3
  284. package/src/overlay/popper/popper.stories.tsx +43 -22
  285. package/src/overlay/portal/portal.stories.tsx +10 -1
  286. package/src/overlay/tooltip/tooltip.stories.tsx +9 -2
  287. package/src/overlay/tooltip/tooltip.tsx +2 -2
  288. package/src/stacks/box/bottom_resize_handle.tsx +2 -2
  289. package/src/stacks/box/box.tsx +2 -2
  290. package/src/stacks/box/end_resize_handle.tsx +2 -2
  291. package/src/stacks/box/left_resize_handle.tsx +2 -2
  292. package/src/stacks/box/right_resize_handle.tsx +2 -2
  293. package/src/stacks/box/start_resize_handle.tsx +2 -2
  294. package/src/stacks/box/top_resize_handle.tsx +2 -2
  295. package/src/stacks/collapsible_box.stories.tsx +10 -1
  296. package/src/stacks/h_collapsible_box.tsx +2 -2
  297. package/src/stacks/h_stack.stories.tsx +104 -59
  298. package/src/stacks/h_stack.tsx +2 -2
  299. package/src/stacks/spacer.tsx +2 -2
  300. package/src/stacks/story_components/circle.tsx +2 -2
  301. package/src/stacks/story_components/picture_placeholder.tsx +2 -2
  302. package/src/stacks/story_components/rect.tsx +2 -2
  303. package/src/stacks/v_collapsible_box.tsx +2 -2
  304. package/src/stacks/v_stack.stories.tsx +91 -10
  305. package/src/stacks/v_stack.tsx +2 -2
  306. package/src/stacks/z_stack.stories.tsx +9 -1
  307. package/src/stacks/z_stack.tsx +2 -2
  308. package/src/surfaces/alert/alert.stories.tsx +4 -4
  309. package/src/surfaces/alert/alert.tsx +2 -2
  310. package/src/surfaces/card/card.tsx +2 -2
  311. package/src/surfaces/confirm/confirm.stories.tsx +4 -4
  312. package/src/surfaces/confirm/confirm.tsx +3 -6
  313. package/src/surfaces/drawers/__stories__/drawers.stories.tsx +1 -1
  314. package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +2 -2
  315. package/src/surfaces/drawers/drawer_end/drawer_end.tsx +2 -2
  316. package/src/surfaces/drawers/drawer_start/drawer_start.tsx +2 -2
  317. package/src/surfaces/drawers/drawer_top/drawer_top.tsx +2 -2
  318. package/src/surfaces/modal/__stories__/modal.stories.tsx +54 -0
  319. package/src/surfaces/modal/modal.module.css +2 -1
  320. package/src/surfaces/modal/modal.tsx +9 -6
  321. package/src/surfaces/page/h_page.tsx +2 -2
  322. package/src/surfaces/page/v_page.tsx +2 -2
  323. package/src/surfaces/panel/h_panel.tsx +3 -9
  324. package/src/surfaces/panel/v_panel.tsx +3 -3
  325. package/src/surfaces/popover/popover.tsx +2 -2
  326. package/src/surfaces/window/window.stories.tsx +1 -1
  327. package/src/surfaces/window/window.tsx +2 -6
  328. package/src/themes/index.ts +0 -2
  329. package/src/themes/stories/themes.stories.tsx +1 -1
  330. package/src/themes/themes/ergo/ergo_theme.css +70 -0
  331. package/src/tokens/badge/badge.stories.tsx +6 -6
  332. package/src/tokens/badge/badge.tsx +3 -3
  333. package/src/tokens/bubble/bubble.stories.tsx +16 -9
  334. package/src/tokens/bubble/bubble.tsx +2 -2
  335. package/src/tokens/chip/chip.stories.tsx +1 -1
  336. package/src/tokens/chip/chip.tsx +2 -2
  337. package/src/typography/body_text/body_text.tsx +2 -2
  338. package/src/typography/callout/callout.tsx +2 -2
  339. package/src/typography/caption/caption.tsx +2 -2
  340. package/src/typography/footnote/footnote.tsx +2 -2
  341. package/src/typography/headline/headline.tsx +2 -2
  342. package/src/typography/subheadline/subheadline.tsx +2 -2
  343. package/src/typography/title/title.tsx +2 -2
  344. package/src/typography/typography-showcase.stories.tsx +2 -2
  345. package/src/utils/click_away_listener.stories.tsx +21 -11
  346. package/src/utils/responsive/responsive_renderer.stories.tsx +7 -7
  347. package/src/utils/scroll_away_listener.stories.tsx +11 -1
  348. package/src/surfaces/modal/modal.stories.tsx +0 -15
@@ -1,5 +1,5 @@
1
1
  import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import React from 'react';
4
4
  import styles from './drawer_start.module.css';
5
5
 
@@ -13,7 +13,7 @@ export const DrawerStart = React.forwardRef<HTMLElement, DrawerStartProps>(
13
13
  <VStack
14
14
  ref={ref}
15
15
  as="section"
16
- className={classNames(styles.drawerStart, className, 'drawerStart')}
16
+ className={clsx(styles.drawerStart, className, 'drawerStart')}
17
17
  {...props}
18
18
  >
19
19
  {children}
@@ -1,5 +1,5 @@
1
1
  import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import React from 'react';
4
4
  import styles from './drawer_top.module.css';
5
5
 
@@ -15,7 +15,7 @@ export const DrawerTop = React.forwardRef<HTMLElement, DrawerTopProps>(function
15
15
  <VStack
16
16
  ref={ref}
17
17
  as="section"
18
- className={classNames(styles.drawerTop, className, 'drawerTop')}
18
+ className={clsx(styles.drawerTop, className, 'drawerTop')}
19
19
  {...props}
20
20
  >
21
21
  {children}
@@ -0,0 +1,54 @@
1
+ import { useState } from 'react';
2
+ import { Button, SlimButton } from '../../../actions/index.js';
3
+ import { Footer, Header, VBody } from '../../../layouts/index.js';
4
+ import { Portal } from '../../../overlay/index.js';
5
+ import { ZStack } from '../../../stacks/z_stack.js';
6
+ import { BodyText, Title } from '../../../typography/index.js';
7
+ import { Modal } from '../modal.js';
8
+ import { ClickAwayListener } from '../../../utils/index.js';
9
+ import { Spacer } from '../../../stacks/index.js';
10
+ import { CrossIcon } from '@tcn/icons/cross_icon.js';
11
+
12
+ export default {
13
+ title: 'Surfaces/Modal',
14
+ component: Modal,
15
+ tags: ['autodocs'],
16
+ };
17
+
18
+ export const ModalStory = () => {
19
+ const [isOpen, setIsOpen] = useState(false);
20
+
21
+ function toggle() {
22
+ setIsOpen(!isOpen);
23
+ }
24
+ return (
25
+ <ZStack height="100%" width="100%" minHeight="600px">
26
+ <button onClick={toggle}>{isOpen ? 'Close' : 'Open'}</button>
27
+ {isOpen && (
28
+ <Portal>
29
+ <ZStack width="100%" height="100%" className="tcn-veil">
30
+ <ClickAwayListener onClickAway={toggle}>
31
+ <Modal width="400px" height="500px">
32
+ <Header>
33
+ <Title>Modal Title</Title>
34
+ <Spacer />
35
+ <SlimButton hierarchy="tertiary" onClick={toggle}>
36
+ <CrossIcon />
37
+ </SlimButton>
38
+ </Header>
39
+ <VBody>
40
+ <BodyText>This is a modal</BodyText>
41
+ </VBody>
42
+ <Footer>
43
+ <Spacer />
44
+ <Button hierarchy="secondary">Cancel</Button>
45
+ <Button hierarchy="primary">Save</Button>
46
+ </Footer>
47
+ </Modal>
48
+ </ClickAwayListener>
49
+ </ZStack>
50
+ </Portal>
51
+ )}
52
+ </ZStack>
53
+ );
54
+ };
@@ -1,3 +1,4 @@
1
1
  .modal {
2
- background-color: var(--background-color-primary);
2
+ width: 100%;
3
+ height: 100%;
3
4
  }
@@ -1,18 +1,21 @@
1
1
  import { VStack, type VStackProps } from '../../stacks/v_stack.js';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import React from 'react';
4
4
  import styles from './modal.module.css';
5
5
 
6
- export interface ModalProps extends Omit<VStackProps, 'as' | 'children'> {
7
- children?: React.ReactNode;
8
- }
6
+ export type ModalProps = Omit<VStackProps<HTMLDialogElement>, 'as'>;
9
7
 
10
- export const Modal = React.forwardRef<HTMLElement, ModalProps>(function VPanel(
8
+ export const Modal = React.forwardRef<HTMLDialogElement, ModalProps>(function Modal(
11
9
  { children, className, ...props }: ModalProps,
12
10
  ref
13
11
  ) {
14
12
  return (
15
- <VStack ref={ref} className={classNames(className, styles.Modal, 'modal')} {...props}>
13
+ <VStack
14
+ ref={ref}
15
+ className={clsx(styles['modal'], 'tcn-modal', className)}
16
+ as="dialog"
17
+ {...props}
18
+ >
16
19
  {children}
17
20
  </VStack>
18
21
  );
@@ -1,4 +1,4 @@
1
- import classNames from 'classnames';
1
+ import { clsx } from 'clsx';
2
2
  import React from 'react';
3
3
  import styles from './page.module.css';
4
4
  import { HStack, type HStackProps } from '../../stacks/h_stack.js';
@@ -13,7 +13,7 @@ export const HPage = React.forwardRef<HTMLElement, HPageProps>(function HPage(
13
13
  <HStack
14
14
  ref={ref}
15
15
  as="main"
16
- className={classNames(styles.page, className, 'page')}
16
+ className={clsx(styles.page, className, 'page')}
17
17
  vAlign="start"
18
18
  {...props}
19
19
  >
@@ -1,5 +1,5 @@
1
1
  import { VStack, type VStackProps } from '../../stacks/v_stack.js';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import React from 'react';
4
4
  import styles from './page.module.css';
5
5
 
@@ -13,7 +13,7 @@ export const VPage = React.forwardRef<HTMLElement, VPageProps>(function VPage(
13
13
  <VStack
14
14
  ref={ref}
15
15
  as="main"
16
- className={classNames(styles.page, className, 'page')}
16
+ className={clsx(styles.page, className, 'page')}
17
17
  {...props}
18
18
  >
19
19
  {children}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Box, type BoxProps } from '../../stacks/box/box.js';
4
4
  import { HStack } from '../../stacks/h_stack.js';
5
5
  import type { Alignment } from '../../stacks/types/alignment.js';
@@ -38,13 +38,7 @@ export const HPanel = React.forwardRef<HTMLElement, HPanelProps>(function HPanel
38
38
  maxHeight={maxHeight}
39
39
  data-h-alignment={hAlign}
40
40
  data-v-alignment={vAlign}
41
- className={classNames(
42
- styles['panel'],
43
- className,
44
- 'panel',
45
- 'tcn-panel',
46
- 'tcn-h-panel'
47
- )}
41
+ className={clsx(styles['panel'], className, 'panel', 'tcn-panel', 'tcn-h-panel')}
48
42
  {...props}
49
43
  >
50
44
  <HStack
@@ -56,7 +50,7 @@ export const HPanel = React.forwardRef<HTMLElement, HPanelProps>(function HPanel
56
50
  hAlign={hAlign}
57
51
  vAlign={vAlign}
58
52
  ref={ref}
59
- className={classNames(
53
+ className={clsx(
60
54
  styles['panel-stack'],
61
55
  className,
62
56
  'panel-stack',
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Box, type BoxProps } from '../../stacks/box/box.js';
4
4
  import type { Alignment } from '../../stacks/types/alignment.js';
5
5
  import { VStack } from '../../stacks/v_stack.js';
@@ -38,7 +38,7 @@ export const VPanel = React.forwardRef<HTMLElement, VPanelProps>(function VPanel
38
38
  maxHeight={maxHeight}
39
39
  data-h-alignment={hAlign}
40
40
  data-v-alignment={vAlign}
41
- className={classNames(className, 'panel', 'tcn-panel', 'tcn-v-panel')}
41
+ className={clsx(className, 'panel', 'tcn-panel', 'tcn-v-panel')}
42
42
  {...props}
43
43
  >
44
44
  <VStack
@@ -50,7 +50,7 @@ export const VPanel = React.forwardRef<HTMLElement, VPanelProps>(function VPanel
50
50
  hAlign={hAlign}
51
51
  vAlign={vAlign}
52
52
  ref={ref}
53
- className={classNames(
53
+ className={clsx(
54
54
  styles['panel-stack'],
55
55
  className,
56
56
  'panel-stack',
@@ -1,4 +1,4 @@
1
- import classnames from 'classnames';
1
+ import { clsx } from 'clsx';
2
2
  import { VStack } from '../../stacks/v_stack.js';
3
3
  import { Popper, type PopperProps } from '../../overlay/popper/popper.js';
4
4
  import { VStackProps } from '../../stacks/v_stack.js';
@@ -45,7 +45,7 @@ export function Popover({
45
45
  open={open}
46
46
  onClose={onClose}
47
47
  >
48
- <VStack inline width="auto" className={classnames(className, 'popover')} {...props}>
48
+ <VStack inline width="auto" className={clsx(className, 'popover')} {...props}>
49
49
  {children}
50
50
  </VStack>
51
51
  </Popper>
@@ -1,7 +1,7 @@
1
1
  import { Window } from './window.js';
2
2
 
3
3
  export default {
4
- title: 'Frame / Window',
4
+ title: 'Surfaces/Window',
5
5
  component: Window,
6
6
  tags: ['autodocs'],
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import { VStack, type VStackProps } from '../../stacks/v_stack.js';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import React from 'react';
4
4
  import styles from './window.module.css';
5
5
 
@@ -10,11 +10,7 @@ export const Window = React.forwardRef<HTMLDivElement, WindowProps>(function Win
10
10
  ref
11
11
  ) {
12
12
  return (
13
- <VStack
14
- ref={ref}
15
- className={classNames(styles.window, className, 'window')}
16
- {...props}
17
- >
13
+ <VStack ref={ref} className={clsx(styles.window, className, 'window')} {...props}>
18
14
  {children}
19
15
  </VStack>
20
16
  );
@@ -1,5 +1,3 @@
1
1
  export * from './theme_variables.js';
2
2
  export * from './theme.js';
3
- export * from './themes/windows_98/windows_98_theme.js';
4
- export * from './themes/ergo/ergo_theme.js';
5
3
  export * from './stylesheets/reset.js';
@@ -10,7 +10,7 @@ export default {
10
10
  title: 'Themes',
11
11
  };
12
12
 
13
- export function ThemesStories() {
13
+ export function Themes() {
14
14
  const [theme, setTheme] = useState<'windows98' | 'ergo'>('windows98');
15
15
 
16
16
  const styleSheet = theme === 'windows98' ? windows98StyleSheet : ergoStyleSheet;
@@ -198,6 +198,76 @@ legend {
198
198
 
199
199
  /* ===== SURFACES ===== */
200
200
 
201
+ .tcn-veil {
202
+ background-color: rgba(0, 0, 0, 0.5);
203
+ }
204
+
205
+ /* MODAL: */
206
+ .tcn-modal {
207
+ --v-inset: var(--padding-large);
208
+ background-color: var(--background-color-primary);
209
+ border-radius: var(--shape-radius-medium);
210
+ /* TODO: This should be a variable */
211
+ border: 1px solid rgba(170, 170, 170, 1);
212
+ overflow: hidden;
213
+ :where(.tcn-header) {
214
+ min-height: 40px;
215
+ /* TODO: This should be a variable */
216
+ background-color: rgb(73, 116, 133);
217
+ color: white;
218
+ padding: 0 var(--v-inset);
219
+ gap: var(--gap-medium);
220
+
221
+ :where(.tcn-title) {
222
+ color: white;
223
+ }
224
+
225
+ :where(.tcn-button) {
226
+ padding: 0;
227
+ min-width: 18px;
228
+ min-height: 18px;
229
+ color: white;
230
+ }
231
+
232
+ :where(.tcn-button)[data-hierarchy="tertiary"] {
233
+ color: white;
234
+ }
235
+
236
+ :where(.tcn-divider) {
237
+ padding: 4px 0;
238
+ :where(.tcn-divider-line) {
239
+ width: 1.5px;
240
+ min-height: 18px;
241
+ height: auto;
242
+ }
243
+ }
244
+ }
245
+
246
+ :where(.tcn-utility-bar) {
247
+ min-height: 32px;
248
+ border-bottom: 1px solid var(--foreground-color-primary);
249
+ padding: 0 var(--v-inset);
250
+
251
+ :where(.tcn-button) {
252
+ padding: 0;
253
+ min-width: 18px;
254
+ min-height: 18px;
255
+ }
256
+ }
257
+
258
+ :where(.tcn-body) {
259
+ padding: 0 var(--v-inset);
260
+ gap: var(--gap-medium);
261
+ }
262
+
263
+ :where(.tcn-footer) {
264
+ gap: var(--gap-medium);
265
+ min-height: 40px;
266
+ border-top: 1px solid var(--foreground-color-primary);
267
+ padding: 0 var(--v-inset);
268
+ }
269
+ }
270
+
201
271
  /* PANEL */
202
272
  .tcn-panel {
203
273
  --v-inset: var(--padding-large);
@@ -1,25 +1,25 @@
1
1
  import { ZStack } from '../../stacks/z_stack.js';
2
2
  import React from 'react';
3
- import { Badge } from './badge.js';
3
+ import { Badge as BadgeComponent } from './badge.js';
4
4
  import { Button } from '../../actions/index.js';
5
5
 
6
6
  export default {
7
- title: 'src/Badge',
8
- component: Badge,
7
+ title: 'Tokens/Badge',
8
+ component: BadgeComponent,
9
9
  tags: ['autodocs'],
10
10
  };
11
11
 
12
- export function Default(props: any) {
12
+ export function Badge(props: any) {
13
13
  return (
14
14
  <ZStack>
15
- <Badge
15
+ <BadgeComponent
16
16
  value={10}
17
17
  // backgroundColor="var(--accent-color)"
18
18
  // textColor="white"
19
19
  {...props}
20
20
  >
21
21
  <Button>Hello</Button>
22
- </Badge>
22
+ </BadgeComponent>
23
23
  </ZStack>
24
24
  );
25
25
  }
@@ -1,5 +1,5 @@
1
1
  import React, { HTMLAttributes } from 'react';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Spacer } from '../../stacks/spacer.js';
4
4
  import { VStack } from '../../stacks/v_stack.js';
5
5
  import { ZStack } from '../../stacks/z_stack.js';
@@ -33,7 +33,7 @@ export const Badge = React.forwardRef(
33
33
  vAlign="end"
34
34
  hAlign="end"
35
35
  zIndex={0}
36
- className={classNames('badge', className)}
36
+ className={clsx('badge', className)}
37
37
  {...props}
38
38
  >
39
39
  <ZStack zIndex={0} inline width="auto" height="auto">
@@ -41,7 +41,7 @@ export const Badge = React.forwardRef(
41
41
  </ZStack>
42
42
  <VStack zIndex={1} height="100%" width="auto">
43
43
  <Bubble
44
- className={classNames(styles['badge-bubble'], 'badge-bubble')}
44
+ className={clsx(styles['badge-bubble'], 'badge-bubble')}
45
45
  backgroundColor={backgroundColor}
46
46
  textColor={color}
47
47
  elevate
@@ -1,10 +1,23 @@
1
1
  import React from 'react';
2
- import { Bubble } from './bubble.js';
2
+ import { Bubble as BubbleComponent } from './bubble.js';
3
3
 
4
- export const Base = (args: any) => {
5
- return <Bubble {...args}>0</Bubble>;
4
+ export default {
5
+ title: 'Tokens/Bubble',
6
+ component: BubbleComponent,
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component: 'A bubble component that can be used to display a badge.',
12
+ },
13
+ },
14
+ },
6
15
  };
7
16
 
17
+ export function Bubble(args: any) {
18
+ return <BubbleComponent {...args}>0</BubbleComponent>;
19
+ }
20
+
8
21
  export const Styled = () => {
9
22
  return (
10
23
  <div>This story needs to be updated.</div>
@@ -160,9 +173,3 @@ const _randomWords = [
160
173
  'Enduring',
161
174
  'Lasting',
162
175
  ];
163
-
164
- export default {
165
- title: 'src/Bubble',
166
- component: Bubble,
167
- tags: ['autodocs'],
168
- };
@@ -1,4 +1,4 @@
1
- import classNames from 'classnames';
1
+ import { clsx } from 'clsx';
2
2
  import React, { HTMLAttributes } from 'react';
3
3
  import styles from './bubble.module.css';
4
4
  import { theme } from '../../themes/index.js';
@@ -35,7 +35,7 @@ export const Bubble = React.forwardRef(function Bubble(
35
35
  return (
36
36
  <HStack
37
37
  inline
38
- className={classNames(styles.bubble, 'bubble', className)}
38
+ className={clsx(styles.bubble, 'bubble', className)}
39
39
  width="auto"
40
40
  height="auto"
41
41
  ref={ref}
@@ -7,7 +7,7 @@ import { BodyText } from '../../typography/index.js';
7
7
  import { CrossIcon } from '@tcn/icons/cross_icon.js';
8
8
 
9
9
  export default {
10
- title: 'src/Chip',
10
+ title: 'Tokens/Chip',
11
11
  component: Chip,
12
12
  tags: ['autodocs'],
13
13
  };
@@ -1,5 +1,5 @@
1
1
  import { HStack, HStackProps } from '../../stacks/h_stack.js';
2
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import React from 'react';
4
4
  import styles from './chip.module.css';
5
5
  import { theme } from '../../themes/index.js';
@@ -26,7 +26,7 @@ export const Chip = React.forwardRef(function Chip(
26
26
  width="auto"
27
27
  height="auto"
28
28
  vAlign="center"
29
- className={classNames(styles.chip, 'chip', className)}
29
+ className={clsx(styles.chip, 'chip', className)}
30
30
  style={finalStyle}
31
31
  {...props}
32
32
  >
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
3
3
  import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
4
- import classnames from 'classnames';
4
+ import { clsx } from 'clsx';
5
5
  import styles from './body_text.module.css';
6
6
 
7
7
  export interface BodyTextOwnProps {
@@ -65,7 +65,7 @@ export function BodyText({
65
65
  data-hierarchy={hierarchy}
66
66
  data-emphasis={emphasis}
67
67
  data-selectable={selectable}
68
- className={classnames(styles['body-text'], 'body-text', className)}
68
+ className={clsx(styles['body-text'], 'body-text', className)}
69
69
  style={style}
70
70
  data-size={size}
71
71
  data-word-break={breakWords}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classnames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
4
4
  import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
5
5
  import styles from './callout.module.css';
@@ -64,7 +64,7 @@ export function Callout({
64
64
  data-hierarchy={hierarchy}
65
65
  data-emphasis={emphasis}
66
66
  data-selectable={selectable}
67
- className={classnames(styles['callout'], 'callout', className)}
67
+ className={clsx(styles['callout'], 'callout', className)}
68
68
  style={style}
69
69
  data-size={size}
70
70
  >
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classnames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
4
4
  import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
5
5
  import styles from './caption.module.css';
@@ -64,7 +64,7 @@ export function Caption({
64
64
  data-hierarchy={hierarchy}
65
65
  data-emphasis={emphasis}
66
66
  data-selectable={selectable}
67
- className={classnames(styles['caption'], 'caption', className)}
67
+ className={clsx(styles['caption'], 'caption', className)}
68
68
  style={style}
69
69
  data-size={size}
70
70
  >
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classnames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
4
4
  import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
5
5
  import styles from './footnote.module.css';
@@ -64,7 +64,7 @@ export function Footnote({
64
64
  data-hierarchy={hierarchy}
65
65
  data-emphasis={emphasis}
66
66
  data-selectable={selectable}
67
- className={classnames(styles['footnote'], 'footnote', className)}
67
+ className={clsx(styles['footnote'], 'footnote', className)}
68
68
  style={style}
69
69
  data-size={size}
70
70
  >
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classnames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
4
4
  import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
5
5
  import styles from './headline.module.css';
@@ -74,7 +74,7 @@ export function Headline({
74
74
  data-hierarchy={hierarchy}
75
75
  data-emphasis={emphasis}
76
76
  data-selectable={selectable}
77
- className={classnames(styles['headline'], 'headline', className)}
77
+ className={clsx(styles['headline'], 'headline', className)}
78
78
  style={style}
79
79
  data-size={size}
80
80
  >
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classnames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
4
4
  import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
5
5
  import styles from './subheadline.module.css';
@@ -77,7 +77,7 @@ export function Subheadline({
77
77
  data-hierarchy={hierarchy}
78
78
  data-emphasis={emphasis}
79
79
  data-selectable={selectable}
80
- className={classnames(styles['subheadline'], 'subheadline', className)}
80
+ className={clsx(styles['subheadline'], 'subheadline', className)}
81
81
  style={style}
82
82
  data-size={size}
83
83
  >
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import classnames from 'classnames';
2
+ import { clsx } from 'clsx';
3
3
  import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
4
4
  import type { Emphasis, Hierarchy, Size } from '../../utils/index.js';
5
5
  import styles from './title.module.css';
@@ -78,7 +78,7 @@ export function Title({
78
78
  data-hierarchy={hierarchy}
79
79
  data-emphasis={emphasis}
80
80
  data-selectable={selectable}
81
- className={classnames(styles['title'], 'title', 'tcn-title', className)}
81
+ className={clsx(styles['title'], 'title', 'tcn-title', className)}
82
82
  style={style}
83
83
  data-size={size}
84
84
  >
@@ -11,13 +11,13 @@ import { Subheadline } from './subheadline/subheadline.js';
11
11
  import { Title } from './title/title.js';
12
12
 
13
13
  export default {
14
- title: 'Showcase',
14
+ title: 'Typography/Showcase',
15
15
  parameters: {
16
16
  layout: 'fullscreen',
17
17
  },
18
18
  };
19
19
 
20
- export function Typography() {
20
+ export function Showcase() {
21
21
  return (
22
22
  <VStack gap="30px" maxWidth="800px">
23
23
  <HStack height="auto">