@tcn/ui 0.10.0 → 0.12.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 (202) hide show
  1. package/dist/feedback/index.d.ts +1 -0
  2. package/dist/feedback/index.d.ts.map +1 -1
  3. package/dist/feedback/index.js +6 -4
  4. package/dist/feedback/index.js.map +1 -1
  5. package/dist/feedback/progress/progress.d.ts +7 -0
  6. package/dist/feedback/progress/progress.d.ts.map +1 -0
  7. package/dist/feedback/progress/progress.js +38 -0
  8. package/dist/feedback/progress/progress.js.map +1 -0
  9. package/dist/feedback/progress/progress_bar.d.ts +0 -1
  10. package/dist/feedback/progress/progress_bar.d.ts.map +1 -1
  11. package/dist/feedback/progress/progress_bar.js +6 -46
  12. package/dist/feedback/progress/progress_bar.js.map +1 -1
  13. package/dist/form/field/common/status_input/status_input.js +4 -3
  14. package/dist/form/field/common/status_input/status_input.js.map +1 -1
  15. package/dist/form/field/h_field/h_field.d.ts.map +1 -1
  16. package/dist/form/field/h_field/h_field.js +33 -35
  17. package/dist/form/field/h_field/h_field.js.map +1 -1
  18. package/dist/form/field/v_field/v_field.d.ts.map +1 -1
  19. package/dist/form/field/v_field/v_field.js +34 -36
  20. package/dist/form/field/v_field/v_field.js.map +1 -1
  21. package/dist/frame.css +1 -1
  22. package/dist/inputs/color_input/color_input.d.ts.map +1 -1
  23. package/dist/inputs/color_input/color_input.js +47 -46
  24. package/dist/inputs/color_input/color_input.js.map +1 -1
  25. package/dist/inputs/combo_box/combo_box.d.ts.map +1 -1
  26. package/dist/inputs/combo_box/combo_box.js +61 -58
  27. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  28. package/dist/inputs/index.d.ts +1 -0
  29. package/dist/inputs/index.d.ts.map +1 -1
  30. package/dist/inputs/index.js +34 -31
  31. package/dist/inputs/index.js.map +1 -1
  32. package/dist/inputs/input/input.js +9 -9
  33. package/dist/inputs/input/input.js.map +1 -1
  34. package/dist/inputs/input_group/input_group.d.ts +5 -0
  35. package/dist/inputs/input_group/input_group.d.ts.map +1 -0
  36. package/dist/inputs/input_group/input_group.js +20 -0
  37. package/dist/inputs/input_group/input_group.js.map +1 -0
  38. package/dist/inputs/phone_number_input/countries_phone_information.d.ts +2 -2
  39. package/dist/inputs/phone_number_input/countries_phone_information.d.ts.map +1 -1
  40. package/dist/inputs/phone_number_input/countries_phone_information.js +5 -353
  41. package/dist/inputs/phone_number_input/countries_phone_information.js.map +1 -1
  42. package/dist/inputs/phone_number_input/phone_number_context.d.ts +24 -0
  43. package/dist/inputs/phone_number_input/phone_number_context.d.ts.map +1 -0
  44. package/dist/inputs/phone_number_input/phone_number_context.js +23 -0
  45. package/dist/inputs/phone_number_input/phone_number_context.js.map +1 -0
  46. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.d.ts +19 -0
  47. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.d.ts.map +1 -0
  48. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js +77 -0
  49. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js.map +1 -0
  50. package/dist/inputs/phone_number_input/phone_number_input.d.ts +16 -14
  51. package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
  52. package/dist/inputs/phone_number_input/phone_number_input.js +104 -274
  53. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  54. package/dist/inputs/phone_number_input/phone_number_input_adapter.d.ts +6 -0
  55. package/dist/inputs/phone_number_input/phone_number_input_adapter.d.ts.map +1 -0
  56. package/dist/inputs/phone_number_input/phone_number_input_adapter.js +95 -0
  57. package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -0
  58. package/dist/inputs/phone_number_input/sip_input.d.ts +12 -0
  59. package/dist/inputs/phone_number_input/sip_input.d.ts.map +1 -0
  60. package/dist/inputs/phone_number_input/sip_input.js +111 -0
  61. package/dist/inputs/phone_number_input/sip_input.js.map +1 -0
  62. package/dist/inputs/select/select.d.ts.map +1 -1
  63. package/dist/inputs/select/select.js +3 -2
  64. package/dist/inputs/select/select.js.map +1 -1
  65. package/dist/inputs/suggestions/suggestion_list.d.ts +4 -1
  66. package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
  67. package/dist/inputs/suggestions/suggestion_list.js +148 -121
  68. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  69. package/dist/inputs/textarea/textarea.js +8 -8
  70. package/dist/inputs/textarea/textarea.js.map +1 -1
  71. package/dist/inputs/unit_input/unit_input.d.ts.map +1 -1
  72. package/dist/inputs/unit_input/unit_input.js +39 -39
  73. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  74. package/dist/overlay/frame/frame.d.ts +8 -4
  75. package/dist/overlay/frame/frame.d.ts.map +1 -1
  76. package/dist/overlay/frame/frame.js +88 -24
  77. package/dist/overlay/frame/frame.js.map +1 -1
  78. package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -1
  79. package/dist/overlay/popper/legacy/popper.d.ts.map +1 -1
  80. package/dist/overlay/popper/legacy/popper.js +52 -50
  81. package/dist/overlay/popper/legacy/popper.js.map +1 -1
  82. package/dist/phone_number_input.css +1 -1
  83. package/dist/progress_bar-CPP0Jyv-.js +38 -0
  84. package/dist/progress_bar-CPP0Jyv-.js.map +1 -0
  85. package/dist/progress_bar.css +1 -1
  86. package/dist/stacks/box/bottom_resize_handle.d.ts +2 -8
  87. package/dist/stacks/box/bottom_resize_handle.d.ts.map +1 -1
  88. package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
  89. package/dist/stacks/box/box.d.ts +2 -2
  90. package/dist/stacks/box/box.d.ts.map +1 -1
  91. package/dist/stacks/box/box.js.map +1 -1
  92. package/dist/stacks/box/end_resize_handle.d.ts +2 -8
  93. package/dist/stacks/box/end_resize_handle.d.ts.map +1 -1
  94. package/dist/stacks/box/end_resize_handle.js.map +1 -1
  95. package/dist/stacks/box/left_resize_handle.d.ts +2 -8
  96. package/dist/stacks/box/left_resize_handle.d.ts.map +1 -1
  97. package/dist/stacks/box/left_resize_handle.js.map +1 -1
  98. package/dist/stacks/box/resize_handlers.d.ts +3 -2
  99. package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
  100. package/dist/stacks/box/resize_handlers.js +41 -37
  101. package/dist/stacks/box/resize_handlers.js.map +1 -1
  102. package/dist/stacks/box/right_resize_handle.d.ts +2 -8
  103. package/dist/stacks/box/right_resize_handle.d.ts.map +1 -1
  104. package/dist/stacks/box/right_resize_handle.js.map +1 -1
  105. package/dist/stacks/box/start_resize_handle.d.ts +2 -8
  106. package/dist/stacks/box/start_resize_handle.d.ts.map +1 -1
  107. package/dist/stacks/box/start_resize_handle.js +4 -4
  108. package/dist/stacks/box/start_resize_handle.js.map +1 -1
  109. package/dist/stacks/box/top_resize_handle.d.ts +2 -8
  110. package/dist/stacks/box/top_resize_handle.d.ts.map +1 -1
  111. package/dist/stacks/box/top_resize_handle.js +4 -4
  112. package/dist/stacks/box/top_resize_handle.js.map +1 -1
  113. package/dist/stacks/box/types.d.ts +18 -0
  114. package/dist/stacks/box/types.d.ts.map +1 -0
  115. package/dist/stacks/h_collapsible_box.js +25 -25
  116. package/dist/stacks/h_collapsible_box.js.map +1 -1
  117. package/dist/stacks/index.d.ts +1 -0
  118. package/dist/stacks/index.d.ts.map +1 -1
  119. package/dist/stacks/v_collapsible_box.js +25 -25
  120. package/dist/stacks/v_collapsible_box.js.map +1 -1
  121. package/dist/suggestion_list.css +1 -1
  122. package/dist/surfaces/modal/modal.d.ts +3 -4
  123. package/dist/surfaces/modal/modal.d.ts.map +1 -1
  124. package/dist/surfaces/modal/modal.js +10 -8
  125. package/dist/surfaces/modal/modal.js.map +1 -1
  126. package/dist/surfaces/window/window.d.ts +3 -4
  127. package/dist/surfaces/window/window.d.ts.map +1 -1
  128. package/dist/surfaces/window/window.js +26 -14
  129. package/dist/surfaces/window/window.js.map +1 -1
  130. package/dist/themes/stylesheets/reset.css +1 -1
  131. package/dist/themes/stylesheets/reset.js +8 -1
  132. package/dist/themes/stylesheets/reset.js.map +1 -1
  133. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  134. package/dist/themes/themes/ergo/ergo_theme.js +186 -19
  135. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  136. package/dist/typography/body_text/body_text.d.ts.map +1 -1
  137. package/dist/typography/body_text/body_text.js +12 -10
  138. package/dist/typography/body_text/body_text.js.map +1 -1
  139. package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -1
  140. package/dist/utils/dnd/hooks/use_drag_container.js +22 -19
  141. package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -1
  142. package/package.json +4 -2
  143. package/src/feedback/index.ts +1 -0
  144. package/src/feedback/progress/progress.module.css +5 -0
  145. package/src/feedback/progress/progress.stories.tsx +48 -0
  146. package/src/feedback/progress/progress.tsx +39 -0
  147. package/src/feedback/progress/progress_bar.module.css +4 -28
  148. package/src/feedback/progress/progress_bar.stories.tsx +1 -1
  149. package/src/feedback/progress/progress_bar.tsx +14 -26
  150. package/src/form/field/h_field/h_field.tsx +0 -4
  151. package/src/form/field/v_field/v_field.stories.tsx +8 -0
  152. package/src/form/field/v_field/v_field.tsx +1 -4
  153. package/src/form/field_set/field_set.stories.tsx +2 -1
  154. package/src/inputs/__docs__/inputs.mdx +81 -0
  155. package/src/inputs/__docs__/inputs.stories.tsx +268 -0
  156. package/src/inputs/color_input/color_input.tsx +17 -17
  157. package/src/inputs/combo_box/combo_box.tsx +17 -13
  158. package/src/inputs/index.ts +2 -0
  159. package/src/inputs/input/input.tsx +1 -1
  160. package/src/inputs/input_group/input_group.tsx +26 -0
  161. package/src/inputs/phone_number_input/countries_phone_information.ts +6 -353
  162. package/src/inputs/phone_number_input/phone_number_context.tsx +32 -0
  163. package/src/inputs/phone_number_input/phone_number_country_select_adapter.tsx +126 -0
  164. package/src/inputs/phone_number_input/phone_number_input.module.css +5 -63
  165. package/src/inputs/phone_number_input/phone_number_input.stories.tsx +180 -150
  166. package/src/inputs/phone_number_input/phone_number_input.tsx +133 -400
  167. package/src/inputs/phone_number_input/phone_number_input_adapter.tsx +123 -0
  168. package/src/inputs/phone_number_input/sip_input.tsx +147 -0
  169. package/src/inputs/select/select.stories.tsx +23 -2
  170. package/src/inputs/select/select.tsx +13 -14
  171. package/src/inputs/suggestions/suggestion_list.module.css +1 -0
  172. package/src/inputs/suggestions/suggestion_list.stories.tsx +12 -8
  173. package/src/inputs/suggestions/suggestion_list.tsx +82 -42
  174. package/src/inputs/textarea/textarea.tsx +1 -1
  175. package/src/inputs/unit_input/unit_input.tsx +17 -17
  176. package/src/overlay/frame/frame.module.css +2 -4
  177. package/src/overlay/frame/frame.stories.tsx +13 -10
  178. package/src/overlay/frame/frame.tsx +121 -15
  179. package/src/overlay/popper/base/dismissal_decorator.tsx +1 -1
  180. package/src/overlay/popper/legacy/popper.tsx +5 -1
  181. package/src/stacks/box/bottom_resize_handle.tsx +2 -8
  182. package/src/stacks/box/box.tsx +14 -2
  183. package/src/stacks/box/end_resize_handle.tsx +3 -8
  184. package/src/stacks/box/left_resize_handle.tsx +3 -8
  185. package/src/stacks/box/resize_handlers.ts +28 -12
  186. package/src/stacks/box/right_resize_handle.tsx +2 -8
  187. package/src/stacks/box/start_resize_handle.tsx +4 -9
  188. package/src/stacks/box/top_resize_handle.tsx +4 -8
  189. package/src/stacks/box/types.ts +44 -0
  190. package/src/stacks/h_collapsible_box.tsx +2 -2
  191. package/src/stacks/index.ts +1 -0
  192. package/src/stacks/v_collapsible_box.tsx +2 -2
  193. package/src/surfaces/modal/modal.tsx +6 -4
  194. package/src/surfaces/window/window.stories.tsx +9 -1
  195. package/src/surfaces/window/window.tsx +19 -7
  196. package/src/themes/stories/controls_fieldset.tsx +1 -1
  197. package/src/themes/stylesheets/reset.css +8 -1
  198. package/src/themes/themes/ergo/ergo_theme.css +186 -19
  199. package/src/typography/body_text/body_text.tsx +2 -0
  200. package/src/utils/dnd/__stories__/draggable.stories.tsx +14 -8
  201. package/src/utils/dnd/hooks/use_drag_container.ts +13 -3
  202. package/src/inputs/phone_number_input/__tests__/utils.test.ts +0 -52
