@tcn/ui 0.17.0 → 0.18.0

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 (376) hide show
  1. package/dist/actions/index.d.ts +0 -1
  2. package/dist/actions/index.d.ts.map +1 -1
  3. package/dist/actions/index.js +6 -8
  4. package/dist/actions/index.js.map +1 -1
  5. package/dist/draggable.css +1 -1
  6. package/dist/draggable.module-DFYR5n3n.js +5 -0
  7. package/dist/draggable.module-DFYR5n3n.js.map +1 -0
  8. package/dist/field_set.css +1 -1
  9. package/dist/field_set.module-BpJTFCi4.js +5 -0
  10. package/dist/field_set.module-BpJTFCi4.js.map +1 -0
  11. package/dist/form/field/field.js +11 -10
  12. package/dist/form/field/field.js.map +1 -1
  13. package/dist/form/field_set/field_set.d.ts +6 -10
  14. package/dist/form/field_set/field_set.d.ts.map +1 -1
  15. package/dist/form/field_set/field_set.js +33 -61
  16. package/dist/form/field_set/field_set.js.map +1 -1
  17. package/dist/form/field_set/legend.d.ts +20 -0
  18. package/dist/form/field_set/legend.d.ts.map +1 -0
  19. package/dist/form/field_set/legend.js +28 -0
  20. package/dist/form/field_set/legend.js.map +1 -0
  21. package/dist/form/index.d.ts +2 -1
  22. package/dist/form/index.d.ts.map +1 -1
  23. package/dist/form/index.js +24 -22
  24. package/dist/form/index.js.map +1 -1
  25. package/dist/inputs/color_input/color_input.js +2 -3
  26. package/dist/inputs/color_input/color_input.js.map +1 -1
  27. package/dist/inputs/color_input/color_picker.js +11 -10
  28. package/dist/inputs/color_input/color_picker.js.map +1 -1
  29. package/dist/inputs/combo_box/combo_box.js +11 -10
  30. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  31. package/dist/inputs/date_picker/date_picker.js +11 -10
  32. package/dist/inputs/date_picker/date_picker.js.map +1 -1
  33. package/dist/inputs/date_picker/date_picker_header.d.ts.map +1 -1
  34. package/dist/inputs/date_picker/date_picker_header.js +15 -14
  35. package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
  36. package/dist/inputs/date_picker/date_picker_input.js +9 -9
  37. package/dist/inputs/date_picker/date_picker_time_selector.js +2 -3
  38. package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
  39. package/dist/inputs/date_picker/date_picker_year_input.js +2 -3
  40. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  41. package/dist/inputs/date_picker/date_picker_year_selector.js +22 -22
  42. package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
  43. package/dist/inputs/mask_input/key_capture_input.js +21 -20
  44. package/dist/inputs/mask_input/key_capture_input.js.map +1 -1
  45. package/dist/inputs/mask_input/mask_input.js +18 -17
  46. package/dist/inputs/mask_input/mask_input.js.map +1 -1
  47. package/dist/inputs/multiselect/multiselect.js +11 -10
  48. package/dist/inputs/multiselect/multiselect.js.map +1 -1
  49. package/dist/inputs/multiselect/multiselect_inline_values.d.ts.map +1 -1
  50. package/dist/inputs/multiselect/multiselect_inline_values.js +15 -15
  51. package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
  52. package/dist/inputs/multiselect/multiselect_values.js +16 -17
  53. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  54. package/dist/inputs/phone_number_input/phone_number_context.js +13 -12
  55. package/dist/inputs/phone_number_input/phone_number_context.js.map +1 -1
  56. package/dist/inputs/phone_number_input/phone_number_input_adapter.js +2 -3
  57. package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -1
  58. package/dist/inputs/phone_number_input/sip_input.js +8 -9
  59. package/dist/inputs/phone_number_input/sip_input.js.map +1 -1
  60. package/dist/inputs/select/select.js +9 -9
  61. package/dist/inputs/slider/slider.js +21 -20
  62. package/dist/inputs/slider/slider.js.map +1 -1
  63. package/dist/inputs/suggestions/suggestion_list.js +9 -9
  64. package/dist/inputs/switch/switch.js +16 -15
  65. package/dist/inputs/switch/switch.js.map +1 -1
  66. package/dist/inputs/unit_input/unit_input.js +11 -10
  67. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  68. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js +11 -10
  69. package/dist/mobile/inputs/date_picker/mobile_date_picker_header.js.map +1 -1
  70. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js +11 -10
  71. package/dist/mobile/inputs/date_picker/mobile_date_picker_input.js.map +1 -1
  72. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js +11 -10
  73. package/dist/mobile/inputs/date_picker/mobile_date_picker_year_selector.js.map +1 -1
  74. package/dist/multiselect_values.css +1 -1
  75. package/dist/navigation/tabs/state/link/tab_link.js +11 -10
  76. package/dist/navigation/tabs/state/link/tab_link.js.map +1 -1
  77. package/dist/overlay/frame/frame.d.ts.map +1 -1
  78. package/dist/overlay/frame/frame.js +117 -76
  79. package/dist/overlay/frame/frame.js.map +1 -1
  80. package/dist/overlay/menu/menu.js +21 -20
  81. package/dist/overlay/menu/menu.js.map +1 -1
  82. package/dist/overlay/popper/base/dismissal_decorator.js +3 -3
  83. package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -1
  84. package/dist/overlay/popper/context_popper.js +11 -10
  85. package/dist/overlay/popper/context_popper.js.map +1 -1
  86. package/dist/overlay/popper/element_popper.js +11 -10
  87. package/dist/overlay/popper/element_popper.js.map +1 -1
  88. package/dist/overlay/popper/legacy/popper.js +28 -27
  89. package/dist/overlay/popper/legacy/popper.js.map +1 -1
  90. package/dist/overlay/popper/preview_popper.js +11 -10
  91. package/dist/overlay/popper/preview_popper.js.map +1 -1
  92. package/dist/overlay/tethered/tethered.js +11 -10
  93. package/dist/overlay/tethered/tethered.js.map +1 -1
  94. package/dist/resizable.css +1 -1
  95. package/dist/resizable.module-ur5FBfxo.js +5 -0
  96. package/dist/resizable.module-ur5FBfxo.js.map +1 -0
  97. package/dist/resize_handle.css +1 -1
  98. package/dist/stacks/box/box.d.ts +14 -0
  99. package/dist/stacks/box/box.d.ts.map +1 -1
  100. package/dist/stacks/box/box.js +98 -99
  101. package/dist/stacks/box/box.js.map +1 -1
  102. package/dist/stacks/box/end_resize_handle.js +5 -5
  103. package/dist/stacks/box/end_resize_handle.js.map +1 -1
  104. package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
  105. package/dist/stacks/box/resize_handlers.js +12 -12
  106. package/dist/stacks/box/resize_handlers.js.map +1 -1
  107. package/dist/stacks/box/start_resize_handle.js +7 -7
  108. package/dist/stacks/box/start_resize_handle.js.map +1 -1
  109. package/dist/stacks/box/types.d.ts +3 -2
  110. package/dist/stacks/box/types.d.ts.map +1 -1
  111. package/dist/stacks/h_collapsible_box.js +14 -13
  112. package/dist/stacks/h_collapsible_box.js.map +1 -1
  113. package/dist/stacks/v_collapsible_box.js +14 -13
  114. package/dist/stacks/v_collapsible_box.js.map +1 -1
  115. package/dist/surfaces/alert/alert.js +7 -8
  116. package/dist/surfaces/alert/alert.js.map +1 -1
  117. package/dist/themes/stories/button_showcase.d.ts.map +1 -1
  118. package/dist/themes/stories/controls_fieldset.d.ts.map +1 -1
  119. package/dist/themes/stories/menu_showcase.d.ts.map +1 -1
  120. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  121. package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
  122. package/dist/themes/themes/ergo/ergo_theme.js +336 -294
  123. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  124. package/dist/themes/themes/ergo/parts/actions.css +1 -0
  125. package/dist/themes/themes/ergo/parts/base.css +1 -0
  126. package/dist/themes/themes/ergo/parts/form.css +1 -0
  127. package/dist/themes/themes/ergo/parts/inputs.css +1 -0
  128. package/dist/themes/themes/ergo/parts/navigation.css +1 -0
  129. package/dist/themes/themes/windows_98/windows_98.css +1 -1
  130. package/dist/themes/themes/windows_98/windows_98_theme.js +32 -43
  131. package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
  132. package/dist/utils/decorators/clone_with_decorator.d.ts +21 -0
  133. package/dist/utils/decorators/clone_with_decorator.d.ts.map +1 -0
  134. package/dist/utils/decorators/clone_with_decorator.js +16 -0
  135. package/dist/utils/decorators/clone_with_decorator.js.map +1 -0
  136. package/dist/utils/decorators/draggable/context.d.ts.map +1 -0
  137. package/dist/utils/decorators/draggable/context.js.map +1 -0
  138. package/dist/utils/{dnd/handle.d.ts → decorators/draggable/drag_handle.d.ts} +1 -1
  139. package/dist/utils/decorators/draggable/drag_handle.d.ts.map +1 -0
  140. package/dist/utils/{dnd/handle.js → decorators/draggable/drag_handle.js} +2 -2
  141. package/dist/utils/decorators/draggable/drag_handle.js.map +1 -0
  142. package/dist/utils/decorators/draggable/draggable.d.ts.map +1 -0
  143. package/dist/utils/{dnd → decorators}/draggable/draggable.js +3 -3
  144. package/dist/utils/decorators/draggable/draggable.js.map +1 -0
  145. package/dist/utils/decorators/draggable/index.d.ts +11 -0
  146. package/dist/utils/decorators/draggable/index.d.ts.map +1 -0
  147. package/dist/utils/decorators/draggable/index.js +14 -0
  148. package/dist/utils/{dnd → decorators/draggable}/types.d.ts +1 -1
  149. package/dist/utils/decorators/draggable/types.d.ts.map +1 -0
  150. package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.d.ts +2 -2
  151. package/dist/utils/decorators/draggable/use_drag_container.d.ts.map +1 -0
  152. package/dist/utils/decorators/draggable/use_drag_container.js.map +1 -0
  153. package/dist/utils/decorators/draggable/use_draggable.d.ts.map +1 -0
  154. package/dist/utils/decorators/draggable/use_draggable.js.map +1 -0
  155. package/dist/utils/decorators/index.d.ts +3 -0
  156. package/dist/utils/decorators/index.d.ts.map +1 -0
  157. package/dist/utils/decorators/index.js +27 -0
  158. package/dist/utils/decorators/index.js.map +1 -0
  159. package/dist/utils/decorators/resizable/context.d.ts.map +1 -0
  160. package/dist/utils/{resize → decorators/resizable}/context.js +1 -1
  161. package/dist/utils/decorators/resizable/context.js.map +1 -0
  162. package/dist/utils/decorators/resizable/handle_config.d.ts.map +1 -0
  163. package/dist/utils/decorators/resizable/handle_config.js +62 -0
  164. package/dist/utils/decorators/resizable/handle_config.js.map +1 -0
  165. package/dist/utils/decorators/resizable/index.d.ts.map +1 -0
  166. package/dist/utils/decorators/resizable/index.js.map +1 -0
  167. package/dist/utils/decorators/resizable/resizable.d.ts.map +1 -0
  168. package/dist/utils/{resize → decorators/resizable}/resizable.js +2 -2
  169. package/dist/utils/decorators/resizable/resizable.js.map +1 -0
  170. package/dist/utils/decorators/resizable/resize_handle.d.ts.map +1 -0
  171. package/dist/utils/{resize → decorators/resizable}/resize_handle.js +2 -2
  172. package/dist/utils/decorators/resizable/resize_handle.js.map +1 -0
  173. package/dist/utils/{resize → decorators/resizable}/resize_strategy.d.ts +1 -1
  174. package/dist/utils/decorators/resizable/resize_strategy.d.ts.map +1 -0
  175. package/dist/utils/decorators/resizable/resize_strategy.js.map +1 -0
  176. package/dist/utils/{resize → decorators/resizable}/types.d.ts +2 -2
  177. package/dist/utils/decorators/resizable/types.d.ts.map +1 -0
  178. package/dist/utils/hooks/labelled_by_context.d.ts +21 -0
  179. package/dist/utils/hooks/labelled_by_context.d.ts.map +1 -0
  180. package/dist/utils/hooks/labelled_by_context.js +12 -0
  181. package/dist/utils/hooks/labelled_by_context.js.map +1 -0
  182. package/dist/utils/index.d.ts +8 -8
  183. package/dist/utils/index.d.ts.map +1 -1
  184. package/dist/utils/index.js +44 -40
  185. package/dist/utils/index.js.map +1 -1
  186. package/dist/utils/listeners/click_away_listener.d.ts.map +1 -0
  187. package/dist/utils/{click_away_listener.js → listeners/click_away_listener.js} +1 -1
  188. package/dist/utils/listeners/click_away_listener.js.map +1 -0
  189. package/dist/utils/listeners/focus_redirect.d.ts.map +1 -0
  190. package/dist/utils/listeners/focus_redirect.js.map +1 -0
  191. package/dist/utils/listeners/index.d.ts +4 -0
  192. package/dist/utils/listeners/index.d.ts.map +1 -0
  193. package/dist/utils/listeners/index.js +10 -0
  194. package/dist/utils/listeners/index.js.map +1 -0
  195. package/dist/utils/listeners/mouse_leave_region.d.ts.map +1 -0
  196. package/dist/utils/listeners/mouse_leave_region.js.map +1 -0
  197. package/dist/utils/listeners/scroll_away_listener.d.ts.map +1 -0
  198. package/dist/utils/{scroll_away_listener.js → listeners/scroll_away_listener.js} +1 -1
  199. package/dist/utils/listeners/scroll_away_listener.js.map +1 -0
  200. package/dist/utils/system/index.d.ts +2 -0
  201. package/dist/utils/system/index.d.ts.map +1 -0
  202. package/dist/utils/system/index.js +2 -0
  203. package/dist/utils/system/index.js.map +1 -0
  204. package/dist/utils/system/variations.d.ts.map +1 -0
  205. package/dist/utils/system/variations.js +2 -0
  206. package/dist/utils/system/variations.js.map +1 -0
  207. package/dist/utils/types/sides.d.ts +3 -0
  208. package/dist/utils/types/sides.d.ts.map +1 -0
  209. package/package.json +2 -8
  210. package/src/actions/button/__stories__/button_group.stories.tsx +23 -24
  211. package/src/actions/index.ts +0 -1
  212. package/src/form/field/field.stories.tsx +2 -2
  213. package/src/form/field/h_field/h_field.stories.tsx +1 -1
  214. package/src/form/field/v_field/v_field.stories.tsx +1 -1
  215. package/src/form/field_set/field_set.module.css +0 -14
  216. package/src/form/field_set/field_set.stories.tsx +101 -1
  217. package/src/form/field_set/field_set.tsx +43 -57
  218. package/src/form/field_set/legend.tsx +44 -0
  219. package/src/form/index.ts +6 -1
  220. package/src/inputs/date_picker/date_picker_header.tsx +7 -5
  221. package/src/inputs/date_picker/date_picker_year_selector.tsx +5 -5
  222. package/src/inputs/multiselect/multiselect_inline_values.tsx +4 -3
  223. package/src/inputs/multiselect/multiselect_values.module.css +1 -0
  224. package/src/inputs/multiselect/multiselect_values.tsx +4 -4
  225. package/src/overlay/frame/frame.stories.tsx +2 -1
  226. package/src/overlay/frame/frame.tsx +68 -20
  227. package/src/overlay/popper/base/dismissal_decorator.tsx +3 -3
  228. package/src/overlay/slide/slide.stories.tsx +1 -1
  229. package/src/stacks/box/box.tsx +29 -4
  230. package/src/stacks/box/end_resize_handle.tsx +1 -1
  231. package/src/stacks/box/resize_handlers.ts +1 -1
  232. package/src/stacks/box/start_resize_handle.tsx +1 -1
  233. package/src/stacks/box/types.ts +3 -2
  234. package/src/stacks/collapsible_box.stories.tsx +5 -5
  235. package/src/stacks/demo.stories.tsx +7 -7
  236. package/src/surfaces/page/page.stories.tsx +4 -4
  237. package/src/surfaces/window/window.stories.tsx +1 -1
  238. package/src/themes/stories/button_showcase.tsx +3 -1
  239. package/src/themes/stories/controls_fieldset.tsx +3 -1
  240. package/src/themes/stories/menu_showcase.tsx +3 -1
  241. package/src/themes/themes/ergo/INTERACTIVE.md +89 -0
  242. package/src/themes/themes/ergo/ROADMAP.md +116 -0
  243. package/src/themes/themes/ergo/ergo_theme.css +22 -717
  244. package/src/themes/themes/ergo/ergo_theme.ts +15 -1
  245. package/src/themes/themes/ergo/parts/actions.css +287 -0
  246. package/src/themes/themes/ergo/parts/base.css +62 -0
  247. package/src/themes/themes/ergo/parts/form.css +23 -0
  248. package/src/themes/themes/ergo/parts/inputs.css +252 -0
  249. package/src/themes/themes/ergo/parts/navigation.css +104 -0
  250. package/src/themes/themes/windows_98/windows_98.css +32 -43
  251. package/src/tokens/chip/chip.stories.tsx +5 -5
  252. package/src/utils/decorators/DECORATOR_PATTERN.md +86 -0
  253. package/src/utils/decorators/clone_with_decorator.ts +47 -0
  254. package/src/utils/{dnd → decorators/draggable}/__stories__/draggable.stories.tsx +7 -7
  255. package/src/utils/{dnd → decorators/draggable}/__stories__/use_draggable.stories.tsx +2 -2
  256. package/src/utils/{dnd/handle.tsx → decorators/draggable/drag_handle.tsx} +1 -1
  257. package/src/utils/{dnd → decorators}/draggable/draggable.tsx +2 -2
  258. package/src/utils/decorators/draggable/index.ts +15 -0
  259. package/src/utils/{dnd → decorators/draggable}/types.ts +1 -1
  260. package/src/utils/{dnd/hooks → decorators/draggable}/use_drag_container.ts +2 -2
  261. package/src/utils/decorators/index.ts +2 -0
  262. package/src/utils/{resize → decorators/resizable}/__stories__/resizable.stories.tsx +23 -23
  263. package/src/utils/{resize → decorators/resizable}/__tests__/handle_config.test.ts +19 -97
  264. package/src/utils/{resize → decorators/resizable}/__tests__/resize_strategy.test.ts +20 -20
  265. package/src/utils/{resize → decorators/resizable}/context.ts +1 -1
  266. package/src/utils/{resize → decorators/resizable}/handle_config.ts +7 -31
  267. package/src/utils/{resize → decorators/resizable}/resizable.tsx +1 -1
  268. package/src/utils/{resize → decorators/resizable}/resize_handle.module.css +1 -41
  269. package/src/utils/{resize → decorators/resizable}/resize_handle.tsx +1 -1
  270. package/src/utils/{resize → decorators/resizable}/resize_strategy.ts +1 -1
  271. package/src/utils/{resize → decorators/resizable}/types.ts +1 -7
  272. package/src/utils/hooks/labelled_by_context.ts +27 -0
  273. package/src/utils/index.ts +8 -8
  274. package/src/utils/{click_away_listener.tsx → listeners/click_away_listener.tsx} +1 -1
  275. package/src/utils/listeners/index.ts +3 -0
  276. package/src/utils/{scroll_away_listener.tsx → listeners/scroll_away_listener.tsx} +1 -1
  277. package/src/utils/system/index.ts +1 -0
  278. package/src/utils/types/sides.ts +2 -0
  279. package/dist/actions/button/slim_button/slim_button.d.ts +0 -9
  280. package/dist/actions/button/slim_button/slim_button.d.ts.map +0 -1
  281. package/dist/actions/button/slim_button/slim_button.js +0 -18
  282. package/dist/actions/button/slim_button/slim_button.js.map +0 -1
  283. package/dist/draggable.module-BgelQsuJ.js +0 -5
  284. package/dist/draggable.module-BgelQsuJ.js.map +0 -1
  285. package/dist/frame.css +0 -1
  286. package/dist/left_resize_handle.css +0 -1
  287. package/dist/resizable.module-I6iyBAvM.js +0 -5
  288. package/dist/resizable.module-I6iyBAvM.js.map +0 -1
  289. package/dist/right_resize_handle.css +0 -1
  290. package/dist/slim_button.css +0 -1
  291. package/dist/stacks/box/left_resize_handle.d.ts +0 -4
  292. package/dist/stacks/box/left_resize_handle.d.ts.map +0 -1
  293. package/dist/stacks/box/left_resize_handle.js +0 -36
  294. package/dist/stacks/box/left_resize_handle.js.map +0 -1
  295. package/dist/stacks/box/right_resize_handle.d.ts +0 -4
  296. package/dist/stacks/box/right_resize_handle.d.ts.map +0 -1
  297. package/dist/stacks/box/right_resize_handle.js +0 -36
  298. package/dist/stacks/box/right_resize_handle.js.map +0 -1
  299. package/dist/utils/click_away_listener.d.ts.map +0 -1
  300. package/dist/utils/click_away_listener.js.map +0 -1
  301. package/dist/utils/dnd/context.d.ts.map +0 -1
  302. package/dist/utils/dnd/context.js.map +0 -1
  303. package/dist/utils/dnd/draggable/draggable.d.ts.map +0 -1
  304. package/dist/utils/dnd/draggable/draggable.js.map +0 -1
  305. package/dist/utils/dnd/handle.d.ts.map +0 -1
  306. package/dist/utils/dnd/handle.js.map +0 -1
  307. package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +0 -1
  308. package/dist/utils/dnd/hooks/use_drag_container.js.map +0 -1
  309. package/dist/utils/dnd/hooks/use_draggable.d.ts.map +0 -1
  310. package/dist/utils/dnd/hooks/use_draggable.js.map +0 -1
  311. package/dist/utils/dnd/types.d.ts.map +0 -1
  312. package/dist/utils/focus_redirect.d.ts.map +0 -1
  313. package/dist/utils/focus_redirect.js.map +0 -1
  314. package/dist/utils/mouse_leave_region.d.ts.map +0 -1
  315. package/dist/utils/mouse_leave_region.js.map +0 -1
  316. package/dist/utils/resize/context.d.ts.map +0 -1
  317. package/dist/utils/resize/context.js.map +0 -1
  318. package/dist/utils/resize/handle_config.d.ts.map +0 -1
  319. package/dist/utils/resize/handle_config.js +0 -85
  320. package/dist/utils/resize/handle_config.js.map +0 -1
  321. package/dist/utils/resize/index.d.ts.map +0 -1
  322. package/dist/utils/resize/resizable.d.ts.map +0 -1
  323. package/dist/utils/resize/resizable.js.map +0 -1
  324. package/dist/utils/resize/resize_handle.d.ts.map +0 -1
  325. package/dist/utils/resize/resize_handle.js.map +0 -1
  326. package/dist/utils/resize/resize_strategy.d.ts.map +0 -1
  327. package/dist/utils/resize/resize_strategy.js.map +0 -1
  328. package/dist/utils/resize/types.d.ts.map +0 -1
  329. package/dist/utils/scroll_away_listener.d.ts.map +0 -1
  330. package/dist/utils/scroll_away_listener.js.map +0 -1
  331. package/dist/utils/types/variations.d.ts.map +0 -1
  332. package/src/actions/button/__stories__/slim_button.stories.tsx +0 -274
  333. package/src/actions/button/slim_button/slim_button.module.css +0 -9
  334. package/src/actions/button/slim_button/slim_button.tsx +0 -26
  335. package/src/overlay/frame/frame.module.css +0 -5
  336. package/src/stacks/box/left_resize_handle.module.css +0 -12
  337. package/src/stacks/box/left_resize_handle.tsx +0 -39
  338. package/src/stacks/box/right_resize_handle.module.css +0 -12
  339. package/src/stacks/box/right_resize_handle.tsx +0 -38
  340. /package/dist/utils/{dnd → decorators/draggable}/context.d.ts +0 -0
  341. /package/dist/utils/{dnd → decorators/draggable}/context.js +0 -0
  342. /package/dist/utils/{dnd → decorators}/draggable/draggable.d.ts +0 -0
  343. /package/dist/utils/{resize → decorators/draggable}/index.js.map +0 -0
  344. /package/dist/utils/{dnd → decorators/draggable}/types.js +0 -0
  345. /package/dist/utils/{dnd → decorators/draggable}/types.js.map +0 -0
  346. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_drag_container.js +0 -0
  347. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.d.ts +0 -0
  348. /package/dist/utils/{dnd/hooks → decorators/draggable}/use_draggable.js +0 -0
  349. /package/dist/utils/{resize → decorators/resizable}/context.d.ts +0 -0
  350. /package/dist/utils/{resize → decorators/resizable}/handle_config.d.ts +0 -0
  351. /package/dist/utils/{resize → decorators/resizable}/index.d.ts +0 -0
  352. /package/dist/utils/{resize → decorators/resizable}/index.js +0 -0
  353. /package/dist/utils/{resize → decorators/resizable}/resizable.d.ts +0 -0
  354. /package/dist/utils/{resize → decorators/resizable}/resize_handle.d.ts +0 -0
  355. /package/dist/utils/{resize → decorators/resizable}/resize_strategy.js +0 -0
  356. /package/dist/utils/{resize → decorators/resizable}/types.js +0 -0
  357. /package/dist/utils/{resize → decorators/resizable}/types.js.map +0 -0
  358. /package/dist/utils/{click_away_listener.d.ts → listeners/click_away_listener.d.ts} +0 -0
  359. /package/dist/utils/{focus_redirect.d.ts → listeners/focus_redirect.d.ts} +0 -0
  360. /package/dist/utils/{focus_redirect.js → listeners/focus_redirect.js} +0 -0
  361. /package/dist/utils/{mouse_leave_region.d.ts → listeners/mouse_leave_region.d.ts} +0 -0
  362. /package/dist/utils/{mouse_leave_region.js → listeners/mouse_leave_region.js} +0 -0
  363. /package/dist/utils/{scroll_away_listener.d.ts → listeners/scroll_away_listener.d.ts} +0 -0
  364. /package/dist/utils/{types → system}/variations.d.ts +0 -0
  365. /package/src/utils/{dnd → decorators/draggable}/__stories__/draggable_stories.module.css +0 -0
  366. /package/src/utils/{dnd → decorators/draggable}/context.ts +0 -0
  367. /package/src/utils/{dnd → decorators}/draggable/draggable.module.css +0 -0
  368. /package/src/utils/{dnd/hooks → decorators/draggable}/use_draggable.ts +0 -0
  369. /package/src/utils/{resize → decorators/resizable}/__stories__/resizable_stories.module.css +0 -0
  370. /package/src/utils/{resize → decorators/resizable}/index.ts +0 -0
  371. /package/src/utils/{resize → decorators/resizable}/resizable.module.css +0 -0
  372. /package/src/utils/{click_away_listener.stories.tsx → listeners/click_away_listener.stories.tsx} +0 -0
  373. /package/src/utils/{focus_redirect.tsx → listeners/focus_redirect.tsx} +0 -0
  374. /package/src/utils/{mouse_leave_region.tsx → listeners/mouse_leave_region.tsx} +0 -0
  375. /package/src/utils/{scroll_away_listener.stories.tsx → listeners/scroll_away_listener.stories.tsx} +0 -0
  376. /package/src/utils/{types → system}/variations.ts +0 -0
