@vector-im/compound-web 8.2.0 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/dist/components/ActivityMarker/Pill.cjs.map +1 -1
  2. package/dist/components/ActivityMarker/Pill.d.ts.map +1 -1
  3. package/dist/components/ActivityMarker/Pill.js.map +1 -1
  4. package/dist/components/ActivityMarker/Unread.cjs.map +1 -1
  5. package/dist/components/ActivityMarker/Unread.d.ts.map +1 -1
  6. package/dist/components/ActivityMarker/Unread.js.map +1 -1
  7. package/dist/components/ActivityMarker/UnreadCounter.cjs.map +1 -1
  8. package/dist/components/ActivityMarker/UnreadCounter.d.ts.map +1 -1
  9. package/dist/components/ActivityMarker/UnreadCounter.js.map +1 -1
  10. package/dist/components/Alert/Alert.cjs.map +1 -1
  11. package/dist/components/Alert/Alert.d.ts.map +1 -1
  12. package/dist/components/Alert/Alert.js.map +1 -1
  13. package/dist/components/Avatar/Avatar.cjs.map +1 -1
  14. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  15. package/dist/components/Avatar/Avatar.js.map +1 -1
  16. package/dist/components/Avatar/AvatarStack.cjs.map +1 -1
  17. package/dist/components/Avatar/AvatarStack.js.map +1 -1
  18. package/dist/components/Avatar/avatar-clip.mask.svg.cjs.map +1 -1
  19. package/dist/components/Avatar/avatar-clip.mask.svg.js.map +1 -1
  20. package/dist/components/Avatar/useIdColorHash.cjs.map +1 -1
  21. package/dist/components/Avatar/useIdColorHash.js.map +1 -1
  22. package/dist/components/Badge/Badge.cjs.map +1 -1
  23. package/dist/components/Badge/Badge.d.ts.map +1 -1
  24. package/dist/components/Badge/Badge.js.map +1 -1
  25. package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
  26. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  27. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  28. package/dist/components/Button/Button.cjs.map +1 -1
  29. package/dist/components/Button/Button.d.ts.map +1 -1
  30. package/dist/components/Button/Button.js.map +1 -1
  31. package/dist/components/Button/IconButton/IconButton.cjs.map +1 -1
  32. package/dist/components/Button/IconButton/IconButton.d.ts.map +1 -1
  33. package/dist/components/Button/IconButton/IconButton.js.map +1 -1
  34. package/dist/components/Button/UnstyledButton.cjs.map +1 -1
  35. package/dist/components/Button/UnstyledButton.d.ts.map +1 -1
  36. package/dist/components/Button/UnstyledButton.js.map +1 -1
  37. package/dist/components/ChatFilter/ChatFilter.cjs.map +1 -1
  38. package/dist/components/ChatFilter/ChatFilter.d.ts.map +1 -1
  39. package/dist/components/ChatFilter/ChatFilter.js.map +1 -1
  40. package/dist/components/Dropdown/Dropdown.cjs.map +1 -1
  41. package/dist/components/Dropdown/Dropdown.js.map +1 -1
  42. package/dist/components/Form/Controls/Action/Action.cjs.map +1 -1
  43. package/dist/components/Form/Controls/Action/Action.d.ts.map +1 -1
  44. package/dist/components/Form/Controls/Action/Action.js.map +1 -1
  45. package/dist/components/Form/Controls/Checkbox/Checkbox.cjs.map +1 -1
  46. package/dist/components/Form/Controls/Checkbox/Checkbox.d.ts.map +1 -1
  47. package/dist/components/Form/Controls/Checkbox/Checkbox.js.map +1 -1
  48. package/dist/components/Form/Controls/EditInPlace/EditInPlace.cjs.map +1 -1
  49. package/dist/components/Form/Controls/EditInPlace/EditInPlace.js.map +1 -1
  50. package/dist/components/Form/Controls/MFA/MFA.cjs.map +1 -1
  51. package/dist/components/Form/Controls/MFA/MFA.js.map +1 -1
  52. package/dist/components/Form/Controls/Password/Password.cjs.map +1 -1
  53. package/dist/components/Form/Controls/Password/Password.d.ts.map +1 -1
  54. package/dist/components/Form/Controls/Password/Password.js.map +1 -1
  55. package/dist/components/Form/Controls/Radio/Radio.cjs.map +1 -1
  56. package/dist/components/Form/Controls/Radio/Radio.js.map +1 -1
  57. package/dist/components/Form/Controls/SettingsToggle/SettingsToggle.cjs.map +1 -1
  58. package/dist/components/Form/Controls/SettingsToggle/SettingsToggle.d.ts.map +1 -1
  59. package/dist/components/Form/Controls/SettingsToggle/SettingsToggle.js.map +1 -1
  60. package/dist/components/Form/Controls/Text/Text.cjs.map +1 -1
  61. package/dist/components/Form/Controls/Text/Text.d.ts.map +1 -1
  62. package/dist/components/Form/Controls/Text/Text.js.map +1 -1
  63. package/dist/components/Form/Controls/Toggle/Toggle.cjs.map +1 -1
  64. package/dist/components/Form/Controls/Toggle/Toggle.d.ts.map +1 -1
  65. package/dist/components/Form/Controls/Toggle/Toggle.js.map +1 -1
  66. package/dist/components/Form/Field.cjs.map +1 -1
  67. package/dist/components/Form/Field.d.ts.map +1 -1
  68. package/dist/components/Form/Field.js.map +1 -1
  69. package/dist/components/Form/InlineField.cjs.map +1 -1
  70. package/dist/components/Form/InlineField.d.ts.map +1 -1
  71. package/dist/components/Form/InlineField.js.map +1 -1
  72. package/dist/components/Form/Label.cjs.map +1 -1
  73. package/dist/components/Form/Label.d.ts.map +1 -1
  74. package/dist/components/Form/Label.js.map +1 -1
  75. package/dist/components/Form/Message.cjs.map +1 -1
  76. package/dist/components/Form/Message.d.ts.map +1 -1
  77. package/dist/components/Form/Message.js.map +1 -1
  78. package/dist/components/Form/Root.cjs.map +1 -1
  79. package/dist/components/Form/Root.d.ts.map +1 -1
  80. package/dist/components/Form/Root.js.map +1 -1
  81. package/dist/components/Form/Submit.cjs.map +1 -1
  82. package/dist/components/Form/Submit.d.ts.map +1 -1
  83. package/dist/components/Form/Submit.js.map +1 -1
  84. package/dist/components/Glass/Glass.cjs.map +1 -1
  85. package/dist/components/Glass/Glass.d.ts.map +1 -1
  86. package/dist/components/Glass/Glass.js.map +1 -1
  87. package/dist/components/Icon/BigIcon/BigIcon.cjs.map +1 -1
  88. package/dist/components/Icon/BigIcon/BigIcon.d.ts.map +1 -1
  89. package/dist/components/Icon/BigIcon/BigIcon.js.map +1 -1
  90. package/dist/components/Icon/IndicatorIcon/IndicatorIcon.cjs.map +1 -1
  91. package/dist/components/Icon/IndicatorIcon/IndicatorIcon.d.ts.map +1 -1
  92. package/dist/components/Icon/IndicatorIcon/IndicatorIcon.js.map +1 -1
  93. package/dist/components/InlineSpinner/InlineSpinner.cjs.map +1 -1
  94. package/dist/components/InlineSpinner/InlineSpinner.d.ts.map +1 -1
  95. package/dist/components/InlineSpinner/InlineSpinner.js.map +1 -1
  96. package/dist/components/Link/Link.cjs.map +1 -1
  97. package/dist/components/Link/Link.d.ts.map +1 -1
  98. package/dist/components/Link/Link.js.map +1 -1
  99. package/dist/components/Menu/CheckboxMenuItem.cjs.map +1 -1
  100. package/dist/components/Menu/CheckboxMenuItem.d.ts.map +1 -1
  101. package/dist/components/Menu/CheckboxMenuItem.js.map +1 -1
  102. package/dist/components/Menu/ContextMenu.cjs.map +1 -1
  103. package/dist/components/Menu/ContextMenu.d.ts.map +1 -1
  104. package/dist/components/Menu/ContextMenu.js.map +1 -1
  105. package/dist/components/Menu/DrawerMenu.cjs.map +1 -1
  106. package/dist/components/Menu/DrawerMenu.d.ts.map +1 -1
  107. package/dist/components/Menu/DrawerMenu.js.map +1 -1
  108. package/dist/components/Menu/DrawerMenu.module.css.cjs +3 -3
  109. package/dist/components/Menu/DrawerMenu.module.css.js +3 -3
  110. package/dist/components/Menu/FloatingMenu.cjs.map +1 -1
  111. package/dist/components/Menu/FloatingMenu.d.ts.map +1 -1
  112. package/dist/components/Menu/FloatingMenu.js.map +1 -1
  113. package/dist/components/Menu/FloatingMenu.module.css.cjs +2 -2
  114. package/dist/components/Menu/FloatingMenu.module.css.js +2 -2
  115. package/dist/components/Menu/Menu.cjs.map +1 -1
  116. package/dist/components/Menu/Menu.d.ts.map +1 -1
  117. package/dist/components/Menu/Menu.js.map +1 -1
  118. package/dist/components/Menu/MenuContext.cjs.map +1 -1
  119. package/dist/components/Menu/MenuContext.d.ts.map +1 -1
  120. package/dist/components/Menu/MenuContext.js.map +1 -1
  121. package/dist/components/Menu/MenuItem.cjs.map +1 -1
  122. package/dist/components/Menu/MenuItem.d.ts.map +1 -1
  123. package/dist/components/Menu/MenuItem.js.map +1 -1
  124. package/dist/components/Menu/MenuTitle.cjs.map +1 -1
  125. package/dist/components/Menu/MenuTitle.js.map +1 -1
  126. package/dist/components/Menu/RadioMenuItem.cjs.map +1 -1
  127. package/dist/components/Menu/RadioMenuItem.d.ts.map +1 -1
  128. package/dist/components/Menu/RadioMenuItem.js.map +1 -1
  129. package/dist/components/Menu/ToggleMenuItem.cjs.map +1 -1
  130. package/dist/components/Menu/ToggleMenuItem.d.ts.map +1 -1
  131. package/dist/components/Menu/ToggleMenuItem.js.map +1 -1
  132. package/dist/components/Nav/NavBar.cjs.map +1 -1
  133. package/dist/components/Nav/NavBar.d.ts.map +1 -1
  134. package/dist/components/Nav/NavBar.js.map +1 -1
  135. package/dist/components/Nav/NavItem.cjs.map +1 -1
  136. package/dist/components/Nav/NavItem.d.ts.map +1 -1
  137. package/dist/components/Nav/NavItem.js.map +1 -1
  138. package/dist/components/Progress/Progress.cjs.map +1 -1
  139. package/dist/components/Progress/Progress.js.map +1 -1
  140. package/dist/components/ReleaseAnnouncement/ReleaseAnnouncement.cjs.map +1 -1
  141. package/dist/components/ReleaseAnnouncement/ReleaseAnnouncement.d.ts.map +1 -1
  142. package/dist/components/ReleaseAnnouncement/ReleaseAnnouncement.js.map +1 -1
  143. package/dist/components/ReleaseAnnouncement/ReleaseAnnouncementContext.cjs.map +1 -1
  144. package/dist/components/ReleaseAnnouncement/ReleaseAnnouncementContext.d.ts.map +1 -1
  145. package/dist/components/ReleaseAnnouncement/ReleaseAnnouncementContext.js.map +1 -1
  146. package/dist/components/ReleaseAnnouncement/useReleaseAnnouncement.cjs.map +1 -1
  147. package/dist/components/ReleaseAnnouncement/useReleaseAnnouncement.d.ts.map +1 -1
  148. package/dist/components/ReleaseAnnouncement/useReleaseAnnouncement.js.map +1 -1
  149. package/dist/components/Search/Search.cjs.map +1 -1
  150. package/dist/components/Search/Search.d.ts.map +1 -1
  151. package/dist/components/Search/Search.js.map +1 -1
  152. package/dist/components/Separator/Separator.cjs.map +1 -1
  153. package/dist/components/Separator/Separator.d.ts.map +1 -1
  154. package/dist/components/Separator/Separator.js.map +1 -1
  155. package/dist/components/Toast/Toast.cjs.map +1 -1
  156. package/dist/components/Toast/Toast.d.ts.map +1 -1
  157. package/dist/components/Toast/Toast.js.map +1 -1
  158. package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
  159. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  160. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  161. package/dist/components/Tooltip/TooltipContext.cjs.map +1 -1
  162. package/dist/components/Tooltip/TooltipContext.d.ts.map +1 -1
  163. package/dist/components/Tooltip/TooltipContext.js.map +1 -1
  164. package/dist/components/Tooltip/TooltipProvider.cjs.map +1 -1
  165. package/dist/components/Tooltip/TooltipProvider.d.ts.map +1 -1
  166. package/dist/components/Tooltip/TooltipProvider.js.map +1 -1
  167. package/dist/components/Tooltip/useTooltip.cjs.map +1 -1
  168. package/dist/components/Tooltip/useTooltip.d.ts.map +1 -1
  169. package/dist/components/Tooltip/useTooltip.js.map +1 -1
  170. package/dist/components/Typography/Body.cjs.map +1 -1
  171. package/dist/components/Typography/Body.js.map +1 -1
  172. package/dist/components/Typography/Heading.cjs.map +1 -1
  173. package/dist/components/Typography/Heading.js.map +1 -1
  174. package/dist/components/Typography/Text.cjs.map +1 -1
  175. package/dist/components/Typography/Text.js.map +1 -1
  176. package/dist/components/Typography/Typography.cjs.map +1 -1
  177. package/dist/components/Typography/Typography.d.ts.map +1 -1
  178. package/dist/components/Typography/Typography.js.map +1 -1
  179. package/dist/components/VisualList/VisualList.cjs.map +1 -1
  180. package/dist/components/VisualList/VisualList.d.ts.map +1 -1
  181. package/dist/components/VisualList/VisualList.js.map +1 -1
  182. package/dist/components/VisualList/VisualListItem.cjs.map +1 -1
  183. package/dist/components/VisualList/VisualListItem.d.ts.map +1 -1
  184. package/dist/components/VisualList/VisualListItem.js.map +1 -1
  185. package/dist/{style.css.css → style.css} +21 -21
  186. package/dist/utils/__ComponentTemplate__/__ComponentTemplate__.d.ts.map +1 -1
  187. package/dist/utils/platform.cjs.map +1 -1
  188. package/dist/utils/platform.js.map +1 -1
  189. package/dist/utils/string.cjs.map +1 -1
  190. package/dist/utils/string.js.map +1 -1
  191. package/package.json +29 -32
  192. package/src/components/ActivityMarker/Pill.tsx +1 -1
  193. package/src/components/ActivityMarker/Unread.tsx +1 -1
  194. package/src/components/ActivityMarker/UnreadCounter.tsx +1 -1
  195. package/src/components/Alert/Alert.tsx +1 -1
  196. package/src/components/Avatar/Avatar.tsx +1 -1
  197. package/src/components/Badge/Badge.tsx +1 -1
  198. package/src/components/Breadcrumb/Breadcrumb.tsx +6 -1
  199. package/src/components/Button/Button.tsx +5 -5
  200. package/src/components/Button/IconButton/IconButton.tsx +2 -2
  201. package/src/components/Button/UnstyledButton.tsx +6 -1
  202. package/src/components/ChatFilter/ChatFilter.tsx +2 -2
  203. package/src/components/Dropdown/Dropdown.tsx +5 -5
  204. package/src/components/Form/Controls/Action/Action.tsx +6 -1
  205. package/src/components/Form/Controls/Checkbox/Checkbox.tsx +5 -1
  206. package/src/components/Form/Controls/MFA/MFA.tsx +3 -3
  207. package/src/components/Form/Controls/Password/Password.tsx +2 -2
  208. package/src/components/Form/Controls/Radio/Radio.tsx +3 -3
  209. package/src/components/Form/Controls/SettingsToggle/SettingsToggle.tsx +3 -3
  210. package/src/components/Form/Controls/Text/Text.tsx +5 -1
  211. package/src/components/Form/Controls/Toggle/Toggle.tsx +3 -3
  212. package/src/components/Form/Field.tsx +1 -1
  213. package/src/components/Form/InlineField.tsx +1 -1
  214. package/src/components/Form/Label.tsx +1 -1
  215. package/src/components/Form/Message.tsx +1 -1
  216. package/src/components/Form/Root.tsx +1 -1
  217. package/src/components/Form/Submit.tsx +1 -1
  218. package/src/components/Glass/Glass.tsx +2 -2
  219. package/src/components/Icon/BigIcon/BigIcon.tsx +1 -1
  220. package/src/components/Icon/IndicatorIcon/IndicatorIcon.tsx +1 -1
  221. package/src/components/InlineSpinner/InlineSpinner.tsx +1 -1
  222. package/src/components/Link/Link.tsx +1 -1
  223. package/src/components/Menu/CheckboxMenuItem.tsx +6 -1
  224. package/src/components/Menu/ContextMenu.tsx +12 -2
  225. package/src/components/Menu/DrawerMenu.module.css +1 -1
  226. package/src/components/Menu/DrawerMenu.tsx +5 -1
  227. package/src/components/Menu/FloatingMenu.module.css +1 -1
  228. package/src/components/Menu/FloatingMenu.tsx +2 -2
  229. package/src/components/Menu/Menu.tsx +6 -2
  230. package/src/components/Menu/MenuContext.tsx +1 -1
  231. package/src/components/Menu/MenuItem.tsx +6 -6
  232. package/src/components/Menu/RadioMenuItem.tsx +6 -1
  233. package/src/components/Menu/ToggleMenuItem.tsx +6 -1
  234. package/src/components/Nav/NavItem.tsx +4 -4
  235. package/src/components/ReleaseAnnouncement/ReleaseAnnouncement.tsx +4 -4
  236. package/src/components/ReleaseAnnouncement/useReleaseAnnouncement.tsx +2 -2
  237. package/src/components/Search/Search.tsx +1 -1
  238. package/src/components/Separator/Separator.tsx +3 -3
  239. package/src/components/Toast/Toast.tsx +1 -1
  240. package/src/components/Tooltip/Tooltip.tsx +9 -9
  241. package/src/components/Tooltip/TooltipProvider.tsx +1 -1
  242. package/src/components/Tooltip/useTooltip.ts +4 -4
  243. package/src/components/Typography/Typography.tsx +1 -1
  244. package/src/components/VisualList/VisualList.tsx +1 -1
  245. package/src/components/VisualList/VisualListItem.tsx +5 -1
  246. package/src/utils/__ComponentTemplate__/__ComponentTemplate__.tsx +1 -1
  247. package/tsconfig.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useTooltip.js","sources":["../../../src/components/Tooltip/useTooltip.ts"],"sourcesContent":["/*\n * Copyright 2024 New Vector Ltd.\n *\n * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\n * Please see LICENSE files in the repository root for full details.\n */\n\nimport {\n arrow,\n autoUpdate,\n flip,\n offset,\n OpenChangeReason,\n Placement,\n shift,\n useDelayGroup,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useId,\n useInteractions,\n useRole,\n} from \"@floating-ui/react\";\nimport {\n useMemo,\n useRef,\n useState,\n JSX,\n AriaAttributes,\n useEffect,\n} from \"react\";\nimport { hoverDelay } from \"./TooltipProvider\";\n\nexport interface CommonUseTooltipProps {\n /**\n * The controlled open state of the tooltip.\n * If provided, the tooltip will be in controlled mode.\n * When true, the tooltip is always open. When false, the tooltip is always hidden.\n * When undefined, the tooltip will manage its own open state.\n * You will mostly want to omit this property. Will be used the vast majority\n * of the time during development.\n * @default undefined\n */\n open?: boolean;\n /**\n * Whether the tooltip should be forced to be in a closed state.\n */\n // TODO: Deprecate this? It seems redundant to open: false.\n disabled?: boolean;\n /**\n * The caption of the tooltip.\n * JSX.Element can be used to provide accessibility content like kbd element.\n * Keep in mind, the caption should not be used for interactive content.\n */\n caption?: string | JSX.Element;\n /**\n * The event handler for the open change.\n */\n onOpenChange?: (\n open: boolean,\n event?: Event | undefined,\n reason?: OpenChangeReason | undefined,\n ) => void;\n /**\n * The placement of the tooltip.\n * @default \"bottom\"\n */\n placement?: Placement;\n /**\n * Whether the trigger element is interactive.\n * When trigger is interactive:\n * - tooltip will be shown after a 300ms delay.\n * When trigger is not interactive:\n * - tooltip will be shown instantly when pointer enters trigger.\n * - trigger will be wrapped in a span with a tab index from prop nonInteractiveTriggerTabIndex\n */\n isTriggerInteractive: boolean;\n\n /**\n * Additional aria-* attributes to pass through to the floating tooltip for\n * edge cases which require more user awareness like errors & alerts.\n */\n \"aria-atomic\"?: AriaAttributes[\"aria-atomic\"];\n \"aria-live\"?: AriaAttributes[\"aria-live\"];\n}\n\nexport interface TooltipLabel {\n /**\n * A label for the target element.\n */\n label: string;\n}\n\nexport interface TooltipDescription {\n /**\n * A description for the target element.\n */\n description: string;\n}\n\ntype UseTooltipProps = CommonUseTooltipProps &\n (TooltipLabel | TooltipDescription);\n\nexport function useTooltip({\n open: controlledOpen,\n disabled = false,\n onOpenChange,\n placement = \"bottom\",\n isTriggerInteractive,\n caption,\n \"aria-atomic\": ariaAtomic,\n \"aria-live\": ariaLive,\n ...props\n}: UseTooltipProps) {\n const labelId = useId();\n const captionId = useId();\n const arrowRef = useRef(null);\n\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n\n // Use controlledOpen if it is provided, otherwise use uncontrolledOpen\n const open = disabled ? false : (controlledOpen ?? uncontrolledOpen);\n const setOpen = (\n open: boolean,\n event?: Event | undefined,\n reason?: OpenChangeReason | undefined,\n ) => {\n onOpenChange?.(open, event, reason);\n // we are in uncontrolled mode\n if (controlledOpen === undefined) setUncontrolledOpen(open);\n };\n\n const data = useFloating({\n placement,\n open,\n onOpenChange: setOpen,\n whileElementsMounted: autoUpdate,\n middleware: [\n // arrow height 6px\n offset(6),\n flip({\n crossAxis: placement.includes(\"-\"),\n fallbackAxisSideDirection: \"start\",\n padding: 5,\n }),\n shift({ padding: 5 }),\n // add the little arrow along with the floating content\n arrow({\n element: arrowRef,\n }),\n ],\n });\n\n const context = data.context;\n const { delay, initialDelay } = useDelayGroup(context);\n // We can tell if no delay group has been provided, because the delay will\n // default to zero\n if (initialDelay !== hoverDelay)\n throw new Error(\"Tooltips must be wrapped in a global <TooltipProvider>\");\n\n const hover = useHover(context, {\n move: false,\n enabled: controlledOpen === undefined,\n // Show tooltip after a delay when trigger is interactive\n delay: isTriggerInteractive ? delay : {},\n mouseOnly: true,\n });\n\n const focus = useFocus(context, {\n enabled: controlledOpen === undefined,\n });\n\n // On touch screens, show the tooltip on a long press\n const pressTimer = useRef<number | undefined>(undefined);\n useEffect(() => () => window.clearTimeout(pressTimer.current), []);\n const press = useMemo(() => {\n const onTouchEnd = () => {\n if (pressTimer.current === undefined)\n pressTimer.current = window.setTimeout(() => {\n setOpen(false);\n pressTimer.current = undefined;\n }, 1500);\n else window.clearTimeout(pressTimer.current);\n };\n return {\n // Set these props on the anchor element\n reference: {\n onTouchStart: () => {\n if (pressTimer.current !== undefined)\n window.clearTimeout(pressTimer.current);\n pressTimer.current = window.setTimeout(() => {\n setOpen(true);\n pressTimer.current = undefined;\n }, 500);\n },\n onTouchEnd,\n onTouchCancel: onTouchEnd,\n },\n };\n }, []);\n\n const dismiss = useDismiss(context);\n\n const purpose = \"label\" in props ? \"label\" : \"description\";\n // A descriptive tooltip should set role=\"tooltip\" and aria-describedby\n const role = useRole(context, {\n enabled: purpose === \"description\",\n role: \"tooltip\",\n });\n\n // A label tooltip should set aria-labelledby with no role regardless of\n // whether the tooltip is visible.\n // (Source: https://zoebijl.github.io/apg-tooltip/#tooltip-main-label)\n // useRole doesn't support this use case correctly, so we do it manually.\n const label = useMemo(\n () =>\n purpose === \"label\"\n ? {\n // Set these props on the anchor element\n reference: {\n \"aria-labelledby\": labelId,\n \"aria-describedby\": caption ? captionId : undefined,\n },\n }\n : {},\n [purpose, labelId, captionId],\n );\n\n const interactions = useInteractions([\n hover,\n focus,\n press,\n dismiss,\n role,\n label,\n ]);\n\n return useMemo(\n () => ({\n labelId,\n captionId: caption ? captionId : undefined,\n caption,\n purpose: purpose as \"label\" | \"description\",\n open,\n setOpen,\n tooltipProps: {\n \"aria-atomic\": ariaAtomic,\n \"aria-live\": ariaLive,\n },\n ...interactions,\n ...data,\n arrowRef,\n }),\n [\n labelId,\n captionId,\n caption,\n role,\n open,\n setOpen,\n interactions,\n data,\n arrowRef,\n ],\n );\n}\n"],"names":["open"],"mappings":"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"}
