@tcn/ui 0.8.0 → 0.9.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 (222) hide show
  1. package/dist/{Color-6BZIO3FS-CWWwv-fq.js → Color-6BZIO3FS-C9xkPWgz.js} +2 -2
  2. package/dist/{Color-6BZIO3FS-CWWwv-fq.js.map → Color-6BZIO3FS-C9xkPWgz.js.map} +1 -1
  3. package/dist/{WithTooltip-65CFNBJE-DvcUZizH.js → WithTooltip-65CFNBJE-DEnh547F.js} +2 -2
  4. package/dist/{WithTooltip-65CFNBJE-DvcUZizH.js.map → WithTooltip-65CFNBJE-DEnh547F.js.map} +1 -1
  5. package/dist/actions/__docs__/components/showcase.js +1 -1
  6. package/dist/actions/index.d.ts +1 -0
  7. package/dist/actions/index.d.ts.map +1 -1
  8. package/dist/actions/index.js +8 -6
  9. package/dist/actions/index.js.map +1 -1
  10. package/dist/body.css +1 -0
  11. package/dist/feedback/progress/progress_bar.js +13 -13
  12. package/dist/form/field/common/field_description.js +7 -8
  13. package/dist/form/field/common/field_description.js.map +1 -1
  14. package/dist/form/field/common/field_error.js +6 -6
  15. package/dist/form/field/common/field_label.js +7 -8
  16. package/dist/form/field/common/field_label.js.map +1 -1
  17. package/dist/form/field_set/field_set.js +7 -7
  18. package/dist/formatter-EIJCOSYU-DWmgEY3b.js +6 -0
  19. package/dist/{formatter-EIJCOSYU-D6nmx63h.js.map → formatter-EIJCOSYU-DWmgEY3b.js.map} +1 -1
  20. package/dist/inputs/color_input/color_input.js +10 -9
  21. package/dist/inputs/color_input/color_input.js.map +1 -1
  22. package/dist/inputs/date_picker/date_picker_date.js +6 -6
  23. package/dist/inputs/date_picker/date_picker_day.js +6 -6
  24. package/dist/inputs/date_picker/date_picker_header.js +7 -6
  25. package/dist/inputs/date_picker/date_picker_header.js.map +1 -1
  26. package/dist/inputs/date_picker/date_picker_input.js +3 -2
  27. package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
  28. package/dist/inputs/date_picker/date_picker_time_selector.js +8 -7
  29. package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -1
  30. package/dist/inputs/date_picker/date_picker_year_input.js +6 -5
  31. package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -1
  32. package/dist/inputs/date_picker/date_picker_year_selector.js +8 -7
  33. package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
  34. package/dist/inputs/multiselect/multiselect_inline_values.js +8 -7
  35. package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
  36. package/dist/inputs/multiselect/multiselect_values.js +3 -2
  37. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  38. package/dist/inputs/phone_number_input/phone_number_input.js +44 -43
  39. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  40. package/dist/inputs/select/select.js +3 -2
  41. package/dist/inputs/select/select.js.map +1 -1
  42. package/dist/inputs/suggestions/suggestion_list.js +9 -8
  43. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  44. package/dist/layouts/body/body.d.ts +6 -0
  45. package/dist/layouts/body/body.d.ts.map +1 -0
  46. package/dist/layouts/body/body.js +21 -0
  47. package/dist/layouts/body/body.js.map +1 -0
  48. package/dist/layouts/index.d.ts +7 -0
  49. package/dist/layouts/index.d.ts.map +1 -1
  50. package/dist/layouts/index.js +42 -22
  51. package/dist/layouts/index.js.map +1 -1
  52. package/dist/layouts/rail/main/main.d.ts +6 -0
  53. package/dist/layouts/rail/main/main.d.ts.map +1 -0
  54. package/dist/layouts/rail/main/main.js +21 -0
  55. package/dist/layouts/rail/main/main.js.map +1 -0
  56. package/dist/layouts/rail/rail.d.ts +9 -0
  57. package/dist/layouts/rail/rail.d.ts.map +1 -0
  58. package/dist/layouts/rail/rail.js +55 -0
  59. package/dist/layouts/rail/rail.js.map +1 -0
  60. package/dist/layouts/rail/side/side.d.ts +6 -0
  61. package/dist/layouts/rail/side/side.d.ts.map +1 -0
  62. package/dist/layouts/rail/side/side.js +21 -0
  63. package/dist/layouts/rail/side/side.js.map +1 -0
  64. package/dist/layouts/rail/utility_strip/utility_strip.d.ts +9 -0
  65. package/dist/layouts/rail/utility_strip/utility_strip.d.ts.map +1 -0
  66. package/dist/layouts/rail/utility_strip/utility_strip.js +32 -0
  67. package/dist/layouts/rail/utility_strip/utility_strip.js.map +1 -0
  68. package/dist/layouts/responsive/breakpoint.d.ts +11 -0
  69. package/dist/layouts/responsive/breakpoint.d.ts.map +1 -0
  70. package/dist/layouts/responsive/breakpoint.js +15 -0
  71. package/dist/layouts/responsive/breakpoint.js.map +1 -0
  72. package/dist/layouts/responsive/responsive.d.ts +7 -0
  73. package/dist/layouts/responsive/responsive.d.ts.map +1 -0
  74. package/dist/layouts/responsive/responsive.js +11 -0
  75. package/dist/layouts/responsive/responsive.js.map +1 -0
  76. package/dist/layouts/responsive/responsive_container.d.ts +7 -0
  77. package/dist/layouts/responsive/responsive_container.d.ts.map +1 -0
  78. package/dist/layouts/responsive/responsive_container.js +30 -0
  79. package/dist/layouts/responsive/responsive_container.js.map +1 -0
  80. package/dist/layouts/responsive/responsive_viewport.d.ts +7 -0
  81. package/dist/layouts/responsive/responsive_viewport.d.ts.map +1 -0
  82. package/dist/layouts/responsive/responsive_viewport.js +12 -0
  83. package/dist/layouts/responsive/responsive_viewport.js.map +1 -0
  84. package/dist/layouts/scaffold/scaffold.js +31 -31
  85. package/dist/layouts/scaffold/scaffold.js.map +1 -1
  86. package/dist/layouts/table/table.d.ts +27 -0
  87. package/dist/layouts/table/table.d.ts.map +1 -0
  88. package/dist/layouts/table/table.js +70 -0
  89. package/dist/layouts/table/table.js.map +1 -0
  90. package/dist/main.css +1 -0
  91. package/dist/rail.css +1 -0
  92. package/dist/scaffold.css +1 -1
  93. package/dist/{showcase-DK557szS.js → showcase-y9D3_Y8T.js} +3413 -3396
  94. package/dist/showcase-y9D3_Y8T.js.map +1 -0
  95. package/dist/side.css +1 -0
  96. package/dist/stacks/box/box.d.ts +2 -2
  97. package/dist/stacks/box/box.d.ts.map +1 -1
  98. package/dist/stacks/box/box.js.map +1 -1
  99. package/dist/stacks/story_components/style_box.d.ts +1 -1
  100. package/dist/stacks/story_components/style_box.d.ts.map +1 -1
  101. package/dist/surfaces/alert/alert.js +3 -2
  102. package/dist/surfaces/alert/alert.js.map +1 -1
  103. package/dist/surfaces/confirm/confirm.js +5 -5
  104. package/dist/surfaces/pop_confirm/pop_confirm.js +14 -2
  105. package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
  106. package/dist/{syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js → syntaxhighlighter-ED5Y7EFY-CqInEOwQ.js} +2 -2
  107. package/dist/{syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js.map → syntaxhighlighter-ED5Y7EFY-CqInEOwQ.js.map} +1 -1
  108. package/dist/table.css +1 -0
  109. package/dist/table.module-BtSxOntS.js +5 -0
  110. package/dist/table.module-BtSxOntS.js.map +1 -0
  111. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  112. package/dist/themes/themes/ergo/ergo_theme.js +174 -43
  113. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  114. package/dist/typography/body_text/body_text.d.ts +2 -1
  115. package/dist/typography/body_text/body_text.d.ts.map +1 -1
  116. package/dist/typography/body_text/body_text.js +24 -23
  117. package/dist/typography/body_text/body_text.js.map +1 -1
  118. package/dist/typography/callout/callout.d.ts +2 -1
  119. package/dist/typography/callout/callout.d.ts.map +1 -1
  120. package/dist/typography/callout/callout.js +28 -27
  121. package/dist/typography/callout/callout.js.map +1 -1
  122. package/dist/typography/caption/caption.d.ts +2 -1
  123. package/dist/typography/caption/caption.d.ts.map +1 -1
  124. package/dist/typography/caption/caption.js +18 -17
  125. package/dist/typography/caption/caption.js.map +1 -1
  126. package/dist/typography/footnote/footnote.d.ts +2 -1
  127. package/dist/typography/footnote/footnote.d.ts.map +1 -1
  128. package/dist/typography/footnote/footnote.js +25 -24
  129. package/dist/typography/footnote/footnote.js.map +1 -1
  130. package/dist/typography/headline/headline.d.ts +2 -1
  131. package/dist/typography/headline/headline.d.ts.map +1 -1
  132. package/dist/typography/headline/headline.js +36 -33
  133. package/dist/typography/headline/headline.js.map +1 -1
  134. package/dist/typography/subheadline/subheadline.d.ts +2 -1
  135. package/dist/typography/subheadline/subheadline.d.ts.map +1 -1
  136. package/dist/typography/subheadline/subheadline.js +35 -32
  137. package/dist/typography/subheadline/subheadline.js.map +1 -1
  138. package/dist/utility_strip.css +1 -0
  139. package/dist/utils/dnd/context.d.ts.map +1 -1
  140. package/dist/utils/dnd/context.js +9 -7
  141. package/dist/utils/dnd/context.js.map +1 -1
  142. package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -1
  143. package/dist/utils/dnd/hooks/use_drag_container.js +29 -15
  144. package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -1
  145. package/dist/utils/dnd/types.d.ts +3 -4
  146. package/dist/utils/dnd/types.d.ts.map +1 -1
  147. package/dist/utils/hooks/use_media_query.d.ts +5 -8
  148. package/dist/utils/hooks/use_media_query.d.ts.map +1 -1
  149. package/dist/utils/hooks/use_media_query.js +10 -11
  150. package/dist/utils/hooks/use_media_query.js.map +1 -1
  151. package/dist/utils/index.d.ts +1 -2
  152. package/dist/utils/index.d.ts.map +1 -1
  153. package/dist/utils/index.js +19 -21
  154. package/dist/utils/index.js.map +1 -1
  155. package/package.json +1 -1
  156. package/src/actions/index.ts +1 -0
  157. package/src/layouts/__stories__/composed.stories.tsx +113 -0
  158. package/src/layouts/__stories__/composed_stories.module.css +142 -0
  159. package/src/layouts/__stories__/utils.tsx +174 -0
  160. package/src/layouts/body/body.module.css +11 -0
  161. package/src/layouts/body/body.tsx +23 -0
  162. package/src/layouts/index.ts +12 -0
  163. package/src/layouts/rail/__stories__/rail.stories.tsx +64 -0
  164. package/src/layouts/rail/__stories__/rail_stories.module.css +25 -0
  165. package/src/layouts/rail/main/main.module.css +7 -0
  166. package/src/layouts/rail/main/main.tsx +26 -0
  167. package/src/layouts/rail/rail.module.css +10 -0
  168. package/src/layouts/rail/rail.tsx +62 -0
  169. package/src/layouts/rail/side/side.module.css +8 -0
  170. package/src/layouts/rail/side/side.tsx +25 -0
  171. package/src/layouts/rail/utility_strip/utility_strip.module.css +6 -0
  172. package/src/layouts/rail/utility_strip/utility_strip.tsx +40 -0
  173. package/src/layouts/responsive/breakpoint.tsx +29 -0
  174. package/src/layouts/responsive/responsive.stories.tsx +37 -0
  175. package/src/layouts/responsive/responsive.tsx +18 -0
  176. package/src/layouts/responsive/responsive_container.tsx +51 -0
  177. package/src/layouts/responsive/responsive_viewport.tsx +17 -0
  178. package/src/layouts/scaffold/__stories__/scaffold.stories.tsx +53 -0
  179. package/src/layouts/scaffold/__stories__/scaffold_stories.module.css +31 -0
  180. package/src/layouts/scaffold/scaffold.module.css +4 -0
  181. package/src/layouts/table/__stories__/mock_data.ts +420 -0
  182. package/src/layouts/table/__stories__/table.stories.tsx +326 -0
  183. package/src/layouts/table/__stories__/table_stories.module.css +30 -0
  184. package/src/layouts/table/table.module.css +37 -0
  185. package/src/layouts/table/table.tsx +132 -0
  186. package/src/stacks/box/box.tsx +1 -1
  187. package/src/surfaces/modal/__stories__/modal.stories.tsx +5 -5
  188. package/src/surfaces/panel/__stories__/panel.stories.tsx +114 -1
  189. package/src/surfaces/pop_confirm/pop_confirm.stories.tsx +4 -2
  190. package/src/themes/themes/ergo/ergo_theme.css +173 -42
  191. package/src/typography/body_text/body_text.tsx +21 -17
  192. package/src/typography/callout/callout.tsx +20 -16
  193. package/src/typography/caption/caption.tsx +20 -16
  194. package/src/typography/footnote/footnote.tsx +20 -16
  195. package/src/typography/headline/headline.tsx +60 -54
  196. package/src/typography/subheadline/subheadline.tsx +60 -54
  197. package/src/utils/dnd/__stories__/draggable.stories.tsx +34 -0
  198. package/src/utils/dnd/context.ts +1 -0
  199. package/src/utils/dnd/hooks/use_drag_container.ts +18 -1
  200. package/src/utils/dnd/types.ts +4 -1
  201. package/src/utils/hooks/use_media_query.ts +16 -27
  202. package/src/utils/index.ts +1 -3
  203. package/dist/body_text.module-h4XQE2pC.js +0 -5
  204. package/dist/body_text.module-h4XQE2pC.js.map +0 -1
  205. package/dist/callout.module-D8ECmxpO.js +0 -5
  206. package/dist/callout.module-D8ECmxpO.js.map +0 -1
  207. package/dist/caption.module-DDq0H4xZ.js +0 -5
  208. package/dist/caption.module-DDq0H4xZ.js.map +0 -1
  209. package/dist/footnote.module-DEyFuqOr.js +0 -5
  210. package/dist/footnote.module-DEyFuqOr.js.map +0 -1
  211. package/dist/formatter-EIJCOSYU-D6nmx63h.js +0 -6
  212. package/dist/headline.module-BiwHBtGf.js +0 -5
  213. package/dist/headline.module-BiwHBtGf.js.map +0 -1
  214. package/dist/showcase-DK557szS.js.map +0 -1
  215. package/dist/subheadline.module-C-v7zMkQ.js +0 -5
  216. package/dist/subheadline.module-C-v7zMkQ.js.map +0 -1
  217. package/dist/utils/responsive/responsive_renderer.d.ts +0 -21
  218. package/dist/utils/responsive/responsive_renderer.d.ts.map +0 -1
  219. package/dist/utils/responsive/responsive_renderer.js +0 -12
  220. package/dist/utils/responsive/responsive_renderer.js.map +0 -1
  221. package/src/utils/responsive/responsive_renderer.stories.tsx +0 -77
  222. package/src/utils/responsive/responsive_renderer.tsx +0 -31