@@ -1,6 +1,5 @@
1
1
  export { BaseButton, type BaseButtonProps, } from './button/base_button/base_button.js';
2
2
  export { ButtonGroup, type ButtonGroupProps, } from './button/button_group/button_group.js';
3
- export { SlimButton } from './button/slim_button/slim_button.js';
4
3
  export { Button, type ButtonProps } from './button/button/button.js';
5
4
  export { Toggle, type ToggleProps } from './toggle/toggle.js';
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,13 +1,11 @@
1
1
  import { BaseButton as r } from "./button/base_button/base_button.js";
2
- import { ButtonGroup as m } from "./button/button_group/button_group.js";
3
- import { SlimButton as f } from "./button/slim_button/slim_button.js";
4
- import { Button as x } from "./button/button/button.js";
5
- import { Toggle as n } from "./toggle/toggle.js";
2
+ import { ButtonGroup as p } from "./button/button_group/button_group.js";
3
+ import { Button as m } from "./button/button/button.js";
4
+ import { Toggle as x } from "./toggle/toggle.js";
6
5
  export {
7
6
  r as BaseButton,
8
- x as Button,
9
- m as ButtonGroup,
10
- f as SlimButton,
11
- n as Toggle
7
+ m as Button,
8
+ p as ButtonGroup,
9
+ x as Toggle
12
10
  };
