twenty-ui 2.42.0 → 2.43.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 (212) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +11 -6
  3. package/dist/{AllIcons-DMeLF1LP.cjs → AllIcons-D_4JeQkX.cjs} +1 -1
  4. package/dist/{AllIcons-BkHLT6oe.js → AllIcons-Z8o0B2fy.js} +1 -1
  5. package/dist/{Avatar-C_TzSJBe.js → Avatar-BSHgTxt-.js} +2 -2
  6. package/dist/Avatar-DTNH6Ku7.cjs +1 -0
  7. package/dist/Input-CFXY05bj.cjs +1 -0
  8. package/dist/Input-DHfmRBq5.js +116 -0
  9. package/dist/{ListItem-D75aS69B.cjs → ListItem-2dHkY1NB.cjs} +1 -1
  10. package/dist/{ListItem-C08r49UJ.js → ListItem-D6DvFIbl.js} +3 -3
  11. package/dist/ListItem.module-CveFbY4M.cjs +1 -0
  12. package/dist/ListItem.module-DtIGiTDL.js +38 -0
  13. package/dist/{Loader-DbOLVUcK.js → Loader-X1LymYkw.js} +4 -4
  14. package/dist/Loader-Z6_7AA-x.cjs +1 -0
  15. package/dist/MenuSeparator-DJOspG7J.cjs +1 -0
  16. package/dist/MenuSeparator-dNx4JE6C.js +66 -0
  17. package/dist/{OverflowingTextWithTooltip-BXWJtb0f.js → OverflowingTextWithTooltip-CqEkoH6t.js} +1 -1
  18. package/dist/OverflowingTextWithTooltip-bn6EwWeq.cjs +1 -0
  19. package/dist/ResizeHandle-DN1bRxQb.js +89 -0
  20. package/dist/ResizeHandle-cll01qBQ.cjs +1 -0
  21. package/dist/TabsTabContent-BseLV1Wk.cjs +1 -0
  22. package/dist/TabsTabContent-_NCTxoP6.js +40 -0
  23. package/dist/components/code-editor/CodeEditor/CodeEditor.d.ts +1 -1
  24. package/dist/components/code-editor/CodeEditor/types/CodeEditorProps.d.ts +1 -0
  25. package/dist/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme.d.ts +1 -1
  26. package/dist/components/code-editor.cjs +1 -1
  27. package/dist/components/code-editor.mjs +54 -52
  28. package/dist/components/data-display/AvatarGroup/AvatarGroup.d.ts +1 -1
  29. package/dist/components/data-display/AvatarGroup/types/AvatarGroupProps.d.ts +3 -0
  30. package/dist/components/index.d.ts +15 -0
  31. package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -2
  32. package/dist/components/navigation/Dropdown/Dropdown.d.ts +21 -0
  33. package/dist/components/navigation/Dropdown/__stories__/DropdownNestedExample.d.ts +1 -0
  34. package/dist/components/navigation/Dropdown/__stories__/DropdownPagesExample.d.ts +1 -0
  35. package/dist/components/navigation/Dropdown/__stories__/DropdownPanelExample.d.ts +1 -0
  36. package/dist/components/navigation/Dropdown/__stories__/DropdownPickerExample.d.ts +4 -0
  37. package/dist/components/navigation/Dropdown/internal/DropdownActionItem.d.ts +2 -0
  38. package/dist/components/navigation/Dropdown/internal/DropdownBack.d.ts +2 -0
  39. package/dist/components/navigation/Dropdown/internal/DropdownClose.d.ts +2 -0
  40. package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +2 -0
  41. package/dist/components/navigation/Dropdown/internal/DropdownContext.d.ts +2 -0
  42. package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +37 -0
  43. package/dist/components/navigation/Dropdown/internal/DropdownEmpty.d.ts +2 -0
  44. package/dist/components/navigation/Dropdown/internal/DropdownFocusTarget.d.ts +6 -0
  45. package/dist/components/navigation/Dropdown/internal/DropdownHeader.d.ts +2 -0
  46. package/dist/components/navigation/Dropdown/internal/DropdownLoading.d.ts +2 -0
  47. package/dist/components/navigation/Dropdown/internal/DropdownNestedRootEffect.d.ts +6 -0
  48. package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +2 -0
  49. package/dist/components/navigation/Dropdown/internal/DropdownPage.d.ts +2 -0
  50. package/dist/components/navigation/Dropdown/internal/DropdownPageFocusEffect.d.ts +6 -0
  51. package/dist/components/navigation/Dropdown/internal/DropdownPageFocusRequest.d.ts +5 -0
  52. package/dist/components/navigation/Dropdown/internal/DropdownRoot.d.ts +4 -0
  53. package/dist/components/navigation/Dropdown/internal/DropdownSearch.d.ts +2 -0
  54. package/dist/components/navigation/Dropdown/internal/DropdownSearchTargetEffect.d.ts +5 -0
  55. package/dist/components/navigation/Dropdown/internal/DropdownSection.d.ts +2 -0
  56. package/dist/components/navigation/Dropdown/internal/DropdownSeparator.d.ts +2 -0
  57. package/dist/components/navigation/Dropdown/internal/DropdownSubmenu.d.ts +2 -0
  58. package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +2 -0
  59. package/dist/components/navigation/Dropdown/internal/DropdownTitle.d.ts +2 -0
  60. package/dist/components/navigation/Dropdown/internal/DropdownTrigger.d.ts +2 -0
  61. package/dist/components/navigation/Dropdown/internal/getDropdownFocusTarget.d.ts +8 -0
  62. package/dist/components/navigation/Dropdown/internal/getDropdownItemLabel.d.ts +1 -0
  63. package/dist/components/navigation/Dropdown/internal/getDropdownItems.d.ts +1 -0
  64. package/dist/components/navigation/Dropdown/internal/getDropdownSearchTarget.d.ts +1 -0
  65. package/dist/components/navigation/Dropdown/internal/getDropdownTrigger.d.ts +1 -0
  66. package/dist/components/navigation/Dropdown/internal/getNextDropdownItem.d.ts +7 -0
  67. package/dist/components/navigation/Dropdown/internal/isUnhandledModifierShortcut.d.ts +2 -0
  68. package/dist/components/navigation/Dropdown/internal/preventDismissingClickActivation.d.ts +1 -0
  69. package/dist/components/navigation/Dropdown/internal/useDropdownContext.d.ts +1 -0
  70. package/dist/components/navigation/Dropdown/internal/useDropdownItemFocus.d.ts +7 -0
  71. package/dist/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.d.ts +7 -0
  72. package/dist/components/navigation/Dropdown/types/DropdownActionItemProps.d.ts +10 -0
  73. package/dist/components/navigation/Dropdown/types/DropdownCloseProps.d.ts +4 -0
  74. package/dist/components/navigation/Dropdown/types/DropdownContentProps.d.ts +5 -0
  75. package/dist/components/navigation/Dropdown/types/DropdownHeaderProps.d.ts +2 -0
  76. package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -0
  77. package/dist/components/navigation/Dropdown/types/DropdownPageProps.d.ts +7 -0
  78. package/dist/components/navigation/Dropdown/types/DropdownRootProps.d.ts +11 -0
  79. package/dist/components/navigation/Dropdown/types/DropdownSearchProps.d.ts +4 -0
  80. package/dist/components/navigation/Dropdown/types/DropdownSectionProps.d.ts +5 -0
  81. package/dist/components/navigation/Dropdown/types/DropdownSubmenuProps.d.ts +2 -0
  82. package/dist/components/navigation/Dropdown/types/DropdownSubmenuTriggerProps.d.ts +6 -0
  83. package/dist/components/navigation/Dropdown/types/DropdownTitleProps.d.ts +2 -0
  84. package/dist/components/navigation/Dropdown/types/DropdownTriggerProps.d.ts +2 -0
  85. package/dist/components/navigation/Dropdown/types/DropdownType.d.ts +1 -0
  86. package/dist/components-BYWo2sUE.cjs +1 -0
  87. package/dist/components-C96xU59U.js +1996 -0
  88. package/dist/components.cjs +1 -1
  89. package/dist/components.mjs +40 -39
  90. package/dist/data-display-BQ9g9oSc.cjs +1 -0
  91. package/dist/{data-display-YQG01UPq.js → data-display-z9gKjkPS.js} +30 -30
  92. package/dist/icon/constants/TwentyIconDictionary.d.ts +9 -0
  93. package/dist/icon/providers/internal/AllIcons.d.ts +1 -1
  94. package/dist/{icon-CDy3-hqV.js → icon-Bd81r48z.js} +131 -117
  95. package/dist/icon-iD9IXJmn.cjs +1 -0
  96. package/dist/icon.cjs +1 -1
  97. package/dist/icon.mjs +1 -1
  98. package/dist/index.cjs +1 -1
  99. package/dist/index.d.ts +0 -1
  100. package/dist/index.mjs +554 -557
  101. package/dist/individual-entry.d.ts +0 -1
  102. package/dist/input-C8IiOA9Q.js +335 -0
  103. package/dist/input-NBD4DP8j.cjs +1 -0
  104. package/dist/{navigation-e5PTdnND.cjs → navigation-BqZBteC2.cjs} +1 -1
  105. package/dist/{navigation-Z7puI3wl.js → navigation-CLMgaqS8.js} +1 -1
  106. package/dist/primitives/data-display.cjs +1 -1
  107. package/dist/primitives/data-display.mjs +2 -2
  108. package/dist/primitives/feedback.cjs +1 -1
  109. package/dist/primitives/feedback.mjs +1 -1
  110. package/dist/primitives/input/ButtonGroup/internal/ButtonGroupContext.d.ts +1 -1
  111. package/dist/primitives/input/SegmentedControl/SegmentedControl.d.ts +2 -29
  112. package/dist/primitives/input/SegmentedControl/types/SegmentedControlOption.d.ts +13 -0
  113. package/dist/primitives/input/SegmentedControl/types/SegmentedControlProps.d.ts +10 -0
  114. package/dist/primitives/input/index.d.ts +2 -1
  115. package/dist/primitives/input.cjs +1 -1
  116. package/dist/primitives/input.mjs +12 -12
  117. package/dist/primitives/layout/ResizeHandle/ResizeHandle.d.ts +2 -9
  118. package/dist/primitives/layout/ResizeHandle/__stories__/ControlledResizeHandle.d.ts +2 -0
  119. package/dist/primitives/layout/ResizeHandle/__stories__/ResizableDemo.d.ts +3 -0
  120. package/dist/primitives/layout/ResizeHandle/__stories__/withMockPointerCapture.d.ts +4 -0
  121. package/dist/primitives/layout/ResizeHandle/internal/ResizeHandleDefaults.constant.d.ts +6 -0
  122. package/dist/primitives/layout/ResizeHandle/internal/useResizeHandleInteraction.d.ts +19 -0
  123. package/dist/primitives/layout/ResizeHandle/types/ResizeHandleProps.d.ts +11 -0
  124. package/dist/primitives/layout/index.d.ts +1 -1
  125. package/dist/primitives/layout.cjs +1 -1
  126. package/dist/primitives/layout.mjs +7 -8
  127. package/dist/primitives/navigation.cjs +1 -1
  128. package/dist/primitives/navigation.mjs +2 -2
  129. package/dist/primitives/surfaces/Card/Card.d.ts +17 -7
  130. package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +8 -0
  131. package/dist/primitives/surfaces/index.d.ts +0 -3
  132. package/dist/primitives/surfaces.cjs +1 -1
  133. package/dist/primitives/surfaces.mjs +8 -10
  134. package/dist/primitives/typography.cjs +1 -1
  135. package/dist/primitives/typography.mjs +1 -1
  136. package/dist/primitives.cjs +1 -1
  137. package/dist/primitives.mjs +59 -62
  138. package/dist/style.css +1 -1
  139. package/dist/surfaces-DX8oX1ou.js +254 -0
  140. package/dist/surfaces-uuLwsFxg.cjs +1 -0
  141. package/dist/testing/index.d.ts +1 -3
  142. package/dist/testing/utils/overrideMediaQueryMatches.d.ts +1 -0
  143. package/dist/testing.cjs +1 -1
  144. package/dist/testing.mjs +98 -102
  145. package/dist/theme/ThemeOverrides.d.ts +1 -0
  146. package/dist/theme/ThemeProvider.d.ts +3 -0
  147. package/dist/theme/ThemeProviderProps.d.ts +13 -0
  148. package/dist/{theme-constants → theme}/getNextThemeColor.d.ts +1 -1
  149. package/dist/theme/index.d.ts +10 -0
  150. package/dist/theme/internal/ThemeContextType.d.ts +6 -0
  151. package/dist/theme/internal/computeThemeFromCss.d.ts +2 -0
  152. package/dist/theme/internal/getThemeContext.d.ts +3 -0
  153. package/dist/theme/internal/getThemeScopeContext.d.ts +2 -0
  154. package/dist/theme/internal/resolveExplicitTheme.d.ts +5 -0
  155. package/dist/{theme-OwFrow8b.js → theme-DBro6iwF.js} +1198 -23
  156. package/dist/theme-DNG4OSBd.cjs +1 -0
  157. package/dist/theme.cjs +1 -1
  158. package/dist/theme.mjs +14 -7
  159. package/dist/utilities/color/utils/stringToThemeColorP3String.d.ts +1 -2
  160. package/dist/utilities/index.d.ts +3 -1
  161. package/dist/utilities/responsive/constants/MobileMediaQuery.d.ts +1 -0
  162. package/dist/utilities/responsive/constants/TouchDeviceMediaQuery.d.ts +1 -0
  163. package/dist/utilities/responsive/hooks/useMediaQuery.d.ts +1 -0
  164. package/dist/utilities/responsive/internal/getMediaQueryStore.d.ts +6 -0
  165. package/dist/utilities-BlvbRryv.cjs +1 -0
  166. package/dist/utilities-C5Tt2HLT.js +56 -0
  167. package/dist/utilities.cjs +1 -1
  168. package/dist/utilities.mjs +17 -15
  169. package/package.json +2 -16
  170. package/dist/Avatar-BGFK0_a_.cjs +0 -1
  171. package/dist/ListItem.module-CFDku7rI.cjs +0 -1
  172. package/dist/ListItem.module-DBhzbt9-.js +0 -38
  173. package/dist/Loader-CHKTYJo7.cjs +0 -1
  174. package/dist/OverflowingTextWithTooltip-DpizuDxR.cjs +0 -1
  175. package/dist/ResizeHandle-BWfY2ONo.js +0 -37
  176. package/dist/ResizeHandle-IVbYS3b8.cjs +0 -1
  177. package/dist/Switch-BvVP6vjR.js +0 -101
  178. package/dist/Switch-DuoJ4ytC.cjs +0 -1
  179. package/dist/TabsTabContent-BWQCg7Ua.js +0 -40
  180. package/dist/TabsTabContent-ChqlTk3P.cjs +0 -1
  181. package/dist/chunk-u_mIcLyS.cjs +0 -1
  182. package/dist/components-B2Pdf_yn.js +0 -1459
  183. package/dist/components-DfhgWbKW.cjs +0 -1
  184. package/dist/data-display-QOdhAohf.cjs +0 -1
  185. package/dist/icon-lF2kxwql.cjs +0 -1
  186. package/dist/input-C2q7tGPj.js +0 -383
  187. package/dist/input-CAX9aS7C.cjs +0 -1
  188. package/dist/primitives/layout/ResizeHandle/hooks/useResizeHandle.d.ts +0 -10
  189. package/dist/surfaces-Cr4lhCvZ.js +0 -306
  190. package/dist/surfaces-CuxI6145.cjs +0 -1
  191. package/dist/testing/decorators/ComponentWithRouterDecorator.d.ts +0 -9
  192. package/dist/testing/decorators/RouterDecorator.d.ts +0 -2
  193. package/dist/theme-YHfZnD2U.cjs +0 -1
  194. package/dist/theme-constants/ThemeProvider.d.ts +0 -15
  195. package/dist/theme-constants/ThemeScopeContext.d.ts +0 -1
  196. package/dist/theme-constants/index.d.ts +0 -10
  197. package/dist/theme-constants-CrrgAYWN.js +0 -1163
  198. package/dist/theme-constants-ZNgkgDE-.cjs +0 -1
  199. package/dist/theme-constants.cjs +0 -1
  200. package/dist/theme-constants.mjs +0 -12
  201. package/dist/utilities/screen-size/hooks/useScreenSize.d.ts +0 -4
  202. package/dist/utilities-D7Z6Uof8.cjs +0 -1
  203. package/dist/utilities-FXsKnNbt.js +0 -49
  204. /package/dist/primitives/surfaces/{CardContent → Card/internal}/CardContent.d.ts +0 -0
  205. /package/dist/primitives/surfaces/{CardFooter → Card/internal}/CardFooter.d.ts +0 -0
  206. /package/dist/primitives/surfaces/{CardHeader → Card/internal}/CardHeader.d.ts +0 -0
  207. /package/dist/{theme-constants/constants.d.ts → theme/constants/MobileViewport.d.ts} +0 -0
  208. /package/dist/{theme-constants → theme}/themeCssVariables.d.ts +0 -0
  209. /package/dist/{theme-constants → theme}/themeTypes.d.ts +0 -0
  210. /package/dist/{theme-constants → theme}/useTheme.d.ts +0 -0
  211. /package/dist/{theme-constants → theme}/useThemeColorScheme.d.ts +0 -0
  212. /package/dist/{theme-constants → theme}/useThemeContainer.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -4,9 +4,21 @@