@@ -23,65 +23,71 @@ export type SubheadlineProps = WithDetailedHTMLProps<
23
23
  'h3' | 'h4' | 'h5'
24
24
  >;
25
25
 
26
- export function Subheadline({
27
- size = 'md',
28
- emphasis = 'normal',
29
- hierarchy = 'primary',
30
- color,
31
- children,
32
- className,
33
- style = {},
34
- padStart,
35
- padEnd,
36
- padBottom,
37
- padTop,
38
- pad,
39
- selectable = true,
40
- }: SubheadlineProps) {
41
- let As: React.ElementType;
26
+ export const Subheadline = React.forwardRef<HTMLHeadingElement, SubheadlineProps>(
27
+ function Subheadline(
28
+ {
29
+ size = 'md',
30
+ emphasis = 'normal',
31
+ hierarchy = 'primary',
32
+ color,
33
+ children,
34
+ className,
35
+ style = {},
36
+ padStart,
37
+ padEnd,
38
+ padBottom,
39
+ padTop,
40
+ pad,
41
+ selectable = true,
42
+ }: SubheadlineProps,
43
+ ref
44
+ ) {
45
+ let As: React.ElementType;
42
46
 
43
- if (size === 'lg') {
44
- As = 'h3';
45
- } else if (size === 'md') {
46
- As = 'h4';
47
- } else {
48
- As = 'h5';
49
- }
47
+ if (size === 'lg') {
48
+ As = 'h3';
49
+ } else if (size === 'md') {
50
+ As = 'h4';
51
+ } else {
52
+ As = 'h5';
53
+ }
50
54
 
51
- if (pad) {
52
- style.padding = pad;
53
- }
55
+ if (pad) {
56
+ style.padding = pad;
57
+ }
54
58
 
55
- if (padStart) {
56
- style.paddingInlineStart = padStart;
57
- }
59
+ if (padStart) {
60
+ style.paddingInlineStart = padStart;
61
+ }
58
62
 
59
- if (padEnd) {
60
- style.paddingInlineEnd = padEnd;
61
- }
63
+ if (padEnd) {
64
+ style.paddingInlineEnd = padEnd;
65
+ }
62
66
 
63
- if (padTop) {
64
- style.paddingTop = padTop;
65
- }
67
+ if (padTop) {
68
+ style.paddingTop = padTop;
69
+ }
66
70
 
67
- if (padBottom) {
68
- style.paddingBottom = padBottom;
69
- }
71
+ if (padBottom) {
72
+ style.paddingBottom = padBottom;
73
+ }
70
74
 
71
- if (color) {
72
- style.color = color;
73
- }
75
+ if (color) {
76
+ style.color = color;
77
+ }
74
78
 
75
- return (
76
- <As
77
- data-hierarchy={hierarchy}
78
- data-emphasis={emphasis}
79
- data-selectable={selectable}
80
- className={clsx(styles['subheadline'], className, 'tcn-subheadline')}
81
- style={style}
82
- data-size={size}
83
- >
84
- {children}
85
- </As>
86
- );
87
- }
79
+ return (
80
+ <As
81
+ ref={ref}
82
+ data-hierarchy={hierarchy}
83
+ data-emphasis={emphasis}
84
+ data-selectable={selectable}
85
+ className={clsx(styles['subheadline'], className, 'tcn-subheadline')}
86
+ style={style}
87
+ data-size={size}
88
+ >
89
+ {children}
90
+ </As>
91
+ );
92
+ }
93
+ );
@@ -1,8 +1,10 @@
1
1
  import { Draggable } from '../draggable/draggable.js';
