@soroush.tech/design-system 2.0.0 → 2.1.0-alpha.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 (283) hide show
  1. package/dist/Accordion/Accordion.d.cts +2 -2
  2. package/dist/Accordion/Accordion.d.mts +2 -2
  3. package/dist/Accordion/AccordionGroup.d.cts +1 -1
  4. package/dist/Accordion/AccordionGroup.d.mts +1 -1
  5. package/dist/Alert/Alert.d.cts +1 -1
  6. package/dist/Alert/Alert.d.mts +1 -1
  7. package/dist/AppBar.d.cts +1 -1
  8. package/dist/AppBar.d.mts +1 -1
  9. package/dist/Autocomplete.cjs +1 -1
  10. package/dist/Autocomplete.d.cts +1 -1
  11. package/dist/Autocomplete.d.mts +1 -1
  12. package/dist/Autocomplete.mjs +1 -1
  13. package/dist/Avatar.d.cts +1 -1
  14. package/dist/Avatar.d.mts +1 -1
  15. package/dist/Backdrop.d.cts +1 -1
  16. package/dist/Backdrop.d.mts +1 -1
  17. package/dist/Badge.d.cts +1 -1
  18. package/dist/Badge.d.mts +1 -1
  19. package/dist/Breadcrumbs.d.cts +3 -3
  20. package/dist/Breadcrumbs.d.mts +3 -3
  21. package/dist/Button.d.cts +1 -1
  22. package/dist/Button.d.mts +1 -1
  23. package/dist/ButtonGroup.d.cts +1 -1
  24. package/dist/ButtonGroup.d.mts +1 -1
  25. package/dist/Card.d.cts +4 -4
  26. package/dist/Card.d.mts +4 -4
  27. package/dist/Checkbox.d.cts +1 -1
  28. package/dist/Checkbox.d.mts +1 -1
  29. package/dist/Chip.d.cts +1 -1
  30. package/dist/Chip.d.mts +1 -1
  31. package/dist/CircularProgress.d.cts +2 -2
  32. package/dist/CircularProgress.d.mts +2 -2
  33. package/dist/Collapse.d.cts +1 -1
  34. package/dist/Collapse.d.mts +1 -1
  35. package/dist/Drawer.d.cts +3 -3
  36. package/dist/Drawer.d.mts +3 -3
  37. package/dist/Fab.d.cts +1 -1
  38. package/dist/Fab.d.mts +1 -1
  39. package/dist/FabMenu/FabMenu.d.cts +1 -1
  40. package/dist/FabMenu/FabMenu.d.mts +1 -1
  41. package/dist/FabMenu/FabMenuItem.d.cts +1 -1
  42. package/dist/FabMenu/FabMenuItem.d.mts +1 -1
  43. package/dist/Fade.d.cts +1 -1
  44. package/dist/Fade.d.mts +1 -1
  45. package/dist/Flex.d.cts +1 -1
  46. package/dist/Flex.d.mts +1 -1
  47. package/dist/Form.d.cts +1 -1
  48. package/dist/Form.d.mts +1 -1
  49. package/dist/FormControl.d.cts +1 -1
  50. package/dist/FormControl.d.mts +1 -1
  51. package/dist/FormHelperText.d.cts +1 -1
  52. package/dist/FormHelperText.d.mts +1 -1
  53. package/dist/FormLabel.d.cts +1 -1
  54. package/dist/FormLabel.d.mts +1 -1
  55. package/dist/Grid.d.cts +1 -1
  56. package/dist/Grid.d.mts +1 -1
  57. package/dist/Grow.d.cts +1 -1
  58. package/dist/Grow.d.mts +1 -1
  59. package/dist/Icon.d.cts +1 -1
  60. package/dist/Icon.d.mts +1 -1
  61. package/dist/Image.d.cts +1 -1
  62. package/dist/Image.d.mts +1 -1
  63. package/dist/LinearProgress.d.cts +2 -2
  64. package/dist/LinearProgress.d.mts +2 -2
  65. package/dist/Link.d.cts +1 -1
  66. package/dist/Link.d.mts +1 -1
  67. package/dist/Menu/ContextMenu.cjs +23 -14
  68. package/dist/Menu/ContextMenu.d.cts +18 -8
  69. package/dist/Menu/ContextMenu.d.mts +18 -8
  70. package/dist/Menu/ContextMenu.mjs +24 -15
  71. package/dist/Menu/Menu.cjs +1 -1
  72. package/dist/Menu/Menu.d.cts +1 -1
  73. package/dist/Menu/Menu.d.mts +1 -1
  74. package/dist/Menu/Menu.mjs +1 -1
  75. package/dist/Menu/MenuItems.cjs +1 -1
  76. package/dist/Menu/MenuItems.d.cts +1 -1
  77. package/dist/Menu/MenuItems.d.mts +1 -1
  78. package/dist/Menu/MenuItems.mjs +1 -1
  79. package/dist/Menu/MenuList.cjs +1 -1
  80. package/dist/Menu/MenuList.d.cts +3 -36
  81. package/dist/Menu/MenuList.d.mts +3 -36
  82. package/dist/Menu/MenuList.mjs +1 -1
  83. package/dist/{Menu-Bx9jaHOy.cjs → Menu-C6eIdA1J.cjs} +8 -5
  84. package/dist/{Menu-D4AIpdJv.mjs → Menu-C_4jYHWE.mjs} +8 -5
  85. package/dist/Menu.cjs +2 -2
  86. package/dist/Menu.d.cts +5 -5
  87. package/dist/Menu.d.mts +5 -5
  88. package/dist/Menu.mjs +2 -2
  89. package/dist/{MenuItem-DXRw3Yca.cjs → MenuItem-Bg4iRvVe.cjs} +29 -26
  90. package/dist/{MenuItem-vXHGPK8g.mjs → MenuItem-kRGVRI6G.mjs} +29 -26
  91. package/dist/MenuItem.cjs +1 -1
  92. package/dist/MenuItem.d.cts +1 -1
  93. package/dist/MenuItem.d.mts +1 -1
  94. package/dist/MenuItem.mjs +1 -1
  95. package/dist/{MenuList-DsJmxNPu.cjs → MenuList-CSaaR3jt.cjs} +2 -1
  96. package/dist/{MenuList-CGZgfBno.mjs → MenuList-D7Pvpn_K.mjs} +2 -1
  97. package/dist/{MenuListContext-BwgQHUu9.d.cts → MenuListContext-AnAxu0he.d.cts} +2 -2
  98. package/dist/{MenuListContext-DbnAoUdJ.d.mts → MenuListContext-DURKFg_T.d.mts} +2 -2
  99. package/dist/Modal.d.cts +1 -1
  100. package/dist/Modal.d.mts +1 -1
  101. package/dist/NativeSelect.d.cts +2 -2
  102. package/dist/NativeSelect.d.mts +2 -2
  103. package/dist/NavTree/NavLink.d.cts +1 -1
  104. package/dist/NavTree/NavLink.d.mts +1 -1
  105. package/dist/NavTree/NavTree.d.cts +1 -1
  106. package/dist/NavTree/NavTree.d.mts +1 -1
  107. package/dist/NumberInput.d.cts +1 -1
  108. package/dist/NumberInput.d.mts +1 -1
  109. package/dist/Pagination/PaginationItem.d.cts +1 -1
  110. package/dist/Pagination/PaginationItem.d.mts +1 -1
  111. package/dist/Pagination.d.cts +2 -2
  112. package/dist/Pagination.d.mts +2 -2
  113. package/dist/Paper.d.cts +2 -2
  114. package/dist/Paper.d.mts +2 -2
  115. package/dist/Popover.d.cts +4 -14
  116. package/dist/Popover.d.mts +4 -14
  117. package/dist/Pressable.d.cts +1 -1
  118. package/dist/Pressable.d.mts +1 -1
  119. package/dist/Quote.d.cts +2 -2
  120. package/dist/Quote.d.mts +2 -2
  121. package/dist/Radio.d.cts +1 -1
  122. package/dist/Radio.d.mts +1 -1
  123. package/dist/RangeInput.d.cts +1 -1
  124. package/dist/RangeInput.d.mts +1 -1
  125. package/dist/Rating.d.cts +1 -1
  126. package/dist/Rating.d.mts +1 -1
  127. package/dist/ScrollArea.d.cts +1 -1
  128. package/dist/ScrollArea.d.mts +1 -1
  129. package/dist/Select.d.cts +2 -2
  130. package/dist/Select.d.mts +2 -2
  131. package/dist/Sidebar/Sidebar.d.cts +1 -1
  132. package/dist/Sidebar/Sidebar.d.mts +1 -1
  133. package/dist/Sidebar/SidebarItem.d.cts +3 -3
  134. package/dist/Sidebar/SidebarItem.d.mts +3 -3
  135. package/dist/Skeleton.d.cts +1 -1
  136. package/dist/Skeleton.d.mts +1 -1
  137. package/dist/Slide.d.cts +1 -1
  138. package/dist/Slide.d.mts +1 -1
  139. package/dist/Snackbar.d.cts +2 -2
  140. package/dist/Snackbar.d.mts +2 -2
  141. package/dist/Switch.d.cts +1 -1
  142. package/dist/Switch.d.mts +1 -1
  143. package/dist/Table/Table.d.cts +2 -2
  144. package/dist/Table/Table.d.mts +2 -2
  145. package/dist/Table/TableBody.d.cts +1 -1
  146. package/dist/Table/TableBody.d.mts +1 -1
  147. package/dist/Table/TableCell.d.cts +1 -1
  148. package/dist/Table/TableCell.d.mts +1 -1
  149. package/dist/Table/TableContainer.d.cts +1 -1
  150. package/dist/Table/TableContainer.d.mts +1 -1
  151. package/dist/Table/TableControl.d.cts +1 -1
  152. package/dist/Table/TableControl.d.mts +1 -1
  153. package/dist/Table/TableFooter.d.cts +1 -1
  154. package/dist/Table/TableFooter.d.mts +1 -1
  155. package/dist/Table/TableHead.d.cts +1 -1
  156. package/dist/Table/TableHead.d.mts +1 -1
  157. package/dist/Table/TablePagination.d.cts +2 -2
  158. package/dist/Table/TablePagination.d.mts +2 -2
  159. package/dist/Table/TablePaginationActions.d.cts +1 -1
  160. package/dist/Table/TablePaginationActions.d.mts +1 -1
  161. package/dist/Table/TableRow.d.cts +1 -1
  162. package/dist/Table/TableRow.d.mts +1 -1
  163. package/dist/Table/TableSortLabel.d.cts +1 -1
  164. package/dist/Table/TableSortLabel.d.mts +1 -1
  165. package/dist/Table/hooks.d.cts +1 -1
  166. package/dist/Table/hooks.d.mts +1 -1
  167. package/dist/Table.d.cts +5 -5
  168. package/dist/Table.d.mts +5 -5
  169. package/dist/{TableContext-0hifLOKH.d.mts → TableContext-CPxH920f.d.mts} +1 -1
  170. package/dist/{TableContext-fIyMD_Bj.d.cts → TableContext-VuMFtVNr.d.cts} +1 -1
  171. package/dist/Tabs/Tab.cjs +18 -14
  172. package/dist/Tabs/Tab.d.cts +2 -2
  173. package/dist/Tabs/Tab.d.mts +2 -2
  174. package/dist/Tabs/Tab.mjs +18 -14
  175. package/dist/Tabs/TabContext.d.cts +1 -1
  176. package/dist/Tabs/TabContext.d.mts +1 -1
  177. package/dist/Tabs/TabList.cjs +1 -1
  178. package/dist/Tabs/TabList.d.cts +1 -1
  179. package/dist/Tabs/TabList.d.mts +1 -1
  180. package/dist/Tabs/TabList.mjs +1 -1
  181. package/dist/Tabs/TabPanel.d.cts +2 -2
  182. package/dist/Tabs/TabPanel.d.mts +2 -2
  183. package/dist/Tabs/TabScrollButton.d.cts +1 -1
  184. package/dist/Tabs/TabScrollButton.d.mts +1 -1
  185. package/dist/Tabs/Tabs.cjs +1 -1
  186. package/dist/Tabs/Tabs.d.cts +2 -2
  187. package/dist/Tabs/Tabs.d.mts +2 -2
  188. package/dist/Tabs/Tabs.mjs +1 -1
  189. package/dist/{Tabs-JvjuCU8m.mjs → Tabs-C_qe9d4p.mjs} +28 -21
  190. package/dist/{Tabs-BsbX0jFL.cjs → Tabs-DmiA1J--.cjs} +28 -21
  191. package/dist/Tabs.cjs +1 -1
  192. package/dist/Tabs.d.cts +3 -3
  193. package/dist/Tabs.d.mts +3 -3
  194. package/dist/Tabs.mjs +1 -1
  195. package/dist/{TabsContext-0ZtedNyH.d.mts → TabsContext-DeP8oJpC.d.cts} +1 -1
  196. package/dist/{TabsContext-MpMEEVuB.d.cts → TabsContext-VJcdZQOf.d.mts} +1 -1
  197. package/dist/TextInput.d.cts +1 -1
  198. package/dist/TextInput.d.mts +1 -1
  199. package/dist/ToggleButton/ToggleButton.d.cts +1 -1
  200. package/dist/ToggleButton/ToggleButton.d.mts +1 -1
  201. package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
  202. package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
  203. package/dist/Tooltip-CrPRvmj3.cjs +338 -0
  204. package/dist/Tooltip-CwbuEQzf.mjs +332 -0
  205. package/dist/Tooltip.cjs +2 -267
  206. package/dist/Tooltip.d.cts +42 -7
  207. package/dist/Tooltip.d.mts +42 -7
  208. package/dist/Tooltip.mjs +1 -266
  209. package/dist/TransferList.d.cts +1 -1
  210. package/dist/TransferList.d.mts +1 -1
  211. package/dist/Typography.d.cts +2 -2
  212. package/dist/Typography.d.mts +2 -2
  213. package/dist/View.d.cts +1 -1
  214. package/dist/View.d.mts +1 -1
  215. package/dist/Zoom.d.cts +1 -1
  216. package/dist/Zoom.d.mts +1 -1
  217. package/dist/catalog.cjs +12 -0
  218. package/dist/catalog.d.cts +1 -1
  219. package/dist/catalog.d.mts +1 -1
  220. package/dist/catalog.mjs +12 -0
  221. package/dist/computePopoverPosition-JgOwCM7k.d.cts +12 -0
  222. package/dist/computePopoverPosition-JgOwCM7k.d.mts +12 -0
  223. package/dist/engine.d.cts +1 -1
  224. package/dist/engine.d.mts +1 -1
  225. package/dist/{index-4maWM1H8.d.mts → index-2jMSUeji.d.cts} +1 -1
  226. package/dist/{index-76zijQoi.d.mts → index-3Xe5X6Ny.d.mts} +2 -2
  227. package/dist/{index-C7EUYyom.d.cts → index-B-p51b0z.d.cts} +2 -2
  228. package/dist/index-B2XL_zZY.d.mts +44 -0
  229. package/dist/{index-D4PcgL-c.d.cts → index-B5_-Bxoo.d.cts} +2 -2
  230. package/dist/{index-DBF5n3ey.d.cts → index-BFUn2EWp.d.mts} +3 -3
  231. package/dist/{index-Byk1_ms9.d.cts → index-BKM4d_F4.d.cts} +2 -2
  232. package/dist/index-BL5Kj3Ka.d.mts +1 -0
  233. package/dist/{index-SotXsXXb.d.mts → index-BLypGp0N.d.mts} +4 -4
  234. package/dist/{index-hoHPfsc1.d.cts → index-BVDN2XbT.d.mts} +3 -3
  235. package/dist/{index-CLTFsCYC.d.cts → index-Bhb0bFxe.d.mts} +2 -2
  236. package/dist/index-Biqpy7c9.d.cts +44 -0
  237. package/dist/{index-CKywwIep.d.mts → index-C-ebcNOc.d.mts} +1 -1
  238. package/dist/{index-Lsm4v8fB.d.cts → index-C6a3kDn2.d.cts} +3 -0
  239. package/dist/{index-RaDENVX_.d.cts → index-C9nnnfhd.d.cts} +2 -2
  240. package/dist/{index-BuAKhHMs.d.cts → index-CBHCGizS.d.mts} +1 -1
  241. package/dist/{index-BChRNCld.d.mts → index-CCEfrBNN.d.mts} +1 -1
  242. package/dist/{index-Dxu6Ks2A.d.cts → index-CHWMSBhQ.d.cts} +1 -1
  243. package/dist/index-CJMvoc8h.d.cts +1 -0
  244. package/dist/{index-C2a-5yop.d.mts → index-COgZvhXQ.d.mts} +1 -1
  245. package/dist/{index-BC9S8Fpr.d.cts → index-CP55_Zs2.d.mts} +1 -1
  246. package/dist/{index-Dm7vQHor.d.cts → index-CgyyM3ty.d.cts} +10 -5
  247. package/dist/{index-CfB7OceY.d.cts → index-CtwlReZi.d.cts} +1 -1
  248. package/dist/{index-CnVvfG9_.d.mts → index-D0skdQEK.d.mts} +1 -1
  249. package/dist/{index-Cjh607-v.d.cts → index-D2tfsNPw.d.cts} +1 -1
  250. package/dist/{index-B3Bdupj3.d.mts → index-D7h8qFS1.d.cts} +2 -2
  251. package/dist/{index-BV5BvdeN.d.mts → index-DACdQ7-d.d.cts} +1 -1
  252. package/dist/{index-CAt0-L4i.d.cts → index-DAJ5DVHh.d.cts} +2 -2
  253. package/dist/{index-CGyIuCRh.d.cts → index-DMysZsti.d.cts} +1 -1
  254. package/dist/{index-CR8qkP8U.d.mts → index-DOH6uskj.d.mts} +3 -0
  255. package/dist/{index-C2tTbEBS.d.mts → index-DQo4XtH4.d.mts} +2 -2
  256. package/dist/{index-CQeTS_zL.d.cts → index-DTJN6JL2.d.cts} +1 -1
  257. package/dist/{index-Dt274Ngt.d.mts → index-DbKYSbLs.d.mts} +2 -2
  258. package/dist/{index-CJYWGPVO.d.mts → index-Dg0FPoms.d.mts} +2 -2
  259. package/dist/{index-C_J58B_n.d.mts → index-DlNBgVwb.d.mts} +1 -1
  260. package/dist/{index-UiyZAKID.d.mts → index-DsBOpK8T.d.mts} +2 -2
  261. package/dist/{index-DbgrItbx.d.cts → index-Dvx5TRET.d.cts} +2 -2
  262. package/dist/{index-tOrd12AJ.d.mts → index-Sq75GwA2.d.cts} +3 -3
  263. package/dist/{index-BAzMLTVi.d.mts → index-ZyigJMkV.d.mts} +10 -5
  264. package/dist/{index-Bo45R0nD.d.cts → index-gHMydoIS.d.cts} +4 -4
  265. package/dist/{index-BzQze7eY.d.cts → index-gxBafJdz.d.cts} +1 -1
  266. package/dist/{index-D48qVo1X.d.mts → index-hTgl9zwe.d.mts} +2 -2
  267. package/dist/{index-CF_pl72E.d.mts → index-i8BxMDEC.d.mts} +1 -1
  268. package/dist/{index-BXlBouWV.d.mts → index-v1I6VA9w.d.cts} +3 -3
  269. package/dist/index.d.cts +1 -1
  270. package/dist/index.d.mts +1 -1
  271. package/dist/style.d.cts +2 -2
  272. package/dist/style.d.mts +2 -2
  273. package/dist/theme.d.cts +2 -2
  274. package/dist/theme.d.mts +2 -2
  275. package/dist/{useAnchoredPlacement-ee6KzG3t.cjs → useAnchoredPlacement-BSfjNMut.cjs} +10 -5
  276. package/dist/{useAnchoredPlacement-COrXZxhm.mjs → useAnchoredPlacement-txSaWzfk.mjs} +10 -5
  277. package/dist/{useTablePagination-BlD8mK8k.d.mts → useTablePagination-CUsagS5T.d.mts} +1 -1
  278. package/dist/{useTablePagination-CGjb_jPX.d.cts → useTablePagination-jpEfHKUh.d.cts} +1 -1
  279. package/dist/{useTransition-3EoagwIe.d.mts → useTransition-BJ375Sto.d.cts} +1 -1
  280. package/dist/{useTransition-C89K0mS7.d.cts → useTransition-DDGpvgci.d.mts} +1 -1
  281. package/package.json +1 -1
  282. package/dist/index-1Xzj0iAs.d.mts +0 -1
  283. package/dist/index-323PrYLR.d.cts +0 -1
