@tcn/ui 0.17.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/AI_USAGE.md +59 -0
  2. package/CHANGELOG.md +1009 -0
  3. package/ai-docs/actions.md +43 -0
  4. package/ai-docs/decorators.md +34 -0
  5. package/ai-docs/feedback.md +31 -0
  6. package/ai-docs/form.md +58 -0
  7. package/ai-docs/inputs.md +71 -0
  8. package/ai-docs/layouts.md +76 -0
  9. package/ai-docs/mobile.md +34 -0
  10. package/ai-docs/navigation.md +48 -0
  11. package/ai-docs/overlay.md +58 -0
  12. package/ai-docs/stacks.md +59 -0
  13. package/ai-docs/surfaces.md +79 -0
  14. package/ai-docs/themes.md +47 -0
  15. package/ai-docs/tokens.md +35 -0
  16. package/ai-docs/typography.md +38 -0
  17. package/ai-docs/utils.md +51 -0
  18. package/dist/actions/index.d.ts +0 -1
  19. package/dist/actions/index.d.ts.map +1 -1
  20. package/dist/actions/index.js +6 -8
  21. package/dist/actions/index.js.map +1 -1
  22. package/dist/draggable.css +1 -1
  23. package/dist/draggable.module-DFYR5n3n.js +5 -0
  24. package/dist/draggable.module-DFYR5n3n.js.map +1 -0
  25. package/dist/field_set.css +1 -1
  26. package/dist/field_set.module-BpJTFCi4.js +5 -0
  27. package/dist/field_set.module-BpJTFCi4.js.map +1 -0
  28. package/dist/form/field/field.js +11 -10
  29. package/dist/form/field/field.js.map +1 -1
  30. package/dist/form/field_set/field_set.d.ts +6 -10
  31. package/dist/form/field_set/field_set.d.ts.map +1 -1
  32. package/dist/form/field_set/field_set.js +33 -61
  33. package/dist/form/field_set/field_set.js.map +1 -1
  34. package/dist/form/field_set/legend.d.ts +20 -0
  35. package/dist/form/field_set/legend.d.ts.map +1 -0
  36. package/dist/form/field_set/legend.js +28 -0
  37. package/dist/form/field_set/legend.js.map +1 -0
  38. package/dist/form/index.d.ts +2 -1
  39. package/dist/form/index.d.ts.map +1 -1
  40. package/dist/form/index.js +24 -22
  41. package/dist/form/index.js.map +1 -1
  42. package/dist/inputs/color_input/color_input.js +2 -3
  43. package/dist/inputs/color_input/color_input.js.map +1 -1
  44. package/dist/inputs/color_input/color_picker.js +11 -10
  45. package/dist/inputs/color_input/color_picker.js.map +1 -1
  46. package/dist/inputs/combo_box/combo_box.js +11 -10
  47. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  48. package/dist/inputs/date_picker/date_picker.js +11 -10
  49. package/dist/inputs/date_picker/date_picker.js.map +1 -1
  50. package/dist/inputs/date_picker/date_picker_header.d.ts.map +1 -1
  51. package/dist/inputs/date_picker/date_picker_header.js +15 -14
  52. package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
  53. package/dist/inputs/date_picker/date_picker_input.js +9 -9
  54. package/dist/inputs/date_picker/date_picker_time_selector.js +2 -3
  55. package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
  56. package/dist/inputs/date_picker/date_picker_year_input.js +2 -3
  57. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  58. package/dist/inputs/date_picker/date_picker_year_selector.js +22 -22
  59. package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
  60. package/dist/inputs/mask_input/key_capture_input.js +21 -20
  61. package/dist/inputs/mask_input/key_capture_input.js.map +1 -1
  62. package/dist/inputs/mask_input/mask_input.js +18 -17
  63. package/dist/inputs/mask_input/mask_input.js.map +1 -1
  64. package/dist/inputs/multiselect/multiselect.js +11 -10
  65. package/dist/inputs/multiselect/multiselect.js.map +1 -1
  66. package/dist/inputs/multiselect/multiselect_inline_values.d.ts.map +1 -1
  67. package/dist/inputs/multiselect/multiselect_inline_values.js +15 -15
  68. package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
  69. package/dist/inputs/multiselect/multiselect_values.js +16 -17
  70. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  71. package/dist/inputs/phone_number_input/phone_number_context.js +13 -12
  72. package/dist/inputs/phone_number_input/phone_number_context.js.map +1 -1
  73. package/dist/inputs/phone_number_input/phone_number_input_adapter.js +2 -3
  74. package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -1
  75. package/dist/inputs/phone_number_input/sip_input.js +8 -9
  76. package/dist/inputs/phone_number_input/sip_input.js.map +1 -1
  77. package/dist/inputs/select/select.js +9 -9
  78. package/dist/inputs/slider/slider.js +21 -20
  79. package/dist/inputs/slider/slider.js.map +1 -1
  80. package/dist/inputs/suggestions/suggestion_list.js +9 -9
  81. package/dist/inputs/switch/switch.js +16 -15
  82. package/dist/inputs/switch/switch.js.map +1 -1
  83. package/dist/inputs/unit_input/unit_input.js +11 -10
  84. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  85. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js +11 -10
  86. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js.map +1 -1
  87. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js +11 -10
  88. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js.map +1 -1
  89. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js +11 -10
  90. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js.map +1 -1
  91. package/dist/multiselect_values.css +1 -1
  92. package/dist/navigation/tabs/state/link/tab_link.js +11 -10
  93. package/dist/navigation/tabs/state/link/tab_link.js.map +1 -1
  94. package/dist/overlay/frame/frame.d.ts.map +1 -1
  95. package/dist/overlay/frame/frame.js +117 -76
  96. package/dist/overlay/frame/frame.js.map +1 -1
  97. package/dist/overlay/menu/menu.js +21 -20
  98. package/dist/overlay/menu/menu.js.map +1 -1
  99. package/dist/overlay/popper/base/dismissal_decorator.js +3 -3
  100. package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -1
  101. package/dist/overlay/popper/context_popper.js +11 -10
  102. package/dist/overlay/popper/context_popper.js.map +1 -1
  103. package/dist/overlay/popper/element_popper.js +11 -10
  104. package/dist/overlay/popper/element_popper.js.map +1 -1
  105. package/dist/overlay/popper/legacy/popper.js +28 -27
  106. package/dist/overlay/popper/legacy/popper.js.map +1 -1
  107. package/dist/overlay/popper/preview_popper.js +11 -10
  108. package/dist/overlay/popper/preview_popper.js.map +1 -1
  109. package/dist/overlay/tethered/tethered.js +11 -10
  110. package/dist/overlay/tethered/tethered.js.map +1 -1
  111. package/dist/resizable.css +1 -1
  112. package/dist/resizable.module-ur5FBfxo.js +5 -0
  113. package/dist/resizable.module-ur5FBfxo.js.map +1 -0
  114. package/dist/resize_handle.css +1 -1
  115. package/dist/stacks/box/box.d.ts +14 -0
  116. package/dist/stacks/box/box.d.ts.map +1 -1
  117. package/dist/stacks/box/box.js +98 -99
  118. package/dist/stacks/box/box.js.map +1 -1
  119. package/dist/stacks/box/end_resize_handle.js +5 -5
  120. package/dist/stacks/box/end_resize_handle.js.map +1 -1
  121. package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
  122. package/dist/stacks/box/resize_handlers.js +12 -12
  123. package/dist/stacks/box/resize_handlers.js.map +1 -1
  124. package/dist/stacks/box/start_resize_handle.js +7 -7
  125. package/dist/stacks/box/start_resize_handle.js.map +1 -1
  126. package/dist/stacks/box/types.d.ts +3 -2
  127. package/dist/stacks/box/types.d.ts.map +1 -1
  128. package/dist/stacks/h_collapsible_box.js +14 -13
  129. package/dist/stacks/h_collapsible_box.js.map +1 -1
  130. package/dist/stacks/v_collapsible_box.js +14 -13
  131. package/dist/stacks/v_collapsible_box.js.map +1 -1
  132. package/dist/surfaces/alert/alert.js +7 -8
  133. package/dist/surfaces/alert/alert.js.map +1 -1
  134. package/dist/themes/stories/button_showcase.d.ts.map +1 -1
  135. package/dist/themes/stories/controls_fieldset.d.ts.map +1 -1
  136. package/dist/themes/stories/menu_showcase.d.ts.map +1 -1
  137. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  138. package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
  139. package/dist/themes/themes/ergo/ergo_theme.js +336 -294
  140. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  141. package/dist/themes/themes/ergo/parts/actions.css +1 -0
  142. package/dist/themes/themes/ergo/parts/base.css +1 -0
  143. package/dist/themes/themes/ergo/parts/form.css +1 -0
  144. package/dist/themes/themes/ergo/parts/inputs.css +1 -0
  145. package/dist/themes/themes/ergo/parts/navigation.css +1 -0
  146. package/dist/themes/themes/windows_98/windows_98.css +1 -1
  147. package/dist/themes/themes/windows_98/windows_98_theme.js +32 -43
  148. package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
  149. package/dist/utils/decorators/clone_with_decorator.d.ts +21 -0
  150. package/dist/utils/decorators/clone_with_decorator.d.ts.map +1 -0
  151. package/dist/utils/decorators/clone_with_decorator.js +16 -0
  152. package/dist/utils/decorators/clone_with_decorator.js.map +1 -0
  153. package/dist/utils/decorators/draggable/context.d.ts.map +1 -0
  154. package/dist/utils/decorators/draggable/context.js.map +1 -0
  155. package/dist/utils/{dnd/handle.d.ts → decorators/draggable/drag_handle.d.ts} +1 -1
  156. package/dist/utils/decorators/draggable/drag_handle.d.ts.map +1 -0
  157. package/dist/utils/{dnd/handle.js → decorators/draggable/drag_handle.js} +2 -2
  158. package/dist/utils/decorators/draggable/drag_handle.js.map +1 -0
  159. package/dist/utils/decorators/draggable/draggable.d.ts.map +1 -0
  160. package/dist/utils/{dnd → decorators}/draggable/draggable.js +3 -3
  161. package/dist/utils/decorators/draggable/draggable.js.map +1 -0
  162. package/dist/utils/decorators/draggable/index.d.ts +11 -0
  163. package/dist/utils/decorators/draggable/index.d.ts.map +1 -0
  164. package/dist/utils/decorators/draggable/index.js +14 -0
  165. package/dist/utils/{dnd → decorators/draggable}/types.d.ts +1 -1
  166. package/dist/utils/decorators/draggable/types.d.ts.map +1 -0
  167. package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.d.ts +2 -2
  168. package/dist/utils/decorators/draggable/use_drag_container.d.ts.map +1 -0
  169. package/dist/utils/decorators/draggable/use_drag_container.js.map +1 -0
  170. package/dist/utils/decorators/draggable/use_draggable.d.ts.map +1 -0
  171. package/dist/utils/decorators/draggable/use_draggable.js.map +1 -0
  172. package/dist/utils/decorators/index.d.ts +3 -0
  173. package/dist/utils/decorators/index.d.ts.map +1 -0
  174. package/dist/utils/decorators/index.js +27 -0
  175. package/dist/utils/decorators/index.js.map +1 -0
  176. package/dist/utils/decorators/resizable/context.d.ts.map +1 -0
  177. package/dist/utils/{resize → decorators/resizable}/context.js +1 -1
  178. package/dist/utils/decorators/resizable/context.js.map +1 -0
  179. package/dist/utils/decorators/resizable/handle_config.d.ts.map +1 -0
  180. package/dist/utils/decorators/resizable/handle_config.js +62 -0
  181. package/dist/utils/decorators/resizable/handle_config.js.map +1 -0
  182. package/dist/utils/decorators/resizable/index.d.ts.map +1 -0
  183. package/dist/utils/decorators/resizable/index.js.map +1 -0
  184. package/dist/utils/decorators/resizable/resizable.d.ts.map +1 -0
  185. package/dist/utils/{resize → decorators/resizable}/resizable.js +2 -2
  186. package/dist/utils/decorators/resizable/resizable.js.map +1 -0
  187. package/dist/utils/decorators/resizable/resize_handle.d.ts.map +1 -0
  188. package/dist/utils/{resize → decorators/resizable}/resize_handle.js +2 -2
  189. package/dist/utils/decorators/resizable/resize_handle.js.map +1 -0
  190. package/dist/utils/{resize → decorators/resizable}/resize_strategy.d.ts +1 -1
  191. package/dist/utils/decorators/resizable/resize_strategy.d.ts.map +1 -0
  192. package/dist/utils/decorators/resizable/resize_strategy.js.map +1 -0
  193. package/dist/utils/{resize → decorators/resizable}/types.d.ts +2 -2
  194. package/dist/utils/decorators/resizable/types.d.ts.map +1 -0
  195. package/dist/utils/hooks/labelled_by_context.d.ts +21 -0
  196. package/dist/utils/hooks/labelled_by_context.d.ts.map +1 -0
  197. package/dist/utils/hooks/labelled_by_context.js +12 -0
  198. package/dist/utils/hooks/labelled_by_context.js.map +1 -0
  199. package/dist/utils/index.d.ts +8 -8
  200. package/dist/utils/index.d.ts.map +1 -1
  201. package/dist/utils/index.js +44 -40
  202. package/dist/utils/index.js.map +1 -1
  203. package/dist/utils/listeners/click_away_listener.d.ts.map +1 -0
  204. package/dist/utils/{click_away_listener.js → listeners/click_away_listener.js} +1 -1
  205. package/dist/utils/listeners/click_away_listener.js.map +1 -0
  206. package/dist/utils/listeners/focus_redirect.d.ts.map +1 -0
  207. package/dist/utils/listeners/focus_redirect.js.map +1 -0
  208. package/dist/utils/listeners/index.d.ts +4 -0
  209. package/dist/utils/listeners/index.d.ts.map +1 -0
  210. package/dist/utils/listeners/index.js +10 -0
  211. package/dist/utils/listeners/index.js.map +1 -0
  212. package/dist/utils/listeners/mouse_leave_region.d.ts.map +1 -0
  213. package/dist/utils/listeners/mouse_leave_region.js.map +1 -0
  214. package/dist/utils/listeners/scroll_away_listener.d.ts.map +1 -0
  215. package/dist/utils/{scroll_away_listener.js → listeners/scroll_away_listener.js} +1 -1
  216. package/dist/utils/listeners/scroll_away_listener.js.map +1 -0
  217. package/dist/utils/system/index.d.ts +2 -0
  218. package/dist/utils/system/index.d.ts.map +1 -0
  219. package/dist/utils/system/index.js +2 -0
  220. package/dist/utils/system/index.js.map +1 -0
  221. package/dist/utils/system/variations.d.ts.map +1 -0
  222. package/dist/utils/system/variations.js +2 -0
  223. package/dist/utils/system/variations.js.map +1 -0
  224. package/dist/utils/types/sides.d.ts +3 -0
  225. package/dist/utils/types/sides.d.ts.map +1 -0
  226. package/package.json +7 -9
  227. package/src/actions/button/__stories__/button_group.stories.tsx +23 -24
  228. package/src/actions/index.ts +0 -1
  229. package/src/form/field/field.stories.tsx +2 -2
  230. package/src/form/field/h_field/h_field.stories.tsx +1 -1
  231. package/src/form/field/v_field/v_field.stories.tsx +1 -1
  232. package/src/form/field_set/field_set.module.css +0 -14
  233. package/src/form/field_set/field_set.stories.tsx +101 -1
  234. package/src/form/field_set/field_set.tsx +43 -57
  235. package/src/form/field_set/legend.tsx +44 -0
  236. package/src/form/index.ts +6 -1
  237. package/src/inputs/date_picker/date_picker_header.tsx +7 -5
  238. package/src/inputs/date_picker/date_picker_year_selector.tsx +5 -5
  239. package/src/inputs/multiselect/multiselect_inline_values.tsx +4 -3
  240. package/src/inputs/multiselect/multiselect_values.module.css +1 -0
  241. package/src/inputs/multiselect/multiselect_values.tsx +4 -4
  242. package/src/overlay/frame/frame.stories.tsx +2 -1
  243. package/src/overlay/frame/frame.tsx +68 -20
  244. package/src/overlay/popper/base/dismissal_decorator.tsx +3 -3
  245. package/src/overlay/popper/legacy/popper.stories.tsx +9 -2
  246. package/src/overlay/slide/slide.stories.tsx +1 -1
  247. package/src/stacks/box/box.tsx +29 -4
  248. package/src/stacks/box/end_resize_handle.tsx +1 -1
  249. package/src/stacks/box/resize_handlers.ts +1 -1
  250. package/src/stacks/box/start_resize_handle.tsx +1 -1
  251. package/src/stacks/box/types.ts +3 -2
  252. package/src/stacks/collapsible_box.stories.tsx +5 -5
  253. package/src/stacks/demo.stories.tsx +7 -7
  254. package/src/surfaces/page/page.stories.tsx +4 -4
  255. package/src/surfaces/window/window.stories.tsx +1 -1
  256. package/src/themes/stories/button_showcase.tsx +3 -1
  257. package/src/themes/stories/controls_fieldset.tsx +3 -1
  258. package/src/themes/stories/menu_showcase.tsx +3 -1
  259. package/src/themes/themes/ergo/INTERACTIVE.md +89 -0
  260. package/src/themes/themes/ergo/ROADMAP.md +116 -0
  261. package/src/themes/themes/ergo/ergo_theme.css +22 -717
  262. package/src/themes/themes/ergo/ergo_theme.ts +15 -1
  263. package/src/themes/themes/ergo/parts/actions.css +287 -0
  264. package/src/themes/themes/ergo/parts/base.css +62 -0
  265. package/src/themes/themes/ergo/parts/form.css +23 -0
  266. package/src/themes/themes/ergo/parts/inputs.css +252 -0
  267. package/src/themes/themes/ergo/parts/navigation.css +104 -0
  268. package/src/themes/themes/windows_98/windows_98.css +32 -43
  269. package/src/tokens/chip/chip.stories.tsx +5 -5
  270. package/src/utils/decorators/DECORATOR_PATTERN.md +86 -0
  271. package/src/utils/decorators/clone_with_decorator.ts +47 -0
  272. package/src/utils/{dnd → decorators/draggable}/__stories__/draggable.stories.tsx +7 -7
  273. package/src/utils/{dnd → decorators/draggable}/__stories__/use_draggable.stories.tsx +2 -2
  274. package/src/utils/{dnd/handle.tsx → decorators/draggable/drag_handle.tsx} +1 -1
  275. package/src/utils/{dnd → decorators}/draggable/draggable.tsx +2 -2
  276. package/src/utils/decorators/draggable/index.ts +15 -0
  277. package/src/utils/{dnd → decorators/draggable}/types.ts +1 -1
  278. package/src/utils/{dnd/hooks → decorators/draggable}/use_drag_container.ts +2 -2
  279. package/src/utils/decorators/index.ts +2 -0
  280. package/src/utils/{resize → decorators/resizable}/__stories__/resizable.stories.tsx +23 -23
  281. package/src/utils/{resize → decorators/resizable}/__tests__/handle_config.test.ts +19 -97
  282. package/src/utils/{resize → decorators/resizable}/__tests__/resize_strategy.test.ts +20 -20
  283. package/src/utils/{resize → decorators/resizable}/context.ts +1 -1
  284. package/src/utils/{resize → decorators/resizable}/handle_config.ts +7 -31
  285. package/src/utils/{resize → decorators/resizable}/resizable.tsx +1 -1
  286. package/src/utils/{resize → decorators/resizable}/resize_handle.module.css +1 -41
  287. package/src/utils/{resize → decorators/resizable}/resize_handle.tsx +1 -1
  288. package/src/utils/{resize → decorators/resizable}/resize_strategy.ts +1 -1
  289. package/src/utils/{resize → decorators/resizable}/types.ts +1 -7
  290. package/src/utils/hooks/labelled_by_context.ts +27 -0
  291. package/src/utils/index.ts +8 -8
  292. package/src/utils/{click_away_listener.tsx → listeners/click_away_listener.tsx} +1 -1
  293. package/src/utils/listeners/index.ts +3 -0
  294. package/src/utils/{scroll_away_listener.tsx → listeners/scroll_away_listener.tsx} +1 -1
  295. package/src/utils/system/index.ts +1 -0
  296. package/src/utils/types/sides.ts +2 -0
  297. package/dist/actions/button/slim_button/slim_button.d.ts +0 -9
  298. package/dist/actions/button/slim_button/slim_button.d.ts.map +0 -1
  299. package/dist/actions/button/slim_button/slim_button.js +0 -18
  300. package/dist/actions/button/slim_button/slim_button.js.map +0 -1
  301. package/dist/draggable.module-BgelQsuJ.js +0 -5
  302. package/dist/draggable.module-BgelQsuJ.js.map +0 -1
  303. package/dist/frame.css +0 -1
  304. package/dist/left_resize_handle.css +0 -1
  305. package/dist/resizable.module-I6iyBAvM.js +0 -5
  306. package/dist/resizable.module-I6iyBAvM.js.map +0 -1
  307. package/dist/right_resize_handle.css +0 -1
  308. package/dist/slim_button.css +0 -1
  309. package/dist/stacks/box/left_resize_handle.d.ts +0 -4
  310. package/dist/stacks/box/left_resize_handle.d.ts.map +0 -1
  311. package/dist/stacks/box/left_resize_handle.js +0 -36
  312. package/dist/stacks/box/left_resize_handle.js.map +0 -1
  313. package/dist/stacks/box/right_resize_handle.d.ts +0 -4
  314. package/dist/stacks/box/right_resize_handle.d.ts.map +0 -1
  315. package/dist/stacks/box/right_resize_handle.js +0 -36
  316. package/dist/stacks/box/right_resize_handle.js.map +0 -1
  317. package/dist/utils/click_away_listener.d.ts.map +0 -1
  318. package/dist/utils/click_away_listener.js.map +0 -1
  319. package/dist/utils/dnd/context.d.ts.map +0 -1
  320. package/dist/utils/dnd/context.js.map +0 -1
  321. package/dist/utils/dnd/draggable/draggable.d.ts.map +0 -1
  322. package/dist/utils/dnd/draggable/draggable.js.map +0 -1
  323. package/dist/utils/dnd/handle.d.ts.map +0 -1
  324. package/dist/utils/dnd/handle.js.map +0 -1
  325. package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +0 -1
  326. package/dist/utils/dnd/hooks/use_drag_container.js.map +0 -1
  327. package/dist/utils/dnd/hooks/use_draggable.d.ts.map +0 -1
  328. package/dist/utils/dnd/hooks/use_draggable.js.map +0 -1
  329. package/dist/utils/dnd/types.d.ts.map +0 -1
  330. package/dist/utils/focus_redirect.d.ts.map +0 -1
  331. package/dist/utils/focus_redirect.js.map +0 -1
  332. package/dist/utils/mouse_leave_region.d.ts.map +0 -1
  333. package/dist/utils/mouse_leave_region.js.map +0 -1
  334. package/dist/utils/resize/context.d.ts.map +0 -1
  335. package/dist/utils/resize/context.js.map +0 -1
  336. package/dist/utils/resize/handle_config.d.ts.map +0 -1
  337. package/dist/utils/resize/handle_config.js +0 -85
  338. package/dist/utils/resize/handle_config.js.map +0 -1
  339. package/dist/utils/resize/index.d.ts.map +0 -1
  340. package/dist/utils/resize/resizable.d.ts.map +0 -1
  341. package/dist/utils/resize/resizable.js.map +0 -1
  342. package/dist/utils/resize/resize_handle.d.ts.map +0 -1
  343. package/dist/utils/resize/resize_handle.js.map +0 -1
  344. package/dist/utils/resize/resize_strategy.d.ts.map +0 -1
  345. package/dist/utils/resize/resize_strategy.js.map +0 -1
  346. package/dist/utils/resize/types.d.ts.map +0 -1
  347. package/dist/utils/scroll_away_listener.d.ts.map +0 -1
  348. package/dist/utils/scroll_away_listener.js.map +0 -1
  349. package/dist/utils/types/variations.d.ts.map +0 -1
  350. package/src/actions/button/__stories__/slim_button.stories.tsx +0 -274
  351. package/src/actions/button/slim_button/slim_button.module.css +0 -9
  352. package/src/actions/button/slim_button/slim_button.tsx +0 -26
  353. package/src/overlay/frame/frame.module.css +0 -5
  354. package/src/stacks/box/left_resize_handle.module.css +0 -12
  355. package/src/stacks/box/left_resize_handle.tsx +0 -39
  356. package/src/stacks/box/right_resize_handle.module.css +0 -12
  357. package/src/stacks/box/right_resize_handle.tsx +0 -38
  358. /package/dist/utils/{dnd → decorators/draggable}/context.d.ts +0 -0
  359. /package/dist/utils/{dnd → decorators/draggable}/context.js +0 -0
  360. /package/dist/utils/{dnd → decorators}/draggable/draggable.d.ts +0 -0
  361. /package/dist/utils/{resize → decorators/draggable}/index.js.map +0 -0
  362. /package/dist/utils/{dnd → decorators/draggable}/types.js +0 -0
  363. /package/dist/utils/{dnd → decorators/draggable}/types.js.map +0 -0
  364. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.js +0 -0
  365. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.d.ts +0 -0
  366. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.js +0 -0
  367. /package/dist/utils/{resize → decorators/resizable}/context.d.ts +0 -0
  368. /package/dist/utils/{resize → decorators/resizable}/handle_config.d.ts +0 -0
  369. /package/dist/utils/{resize → decorators/resizable}/index.d.ts +0 -0
  370. /package/dist/utils/{resize → decorators/resizable}/index.js +0 -0
  371. /package/dist/utils/{resize → decorators/resizable}/resizable.d.ts +0 -0
  372. /package/dist/utils/{resize → decorators/resizable}/resize_handle.d.ts +0 -0
  373. /package/dist/utils/{resize → decorators/resizable}/resize_strategy.js +0 -0
  374. /package/dist/utils/{resize → decorators/resizable}/types.js +0 -0
  375. /package/dist/utils/{resize → decorators/resizable}/types.js.map +0 -0
  376. /package/dist/utils/{click_away_listener.d.ts → listeners/click_away_listener.d.ts} +0 -0
  377. /package/dist/utils/{focus_redirect.d.ts → listeners/focus_redirect.d.ts} +0 -0
  378. /package/dist/utils/{focus_redirect.js → listeners/focus_redirect.js} +0 -0
  379. /package/dist/utils/{mouse_leave_region.d.ts → listeners/mouse_leave_region.d.ts} +0 -0
  380. /package/dist/utils/{mouse_leave_region.js → listeners/mouse_leave_region.js} +0 -0
  381. /package/dist/utils/{scroll_away_listener.d.ts → listeners/scroll_away_listener.d.ts} +0 -0
  382. /package/dist/utils/{types → system}/variations.d.ts +0 -0
  383. /package/src/utils/{dnd → decorators/draggable}/__stories__/draggable_stories.module.css +0 -0
  384. /package/src/utils/{dnd → decorators/draggable}/context.ts +0 -0
  385. /package/src/utils/{dnd → decorators}/draggable/draggable.module.css +0 -0
  386. /package/src/utils/{dnd/hooks → decorators/draggable}/use_draggable.ts +0 -0
  387. /package/src/utils/{resize → decorators/resizable}/__stories__/resizable_stories.module.css +0 -0
  388. /package/src/utils/{resize → decorators/resizable}/index.ts +0 -0
  389. /package/src/utils/{resize → decorators/resizable}/resizable.module.css +0 -0
  390. /package/src/utils/{click_away_listener.stories.tsx → listeners/click_away_listener.stories.tsx} +0 -0
  391. /package/src/utils/{focus_redirect.tsx → listeners/focus_redirect.tsx} +0 -0
  392. /package/src/utils/{mouse_leave_region.tsx → listeners/mouse_leave_region.tsx} +0 -0
  393. /package/src/utils/{scroll_away_listener.stories.tsx → listeners/scroll_away_listener.stories.tsx} +0 -0
  394. /package/src/utils/{types → system}/variations.ts +0 -0