@@ -1 +1 @@
1
- {"version":3,"file":"resize_handlers.js","sources":["../../../src/stacks/box/resize_handlers.ts"],"sourcesContent":["function createVeil() {\n const veil = window.document.createElement('div');\n veil.style.position = 'absolute';\n veil.style.inset = '-500px';\n veil.style.backgroundColor = 'transparent';\n veil.style.pointerEvents = 'auto';\n return veil;\n}\n\nexport function createHorizontalResizeHandler(\n targetRef: React.MutableRefObject<HTMLElement | null>,\n onWidthResize?: (width: number, origin: 'left' | 'right', delta: number) => void,\n onWidthResizeEnd?: (width: number, origin: 'left' | 'right') => void,\n origin: 'left' | 'right' = 'right',\n invert = false,\n disableDirection = false\n) {\n return function startHorizontalResize(event: React.MouseEvent) {\n const box = targetRef.current;\n\n if (box == null) {\n return;\n }\n\n const veil = createVeil();\n box.appendChild(veil);\n\n const languageDirection = window.getComputedStyle(box).direction;\n const finalInvert =\n languageDirection === 'rtl' && !disableDirection ? !invert : invert;\n const direction = finalInvert ? -1 : 1;\n\n const startX = event.clientX;\n const startRect = box.getBoundingClientRect();\n let width = startRect.width;\n\n const drag = (event: MouseEvent) => {\n const deltaX = direction * (event.clientX - startX);\n const newWidth = startRect.width + deltaX;\n\n width = newWidth;\n\n box.style.width = `${newWidth}px`;\n onWidthResize?.(newWidth, origin, deltaX);\n event.stopPropagation();\n event.preventDefault();\n };\n\n const mouseEnter = (event: MouseEvent) => {\n if (event.buttons === 0) {\n endDrag();\n }\n };\n\n const endDrag = () => {\n box.removeChild(veil);\n\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n\n onWidthResizeEnd?.(width, origin);\n };\n\n document.body.addEventListener('mousemove', drag);\n document.body.addEventListener('mouseup', endDrag);\n document.body.addEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n };\n}\n\nexport function createVerticalResizeHandler(\n targetRef: React.MutableRefObject<HTMLElement | null>,\n onHeightResize?: (height: number, origin: 'top' | 'bottom', delta: number) => void,\n onHeightResizeEnd?: (height: number, origin: 'top' | 'bottom') => void,\n invert = false,\n origin: 'top' | 'bottom' = 'bottom'\n) {\n const direction = invert ? -1 : 1;\n return function startVerticalResize(event: React.MouseEvent) {\n const box = targetRef.current;\n\n if (box == null) {\n return;\n }\n\n const veil = createVeil();\n box.appendChild(veil);\n\n const startY = event.clientY;\n const startRect = box.getBoundingClientRect();\n let height = startRect.height;\n\n const drag = (event: MouseEvent) => {\n const deltaY = direction * (event.clientY - startY);\n const newHeight = startRect.height + deltaY;\n height = newHeight;\n box.style.height = `${newHeight}px`;\n onHeightResize?.(newHeight, origin, deltaY);\n event.stopPropagation();\n event.preventDefault();\n };\n\n const mouseEnter = (event: MouseEvent) => {\n if (event.buttons === 0) {\n endDrag();\n }\n };\n\n const endDrag = () => {\n box.removeChild(veil);\n\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n\n onHeightResizeEnd?.(height, origin);\n };\n\n document.body.addEventListener('mousemove', drag);\n document.body.addEventListener('mouseup', endDrag);\n document.body.addEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n };\n}\n"],"names":["createVeil","veil","createHorizontalResizeHandler","targetRef","onWidthResize","onWidthResizeEnd","origin","invert","disableDirection","event","box","direction","startX","startRect","width","drag","deltaX","newWidth","mouseEnter","endDrag","createVerticalResizeHandler","onHeightResize","onHeightResizeEnd","startY","height","deltaY","newHeight"],"mappings":"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"}
1
+ {"version":3,"file":"resize_handlers.js","sources":["../../../src/stacks/box/resize_handlers.ts"],"sourcesContent":["import {\n OnWidthResize,\n type HeightResizeOrigin,\n type OnHeightResize,\n type WidthResizeOrigin,\n} from './types';\n\nfunction createVeil() {\n const veil = window.document.createElement('div');\n veil.style.position = 'absolute';\n veil.style.inset = '-500px';\n veil.style.backgroundColor = 'transparent';\n veil.style.pointerEvents = 'auto';\n return veil;\n}\n\nexport function createHorizontalResizeHandler(\n targetRef: React.MutableRefObject<HTMLElement | null>,\n onWidthResize?: OnWidthResize,\n onWidthResizeEnd?: (width: number, origin: WidthResizeOrigin) => void,\n origin: WidthResizeOrigin = 'right',\n invert = false,\n disableDirection = false\n) {\n return function startHorizontalResize(event: React.MouseEvent) {\n const box = targetRef.current;\n\n if (box == null) {\n return;\n }\n\n const veil = createVeil();\n box.appendChild(veil);\n\n const languageDirection = window.getComputedStyle(box).direction;\n const finalInvert =\n languageDirection === 'rtl' && !disableDirection ? !invert : invert;\n const direction = finalInvert ? -1 : 1;\n\n const startX = event.clientX;\n const startRect = box.getBoundingClientRect();\n let width = startRect.width;\n\n const drag = (event: MouseEvent) => {\n const beforeWidth = box.getBoundingClientRect().width;\n const totalDelta = direction * (event.clientX - startX);\n const newWidth = startRect.width + totalDelta;\n const currentDelta = newWidth - width;\n\n width = newWidth;\n\n box.style.width = `${newWidth}px`;\n\n const afterWidth = box.getBoundingClientRect().width;\n const atLimit = afterWidth === beforeWidth;\n onWidthResize?.(newWidth, origin, totalDelta, currentDelta, atLimit);\n event.stopPropagation();\n event.preventDefault();\n };\n\n const mouseEnter = (event: MouseEvent) => {\n if (event.buttons === 0) {\n endDrag();\n }\n };\n\n const endDrag = () => {\n box.removeChild(veil);\n\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n\n onWidthResizeEnd?.(width, origin);\n };\n\n document.body.addEventListener('mousemove', drag);\n document.body.addEventListener('mouseup', endDrag);\n document.body.addEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n };\n}\n\nexport function createVerticalResizeHandler(\n targetRef: React.MutableRefObject<HTMLElement | null>,\n onHeightResize?: OnHeightResize,\n onHeightResizeEnd?: (height: number, origin: HeightResizeOrigin) => void,\n invert = false,\n origin: HeightResizeOrigin = 'bottom'\n) {\n const direction = invert ? -1 : 1;\n return function startVerticalResize(event: React.MouseEvent) {\n const box = targetRef.current;\n\n if (box == null) {\n return;\n }\n\n const veil = createVeil();\n box.appendChild(veil);\n\n const startY = event.clientY;\n const startRect = box.getBoundingClientRect();\n let height = startRect.height;\n\n const drag = (event: MouseEvent) => {\n const beforeHeight = box.getBoundingClientRect().height;\n const totalDelta = direction * (event.clientY - startY);\n const newHeight = startRect.height + totalDelta;\n const currentDelta = newHeight - height;\n height = newHeight;\n box.style.height = `${newHeight}px`;\n const afterHeight = box.getBoundingClientRect().height;\n const atLimit = afterHeight === beforeHeight;\n onHeightResize?.(newHeight, origin, totalDelta, currentDelta, atLimit);\n event.stopPropagation();\n event.preventDefault();\n };\n\n const mouseEnter = (event: MouseEvent) => {\n if (event.buttons === 0) {\n endDrag();\n }\n };\n\n const endDrag = () => {\n box.removeChild(veil);\n\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n\n onHeightResizeEnd?.(height, origin);\n };\n\n document.body.addEventListener('mousemove', drag);\n document.body.addEventListener('mouseup', endDrag);\n document.body.addEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n };\n}\n"],"names":["createVeil","veil","createHorizontalResizeHandler","targetRef","onWidthResize","onWidthResizeEnd","origin","invert","disableDirection","event","box","direction","startX","startRect","width","drag","beforeWidth","totalDelta","newWidth","currentDelta","atLimit","mouseEnter","endDrag","createVerticalResizeHandler","onHeightResize","onHeightResizeEnd","startY","height","beforeHeight","newHeight"],"mappings":"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"}
@@ -1,10 +1,4 @@
1
- import { default as React } from 'react';
2
- import { HandleProps } from './handle_props.js';
3
- export interface RightResizeHandleProps {
4
- targetRef: React.MutableRefObject<HTMLElement | null>;
5
- handleProps?: HandleProps;
6
- onWidthResize?: (width: number, origin: 'left' | 'right', delta: number) => void;
7
- onWidthResizeEnd?: (width: number, origin: 'left' | 'right') => void;
8
- }
1
+ import { HorizontalResizeHandleProps } from './types.js';
2
+ export type RightResizeHandleProps = HorizontalResizeHandleProps;
9
3
  export declare function RightResizeHandle({ targetRef, handleProps, onWidthResize, onWidthResizeEnd, }: RightResizeHandleProps): import("react/jsx-runtime").JSX.Element;