1
+ {"version":3,"file":"useTooltip.js","sources":["../../../src/components/Tooltip/useTooltip.ts"],"sourcesContent":["/*\n * Copyright 2024 New Vector Ltd.\n *\n * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\n * Please see LICENSE files in the repository root for full details.\n */\n\nimport {\n arrow,\n autoUpdate,\n flip,\n offset,\n type OpenChangeReason,\n type Placement,\n shift,\n useDelayGroup,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useId,\n useInteractions,\n useRole,\n} from \"@floating-ui/react\";\nimport {\n useMemo,\n useRef,\n useState,\n type JSX,\n type AriaAttributes,\n useEffect,\n} from \"react\";\nimport { hoverDelay } from \"./TooltipProvider\";\n\nexport interface CommonUseTooltipProps {\n /**\n * The controlled open state of the tooltip.\n * If provided, the tooltip will be in controlled mode.\n * When true, the tooltip is always open. When false, the tooltip is always hidden.\n * When undefined, the tooltip will manage its own open state.\n * You will mostly want to omit this property. Will be used the vast majority\n * of the time during development.\n * @default undefined\n */\n open?: boolean;\n /**\n * Whether the tooltip should be forced to be in a closed state.\n */\n // TODO: Deprecate this? It seems redundant to open: false.\n disabled?: boolean;\n /**\n * The caption of the tooltip.\n * JSX.Element can be used to provide accessibility content like kbd element.\n * Keep in mind, the caption should not be used for interactive content.\n */\n caption?: string | JSX.Element;\n /**\n * The event handler for the open change.\n */\n onOpenChange?: (\n open: boolean,\n event?: Event | undefined,\n reason?: OpenChangeReason | undefined,\n ) => void;\n /**\n * The placement of the tooltip.\n * @default \"bottom\"\n */\n placement?: Placement;\n /**\n * Whether the trigger element is interactive.\n * When trigger is interactive:\n * - tooltip will be shown after a 300ms delay.\n * When trigger is not interactive:\n * - tooltip will be shown instantly when pointer enters trigger.\n * - trigger will be wrapped in a span with a tab index from prop nonInteractiveTriggerTabIndex\n */\n isTriggerInteractive: boolean;\n\n /**\n * Additional aria-* attributes to pass through to the floating tooltip for\n * edge cases which require more user awareness like errors & alerts.\n */\n \"aria-atomic\"?: AriaAttributes[\"aria-atomic\"];\n \"aria-live\"?: AriaAttributes[\"aria-live\"];\n}\n\nexport interface TooltipLabel {\n /**\n * A label for the target element.\n */\n label: string;\n}\n\nexport interface TooltipDescription {\n /**\n * A description for the target element.\n */\n description: string;\n}\n\ntype UseTooltipProps = CommonUseTooltipProps &\n (TooltipLabel | TooltipDescription);\n\nexport function useTooltip({\n open: controlledOpen,\n disabled = false,\n onOpenChange,\n placement = \"bottom\",\n isTriggerInteractive,\n caption,\n \"aria-atomic\": ariaAtomic,\n \"aria-live\": ariaLive,\n ...props\n}: UseTooltipProps) {\n const labelId = useId();\n const captionId = useId();\n const arrowRef = useRef(null);\n\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n\n // Use controlledOpen if it is provided, otherwise use uncontrolledOpen\n const open = disabled ? false : (controlledOpen ?? uncontrolledOpen);\n const setOpen = (\n open: boolean,\n event?: Event | undefined,\n reason?: OpenChangeReason | undefined,\n ) => {\n onOpenChange?.(open, event, reason);\n // we are in uncontrolled mode\n if (controlledOpen === undefined) setUncontrolledOpen(open);\n };\n\n const data = useFloating({\n placement,\n open,\n onOpenChange: setOpen,\n whileElementsMounted: autoUpdate,\n middleware: [\n // arrow height 6px\n offset(6),\n flip({\n crossAxis: placement.includes(\"-\"),\n fallbackAxisSideDirection: \"start\",\n padding: 5,\n }),\n shift({ padding: 5 }),\n // add the little arrow along with the floating content\n arrow({\n element: arrowRef,\n }),\n ],\n });\n\n const context = data.context;\n const { delay, initialDelay } = useDelayGroup(context);\n // We can tell if no delay group has been provided, because the delay will\n // default to zero\n if (initialDelay !== hoverDelay)\n throw new Error(\"Tooltips must be wrapped in a global <TooltipProvider>\");\n\n const hover = useHover(context, {\n move: false,\n enabled: controlledOpen === undefined,\n // Show tooltip after a delay when trigger is interactive\n delay: isTriggerInteractive ? delay : {},\n mouseOnly: true,\n });\n\n const focus = useFocus(context, {\n enabled: controlledOpen === undefined,\n });\n\n // On touch screens, show the tooltip on a long press\n const pressTimer = useRef<number | undefined>(undefined);\n useEffect(() => () => window.clearTimeout(pressTimer.current), []);\n const press = useMemo(() => {\n const onTouchEnd = () => {\n if (pressTimer.current === undefined)\n pressTimer.current = window.setTimeout(() => {\n setOpen(false);\n pressTimer.current = undefined;\n }, 1500);\n else window.clearTimeout(pressTimer.current);\n };\n return {\n // Set these props on the anchor element\n reference: {\n onTouchStart: () => {\n if (pressTimer.current !== undefined)\n window.clearTimeout(pressTimer.current);\n pressTimer.current = window.setTimeout(() => {\n setOpen(true);\n pressTimer.current = undefined;\n }, 500);\n },\n onTouchEnd,\n onTouchCancel: onTouchEnd,\n },\n };\n }, []);\n\n const dismiss = useDismiss(context);\n\n const purpose = \"label\" in props ? \"label\" : \"description\";\n // A descriptive tooltip should set role=\"tooltip\" and aria-describedby\n const role = useRole(context, {\n enabled: purpose === \"description\",\n role: \"tooltip\",\n });\n\n // A label tooltip should set aria-labelledby with no role regardless of\n // whether the tooltip is visible.\n // (Source: https://zoebijl.github.io/apg-tooltip/#tooltip-main-label)\n // useRole doesn't support this use case correctly, so we do it manually.\n const label = useMemo(\n () =>\n purpose === \"label\"\n ? {\n // Set these props on the anchor element\n reference: {\n \"aria-labelledby\": labelId,\n \"aria-describedby\": caption ? captionId : undefined,\n },\n }\n : {},\n [purpose, labelId, captionId],\n );\n\n const interactions = useInteractions([\n hover,\n focus,\n press,\n dismiss,\n role,\n label,\n ]);\n\n return useMemo(\n () => ({\n labelId,\n captionId: caption ? captionId : undefined,\n caption,\n purpose: purpose as \"label\" | \"description\",\n open,\n setOpen,\n tooltipProps: {\n \"aria-atomic\": ariaAtomic,\n \"aria-live\": ariaLive,\n },\n ...interactions,\n ...data,\n arrowRef,\n }),\n [\n labelId,\n captionId,\n caption,\n role,\n open,\n setOpen,\n interactions,\n data,\n arrowRef,\n ],\n );\n}\n"],"names":["open"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"Body.cjs","sources":["../../../src/components/Typography/Body.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Text } from \"./Text\";\n\n/**\n * @deprecated use `Text` instead\n */\nexport const Body: React.FC<React.ComponentProps<typeof Text>> = ({\n children,\n ...props\n}) => {\n return <Text {...props}>{children}</Text>;\n};\n"],"names":["jsx","Text"],"mappings":";;;;AAcO,MAAM,OAAoD,CAAC;AAAA,EAChE;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SAAQA,2BAAA,IAAAC,KAAA,MAAA,EAAM,GAAG,OAAQ,SAAS,CAAA;AACpC;;"}
1
+ {"version":3,"file":"Body.cjs","sources":["../../../src/components/Typography/Body.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Text } from \"./Text\";\n\n/**\n * @deprecated use `Text` instead\n */\nexport const Body: React.FC<React.ComponentProps<typeof Text>> = ({\n children,\n ...props\n}) => {\n return <Text {...props}>{children}</Text>;\n};\n"],"names":["jsx","Text"],"mappings":";;;;AAcO,MAAM,OAAoD,CAAC;AAAA,EAChE;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SAAOA,2BAAAA,IAACC,KAAAA,MAAA,EAAM,GAAG,OAAQ,SAAA,CAAS;AACpC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Body.js","sources":["../../../src/components/Typography/Body.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Text } from \"./Text\";\n\n/**\n * @deprecated use `Text` instead\n */\nexport const Body: React.FC<React.ComponentProps<typeof Text>> = ({\n children,\n ...props\n}) => {\n return <Text {...props}>{children}</Text>;\n};\n"],"names":[],"mappings":";;AAcO,MAAM,OAAoD,CAAC;AAAA,EAChE;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SAAQ,oBAAA,MAAA,EAAM,GAAG,OAAQ,SAAS,CAAA;AACpC;"}
1
+ {"version":3,"file":"Body.js","sources":["../../../src/components/Typography/Body.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Text } from \"./Text\";\n\n/**\n * @deprecated use `Text` instead\n */\nexport const Body: React.FC<React.ComponentProps<typeof Text>> = ({\n children,\n ...props\n}) => {\n return <Text {...props}>{children}</Text>;\n};\n"],"names":[],"mappings":";;AAcO,MAAM,OAAoD,CAAC;AAAA,EAChE;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SAAO,oBAAC,MAAA,EAAM,GAAG,OAAQ,SAAA,CAAS;AACpC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.cjs","sources":["../../../src/components/Typography/Heading.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\nimport { Text } from \"./Text\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A heading component.\n */\nexport const Heading: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xs is not a valid heading size\n size?: Exclude<TypographyProps[\"size\"], \"xs\">;\n }\n> = ({ as = \"h1\", children, ...props }) => {\n return (\n <Typography as={as} type=\"heading\" {...props}>\n {children}\n </Typography>\n );\n};\n\ntype HeadingProps = Omit<\n React.ComponentProps<typeof Heading>,\n \"as\" | \"weight\" | \"size\"\n>;\n\n/**\n * A Heading level-1 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H1: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h1\" weight=\"semibold\" size=\"xl\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-2 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H2: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h2\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-3 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H3: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h3\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-4 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H4: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h4\" weight=\"semibold\" size=\"sm\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-5 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H5: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h5\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Text>\n );\n};\n\n/**\n * A Heading level-6 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H6: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h6\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Text>\n );\n};\n"],"names":["Typography","jsx","Text"],"mappings":";;;;;AAiBa,MAAA,UAKT,CAAC,EAAE,KAAK,MAAM,UAAU,GAAG,YAAY;AACzC,wCACGA,WAAW,YAAA,EAAA,IAAQ,MAAK,WAAW,GAAG,OACpC,UACH;AAEJ;AAWO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAAC,+BAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAAA,+BAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAAA,+BAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAAA,+BAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAAA,+BAACC,KAAAA,MAAK,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAAD,+BAACC,KAAAA,MAAK,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SACH,CAAA;AAEJ;;;;;;;;"}
1
+ {"version":3,"file":"Heading.cjs","sources":["../../../src/components/Typography/Heading.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\nimport { Text } from \"./Text\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A heading component.\n */\nexport const Heading: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xs is not a valid heading size\n size?: Exclude<TypographyProps[\"size\"], \"xs\">;\n }\n> = ({ as = \"h1\", children, ...props }) => {\n return (\n <Typography as={as} type=\"heading\" {...props}>\n {children}\n </Typography>\n );\n};\n\ntype HeadingProps = Omit<\n React.ComponentProps<typeof Heading>,\n \"as\" | \"weight\" | \"size\"\n>;\n\n/**\n * A Heading level-1 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H1: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h1\" weight=\"semibold\" size=\"xl\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-2 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H2: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h2\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-3 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H3: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h3\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-4 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H4: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h4\" weight=\"semibold\" size=\"sm\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-5 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H5: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h5\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Text>\n );\n};\n\n/**\n * A Heading level-6 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H6: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h6\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Text>\n );\n};\n"],"names":["Typography","jsx","Text"],"mappings":";;;;;AAiBO,MAAM,UAKT,CAAC,EAAE,KAAK,MAAM,UAAU,GAAG,YAAY;AACzC,wCACGA,WAAAA,YAAA,EAAW,IAAQ,MAAK,WAAW,GAAG,OACpC,UACH;AAEJ;AAWO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACEC,+BAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACEA,+BAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACEA,+BAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACEA,+BAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACEA,+BAACC,KAAAA,MAAA,EAAK,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACED,+BAACC,KAAAA,MAAA,EAAK,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SAAA,CACH;AAEJ;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.js","sources":["../../../src/components/Typography/Heading.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\nimport { Text } from \"./Text\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A heading component.\n */\nexport const Heading: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xs is not a valid heading size\n size?: Exclude<TypographyProps[\"size\"], \"xs\">;\n }\n> = ({ as = \"h1\", children, ...props }) => {\n return (\n <Typography as={as} type=\"heading\" {...props}>\n {children}\n </Typography>\n );\n};\n\ntype HeadingProps = Omit<\n React.ComponentProps<typeof Heading>,\n \"as\" | \"weight\" | \"size\"\n>;\n\n/**\n * A Heading level-1 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H1: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h1\" weight=\"semibold\" size=\"xl\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-2 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H2: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h2\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-3 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H3: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h3\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-4 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H4: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h4\" weight=\"semibold\" size=\"sm\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-5 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H5: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h5\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Text>\n );\n};\n\n/**\n * A Heading level-6 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H6: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h6\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Text>\n );\n};\n"],"names":[],"mappings":";;;AAiBa,MAAA,UAKT,CAAC,EAAE,KAAK,MAAM,UAAU,GAAG,YAAY;AACzC,6BACG,YAAW,EAAA,IAAQ,MAAK,WAAW,GAAG,OACpC,UACH;AAEJ;AAWO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAA,oBAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAA,oBAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAA,oBAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAA,oBAAC,SAAQ,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAA,oBAAC,MAAK,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SACH,CAAA;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AAElE,SAAA,oBAAC,MAAK,EAAA,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SACH,CAAA;AAEJ;"}
1
+ {"version":3,"file":"Heading.js","sources":["../../../src/components/Typography/Heading.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\nimport { Text } from \"./Text\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A heading component.\n */\nexport const Heading: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xs is not a valid heading size\n size?: Exclude<TypographyProps[\"size\"], \"xs\">;\n }\n> = ({ as = \"h1\", children, ...props }) => {\n return (\n <Typography as={as} type=\"heading\" {...props}>\n {children}\n </Typography>\n );\n};\n\ntype HeadingProps = Omit<\n React.ComponentProps<typeof Heading>,\n \"as\" | \"weight\" | \"size\"\n>;\n\n/**\n * A Heading level-1 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H1: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h1\" weight=\"semibold\" size=\"xl\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-2 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H2: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h2\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-3 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H3: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h3\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-4 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H4: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Heading as=\"h4\" weight=\"semibold\" size=\"sm\" {...props}>\n {children}\n </Heading>\n );\n};\n\n/**\n * A Heading level-5 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H5: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h5\" weight=\"semibold\" size=\"lg\" {...props}>\n {children}\n </Text>\n );\n};\n\n/**\n * A Heading level-6 styled component. Underlying HTML element can be changed\n * usign the `as` property.\n */\nexport const H6: React.FC<HeadingProps> = ({ children, ...props }) => {\n return (\n <Text as=\"h6\" weight=\"semibold\" size=\"md\" {...props}>\n {children}\n </Text>\n );\n};\n"],"names":[],"mappings":";;;AAiBO,MAAM,UAKT,CAAC,EAAE,KAAK,MAAM,UAAU,GAAG,YAAY;AACzC,6BACG,YAAA,EAAW,IAAQ,MAAK,WAAW,GAAG,OACpC,UACH;AAEJ;AAWO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACE,oBAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACE,oBAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACE,oBAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACE,oBAAC,SAAA,EAAQ,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC9C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACE,oBAAC,MAAA,EAAK,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SAAA,CACH;AAEJ;AAMO,MAAM,KAA6B,CAAC,EAAE,UAAU,GAAG,YAAY;AACpE,SACE,oBAAC,MAAA,EAAK,IAAG,MAAK,QAAO,YAAW,MAAK,MAAM,GAAG,OAC3C,SAAA,CACH;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.cjs","sources":["../../../src/components/Typography/Text.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A text component. Underlying HTML element can be changed using the `as`\n * property. Will default to be a paragraph.\n */\nexport const Text: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xl is not a valid text size\n size?: Exclude<TypographyProps[\"size\"], \"xl\">;\n }\n> = ({ as = \"p\", children, ...props }) => {\n return (\n <Typography as={as} type=\"body\" {...props}>\n {children}\n </Typography>\n );\n};\n"],"names":["Typography"],"mappings":";;;;AAiBa,MAAA,OAKT,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,YAAY;AACxC,wCACGA,WAAW,YAAA,EAAA,IAAQ,MAAK,QAAQ,GAAG,OACjC,UACH;AAEJ;;"}
1
+ {"version":3,"file":"Text.cjs","sources":["../../../src/components/Typography/Text.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A text component. Underlying HTML element can be changed using the `as`\n * property. Will default to be a paragraph.\n */\nexport const Text: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xl is not a valid text size\n size?: Exclude<TypographyProps[\"size\"], \"xl\">;\n }\n> = ({ as = \"p\", children, ...props }) => {\n return (\n <Typography as={as} type=\"body\" {...props}>\n {children}\n </Typography>\n );\n};\n"],"names":["Typography"],"mappings":";;;;AAiBO,MAAM,OAKT,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,YAAY;AACxC,wCACGA,WAAAA,YAAA,EAAW,IAAQ,MAAK,QAAQ,GAAG,OACjC,UACH;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../../src/components/Typography/Text.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A text component. Underlying HTML element can be changed using the `as`\n * property. Will default to be a paragraph.\n */\nexport const Text: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xl is not a valid text size\n size?: Exclude<TypographyProps[\"size\"], \"xl\">;\n }\n> = ({ as = \"p\", children, ...props }) => {\n return (\n <Typography as={as} type=\"body\" {...props}>\n {children}\n </Typography>\n );\n};\n"],"names":[],"mappings":";;AAiBa,MAAA,OAKT,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,YAAY;AACxC,6BACG,YAAW,EAAA,IAAQ,MAAK,QAAQ,GAAG,OACjC,UACH;AAEJ;"}
1
+ {"version":3,"file":"Text.js","sources":["../../../src/components/Typography/Text.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React from \"react\";\nimport { Typography } from \"./Typography\";\n\ntype TypographyProps = React.ComponentProps<typeof Typography>;\n\n/**\n * A text component. Underlying HTML element can be changed using the `as`\n * property. Will default to be a paragraph.\n */\nexport const Text: React.FC<\n Omit<TypographyProps, \"type\"> & {\n // xl is not a valid text size\n size?: Exclude<TypographyProps[\"size\"], \"xl\">;\n }\n> = ({ as = \"p\", children, ...props }) => {\n return (\n <Typography as={as} type=\"body\" {...props}>\n {children}\n </Typography>\n );\n};\n"],"names":[],"mappings":";;AAiBO,MAAM,OAKT,CAAC,EAAE,KAAK,KAAK,UAAU,GAAG,YAAY;AACxC,6BACG,YAAA,EAAW,IAAQ,MAAK,QAAQ,GAAG,OACjC,UACH;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.cjs","sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { PropsWithChildren } from \"react\";\nimport classNames from \"classnames\";\n\nimport styles from \"./Typography.module.css\";\n\ntype TypographyProps<C extends React.ElementType> = {\n /**\n * The HTML tag.\n * @default \"p\"\n */\n as?: C;\n /**\n * The type of content.\n */\n type?: \"body\" | \"heading\";\n /**\n * The font weight.\n */\n weight?: \"regular\" | \"semibold\" | \"medium\" | \"bold\";\n /**\n * The t-shirt size of the content.\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * The CSS class name.\n */\n className?: string;\n} & React.ComponentPropsWithoutRef<C>;\n\nexport const Typography = <C extends React.ElementType = \"p\">({\n as,\n children,\n type = \"body\",\n weight = \"regular\",\n size = \"md\",\n className,\n ...restProps\n}: PropsWithChildren<TypographyProps<C>>): React.ReactElement => {\n const Component = as || \"p\";\n\n return (\n <Component\n {...restProps}\n className={classNames(\n styles.typography,\n styles[`font-${type}-${size}-${weight}`],\n className,\n )}\n >\n {children}\n </Component>\n );\n};\n"],"names":["jsx","styles"],"mappings":";;;;;AAqCO,MAAM,aAAa,CAAoC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAAiE;AAC/D,QAAM,YAAY,MAAM;AAGtB,SAAAA,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACTC,kBAAAA,QAAO;AAAA,QACPA,0BAAO,QAAQ,IAAI,IAAI,IAAI,IAAI,MAAM,EAAE;AAAA,QACvC;AAAA,MACF;AAAA,MAEC;AAAA,IAAA;AAAA,EACH;AAEJ;;"}
1
+ {"version":3,"file":"Typography.cjs","sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type PropsWithChildren } from \"react\";\nimport classNames from \"classnames\";\n\nimport styles from \"./Typography.module.css\";\n\ntype TypographyProps<C extends React.ElementType> = {\n /**\n * The HTML tag.\n * @default \"p\"\n */\n as?: C;\n /**\n * The type of content.\n */\n type?: \"body\" | \"heading\";\n /**\n * The font weight.\n */\n weight?: \"regular\" | \"semibold\" | \"medium\" | \"bold\";\n /**\n * The t-shirt size of the content.\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * The CSS class name.\n */\n className?: string;\n} & React.ComponentPropsWithoutRef<C>;\n\nexport const Typography = <C extends React.ElementType = \"p\">({\n as,\n children,\n type = \"body\",\n weight = \"regular\",\n size = \"md\",\n className,\n ...restProps\n}: PropsWithChildren<TypographyProps<C>>): React.ReactElement => {\n const Component = as || \"p\";\n\n return (\n <Component\n {...restProps}\n className={classNames(\n styles.typography,\n styles[`font-${type}-${size}-${weight}`],\n className,\n )}\n >\n {children}\n </Component>\n );\n};\n"],"names":["jsx","styles"],"mappings":";;;;;AAqCO,MAAM,aAAa,CAAoC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAAiE;AAC/D,QAAM,YAAY,MAAM;AAExB,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACTC,kBAAAA,QAAO;AAAA,QACPA,0BAAO,QAAQ,IAAI,IAAI,IAAI,IAAI,MAAM,EAAE;AAAA,QACvC;AAAA,MAAA;AAAA,MAGD;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Typography.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKjD,KAAK,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IAAI;IAClD;;;OAGG;IACH,EAAE,CAAC,EAAE,CAAC,CAAC;IACP;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAEtC,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,uEAQnD,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,YAehD,CAAC"}
1
+ {"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Typography.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKtD,KAAK,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IAAI;IAClD;;;OAGG;IACH,EAAE,CAAC,EAAE,CAAC,CAAC;IACP;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAEtC,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,EAAE,+DAQ3D,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,YAehD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.js","sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { PropsWithChildren } from \"react\";\nimport classNames from \"classnames\";\n\nimport styles from \"./Typography.module.css\";\n\ntype TypographyProps<C extends React.ElementType> = {\n /**\n * The HTML tag.\n * @default \"p\"\n */\n as?: C;\n /**\n * The type of content.\n */\n type?: \"body\" | \"heading\";\n /**\n * The font weight.\n */\n weight?: \"regular\" | \"semibold\" | \"medium\" | \"bold\";\n /**\n * The t-shirt size of the content.\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * The CSS class name.\n */\n className?: string;\n} & React.ComponentPropsWithoutRef<C>;\n\nexport const Typography = <C extends React.ElementType = \"p\">({\n as,\n children,\n type = \"body\",\n weight = \"regular\",\n size = \"md\",\n className,\n ...restProps\n}: PropsWithChildren<TypographyProps<C>>): React.ReactElement => {\n const Component = as || \"p\";\n\n return (\n <Component\n {...restProps}\n className={classNames(\n styles.typography,\n styles[`font-${type}-${size}-${weight}`],\n className,\n )}\n >\n {children}\n </Component>\n );\n};\n"],"names":[],"mappings":";;;AAqCO,MAAM,aAAa,CAAoC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAAiE;AAC/D,QAAM,YAAY,MAAM;AAGtB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,OAAO;AAAA,QACP,OAAO,QAAQ,IAAI,IAAI,IAAI,IAAI,MAAM,EAAE;AAAA,QACvC;AAAA,MACF;AAAA,MAEC;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"Typography.js","sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["/*\nCopyright 2025 New Vector Ltd.\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type PropsWithChildren } from \"react\";\nimport classNames from \"classnames\";\n\nimport styles from \"./Typography.module.css\";\n\ntype TypographyProps<C extends React.ElementType> = {\n /**\n * The HTML tag.\n * @default \"p\"\n */\n as?: C;\n /**\n * The type of content.\n */\n type?: \"body\" | \"heading\";\n /**\n * The font weight.\n */\n weight?: \"regular\" | \"semibold\" | \"medium\" | \"bold\";\n /**\n * The t-shirt size of the content.\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * The CSS class name.\n */\n className?: string;\n} & React.ComponentPropsWithoutRef<C>;\n\nexport const Typography = <C extends React.ElementType = \"p\">({\n as,\n children,\n type = \"body\",\n weight = \"regular\",\n size = \"md\",\n className,\n ...restProps\n}: PropsWithChildren<TypographyProps<C>>): React.ReactElement => {\n const Component = as || \"p\";\n\n return (\n <Component\n {...restProps}\n className={classNames(\n styles.typography,\n styles[`font-${type}-${size}-${weight}`],\n className,\n )}\n >\n {children}\n </Component>\n );\n};\n"],"names":[],"mappings":";;;AAqCO,MAAM,aAAa,CAAoC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAAiE;AAC/D,QAAM,YAAY,MAAM;AAExB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,OAAO;AAAA,QACP,OAAO,QAAQ,IAAI,IAAI,IAAI,IAAI,MAAM,EAAE;AAAA,QACvC;AAAA,MAAA;AAAA,MAGD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisualList.cjs","sources":["../../../src/components/VisualList/VisualList.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { JSX, PropsWithChildren } from \"react\";\nimport styles from \"./VisualList.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListProps extends React.HTMLProps<HTMLUListElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n}\n\n/**\n * A list component.\n */\nexport function VisualList({\n className,\n children,\n ...props\n}: PropsWithChildren<VisualListProps>): JSX.Element {\n return (\n <ul className={classNames(styles[\"visual-list\"], className)} {...props}>\n {children}\n </ul>\n );\n}\n"],"names":["jsx","styles"],"mappings":";;;;;AAqBO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAoD;AAEhD,SAAAA,+BAAC,MAAG,EAAA,WAAW,WAAWC,kBAAAA,QAAO,aAAa,GAAG,SAAS,GAAI,GAAG,OAC9D,SACH,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"VisualList.cjs","sources":["../../../src/components/VisualList/VisualList.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type JSX, type PropsWithChildren } from \"react\";\nimport styles from \"./VisualList.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListProps extends React.HTMLProps<HTMLUListElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n}\n\n/**\n * A list component.\n */\nexport function VisualList({\n className,\n children,\n ...props\n}: PropsWithChildren<VisualListProps>): JSX.Element {\n return (\n <ul className={classNames(styles[\"visual-list\"], className)} {...props}>\n {children}\n </ul>\n );\n}\n"],"names":["jsx","styles"],"mappings":";;;;;AAqBO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAoD;AAClD,SACEA,+BAAC,MAAA,EAAG,WAAW,WAAWC,kBAAAA,QAAO,aAAa,GAAG,SAAS,GAAI,GAAG,OAC9D,SAAA,CACH;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisualList.d.ts","sourceRoot":"","sources":["../../../src/components/VisualList/VisualList.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAItD,UAAU,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IACjE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,OAAO,CAMlD"}
1
+ {"version":3,"file":"VisualList.d.ts","sourceRoot":"","sources":["../../../src/components/VisualList/VisualList.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,KAAK,GAAG,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIhE,UAAU,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IACjE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,OAAO,CAMlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisualList.js","sources":["../../../src/components/VisualList/VisualList.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { JSX, PropsWithChildren } from \"react\";\nimport styles from \"./VisualList.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListProps extends React.HTMLProps<HTMLUListElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n}\n\n/**\n * A list component.\n */\nexport function VisualList({\n className,\n children,\n ...props\n}: PropsWithChildren<VisualListProps>): JSX.Element {\n return (\n <ul className={classNames(styles[\"visual-list\"], className)} {...props}>\n {children}\n </ul>\n );\n}\n"],"names":[],"mappings":";;;AAqBO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAoD;AAEhD,SAAA,oBAAC,MAAG,EAAA,WAAW,WAAW,OAAO,aAAa,GAAG,SAAS,GAAI,GAAG,OAC9D,SACH,CAAA;AAEJ;"}
1
+ {"version":3,"file":"VisualList.js","sources":["../../../src/components/VisualList/VisualList.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type JSX, type PropsWithChildren } from \"react\";\nimport styles from \"./VisualList.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListProps extends React.HTMLProps<HTMLUListElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n}\n\n/**\n * A list component.\n */\nexport function VisualList({\n className,\n children,\n ...props\n}: PropsWithChildren<VisualListProps>): JSX.Element {\n return (\n <ul className={classNames(styles[\"visual-list\"], className)} {...props}>\n {children}\n </ul>\n );\n}\n"],"names":[],"mappings":";;;AAqBO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAoD;AAClD,SACE,oBAAC,MAAA,EAAG,WAAW,WAAW,OAAO,aAAa,GAAG,SAAS,GAAI,GAAG,OAC9D,SAAA,CACH;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisualListItem.cjs","sources":["../../../src/components/VisualList/VisualListItem.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { ComponentType, JSX, PropsWithChildren } from \"react\";\nimport styles from \"./VisualListItem.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListItemProps extends React.HTMLProps<HTMLLIElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The icon component.\n */\n Icon: ComponentType<React.SVGAttributes<SVGElement>>;\n\n success?: boolean;\n destructive?: boolean;\n}\n\n/**\n * A list component.\n */\nexport function VisualListItem({\n className,\n children,\n Icon,\n success = false,\n destructive = false,\n ...props\n}: PropsWithChildren<VisualListItemProps>): JSX.Element {\n return (\n <li\n className={classNames(styles[\"visual-list-item\"], className)}\n {...props}\n >\n <Icon\n className={classNames(styles[\"visual-list-item-icon\"], {\n [styles[\"visual-list-item-icon-success\"]]: success,\n [styles[\"visual-list-item-icon-destructive\"]]: destructive,\n })}\n width=\"24px\"\n height=\"24px\"\n aria-hidden={true}\n />\n {children}\n </li>\n );\n}\n"],"names":["jsxs","styles","jsx"],"mappings":";;;;;AA4BO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,cAAc;AAAA,EACd,GAAG;AACL,GAAwD;AAEpD,SAAAA,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAWC,sBAAAA,QAAO,kBAAkB,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,WAAWD,8BAAO,uBAAuB,GAAG;AAAA,cACrD,CAACA,sBAAA,QAAO,+BAA+B,CAAC,GAAG;AAAA,cAC3C,CAACA,sBAAAA,QAAO,mCAAmC,CAAC,GAAG;AAAA,YAAA,CAChD;AAAA,YACD,OAAM;AAAA,YACN,QAAO;AAAA,YACP,eAAa;AAAA,UAAA;AAAA,QACf;AAAA,QACC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAEJ;;"}
1
+ {"version":3,"file":"VisualListItem.cjs","sources":["../../../src/components/VisualList/VisualListItem.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, {\n type ComponentType,\n type JSX,\n type PropsWithChildren,\n} from \"react\";\nimport styles from \"./VisualListItem.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListItemProps extends React.HTMLProps<HTMLLIElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The icon component.\n */\n Icon: ComponentType<React.SVGAttributes<SVGElement>>;\n\n success?: boolean;\n destructive?: boolean;\n}\n\n/**\n * A list component.\n */\nexport function VisualListItem({\n className,\n children,\n Icon,\n success = false,\n destructive = false,\n ...props\n}: PropsWithChildren<VisualListItemProps>): JSX.Element {\n return (\n <li\n className={classNames(styles[\"visual-list-item\"], className)}\n {...props}\n >\n <Icon\n className={classNames(styles[\"visual-list-item-icon\"], {\n [styles[\"visual-list-item-icon-success\"]]: success,\n [styles[\"visual-list-item-icon-destructive\"]]: destructive,\n })}\n width=\"24px\"\n height=\"24px\"\n aria-hidden={true}\n />\n {children}\n </li>\n );\n}\n"],"names":["jsxs","styles","jsx"],"mappings":";;;;;AAgCO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,cAAc;AAAA,EACd,GAAG;AACL,GAAwD;AACtD,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAWC,sBAAAA,QAAO,kBAAkB,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,WAAWD,8BAAO,uBAAuB,GAAG;AAAA,cACrD,CAACA,sBAAAA,QAAO,+BAA+B,CAAC,GAAG;AAAA,cAC3C,CAACA,sBAAAA,QAAO,mCAAmC,CAAC,GAAG;AAAA,YAAA,CAChD;AAAA,YACD,OAAM;AAAA,YACN,QAAO;AAAA,YACP,eAAa;AAAA,UAAA;AAAA,QAAA;AAAA,QAEd;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisualListItem.d.ts","sourceRoot":"","sources":["../../../src/components/VisualList/VisualListItem.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIrE,UAAU,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAClE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;IAErD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,OAAe,EACf,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,GAAG,CAAC,OAAO,CAkBtD"}
1
+ {"version":3,"file":"VisualListItem.d.ts","sourceRoot":"","sources":["../../../src/components/VisualList/VisualListItem.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,EAClB,KAAK,GAAG,EACR,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAIf,UAAU,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAClE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;IAErD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,OAAe,EACf,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,GAAG,CAAC,OAAO,CAkBtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisualListItem.js","sources":["../../../src/components/VisualList/VisualListItem.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { ComponentType, JSX, PropsWithChildren } from \"react\";\nimport styles from \"./VisualListItem.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListItemProps extends React.HTMLProps<HTMLLIElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The icon component.\n */\n Icon: ComponentType<React.SVGAttributes<SVGElement>>;\n\n success?: boolean;\n destructive?: boolean;\n}\n\n/**\n * A list component.\n */\nexport function VisualListItem({\n className,\n children,\n Icon,\n success = false,\n destructive = false,\n ...props\n}: PropsWithChildren<VisualListItemProps>): JSX.Element {\n return (\n <li\n className={classNames(styles[\"visual-list-item\"], className)}\n {...props}\n >\n <Icon\n className={classNames(styles[\"visual-list-item-icon\"], {\n [styles[\"visual-list-item-icon-success\"]]: success,\n [styles[\"visual-list-item-icon-destructive\"]]: destructive,\n })}\n width=\"24px\"\n height=\"24px\"\n aria-hidden={true}\n />\n {children}\n </li>\n );\n}\n"],"names":[],"mappings":";;;AA4BO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,cAAc;AAAA,EACd,GAAG;AACL,GAAwD;AAEpD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,OAAO,kBAAkB,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,WAAW,OAAO,uBAAuB,GAAG;AAAA,cACrD,CAAC,OAAO,+BAA+B,CAAC,GAAG;AAAA,cAC3C,CAAC,OAAO,mCAAmC,CAAC,GAAG;AAAA,YAAA,CAChD;AAAA,YACD,OAAM;AAAA,YACN,QAAO;AAAA,YACP,eAAa;AAAA,UAAA;AAAA,QACf;AAAA,QACC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"VisualListItem.js","sources":["../../../src/components/VisualList/VisualListItem.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, {\n type ComponentType,\n type JSX,\n type PropsWithChildren,\n} from \"react\";\nimport styles from \"./VisualListItem.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListItemProps extends React.HTMLProps<HTMLLIElement> {\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The icon component.\n */\n Icon: ComponentType<React.SVGAttributes<SVGElement>>;\n\n success?: boolean;\n destructive?: boolean;\n}\n\n/**\n * A list component.\n */\nexport function VisualListItem({\n className,\n children,\n Icon,\n success = false,\n destructive = false,\n ...props\n}: PropsWithChildren<VisualListItemProps>): JSX.Element {\n return (\n <li\n className={classNames(styles[\"visual-list-item\"], className)}\n {...props}\n >\n <Icon\n className={classNames(styles[\"visual-list-item-icon\"], {\n [styles[\"visual-list-item-icon-success\"]]: success,\n [styles[\"visual-list-item-icon-destructive\"]]: destructive,\n })}\n width=\"24px\"\n height=\"24px\"\n aria-hidden={true}\n />\n {children}\n </li>\n );\n}\n"],"names":[],"mappings":";;;AAgCO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,cAAc;AAAA,EACd,GAAG;AACL,GAAwD;AACtD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,OAAO,kBAAkB,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,WAAW,OAAO,uBAAuB,GAAG;AAAA,cACrD,CAAC,OAAO,+BAA+B,CAAC,GAAG;AAAA,cAC3C,CAAC,OAAO,mCAAmC,CAAC,GAAG;AAAA,YAAA,CAChD;AAAA,YACD,OAAM;AAAA,YACN,QAAO;AAAA,YACP,eAAa;AAAA,UAAA;AAAA,QAAA;AAAA,QAEd;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -617,7 +617,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
617
617
  Please see LICENSE files in the repository root for full details.
618
618
  */
619
619
 
620
- ._menu_19sse_8 {
620
+ ._menu_1glhz_8 {
621
621
  border-radius: var(--cpd-space-3x);
622
622
  background: var(--cpd-color-bg-canvas-default);
623
623
 
@@ -627,7 +627,7 @@ Please see LICENSE files in the repository root for full details.
627
627
  outline: var(--cpd-border-width-1) solid
628
628
  var(--cpd-color-border-interactive-secondary) !important;
629
629
  outline-offset: calc(-1 * var(--cpd-border-width-1));
630
- box-shadow: 0 4px 24px 0 rgba(0 0 0 / 10%);
630
+ box-shadow: 0 4px 24px 0 rgb(0 0 0 / 10%);
631
631
  inline-size: fit-content;
632
632
  max-inline-size: 320px;
633
633
  display: flex;
@@ -639,51 +639,51 @@ Please see LICENSE files in the repository root for full details.
639
639
  --cpd-separator-inset: var(--cpd-space-4x);
640
640
  }
641
641
 
642
- @keyframes _slide-in_19sse_1 {
642
+ @keyframes _slide-in_1glhz_1 {
643
643
  from {
644
644
  opacity: 0;
645
645
  transform: translate(0, var(--cpd-space-3x));
646
646
  }
647
647
  }
648
648
 
649
- @keyframes _slide-out_19sse_1 {
649
+ @keyframes _slide-out_1glhz_1 {
650
650
  to {
651
651
  opacity: 0;
652
652
  transform: translate(0, var(--cpd-space-2x));
653
653
  }
654
654
  }
655
655
 
656
- ._menu_19sse_8[data-state="open"] {
657
- animation: _slide-in_19sse_1 180ms;
656
+ ._menu_1glhz_8[data-state="open"] {
657
+ animation: _slide-in_1glhz_1 180ms;
658
658
  }
659
659
 
660
- ._menu_19sse_8[data-state="closed"] {
661
- animation: _slide-out_19sse_1 110ms;
660
+ ._menu_1glhz_8[data-state="closed"] {
661
+ animation: _slide-out_1glhz_1 110ms;
662
662
  }
663
663
 
664
- @keyframes _fade-in_19sse_1 {
664
+ @keyframes _fade-in_1glhz_1 {
665
665
  from {
666
666
  opacity: 0;
667
667
  }
668
668
  }
669
669
 
670
- @keyframes _fade-out_19sse_1 {
670
+ @keyframes _fade-out_1glhz_1 {
671
671
  to {
672
672
  opacity: 0;
673
673
  }
674
674
  }
675
675
 
676
676
  @media (prefers-reduced-motion) {
677
- ._menu_19sse_8[data-state="open"] {
678
- animation-name: _fade-in_19sse_1;
677
+ ._menu_1glhz_8[data-state="open"] {
678
+ animation-name: _fade-in_1glhz_1;
679
679
  }
680
680
 
681
- ._menu_19sse_8[data-state="closed"] {
682
- animation-name: _fade-out_19sse_1;
681
+ ._menu_1glhz_8[data-state="closed"] {
682
+ animation-name: _fade-out_1glhz_1;
683
683
  }
684
684
  }
685
685
 
686
- ._title_19sse_74 {
686
+ ._title_1glhz_74 {
687
687
  /** Override MenuTitle margin top **/
688
688
  margin-block-start: 0 !important;
689
689
  }
@@ -708,16 +708,16 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
708
708
  Please see LICENSE files in the repository root for full details.
709
709
  */
710
710
 
711
- ._bg_1y38p_8 {
711
+ ._bg_610zp_8 {
712
712
  position: fixed;
713
713
  inset: 0;
714
714
 
715
715
  /* TODO: This value is used across modals and menu drawers, so would be worth
716
716
  tokenizing */
717
- background: rgba(3 12 27 / 52.8%);
717
+ background: rgb(3 12 27 / 52.8%);
718
718
  }
719
719
 
720
- ._drawer_1y38p_17 {
720
+ ._drawer_610zp_17 {
721
721
  position: fixed;
722
722
  background: var(--cpd-color-bg-canvas-default);
723
723
  inset-block-end: 0;
@@ -743,7 +743,7 @@ Please see LICENSE files in the repository root for full details.
743
743
  );
744
744
  }
745
745
 
746
- ._drawer_1y38p_17[data-platform="ios"] {
746
+ ._drawer_610zp_17[data-platform="ios"] {
747
747
  --border-radius: 10px;
748
748
  --handle-block-size: 5px;
749
749
  --handle-inline-size: 36px;
@@ -751,7 +751,7 @@ Please see LICENSE files in the repository root for full details.
751
751
  --handle-inset-block-end: 1px;
752
752
  }
753
753
 
754
- ._body_1y38p_51 {
754
+ ._body_610zp_51 {
755
755
  display: flex;
756
756
  flex-direction: column;
757
757
  gap: var(--cpd-space-2x);
@@ -770,7 +770,7 @@ Please see LICENSE files in the repository root for full details.
770
770
  --cpd-separator-inset: var(--cpd-space-4x);
771
771
  }
772
772
 
773
- ._body_1y38p_51::before {
773
+ ._body_610zp_51::before {
774
774
  content: "";
775
775
  position: absolute;
776
776
  block-size: var(--handle-block-size);
@@ -1 +1 @@
1
- {"version":3,"file":"__ComponentTemplate__.d.ts","sourceRoot":"","sources":["../../../src/utils/__ComponentTemplate__/__ComponentTemplate__.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAO7D,eAAO,MAAM,qBAAqB;gBAHpB,MAAM;+EAqBlB,CAAC"}
1
+ {"version":3,"file":"__ComponentTemplate__.d.ts","sourceRoot":"","sources":["../../../src/utils/__ComponentTemplate__/__ComponentTemplate__.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAOlE,eAAO,MAAM,qBAAqB;gBAHpB,MAAM;+EAqBlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"platform.cjs","sources":["../../src/utils/platform.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n/**\n * Gets the platform on which the application is running.\n * If the userAgent could not be determined, this will default to \"other\"\n */\nexport function getPlatform(): \"android\" | \"ios\" | \"other\" {\n // The granularity of this value is kind of arbitrary: it distinguishes exactly\n // the platforms that this library needs to know about in order to correctly\n // implement the designs.\n\n // Some SSR environments don't provide access to this.\n const userAgent = globalThis.navigator?.userAgent;\n\n if (/android/i.test(userAgent)) {\n return \"android\";\n // We include 'Mac' here and double-check for touch support because iPads on\n // iOS 13 pretend to be a MacOS desktop\n } else if (\n /iPad|iPhone|iPod|Mac/.test(userAgent) &&\n \"ontouchend\" in document\n ) {\n return \"ios\";\n } else {\n return \"other\";\n }\n}\n"],"names":[],"mappings":";;AAWO,SAAS,cAA2C;AAMnD,QAAA,YAAY,WAAW,WAAW;AAEpC,MAAA,WAAW,KAAK,SAAS,GAAG;AACvB,WAAA;AAAA,EAAA,WAIP,uBAAuB,KAAK,SAAS,KACrC,gBAAgB,UAChB;AACO,WAAA;AAAA,EAAA,OACF;AACE,WAAA;AAAA,EAAA;AAEX;;"}
1
+ {"version":3,"file":"platform.cjs","sources":["../../src/utils/platform.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n/**\n * Gets the platform on which the application is running.\n * If the userAgent could not be determined, this will default to \"other\"\n */\nexport function getPlatform(): \"android\" | \"ios\" | \"other\" {\n // The granularity of this value is kind of arbitrary: it distinguishes exactly\n // the platforms that this library needs to know about in order to correctly\n // implement the designs.\n\n // Some SSR environments don't provide access to this.\n const userAgent = globalThis.navigator?.userAgent;\n\n if (/android/i.test(userAgent)) {\n return \"android\";\n // We include 'Mac' here and double-check for touch support because iPads on\n // iOS 13 pretend to be a MacOS desktop\n } else if (\n /iPad|iPhone|iPod|Mac/.test(userAgent) &&\n \"ontouchend\" in document\n ) {\n return \"ios\";\n } else {\n return \"other\";\n }\n}\n"],"names":[],"mappings":";;AAWO,SAAS,cAA2C;AAMzD,QAAM,YAAY,WAAW,WAAW;AAExC,MAAI,WAAW,KAAK,SAAS,GAAG;AAC9B,WAAO;AAAA,EAGT,WACE,uBAAuB,KAAK,SAAS,KACrC,gBAAgB,UAChB;AACA,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sources":["../../src/utils/platform.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n/**\n * Gets the platform on which the application is running.\n * If the userAgent could not be determined, this will default to \"other\"\n */\nexport function getPlatform(): \"android\" | \"ios\" | \"other\" {\n // The granularity of this value is kind of arbitrary: it distinguishes exactly\n // the platforms that this library needs to know about in order to correctly\n // implement the designs.\n\n // Some SSR environments don't provide access to this.\n const userAgent = globalThis.navigator?.userAgent;\n\n if (/android/i.test(userAgent)) {\n return \"android\";\n // We include 'Mac' here and double-check for touch support because iPads on\n // iOS 13 pretend to be a MacOS desktop\n } else if (\n /iPad|iPhone|iPod|Mac/.test(userAgent) &&\n \"ontouchend\" in document\n ) {\n return \"ios\";\n } else {\n return \"other\";\n }\n}\n"],"names":[],"mappings":"AAWO,SAAS,cAA2C;AAMnD,QAAA,YAAY,WAAW,WAAW;AAEpC,MAAA,WAAW,KAAK,SAAS,GAAG;AACvB,WAAA;AAAA,EAAA,WAIP,uBAAuB,KAAK,SAAS,KACrC,gBAAgB,UAChB;AACO,WAAA;AAAA,EAAA,OACF;AACE,WAAA;AAAA,EAAA;AAEX;"}
1
+ {"version":3,"file":"platform.js","sources":["../../src/utils/platform.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\n/**\n * Gets the platform on which the application is running.\n * If the userAgent could not be determined, this will default to \"other\"\n */\nexport function getPlatform(): \"android\" | \"ios\" | \"other\" {\n // The granularity of this value is kind of arbitrary: it distinguishes exactly\n // the platforms that this library needs to know about in order to correctly\n // implement the designs.\n\n // Some SSR environments don't provide access to this.\n const userAgent = globalThis.navigator?.userAgent;\n\n if (/android/i.test(userAgent)) {\n return \"android\";\n // We include 'Mac' here and double-check for touch support because iPads on\n // iOS 13 pretend to be a MacOS desktop\n } else if (\n /iPad|iPhone|iPod|Mac/.test(userAgent) &&\n \"ontouchend\" in document\n ) {\n return \"ios\";\n } else {\n return \"other\";\n }\n}\n"],"names":[],"mappings":"AAWO,SAAS,cAA2C;AAMzD,QAAM,YAAY,WAAW,WAAW;AAExC,MAAI,WAAW,KAAK,SAAS,GAAG;AAC9B,WAAO;AAAA,EAGT,WACE,uBAAuB,KAAK,SAAS,KACrC,gBAAgB,UAChB;AACA,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"string.cjs","sources":["../../src/utils/string.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nexport const MX_USERNAME_PREFIX = \"@\";\nexport const MX_ROOM_PREFIX = \"#\";\nexport const MX_ALIAS_PREFIX = \"+\";\n\nconst graphemeSegmenter = new Intl.Segmenter();\n\n/**\n * returns the first (non-sigil) character of 'name',\n * converted to uppercase\n * @param {string} name\n * @return {string} the first letter\n */\nexport function getInitialLetter(name: string): string {\n if (name.length < 1) {\n return \"\";\n }\n\n const initial = name[0];\n if ([MX_USERNAME_PREFIX, MX_ROOM_PREFIX, MX_ALIAS_PREFIX].includes(initial)) {\n name = name.substring(1);\n }\n\n // rely on a grapheme cluster splitter so that we don't break apart compound emojis\n const result = graphemeSegmenter.segment(name)[Symbol.iterator]().next();\n return result.done ? \"\" : result.value.segment;\n}\n"],"names":[],"mappings":";;AAOO,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,IAAI,KAAK,UAAU;AAQtC,SAAS,iBAAiB,MAAsB;AACjD,MAAA,KAAK,SAAS,GAAG;AACZ,WAAA;AAAA,EAAA;AAGH,QAAA,UAAU,KAAK,CAAC;AACtB,MAAI,CAAC,oBAAoB,gBAAgB,eAAe,EAAE,SAAS,OAAO,GAAG;AACpE,WAAA,KAAK,UAAU,CAAC;AAAA,EAAA;AAInB,QAAA,SAAS,kBAAkB,QAAQ,IAAI,EAAE,OAAO,QAAQ,EAAE,EAAE,KAAK;AACvE,SAAO,OAAO,OAAO,KAAK,OAAO,MAAM;AACzC;;;;;"}
1
+ {"version":3,"file":"string.cjs","sources":["../../src/utils/string.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nexport const MX_USERNAME_PREFIX = \"@\";\nexport const MX_ROOM_PREFIX = \"#\";\nexport const MX_ALIAS_PREFIX = \"+\";\n\nconst graphemeSegmenter = new Intl.Segmenter();\n\n/**\n * returns the first (non-sigil) character of 'name',\n * converted to uppercase\n * @param {string} name\n * @return {string} the first letter\n */\nexport function getInitialLetter(name: string): string {\n if (name.length < 1) {\n return \"\";\n }\n\n const initial = name[0];\n if ([MX_USERNAME_PREFIX, MX_ROOM_PREFIX, MX_ALIAS_PREFIX].includes(initial)) {\n name = name.substring(1);\n }\n\n // rely on a grapheme cluster splitter so that we don't break apart compound emojis\n const result = graphemeSegmenter.segment(name)[Symbol.iterator]().next();\n return result.done ? \"\" : result.value.segment;\n}\n"],"names":[],"mappings":";;AAOO,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,IAAI,KAAK,UAAA;AAQ5B,SAAS,iBAAiB,MAAsB;AACrD,MAAI,KAAK,SAAS,GAAG;AACnB,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,KAAK,CAAC;AACtB,MAAI,CAAC,oBAAoB,gBAAgB,eAAe,EAAE,SAAS,OAAO,GAAG;AAC3E,WAAO,KAAK,UAAU,CAAC;AAAA,EACzB;AAGA,QAAM,SAAS,kBAAkB,QAAQ,IAAI,EAAE,OAAO,QAAQ,EAAA,EAAI,KAAA;AAClE,SAAO,OAAO,OAAO,KAAK,OAAO,MAAM;AACzC;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"string.js","sources":["../../src/utils/string.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nexport const MX_USERNAME_PREFIX = \"@\";\nexport const MX_ROOM_PREFIX = \"#\";\nexport const MX_ALIAS_PREFIX = \"+\";\n\nconst graphemeSegmenter = new Intl.Segmenter();\n\n/**\n * returns the first (non-sigil) character of 'name',\n * converted to uppercase\n * @param {string} name\n * @return {string} the first letter\n */\nexport function getInitialLetter(name: string): string {\n if (name.length < 1) {\n return \"\";\n }\n\n const initial = name[0];\n if ([MX_USERNAME_PREFIX, MX_ROOM_PREFIX, MX_ALIAS_PREFIX].includes(initial)) {\n name = name.substring(1);\n }\n\n // rely on a grapheme cluster splitter so that we don't break apart compound emojis\n const result = graphemeSegmenter.segment(name)[Symbol.iterator]().next();\n return result.done ? \"\" : result.value.segment;\n}\n"],"names":[],"mappings":"AAOO,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,IAAI,KAAK,UAAU;AAQtC,SAAS,iBAAiB,MAAsB;AACjD,MAAA,KAAK,SAAS,GAAG;AACZ,WAAA;AAAA,EAAA;AAGH,QAAA,UAAU,KAAK,CAAC;AACtB,MAAI,CAAC,oBAAoB,gBAAgB,eAAe,EAAE,SAAS,OAAO,GAAG;AACpE,WAAA,KAAK,UAAU,CAAC;AAAA,EAAA;AAInB,QAAA,SAAS,kBAAkB,QAAQ,IAAI,EAAE,OAAO,QAAQ,EAAE,EAAE,KAAK;AACvE,SAAO,OAAO,OAAO,KAAK,OAAO,MAAM;AACzC;"}
1
+ {"version":3,"file":"string.js","sources":["../../src/utils/string.ts"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nexport const MX_USERNAME_PREFIX = \"@\";\nexport const MX_ROOM_PREFIX = \"#\";\nexport const MX_ALIAS_PREFIX = \"+\";\n\nconst graphemeSegmenter = new Intl.Segmenter();\n\n/**\n * returns the first (non-sigil) character of 'name',\n * converted to uppercase\n * @param {string} name\n * @return {string} the first letter\n */\nexport function getInitialLetter(name: string): string {\n if (name.length < 1) {\n return \"\";\n }\n\n const initial = name[0];\n if ([MX_USERNAME_PREFIX, MX_ROOM_PREFIX, MX_ALIAS_PREFIX].includes(initial)) {\n name = name.substring(1);\n }\n\n // rely on a grapheme cluster splitter so that we don't break apart compound emojis\n const result = graphemeSegmenter.segment(name)[Symbol.iterator]().next();\n return result.done ? \"\" : result.value.segment;\n}\n"],"names":[],"mappings":"AAOO,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;AAE/B,MAAM,oBAAoB,IAAI,KAAK,UAAA;AAQ5B,SAAS,iBAAiB,MAAsB;AACrD,MAAI,KAAK,SAAS,GAAG;AACnB,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,KAAK,CAAC;AACtB,MAAI,CAAC,oBAAoB,gBAAgB,eAAe,EAAE,SAAS,OAAO,GAAG;AAC3E,WAAO,KAAK,UAAU,CAAC;AAAA,EACzB;AAGA,QAAM,SAAS,kBAAkB,QAAQ,IAAI,EAAE,OAAO,QAAQ,EAAA,EAAI,KAAA;AAClE,SAAO,OAAO,OAAO,KAAK,OAAO,MAAM;AACzC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vector-im/compound-web",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "Compound components for the Web",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -8,10 +8,10 @@
8
8
  "sideEffects": false,
9
9
  "exports": {
10
10
  ".": {
11
- "require": "./dist/index.cjs",
12
- "import": "./dist/index.js",
11
+ "style": "./dist/style.css",
13
12
  "types": "./dist/index.d.ts",
14
- "style": "./dist/style.css"
13
+ "require": "./dist/index.cjs",
14
+ "import": "./dist/index.js"
15
15
  },
16
16
  "./dist/style.css": "./dist/style.css"
17
17
  },
@@ -27,8 +27,9 @@
27
27
  "lint:ts": "tsc --noEmit -p .",
28
28
  "lint:styles": "npx stylelint 'src/**/*.css'",
29
29
  "test": "vitest",
30
- "e2e": "playwright test",
31
- "e2e:docker": "docker run --rm --network host --ipc=host --security-opt seccomp=playwright/seccomp_profile.json -v $(pwd)/../:/work/ -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/:/tmp/ --init -it $(docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -q playwright)",
30
+ "e2e": "yarn build-storybook && playwright test",
31
+ "e2e:docker": "yarn build-storybook && docker run --rm --network host --ipc=host --security-opt seccomp=playwright/seccomp_profile.json -v $(pwd)/../:/work/ -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/:/tmp/ --init -it $(docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -q playwright)",
32
+ "e2e:podman": "yarn build-storybook && podman run --rm --network host --ipc=host --security-opt seccomp=playwright/seccomp_profile.json -v $(pwd)/../:/work/ -v /tmp/:/tmp/ --userns=keep-id --init -it $(podman build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -q playwright)",
32
33
  "build-storybook": "storybook build",
33
34
  "storybook": "storybook dev -p 6006",
34
35
  "gen:component": "node scripts/genComponent.js"
@@ -54,54 +55,50 @@
54
55
  "@fontsource/inconsolata": "^5.0.8",
55
56
  "@fontsource/inter": "^5.0.8",
56
57
  "@playwright/test": "^1.41.1",
57
- "@storybook/addon-a11y": "^8.1.1",
58
- "@storybook/addon-designs": "8.0.4",
59
- "@storybook/addon-essentials": "^8.1.1",
60
- "@storybook/addon-interactions": "^8.1.1",
61
- "@storybook/addon-links": "^8.1.1",
62
- "@storybook/addon-themes": "^8.1.1",
63
- "@storybook/manager-api": "^8.1.1",
64
- "@storybook/react": "^8.1.1",
65
- "@storybook/react-vite": "^8.1.1",
66
- "@storybook/test": "^8.1.1",
58
+ "@storybook/addon-a11y": "^9.0.16",
59
+ "@storybook/addon-designs": "10.0.2",
60
+ "@storybook/addon-docs": "^9.0.16",
61
+ "@storybook/addon-links": "^9.0.16",
62
+ "@storybook/addon-themes": "^9.0.16",
63
+ "@storybook/react-vite": "^9.0.16",
67
64
  "@testing-library/dom": "^10.3.2",
68
65
  "@testing-library/jest-dom": "^6.1.3",
69
66
  "@testing-library/react": "^16.0.0",
70
67
  "@testing-library/user-event": "^14.5.1",
71
68
  "@tsconfig/node20": "^20.1.4",
72
- "@tsconfig/vite-react": "^3.0.0",
69
+ "@tsconfig/vite-react": "^7.0.0",
73
70
  "@types/eslint": "^9.0.0",
74
71
  "@types/node": "^22.0.0",
75
72
  "@types/react": "^19.0.0",
76
73
  "@typescript-eslint/eslint-plugin": "^8.0.0",
77
74
  "@typescript-eslint/parser": "^8.0.0",
78
- "@vector-im/compound-design-tokens": "^5.0.0",
79
- "@vitejs/plugin-react": "^4.0.4",
80
- "@vitest/coverage-v8": "^3.0.0",
75
+ "@vector-im/compound-design-tokens": "^6.0.0",
76
+ "@vitejs/plugin-react": "^5.0.0",
77
+ "@vitest/coverage-v8": "^3.2.4",
81
78
  "browserslist-to-esbuild": "^2.0.0",
82
79
  "eslint": "^8.49.0",
83
80
  "eslint-config-prettier": "^10.0.0",
84
- "eslint-plugin-matrix-org": "^1.2.1",
81
+ "eslint-plugin-matrix-org": "^2.0.0",
85
82
  "eslint-plugin-prettier": "^5.0.0",
86
83
  "eslint-plugin-react": "^7.33.2",
87
- "eslint-plugin-storybook": "^0.11.0",
88
- "jsdom": "^26.0.0",
89
- "prettier": "3.4.2",
90
- "react": "^19.0.0",
91
- "react-dom": "^19.0.0",
84
+ "eslint-plugin-storybook": "^9.0.16",
85
+ "jsdom": "^26.1.0",
86
+ "prettier": "3.6.2",
87
+ "react": "^19.1.0",
88
+ "react-dom": "^19.1.0",
92
89
  "resize-observer-polyfill": "^1.5.1",
93
90
  "rimraf": "^6.0.0",
94
91
  "serve": "^14.2.1",
95
- "storybook": "^8.1.1",
92
+ "storybook": "^9.0.16",
96
93
  "stylelint": "^16.13.2",
97
- "stylelint-config-standard": "^37.0.0",
94
+ "stylelint-config-standard": "^39.0.0",
98
95
  "stylelint-plugin-defensive-css": "^1.0.0",
99
96
  "stylelint-use-logical": "^2.1.0",
100
97
  "stylelint-value-no-unknown-custom-properties": "^6.0.0",
101
98
  "typescript": "^5.2.2",
102
- "vite": "^6.0.0",
103
- "vite-plugin-dts": "^4.0.0",
104
- "vitest": "^3.0.0"
99
+ "vite": "^7.0.3",
100
+ "vite-plugin-dts": "^4.5.4",
101
+ "vitest": "^3.2.4"
105
102
  },
106
103
  "dependencies": {
107
104
  "@floating-ui/react": "^0.27.0",
@@ -118,7 +115,7 @@
118
115
  "@fontsource/inconsolata": "^5",
119
116
  "@fontsource/inter": "^5",
120
117
  "@types/react": "*",
121
- "@vector-im/compound-design-tokens": ">=1.6.1 <6.0.0",
118
+ "@vector-im/compound-design-tokens": ">=1.6.1 <7.0.0",
122
119
  "react": "^18 || ^19.0.0"
123
120
  },
124
121
  "peerDependenciesMeta": {
@@ -5,7 +5,7 @@
5
5
  * Please see LICENSE files in the repository root for full details.
6
6
  */
7
7
 
8
- import React, { HTMLProps, JSX } from "react";
8
+ import React, { type HTMLProps, type JSX } from "react";
9
9
  import styles from "./Pill.module.css";
10
10
 
11
11
  export function Pill({
@@ -5,7 +5,7 @@
5
5
  * Please see LICENSE files in the repository root for full details.
6
6
  */
7
7
 
8
- import React, { HTMLProps } from "react";
8
+ import React, { type HTMLProps } from "react";
9
9
  import styles from "./Unread.module.css";
10
10
 
11
11
  export function Unread(props: HTMLProps<HTMLDivElement>) {
@@ -5,7 +5,7 @@
5
5
  * Please see LICENSE files in the repository root for full details.
6
6
  */
7
7
 
8
- import React, { HTMLProps } from "react";
8
+ import React, { type HTMLProps } from "react";
9
9
  import styles from "./UnreadCounter.module.css";
10
10
 
11
11
  interface UnreadCounterProps extends HTMLProps<HTMLDivElement> {
@@ -6,7 +6,7 @@ Please see LICENSE files in the repository root for full details.
6
6
  */
7
7
 
8
8
  import classNames from "classnames";
9
- import React, { PropsWithChildren, useCallback } from "react";
9
+ import React, { type PropsWithChildren, useCallback } from "react";
10
10
 
11
11
  import CheckCircleIcon from "@vector-im/compound-design-tokens/assets/web/icons/check-circle";
12
12
  import ErrorIcon from "@vector-im/compound-design-tokens/assets/web/icons/error-solid";
@@ -6,7 +6,7 @@ Please see LICENSE files in the repository root for full details.
6
6
  */
7
7
 
8
8
  import classnames from "classnames";
9
- import React, { ComponentProps, forwardRef } from "react";
9
+ import React, { type ComponentProps, forwardRef } from "react";
10
10
  import { getInitialLetter } from "../../utils/string";
11
11
  import styles from "./Avatar.module.css";
12
12
  import { useIdColorHash } from "./useIdColorHash";
@@ -6,7 +6,7 @@ Please see LICENSE files in the repository root for full details.
6
6
  */
7
7
 
8
8
  import classnames from "classnames";
9
- import React, { PropsWithChildren } from "react";
9
+ import React, { type PropsWithChildren } from "react";
10
10
  import styles from "./Badge.module.css";
11
11
  import { Typography } from "../Typography/Typography";
12
12