@@ -1,274 +0,0 @@
1
- import React from 'react';
2
- import { Meta, StoryObj } from '@storybook/react-vite';
3
- import { CrossIcon } from '@tcn/icons/cross_icon.js';
4
- import { theme } from '../../../themes/index.js';
5
- import { HStack } from '../../../stacks/h_stack.js';
6
- import { ZStack } from '../../../stacks/z_stack.js';
7
- import { ButtonProps } from '../button/button.js';
8
- import { SlimButton } from '../slim_button/slim_button.js';
9
-
10
- const meta: Meta<ButtonProps> = {
11
- title: 'Actions/Slim Button',
12
- component: SlimButton,
13
- tags: ['autodocs'],
14
- args: {
15
- hierarchy: 'secondary',
16
- disabled: false,
17
- size: 'md',
18
- },
19
- argTypes: {
20
- hierarchy: {
21
- control: 'select',
22
- options: ['primary', 'secondary', 'tertiary'],
23
- },
24
- color: { control: 'color' },
25
- minWidth: { control: 'text' },
26
- width: { control: 'text' },
27
- maxWidth: { control: 'text' },
28
- minHeight: { control: 'text' },
29
- height: { control: 'text' },
30
- maxHeight: { control: 'text' },
31
- size: { control: 'select', options: ['sm', 'md', 'lg'] },
32
- },
33
- };
34
-
35
- export default meta;
36
-
37
- type Story = StoryObj<ButtonProps>;
38
-
39
- // Default Button
40
- export const Default: Story = {
41
- args: {
42
- hierarchy: 'primary',
43
- children: <CrossIcon />,
44
- },
45
- decorators: [
46
- Story => (
47
- <ZStack>
48
- <Story />
49
- </ZStack>
50
- ),
51
- ],
52
- };
53
-
54
- export const Primary: Story = {
55
- args: {
56
- hierarchy: 'primary',
57
- children: <CrossIcon />,
58
- },
59
- decorators: [
60
- Story => (
61
- <ZStack>
62
- <Story />
63
- </ZStack>
64
- ),
65
- ],
66
- };
67
-
68
- export const Secondary: Story = {
69
- args: {
70
- hierarchy: 'secondary',
71
- children: <CrossIcon />,
72
- },
73
- decorators: [
74
- Story => (
75
- <ZStack>
76
- <Story />
77
- </ZStack>
78
- ),
79
- ],
80
- };
81
-
82
- export const Tertiary: Story = {
83
- args: {
84
- hierarchy: 'tertiary',
85
- children: <CrossIcon />,
86
- },
87
- decorators: [
88
- Story => (
89
- <ZStack>
90
- <Story />
91
- </ZStack>
92
- ),
93
- ],
94
- };
95
-
96
- // Disabled States
97
- export const Disabled: Story = {
98
- args: {
99
- disabled: true,
100
- children: <CrossIcon />,
101
- },
102
- decorators: [
103
- Story => (
104
- <ZStack>
105
- <Story />
106
- </ZStack>
107
- ),
108
- ],
109
- };
110
-
111
- // Custom Dimensions
112
- export const CustomDimensions: Story = {
113
- args: {
114
- minWidth: '120px',
115
- minHeight: '50px',
116
- width: '150px',
117
- height: '60px',
118
- children: <CrossIcon />,
119
- },
120
- decorators: [
121
- Story => (
122
- <ZStack>
123
- <Story />
124
- </ZStack>
125
- ),
126
- ],
127
- };
128
-
129
- // Dynamic Styles
130
- export const DynamicStyles: Story = {
131
- args: {
132
- color: '#00fa3a',
133
- children: <CrossIcon />,
134
- },
135
- decorators: [
136
- Story => (
137
- <ZStack>
138
- <Story />
139
- </ZStack>
140
- ),
141
- ],
142
- };
143
-
144
- // Dynamic Styles via Variables
145
- export const ButtonCSSVariables: Story = {
146
- args: {
147
- children: <CrossIcon />,
148
- },
149
- argTypes: {
150
- className: {
151
- control: 'select',
152
- options: ['action-primary', 'action-secondary', 'action-tertiary'],
153
- },
154
- },
155
- decorators: [
156
- Story => (
157
- <ZStack>
158
- <Story />
159
- </ZStack>
160
- ),
161
- ],
162
- };
163
-
164
- export const DarkBackground: Story = {
165
- args: {
166
- children: <CrossIcon />,
167
- },
168
- argTypes: {
169
- className: {
170
- control: 'select',
171
- options: ['action-primary', 'action-secondary', 'action-tertiary'],
172
- },
173
- },
174
- decorators: [
175
- Story => (
176
- <ZStack>
177
- <Story />
178
- </ZStack>
179
- ),
180
- ],
181
- };
182
-
183
- export const Small: Story = {
184
- args: {
185
- size: 'sm',
186
- children: <CrossIcon />,
187
- },
188
- decorators: [
189
- Story => (
190
- <ZStack>
191
- <Story />
192
- </ZStack>
193
- ),
194
- ],
195
- };
196
-
197
- export const Medium: Story = {
198
- args: {
199
- size: 'md',
200
- children: <CrossIcon />,
201
- },
202
- decorators: [
203
- Story => (
204
- <ZStack>
205
- <Story />
206
- </ZStack>
207
- ),
208
- ],
209
- };
210
-
211
- export const Large: Story = {
212
- args: {
213
- size: 'lg',
214
- children: <CrossIcon />,
215
- },
216
- decorators: [
217
- Story => (
218
- <ZStack>
219
- <Story />
220
- </ZStack>
221
- ),
222
- ],
223
- };
224
-
225
- // Size Comparison
226
- export const SizeComparison: Story = {
227
- render: () => (
228
- <HStack hAlign="center" gap={theme.padding.md}>
229
- <SlimButton size="sm" hierarchy="primary">
230
- <CrossIcon />
231
- </SlimButton>
232
- <SlimButton size="md" hierarchy="primary">
233
- <CrossIcon />
234
- </SlimButton>
235
- <SlimButton size="lg" hierarchy="primary">
236
- <CrossIcon />
237
- </SlimButton>
238
- </HStack>
239
- ),
240
- };
241
-
242
- // Size Comparison with Secondary Hierarchy
243
- export const SizeComparisonSecondary: Story = {
244
- render: () => (
245
- <HStack hAlign="center" gap={theme.padding.md}>
246
- <SlimButton size="sm" hierarchy="secondary">
247
- <CrossIcon />
248
- </SlimButton>
249
- <SlimButton size="md" hierarchy="secondary">
250
- <CrossIcon />
251
- </SlimButton>
252
- <SlimButton size="lg" hierarchy="secondary">
253
- <CrossIcon />
254
- </SlimButton>
255
- </HStack>
256
- ),
257
- };
258
-
259
- // Size Comparison with Tertiary Hierarchy
260
- export const SizeComparisonTertiary: Story = {
261
- render: () => (
262
- <HStack hAlign="center" gap={theme.padding.md}>
263
- <SlimButton size="sm" hierarchy="tertiary">
264
- <CrossIcon />
265
- </SlimButton>
266
- <SlimButton size="md" hierarchy="tertiary">
267
- <CrossIcon />
268
- </SlimButton>
269
- <SlimButton size="lg" hierarchy="tertiary">
270
- <CrossIcon />
271
- </SlimButton>
272
- </HStack>
273
- ),
274
- };
@@ -1,9 +0,0 @@
1
- @layer tcn-system {
2
- :where(.slim-button) {
3
- min-height: auto;
4
- }
5
-
6
- :where(.slim-button[data-is-disabled="true"]) {
7
- pointer-events: none;
8
- }
9
- }
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { Button, ButtonProps } from '../button/button.js';
3
- import { clsx } from 'clsx';
4
- // Styles
5
- import styles from './slim_button.module.css';
6
-
7
- /**
8
- * @deprecated - use Button instead (utility=true)
9
- * @param props - ButtonProps
10
- * @returns SlimButton
11
- */
12
- export const SlimButton = React.forwardRef<
13
- HTMLButtonElement,
14
- Omit<ButtonProps, 'utility'>
15
- >(({ children, className, ...props }, ref) => {
16
- return (
17
- <Button
18
- ref={ref}
19
- className={clsx(styles['slim-button'], 'tcn-slim-button', className)}
20
- utility={true}
21
- {...props}
22
- >
23
- {children}
24
- </Button>
25
- );
26
- });
@@ -1,5 +0,0 @@
1
- @layer tcn-system {
2
- :where(.frame-dialog) {
3
- overflow: hidden;
4
- }
5
- }
@@ -1,12 +0,0 @@
1
- @layer tcn-system {
2
- :where(.left-resize-handle) {
3
- position: fixed;
4
- bottom: 0;
5
- left: var(--resize-offset, -8px);
6
- height: 100%;
7
- width: 16px;
8
- z-index: 1;
9
- cursor: ew-resize;
10
- pointer-events: auto;
11
- }
12
- }
@@ -1,39 +0,0 @@
1
- import { clsx } from 'clsx';
2
- import styles from './left_resize_handle.module.css';
3
- import { createHorizontalResizeHandler } from './resize_handlers.js';
4
- import type { HorizontalResizeHandleProps } from './types.js';
5
-
6
- export type LeftResizeHandleProps = HorizontalResizeHandleProps;
7
-
8
- export function LeftResizeHandle({
9
- targetRef,
10
- handleProps,
11
- onWidthResize,
12
- onWidthResizeEnd,
13
- }: LeftResizeHandleProps) {
14
- const resizeHandler = createHorizontalResizeHandler(
15
- targetRef,
16
- onWidthResize,
17
- onWidthResizeEnd,
18
- 'left',
19
- true,
20
- true
21
- );
22
- const offset = handleProps?.offset ? handleProps.offset : -8;
23
-
24
- const leftResizeHandleStyle: any = {
25
- ...handleProps?.style,
26
- '--resize-offset': `${offset}px`,
27
- width: handleProps?.size || '16px',
28
- };
29
-
30
- return (
31
- <div
32
- className={clsx(styles['left-resize-handle'], 'tcn-left-resize-handle')}
33
- onMouseDown={resizeHandler}
34
- style={leftResizeHandleStyle}
35
- >
36
- {handleProps?.children}
37
- </div>
38
- );
39
- }
@@ -1,12 +0,0 @@
1
- @layer tcn-system {
2
- :where(.right-resize-handle) {
3
- position: fixed;
4
- bottom: 0;
5
- right: var(--resize-offset, -8px);
6
- height: 100%;
7
- width: 16px;
8
- z-index: 1;
9
- cursor: ew-resize;
10
- pointer-events: auto;
11
- }
12
- }
@@ -1,38 +0,0 @@
1
- import { clsx } from 'clsx';
2
- import { createHorizontalResizeHandler } from './resize_handlers.js';
3
- import styles from './right_resize_handle.module.css';
4
- import type { HorizontalResizeHandleProps } from './types.js';
5
-
6
- export type RightResizeHandleProps = HorizontalResizeHandleProps;
7
- export function RightResizeHandle({
8
- targetRef,
9
- handleProps,
10
- onWidthResize,
11
- onWidthResizeEnd,
12
- }: RightResizeHandleProps) {
13
- const resizeHandler = createHorizontalResizeHandler(
14
- targetRef,
15
- onWidthResize,
16
- onWidthResizeEnd,
17
- 'right',
18
- false,
19
- true
20
- );
21
- const offset = handleProps?.offset ? handleProps.offset : -8;
22
-
23
- const rightResizeHandleStyle: any = {
24
- ...handleProps?.style,
25
- '--resize-offset': `${offset}px`,
26
- width: handleProps?.size || '16px',
27
- };
28
-
29
- return (
30
- <div
31
- className={clsx(styles['right-resize-handle'], 'tcn-right-resize-handle')}
32
- onMouseDown={resizeHandler}
33
- style={rightResizeHandleStyle}
34
- >
35
- {handleProps?.children}
36
- </div>
37
- );
38
- }
File without changes
File without changes