@@ -1,5 +1,6 @@
1
- import { nt as Theme } from "./index-CR8qkP8U.mjs";
2
- import { ElementType, HTMLAttributes, ReactElement, ReactNode, SyntheticEvent } from "react";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
+ import { n as PopoverPosition } from "./computePopoverPosition-JgOwCM7k.mjs";
3
+ import { ElementType, HTMLAttributes, ReactElement, ReactNode, Ref, SyntheticEvent } from "react";
3
4
  /** A side of its child a tooltip sits on - and, after the dash, which end of that side it lines up with. */
4
5
  type FixedTooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
5
6
  /** A fixed placement, or `auto` - the side with the most room, chosen as it is placed. */
@@ -15,9 +16,25 @@ interface TooltipSlotProps {
15
16
  root?: SlotProps;
16
17
  arrow?: SlotProps;
17
18
  }
18
- interface TooltipProps {
19
- /** The one element the tooltip is about - it holds a `ref` and takes the handlers. */
20
- children: ReactElement;
19
+ /**
20
+ * What a parent that clones its child (a `Menu` with a `Tooltip` for a trigger) hands the tooltip
21
+ * instead: it is not the tooltip's, so it goes on to the child. The tooltip's own props are left out.
22
+ */
23
+ type TooltipForwardedProps = Omit<HTMLAttributes<HTMLElement>, 'title' | 'children' | 'className' | 'color'> & {
24
+ ref?: Ref<HTMLElement>;
25
+ };
26
+ interface TooltipProps extends TooltipForwardedProps {
27
+ /**
28
+ * The one element the tooltip is about - it holds a `ref` and takes the handlers. Without it, the
29
+ * tooltip is at `anchorPosition`, and open when `isOpen` says so.
30
+ */
31
+ children?: ReactElement;
32
+ /**
33
+ * A point in the window - client coordinates, as Popover's - to place the tooltip at instead of
34
+ * beside the child: a hint that depends on where the pointer is. It follows the point and the
35
+ * `title` as they change.
36
+ */
37
+ anchorPosition?: PopoverPosition;
21
38
  /** What the tooltip says. Nothing says no tooltip. */
22
39
  title?: ReactNode;
23
40
  /** The side of the child it sits on, and the end it lines up with; `auto` takes the side with the most room. Flips for want of room. Default: `'top'`. */
@@ -38,6 +55,12 @@ interface TooltipProps {
38
55
  leaveTouchDelay?: number;
39
56
  /** Describes the child (`aria-describedby`, while open) instead of naming it (`aria-label`). Default: `false`. */
40
57
  shouldDescribeChild?: boolean;
58
+ /**
59
+ * With `shouldDescribeChild`: the child is described the whole time, as by a native `title`, not
60
+ * only while the tooltip is open. A visually hidden copy of a `title` sits beside the child for it
61
+ * to point at. Default: `false`.
62
+ */
63
+ isDescriptionPersistent?: boolean;
41
64
  /** Whether it is shown. Controlled with `onOpen` and `onClose`. */
42
65
  isOpen?: boolean;
43
66
  /** Whether it is shown at first, when uncontrolled. Default: `false`. */
@@ -46,6 +69,18 @@ interface TooltipProps {
46
69
  onOpen?: (event: Event | SyntheticEvent) => void;
47
70
  /** Fired when it asks to close. */
48
71
  onClose?: (event: Event | SyntheticEvent) => void;
72
+ /**
73
+ * Whether a disabled child (`disabled`) is wrapped in an element of its own, which takes the pointer
74
+ * handlers and the placement, since a disabled control sends no pointer events. Left out for a child
75
+ * that is only marked disabled and still takes them - a menu row. Default: `true`.
76
+ */
77
+ shouldWrapDisabledChild?: boolean;
78
+ /**
79
+ * Whether the pointer can be moved onto the tooltip, which then stays open (WCAG 1.4.13). With
80
+ * `false` it takes no pointer events - a click goes to what is under it - and closes as the
81
+ * pointer leaves the child: for a text hint that holds nothing to use. Default: `true`.
82
+ */
83
+ isInteractive?: boolean;
49
84
  /** Opens on hover. Default: `true`. */
50
85
  shouldOpenOnHover?: boolean;
51
86
  /** Opens on keyboard focus. Default: `true`. */
@@ -70,5 +105,5 @@ interface TooltipProps {
70
105
  * `shouldDescribeChild`). It opens and closes after their delays, stays open while the pointer is
71
106
  * on the tooltip itself, closes on Escape, and never takes or traps the focus.
72
107
  */
73
- declare function Tooltip({ children, title, placement: placementProp, hasArrow: hasArrowProp, enterDelay: enterDelayProp, leaveDelay: leaveDelayProp, enterTouchDelay: enterTouchDelayProp, leaveTouchDelay: leaveTouchDelayProp, shouldDescribeChild: shouldDescribeChildProp, isOpen: isOpenProp, defaultOpen, onOpen, onClose, shouldOpenOnHover: shouldOpenOnHoverProp, shouldOpenOnFocus: shouldOpenOnFocusProp, shouldOpenOnTouch: shouldOpenOnTouchProp, slots, slotProps, layer: layerProp, borderRadius: borderRadiusProp, bg: bgProp, textColor: textColorProp, className, 'data-testid': dataTestid }: Readonly<TooltipProps>): import("react").JSX.Element;
74
- export { Tooltip, type TooltipPlacement, TooltipProps, TooltipSlotProps, TooltipSlots };
108
+ declare function Tooltip({ children, anchorPosition, title, placement: placementProp, hasArrow: hasArrowProp, enterDelay: enterDelayProp, leaveDelay: leaveDelayProp, enterTouchDelay: enterTouchDelayProp, leaveTouchDelay: leaveTouchDelayProp, shouldDescribeChild: shouldDescribeChildProp, isDescriptionPersistent: isDescriptionPersistentProp, isOpen: isOpenProp, defaultOpen, onOpen, onClose, isInteractive: isInteractiveProp, shouldWrapDisabledChild: shouldWrapDisabledChildProp, shouldOpenOnHover: shouldOpenOnHoverProp, shouldOpenOnFocus: shouldOpenOnFocusProp, shouldOpenOnTouch: shouldOpenOnTouchProp, slots, slotProps, layer: layerProp, borderRadius: borderRadiusProp, bg: bgProp, textColor: textColorProp, className, 'data-testid': dataTestid, ref: forwardedRef, ...forwarded }: Readonly<TooltipProps>): import("react").JSX.Element;
109
+ export { Tooltip, TooltipForwardedProps, type TooltipPlacement, TooltipProps, TooltipSlotProps, TooltipSlots };
package/dist/Tooltip.mjs CHANGED
@@ -1,266 +1 @@
1
- import { a as src_exports, o as styled, t as createShouldForwardProp } from "./src-B-rNjHIL.mjs";
2
- import { n as useDefaultProps } from "./theme-DyyZQFzQ.mjs";
3
- import { t as themeDefault } from "./themeDefault-BeZJzqJj.mjs";
4
- import { t as getSurfaceRadius } from "./getSurfaceRadius-B1QE_VLa.mjs";
5
- import { t as useControlled } from "./useControlled-B4uQ9Bj6.mjs";
6
- import { Portal } from "./Portal.mjs";
7
- import { t as useAnchoredPlacement } from "./useAnchoredPlacement-COrXZxhm.mjs";
8
- import { t as useMergedRefs } from "./useMergedRefs-CdfwtmUd.mjs";
9
- import { n as resolveTooltipPlacement, t as getTooltipOrigins } from "./getTooltipOrigins-D0bLLXwY.mjs";
10
- import { cloneElement, useCallback, useEffect, useId, useRef, useState } from "react";
11
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
- // src/Tooltip/hooks/useTooltip.ts
13
- const isKeyboardFocus = (event) => {
14
- try {
15
- return event.target.matches(":focus-visible");
16
- } catch {
17
- return true;
18
- }
19
- };
20
- /**
21
- * The state of a tooltip: whether it is open (its own, or its owner's), the timers that open and
22
- * close it, and the handlers its child and the tooltip itself take. Opening and closing are
23
- * delayed; moving from the child onto the tooltip does not close it, so its text can be read and
24
- * selected (WCAG 1.4.13); Escape closes it at once.
25
- */
26
- function useTooltip({ isOpen: isOpenProp, defaultOpen, onOpen, onClose, enterDelay, leaveDelay, enterTouchDelay, leaveTouchDelay, shouldOpenOnHover, shouldOpenOnFocus, shouldOpenOnTouch }) {
27
- const [isOpen, setIsOpen] = useControlled({
28
- controlled: isOpenProp,
29
- default: defaultOpen
30
- });
31
- const timer = useRef(void 0);
32
- const latest = useRef({
33
- isOpen,
34
- isOpenProp,
35
- onOpen,
36
- onClose
37
- });
38
- useEffect(() => {
39
- latest.current = {
40
- isOpen,
41
- isOpenProp,
42
- onOpen,
43
- onClose
44
- };
45
- });
46
- const clear = useCallback(() => window.clearTimeout(timer.current), []);
47
- const ask = useCallback((next, event, delay) => {
48
- clear();
49
- timer.current = window.setTimeout(() => {
50
- const current = latest.current;
51
- if (current.isOpen === next) return;
52
- if (current.isOpenProp === void 0) setIsOpen(next);
53
- (next ? current.onOpen : current.onClose)?.(event);
54
- }, delay);
55
- }, [clear, setIsOpen]);
56
- useEffect(() => clear, [clear]);
57
- useEffect(() => {
58
- if (!isOpen) return void 0;
59
- const handleKeyDown = (event) => {
60
- if (event.key === "Escape") ask(false, event, 0);
61
- };
62
- document.addEventListener("keydown", handleKeyDown);
63
- return () => document.removeEventListener("keydown", handleKeyDown);
64
- }, [isOpen, ask]);
65
- return {
66
- isOpen,
67
- childHandlers: {
68
- onMouseEnter: (event) => {
69
- if (shouldOpenOnHover) ask(true, event, enterDelay);
70
- },
71
- onMouseLeave: (event) => {
72
- if (shouldOpenOnHover) ask(false, event, leaveDelay);
73
- },
74
- onFocus: (event) => {
75
- if (shouldOpenOnFocus && isKeyboardFocus(event)) ask(true, event, enterDelay);
76
- },
77
- onBlur: (event) => {
78
- if (shouldOpenOnFocus) ask(false, event, leaveDelay);
79
- },
80
- onTouchStart: (event) => {
81
- if (shouldOpenOnTouch) ask(true, event, enterTouchDelay);
82
- },
83
- onTouchEnd: (event) => {
84
- if (shouldOpenOnTouch) ask(false, event, leaveTouchDelay);
85
- },
86
- onTouchCancel: (event) => {
87
- if (shouldOpenOnTouch) ask(false, event, leaveTouchDelay);
88
- }
89
- },
90
- surfaceHandlers: {
91
- onMouseEnter: () => {
92
- if (shouldOpenOnHover) clear();
93
- },
94
- onMouseLeave: (event) => {
95
- if (shouldOpenOnHover) ask(false, event, leaveDelay);
96
- }
97
- }
98
- };
99
- }
100
- // src/Tooltip/Tooltip.tsx
101
- const MARGIN = 8;
102
- const GAP = 8;
103
- const ARROW = 8;
104
- const TooltipSurface = styled("div", {
105
- name: "Tooltip",
106
- label: "Tooltip",
107
- shouldForwardProp: createShouldForwardProp([
108
- "layer",
109
- "borderRadius",
110
- "bg",
111
- "textColor"
112
- ])
113
- })(({ theme, layer, borderRadius, bg, textColor }) => ({
114
- position: "fixed",
115
- top: 0,
116
- left: 0,
117
- visibility: "hidden",
118
- zIndex: theme.zOrder[layer],
119
- boxSizing: "border-box",
120
- maxWidth: "20rem",
121
- padding: `${theme.space[.5]} ${theme.space[1]}`,
122
- borderRadius: getSurfaceRadius(theme, borderRadius),
123
- boxShadow: theme.shadows[4],
124
- backgroundColor: (0, src_exports.get)(theme, `background.${bg ?? "modal"}`),
125
- color: (0, src_exports.get)(theme, `text.${textColor ?? themeDefault(theme, "textColor", "initial")}`),
126
- fontFamily: (0, src_exports.get)(theme, "fonts.body"),
127
- fontSize: theme.fontSizes[0],
128
- lineHeight: (0, src_exports.get)(theme, "lineHeights.base"),
129
- overflowWrap: "break-word"
130
- }));
131
- const TooltipArrow = styled("span", {
132
- name: "Tooltip",
133
- slot: "arrow",
134
- label: "TooltipArrow"
135
- })({
136
- position: "absolute",
137
- width: ARROW,
138
- height: ARROW,
139
- backgroundColor: "inherit",
140
- transform: "rotate(45deg)",
141
- pointerEvents: "none"
142
- });
143
- const getArrow = ({ anchorRect, surfaceSize, top, left }) => {
144
- const { width, height } = surfaceSize;
145
- if (top + height <= anchorRect.top + 1 || top >= anchorRect.bottom - 1) {
146
- const side = top + height <= anchorRect.top + 1 ? "top" : "bottom";
147
- const middle = anchorRect.left + anchorRect.width / 2 - left;
148
- return {
149
- side,
150
- offset: Math.min(Math.max(middle, ARROW), width - ARROW)
151
- };
152
- }
153
- const side = left + width <= anchorRect.left + 1 ? "left" : "right";
154
- const middle = anchorRect.top + anchorRect.height / 2 - top;
155
- return {
156
- side,
157
- offset: Math.min(Math.max(middle, ARROW), height - ARROW)
158
- };
159
- };
160
- const isSameArrow = (a, b) => a !== null && a.side === b.side && a.offset === b.offset;
161
- const getArrowStyle = ({ side, offset }) => {
162
- const half = ARROW / 2;
163
- if (side === "top") return {
164
- bottom: -4,
165
- left: offset - half
166
- };
167
- if (side === "bottom") return {
168
- top: -4,
169
- left: offset - half
170
- };
171
- if (side === "left") return {
172
- right: -4,
173
- top: offset - half
174
- };
175
- return {
176
- left: -4,
177
- top: offset - half
178
- };
179
- };
180
- /**
181
- * @description A short description of one child, shown on hover, keyboard focus and a long touch -
182
- * a `role="tooltip"` in a `Portal`, placed beside its child and flipped for want of room. The
183
- * child is named by it (`aria-label`) or described by it (`aria-describedby`, with
184
- * `shouldDescribeChild`). It opens and closes after their delays, stays open while the pointer is
185
- * on the tooltip itself, closes on Escape, and never takes or traps the focus.
186
- */
187
- function Tooltip({ children, title, placement: placementProp, hasArrow: hasArrowProp, enterDelay: enterDelayProp, leaveDelay: leaveDelayProp, enterTouchDelay: enterTouchDelayProp, leaveTouchDelay: leaveTouchDelayProp, shouldDescribeChild: shouldDescribeChildProp, isOpen: isOpenProp, defaultOpen = false, onOpen, onClose, shouldOpenOnHover: shouldOpenOnHoverProp, shouldOpenOnFocus: shouldOpenOnFocusProp, shouldOpenOnTouch: shouldOpenOnTouchProp, slots, slotProps, layer: layerProp, borderRadius: borderRadiusProp, bg: bgProp, textColor: textColorProp, className, "data-testid": dataTestid }) {
188
- const dp = useDefaultProps("Tooltip");
189
- const placement = placementProp ?? dp.placement ?? "top";
190
- const hasArrow = hasArrowProp ?? dp.hasArrow ?? false;
191
- const shouldDescribeChild = shouldDescribeChildProp ?? dp.shouldDescribeChild ?? false;
192
- const layer = layerProp ?? dp.layer ?? "tooltip";
193
- const borderRadius = borderRadiusProp ?? dp.borderRadius;
194
- const bg = bgProp ?? dp.bg;
195
- const textColor = textColorProp ?? dp.textColor;
196
- const id = useId();
197
- const { isOpen, childHandlers, surfaceHandlers } = useTooltip({
198
- isOpen: isOpenProp,
199
- defaultOpen,
200
- onOpen,
201
- onClose,
202
- enterDelay: enterDelayProp ?? dp.enterDelay ?? 100,
203
- leaveDelay: leaveDelayProp ?? dp.leaveDelay ?? 0,
204
- enterTouchDelay: enterTouchDelayProp ?? dp.enterTouchDelay ?? 700,
205
- leaveTouchDelay: leaveTouchDelayProp ?? dp.leaveTouchDelay ?? 1500,
206
- shouldOpenOnHover: shouldOpenOnHoverProp ?? dp.shouldOpenOnHover ?? true,
207
- shouldOpenOnFocus: shouldOpenOnFocusProp ?? dp.shouldOpenOnFocus ?? true,
208
- shouldOpenOnTouch: shouldOpenOnTouchProp ?? dp.shouldOpenOnTouch ?? true
209
- });
210
- const isShown = isOpen && title !== void 0 && title !== null && title !== "";
211
- const anchorRef = useRef(null);
212
- const surfaceRef = useRef(null);
213
- const own = children.props;
214
- const ref = useMergedRefs(anchorRef, own.ref);
215
- const [arrow, setArrow] = useState(null);
216
- const getOrigins = useCallback((context) => getTooltipOrigins(resolveTooltipPlacement(placement, context), context.isRtl), [placement]);
217
- const onPlaced = useCallback((placed) => {
218
- if (!hasArrow) return;
219
- const next = getArrow(placed);
220
- setArrow((current) => isSameArrow(current, next) ? current : next);
221
- }, [hasArrow]);
222
- useAnchoredPlacement({
223
- isOpen: isShown,
224
- anchorRef,
225
- surfaceRef,
226
- getOrigins,
227
- margin: MARGIN,
228
- gap: GAP,
229
- onPlaced
230
- });
231
- const handlers = Object.fromEntries(Object.entries(childHandlers).map(([name, handler]) => [name, (event) => {
232
- own[name]?.(event);
233
- handler(event);
234
- }]));
235
- const ownDescription = own["aria-describedby"];
236
- const names = typeof title === "string" && own["aria-label"] === void 0 && own["aria-labelledby"] === void 0 ? { "aria-label": title } : {};
237
- const ariaProps = shouldDescribeChild ? { "aria-describedby": isShown ? [ownDescription, id].filter(Boolean).join(" ") : ownDescription } : names;
238
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [cloneElement(children, {
239
- ...handlers,
240
- ...ariaProps,
241
- ref
242
- }), isShown && /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsxs(TooltipSurface, {
243
- ...slotProps?.root,
244
- as: slots?.root,
245
- ref: surfaceRef,
246
- id,
247
- role: "tooltip",
248
- layer,
249
- borderRadius,
250
- bg,
251
- textColor,
252
- className: [slotProps?.root?.className, className].filter(Boolean).join(" ") || void 0,
253
- "data-testid": dataTestid ?? slotProps?.root?.["data-testid"],
254
- ...surfaceHandlers,
255
- children: [title, hasArrow && arrow ? /* @__PURE__ */ jsx(TooltipArrow, {
256
- ...slotProps?.arrow,
257
- as: slots?.arrow,
258
- style: {
259
- ...slotProps?.arrow?.style,
260
- ...getArrowStyle(arrow)
261
- },
262
- "aria-hidden": "true"
263
- }) : null]
264
- }) })] });
265
- }
266
- export { Tooltip };
1
+ export { t as Tooltip } from "./Tooltip-CwbuEQzf.mjs";
@@ -1,4 +1,4 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
1
+ import { nt as Theme } from "./index-C6a3kDn2.cjs";
2
2
  import { SpaceProps } from "@soroush.tech/styled-system";