10
4
  //# sourceMappingURL=right_resize_handle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"right_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/right_resize_handle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACtE;AACD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,WAAW,EACX,aAAa,EACb,gBAAgB,GACjB,EAAE,sBAAsB,2CA0BxB"}
1
+ {"version":3,"file":"right_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/right_resize_handle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AACjE,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,WAAW,EACX,aAAa,EACb,gBAAgB,GACjB,EAAE,sBAAsB,2CA0BxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"right_resize_handle.js","sources":["../../../src/stacks/box/right_resize_handle.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { HandleProps } from './handle_props.js';\nimport { createHorizontalResizeHandler } from './resize_handlers.js';\nimport styles from './right_resize_handle.module.css';\n\nexport interface RightResizeHandleProps {\n targetRef: React.MutableRefObject<HTMLElement | null>;\n handleProps?: HandleProps;\n onWidthResize?: (width: number, origin: 'left' | 'right', delta: number) => void;\n onWidthResizeEnd?: (width: number, origin: 'left' | 'right') => void;\n}\nexport function RightResizeHandle({\n targetRef,\n handleProps,\n onWidthResize,\n onWidthResizeEnd,\n}: RightResizeHandleProps) {\n const resizeHandler = createHorizontalResizeHandler(\n targetRef,\n onWidthResize,\n onWidthResizeEnd,\n 'right',\n false,\n true\n );\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const rightResizeHandleStyle: any = {\n ...handleProps?.style,\n '--resize-offset': `${offset}px`,\n width: handleProps?.size || '16px',\n };\n\n return (\n <div\n className={clsx(styles['right-resize-handle'], 'tcn-right-resize-handle')}\n onMouseDown={resizeHandler}\n style={rightResizeHandleStyle}\n >\n {handleProps?.children}\n </div>\n );\n}\n"],"names":["RightResizeHandle","targetRef","handleProps","onWidthResize","onWidthResizeEnd","resizeHandler","createHorizontalResizeHandler","offset","rightResizeHandleStyle","jsx","clsx","styles"],"mappings":";;;;AAYO,SAASA,EAAkB;AAAA,EAChC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,GAA2B;AACzB,QAAMC,IAAgBC;AAAA,IACpBL;AAAA,IACAE;AAAA,IACAC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAEIG,IAASL,GAAa,SAASA,EAAY,SAAS,IAEpDM,IAA8B;AAAA,IAClC,GAAGN,GAAa;AAAA,IAChB,mBAAmB,GAAGK,CAAM;AAAA,IAC5B,OAAOL,GAAa,QAAQ;AAAA,EAAA;AAG9B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,qBAAqB,GAAG,yBAAyB;AAAA,MACxE,aAAaN;AAAA,MACb,OAAOG;AAAA,MAEN,UAAAN,GAAa;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
1
+ {"version":3,"file":"right_resize_handle.js","sources":["../../../src/stacks/box/right_resize_handle.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { createHorizontalResizeHandler } from './resize_handlers.js';\nimport styles from './right_resize_handle.module.css';\nimport type { HorizontalResizeHandleProps } from './types.js';\n\nexport type RightResizeHandleProps = HorizontalResizeHandleProps;\nexport function RightResizeHandle({\n targetRef,\n handleProps,\n onWidthResize,\n onWidthResizeEnd,\n}: RightResizeHandleProps) {\n const resizeHandler = createHorizontalResizeHandler(\n targetRef,\n onWidthResize,\n onWidthResizeEnd,\n 'right',\n false,\n true\n );\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const rightResizeHandleStyle: any = {\n ...handleProps?.style,\n '--resize-offset': `${offset}px`,\n width: handleProps?.size || '16px',\n };\n\n return (\n <div\n className={clsx(styles['right-resize-handle'], 'tcn-right-resize-handle')}\n onMouseDown={resizeHandler}\n style={rightResizeHandleStyle}\n >\n {handleProps?.children}\n </div>\n );\n}\n"],"names":["RightResizeHandle","targetRef","handleProps","onWidthResize","onWidthResizeEnd","resizeHandler","createHorizontalResizeHandler","offset","rightResizeHandleStyle","jsx","clsx","styles"],"mappings":";;;;AAMO,SAASA,EAAkB;AAAA,EAChC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,GAA2B;AACzB,QAAMC,IAAgBC;AAAA,IACpBL;AAAA,IACAE;AAAA,IACAC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAEIG,IAASL,GAAa,SAASA,EAAY,SAAS,IAEpDM,IAA8B;AAAA,IAClC,GAAGN,GAAa;AAAA,IAChB,mBAAmB,GAAGK,CAAM;AAAA,IAC5B,OAAOL,GAAa,QAAQ;AAAA,EAAA;AAG9B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,qBAAqB,GAAG,yBAAyB;AAAA,MACxE,aAAaN;AAAA,MACb,OAAOG;AAAA,MAEN,UAAAN,GAAa;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
@@ -1,10 +1,4 @@
1
- import { default as React } from 'react';
2
- import { HandleProps } from './handle_props.js';
3
- export interface StartResizeHandleProps {
4
- targetRef: React.MutableRefObject<HTMLElement | null>;
5
- handleProps?: HandleProps;
6
- onWidthResize?: (width: number, origin: 'left' | 'right', delta: number) => void;
7
- onWidthResizeEnd?: (width: number, origin: 'left' | 'right') => void;
8
- }
1
+ import { HorizontalResizeHandleProps } from './types.js';
2
+ export type StartResizeHandleProps = HorizontalResizeHandleProps;
9
3
  export declare function StartResizeHandle({ targetRef, handleProps, onWidthResize, onWidthResizeEnd, }: StartResizeHandleProps): import("react/jsx-runtime").JSX.Element;
10
4
  //# sourceMappingURL=start_resize_handle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"start_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACtE;AACD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,WAAW,EACX,aAAa,EACb,gBAAgB,GACjB,EAAE,sBAAsB,2CAwBxB"}
1
+ {"version":3,"file":"start_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AAEjE,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,WAAW,EACX,aAAa,EACb,gBAAgB,GACjB,EAAE,sBAAsB,2CAwBxB"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { createHorizontalResizeHandler as l } from "./resize_handlers.js";
3
- import { clsx as f } from "clsx";
2
+ import { clsx as l } from "clsx";
3
+ import { createHorizontalResizeHandler as f } from "./resize_handlers.js";
4
4
  import '../../start_resize_handle.css';const c = "_start-resize-handle_22a3d5a", z = { "start-resize-handle": c };
5
5
  function x({
6
6
  targetRef: t,
@@ -8,7 +8,7 @@ function x({
8
8
  onWidthResize: s,
9
9
  onWidthResizeEnd: r
10
10
  }) {
11
- const i = l(
11
+ const i = f(
12
12
  t,
13
13
  s,
14
14
  r,
@@ -21,7 +21,7 @@ function x({
21
21
  return /* @__PURE__ */ o(
22
22
  "div",
23
23
  {
24
- className: f(z["start-resize-handle"], "tcn-start-resize-handle"),
24
+ className: l(z["start-resize-handle"], "tcn-start-resize-handle"),
25
25
  onMouseDown: i,
26
26
  style: a,
27
27
  children: e?.children
@@ -1 +1 @@
1
- {"version":3,"file":"start_resize_handle.js","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"sourcesContent":["import React from 'react';\nimport { HandleProps } from './handle_props.js';\nimport { createHorizontalResizeHandler } from './resize_handlers.js';\nimport styles from './start_resize_handle.module.css';\nimport { clsx } from 'clsx';\n\nexport interface StartResizeHandleProps {\n targetRef: React.MutableRefObject<HTMLElement | null>;\n handleProps?: HandleProps;\n onWidthResize?: (width: number, origin: 'left' | 'right', delta: number) => void;\n onWidthResizeEnd?: (width: number, origin: 'left' | 'right') => void;\n}\nexport function StartResizeHandle({\n targetRef,\n handleProps,\n onWidthResize,\n onWidthResizeEnd,\n}: StartResizeHandleProps) {\n const resizeHandler = createHorizontalResizeHandler(\n targetRef,\n onWidthResize,\n onWidthResizeEnd,\n 'left'\n );\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const startResizeHandleStyle: any = {\n ...handleProps?.style,\n '--resize-offset': `${offset}px`,\n width: handleProps?.size || '16px',\n };\n\n return (\n <div\n className={clsx(styles['start-resize-handle'], 'tcn-start-resize-handle')}\n onMouseDown={resizeHandler}\n style={startResizeHandleStyle}\n >\n {handleProps?.children}\n </div>\n );\n}\n"],"names":["StartResizeHandle","targetRef","handleProps","onWidthResize","onWidthResizeEnd","resizeHandler","createHorizontalResizeHandler","offset","startResizeHandleStyle","jsx","clsx","styles"],"mappings":";;;;AAYO,SAASA,EAAkB;AAAA,EAChC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,GAA2B;AACzB,QAAMC,IAAgBC;AAAA,IACpBL;AAAA,IACAE;AAAA,IACAC;AAAA,IACA;AAAA,EAAA,GAEIG,IAASL,GAAa,SAASA,EAAY,SAAS,IAEpDM,IAA8B;AAAA,IAClC,GAAGN,GAAa;AAAA,IAChB,mBAAmB,GAAGK,CAAM;AAAA,IAC5B,OAAOL,GAAa,QAAQ;AAAA,EAAA;AAG9B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,qBAAqB,GAAG,yBAAyB;AAAA,MACxE,aAAaN;AAAA,MACb,OAAOG;AAAA,MAEN,UAAAN,GAAa;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
1
+ {"version":3,"file":"start_resize_handle.js","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { createHorizontalResizeHandler } from './resize_handlers.js';\nimport styles from './start_resize_handle.module.css';\nimport type { HorizontalResizeHandleProps } from './types.js';\n\nexport type StartResizeHandleProps = HorizontalResizeHandleProps;\n\nexport function StartResizeHandle({\n targetRef,\n handleProps,\n onWidthResize,\n onWidthResizeEnd,\n}: StartResizeHandleProps) {\n const resizeHandler = createHorizontalResizeHandler(\n targetRef,\n onWidthResize,\n onWidthResizeEnd,\n 'left'\n );\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const startResizeHandleStyle: any = {\n ...handleProps?.style,\n '--resize-offset': `${offset}px`,\n width: handleProps?.size || '16px',\n };\n\n return (\n <div\n className={clsx(styles['start-resize-handle'], 'tcn-start-resize-handle')}\n onMouseDown={resizeHandler}\n style={startResizeHandleStyle}\n >\n {handleProps?.children}\n </div>\n );\n}\n"],"names":["StartResizeHandle","targetRef","handleProps","onWidthResize","onWidthResizeEnd","resizeHandler","createHorizontalResizeHandler","offset","startResizeHandleStyle","jsx","clsx","styles"],"mappings":";;;;AAOO,SAASA,EAAkB;AAAA,EAChC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,GAA2B;AACzB,QAAMC,IAAgBC;AAAA,IACpBL;AAAA,IACAE;AAAA,IACAC;AAAA,IACA;AAAA,EAAA,GAEIG,IAASL,GAAa,SAASA,EAAY,SAAS,IAEpDM,IAA8B;AAAA,IAClC,GAAGN,GAAa;AAAA,IAChB,mBAAmB,GAAGK,CAAM;AAAA,IAC5B,OAAOL,GAAa,QAAQ;AAAA,EAAA;AAG9B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,qBAAqB,GAAG,yBAAyB;AAAA,MACxE,aAAaN;AAAA,MACb,OAAOG;AAAA,MAEN,UAAAN,GAAa;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
@@ -1,10 +1,4 @@
1
- import { default as React } from 'react';
2
- import { HandleProps } from './handle_props.js';
3
- export interface TopResizeHandleProps {
4
- targetRef: React.MutableRefObject<HTMLElement | null>;
5
- handleProps?: HandleProps;
6
- onHeightResize?: (height: number, origin: 'top' | 'bottom', delta: number) => void;
7
- onHeightResizeEnd?: (height: number, origin: 'top' | 'bottom') => void;
8
- }
1
+ import { VerticalResizeHandleProps } from './types.js';
2
+ export type TopResizeHandleProps = VerticalResizeHandleProps;
9
3
  export declare function TopResizeHandle({ targetRef, handleProps, onHeightResize, onHeightResizeEnd, }: TopResizeHandleProps): import("react/jsx-runtime").JSX.Element;
10
4
  //# sourceMappingURL=top_resize_handle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"top_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/top_resize_handle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnF,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,KAAK,IAAI,CAAC;CACxE;AACD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,WAAW,EACX,cAAc,EACd,iBAAiB,GAClB,EAAE,oBAAoB,2CAwBtB"}
1
+ {"version":3,"file":"top_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/top_resize_handle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE7D,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,WAAW,EACX,cAAc,EACd,iBAAiB,GAClB,EAAE,oBAAoB,2CAwBtB"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { createVerticalResizeHandler as c } from "./resize_handlers.js";
3
- import { clsx as f } from "clsx";
2
+ import { clsx as c } from "clsx";
3
+ import { createVerticalResizeHandler as f } from "./resize_handlers.js";
4
4
  import '../../top_resize_handle.css';const p = "_top-resize-handle_fe19234", z = { "top-resize-handle": p };
5
5
  function x({
6
6
  targetRef: t,
@@ -8,7 +8,7 @@ function x({
8
8
  onHeightResize: o,
9
9
  onHeightResizeEnd: s
10
10
  }) {
11
- const i = c(
11
+ const i = f(
12
12
  t,
13
13
  o,
14
14
  s,
@@ -22,7 +22,7 @@ function x({
22
22
  return /* @__PURE__ */ l(
23
23
  "div",
24
24
  {
25
- className: f(z["top-resize-handle"], "tcn-top-resize-handle"),
25
+ className: c(z["top-resize-handle"], "tcn-top-resize-handle"),
26
26
  onMouseDown: i,
27
27
  style: r,
28
28
  children: e?.children
@@ -1 +1 @@
1
- {"version":3,"file":"top_resize_handle.js","sources":["../../../src/stacks/box/top_resize_handle.tsx"],"sourcesContent":["import React from 'react';\nimport { HandleProps } from './handle_props.js';\nimport { createVerticalResizeHandler } from './resize_handlers.js';\nimport styles from './top_resize_handle.module.css';\nimport { clsx } from 'clsx';\n\nexport interface TopResizeHandleProps {\n targetRef: React.MutableRefObject<HTMLElement | null>;\n handleProps?: HandleProps;\n onHeightResize?: (height: number, origin: 'top' | 'bottom', delta: number) => void;\n onHeightResizeEnd?: (height: number, origin: 'top' | 'bottom') => void;\n}\nexport function TopResizeHandle({\n targetRef,\n handleProps,\n onHeightResize,\n onHeightResizeEnd,\n}: TopResizeHandleProps) {\n const resizeHandler = createVerticalResizeHandler(\n targetRef,\n onHeightResize,\n onHeightResizeEnd,\n true,\n 'top'\n );\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const topResizeHandleStyle: React.CSSProperties = {\n ...handleProps?.style,\n top: `${offset}px`,\n height: handleProps?.size || '16px',\n };\n return (\n <div\n className={clsx(styles['top-resize-handle'], 'tcn-top-resize-handle')}\n onMouseDown={resizeHandler}\n style={topResizeHandleStyle}\n >\n {handleProps?.children}\n </div>\n );\n}\n"],"names":["TopResizeHandle","targetRef","handleProps","onHeightResize","onHeightResizeEnd","resizeHandler","createVerticalResizeHandler","offset","topResizeHandleStyle","jsx","clsx","styles"],"mappings":";;;;AAYO,SAASA,EAAgB;AAAA,EAC9B,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,GAAyB;AACvB,QAAMC,IAAgBC;AAAA,IACpBL;AAAA,IACAE;AAAA,IACAC;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAEIG,IAASL,GAAa,SAASA,EAAY,SAAS,IAEpDM,IAA4C;AAAA,IAChD,GAAGN,GAAa;AAAA,IAChB,KAAK,GAAGK,CAAM;AAAA,IACd,QAAQL,GAAa,QAAQ;AAAA,EAAA;AAE/B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,mBAAmB,GAAG,uBAAuB;AAAA,MACpE,aAAaN;AAAA,MACb,OAAOG;AAAA,MAEN,UAAAN,GAAa;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
1
+ {"version":3,"file":"top_resize_handle.js","sources":["../../../src/stacks/box/top_resize_handle.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { createVerticalResizeHandler } from './resize_handlers.js';\nimport styles from './top_resize_handle.module.css';\nimport type { VerticalResizeHandleProps } from './types.js';\n\nexport type TopResizeHandleProps = VerticalResizeHandleProps;\n\nexport function TopResizeHandle({\n targetRef,\n handleProps,\n onHeightResize,\n onHeightResizeEnd,\n}: TopResizeHandleProps) {\n const resizeHandler = createVerticalResizeHandler(\n targetRef,\n onHeightResize,\n onHeightResizeEnd,\n true,\n 'top'\n );\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const topResizeHandleStyle: React.CSSProperties = {\n ...handleProps?.style,\n top: `${offset}px`,\n height: handleProps?.size || '16px',\n };\n return (\n <div\n className={clsx(styles['top-resize-handle'], 'tcn-top-resize-handle')}\n onMouseDown={resizeHandler}\n style={topResizeHandleStyle}\n >\n {handleProps?.children}\n </div>\n );\n}\n"],"names":["TopResizeHandle","targetRef","handleProps","onHeightResize","onHeightResizeEnd","resizeHandler","createVerticalResizeHandler","offset","topResizeHandleStyle","jsx","clsx","styles"],"mappings":";;;;AAQO,SAASA,EAAgB;AAAA,EAC9B,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,GAAyB;AACvB,QAAMC,IAAgBC;AAAA,IACpBL;AAAA,IACAE;AAAA,IACAC;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAEIG,IAASL,GAAa,SAASA,EAAY,SAAS,IAEpDM,IAA4C;AAAA,IAChD,GAAGN,GAAa;AAAA,IAChB,KAAK,GAAGK,CAAM;AAAA,IACd,QAAQL,GAAa,QAAQ;AAAA,EAAA;AAE/B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,mBAAmB,GAAG,uBAAuB;AAAA,MACpE,aAAaN;AAAA,MACb,OAAOG;AAAA,MAEN,UAAAN,GAAa;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
@@ -0,0 +1,18 @@
1
+ import { HandleProps } from './handle_props.js';
2
+ export type WidthResizeOrigin = 'left' | 'right';
3
+ export type HeightResizeOrigin = 'top' | 'bottom';
4
+ export type OnWidthResize = (width: number, origin: WidthResizeOrigin, totalDelta: number, currentDelta: number, atLimit: boolean) => void;
5
+ export type OnHeightResize = (height: number, origin: HeightResizeOrigin, totalDelta: number, currentDelta: number, atLimit: boolean) => void;
6
+ export interface HorizontalResizeHandleProps {
7
+ targetRef: React.MutableRefObject<HTMLElement | null>;
8
+ handleProps?: HandleProps;
9
+ onWidthResize?: OnWidthResize;
10
+ onWidthResizeEnd?: (width: number, origin: WidthResizeOrigin) => void;
11
+ }
12
+ export interface VerticalResizeHandleProps {
13
+ targetRef: React.MutableRefObject<HTMLElement | null>;
14
+ handleProps?: HandleProps;
15
+ onHeightResize?: OnHeightResize;
16
+ onHeightResizeEnd?: (height: number, origin: HeightResizeOrigin) => void;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AACjD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,CAE1B,KAAK,EAAE,MAAM,EAEb,MAAM,EAAE,iBAAiB,EAEzB,UAAU,EAAE,MAAM,EAElB,YAAY,EAAE,MAAM,EAEpB,OAAO,EAAE,OAAO,KACb,IAAI,CAAC;AAEV,MAAM,MAAM,cAAc,GAAG,CAE3B,MAAM,EAAE,MAAM,EAEd,MAAM,EAAE,kBAAkB,EAE1B,UAAU,EAAE,MAAM,EAElB,YAAY,EAAE,MAAM,EAEpB,OAAO,EAAE,OAAO,KACb,IAAI,CAAC;AAEV,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACvE;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC1E"}
@@ -1,46 +1,46 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { clsx as u } from "clsx";
3
- import i, { useLayoutEffect as R } from "react";
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { clsx as d } from "clsx";
3
+ import t, { useLayoutEffect as u } from "react";
4
4
  import "../utils/click_away_listener.js";
5
5
  import "../utils/focus_redirect.js";
6
6
  import "../utils/scroll_away_listener.js";
7
- import { useForkRef as x } from "../utils/hooks/use_fork_ref.js";
7
+ import { useForkRef as R } from "../utils/hooks/use_fork_ref.js";
8
8
  import "../utils/hooks/use_resize_observer.js";
9
9
  import "../utils/dnd/context.js";
10
10
  import "../draggable.module-BgelQsuJ.js";
11
- import { Box as z } from "./box/box.js";
12
- import { s as b } from "../collapsible_box.module-BiS98xXA.js";
13
- import { useIsCollapsed as h } from "./utils/use_is_collapsed.js";
14
- const S = i.forwardRef(function({ open: l = !1, defaultWidth: r = "400px", ...e }, n) {
15
- const o = i.useRef(null), c = x(n, o), [m, a] = i.useState(!1);
16
- R(() => {
17
- o.current?.style.setProperty("--collapsible-size", r);
18
- }, [r]);
19
- const f = h(l, o) && !l ? null : e.children;
20
- return /* @__PURE__ */ d(
21
- z,
11
+ import { Box as x } from "./box/box.js";
12
+ import { s as z } from "../collapsible_box.module-BiS98xXA.js";
13
+ import { useIsCollapsed as b } from "./utils/use_is_collapsed.js";
14
+ const L = t.forwardRef(function({ open: l = !1, defaultWidth: i = "400px", ...e }, a) {
15
+ const o = t.useRef(null), n = R(a, o), [c, r] = t.useState(!1);
16
+ u(() => {
17
+ o.current?.style.setProperty("--collapsible-size", i);
18
+ }, [i]);
19
+ const m = b(l, o) && !l ? null : e.children;
20
+ return /* @__PURE__ */ p(
21
+ x,
22
22
  {
23
- ref: c,
23
+ ref: n,
24
24
  ...e,
25
25
  "data-is-collapsed": !l,
26
26
  "data-collapse-orientation": "horizontal",
27
- "data-is-resizing": m,
28
- onWidthResize: (s, t, p) => {
29
- a(!0), e.onWidthResize?.(s, t, p);
27
+ "data-is-resizing": c,
28
+ onWidthResize: (...s) => {
29
+ r(!0), e.onWidthResize?.(...s);
30
30
  },
31
- onWidthResizeEnd: (s, t) => {
32
- a(!1), e.onWidthResizeEnd?.(s, t), o.current?.style.setProperty("--collapsible-size", `${s}px`);
31
+ onWidthResizeEnd: (s, f) => {
32
+ r(!1), e.onWidthResizeEnd?.(s, f), o.current?.style.setProperty("--collapsible-size", `${s}px`);
33
33
  },
34
- className: u(
34
+ className: d(
35
35
  e.className,
36
- b["collapsible-box"],
36
+ z["collapsible-box"],
37
37
  "tcn-h-collapsible-box"
38
38
  ),
39
- children: f
39
+ children: m
40
40
  }
41
41
  );
42
42
  });
43
43
  export {
44
- S as HCollapsibleBox
44
+ L as HCollapsibleBox
45
45
  };
46
46
  //# sourceMappingURL=h_collapsible_box.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"h_collapsible_box.js","sources":["../../src/stacks/h_collapsible_box.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React, { useLayoutEffect } from 'react';\nimport { useForkRef } from '../utils/index.js';\nimport { Box, BoxProps } from './box/box.js';\nimport styles from './collapsible_box.module.css';\nimport { useIsCollapsed } from './utils/use_is_collapsed.js';\n\nexport interface HCollapsibleBoxProps extends BoxProps {\n open?: boolean;\n defaultWidth?: string;\n}\n\nexport const HCollapsibleBox = React.forwardRef(function CollapsibleBox(\n { open = false, defaultWidth = '400px', ...props }: HCollapsibleBoxProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const collapsibleRef = React.useRef<HTMLDivElement | null>(null);\n const forkRef = useForkRef(ref, collapsibleRef);\n const [resizing, setIsResizing] = React.useState(false);\n\n useLayoutEffect(() => {\n collapsibleRef.current?.style.setProperty('--collapsible-size', defaultWidth);\n }, [defaultWidth]);\n\n const isCollapsed = useIsCollapsed(open, collapsibleRef);\n const children = isCollapsed && !open ? null : props.children;\n\n return (\n <Box\n ref={forkRef}\n {...props}\n data-is-collapsed={!open}\n data-collapse-orientation=\"horizontal\"\n data-is-resizing={resizing}\n onWidthResize={(width, origin, delta) => {\n setIsResizing(true);\n props.onWidthResize?.(width, origin, delta);\n }}\n onWidthResizeEnd={(width, origin) => {\n setIsResizing(false);\n props.onWidthResizeEnd?.(width, origin);\n collapsibleRef.current?.style.setProperty('--collapsible-size', `${width}px`);\n }}\n className={clsx(\n props.className,\n styles['collapsible-box'],\n 'tcn-h-collapsible-box'\n )}\n children={children}\n />\n );\n});\n"],"names":["HCollapsibleBox","React","open","defaultWidth","props","ref","collapsibleRef","forkRef","useForkRef","resizing","setIsResizing","useLayoutEffect","children","useIsCollapsed","jsx","Box","width","origin","delta","clsx","styles"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,IAAkBC,EAAM,WAAW,SAC9C,EAAE,MAAAC,IAAO,IAAO,cAAAC,IAAe,SAAS,GAAGC,EAAA,GAC3CC,GACA;AACA,QAAMC,IAAiBL,EAAM,OAA8B,IAAI,GACzDM,IAAUC,EAAWH,GAAKC,CAAc,GACxC,CAACG,GAAUC,CAAa,IAAIT,EAAM,SAAS,EAAK;AAEtD,EAAAU,EAAgB,MAAM;AACpB,IAAAL,EAAe,SAAS,MAAM,YAAY,sBAAsBH,CAAY;AAAA,EAC9E,GAAG,CAACA,CAAY,CAAC;AAGjB,QAAMS,IADcC,EAAeX,GAAMI,CAAc,KACvB,CAACJ,IAAO,OAAOE,EAAM;AAErD,SACE,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKR;AAAA,MACJ,GAAGH;AAAA,MACJ,qBAAmB,CAACF;AAAA,MACpB,6BAA0B;AAAA,MAC1B,oBAAkBO;AAAA,MAClB,eAAe,CAACO,GAAOC,GAAQC,MAAU;AACvC,QAAAR,EAAc,EAAI,GAClBN,EAAM,gBAAgBY,GAAOC,GAAQC,CAAK;AAAA,MAC5C;AAAA,MACA,kBAAkB,CAACF,GAAOC,MAAW;AACnC,QAAAP,EAAc,EAAK,GACnBN,EAAM,mBAAmBY,GAAOC,CAAM,GACtCX,EAAe,SAAS,MAAM,YAAY,sBAAsB,GAAGU,CAAK,IAAI;AAAA,MAC9E;AAAA,MACA,WAAWG;AAAA,QACTf,EAAM;AAAA,QACNgB,EAAO,iBAAiB;AAAA,QACxB;AAAA,MAAA;AAAA,MAEF,UAAAR;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"h_collapsible_box.js","sources":["../../src/stacks/h_collapsible_box.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React, { useLayoutEffect } from 'react';\nimport { useForkRef } from '../utils/index.js';\nimport { Box, BoxProps } from './box/box.js';\nimport styles from './collapsible_box.module.css';\nimport { useIsCollapsed } from './utils/use_is_collapsed.js';\n\nexport interface HCollapsibleBoxProps extends BoxProps {\n open?: boolean;\n defaultWidth?: string;\n}\n\nexport const HCollapsibleBox = React.forwardRef(function CollapsibleBox(\n { open = false, defaultWidth = '400px', ...props }: HCollapsibleBoxProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const collapsibleRef = React.useRef<HTMLDivElement | null>(null);\n const forkRef = useForkRef(ref, collapsibleRef);\n const [resizing, setIsResizing] = React.useState(false);\n\n useLayoutEffect(() => {\n collapsibleRef.current?.style.setProperty('--collapsible-size', defaultWidth);\n }, [defaultWidth]);\n\n const isCollapsed = useIsCollapsed(open, collapsibleRef);\n const children = isCollapsed && !open ? null : props.children;\n\n return (\n <Box\n ref={forkRef}\n {...props}\n data-is-collapsed={!open}\n data-collapse-orientation=\"horizontal\"\n data-is-resizing={resizing}\n onWidthResize={(...args) => {\n setIsResizing(true);\n props.onWidthResize?.(...args);\n }}\n onWidthResizeEnd={(width, origin) => {\n setIsResizing(false);\n props.onWidthResizeEnd?.(width, origin);\n collapsibleRef.current?.style.setProperty('--collapsible-size', `${width}px`);\n }}\n className={clsx(\n props.className,\n styles['collapsible-box'],\n 'tcn-h-collapsible-box'\n )}\n children={children}\n />\n );\n});\n"],"names":["HCollapsibleBox","React","open","defaultWidth","props","ref","collapsibleRef","forkRef","useForkRef","resizing","setIsResizing","useLayoutEffect","children","useIsCollapsed","jsx","Box","args","width","origin","clsx","styles"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,IAAkBC,EAAM,WAAW,SAC9C,EAAE,MAAAC,IAAO,IAAO,cAAAC,IAAe,SAAS,GAAGC,EAAA,GAC3CC,GACA;AACA,QAAMC,IAAiBL,EAAM,OAA8B,IAAI,GACzDM,IAAUC,EAAWH,GAAKC,CAAc,GACxC,CAACG,GAAUC,CAAa,IAAIT,EAAM,SAAS,EAAK;AAEtD,EAAAU,EAAgB,MAAM;AACpB,IAAAL,EAAe,SAAS,MAAM,YAAY,sBAAsBH,CAAY;AAAA,EAC9E,GAAG,CAACA,CAAY,CAAC;AAGjB,QAAMS,IADcC,EAAeX,GAAMI,CAAc,KACvB,CAACJ,IAAO,OAAOE,EAAM;AAErD,SACE,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKR;AAAA,MACJ,GAAGH;AAAA,MACJ,qBAAmB,CAACF;AAAA,MACpB,6BAA0B;AAAA,MAC1B,oBAAkBO;AAAA,MAClB,eAAe,IAAIO,MAAS;AAC1B,QAAAN,EAAc,EAAI,GAClBN,EAAM,gBAAgB,GAAGY,CAAI;AAAA,MAC/B;AAAA,MACA,kBAAkB,CAACC,GAAOC,MAAW;AACnC,QAAAR,EAAc,EAAK,GACnBN,EAAM,mBAAmBa,GAAOC,CAAM,GACtCZ,EAAe,SAAS,MAAM,YAAY,sBAAsB,GAAGW,CAAK,IAAI;AAAA,MAC9E;AAAA,MACA,WAAWE;AAAA,QACTf,EAAM;AAAA,QACNgB,EAAO,iBAAiB;AAAA,QACxB;AAAA,MAAA;AAAA,MAEF,UAAAR;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1,4 +1,5 @@
1
1
  export * from './box/box.js';
2
+ export * from './box/types.js';
2
3
  export * from './types/alignment.js';
3
4
  export * from './types/as.js';
4
5
  export * from './types/common.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stacks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stacks/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
@@ -1,46 +1,46 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import i, { useLayoutEffect as d } from "react";
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import t, { useLayoutEffect as u } from "react";
3
3
  import "../utils/click_away_listener.js";
4
4
  import "../utils/focus_redirect.js";
5
5
  import "../utils/scroll_away_listener.js";
6
- import { useForkRef as R } from "../utils/hooks/use_fork_ref.js";
6
+ import { useForkRef as d } from "../utils/hooks/use_fork_ref.js";
7
7
  import "../utils/hooks/use_resize_observer.js";
8
8
  import "../utils/dnd/context.js";
9
- import { clsx as x } from "clsx";
9
+ import { clsx as R } from "clsx";
10
10
  import "../draggable.module-BgelQsuJ.js";
11
- import { Box as b } from "./box/box.js";
12
- import { s as z } from "../collapsible_box.module-BiS98xXA.js";
13
- import { useIsCollapsed as y } from "./utils/use_is_collapsed.js";
14
- const L = i.forwardRef(function({ open: l = !1, defaultHeight: r = "400px", ...e }, c) {
15
- const s = i.useRef(null), n = R(c, s), [m, a] = i.useState(!1);
16
- d(() => {
17
- s.current?.style.setProperty("--collapsible-size", r);
18
- }, [r]);
19
- const f = y(l, s) && !l ? null : e.children;
20
- return /* @__PURE__ */ u(
21
- b,
11
+ import { Box as x } from "./box/box.js";
12
+ import { s as b } from "../collapsible_box.module-BiS98xXA.js";
13
+ import { useIsCollapsed as z } from "./utils/use_is_collapsed.js";
14
+ const F = t.forwardRef(function({ open: l = !1, defaultHeight: i = "400px", ...e }, a) {
15
+ const s = t.useRef(null), c = d(a, s), [n, r] = t.useState(!1);
16
+ u(() => {
17
+ s.current?.style.setProperty("--collapsible-size", i);
18
+ }, [i]);
19
+ const m = z(l, s) && !l ? null : e.children;
20
+ return /* @__PURE__ */ p(
21
+ x,
22
22
  {
23
- ref: n,
23
+ ref: c,
24
24
  ...e,
25
25
  "data-is-collapsed": !l,
26
26
  "data-collapse-orientation": "vertical",
27
- "data-is-resizing": m,
28
- onHeightResize: (o, t, p) => {
29
- a(!0), e.onHeightResize?.(o, t, p);
27
+ "data-is-resizing": n,
28
+ onHeightResize: (...o) => {
29
+ r(!0), e.onHeightResize?.(...o);
30
30
  },
31
- onHeightResizeEnd: (o, t) => {
32
- a(!1), s.current?.style.setProperty("--collapsible-size", `${o}px`), e.onHeightResizeEnd?.(o, t);
31
+ onHeightResizeEnd: (o, f) => {
32
+ r(!1), s.current?.style.setProperty("--collapsible-size", `${o}px`), e.onHeightResizeEnd?.(o, f);
33
33
  },
34
- className: x(
34
+ className: R(
35
35
  e.className,
36
- z["collapsible-box"],
36
+ b["collapsible-box"],
37
37
  "tcn-v-collapsible-box"
38
38
  ),
39
- children: f
39
+ children: m
40
40
  }
41
41
  );
42
42
  });
43
43
  export {
44
- L as VCollapsibleBox
44
+ F as VCollapsibleBox
45
45
  };
46
46
  //# sourceMappingURL=v_collapsible_box.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"v_collapsible_box.js","sources":["../../src/stacks/v_collapsible_box.tsx"],"sourcesContent":["import React, { useLayoutEffect } from 'react';\nimport { useForkRef } from '../utils/index.js';\nimport { clsx } from 'clsx';\nimport { Box, BoxProps } from './box/box.js';\nimport styles from './collapsible_box.module.css';\nimport { useIsCollapsed } from './utils/use_is_collapsed.js';\n\nexport interface VCollapsibleBoxProps extends BoxProps {\n open?: boolean;\n defaultHeight?: string;\n}\n\nexport const VCollapsibleBox = React.forwardRef(function CollapsibleBox(\n { open = false, defaultHeight = '400px', ...props }: VCollapsibleBoxProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const collapsibleRef = React.useRef<HTMLDivElement | null>(null);\n const forkRef = useForkRef(ref, collapsibleRef);\n const [resizing, setIsResizing] = React.useState(false);\n\n useLayoutEffect(() => {\n collapsibleRef.current?.style.setProperty('--collapsible-size', defaultHeight);\n }, [defaultHeight]);\n\n const isCollapsed = useIsCollapsed(open, collapsibleRef);\n const children = isCollapsed && !open ? null : props.children;\n\n return (\n <Box\n ref={forkRef}\n {...props}\n data-is-collapsed={!open}\n data-collapse-orientation=\"vertical\"\n data-is-resizing={resizing}\n onHeightResize={(height, origin, delta) => {\n setIsResizing(true);\n props.onHeightResize?.(height, origin, delta);\n }}\n onHeightResizeEnd={(height, origin) => {\n setIsResizing(false);\n collapsibleRef.current?.style.setProperty('--collapsible-size', `${height}px`);\n props.onHeightResizeEnd?.(height, origin);\n }}\n className={clsx(\n props.className,\n styles['collapsible-box'],\n 'tcn-v-collapsible-box'\n )}\n children={children}\n />\n );\n});\n"],"names":["VCollapsibleBox","React","open","defaultHeight","props","ref","collapsibleRef","forkRef","useForkRef","resizing","setIsResizing","useLayoutEffect","children","useIsCollapsed","jsx","Box","height","origin","delta","clsx","styles"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,IAAkBC,EAAM,WAAW,SAC9C,EAAE,MAAAC,IAAO,IAAO,eAAAC,IAAgB,SAAS,GAAGC,EAAA,GAC5CC,GACA;AACA,QAAMC,IAAiBL,EAAM,OAA8B,IAAI,GACzDM,IAAUC,EAAWH,GAAKC,CAAc,GACxC,CAACG,GAAUC,CAAa,IAAIT,EAAM,SAAS,EAAK;AAEtD,EAAAU,EAAgB,MAAM;AACpB,IAAAL,EAAe,SAAS,MAAM,YAAY,sBAAsBH,CAAa;AAAA,EAC/E,GAAG,CAACA,CAAa,CAAC;AAGlB,QAAMS,IADcC,EAAeX,GAAMI,CAAc,KACvB,CAACJ,IAAO,OAAOE,EAAM;AAErD,SACE,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKR;AAAA,MACJ,GAAGH;AAAA,MACJ,qBAAmB,CAACF;AAAA,MACpB,6BAA0B;AAAA,MAC1B,oBAAkBO;AAAA,MAClB,gBAAgB,CAACO,GAAQC,GAAQC,MAAU;AACzC,QAAAR,EAAc,EAAI,GAClBN,EAAM,iBAAiBY,GAAQC,GAAQC,CAAK;AAAA,MAC9C;AAAA,MACA,mBAAmB,CAACF,GAAQC,MAAW;AACrC,QAAAP,EAAc,EAAK,GACnBJ,EAAe,SAAS,MAAM,YAAY,sBAAsB,GAAGU,CAAM,IAAI,GAC7EZ,EAAM,oBAAoBY,GAAQC,CAAM;AAAA,MAC1C;AAAA,MACA,WAAWE;AAAA,QACTf,EAAM;AAAA,QACNgB,EAAO,iBAAiB;AAAA,QACxB;AAAA,MAAA;AAAA,MAEF,UAAAR;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"v_collapsible_box.js","sources":["../../src/stacks/v_collapsible_box.tsx"],"sourcesContent":["import React, { useLayoutEffect } from 'react';\nimport { useForkRef } from '../utils/index.js';\nimport { clsx } from 'clsx';\nimport { Box, BoxProps } from './box/box.js';\nimport styles from './collapsible_box.module.css';\nimport { useIsCollapsed } from './utils/use_is_collapsed.js';\n\nexport interface VCollapsibleBoxProps extends BoxProps {\n open?: boolean;\n defaultHeight?: string;\n}\n\nexport const VCollapsibleBox = React.forwardRef(function CollapsibleBox(\n { open = false, defaultHeight = '400px', ...props }: VCollapsibleBoxProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const collapsibleRef = React.useRef<HTMLDivElement | null>(null);\n const forkRef = useForkRef(ref, collapsibleRef);\n const [resizing, setIsResizing] = React.useState(false);\n\n useLayoutEffect(() => {\n collapsibleRef.current?.style.setProperty('--collapsible-size', defaultHeight);\n }, [defaultHeight]);\n\n const isCollapsed = useIsCollapsed(open, collapsibleRef);\n const children = isCollapsed && !open ? null : props.children;\n\n return (\n <Box\n ref={forkRef}\n {...props}\n data-is-collapsed={!open}\n data-collapse-orientation=\"vertical\"\n data-is-resizing={resizing}\n onHeightResize={(...args) => {\n setIsResizing(true);\n props.onHeightResize?.(...args);\n }}\n onHeightResizeEnd={(height, origin) => {\n setIsResizing(false);\n collapsibleRef.current?.style.setProperty('--collapsible-size', `${height}px`);\n props.onHeightResizeEnd?.(height, origin);\n }}\n className={clsx(\n props.className,\n styles['collapsible-box'],\n 'tcn-v-collapsible-box'\n )}\n children={children}\n />\n );\n});\n"],"names":["VCollapsibleBox","React","open","defaultHeight","props","ref","collapsibleRef","forkRef","useForkRef","resizing","setIsResizing","useLayoutEffect","children","useIsCollapsed","jsx","Box","args","height","origin","clsx","styles"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,IAAkBC,EAAM,WAAW,SAC9C,EAAE,MAAAC,IAAO,IAAO,eAAAC,IAAgB,SAAS,GAAGC,EAAA,GAC5CC,GACA;AACA,QAAMC,IAAiBL,EAAM,OAA8B,IAAI,GACzDM,IAAUC,EAAWH,GAAKC,CAAc,GACxC,CAACG,GAAUC,CAAa,IAAIT,EAAM,SAAS,EAAK;AAEtD,EAAAU,EAAgB,MAAM;AACpB,IAAAL,EAAe,SAAS,MAAM,YAAY,sBAAsBH,CAAa;AAAA,EAC/E,GAAG,CAACA,CAAa,CAAC;AAGlB,QAAMS,IADcC,EAAeX,GAAMI,CAAc,KACvB,CAACJ,IAAO,OAAOE,EAAM;AAErD,SACE,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKR;AAAA,MACJ,GAAGH;AAAA,MACJ,qBAAmB,CAACF;AAAA,MACpB,6BAA0B;AAAA,MAC1B,oBAAkBO;AAAA,MAClB,gBAAgB,IAAIO,MAAS;AAC3B,QAAAN,EAAc,EAAI,GAClBN,EAAM,iBAAiB,GAAGY,CAAI;AAAA,MAChC;AAAA,MACA,mBAAmB,CAACC,GAAQC,MAAW;AACrC,QAAAR,EAAc,EAAK,GACnBJ,EAAe,SAAS,MAAM,YAAY,sBAAsB,GAAGW,CAAM,IAAI,GAC7Eb,EAAM,oBAAoBa,GAAQC,CAAM;AAAA,MAC1C;AAAA,MACA,WAAWC;AAAA,QACTf,EAAM;AAAA,QACNgB,EAAO,iBAAiB;AAAA,QACxB;AAAA,MAAA;AAAA,MAEF,UAAAR;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1 +1 @@
1
- @layer tcn-system{:where(._suggestion-list_711fb17){border-radius:8px;box-shadow:var(--drop-shadow-depth-3, 0 2px 10px 0 rgba(0, 0, 0, .25));border:1px solid var(--border-tertiary-color);overflow-y:auto;overflow-x:hidden;background-color:#fff}:where(._input_a0df060){position:sticky;top:0;left:0;border:none;margin:0;outline:none;padding-inline-start:8px;height:calc(32px * var(--scalar, 1));min-height:calc(32px * var(--scalar, 1));z-index:2;border-bottom:1px solid var(--border-tertiary-color, #e2e2e2);border-radius:8px 8px 0 0/8px 8px 0px 0px;background-color:#fff;color:var(--font-color);font-size:calc(14px * var(--scalar, 1));width:100%}}
1
+ @layer tcn-system{:where(._suggestion-list_711fb17){border-radius:8px;box-shadow:var(--drop-shadow-depth-3, 0 2px 10px 0 rgba(0, 0, 0, .25));border:1px solid var(--border-tertiary-color);overflow-y:auto;overflow-x:hidden;background-color:#fff;overscroll-behavior:none}:where(._input_a0df060){position:sticky;top:0;left:0;border:none;margin:0;outline:none;padding-inline-start:8px;height:calc(32px * var(--scalar, 1));min-height:calc(32px * var(--scalar, 1));z-index:2;border-bottom:1px solid var(--border-tertiary-color, #e2e2e2);border-radius:8px 8px 0 0/8px 8px 0px 0px;background-color:#fff;color:var(--font-color);font-size:calc(14px * var(--scalar, 1));width:100%}}
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { FrameOwnProps } from '../../overlay/frame/frame.js';
3
- import { ScaffoldProps } from '../../layouts/scaffold/scaffold.js';
4
- export type ModalProps = FrameOwnProps & ScaffoldProps;
5
- export declare const Modal: React.ForwardRefExoticComponent<FrameOwnProps & ScaffoldProps & React.RefAttributes<HTMLElement>>;
2
+ import { FrameProps } from '../../overlay/frame/frame.js';
3
+ export type ModalProps = FrameProps;
4
+ export declare const Modal: React.ForwardRefExoticComponent<Omit<import('../../stacks/index.js').BoxProps<HTMLElement>, "enableResizeOnTop" | "enableResizeOnBottom" | "enableResizeOnLeft" | "enableResizeOnRight"> & import('../../overlay/index.js').FrameOwnProps & React.RefAttributes<HTMLElement>>;
6
5
  //# sourceMappingURL=modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/surfaces/modal/modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAKlF,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,aAAa,CAAC;AAEvD,eAAO,MAAM,KAAK,mGAgBhB,CAAC"}
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/surfaces/modal/modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAMtE,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAEpC,eAAO,MAAM,KAAK,+QAkBhB,CAAC"}
@@ -1,21 +1,23 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { clsx as l } from "clsx";
2
+ import { clsx as e } from "clsx";
3
3
  import s from "react";
4
4
  import { Frame as d } from "../../overlay/frame/frame.js";
5
5
  import { Scaffold as n } from "../../layouts/scaffold/scaffold.js";
6
- import '../../modal.css';const i = "_modal_473c6ef", p = { modal: i }, j = s.forwardRef(function({ children: r, className: t, isOpen: m, draggable: a = !1, veil: f = !0, ...c }, e) {
6
+ import '../../modal.css';const i = "_modal_473c6ef", p = { modal: i }, N = s.forwardRef(function({ children: t, className: a, isOpen: r, draggable: m = !1, veil: c = !0, ...f }, l) {
7
7
  return /* @__PURE__ */ o(
8
8
  d,
9
9
  {
10
- isOpen: m,
11
- draggable: a,
12
- veil: f,
13
- className: l(p.modal, "tcn-surface", "tcn-modal", t),
14
- children: /* @__PURE__ */ o(n, { ref: e, ...c, children: r })
10
+ ref: l,
11
+ isOpen: r,
12
+ draggable: m,
13
+ veil: c,
14
+ className: e(p.modal, "tcn-surface", "tcn-modal", a),
15
+ ...f,
16
+ children: /* @__PURE__ */ o(n, { className: "tcn-modal-scaffold", width: "100%", height: "100%", children: t })
15
17
  }
16
18
  );
17
19
  });
18
20
  export {
19
- j as Modal
21
+ N as Modal
20
22
  };
21
23
  //# sourceMappingURL=modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sources":["../../../src/surfaces/modal/modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameOwnProps } from '../../overlay/frame/frame.js';\nimport { Scaffold, type ScaffoldProps } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './modal.module.css';\n\nexport type ModalProps = FrameOwnProps & ScaffoldProps;\n\nexport const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal(\n { children, className, isOpen, draggable = false, veil = true, ...props }: ModalProps,\n ref\n) {\n return (\n <Frame\n isOpen={isOpen}\n draggable={draggable}\n veil={veil}\n className={clsx(styles['modal'], 'tcn-surface', 'tcn-modal', className)}\n >\n <Scaffold ref={ref} {...props}>\n {children}\n </Scaffold>\n </Frame>\n );\n});\n"],"names":["Modal","React","children","className","isOpen","draggable","veil","props","ref","jsx","Frame","clsx","styles","Scaffold"],"mappings":";;;;;8CAUaA,IAAQC,EAAM,WAAoC,SAC7D,EAAE,UAAAC,GAAU,WAAAC,GAAW,QAAAC,GAAQ,WAAAC,IAAY,IAAO,MAAAC,IAAO,IAAM,GAAGC,EAAA,GAClEC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAAN;AAAA,MACA,WAAAC;AAAA,MACA,MAAAC;AAAA,MACA,WAAWK,EAAKC,EAAO,OAAU,eAAe,aAAaT,CAAS;AAAA,MAEtE,UAAA,gBAAAM,EAACI,GAAA,EAAS,KAAAL,GAAW,GAAGD,GACrB,UAAAL,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"modal.js","sources":["../../../src/surfaces/modal/modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameProps } from '../../overlay/frame/frame.js';\nimport { Scaffold } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './modal.module.css';\n\nexport type ModalProps = FrameProps;\n\nexport const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal(\n { children, className, isOpen, draggable = false, veil = true, ...props }: ModalProps,\n ref\n) {\n return (\n <Frame\n ref={ref}\n isOpen={isOpen}\n draggable={draggable}\n veil={veil}\n className={clsx(styles['modal'], 'tcn-surface', 'tcn-modal', className)}\n {...props}\n >\n <Scaffold className={'tcn-modal-scaffold'} width=\"100%\" height=\"100%\">\n {children}\n </Scaffold>\n </Frame>\n );\n});\n"],"names":["Modal","React","children","className","isOpen","draggable","veil","props","ref","jsx","Frame","clsx","styles","Scaffold"],"mappings":";;;;;8CAUaA,IAAQC,EAAM,WAAoC,SAC7D,EAAE,UAAAC,GAAU,WAAAC,GAAW,QAAAC,GAAQ,WAAAC,IAAY,IAAO,MAAAC,IAAO,IAAM,GAAGC,EAAA,GAClEC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,QAAAJ;AAAA,MACA,WAAAC;AAAA,MACA,MAAAC;AAAA,MACA,WAAWK,EAAKC,EAAO,OAAU,eAAe,aAAaT,CAAS;AAAA,MACrE,GAAGI;AAAA,MAEJ,UAAA,gBAAAE,EAACI,KAAS,WAAW,sBAAsB,OAAM,QAAO,QAAO,QAC5D,UAAAX,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { FrameOwnProps } from '../../overlay/frame/frame.js';
3
- import { ScaffoldProps } from '../../layouts/scaffold/scaffold.js';
4
- export type WindowProps = FrameOwnProps & ScaffoldProps;
5
- export declare const Window: React.ForwardRefExoticComponent<FrameOwnProps & ScaffoldProps & React.RefAttributes<HTMLElement>>;
2
+ import { FrameProps } from '../../overlay/frame/frame.js';
3
+ export type WindowProps = FrameProps;
4
+ export declare const Window: React.ForwardRefExoticComponent<Omit<import('../../stacks/index.js').BoxProps<HTMLElement>, "enableResizeOnTop" | "enableResizeOnBottom" | "enableResizeOnLeft" | "enableResizeOnRight"> & import('../../overlay/index.js').FrameOwnProps & React.RefAttributes<HTMLElement>>;
6
5
  //# sourceMappingURL=window.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/surfaces/window/window.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAKlF,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,aAAa,CAAC;AAExD,eAAO,MAAM,MAAM,mGAkBjB,CAAC"}
1
+ {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/surfaces/window/window.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAMtE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AAErC,eAAO,MAAM,MAAM,+QA8BjB,CAAC"}
@@ -1,23 +1,35 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { clsx as d } from "clsx";
3
- import m from "react";
4
- import { Frame as w } from "../../overlay/frame/frame.js";
5
- import { Scaffold as a } from "../../layouts/scaffold/scaffold.js";
6
- import '../../window.css';const s = "_window_7610fdb", l = { window: s }, W = m.forwardRef(function({ children: t, className: r, isOpen: i, draggable: n = !0, veil: f = !1, ...e }, c) {
2
+ import { clsx as w } from "clsx";
3
+ import a from "react";
4
+ import { Frame as m } from "../../overlay/frame/frame.js";
5
+ import { Scaffold as l } from "../../layouts/scaffold/scaffold.js";
6
+ import '../../window.css';const p = "_window_7610fdb", u = { window: p }, g = a.forwardRef(function({
7
+ children: r,
8
+ className: t,
9
+ isOpen: e,
10
+ draggable: i = !0,
11
+ resizable: _ = !0,
12
+ veil: n = !1,
13
+ width: f,
14
+ height: c,
15
+ ...s
16
+ }, d) {
7
17
  return /* @__PURE__ */ o(
8
- w,
18
+ m,
9
19
  {
10
- isOpen: i,
11
- draggable: n,
12
- veil: f,
13
- className: d(l.window, "tcn-surface", "tcn-window", r),
14
- width: "auto",
15
- height: "auto",
16
- children: /* @__PURE__ */ o(a, { ref: c, ...e, children: t })
20
+ isOpen: e,
21
+ draggable: i,
22
+ veil: n,
23
+ className: w(u.window, "tcn-surface", "tcn-window", t),
24
+ width: f,
25
+ height: c,
26
+ ref: d,
27
+ ...s,
28
+ children: /* @__PURE__ */ o(l, { width: "100%", height: "100%", className: "tcn-window-scaffold", children: r })
17
29
  }
18
30
  );
19
31
  });
20
32
  export {
21
- W as Window
33
+ g as Window
22
34
  };
23
35
  //# sourceMappingURL=window.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window.js","sources":["../../../src/surfaces/window/window.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameOwnProps } from '../../overlay/frame/frame.js';\nimport { Scaffold, type ScaffoldProps } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './window.module.css';\n\nexport type WindowProps = FrameOwnProps & ScaffoldProps;\n\nexport const Window = React.forwardRef<HTMLElement, WindowProps>(function Window(\n { children, className, isOpen, draggable = true, veil = false, ...props }: WindowProps,\n ref\n) {\n return (\n <Frame\n isOpen={isOpen}\n draggable={draggable}\n veil={veil}\n className={clsx(styles['window'], 'tcn-surface', 'tcn-window', className)}\n width=\"auto\"\n height=\"auto\"\n >\n <Scaffold ref={ref} {...props}>\n {children}\n </Scaffold>\n </Frame>\n );\n});\n"],"names":["Window","React","children","className","isOpen","draggable","veil","props","ref","jsx","Frame","clsx","styles","Scaffold"],"mappings":";;;;;gDAUaA,IAASC,EAAM,WAAqC,SAC/D,EAAE,UAAAC,GAAU,WAAAC,GAAW,QAAAC,GAAQ,WAAAC,IAAY,IAAM,MAAAC,IAAO,IAAO,GAAGC,EAAA,GAClEC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAAN;AAAA,MACA,WAAAC;AAAA,MACA,MAAAC;AAAA,MACA,WAAWK,EAAKC,EAAO,QAAW,eAAe,cAAcT,CAAS;AAAA,MACxE,OAAM;AAAA,MACN,QAAO;AAAA,MAEP,UAAA,gBAAAM,EAACI,GAAA,EAAS,KAAAL,GAAW,GAAGD,GACrB,UAAAL,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"window.js","sources":["../../../src/surfaces/window/window.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameProps } from '../../overlay/frame/frame.js';\nimport { Scaffold } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './window.module.css';\n\nexport type WindowProps = FrameProps;\n\nexport const Window = React.forwardRef<HTMLElement, WindowProps>(function Window(\n {\n children,\n className,\n isOpen,\n draggable = true,\n resizable = true,\n veil = false,\n width,\n height,\n ...props\n }: WindowProps,\n ref\n) {\n return (\n <Frame\n isOpen={isOpen}\n draggable={draggable}\n veil={veil}\n className={clsx(styles['window'], 'tcn-surface', 'tcn-window', className)}\n width={width}\n height={height}\n ref={ref}\n {...props}\n >\n <Scaffold width=\"100%\" height=\"100%\" className={'tcn-window-scaffold'}>\n {children}\n </Scaffold>\n </Frame>\n );\n});\n"],"names":["Window","React","children","className","isOpen","draggable","resizable","veil","width","height","props","ref","jsx","Frame","clsx","styles","Scaffold"],"mappings":";;;;;gDAUaA,IAASC,EAAM,WAAqC,SAC/D;AAAA,EACE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAAT;AAAA,MACA,WAAAC;AAAA,MACA,MAAAE;AAAA,MACA,WAAWO,EAAKC,EAAO,QAAW,eAAe,cAAcZ,CAAS;AAAA,MACxE,OAAAK;AAAA,MACA,QAAAC;AAAA,MACA,KAAAE;AAAA,MACC,GAAGD;AAAA,MAEJ,UAAA,gBAAAE,EAACI,KAAS,OAAM,QAAO,QAAO,QAAO,WAAW,uBAC7C,UAAAd,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1 +1 @@
1
- @layer tcn-reset{html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,button,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}legend{all:unset;display:block;margin:0;padding:0;font:inherit;color:inherit}}
1
+ @layer tcn-reset{html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,button,video,dialog{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}legend{all:unset;display:block;margin:0;padding:0;font:inherit;color:inherit}dialog{max-width:none;max-height:none;background:transparent;color:inherit}}