2
+ import { useDragContainer } from '../context.js';
2
3
  import { VStack } from '../../../stacks/v_stack.js';
3
4
  import { DragHandle } from '../handle.js';
4
5
  import { Box } from '../../../stacks/box/box.js';
5
6
  import { BodyText } from '../../../typography/index.js';
7
+ import { Button } from '../../../actions/button/button/button.js';
6
8
  import styles from './draggable_stories.module.css';
7
9
 
8
10
  export default {
@@ -46,3 +48,35 @@ export const DraggableStory = () => {
46
48
  </VStack>
47
49
  );
48
50
  };
51
+
52
+ function ResetPositionButton() {
53
+ const { setPosition } = useDragContainer();
54
+ return (
55
+ <Button onClick={() => setPosition({ x: 0, y: 0 })} hierarchy="secondary">
56
+ Reset position
57
+ </Button>
58
+ );
59
+ }
60
+
61
+ export const WithSetPosition = () => {
62
+ return (
63
+ <VStack minHeight="600px" height="100%" width="100%" gap="8px">
64
+ <BodyText>
65
+ Drag the box, then click &quot;Reset position&quot; to move it back to (0, 0).
66
+ Dragging again should start from the new position.
67
+ </BodyText>
68
+ <Draggable>
69
+ <Box width="400px" height="300px" className={styles['handle-container']}>
70
+ <VStack gap="8px" padding="8px">
71
+ <DragHandle>
72
+ <Box className={styles.handle} width="120px" padding="8px">
73
+ <BodyText>Drag Handle</BodyText>
74
+ </Box>
75
+ </DragHandle>
76
+ <ResetPositionButton />
77
+ </VStack>
78
+ </Box>
79
+ </Draggable>
80
+ </VStack>
81
+ );
82
+ };
@@ -6,6 +6,7 @@ const defaultValue: DragContainer = {
6
6
  unregisterHandle: () => {},
7
7
  isDragging: false,
8
8
  position: { x: 0, y: 0 },
9
+ setPosition: () => {},
9
10
  };