3
3
  type TransferListValue = string | number;
4
4
  interface TransferListItem {
@@ -1,4 +1,4 @@
1
- import { nt as Theme } from "./index-CR8qkP8U.mjs";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
2
  import { SpaceProps } from "@soroush.tech/styled-system";
3
3
  type TransferListValue = string | number;
4
4
  interface TransferListItem {
@@ -1,3 +1,3 @@
1
- import { jt as TypographyVariant } from "./index-Lsm4v8fB.cjs";
2
- import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-CGyIuCRh.cjs";
1
+ import { jt as TypographyVariant } from "./index-C6a3kDn2.cjs";
2
+ import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-DMysZsti.cjs";
3
3
  export { BackgroundToken, TextColorToken, Typography, TypographyAlign, TypographyProps, type TypographyVariant };
@@ -1,3 +1,3 @@
1
- import { jt as TypographyVariant } from "./index-CR8qkP8U.mjs";
2
- import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-C2a-5yop.mjs";
1
+ import { jt as TypographyVariant } from "./index-DOH6uskj.mjs";
2
+ import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-COgZvhXQ.mjs";
3
3
  export { BackgroundToken, TextColorToken, Typography, TypographyAlign, TypographyProps, type TypographyVariant };
package/dist/View.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-Lsm4v8fB.cjs";
1
+ import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-C6a3kDn2.cjs";
2
2
  export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewProps };
package/dist/View.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-CR8qkP8U.mjs";
1
+ import { _n as ViewBorderWidthToken, gn as ViewBorderRadiusToken, hn as ViewBorderColorToken, mn as ViewBackgroundToken, pn as View, vn as ViewColorToken, yn as ViewProps } from "./index-DOH6uskj.mjs";
2
2
  export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewProps };
package/dist/Zoom.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as TransitionProps } from "./useTransition-C89K0mS7.cjs";
1
+ import { n as TransitionProps } from "./useTransition-BJ375Sto.cjs";
2
2
  type ZoomProps = TransitionProps;
3
3
  /**
4
4
  * @description Zooms one child in from nothing and out to nothing. The child holds a `ref` and
package/dist/Zoom.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as TransitionProps } from "./useTransition-3EoagwIe.mjs";
1
+ import { n as TransitionProps } from "./useTransition-DDGpvgci.mjs";
2
2
  type ZoomProps = TransitionProps;
3
3
  /**
4
4
  * @description Zooms one child in from nothing and out to nothing. The child holds a `ref` and
package/dist/catalog.cjs CHANGED
@@ -618,6 +618,18 @@ const tooltipCatalog = defineCatalogEntry()({
618
618
  values: [true, false],
619
619
  default: false
620
620
  },
621
+ isInteractive: {
622
+ values: [true, false],
623
+ default: true
624
+ },
625
+ shouldWrapDisabledChild: {
626
+ values: [true, false],
627
+ default: true
628
+ },
629
+ isDescriptionPersistent: {
630
+ values: [true, false],
631
+ default: false
632
+ },
621
633
  shouldOpenOnHover: {
622
634
  values: [true, false],
623
635
  default: true
@@ -1,4 +1,4 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
1
+ import { nt as Theme } from "./index-C6a3kDn2.cjs";
2
2
  /** A value that survives `JSON.stringify` - all a catalog holds. */