4
4
 
5
5
  ### Breaking Changes
6
6
 
7
+ - `Card` is now a compound component. Import `Card` from `twenty-ui/primitives/surfaces`, replace `<Card>` with `<Card.Root>`, and replace the removed `CardHeader`, `CardContent`, and `CardFooter` exports with `Card.Header`, `Card.Content`, and `Card.Footer`. Use `Card.Root` in styled wrappers and prop types. Rendering, styling, props, and independent use of the parts are unchanged. See the [Card migration guide](https://docs.twenty.com/ui/primitives/surfaces/card#migration).
8
+ - The in-repo Slack app still uses the separately versioned `twenty-ui@^1.0.0-alpha.1` package. Migrate its `twenty-ui/surfaces` import and `<Card>` usage together with its UI dependency upgrade; that published version does not expose `Card.Root`.
9
+ - Removed the unused `useScreenSize` export. `useIsMobile` and `useIsTouchDevice` remain available from `twenty-ui/utilities` and now subscribe to native `matchMedia` changes. Both return `false` during server rendering, initial hydration, and when `matchMedia` is unavailable. `react-responsive` context overrides no longer affect these hooks; use `overrideMediaQueryMatches` from `twenty-ui/testing` to force a result in stories.
10
+ - All theme exports now live in `twenty-ui/theme`. The `twenty-ui/theme-constants` entry, `ThemeContext`, `ThemeScopeContext`, and `ThemeContextType` are removed. Read values with `useTheme`, `useThemeColorScheme`, and `useThemeContainer`; configure them with `ThemeProvider`. The top-level theme stylesheet URLs and token values are unchanged.
11
+ - Worker apps retain provider-less CSS-variable values. Apps that supplied a context value can pass `THEME_LIGHT` or `THEME_DARK` directly through `ThemeProvider`'s `theme` prop. The in-repo call-recorder, companion, fireflies, Granola, Slack, and Teams apps import `twenty-ui/theme-constants` and must move those imports to `twenty-ui/theme` when they upgrade; call-recorder and Granola must also replace their `ThemeContext` providers with the `theme` prop. Their current pinned UI versions expose neither, so each app needs a coordinated source and dependency upgrade.
12
+ - `twenty-ui/testing` no longer exports `RouterDecorator`, `ComponentWithRouterDecorator`, `RouteParams`, `isRouteParams`, or `computeLocation`. Use application-owned router decorators when routing is needed, or `ComponentDecorator` for router-free stories. React Router is no longer a peer dependency.
13
+ - `ResizeHandle` owns pointer and keyboard resizing through `value`/`onValueChange` or `defaultValue`, with configurable `min`, `max`, and `step`. The public `useResizeHandle` hook is removed.
7
14
  - **Public module ownership changes without a deprecation window.** This release removes 55 public React exports and the `twenty-ui/primitives/json-visualizer` entry point. Applications using the removed imports must migrate when upgrading; compatibility exports are not provided.
8
15
  - Import shared compositions, including `JsonTree`, menu presets, and Toast components and hooks, from `twenty-ui/components`. Foundational controls retain `twenty-ui/primitives/<family>` imports. The optional code editor retains `twenty-ui/components/code-editor`.
9
16
  - Field displays, application links, placeholders, and feature animations are no longer package exports. External applications must own these integrations or compose supported primitives. Internal implementation parts are private.
10
17
  - `Info` uses `href` and `render` in place of `to`. Replace `AnimatedEaseInOut` with `AnimatedExpandableContainer`.
18
+ - `SegmentedControl` is a radio group. Use `aria-label` or `aria-labelledby` (one is required), `value` or `defaultValue`, and `onValueChange(value, eventDetails)` in place of `ariaLabel`, `value`, and `onChange(value)`. Options take `startIcon` and `'aria-label'` in place of `Icon` and `ariaLabel`. `role` and `width` are removed: use `Tabs` for tab lists and `className` or `style` to size the control. Arrow keys select the next option, Enter no longer selects, and choosing the selected option again no longer calls `onValueChange`.
11
19
 
12
20
  Keep `twenty-ui`, `twenty-sdk`, and `twenty-client-sdk` versions aligned when upgrading Twenty apps.
21
+
22
+ ### Added
23
+
24
+ - `twenty-ui/utilities` exports `useMediaQuery`, `MOBILE_MEDIA_QUERY`, and `TOUCH_DEVICE_MEDIA_QUERY`. `twenty-ui/testing` exports `overrideMediaQueryMatches`.
package/README.md CHANGED
@@ -35,7 +35,7 @@ For Twenty apps, follow [Using Twenty UI components](https://docs.twenty.com/dev
35
35
  For a standalone React application, import the base styles once, pick a theme stylesheet, and wrap your app in `ThemeProvider`:
36
36
 
37
37
  ```tsx
38
- import { ThemeProvider } from 'twenty-ui/theme-constants';
38
+ import { ThemeProvider } from 'twenty-ui/theme';
39
39
  import { Button } from 'twenty-ui/primitives/input';
40
40
 
41
41
  import 'twenty-ui/style.css';
@@ -72,9 +72,8 @@ import { Button } from 'twenty-ui/primitives/input';
72
72
  | `twenty-ui/primitives/navigation` | Action links, list items, and tabs |
73
73
  | `twenty-ui/primitives/surfaces` | Cards, dialogs, menus, popovers, and tooltips |
74
74
  | `twenty-ui/primitives/typography` | Text and headings |
75
- | `twenty-ui/testing` | Storybook and test decorators |
76
- | `twenty-ui/theme` | Theme types and helpers |
77
- | `twenty-ui/theme-constants` | Design tokens, `ThemeProvider`, and `useTheme` |
75
+ | `twenty-ui/testing` | Storybook and test decorators and helpers |
76
+ | `twenty-ui/theme` | Design tokens, `ThemeProvider`, and `useTheme` |
78
77
  | `twenty-ui/utilities` | Hooks and shared utilities |
79
78
 
80
79
  # Theming
@@ -83,6 +82,12 @@ import { Button } from 'twenty-ui/primitives/input';
83
82
  - `twenty-ui/theme-light.css` and `twenty-ui/theme-dark.css` define the design-token CSS variables for each color scheme.
84
83
  - `ThemeProvider` exposes the active theme through `useTheme()` and applies the `light` / `dark` class. Pass `applyToRoot={false}` with `overrides` to scope a theme to a subtree instead of the document root.
85
84
 
85
+ # Responsive hooks
86
+
87
+ - `useIsMobile` matches `MOBILE_MEDIA_QUERY` (up to and including `MOBILE_VIEWPORT`). `useIsTouchDevice` matches `TOUCH_DEVICE_MEDIA_QUERY` and is independent of width: branch interaction behavior on it, and layout on `useIsMobile`.
88
+ - `useMediaQuery(query)` subscribes to native `matchMedia` changes and shares one `MediaQueryList` per query. It returns `false` during server rendering and the first hydration render, and wherever `window.matchMedia` is unavailable, including the front component sandbox.
89
+ - To force a result in a story, return `overrideMediaQueryMatches({ [MOBILE_MEDIA_QUERY]: true })` from `beforeEach`; the returned cleanup restores the native `matchMedia`.
90
+
86
91
  # Development
87
92
 
88
93
  Shared component sources live in `src/components/{data-display,feedback,input,layout,navigation,typography}`, with the optional editor in `src/components/code-editor`. Keep each component's types, stories, tests, and private parts beside its implementation. The generated `components` barrel provides the public imports.
@@ -118,8 +123,8 @@ twenty-ui is released under the [MIT](https://github.com/twentyhq/twenty/blob/ma
118
123
 
119
124
  Primitives provide foundational interaction and presentation. Shared components compose primitives into reusable presets, pickers, menu rows, notifications, and the JSON viewer. Both layers accept data, labels, and callbacks from their host.
120
125
 
121
- Routing adapters, record formatting, product illustrations, and feature-specific animation belong to `twenty-front`. Implementation parts live in `internal` or `parts` directories and are excluded from published barrels.
126
+ Record formatting, product illustrations, and feature-specific animation belong to `twenty-front`. Implementation parts live in `internal` or `parts` directories and are excluded from published barrels.
122
127
 
123
128
  Run `node --import tsx scripts/checkModuleOwnership.ts` from this package after changing the public interface. When intentionally adding or removing a public React component, regenerate `docs/module-ownership.json` with `node --import tsx scripts/checkModuleOwnership.ts --write` and review the snapshot diff. CI checks the committed snapshot and the dependency boundaries without updating them.
124
129
 
125
- `twenty-ui/testing` includes routing decorators and requires the optional `react-router-dom` peer. The package check verifies each published entry point, allowing that peer only in testing and the Monaco peers only in `twenty-ui/components/code-editor`.
130
+ The package check allows the optional Monaco peers only in `twenty-ui/components/code-editor`.