13
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +1 @@
1
- @layer tcn-system{:where(._draggable_db40376){position:relative}:where(._draggable_db40376[data-is-draggable=true]){left:var(--position-x);top:var(--position-y)}}
1
+ @layer tcn-system{:where(._draggable_7fb032d){position:relative}:where(._draggable_7fb032d[data-is-draggable=true]){left:var(--position-x);top:var(--position-y)}}
@@ -0,0 +1,5 @@
1
+ import './draggable.css';const s = "_draggable_7fb032d", a = { draggable: s };
2
+ export {
3
+ a as s
4
+ };
5
+ //# sourceMappingURL=draggable.module-DFYR5n3n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draggable.module-DFYR5n3n.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1 @@
1
- @layer tcn-system{:where(._field-set_8e981d9){position:relative;border-radius:4px}:where(._field-set_8e981d9){gap:4px}:where(._field-set_8e981d9>._field-set-body_4cd3139){background:#fff;width:100%;max-width:100%;border-radius:4px;gap:8px;padding:8px}}
1
+ @layer tcn-system{:where(._field-set_8e981d9){position:relative}}
@@ -0,0 +1,5 @@
1
+ import './field_set.css';const e = "_field-set_8e981d9", s = { "field-set": e };
2
+ export {
3
+ s
4
+ };
5
+ //# sourceMappingURL=field_set.module-BpJTFCi4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field_set.module-BpJTFCi4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -2,24 +2,25 @@ import { jsx as t, Fragment as d } from "react/jsx-runtime";
2
2
  import a, { useState as c } from "react";
3
3
  import { HField as u } from "./h_field/h_field.js";
4
4
  import { VField as F } from "./v_field/v_field.js";
5
- import "../../utils/click_away_listener.js";
6
- import "../../utils/focus_redirect.js";
7
- import "../../utils/scroll_away_listener.js";
5
+ import "../../utils/listeners/click_away_listener.js";
6
+ import "../../utils/listeners/focus_redirect.js";
7
+ import "../../utils/listeners/scroll_away_listener.js";
8
8
  import { useForkRef as R } from "../../utils/hooks/use_fork_ref.js";
9
9
  import { useResizeObserver as l } from "../../utils/hooks/use_resize_observer.js";
10
- import "../../utils/dnd/context.js";
10
+ import "../../utils/hooks/labelled_by_context.js";
11
+ import "../../utils/decorators/draggable/context.js";
11
12
  import "clsx";
12
- import "../../draggable.module-BgelQsuJ.js";
13
- import "../../utils/resize/context.js";
14
- import "../../resizable.module-I6iyBAvM.js";
15
- import "../../utils/resize/resize_handle.js";
16
- const h = a.forwardRef(function({ children: e, breakpointPixels: i = 500, ...r }, m) {
13
+ import "../../draggable.module-DFYR5n3n.js";
14
+ import "../../utils/decorators/resizable/context.js";
15
+ import "../../resizable.module-ur5FBfxo.js";
16
+ import "../../utils/decorators/resizable/resize_handle.js";
17
+ const q = a.forwardRef(function({ children: e, breakpointPixels: i = 500, ...r }, m) {
17
18
  const [f, n] = c(!0), p = l((s) => {
18
19
  n(s >= i);
19
20
  }), o = R(m, p);
20
21
  return /* @__PURE__ */ t(d, { children: f ? /* @__PURE__ */ t(u, { ...r, ref: o, ...r, children: e }) : /* @__PURE__ */ t(F, { ...r, ref: o, ...r, children: e }) });
21
22
  });
22
23
  export {
23
- h as Field
24
+ q as Field
24
25
  };
25
26
  //# sourceMappingURL=field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../../src/form/field/field.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { FieldInput } from './common/types.js';\nimport { HField } from './h_field/h_field.js';\nimport { VField } from './v_field/v_field.js';\nimport { useForkRef, useResizeObserver } from '../../utils/index.js';\nimport type { StackStyleProps } from '../../stacks/types/styles.js';\n\nexport interface FieldProps extends FieldInput, StackStyleProps {\n children: React.ReactNode;\n breakpointPixels?: number;\n labelWidth?: string;\n}\n\nexport const Field = React.forwardRef(function Field(\n { children, breakpointPixels = 500, ...props }: FieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [isWideContainer, setIsWideContainer] = useState(true);\n const containerRef = useResizeObserver(newWidth => {\n setIsWideContainer(newWidth >= breakpointPixels);\n });\n const forkedRef = useForkRef(ref, containerRef);\n\n return (\n <>\n {isWideContainer ? (\n <HField {...props} ref={forkedRef} {...props}>\n {children}\n </HField>\n ) : (\n <VField {...props} ref={forkedRef} {...props}>\n {children}\n </VField>\n )}\n </>\n );\n});\n"],"names":["Field","React","children","breakpointPixels","props","ref","isWideContainer","setIsWideContainer","useState","containerRef","useResizeObserver","newWidth","forkedRef","useForkRef","jsx","Fragment","HField","VField"],"mappings":";;;;;;;;;;;;;;;AAaO,MAAMA,IAAQC,EAAM,WAAW,SACpC,EAAE,UAAAC,GAAU,kBAAAC,IAAmB,KAAK,GAAGC,EAAA,GACvCC,GACA;AACA,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAI,GACrDC,IAAeC,EAAkB,CAAAC,MAAY;AACjD,IAAAJ,EAAmBI,KAAYR,CAAgB;AAAA,EACjD,CAAC,GACKS,IAAYC,EAAWR,GAAKI,CAAY;AAE9C,SACE,gBAAAK,EAAAC,GAAA,EACG,cACC,gBAAAD,EAACE,GAAA,EAAQ,GAAGZ,GAAO,KAAKQ,GAAY,GAAGR,GACpC,UAAAF,GACH,IAEA,gBAAAY,EAACG,KAAQ,GAAGb,GAAO,KAAKQ,GAAY,GAAGR,GACpC,UAAAF,EAAA,CACH,EAAA,CAEJ;AAEJ,CAAC;"}
1
+ {"version":3,"file":"field.js","sources":["../../../src/form/field/field.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { FieldInput } from './common/types.js';\nimport { HField } from './h_field/h_field.js';\nimport { VField } from './v_field/v_field.js';\nimport { useForkRef, useResizeObserver } from '../../utils/index.js';\nimport type { StackStyleProps } from '../../stacks/types/styles.js';\n\nexport interface FieldProps extends FieldInput, StackStyleProps {\n children: React.ReactNode;\n breakpointPixels?: number;\n labelWidth?: string;\n}\n\nexport const Field = React.forwardRef(function Field(\n { children, breakpointPixels = 500, ...props }: FieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [isWideContainer, setIsWideContainer] = useState(true);\n const containerRef = useResizeObserver(newWidth => {\n setIsWideContainer(newWidth >= breakpointPixels);\n });\n const forkedRef = useForkRef(ref, containerRef);\n\n return (\n <>\n {isWideContainer ? (\n <HField {...props} ref={forkedRef} {...props}>\n {children}\n </HField>\n ) : (\n <VField {...props} ref={forkedRef} {...props}>\n {children}\n </VField>\n )}\n </>\n );\n});\n"],"names":["Field","React","children","breakpointPixels","props","ref","isWideContainer","setIsWideContainer","useState","containerRef","useResizeObserver","newWidth","forkedRef","useForkRef","jsx","Fragment","HField","VField"],"mappings":";;;;;;;;;;;;;;;;AAaO,MAAMA,IAAQC,EAAM,WAAW,SACpC,EAAE,UAAAC,GAAU,kBAAAC,IAAmB,KAAK,GAAGC,EAAA,GACvCC,GACA;AACA,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAI,GACrDC,IAAeC,EAAkB,CAAAC,MAAY;AACjD,IAAAJ,EAAmBI,KAAYR,CAAgB;AAAA,EACjD,CAAC,GACKS,IAAYC,EAAWR,GAAKI,CAAY;AAE9C,SACE,gBAAAK,EAAAC,GAAA,EACG,cACC,gBAAAD,EAACE,GAAA,EAAQ,GAAGZ,GAAO,KAAKQ,GAAY,GAAGR,GACpC,UAAAF,GACH,IAEA,gBAAAY,EAACG,KAAQ,GAAGb,GAAO,KAAKQ,GAAY,GAAGR,GACpC,UAAAF,EAAA,CACH,EAAA,CAEJ;AAEJ,CAAC;"}
@@ -1,13 +1,9 @@
1
1
  import { VStackProps } from '../../stacks/v_stack.js';
2
- import { default as React } from 'react';
3
- export type FieldSetProps = VStackProps<HTMLFieldSetElement> & {
4
- legend?: string;
5
- startAdornments?: React.ReactNode;
6
- endAdornments?: React.ReactNode;
2
+ import { default as React, FieldsetHTMLAttributes } from 'react';
3
+ export type FieldSetOwnProps = {
4
+ disabled?: boolean;
5
+ name?: string;
7
6
  };
8
- export declare const FieldSet: React.ForwardRefExoticComponent<VStackProps<HTMLFieldSetElement> & {
9
- legend?: string;
10
- startAdornments?: React.ReactNode;
11
- endAdornments?: React.ReactNode;
12
- } & React.RefAttributes<HTMLFieldSetElement>>;
7
+ export type FieldSetProps = VStackProps<HTMLFieldSetElement> & FieldSetOwnProps & FieldsetHTMLAttributes<HTMLFieldSetElement>;
8
+ export declare const FieldSet: React.ForwardRefExoticComponent<VStackProps<HTMLFieldSetElement> & FieldSetOwnProps & React.FieldsetHTMLAttributes<HTMLFieldSetElement> & React.RefAttributes<HTMLFieldSetElement>>;
13
9
  //# sourceMappingURL=field_set.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"field_set.d.ts","sourceRoot":"","sources":["../../../src/form/field_set/field_set.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,mBAAmB,CAAC,GAAG;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,QAAQ;aALV,MAAM;sBACG,KAAK,CAAC,SAAS;oBACjB,KAAK,CAAC,SAAS;6CAoD/B,CAAC"}
1
+ {"version":3,"file":"field_set.d.ts","sourceRoot":"","sources":["../../../src/form/field_set/field_set.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,EAAE,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAK3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,mBAAmB,CAAC,GAC1D,gBAAgB,GAChB,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAE9C,eAAO,MAAM,QAAQ,qLAmCpB,CAAC"}
@@ -1,65 +1,37 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { BodyText as h } from "../../typography/body_text/body_text.js";
3
- import "../../typography/callout/callout.js";
4
- import "../../typography/caption/caption.js";
5
- import "../../typography/footnote/footnote.js";
6
- import "../../typography/headline/headline.js";
7
- import "../../typography/subheadline/subheadline.js";
8
- import "../../typography/title/title.js";
9
- import { HStack as y } from "../../stacks/h_stack.js";
10
- import { Spacer as c } from "../../stacks/spacer.js";
1
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
11
2
  import { VStack as f } from "../../stacks/v_stack.js";
12
- import { clsx as i } from "clsx";
13
- import b, { useMemo as x } from "react";
14
- import '../../field_set.css';const S = "_field-set_8e981d9", g = "_field-set-body_4cd3139", m = { "field-set": S, "field-set-body": g };
15
- let u = 0;
16
- const $ = b.forwardRef(function({
17
- legend: l,
18
- startAdornments: d,
19
- endAdornments: o,
20
- className: a,
21
- children: n,
22
- ...t
23
- }, p) {
24
- const s = `field-set-${x(() => u++, [])}`;
25
- return /* @__PURE__ */ r(
26
- f,
27
- {
28
- as: "fieldset",
29
- "aria-labelledby": s,
30
- ref: p,
31
- className: i(m["field-set"], a, "tcn-field-set"),
32
- ...t,
33
- children: [
34
- l && /* @__PURE__ */ r(
35
- y,
36
- {
37
- id: s,
38
- className: i("tcn-legend", "tcn-field-set-legend"),
39
- hAlign: "start",
40
- height: t.height,
41
- children: [
42
- d,
43
- d && /* @__PURE__ */ e(c, { width: "8px" }),
44
- /* @__PURE__ */ e(h, { className: "tcn-field-set-legend-text", size: "lg", children: l }),
45
- o && /* @__PURE__ */ e(c, {}),
46
- o
47
- ]
48
- }
49
- ),
50
- /* @__PURE__ */ e(
51
- f,
52
- {
53
- className: i("tcn-field-set-body", m["tcn-field-set-body"]),
54
- ...t,
55
- children: n
56
- }
57
- )
58
- ]
59
- }
60
- );
61
- });
3
+ import { clsx as m } from "clsx";
4
+ import b from "react";
5
+ import { useLabelledById as c, LabelledByContext as n } from "../../utils/hooks/labelled_by_context.js";
6
+ import { s as u } from "../../field_set.module-BpJTFCi4.js";
7
+ const B = b.forwardRef(
8
+ function({
9
+ className: r,
10
+ id: e,
11
+ children: d,
12
+ "aria-labelledby": s,
13
+ ...l
14
+ }, i) {
15
+ const { labelId: t } = c(e, s);
16
+ return /* @__PURE__ */ a(n.Provider, { value: { labelId: t }, children: /* @__PURE__ */ o(
17
+ f,
18
+ {
19
+ as: "fieldset",
20
+ "aria-labelledby": t,
21
+ ref: i,
22
+ id: e,
23
+ "data-is-disabled": l.disabled ? "true" : "false",
24
+ className: m(u["field-set"], r, "tcn-field-set"),
25
+ ...l,
26
+ children: [
27
+ d,
28
+ /* @__PURE__ */ a("fieldset", { disabled: !0 })
29
+ ]
30
+ }
31
+ ) });
32
+ }
33
+ );
62
34
  export {
63
- $ as FieldSet
35
+ B as FieldSet
64
36
  };
65
37
  //# sourceMappingURL=field_set.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field_set.js","sources":["../../../src/form/field_set/field_set.tsx"],"sourcesContent":["import { BodyText } from '../../typography/index.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Spacer } from '../../stacks/spacer.js';\nimport { VStack } from '../../stacks/v_stack.js';\nimport type { VStackProps } from '../../stacks/v_stack.js';\nimport { clsx } from 'clsx';\nimport React, { useMemo } from 'react';\nimport styles from './field_set.module.css';\n\nlet fieldsetIdCount = 0;\n\nexport type FieldSetProps = VStackProps<HTMLFieldSetElement> & {\n legend?: string;\n startAdornments?: React.ReactNode;\n endAdornments?: React.ReactNode;\n};\n\nexport const FieldSet = React.forwardRef(function FieldSet(\n {\n legend,\n startAdornments,\n endAdornments,\n className,\n children,\n ...props\n }: FieldSetProps,\n ref: React.Ref<HTMLFieldSetElement>\n) {\n const id = useMemo(() => {\n return fieldsetIdCount++;\n }, []);\n\n const labelId = `field-set-${id}`;\n\n return (\n <VStack\n as=\"fieldset\"\n aria-labelledby={labelId}\n ref={ref}\n className={clsx(styles['field-set'], className, 'tcn-field-set')}\n {...props}\n >\n {legend && (\n <HStack\n id={labelId}\n className={clsx('tcn-legend', 'tcn-field-set-legend')}\n hAlign=\"start\"\n height={props.height}\n >\n {startAdornments}\n {startAdornments && <Spacer width=\"8px\" />}\n <BodyText className=\"tcn-field-set-legend-text\" size=\"lg\">\n {legend}\n </BodyText>\n {endAdornments && <Spacer />}\n {endAdornments}\n </HStack>\n )}\n <VStack\n className={clsx('tcn-field-set-body', styles['tcn-field-set-body'])}\n {...props}\n >\n {children}\n </VStack>\n </VStack>\n );\n});\n"],"names":["fieldsetIdCount","FieldSet","React","legend","startAdornments","endAdornments","className","children","props","ref","labelId","useMemo","jsxs","VStack","clsx","styles","HStack","jsx","Spacer","BodyText"],"mappings":";;;;;;;;;;;;;;AASA,IAAIA,IAAkB;AAQf,MAAMC,IAAWC,EAAM,WAAW,SACvC;AAAA,EACE,QAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AAKA,QAAMC,IAAU,aAJLC,EAAQ,MACVX,KACN,CAAA,CAAE,CAE0B;AAE/B,SACE,gBAAAY;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,mBAAiBH;AAAA,MACjB,KAAAD;AAAA,MACA,WAAWK,EAAKC,EAAO,WAAW,GAAGT,GAAW,eAAe;AAAA,MAC9D,GAAGE;AAAA,MAEH,UAAA;AAAA,QAAAL,KACC,gBAAAS;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,IAAIN;AAAA,YACJ,WAAWI,EAAK,cAAc,sBAAsB;AAAA,YACpD,QAAO;AAAA,YACP,QAAQN,EAAM;AAAA,YAEb,UAAA;AAAA,cAAAJ;AAAA,cACAA,KAAmB,gBAAAa,EAACC,GAAA,EAAO,OAAM,MAAA,CAAM;AAAA,gCACvCC,GAAA,EAAS,WAAU,6BAA4B,MAAK,MAClD,UAAAhB,GACH;AAAA,cACCE,uBAAkBa,GAAA,EAAO;AAAA,cACzBb;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAGL,gBAAAY;AAAA,UAACJ;AAAA,UAAA;AAAA,YACC,WAAWC,EAAK,sBAAsBC,EAAO,oBAAoB,CAAC;AAAA,YACjE,GAAGP;AAAA,YAEH,UAAAD;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"field_set.js","sources":["../../../src/form/field_set/field_set.tsx"],"sourcesContent":["import { VStack } from '../../stacks/v_stack.js';\nimport type { VStackProps } from '../../stacks/v_stack.js';\nimport { clsx } from 'clsx';\nimport React, { type FieldsetHTMLAttributes } from 'react';\nimport { LabelledByContext } from '../../utils/hooks/labelled_by_context.js';\nimport { useLabelledById } from '../../utils/hooks/labelled_by_context.js';\nimport styles from './field_set.module.css';\n\nexport type FieldSetOwnProps = {\n disabled?: boolean;\n name?: string;\n};\n\nexport type FieldSetProps = VStackProps<HTMLFieldSetElement> &\n FieldSetOwnProps &\n FieldsetHTMLAttributes<HTMLFieldSetElement>;\n\nexport const FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\n function FieldSet(\n {\n className,\n id,\n children,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n }: FieldSetProps,\n ref\n ) {\n const { labelId } = useLabelledById(id, ariaLabelledBy);\n\n return (\n <LabelledByContext.Provider value={{ labelId }}>\n <VStack\n as=\"fieldset\"\n aria-labelledby={labelId}\n ref={ref}\n id={id}\n data-is-disabled={props.disabled ? 'true' : 'false'}\n className={clsx(styles['field-set'], className, 'tcn-field-set')}\n {...props}\n >\n {/* TODO: may want to ensure Legend is rendered before rest of children.\n Search over children if a match is found for legend would pop it off the children array\n and manually render it in the correct slot. \n Before doing this however, may want to build Slot and Slottable util to generalize the problem/solution for re-useability. \n */}\n {children}\n <fieldset disabled></fieldset>\n </VStack>\n </LabelledByContext.Provider>\n );\n }\n);\n"],"names":["FieldSet","React","className","id","children","ariaLabelledBy","props","ref","labelId","useLabelledById","LabelledByContext","jsxs","VStack","clsx","styles","jsx"],"mappings":";;;;;;AAiBO,MAAMA,IAAWC,EAAM;AAAA,EAC5B,SACE;AAAA,IACE,WAAAC;AAAA,IACA,IAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAmBC;AAAA,IACnB,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAM,EAAE,SAAAC,EAAA,IAAYC,EAAgBN,GAAIE,CAAc;AAEtD,6BACGK,EAAkB,UAAlB,EAA2B,OAAO,EAAE,SAAAF,KACnC,UAAA,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,mBAAiBJ;AAAA,QACjB,KAAAD;AAAA,QACA,IAAAJ;AAAA,QACA,oBAAkBG,EAAM,WAAW,SAAS;AAAA,QAC5C,WAAWO,EAAKC,EAAO,WAAW,GAAGZ,GAAW,eAAe;AAAA,QAC9D,GAAGI;AAAA,QAOH,UAAA;AAAA,UAAAF;AAAA,UACD,gBAAAW,EAAC,YAAA,EAAS,UAAQ,GAAA,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEvB;AAAA,EAEJ;AACF;"}
@@ -0,0 +1,20 @@
1
+ import { HStackProps } from '../../stacks/h_stack.js';
2
+ export interface LegendOwnProps extends HStackProps {
3
+ id?: string;
4
+ className?: string;
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * Composable legend for FieldSet. Renders as a div (HStack) with
9
+ * aria-labelledby wiring handled automatically via context.
10
+ *
11
+ * String children are automatically wrapped in BodyText with the
12
+ * `tcn-field-set-legend-text` class for consistent theme styling.
13
+ * Non-string children (e.g. icons, custom typography) render as-is.
14
+ *
15
+ * If a custom `id` is provided, it takes precedence over the context value.
16
+ * When overriding `id`, also provide a matching `aria-labelledby` to the
17
+ * parent FieldSet so the association remains correct.
18
+ */
19
+ export declare const Legend: ({ id, children, className, ...props }: LegendOwnProps) => import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=legend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../src/form/field_set/legend.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKnE,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GAAI,uCAAuC,cAAc,4CAmB3E,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { clsx as l } from "clsx";
3
+ import { HStack as p } from "../../stacks/h_stack.js";
4
+ import { BodyText as d } from "../../typography/body_text/body_text.js";
5
+ import "../../typography/callout/callout.js";
6
+ import "../../typography/caption/caption.js";
7
+ import "../../typography/footnote/footnote.js";
8
+ import "../../typography/headline/headline.js";
9
+ import "../../typography/subheadline/subheadline.js";
10
+ import "../../typography/title/title.js";
11
+ import { useLabelledBy as n } from "../../utils/hooks/labelled_by_context.js";
12
+ import { s as c } from "../../field_set.module-BpJTFCi4.js";
13
+ const k = ({ id: o, children: t, className: r, ...m }) => {
14
+ const s = n(), i = o ?? s?.labelId;
15
+ return /* @__PURE__ */ e(
16
+ p,
17
+ {
18
+ id: i,
19
+ className: l(r, c.legend, "tcn-legend", "tcn-field-set-legend"),
20
+ ...m,
21
+ children: typeof t == "string" ? /* @__PURE__ */ e(d, { className: "tcn-field-set-legend-text", size: "lg", children: t }) : t
22
+ }
23
+ );
24
+ };
25
+ export {
26
+ k as Legend
27
+ };
28
+ //# sourceMappingURL=legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legend.js","sources":["../../../src/form/field_set/legend.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { HStack, type HStackProps } from '../../stacks/h_stack.js';\nimport { BodyText } from '../../typography/index.js';\nimport { useLabelledBy } from '../../utils/hooks/labelled_by_context.js';\nimport styles from './field_set.module.css';\n\nexport interface LegendOwnProps extends HStackProps {\n id?: string;\n className?: string;\n children: React.ReactNode;\n}\n\n/**\n * Composable legend for FieldSet. Renders as a div (HStack) with\n * aria-labelledby wiring handled automatically via context.\n *\n * String children are automatically wrapped in BodyText with the\n * `tcn-field-set-legend-text` class for consistent theme styling.\n * Non-string children (e.g. icons, custom typography) render as-is.\n *\n * If a custom `id` is provided, it takes precedence over the context value.\n * When overriding `id`, also provide a matching `aria-labelledby` to the\n * parent FieldSet so the association remains correct.\n */\nexport const Legend = ({ id, children, className, ...props }: LegendOwnProps) => {\n const ctx = useLabelledBy();\n const resolvedId = id ?? ctx?.labelId;\n\n return (\n <HStack\n id={resolvedId}\n className={clsx(className, styles.legend, 'tcn-legend', 'tcn-field-set-legend')}\n {...props}\n >\n {typeof children === 'string' ? (\n <BodyText className=\"tcn-field-set-legend-text\" size=\"lg\">\n {children}\n </BodyText>\n ) : (\n children\n )}\n </HStack>\n );\n};\n"],"names":["Legend","id","children","className","props","ctx","useLabelledBy","resolvedId","jsx","HStack","clsx","styles","BodyText"],"mappings":";;;;;;;;;;;;AAwBO,MAAMA,IAAS,CAAC,EAAE,IAAAC,GAAI,UAAAC,GAAU,WAAAC,GAAW,GAAGC,QAA4B;AAC/E,QAAMC,IAAMC,EAAA,GACNC,IAAaN,KAAMI,GAAK;AAE9B,SACE,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAIF;AAAA,MACJ,WAAWG,EAAKP,GAAWQ,EAAO,QAAQ,cAAc,sBAAsB;AAAA,MAC7E,GAAGP;AAAA,MAEH,UAAA,OAAOF,KAAa,WACnB,gBAAAM,EAACI,GAAA,EAAS,WAAU,6BAA4B,MAAK,MAClD,UAAAV,EAAA,CACH,IAEAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
@@ -10,6 +10,7 @@ export { VField, type VFieldProps, type VFieldOwnProps, } from './field/v_field/
10
10
  export { Field, type FieldProps } from './field/field.js';
11
11
  export { FieldPresenter, type FieldState, type FieldOptions, } from './field_presenters/field_presenter.js';
12
12
  export { OptionsFieldPresenter, type OptionsFieldState, type OptionsFieldOptions, } from './field_presenters/options_field_presenter.js';
13
- export { FieldSet, type FieldSetProps } from './field_set/field_set.js';
13
+ export { FieldSet, type FieldSetProps, type FieldSetOwnProps, } from './field_set/field_set.js';
14
+ export { Legend, type LegendOwnProps } from './field_set/legend.js';
14
15
  export { FormField } from './form_field.js';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,YAAY,GACb,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,gBAAgB,GACjB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,KAAK,wBAAwB,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,YAAY,GACb,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,gBAAgB,GACjB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,KAAK,wBAAwB,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,30 +1,32 @@
1
1
  import { FieldControl as o } from "./field/common/field_control/field_control.js";
2
- import { AdornmentMap as p, FieldStatusInput as i } from "./field/common/status_input/status_input.js";
3
- import { FieldDescription as l } from "./field/common/field_description.js";
4
- import { FieldErrorMessage as F } from "./field/common/field_error.js";
5
- import { FieldHeader as x } from "./field/common/field_header.js";
2
+ import { AdornmentMap as p, FieldStatusInput as d } from "./field/common/status_input/status_input.js";
3
+ import { FieldDescription as m } from "./field/common/field_description.js";
4
+ import { FieldErrorMessage as f } from "./field/common/field_error.js";
5
+ import { FieldHeader as F } from "./field/common/field_header.js";
6
6
  import { FieldLabel as s } from "./field/common/field_label.js";
7
- import { HField as u } from "./field/h_field/h_field.js";
8
- import { VField as M } from "./field/v_field/v_field.js";
9
- import { Field as S } from "./field/field.js";
10
- import { FieldPresenter as c } from "./field_presenters/field_presenter.js";
11
- import { OptionsFieldPresenter as A } from "./field_presenters/options_field_presenter.js";
12
- import { FieldSet as D } from "./field_set/field_set.js";
13
- import { FormField as I } from "./form_field.js";
7
+ import { HField as g } from "./field/h_field/h_field.js";
8
+ import { VField as H } from "./field/v_field/v_field.js";
9
+ import { Field as M } from "./field/field.js";
10
+ import { FieldPresenter as S } from "./field_presenters/field_presenter.js";
11
+ import { OptionsFieldPresenter as c } from "./field_presenters/options_field_presenter.js";
12
+ import { FieldSet as C } from "./field_set/field_set.js";
13
+ import { Legend as E } from "./field_set/legend.js";
14
+ import { FormField as O } from "./form_field.js";
14
15
  export {
15
16
  p as AdornmentMap,
16
- S as Field,
17
+ M as Field,
17
18
  o as FieldControl,
18
- l as FieldDescription,
19
- F as FieldErrorMessage,
20
- x as FieldHeader,
19
+ m as FieldDescription,
20
+ f as FieldErrorMessage,
21
+ F as FieldHeader,
21
22
  s as FieldLabel,
22
- c as FieldPresenter,
23
- D as FieldSet,
24
- i as FieldStatusInput,
25
- I as FormField,
26
- u as HField,
27
- A as OptionsFieldPresenter,
28
- M as VField
23
+ S as FieldPresenter,
24
+ C as FieldSet,
25
+ d as FieldStatusInput,
26
+ O as FormField,
27
+ g as HField,
28
+ E as Legend,
29
+ c as OptionsFieldPresenter,
30
+ H as VField
29
31
  };
30
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -6,7 +6,6 @@ import { clsx as h } from "clsx";
6
6
  import { useState as I, useRef as A, useLayoutEffect as N } from "react";
7
7
  import "../../actions/button/base_button/base_button.js";
8
8
  import "../../actions/button/button_group/button_group.js";
9
- import "../../actions/button/slim_button/slim_button.js";
10
9
  import { Button as P } from "../../actions/button/button/button.js";
11
10
  import "../../actions/toggle/toggle.js";
12
11
  import { ColorPicker as _ } from "./color_picker.js";
@@ -14,7 +13,7 @@ import { Input as B } from "../input/input.js";
14
13
  import { Popper as F } from "../../overlay/popper/legacy/popper.js";
15
14
  import { ControlSet as j } from "../control_set/control_set.js";
16
15
  import '../../color_input.css';const z = "_checker-board_2cc94a9", K = "_color-input-select_abe3066", f = { "checker-board": z, "color-input-select": K };
17
- function v({
16
+ function Z({
18
17
  value: c = "#000",
19
18
  onChange: i,
20
19
  onError: O,
@@ -140,6 +139,6 @@ function v({
140
139
  ] });
141
140
  }
142
141
  export {
143
- v as ColorInput
142
+ Z as ColorInput
144
143
  };
145
144
  //# sourceMappingURL=color_input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color_input.js","sources":["../../../src/inputs/color_input/color_input.tsx"],"sourcesContent":["import { Box } from '../../stacks/box/box.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Spacer } from '../../stacks/spacer.js';\nimport { clsx } from 'clsx';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { HTMLAttributes } from 'react';\nimport { ColorState } from 'react-color';\nimport { Button } from '../../actions/index.js';\nimport { ColorPicker } from './color_picker.js';\nimport { Input } from '../input/input.js';\nimport styles from './color_input.module.css';\n\nimport { Popper } from '../../overlay/popper/legacy/popper.js';\nimport { ControlSet } from '../control_set/control_set.js';\n\nexport interface ColorInputProps\n extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange' | 'onError'> {\n value?: string;\n disabled?: boolean;\n onChange?: (color: string) => void;\n onError?: (error: string | null) => void;\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n hierarchy?: 'primary' | 'secondary' | 'tertiary';\n}\n\nexport function ColorInput({\n value = '#000',\n onChange,\n onError,\n disabled,\n width = '100%',\n maxWidth,\n minWidth,\n hierarchy = 'secondary',\n ...props\n}: ColorInputProps) {\n const [anchorElement, setAnchorElement] = useState<HTMLButtonElement | null>(null);\n const isOpen = anchorElement != null;\n const pickerRef = useRef<HTMLDivElement | null>(null);\n\n function openPicker(e: React.MouseEvent<HTMLButtonElement>) {\n setAnchorElement(e.currentTarget);\n }\n\n function closePicker() {\n setAnchorElement(null);\n }\n\n useLayoutEffect(() => {\n requestAnimationFrame(() => {\n if (anchorElement != null) {\n pickerRef.current && pickerRef.current.focus();\n }\n });\n }, [anchorElement]);\n\n function processKeyInput(event: React.KeyboardEvent) {\n if (event.key === 'Escape') {\n closePicker();\n }\n }\n\n function updateColor(value: ColorState) {\n const rgb = value.rgb;\n let color = value.hex;\n\n if (rgb.a != null) {\n color = `rgba(${rgb.r},${rgb.g},${rgb.b},${rgb.a})`;\n } else {\n color = `rgb(${rgb.r},${rgb.g},${rgb.b})`;\n }\n\n onChange && onChange(color);\n }\n\n return (\n <>\n <ControlSet\n height=\"auto\"\n width={width}\n minWidth={minWidth}\n maxWidth={maxWidth}\n className=\"tcn-color-input-wrapper\"\n {...props}\n >\n <Input\n width=\"flex\"\n disabled={disabled}\n value={value}\n style={{\n borderEndEndRadius: 0,\n borderStartEndRadius: 0,\n textAlign: 'start',\n paddingInlineEnd: '8px',\n }}\n className=\"tcn-color-input\"\n onChange={onChange}\n />\n\n <Button\n disabled={disabled}\n hierarchy={hierarchy}\n onClick={openPicker}\n width=\"70px\"\n maxWidth=\"70px\"\n className={clsx(\n styles['color-input-select'],\n 'tcn-color-input-select',\n 'tcn-select'\n )}\n style={{\n borderStartStartRadius: 0,\n borderEndStartRadius: 0,\n paddingInlineEnd: 0,\n }}\n >\n <HStack height=\"14px\" gap=\"4px\" hAlign=\"start\">\n <Spacer width=\"4px\" />\n <Box\n width=\"flex\"\n height=\"30px\"\n className={clsx(styles['checker-board'], 'tcn-checker-board')}\n style={{ borderRadius: '2px', overflow: 'hidden' }}\n >\n <Box\n height=\"100%\"\n style={{ backgroundColor: value, borderRadius: '2px' }}\n ></Box>\n </Box>\n <Spacer />\n </HStack>\n <Spacer width=\"4px\" />\n </Button>\n </ControlSet>\n <Popper\n anchorElement={anchorElement}\n onClose={closePicker}\n open={isOpen}\n restoreFocus\n horizontalAnchor=\"end\"\n horizontalOrigin=\"end\"\n >\n <ColorPicker\n color={value}\n onKeyDown={processKeyInput}\n onColorChange={updateColor}\n />\n </Popper>\n </>\n );\n}\n"],"names":["ColorInput","value","onChange","onError","disabled","width","maxWidth","minWidth","hierarchy","props","anchorElement","setAnchorElement","useState","isOpen","pickerRef","useRef","openPicker","e","closePicker","useLayoutEffect","processKeyInput","event","updateColor","rgb","color","jsxs","Fragment","ControlSet","jsx","Input","Button","clsx","styles","HStack","Spacer","Box","Popper","ColorPicker"],"mappings":"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"}
1
+ {"version":3,"file":"color_input.js","sources":["../../../src/inputs/color_input/color_input.tsx"],"sourcesContent":["import { Box } from '../../stacks/box/box.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Spacer } from '../../stacks/spacer.js';\nimport { clsx } from 'clsx';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { HTMLAttributes } from 'react';\nimport { ColorState } from 'react-color';\nimport { Button } from '../../actions/index.js';\nimport { ColorPicker } from './color_picker.js';\nimport { Input } from '../input/input.js';\nimport styles from './color_input.module.css';\n\nimport { Popper } from '../../overlay/popper/legacy/popper.js';\nimport { ControlSet } from '../control_set/control_set.js';\n\nexport interface ColorInputProps\n extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange' | 'onError'> {\n value?: string;\n disabled?: boolean;\n onChange?: (color: string) => void;\n onError?: (error: string | null) => void;\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n hierarchy?: 'primary' | 'secondary' | 'tertiary';\n}\n\nexport function ColorInput({\n value = '#000',\n onChange,\n onError,\n disabled,\n width = '100%',\n maxWidth,\n minWidth,\n hierarchy = 'secondary',\n ...props\n}: ColorInputProps) {\n const [anchorElement, setAnchorElement] = useState<HTMLButtonElement | null>(null);\n const isOpen = anchorElement != null;\n const pickerRef = useRef<HTMLDivElement | null>(null);\n\n function openPicker(e: React.MouseEvent<HTMLButtonElement>) {\n setAnchorElement(e.currentTarget);\n }\n\n function closePicker() {\n setAnchorElement(null);\n }\n\n useLayoutEffect(() => {\n requestAnimationFrame(() => {\n if (anchorElement != null) {\n pickerRef.current && pickerRef.current.focus();\n }\n });\n }, [anchorElement]);\n\n function processKeyInput(event: React.KeyboardEvent) {\n if (event.key === 'Escape') {\n closePicker();\n }\n }\n\n function updateColor(value: ColorState) {\n const rgb = value.rgb;\n let color = value.hex;\n\n if (rgb.a != null) {\n color = `rgba(${rgb.r},${rgb.g},${rgb.b},${rgb.a})`;\n } else {\n color = `rgb(${rgb.r},${rgb.g},${rgb.b})`;\n }\n\n onChange && onChange(color);\n }\n\n return (\n <>\n <ControlSet\n height=\"auto\"\n width={width}\n minWidth={minWidth}\n maxWidth={maxWidth}\n className=\"tcn-color-input-wrapper\"\n {...props}\n >\n <Input\n width=\"flex\"\n disabled={disabled}\n value={value}\n style={{\n borderEndEndRadius: 0,\n borderStartEndRadius: 0,\n textAlign: 'start',\n paddingInlineEnd: '8px',\n }}\n className=\"tcn-color-input\"\n onChange={onChange}\n />\n\n <Button\n disabled={disabled}\n hierarchy={hierarchy}\n onClick={openPicker}\n width=\"70px\"\n maxWidth=\"70px\"\n className={clsx(\n styles['color-input-select'],\n 'tcn-color-input-select',\n 'tcn-select'\n )}\n style={{\n borderStartStartRadius: 0,\n borderEndStartRadius: 0,\n paddingInlineEnd: 0,\n }}\n >\n <HStack height=\"14px\" gap=\"4px\" hAlign=\"start\">\n <Spacer width=\"4px\" />\n <Box\n width=\"flex\"\n height=\"30px\"\n className={clsx(styles['checker-board'], 'tcn-checker-board')}\n style={{ borderRadius: '2px', overflow: 'hidden' }}\n >\n <Box\n height=\"100%\"\n style={{ backgroundColor: value, borderRadius: '2px' }}\n ></Box>\n </Box>\n <Spacer />\n </HStack>\n <Spacer width=\"4px\" />\n </Button>\n </ControlSet>\n <Popper\n anchorElement={anchorElement}\n onClose={closePicker}\n open={isOpen}\n restoreFocus\n horizontalAnchor=\"end\"\n horizontalOrigin=\"end\"\n >\n <ColorPicker\n color={value}\n onKeyDown={processKeyInput}\n onColorChange={updateColor}\n />\n </Popper>\n </>\n );\n}\n"],"names":["ColorInput","value","onChange","onError","disabled","width","maxWidth","minWidth","hierarchy","props","anchorElement","setAnchorElement","useState","isOpen","pickerRef","useRef","openPicker","e","closePicker","useLayoutEffect","processKeyInput","event","updateColor","rgb","color","jsxs","Fragment","ControlSet","jsx","Input","Button","clsx","styles","HStack","Spacer","Box","Popper","ColorPicker"],"mappings":"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"}
@@ -1,19 +1,20 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import "../../utils/click_away_listener.js";
3
- import "../../utils/focus_redirect.js";
4
- import "../../utils/scroll_away_listener.js";
2
+ import "../../utils/listeners/click_away_listener.js";
3
+ import "../../utils/listeners/focus_redirect.js";
4
+ import "../../utils/listeners/scroll_away_listener.js";
5
5
  import s, { useRef as a, useLayoutEffect as k } from "react";
6
6
  import { useForkRef as l } from "../../utils/hooks/use_fork_ref.js";
7
7
  import "../../utils/hooks/use_resize_observer.js";
8
- import "../../utils/dnd/context.js";
8
+ import "../../utils/hooks/labelled_by_context.js";
9
+ import "../../utils/decorators/draggable/context.js";
9
10
  import { clsx as e } from "clsx";
10
- import "../../draggable.module-BgelQsuJ.js";
11
- import "../../utils/resize/context.js";
12
- import "../../resizable.module-I6iyBAvM.js";
13
- import "../../utils/resize/resize_handle.js";
11
+ import "../../draggable.module-DFYR5n3n.js";
12
+ import "../../utils/decorators/resizable/context.js";
13
+ import "../../resizable.module-ur5FBfxo.js";
14
+ import "../../utils/decorators/resizable/resize_handle.js";
14
15
  import { ZStack as u } from "../../stacks/z_stack.js";
15
16
  import { ChromePicker as h } from "react-color";
16
- import '../../color_picker.css';const d = "_color-picker_4757d5a", R = "_chrome-picker_2f64060", c = { "color-picker": d, "chrome-picker": R }, q = s.forwardRef(function({ color: t, onColorChange: i, className: m, ...p }, f) {
17
+ import '../../color_picker.css';const d = "_color-picker_4757d5a", R = "_chrome-picker_2f64060", c = { "color-picker": d, "chrome-picker": R }, v = s.forwardRef(function({ color: t, onColorChange: i, className: m, ...p }, f) {
17
18
  const r = a(null), n = l(r, f);
18
19
  return k(() => {
19
20
  r.current && r.current.focus();
@@ -39,6 +40,6 @@ import '../../color_picker.css';const d = "_color-picker_4757d5a", R = "_chrome-
39
40
  );
40
41
  });
41
42
  export {
42
- q as ColorPicker
43
+ v as ColorPicker
43
44
  };
44
45
  //# sourceMappingURL=color_picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color_picker.js","sources":["../../../src/inputs/color_input/color_picker.tsx"],"sourcesContent":["import { useForkRef } from '../../utils/index.js';\nimport { ZStack } from '../../stacks/z_stack.js';\nimport { clsx } from 'clsx';\nimport React, { HTMLAttributes, useLayoutEffect, useRef } from 'react';\nimport { ChromePicker, Color, type ColorResult } from 'react-color';\nimport styles from './color_picker.module.css';\n\nexport interface ColorPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n color: Color;\n onColorChange: (color: ColorResult) => void;\n}\n\nexport const ColorPicker = React.forwardRef(function ColorPicker(\n { color, onColorChange, className, ...props }: ColorPickerProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const padRef = useRef<HTMLDivElement | null>(null);\n const forkedRef = useForkRef(padRef, ref);\n\n useLayoutEffect(() => {\n padRef.current && padRef.current.focus();\n }, []);\n\n return (\n <ZStack\n tabIndex={0}\n ref={forkedRef}\n padding=\"8px\"\n height=\"auto\"\n width=\"auto\"\n className={clsx(styles['color-picker'], 'tcn-color-picker', className)}\n {...props}\n >\n <ChromePicker\n className={clsx(styles['chrome-picker'], 'tcn-chrome-picker')}\n color={color}\n onChange={onColorChange}\n />\n </ZStack>\n );\n});\n"],"names":["ColorPicker","React","color","onColorChange","className","props","ref","padRef","useRef","forkedRef","useForkRef","useLayoutEffect","jsx","ZStack","clsx","styles","ChromePicker"],"mappings":";;;;;;;;;;;;;;;gHAYaA,IAAcC,EAAM,WAAW,SAC1C,EAAE,OAAAC,GAAO,eAAAC,GAAe,WAAAC,GAAW,GAAGC,EAAA,GACtCC,GACA;AACA,QAAMC,IAASC,EAA8B,IAAI,GAC3CC,IAAYC,EAAWH,GAAQD,CAAG;AAExC,SAAAK,EAAgB,MAAM;AACpB,IAAAJ,EAAO,WAAWA,EAAO,QAAQ,MAAA;AAAA,EACnC,GAAG,CAAA,CAAE,GAGH,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,KAAKJ;AAAA,MACL,SAAQ;AAAA,MACR,QAAO;AAAA,MACP,OAAM;AAAA,MACN,WAAWK,EAAKC,EAAO,cAAc,GAAG,oBAAoBX,CAAS;AAAA,MACpE,GAAGC;AAAA,MAEJ,UAAA,gBAAAO;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAWF,EAAKC,EAAO,eAAe,GAAG,mBAAmB;AAAA,UAC5D,OAAAb;AAAA,UACA,UAAUC;AAAA,QAAA;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"color_picker.js","sources":["../../../src/inputs/color_input/color_picker.tsx"],"sourcesContent":["import { useForkRef } from '../../utils/index.js';\nimport { ZStack } from '../../stacks/z_stack.js';\nimport { clsx } from 'clsx';\nimport React, { HTMLAttributes, useLayoutEffect, useRef } from 'react';\nimport { ChromePicker, Color, type ColorResult } from 'react-color';\nimport styles from './color_picker.module.css';\n\nexport interface ColorPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n color: Color;\n onColorChange: (color: ColorResult) => void;\n}\n\nexport const ColorPicker = React.forwardRef(function ColorPicker(\n { color, onColorChange, className, ...props }: ColorPickerProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const padRef = useRef<HTMLDivElement | null>(null);\n const forkedRef = useForkRef(padRef, ref);\n\n useLayoutEffect(() => {\n padRef.current && padRef.current.focus();\n }, []);\n\n return (\n <ZStack\n tabIndex={0}\n ref={forkedRef}\n padding=\"8px\"\n height=\"auto\"\n width=\"auto\"\n className={clsx(styles['color-picker'], 'tcn-color-picker', className)}\n {...props}\n >\n <ChromePicker\n className={clsx(styles['chrome-picker'], 'tcn-chrome-picker')}\n color={color}\n onChange={onColorChange}\n />\n </ZStack>\n );\n});\n"],"names":["ColorPicker","React","color","onColorChange","className","props","ref","padRef","useRef","forkedRef","useForkRef","useLayoutEffect","jsx","ZStack","clsx","styles","ChromePicker"],"mappings":";;;;;;;;;;;;;;;;gHAYaA,IAAcC,EAAM,WAAW,SAC1C,EAAE,OAAAC,GAAO,eAAAC,GAAe,WAAAC,GAAW,GAAGC,EAAA,GACtCC,GACA;AACA,QAAMC,IAASC,EAA8B,IAAI,GAC3CC,IAAYC,EAAWH,GAAQD,CAAG;AAExC,SAAAK,EAAgB,MAAM;AACpB,IAAAJ,EAAO,WAAWA,EAAO,QAAQ,MAAA;AAAA,EACnC,GAAG,CAAA,CAAE,GAGH,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,KAAKJ;AAAA,MACL,SAAQ;AAAA,MACR,QAAO;AAAA,MACP,OAAM;AAAA,MACN,WAAWK,EAAKC,EAAO,cAAc,GAAG,oBAAoBX,CAAS;AAAA,MACpE,GAAGC;AAAA,MAEJ,UAAA,gBAAAO;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAWF,EAAKC,EAAO,eAAe,GAAG,mBAAmB;AAAA,UAC5D,OAAAb;AAAA,UACA,UAAUC;AAAA,QAAA;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA;AAGN,CAAC;"}
@@ -1,19 +1,20 @@
1
1
  import { jsxs as D, Fragment as L, jsx as C } from "react/jsx-runtime";
2
- import "../../utils/click_away_listener.js";
3
- import "../../utils/focus_redirect.js";
4
- import "../../utils/scroll_away_listener.js";
2
+ import "../../utils/listeners/click_away_listener.js";
3
+ import "../../utils/listeners/focus_redirect.js";
4
+ import "../../utils/listeners/scroll_away_listener.js";
5
5
  import N, { useRef as c, useState as f } from "react";
6
6
  import { useForkRef as z } from "../../utils/hooks/use_fork_ref.js";
7
7
  import "../../utils/hooks/use_resize_observer.js";
8
- import "../../utils/dnd/context.js";
8
+ import "../../utils/hooks/labelled_by_context.js";
9
+ import "../../utils/decorators/draggable/context.js";
9
10
  import { clsx as G } from "clsx";
10
- import "../../draggable.module-BgelQsuJ.js";
11
- import "../../utils/resize/context.js";
12
- import "../../resizable.module-I6iyBAvM.js";
13
- import "../../utils/resize/resize_handle.js";
11
+ import "../../draggable.module-DFYR5n3n.js";
12
+ import "../../utils/decorators/resizable/context.js";
13
+ import "../../resizable.module-ur5FBfxo.js";
14
+ import "../../utils/decorators/resizable/resize_handle.js";
14
15
  import { SuggestionList as H } from "../suggestions/suggestion_list.js";
15
16
  import { Input as J } from "../input/input.js";
16
- const ce = N.forwardRef(function({
17
+ const ie = N.forwardRef(function({
17
18
  onOptionSelect: m,
18
19
  children: O = [],
19
20
  onKeyDown: r,
@@ -94,6 +95,6 @@ const ce = N.forwardRef(function({
94
95
  ] });
95
96
  });
96
97
  export {
97
- ce as ComboBox
98
+ ie as ComboBox
98
99
  };
99
100
  //# sourceMappingURL=combo_box.js.map