3
3
  type JsonValue = string | number | boolean | null | JsonValue[] | {
4
4
  [key: string]: JsonValue;
@@ -1,4 +1,4 @@
1
- import { nt as Theme } from "./index-CR8qkP8U.mjs";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
2
  /** A value that survives `JSON.stringify` - all a catalog holds. */
3
3
  type JsonValue = string | number | boolean | null | JsonValue[] | {
4
4
  [key: string]: JsonValue;
package/dist/catalog.mjs CHANGED
@@ -617,6 +617,18 @@ const tooltipCatalog = defineCatalogEntry()({
617
617
  values: [true, false],
618
618
  default: false
619
619
  },
620
+ isInteractive: {
621
+ values: [true, false],
622
+ default: true
623
+ },
624
+ shouldWrapDisabledChild: {
625
+ values: [true, false],
626
+ default: true
627
+ },
628
+ isDescriptionPersistent: {
629
+ values: [true, false],
630
+ default: false
631
+ },
620
632
  shouldOpenOnHover: {
621
633
  values: [true, false],
622
634
  default: true
@@ -0,0 +1,12 @@
1
+ type PopoverVerticalOrigin = 'top' | 'center' | 'bottom' | number;
2
+ type PopoverHorizontalOrigin = 'left' | 'center' | 'right' | number;
3
+ interface PopoverOrigin {
4
+ vertical: PopoverVerticalOrigin;
5
+ horizontal: PopoverHorizontalOrigin;
6
+ }
7
+ type PopoverReference = 'anchorEl' | 'anchorPosition' | 'none';
8
+ interface PopoverPosition {
9
+ top: number;
10
+ left: number;
11
+ }
12
+ export { PopoverPosition as n, PopoverReference as r, PopoverOrigin as t };
@@ -0,0 +1,12 @@
1
+ type PopoverVerticalOrigin = 'top' | 'center' | 'bottom' | number;
2
+ type PopoverHorizontalOrigin = 'left' | 'center' | 'right' | number;
3
+ interface PopoverOrigin {
4
+ vertical: PopoverVerticalOrigin;
5
+ horizontal: PopoverHorizontalOrigin;
6
+ }
7
+ type PopoverReference = 'anchorEl' | 'anchorPosition' | 'none';
8
+ interface PopoverPosition {
9
+ top: number;
10
+ left: number;
11
+ }
12
+ export { PopoverPosition as n, PopoverReference as r, PopoverOrigin as t };
package/dist/engine.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
1
+ import { nt as Theme } from "./index-C6a3kDn2.cjs";
2
2
  import { ComponentType, RefAttributes } from "react";
3
3
  import { CacheProvider, Interpolation } from "@emotion/react";
4
4
  /** `Global`, retyped against this package's own `Theme` (see `styled.ts`'s `StyledTags`). */
package/dist/engine.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { nt as Theme } from "./index-CR8qkP8U.mjs";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
2
  import { CacheProvider, Interpolation } from "@emotion/react";
3
3
  import { ComponentType, RefAttributes } from "react";
4
4
  /** `Global`, retyped against this package's own `Theme` (see `styled.ts`'s `StyledTags`). */
@@ -1,4 +1,4 @@
1
- import { nt as Theme } from "./index-CR8qkP8U.mjs";
1
+ import { nt as Theme } from "./index-C6a3kDn2.cjs";
2
2
  import { KeyboardEvent, MouseEvent, ReactNode, Ref, RefCallback, SyntheticEvent } from "react";
3
3
  type ModalCloseReason = 'escapeKey' | 'backdropClick';
4
4
  type EventHandlers = Record<string, ((event: SyntheticEvent) => void) | undefined>;
@@ -1,5 +1,5 @@
1
- import { nt as Theme } from "./index-CR8qkP8U.mjs";
2
- import { n as IconProps, r as IconName } from "./index-D48qVo1X.mjs";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
+ import { n as IconProps, r as IconName } from "./index-hTgl9zwe.mjs";
3
3
  import { SpaceProps } from "@soroush.tech/styled-system";
4
4
  import { ButtonHTMLAttributes } from "react";
5
5
  type TableSortLabelDirection = 'asc' | 'desc';
@@ -1,5 +1,5 @@
1
- import { a as PaginationItemSize } from "./index-Dxu6Ks2A.cjs";
2
- import "./index-DBF5n3ey.cjs";
1
+ import { a as PaginationItemSize } from "./index-CHWMSBhQ.cjs";
2
+ import "./index-v1I6VA9w.cjs";
3
3
  import { HTMLAttributes } from "react";
4
4
  type TablePaginationActionType = 'first' | 'previous' | 'next' | 'last';
5
5
  interface TablePaginationActionsProps extends HTMLAttributes<HTMLDivElement> {
@@ -0,0 +1,44 @@
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
+ import { t as MenuItemValue } from "./MenuListContext-DURKFg_T.mjs";
3
+ import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
4
+ import { AriaAttributes, KeyboardEvent, ReactNode } from "react";
5
+ interface MenuListProps extends SpaceProps<Theme>, LayoutProps<Theme> {
6
+ /** `MenuItem` rows and `MenuDivider`s. */
7
+ children?: ReactNode;
8
+ /** Fired with a row's `value` when a row that has one is chosen. */
9
+ onSelect?: (value: MenuItemValue) => void;
10
+ /** Carry the arrow keys past the last row to the first, and back. Default: `true`. */
11
+ shouldWrap?: boolean;
12
+ /** Focus the selected row, or the first enabled one, on mount. Default: `false`. */
13
+ shouldAutoFocus?: boolean;
14
+ /** Accent color for every row - resolves to `theme.palette[color]`. A row's own value wins. */
15
+ color?: keyof Theme['palette'];
16
+ /** Base text color for every row - resolves against `theme.text`. A row's own value wins. */
17
+ textColor?: keyof Theme['text'];
18
+ /** Density token for every row - resolves against `theme.sizes`. A row's own value wins. */
19
+ size?: keyof Theme['sizes'];
20
+ /** Compact vertical padding for every row. */
21
+ dense?: boolean;
22
+ onKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
23
+ id?: string;
24
+ className?: string;
25
+ 'aria-label'?: string;
26
+ 'aria-labelledby'?: string;
27
+ 'data-testid'?: string;
28
+ }
29
+ /**
30
+ * What an app may put on the `role="menu"` list a `Menu` or a `ContextMenu` renders, through
31
+ * `slotProps.list`: its marks (`data-*`), class, `aria-*` and an `onKeyDown`, which runs before the
32
+ * list's own. The list's `role`, `id` and name are the menu's, and win.
33
+ */
34
+ type MenuListSlotProps = Pick<MenuListProps, 'className' | 'data-testid' | 'onKeyDown'> & Omit<AriaAttributes, 'aria-label' | 'aria-labelledby'> & {
35
+ [name: `data-${string}`]: string | number | boolean | undefined;
36
+ };
37
+ /**
38
+ * @description A `role="menu"` list that owns the keyboard: the arrow keys, Home and End
39
+ * move focus between its own rows, skipping disabled ones; typing jumps to a row by its
40
+ * label. Rows are found in the DOM by their nearest `role="menu"`, so a nested submenu's
41
+ * rows are never this list's. Renders in place - `Menu` floats one next to a trigger.
42
+ */
43
+ declare function MenuList({ children, onSelect, shouldWrap: shouldWrapProp, shouldAutoFocus, color, textColor, size, dense, onKeyDown, ...rest }: Readonly<MenuListProps>): import("react").JSX.Element;
44
+ export { MenuListProps as n, MenuListSlotProps as r, MenuList as t };
@@ -1,5 +1,5 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
2
- import { t as TableCellPadding } from "./TableContext-fIyMD_Bj.cjs";
1
+ import { nt as Theme } from "./index-C6a3kDn2.cjs";
2
+ import { t as TableCellPadding } from "./TableContext-VuMFtVNr.cjs";
3
3
  import { ElementType, ThHTMLAttributes } from "react";
4
4
  import { BorderProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
5
5
  /** The table section a cell lives in - drives `TableCell`'s th/td element resolution. */
@@ -1,7 +1,7 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
2
- import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-Dxu6Ks2A.cjs";
3
- import { HTMLAttributes } from "react";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
+ import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-C-ebcNOc.mjs";
4
3
  import { SpaceProps } from "@soroush.tech/styled-system";
4
+ import { HTMLAttributes } from "react";
5
5
  type PaginationColor = PaginationItemColor;
6
6
  type PaginationVariant = PaginationItemVariant;
7
7
  type PaginationShape = PaginationItemShape;
@@ -1,5 +1,5 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
2
- import { t as MenuItemValue } from "./MenuListContext-BwgQHUu9.cjs";
1
+ import { nt as Theme } from "./index-C6a3kDn2.cjs";
2
+ import { t as MenuItemValue } from "./MenuListContext-AnAxu0he.cjs";
3
3
  import { ElementType, KeyboardEvent, MouseEvent, ReactNode } from "react";
4
4
  type MenuItemColor = keyof Theme['palette'];
5
5
  type MenuItemSize = keyof Theme['sizes'];
@@ -0,0 +1 @@
1
+ import "./index-DOH6uskj.mjs";
@@ -1,7 +1,7 @@
1
- import { nt as Theme, tt as TabsVariants } from "./index-CR8qkP8U.mjs";
2
- import "./index-CF_pl72E.mjs";
3
- import { t as TabValue } from "./TabsContext-0ZtedNyH.mjs";
4
- import { n as TabScrollButtonProps } from "./index-C_J58B_n.mjs";
1
+ import { nt as Theme, tt as TabsVariants } from "./index-DOH6uskj.mjs";
2
+ import "./index-i8BxMDEC.mjs";
3
+ import { t as TabValue } from "./TabsContext-VJcdZQOf.mjs";
4
+ import { n as TabScrollButtonProps } from "./index-DlNBgVwb.mjs";
5
5
  import { SpaceProps } from "@soroush.tech/styled-system";
6
6
  import { ComponentType, ReactNode, Ref } from "react";
7
7
  type TabsVariant = keyof TabsVariants;
@@ -1,7 +1,7 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
2
- import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-BzQze7eY.cjs";
3
- import { ElementType, HTMLAttributes } from "react";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
+ import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-CCEfrBNN.mjs";
4
3
  import { SpaceProps } from "@soroush.tech/styled-system";
4
+ import { ElementType, HTMLAttributes } from "react";
5
5
  type ButtonGroupOrientation = 'horizontal' | 'vertical';
6
6
  type ButtonGroupRadius = keyof Theme['radii'];
7
7
  interface ButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, SpaceProps<Theme> {
@@ -1,5 +1,5 @@
1
- import { nt as Theme } from "./index-Lsm4v8fB.cjs";
2
- import { r as TransitionTimeout, t as TransitionCallbacks } from "./useTransition-C89K0mS7.cjs";
1
+ import { nt as Theme } from "./index-DOH6uskj.mjs";
2
+ import { r as TransitionTimeout, t as TransitionCallbacks } from "./useTransition-DDGpvgci.mjs";
3
3
  import { ReactNode } from "react";
4
4
  type CollapseOrientation = 'vertical' | 'horizontal';
5
5
  interface CollapseProps extends TransitionCallbacks {