10
11
 
11
12
  export const DragContainerContext = createContext<DragContainer>(defaultValue);
@@ -30,6 +30,17 @@ export function useMakeDragContainer(options: UseDragContainerOptions): DragCont
30
30
  },
31
31
  });
32
32
 
33
+ const setPositionState = useCallback(
34
+ (value: Position | ((prev: Position) => Position)) => {
35
+ setPosition(prev => {
36
+ const next = typeof value === 'function' ? value(prev) : value;
37
+ positionRef.current = next;
38
+ return next;
39
+ });
40
+ },
41
+ []
42
+ );
43
+
33
44
  const registerHandle = useCallback((handle: React.RefObject<HTMLElement>) => {
34
45
  setHandles(prev => [...prev, handle]);
35
46
  }, []);
@@ -38,5 +49,11 @@ export function useMakeDragContainer(options: UseDragContainerOptions): DragCont
38
49
  setHandles(prev => prev.filter(h => h !== handle));
39
50
  }, []);
40
51
 
41
- return { registerHandle, unregisterHandle, position, isDragging };
52
+ return {
53
+ registerHandle,
54
+ unregisterHandle,
55
+ position,
56
+ isDragging,
57
+ setPosition: setPositionState,
58
+ };
42
59
  }
@@ -1,6 +1,9 @@
1
+ import type { Position } from '../types/dimensions.js';
2
+
1
3
  export interface DragContainer {
2
4
  registerHandle: (handle: React.RefObject<HTMLElement>) => void;
3
5
  unregisterHandle: (handle: React.RefObject<HTMLElement>) => void;
4
6
  isDragging: boolean;
5
- position: { x: number; y: number };
7
+ position: Position;
8
+ setPosition: (value: Position | ((prev: Position) => Position)) => void;
6
9
  }
@@ -1,32 +1,21 @@
1
- import React from 'react';
1
+ import { useLayoutEffect, useState } from 'react';
2
+ import { useResizeObserver } from './use_resize_observer.js';
2
3
 
3
- /**
4
- * Custom hook that returns a boolean indicating if the current viewport
5
- * matches the given media query.
6
- *
7
- * @param query - The media query to match against (e.g. "(min-width: 768px)")
8
- * @returns boolean indicating if the media query matches
9
- */
10
- export function useMediaQuery(query: string): boolean {
11
- const [matches, setMatches] = React.useState(false);
12
-
13
- React.useEffect(() => {
14
- const mediaQuery = window.matchMedia(query);
15
-
16
- // Set initial value
17
- setMatches(mediaQuery.matches);
18
-
19
- // Create event listener
20
- const handler = (event: MediaQueryListEvent) => {
21
- setMatches(event.matches);
22
- };
4
+ export interface ViewportSize {
5
+ width: number;
6
+ height: number;
7
+ }
23
8
 
24
- // Add the listener
25
- mediaQuery.addEventListener('change', handler);
9
+ export function useMediaQuery(): ViewportSize {
10
+ const [size, setSize] = useState<ViewportSize>({ width: 0, height: 0 });
11
+ const resizeRef = useResizeObserver((width, height) => {
12
+ setSize({ width, height });
13
+ });
26
14
 
27
- // Clean up
28
- return () => mediaQuery.removeEventListener('change', handler);
29
- }, [query]);
15
+ useLayoutEffect(() => {
16
+ const body = document.body;
17
+ resizeRef(body);
18
+ }, [resizeRef]);
30
19
 
31
- return matches;
20
+ return size;
32
21
  }
@@ -5,8 +5,8 @@ export * from './scroll_away_listener.js';
5
5
  export * from './dnd/hooks/use_draggable.js';
6
6
  export * from './hooks/make_context_hook.js';
7
7
  export * from './hooks/use_fork_ref.js';
8
- export * from './hooks/use_media_query.js';
9
8
  export * from './hooks/use_resize_observer.js';
9
+ export * from './hooks/use_media_query.js';
10
10
 
11
11
  export * from './default_value.js';
12
12
 
@@ -19,7 +19,5 @@ export * from './calendar/month.js';
19
19
  export * from './types/dimensions.js';
20
20
  export * from './types/variations.js';
21
21
 
22
- export * from './responsive/responsive_renderer.js';
23
-
24
22
  export * from './dnd/draggable/draggable.js';
25
23
  export * from './dnd/handle.js';
@@ -1,5 +0,0 @@
1
- import './body_text.css';const t = "_body-text_ee60621", e = { "body-text": t };
2
- export {
3
- e as s
4
- };
5
- //# sourceMappingURL=body_text.module-h4XQE2pC.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"body_text.module-h4XQE2pC.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- import './callout.css';const s = "_callout_32c6400", t = { callout: s };
2
- export {
3
- t as s
4
- };
5
- //# sourceMappingURL=callout.module-D8ECmxpO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"callout.module-D8ECmxpO.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- import './caption.css';const s = "_caption_94e02c4", t = { caption: s };
2
- export {
3
- t as s
4
- };
5
- //# sourceMappingURL=caption.module-DDq0H4xZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"caption.module-DDq0H4xZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- import './footnote.css';const o = "_footnote_f4b25ae", t = { footnote: o };
2
- export {
3
- t as s
4
- };
5
- //# sourceMappingURL=footnote.module-DEyFuqOr.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"footnote.module-DEyFuqOr.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,6 +0,0 @@
1
- import { d as a, _ as i, r as m } from "./showcase-DK557szS.js";
2
- var t = i(m(), 1), f = (0, t.default)(2)(async (e, r) => e === !1 ? r : a(r));
3
- export {
4
- f as formatter
5
- };
6
- //# sourceMappingURL=formatter-EIJCOSYU-D6nmx63h.js.map
@@ -1,5 +0,0 @@
1
- import './headline.css';const e = "_headline_9a99308", s = { headline: e };
2
- export {
3
- s
4
- };
5
- //# sourceMappingURL=headline.module-BiwHBtGf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"headline.module-BiwHBtGf.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}