@soroush.tech/design-system 2.0.0-rc.1 → 2.0.0-rc.2

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 (299) hide show
  1. package/README.md +17 -1
  2. package/dist/AppBar.d.cts +1 -3
  3. package/dist/AppBar.d.mts +1 -3
  4. package/dist/Avatar.cjs +1 -1
  5. package/dist/Avatar.d.cts +1 -3
  6. package/dist/Avatar.d.mts +1 -3
  7. package/dist/Avatar.mjs +1 -1
  8. package/dist/Backdrop.d.cts +1 -1
  9. package/dist/Backdrop.d.mts +1 -1
  10. package/dist/Breadcrumbs.cjs +132 -0
  11. package/dist/Breadcrumbs.d.cts +40 -0
  12. package/dist/Breadcrumbs.d.mts +40 -0
  13. package/dist/Breadcrumbs.mjs +131 -0
  14. package/dist/Button.cjs +1 -1
  15. package/dist/Button.d.cts +1 -1
  16. package/dist/Button.d.mts +1 -1
  17. package/dist/Button.mjs +1 -1
  18. package/dist/ButtonGroup.d.cts +1 -1
  19. package/dist/ButtonGroup.d.mts +1 -1
  20. package/dist/Card.cjs +3 -3
  21. package/dist/Card.d.cts +4 -3
  22. package/dist/Card.d.mts +4 -3
  23. package/dist/Card.mjs +3 -3
  24. package/dist/Checkbox.d.cts +1 -2
  25. package/dist/Checkbox.d.mts +1 -2
  26. package/dist/CircularProgress.d.cts +2 -3
  27. package/dist/CircularProgress.d.mts +2 -3
  28. package/dist/Drawer.d.cts +3 -2
  29. package/dist/Drawer.d.mts +3 -2
  30. package/dist/Flex.d.cts +1 -1
  31. package/dist/Flex.d.mts +1 -1
  32. package/dist/Form.d.cts +1 -1
  33. package/dist/Form.d.mts +1 -1
  34. package/dist/FormControl.cjs +1 -1
  35. package/dist/FormControl.d.cts +1 -2
  36. package/dist/FormControl.d.mts +1 -2
  37. package/dist/FormControl.mjs +1 -1
  38. package/dist/FormHelperText.d.cts +1 -1
  39. package/dist/FormHelperText.d.mts +1 -1
  40. package/dist/FormLabel.d.cts +1 -1
  41. package/dist/FormLabel.d.mts +1 -1
  42. package/dist/Grid.d.cts +1 -3
  43. package/dist/Grid.d.mts +1 -3
  44. package/dist/{Icon-CI6q2Eyi.cjs → Icon-Cvuhp9ek.cjs} +12 -2
  45. package/dist/{Icon-CH3asUJu.mjs → Icon-DlheCTJb.mjs} +12 -2
  46. package/dist/Icon.cjs +1 -1
  47. package/dist/Icon.d.cts +1 -1
  48. package/dist/Icon.d.mts +1 -1
  49. package/dist/Icon.mjs +1 -1
  50. package/dist/Image.d.cts +1 -2
  51. package/dist/Image.d.mts +1 -2
  52. package/dist/LinearProgress.d.cts +2 -3
  53. package/dist/LinearProgress.d.mts +2 -3
  54. package/dist/Link.cjs +1 -1
  55. package/dist/Link.d.cts +1 -1
  56. package/dist/Link.d.mts +1 -1
  57. package/dist/Link.mjs +1 -1
  58. package/dist/Menu/ContextMenu.cjs +146 -0
  59. package/dist/Menu/ContextMenu.d.cts +52 -0
  60. package/dist/Menu/ContextMenu.d.mts +52 -0
  61. package/dist/Menu/ContextMenu.mjs +145 -0
  62. package/dist/Menu/Menu.cjs +3 -0
  63. package/dist/Menu/Menu.d.cts +2 -0
  64. package/dist/Menu/Menu.d.mts +2 -0
  65. package/dist/Menu/Menu.mjs +2 -0
  66. package/dist/Menu/MenuDivider.cjs +29 -0
  67. package/dist/Menu/MenuDivider.d.cts +12 -0
  68. package/dist/Menu/MenuDivider.d.mts +12 -0
  69. package/dist/Menu/MenuDivider.mjs +28 -0
  70. package/dist/Menu/MenuItems.cjs +29 -0
  71. package/dist/Menu/MenuItems.d.cts +2 -0
  72. package/dist/Menu/MenuItems.d.mts +2 -0
  73. package/dist/Menu/MenuItems.mjs +28 -0
  74. package/dist/Menu/MenuList.cjs +3 -0
  75. package/dist/Menu/MenuList.d.cts +38 -0
  76. package/dist/Menu/MenuList.d.mts +38 -0
  77. package/dist/Menu/MenuList.mjs +2 -0
  78. package/dist/Menu-BkKPTOfh.cjs +172 -0
  79. package/dist/Menu-tECbAEFj.mjs +167 -0
  80. package/dist/Menu.cjs +13 -0
  81. package/dist/Menu.d.cts +7 -0
  82. package/dist/Menu.d.mts +7 -0
  83. package/dist/Menu.mjs +6 -0
  84. package/dist/MenuItem-BR7ingQx.mjs +654 -0
  85. package/dist/MenuItem-CfdN4axw.cjs +684 -0
  86. package/dist/MenuItem.cjs +2 -148
  87. package/dist/MenuItem.d.cts +2 -52
  88. package/dist/MenuItem.d.mts +2 -52
  89. package/dist/MenuItem.mjs +1 -147
  90. package/dist/MenuList-B7msJ1IG.mjs +187 -0
  91. package/dist/MenuList-D4imLXAa.cjs +223 -0
  92. package/dist/MenuListContext-Dml16k0X.d.mts +21 -0
  93. package/dist/MenuListContext-vujGcRk9.d.cts +21 -0
  94. package/dist/Modal.d.cts +1 -1
  95. package/dist/Modal.d.mts +1 -1
  96. package/dist/NativeSelect.cjs +2 -2
  97. package/dist/NativeSelect.d.cts +2 -3
  98. package/dist/NativeSelect.d.mts +2 -3
  99. package/dist/NativeSelect.mjs +2 -2
  100. package/dist/Pagination/PaginationItem.cjs +1 -1
  101. package/dist/Pagination/PaginationItem.d.cts +1 -1
  102. package/dist/Pagination/PaginationItem.d.mts +1 -1
  103. package/dist/Pagination/PaginationItem.mjs +1 -1
  104. package/dist/Pagination.d.cts +2 -2
  105. package/dist/Pagination.d.mts +2 -2
  106. package/dist/Paper.cjs +1 -1
  107. package/dist/Paper.d.cts +2 -1
  108. package/dist/Paper.d.mts +2 -1
  109. package/dist/Paper.mjs +1 -1
  110. package/dist/{Popover-TpwRSORC.cjs → Popover-CiZfgiKE.cjs} +5 -125
  111. package/dist/Popover-QjM5Z1CR.mjs +133 -0
  112. package/dist/Popover.cjs +1 -1
  113. package/dist/Popover.d.cts +6 -7
  114. package/dist/Popover.d.mts +6 -7
  115. package/dist/Popover.mjs +1 -1
  116. package/dist/Pressable.cjs +1 -1
  117. package/dist/Pressable.d.cts +1 -1
  118. package/dist/Pressable.d.mts +1 -1
  119. package/dist/Pressable.mjs +1 -1
  120. package/dist/Quote.d.cts +2 -3
  121. package/dist/Quote.d.mts +2 -3
  122. package/dist/Radio.d.cts +1 -2
  123. package/dist/Radio.d.mts +1 -2
  124. package/dist/Select.cjs +3 -3
  125. package/dist/Select.d.cts +2 -3
  126. package/dist/Select.d.mts +2 -3
  127. package/dist/Select.mjs +3 -3
  128. package/dist/Sidebar/Sidebar.d.cts +1 -1
  129. package/dist/Sidebar/Sidebar.d.mts +1 -1
  130. package/dist/Sidebar/SidebarItem.cjs +1 -1
  131. package/dist/Sidebar/SidebarItem.d.cts +3 -4
  132. package/dist/Sidebar/SidebarItem.d.mts +3 -4
  133. package/dist/Sidebar/SidebarItem.mjs +1 -1
  134. package/dist/Skeleton.d.cts +1 -2
  135. package/dist/Skeleton.d.mts +1 -2
  136. package/dist/Switch.cjs +1 -1
  137. package/dist/Switch.d.cts +1 -2
  138. package/dist/Switch.d.mts +1 -2
  139. package/dist/Switch.mjs +1 -1
  140. package/dist/Table/Table.d.cts +2 -3
  141. package/dist/Table/Table.d.mts +2 -3
  142. package/dist/Table/TableBody.d.cts +1 -2
  143. package/dist/Table/TableBody.d.mts +1 -2
  144. package/dist/Table/TableCell.d.cts +1 -1
  145. package/dist/Table/TableCell.d.mts +1 -1
  146. package/dist/Table/TableContainer.d.cts +1 -3
  147. package/dist/Table/TableContainer.d.mts +1 -3
  148. package/dist/Table/TableControl.d.cts +1 -1
  149. package/dist/Table/TableControl.d.mts +1 -1
  150. package/dist/Table/TableFooter.d.cts +1 -2
  151. package/dist/Table/TableFooter.d.mts +1 -2
  152. package/dist/Table/TableHead.d.cts +1 -2
  153. package/dist/Table/TableHead.d.mts +1 -2
  154. package/dist/Table/TablePagination.d.cts +2 -2
  155. package/dist/Table/TablePagination.d.mts +2 -2
  156. package/dist/Table/TablePaginationActions.cjs +1 -1
  157. package/dist/Table/TablePaginationActions.d.cts +1 -1
  158. package/dist/Table/TablePaginationActions.d.mts +1 -1
  159. package/dist/Table/TablePaginationActions.mjs +1 -1
  160. package/dist/Table/TableRow.d.cts +1 -2
  161. package/dist/Table/TableRow.d.mts +1 -2
  162. package/dist/Table/TableSortLabel.cjs +1 -1
  163. package/dist/Table/TableSortLabel.d.cts +1 -1
  164. package/dist/Table/TableSortLabel.d.mts +1 -1
  165. package/dist/Table/TableSortLabel.mjs +1 -1
  166. package/dist/Table/hooks.d.cts +1 -1
  167. package/dist/Table/hooks.d.mts +1 -1
  168. package/dist/Table.d.cts +5 -5
  169. package/dist/Table.d.mts +5 -5
  170. package/dist/{TableContext-BeCxbtHH.d.cts → TableContext-6PgGpUzM.d.mts} +1 -1
  171. package/dist/{TableContext-BiRiYkVZ.d.mts → TableContext-CBGk-Lh8.d.cts} +1 -1
  172. package/dist/Tabs/Tab.cjs +306 -0
  173. package/dist/Tabs/Tab.d.cts +62 -0
  174. package/dist/Tabs/Tab.d.mts +62 -0
  175. package/dist/Tabs/Tab.mjs +305 -0
  176. package/dist/Tabs/TabContext.cjs +34 -0
  177. package/dist/Tabs/TabContext.d.cts +20 -0
  178. package/dist/Tabs/TabContext.d.mts +20 -0
  179. package/dist/Tabs/TabContext.mjs +33 -0
  180. package/dist/Tabs/TabList.cjs +31 -0
  181. package/dist/Tabs/TabList.d.cts +11 -0
  182. package/dist/Tabs/TabList.d.mts +11 -0
  183. package/dist/Tabs/TabList.mjs +30 -0
  184. package/dist/Tabs/TabPanel.cjs +40 -0
  185. package/dist/Tabs/TabPanel.d.cts +27 -0
  186. package/dist/Tabs/TabPanel.d.mts +27 -0
  187. package/dist/Tabs/TabPanel.mjs +38 -0
  188. package/dist/Tabs/TabScrollButton.cjs +93 -0
  189. package/dist/Tabs/TabScrollButton.d.cts +2 -0
  190. package/dist/Tabs/TabScrollButton.d.mts +2 -0
  191. package/dist/Tabs/TabScrollButton.mjs +91 -0
  192. package/dist/Tabs/Tabs.cjs +3 -0
  193. package/dist/Tabs/Tabs.d.cts +3 -0
  194. package/dist/Tabs/Tabs.d.mts +3 -0
  195. package/dist/Tabs/Tabs.mjs +2 -0
  196. package/dist/Tabs-D_wkX-Jb.cjs +645 -0
  197. package/dist/Tabs-YfCUbkQV.mjs +633 -0
  198. package/dist/Tabs.cjs +13 -0
  199. package/dist/Tabs.d.cts +8 -0
  200. package/dist/Tabs.d.mts +8 -0
  201. package/dist/Tabs.mjs +7 -0
  202. package/dist/TabsContext-C2agsLBN.d.cts +6 -0
  203. package/dist/TabsContext-DqyxdmGW.d.mts +6 -0
  204. package/dist/TabsValueContext-D40zGCpE.cjs +19 -0
  205. package/dist/TabsValueContext-DvL3inf7.mjs +8 -0
  206. package/dist/TextInput.cjs +1 -1
  207. package/dist/TextInput.d.cts +1 -2
  208. package/dist/TextInput.d.mts +1 -2
  209. package/dist/TextInput.mjs +1 -1
  210. package/dist/ToggleButton/ToggleButton.cjs +1 -1
  211. package/dist/ToggleButton/ToggleButton.d.cts +1 -1
  212. package/dist/ToggleButton/ToggleButton.d.mts +1 -1
  213. package/dist/ToggleButton/ToggleButton.mjs +1 -1
  214. package/dist/ToggleButton/ToggleButtonGroup.cjs +1 -1
  215. package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
  216. package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
  217. package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
  218. package/dist/Typography.cjs +1 -1
  219. package/dist/Typography.d.cts +2 -2
  220. package/dist/Typography.d.mts +2 -2
  221. package/dist/Typography.mjs +1 -1
  222. package/dist/View.d.cts +1 -1
  223. package/dist/View.d.mts +1 -1
  224. package/dist/catalog.cjs +4110 -0
  225. package/dist/catalog.d.cts +90 -0
  226. package/dist/catalog.d.mts +90 -0
  227. package/dist/catalog.mjs +4109 -0
  228. package/dist/computePopoverPosition-BIprs_xo.mjs +123 -0
  229. package/dist/computePopoverPosition-DiyEOHnU.cjs +128 -0
  230. package/dist/dividerLine-BNljcGlv.cjs +66 -0
  231. package/dist/dividerLine-FahY-M6_.mjs +31 -0
  232. package/dist/engine.d.cts +1 -1
  233. package/dist/engine.d.mts +1 -1
  234. package/dist/index-B3LIhqHR.d.cts +98 -0
  235. package/dist/{index-DbEnSf2m.d.cts → index-B8DNxyEw.d.mts} +3 -4
  236. package/dist/{index-CxUsrlg1.d.cts → index-BCnKYNlZ.d.cts} +1 -2
  237. package/dist/{index-BUoVTCqX.d.mts → index-BFruxTHv.d.cts} +2 -3
  238. package/dist/{index-BSqet8aO.d.cts → index-BSA6SKao.d.mts} +2 -3
  239. package/dist/{index-CrN4MSUF.d.cts → index-BVPrG1L0.d.mts} +1 -1
  240. package/dist/{index-Celm-8iN.d.cts → index-BbgFYfX_.d.mts} +3 -4
  241. package/dist/{index-B78VkB0-.d.cts → index-Bhdn4KTy.d.cts} +2 -3
  242. package/dist/{index-Chg6pSrr.d.mts → index-BiVvxOvj.d.cts} +3 -4
  243. package/dist/index-BjPX49XA.d.mts +34 -0
  244. package/dist/{index-BB-dLv5V.d.mts → index-BjfPEP_5.d.cts} +3 -4
  245. package/dist/{index-Bid71KeF.d.cts → index-BlLH6rlE.d.cts} +2 -2
  246. package/dist/{index-Ctqajtac.d.cts → index-BqpS_Huq.d.mts} +12 -4
  247. package/dist/{index-BhibLnZ0.d.cts → index-Bxd9NOWb.d.mts} +2 -3
  248. package/dist/index-C3KrFPCj.d.mts +35 -0
  249. package/dist/{themes-RX2UX5gD.d.mts → index-CVNJEUwJ.d.mts} +217 -8
  250. package/dist/index-CWnbCxgw.d.cts +72 -0
  251. package/dist/index-Cj5Rhh_9.d.mts +72 -0
  252. package/dist/index-CoEqjFYn.d.mts +98 -0
  253. package/dist/{index-S-ClM6WM.d.mts → index-CrIxI8Na.d.mts} +2 -2
  254. package/dist/index-DBteSahY.d.cts +1 -0
  255. package/dist/index-DCmH5f9I.d.cts +72 -0
  256. package/dist/{index-VOsBSWEu.d.mts → index-DDJuUfL5.d.cts} +1 -1
  257. package/dist/{index-DdqdSOct.d.cts → index-DIC7HKpP.d.mts} +2 -3
  258. package/dist/{index-BfZuh9c2.d.mts → index-DJCpnTH3.d.mts} +2 -3
  259. package/dist/index-DQcnJ5H4.d.cts +35 -0
  260. package/dist/{index-DNwF3DUX.d.cts → index-DXhMkjQ6.d.cts} +2 -3
  261. package/dist/index-DckSub2J.d.mts +72 -0
  262. package/dist/{index-nc4Sxiy9.d.mts → index-DeDxYlSQ.d.mts} +2 -3
  263. package/dist/{themes-Kbk9h5cN.d.cts → index-DmJ7yWWi.d.cts} +214 -5
  264. package/dist/{index-Wnv6jCR3.d.mts → index-DqjXDutI.d.mts} +1 -2
  265. package/dist/{index-GpnmW6vu.d.mts → index-DrVYWt-X.d.mts} +1 -2
  266. package/dist/{index-Belxmt1X.d.cts → index-DuVNRXP4.d.cts} +1 -2
  267. package/dist/{index-smqjMLAZ.d.mts → index-IdMqR82e.d.cts} +2 -3
  268. package/dist/{index-DXvQ-JVZ.d.mts → index-XxydXX8l.d.cts} +2 -3
  269. package/dist/index-_G1osn09.d.mts +1 -0
  270. package/dist/index-gnh-Oe0n.d.cts +34 -0
  271. package/dist/{index-DO9J-Fla.d.mts → index-qlfNErNd.d.cts} +12 -4
  272. package/dist/index.d.cts +1 -2
  273. package/dist/index.d.mts +1 -2
  274. package/dist/style.cjs +1 -1
  275. package/dist/style.d.cts +2 -2
  276. package/dist/style.d.mts +2 -2
  277. package/dist/style.mjs +1 -1
  278. package/dist/surfaceSystem-BGQBoXv_.cjs +38 -0
  279. package/dist/surfaceSystem-D8TbmKy3.mjs +21 -0
  280. package/dist/theme-BxXuXRgQ.cjs +137 -0
  281. package/dist/theme-Z9_QludW.mjs +102 -0
  282. package/dist/theme.cjs +25 -24
  283. package/dist/theme.d.cts +3 -3
  284. package/dist/theme.d.mts +3 -3
  285. package/dist/theme.mjs +2 -1
  286. package/dist/{theme-CDVxig_g.mjs → themes-L-dE7_ck.mjs} +10 -110
  287. package/dist/{theme-BXlAP3xf.cjs → themes-gd6tcmqS.cjs} +0 -136
  288. package/dist/{useTablePagination-COTiNH_8.d.mts → useTablePagination-C5VKtqDp.d.cts} +1 -1
  289. package/dist/{useTablePagination-WFkaUZu8.d.cts → useTablePagination-C6LSlt3w.d.mts} +1 -1
  290. package/package.json +43 -2
  291. package/dist/Popover-DwnSLpp1.mjs +0 -253
  292. package/dist/index-B_dKjEDR.d.mts +0 -23
  293. package/dist/index-C1WqEDtQ.d.mts +0 -69
  294. package/dist/index-CA7HnbtH.d.cts +0 -21
  295. package/dist/index-CKZaErxJ.d.mts +0 -21
  296. package/dist/index-DBUwu65Z.d.cts +0 -69
  297. package/dist/index-DzQJSYIh.d.cts +0 -23
  298. package/dist/index-cuv3o-L7.d.mts +0 -34
  299. package/dist/index-nB94D7UM.d.cts +0 -34
@@ -0,0 +1,123 @@
1
+ //#region src/Popover/utils/getOffset.ts
2
+ /** Vertical offset within a rect for an anchor/transform origin keyword or explicit px. */
3
+ function getOffsetTop(rect, vertical) {
4
+ if (typeof vertical === "number") return vertical;
5
+ if (vertical === "center") return rect.height / 2;
6
+ if (vertical === "bottom") return rect.height;
7
+ return 0;
8
+ }
9
+ /** Horizontal offset within a rect for an anchor/transform origin keyword or explicit px. */
10
+ function getOffsetLeft(rect, horizontal) {
11
+ if (typeof horizontal === "number") return horizontal;
12
+ if (horizontal === "center") return rect.width / 2;
13
+ if (horizontal === "right") return rect.width;
14
+ return 0;
15
+ }
16
+ //#endregion
17
+ //#region src/Popover/utils/getTransformOriginValue.ts
18
+ /** Serializes a resolved transform origin (in px) to a CSS `transform-origin` value. */
19
+ function getTransformOriginValue(origin) {
20
+ return `${origin.horizontal}px ${origin.vertical}px`;
21
+ }
22
+ //#endregion
23
+ //#region src/Popover/utils/computePopoverPosition.ts
24
+ /** Mirrors a keyword origin to the opposite edge; numbers and `center` are unchanged. */
25
+ function flipVertical(origin) {
26
+ if (origin === "top") return "bottom";
27
+ if (origin === "bottom") return "top";
28
+ return origin;
29
+ }
30
+ function flipHorizontal(origin) {
31
+ if (origin === "left") return "right";
32
+ if (origin === "right") return "left";
33
+ return origin;
34
+ }
35
+ function resolveAxis({ anchorStart, anchorSize, anchorOrigin, transformOrigin, paperSize, viewportSize, margin, offset, flip }) {
36
+ const preferredTransform = offset(paperSize, transformOrigin);
37
+ const preferredPosition = anchorStart + offset(anchorSize, anchorOrigin) - preferredTransform;
38
+ let position = preferredPosition;
39
+ let transformOffset = preferredTransform;
40
+ if (margin != null) {
41
+ const fits = (candidate) => candidate >= margin && candidate + paperSize <= viewportSize - margin;
42
+ if (!fits(preferredPosition)) {
43
+ const flippedTransform = offset(paperSize, flip(transformOrigin));
44
+ const flippedPosition = anchorStart + offset(anchorSize, flip(anchorOrigin)) - flippedTransform;
45
+ if (fits(flippedPosition)) {
46
+ position = flippedPosition;
47
+ transformOffset = flippedTransform;
48
+ }
49
+ }
50
+ if (position < margin) {
51
+ const diff = position - margin;
52
+ position -= diff;
53
+ transformOffset += diff;
54
+ } else if (position + paperSize > viewportSize - margin) {
55
+ const diff = position + paperSize - (viewportSize - margin);
56
+ position -= diff;
57
+ transformOffset += diff;
58
+ }
59
+ }
60
+ return {
61
+ position,
62
+ transformOffset
63
+ };
64
+ }
65
+ /**
66
+ * Places the paper so its `transformOrigin` meets the anchor's `anchorOrigin`, flipping
67
+ * to the opposite side at a viewport edge and clamping as a fallback. Returns `null`
68
+ * coordinates for `anchorReference === 'none'`.
69
+ */
70
+ function computePopoverPosition(params) {
71
+ const { anchorReference, anchorRect, anchorPosition, paperRect, anchorOrigin, transformOrigin, viewport, marginThreshold } = params;
72
+ if (anchorReference === "none") return {
73
+ top: null,
74
+ left: null,
75
+ transformOrigin: getTransformOriginValue({
76
+ vertical: getOffsetTop(paperRect, transformOrigin.vertical),
77
+ horizontal: getOffsetLeft(paperRect, transformOrigin.horizontal)
78
+ })
79
+ };
80
+ const rect = anchorReference === "anchorPosition" ? {
81
+ top: anchorPosition?.top ?? 0,
82
+ left: anchorPosition?.left ?? 0,
83
+ width: 0,
84
+ height: 0
85
+ } : anchorRect ?? {
86
+ top: 0,
87
+ left: 0,
88
+ width: 0,
89
+ height: 0
90
+ };
91
+ const vertical = resolveAxis({
92
+ anchorStart: rect.top,
93
+ anchorSize: rect.height,
94
+ anchorOrigin: anchorOrigin.vertical,
95
+ transformOrigin: transformOrigin.vertical,
96
+ paperSize: paperRect.height,
97
+ viewportSize: viewport.height,
98
+ margin: marginThreshold,
99
+ offset: (size, origin) => getOffsetTop({ height: size }, origin),
100
+ flip: (origin) => flipVertical(origin)
101
+ });
102
+ const horizontal = resolveAxis({
103
+ anchorStart: rect.left,
104
+ anchorSize: rect.width,
105
+ anchorOrigin: anchorOrigin.horizontal,
106
+ transformOrigin: transformOrigin.horizontal,
107
+ paperSize: paperRect.width,
108
+ viewportSize: viewport.width,
109
+ margin: marginThreshold,
110
+ offset: (size, origin) => getOffsetLeft({ width: size }, origin),
111
+ flip: (origin) => flipHorizontal(origin)
112
+ });
113
+ return {
114
+ top: Math.floor(vertical.position),
115
+ left: Math.floor(horizontal.position),
116
+ transformOrigin: getTransformOriginValue({
117
+ vertical: vertical.transformOffset,
118
+ horizontal: horizontal.transformOffset
119
+ })
120
+ };
121
+ }
122
+ //#endregion
123
+ export { computePopoverPosition as t };
@@ -0,0 +1,128 @@
1
+ //#region src/Popover/utils/getOffset.ts
2
+ /** Vertical offset within a rect for an anchor/transform origin keyword or explicit px. */
3
+ function getOffsetTop(rect, vertical) {
4
+ if (typeof vertical === "number") return vertical;
5
+ if (vertical === "center") return rect.height / 2;
6
+ if (vertical === "bottom") return rect.height;
7
+ return 0;
8
+ }
9
+ /** Horizontal offset within a rect for an anchor/transform origin keyword or explicit px. */
10
+ function getOffsetLeft(rect, horizontal) {
11
+ if (typeof horizontal === "number") return horizontal;
12
+ if (horizontal === "center") return rect.width / 2;
13
+ if (horizontal === "right") return rect.width;
14
+ return 0;
15
+ }
16
+ //#endregion
17
+ //#region src/Popover/utils/getTransformOriginValue.ts
18
+ /** Serializes a resolved transform origin (in px) to a CSS `transform-origin` value. */
19
+ function getTransformOriginValue(origin) {
20
+ return `${origin.horizontal}px ${origin.vertical}px`;
21
+ }
22
+ //#endregion
23
+ //#region src/Popover/utils/computePopoverPosition.ts
24
+ /** Mirrors a keyword origin to the opposite edge; numbers and `center` are unchanged. */
25
+ function flipVertical(origin) {
26
+ if (origin === "top") return "bottom";
27
+ if (origin === "bottom") return "top";
28
+ return origin;
29
+ }
30
+ function flipHorizontal(origin) {
31
+ if (origin === "left") return "right";
32
+ if (origin === "right") return "left";
33
+ return origin;
34
+ }
35
+ function resolveAxis({ anchorStart, anchorSize, anchorOrigin, transformOrigin, paperSize, viewportSize, margin, offset, flip }) {
36
+ const preferredTransform = offset(paperSize, transformOrigin);
37
+ const preferredPosition = anchorStart + offset(anchorSize, anchorOrigin) - preferredTransform;
38
+ let position = preferredPosition;
39
+ let transformOffset = preferredTransform;
40
+ if (margin != null) {
41
+ const fits = (candidate) => candidate >= margin && candidate + paperSize <= viewportSize - margin;
42
+ if (!fits(preferredPosition)) {
43
+ const flippedTransform = offset(paperSize, flip(transformOrigin));
44
+ const flippedPosition = anchorStart + offset(anchorSize, flip(anchorOrigin)) - flippedTransform;
45
+ if (fits(flippedPosition)) {
46
+ position = flippedPosition;
47
+ transformOffset = flippedTransform;
48
+ }
49
+ }
50
+ if (position < margin) {
51
+ const diff = position - margin;
52
+ position -= diff;
53
+ transformOffset += diff;
54
+ } else if (position + paperSize > viewportSize - margin) {
55
+ const diff = position + paperSize - (viewportSize - margin);
56
+ position -= diff;
57
+ transformOffset += diff;
58
+ }
59
+ }
60
+ return {
61
+ position,
62
+ transformOffset
63
+ };
64
+ }
65
+ /**
66
+ * Places the paper so its `transformOrigin` meets the anchor's `anchorOrigin`, flipping
67
+ * to the opposite side at a viewport edge and clamping as a fallback. Returns `null`
68
+ * coordinates for `anchorReference === 'none'`.
69
+ */
70
+ function computePopoverPosition(params) {
71
+ const { anchorReference, anchorRect, anchorPosition, paperRect, anchorOrigin, transformOrigin, viewport, marginThreshold } = params;
72
+ if (anchorReference === "none") return {
73
+ top: null,
74
+ left: null,
75
+ transformOrigin: getTransformOriginValue({
76
+ vertical: getOffsetTop(paperRect, transformOrigin.vertical),
77
+ horizontal: getOffsetLeft(paperRect, transformOrigin.horizontal)
78
+ })
79
+ };
80
+ const rect = anchorReference === "anchorPosition" ? {
81
+ top: anchorPosition?.top ?? 0,
82
+ left: anchorPosition?.left ?? 0,
83
+ width: 0,
84
+ height: 0
85
+ } : anchorRect ?? {
86
+ top: 0,
87
+ left: 0,
88
+ width: 0,
89
+ height: 0
90
+ };
91
+ const vertical = resolveAxis({
92
+ anchorStart: rect.top,
93
+ anchorSize: rect.height,
94
+ anchorOrigin: anchorOrigin.vertical,
95
+ transformOrigin: transformOrigin.vertical,
96
+ paperSize: paperRect.height,
97
+ viewportSize: viewport.height,
98
+ margin: marginThreshold,
99
+ offset: (size, origin) => getOffsetTop({ height: size }, origin),
100
+ flip: (origin) => flipVertical(origin)
101
+ });
102
+ const horizontal = resolveAxis({
103
+ anchorStart: rect.left,
104
+ anchorSize: rect.width,
105
+ anchorOrigin: anchorOrigin.horizontal,
106
+ transformOrigin: transformOrigin.horizontal,
107
+ paperSize: paperRect.width,
108
+ viewportSize: viewport.width,
109
+ margin: marginThreshold,
110
+ offset: (size, origin) => getOffsetLeft({ width: size }, origin),
111
+ flip: (origin) => flipHorizontal(origin)
112
+ });
113
+ return {
114
+ top: Math.floor(vertical.position),
115
+ left: Math.floor(horizontal.position),
116
+ transformOrigin: getTransformOriginValue({
117
+ vertical: vertical.transformOffset,
118
+ horizontal: horizontal.transformOffset
119
+ })
120
+ };
121
+ }
122
+ //#endregion
123
+ Object.defineProperty(exports, "computePopoverPosition", {
124
+ enumerable: true,
125
+ get: function() {
126
+ return computePopoverPosition;
127
+ }
128
+ });
@@ -0,0 +1,66 @@
1
+ const require_src = require("./src-DU81aGy9.cjs");
2
+ let react = require("react");
3
+ //#region src/Tabs/TabsContext.ts
4
+ const TabsContext = (0, react.createContext)(null);
5
+ /** Each tab's position among its siblings - its value when it has none of its own. */
6
+ const TabIndexContext = (0, react.createContext)(0);
7
+ function useTabsContext() {
8
+ const tabs = (0, react.useContext)(TabsContext);
9
+ if (!tabs) throw new Error("A Tab must be inside Tabs.");
10
+ return tabs;
11
+ }
12
+ //#endregion
13
+ //#region src/Tabs/utils/dividerLine.ts
14
+ /**
15
+ * The divider - the line along a row of tabs' foot, a column's end side - as an inset shadow,
16
+ * so it adds no size and runs unbroken across the pieces that each draw a stretch of it.
17
+ */
18
+ const getDividerShadow = (theme, isVertical, color) => {
19
+ const thin = theme.borderWidths.thin;
20
+ return `inset ${isVertical ? `-${thin} 0` : `0 -${thin}`} 0 ${color}`;
21
+ };
22
+ /** The divider's color: the accent in the enclosed look, which outlines the tab in it too. */
23
+ const getDividerColor = (theme, variant, color) => variant === "enclosed" ? (0, require_src.src_exports.get)(theme, `palette.${color}.main`) : (0, require_src.src_exports.get)(theme, "border.light");
24
+ /**
25
+ * The stretch of the divider an enclosed row's piece draws - its content, a scroll button, an
26
+ * end of the list. The enclosed look draws the line piece by piece, so the selected tab can
27
+ * leave its own piece out.
28
+ */
29
+ const getEnclosedPieceStyle = (theme, { variant, color, orientation, hasDivider }) => hasDivider && variant === "enclosed" ? { boxShadow: getDividerShadow(theme, orientation === "vertical", getDividerColor(theme, variant, color)) } : {};
30
+ //#endregion
31
+ Object.defineProperty(exports, "TabIndexContext", {
32
+ enumerable: true,
33
+ get: function() {
34
+ return TabIndexContext;
35
+ }
36
+ });
37
+ Object.defineProperty(exports, "TabsContext", {
38
+ enumerable: true,
39
+ get: function() {
40
+ return TabsContext;
41
+ }
42
+ });
43
+ Object.defineProperty(exports, "getDividerColor", {
44
+ enumerable: true,
45
+ get: function() {
46
+ return getDividerColor;
47
+ }
48
+ });
49
+ Object.defineProperty(exports, "getDividerShadow", {
50
+ enumerable: true,
51
+ get: function() {
52
+ return getDividerShadow;
53
+ }
54
+ });
55
+ Object.defineProperty(exports, "getEnclosedPieceStyle", {
56
+ enumerable: true,
57
+ get: function() {
58
+ return getEnclosedPieceStyle;
59
+ }
60
+ });
61
+ Object.defineProperty(exports, "useTabsContext", {
62
+ enumerable: true,
63
+ get: function() {
64
+ return useTabsContext;
65
+ }
66
+ });
@@ -0,0 +1,31 @@
1
+ import { a as src_exports } from "./src-DLGYOJMh.mjs";
2
+ import { createContext, useContext } from "react";
3
+ //#region src/Tabs/TabsContext.ts
4
+ const TabsContext = createContext(null);
5
+ /** Each tab's position among its siblings - its value when it has none of its own. */
6
+ const TabIndexContext = createContext(0);
7
+ function useTabsContext() {
8
+ const tabs = useContext(TabsContext);
9
+ if (!tabs) throw new Error("A Tab must be inside Tabs.");
10
+ return tabs;
11
+ }
12
+ //#endregion
13
+ //#region src/Tabs/utils/dividerLine.ts
14
+ /**
15
+ * The divider - the line along a row of tabs' foot, a column's end side - as an inset shadow,
16
+ * so it adds no size and runs unbroken across the pieces that each draw a stretch of it.
17
+ */
18
+ const getDividerShadow = (theme, isVertical, color) => {
19
+ const thin = theme.borderWidths.thin;
20
+ return `inset ${isVertical ? `-${thin} 0` : `0 -${thin}`} 0 ${color}`;
21
+ };
22
+ /** The divider's color: the accent in the enclosed look, which outlines the tab in it too. */
23
+ const getDividerColor = (theme, variant, color) => variant === "enclosed" ? (0, src_exports.get)(theme, `palette.${color}.main`) : (0, src_exports.get)(theme, "border.light");
24
+ /**
25
+ * The stretch of the divider an enclosed row's piece draws - its content, a scroll button, an
26
+ * end of the list. The enclosed look draws the line piece by piece, so the selected tab can
27
+ * leave its own piece out.
28
+ */
29
+ const getEnclosedPieceStyle = (theme, { variant, color, orientation, hasDivider }) => hasDivider && variant === "enclosed" ? { boxShadow: getDividerShadow(theme, orientation === "vertical", getDividerColor(theme, variant, color)) } : {};
30
+ //#endregion
31
+ export { TabsContext as a, TabIndexContext as i, getDividerShadow as n, useTabsContext as o, getEnclosedPieceStyle as r, getDividerColor as t };
package/dist/engine.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as Theme } from "./themes-Kbk9h5cN.cjs";
1
+ import { V as Theme } from "./index-DmJ7yWWi.cjs";
2
2
  import { CacheProvider, Interpolation } from "@emotion/react";
3
3
  import { ComponentType, RefAttributes } from "react";
4
4
  //#region src/theme/emotion.d.ts
package/dist/engine.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as Theme } from "./themes-RX2UX5gD.mjs";
1
+ import { V as Theme } from "./index-CVNJEUwJ.mjs";
2
2
  import { CacheProvider, Interpolation } from "@emotion/react";
3
3
  import { ComponentType, RefAttributes } from "react";
4
4
  //#region src/theme/emotion.d.ts
@@ -0,0 +1,98 @@
1
+ import { B as TabsVariants, V as Theme } from "./index-DmJ7yWWi.cjs";
2
+ import "./index-DDJuUfL5.cjs";
3
+ import { t as TabValue } from "./TabsContext-C2agsLBN.cjs";
4
+ import { n as TabScrollButtonProps } from "./index-gnh-Oe0n.cjs";
5
+ import { ComponentType, ReactNode, Ref } from "react";
6
+ import { SpaceProps } from "@soroush.tech/styled-system";
7
+ //#region src/Tabs/Tabs/Tabs.d.ts
8
+ type TabsVariant = keyof TabsVariants;
9
+ type TabsOrientation = 'horizontal' | 'vertical';
10
+ /** What the row does when its tabs don't fit: scroll, list the rest in a menu, or nothing. */
11
+ type TabsOverflowBehavior = 'scroll' | 'menu' | 'none';
12
+ /** When a scrolling row shows its scroll buttons. */
13
+ type TabsScrollButtons = 'auto' | 'always' | 'never';
14
+ /** What `action` exposes. */
15
+ interface TabsActions {
16
+ /** Re-measures the selected tab for the indicator - after a font loads or a label changes. */
17
+ updateIndicator: () => void;
18
+ /** Re-reads whether the tabs overflow - for the scroll buttons, or which tabs go to the menu. */
19
+ updateOverflow: () => void;
20
+ }
21
+ interface TabsProps extends SpaceProps<Theme> {
22
+ /** `Tab`s. */
23
+ children?: ReactNode;
24
+ /** The selected tab's value - `null` for none. Controlled with `onChange`. */
25
+ value?: TabValue | null;
26
+ /** The selected tab's value at first, when uncontrolled. */
27
+ defaultValue?: TabValue | null;
28
+ /** Fired with a tab's value when it is chosen. */
29
+ onChange?: (value: TabValue) => void;
30
+ /** Fired with a closable tab's value when its close button, a middle click or Delete closes it. Removing the tab, and picking the next selection, are the app's. */
31
+ onTabClose?: (value: TabValue) => void;
32
+ /** `'nav'` makes it a navigation of links or buttons (`aria-current="page"`) rather than a `tablist`. Default: `'div'`. */
33
+ as?: 'div' | 'nav';
34
+ /** Default: `'horizontal'`. */
35
+ orientation?: TabsOrientation;
36
+ /** The look: an indicator under the selected tab, or the selected tab boxed. Default: `'underline'`, overridable via `theme.components.Tabs.defaultProps`. */
37
+ variant?: TabsVariant;
38
+ /** The indicator's or outline's color - resolves to `theme.palette[color]`. Default: `'primary'`. */
39
+ color?: keyof Theme['palette'];
40
+ /** The labels' color - resolves against `theme.text`. Default: `'primary'`. */
41
+ textColor?: keyof Theme['text'];
42
+ /** Density token - resolves against `theme.sizes`. Default: `'md'`. */
43
+ size?: keyof Theme['sizes'];
44
+ /** The tabs share the row's width equally. Default: `false`. */
45
+ fullWidth?: boolean;
46
+ /** The tabs sit in the middle of the row. Default: `false`. */
47
+ isCentered?: boolean;
48
+ /** Moving focus with the arrow keys selects as it goes. Default: `false` - Enter or Space selects. */
49
+ shouldSelectOnFocus?: boolean;
50
+ /** What the row does when its tabs don't fit: `'scroll'` - it scrolls, with scroll buttons; `'menu'` - it shows the tabs that fit whole and lists the rest in a menu. Default: `'none'`. */
51
+ overflowBehavior?: TabsOverflowBehavior;
52
+ /** With `overflowBehavior="menu"`: names the button that opens the menu of the tabs that don't fit ("More tabs"). */
53
+ overflowLabel?: string;
54
+ /** With `overflowBehavior="scroll"`: `'auto'` shows them while the tabs overflow, each only while tabs are out of view its way; `'always'` keeps both, disabled at an end; `'never'` hides them. Default: `'auto'`. */
55
+ scrollButtons?: TabsScrollButtons;
56
+ /** Show the scroll buttons on narrow screens too, where swiping does the job. Default: `false`. */
57
+ shouldShowScrollButtonsOnMobile?: boolean;
58
+ /** Show the list's scrollbar. Default: `false`. */
59
+ hasVisibleScrollbar?: boolean;
60
+ /**
61
+ * A line along the row's foot (a column's end side), under its own content too. In the
62
+ * enclosed look it runs round the selected tab. Default: `true`, but `false` in the boxed look.
63
+ */
64
+ hasDivider?: boolean;
65
+ /** The tab strip's ground - resolves against `theme.background`. */
66
+ bg?: keyof Theme['background'];
67
+ /**
68
+ * The selected tab's ground - resolves against `theme.background`. Give its `TabPanel` the same
69
+ * `bg` and the two read as one. Default: `'paper'` in the boxed look, and in the enclosed look
70
+ * without a divider; none otherwise.
71
+ */
72
+ selectedBg?: keyof Theme['background'];
73
+ /** Components in place of its own: `scrollButton` - a button that takes `TabScrollButton`'s props. */
74
+ slots?: {
75
+ scrollButton?: ComponentType<TabScrollButtonProps>;
76
+ };
77
+ /** Before the tabs - an icon, a button, any component. The arrow keys don't reach it. */
78
+ startContent?: ReactNode;
79
+ /** After the tabs - a toolbar, a "+" button, any component. The arrow keys don't reach it. */
80
+ endContent?: ReactNode;
81
+ /** Imperative handle - see `TabsActions`. */
82
+ action?: Ref<TabsActions>;
83
+ 'aria-label'?: string;
84
+ 'aria-labelledby'?: string;
85
+ id?: string;
86
+ className?: string;
87
+ 'data-testid'?: string;
88
+ }
89
+ /**
90
+ * @description A row of tabs. By default a `tablist`: one tab in the page's tab order, the
91
+ * arrow keys of its orientation moving between tabs, Enter or Space selecting (or moving
92
+ * focus selecting, with `shouldSelectOnFocus`). With `as="nav"`, the same look as a
93
+ * navigation, its current tab marked `aria-current="page"`. Content of the row's own sits
94
+ * before and after the tabs.
95
+ */
96
+ declare function Tabs({ children, value: valueProp, defaultValue, onChange, onTabClose, as, orientation, variant: variantProp, color: colorProp, textColor, size: sizeProp, fullWidth, isCentered, shouldSelectOnFocus, overflowBehavior, overflowLabel, scrollButtons, shouldShowScrollButtonsOnMobile, hasVisibleScrollbar, hasDivider: hasDividerProp, bg, selectedBg: selectedBgProp, slots, startContent, endContent, action, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, id, className, 'data-testid': dataTestid, ...spaceProps }: Readonly<TabsProps>): import("react").JSX.Element;
97
+ //#endregion
98
+ export { TabsProps as a, TabsOverflowBehavior as i, TabsActions as n, TabsScrollButtons as o, TabsOrientation as r, TabsVariant as s, Tabs as t };
@@ -1,8 +1,7 @@
1
- import { T as Theme } from "./themes-Kbk9h5cN.cjs";
2
- import "./index-DBUwu65Z.cjs";
3
- import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-BhibLnZ0.cjs";
4
- import { ElementType, HTMLAttributes } from "react";
1
+ import { V as Theme } from "./index-CVNJEUwJ.mjs";
2
+ import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-Bxd9NOWb.mjs";
5
3
  import { SpaceProps } from "@soroush.tech/styled-system";
4
+ import { ElementType, HTMLAttributes } from "react";
6
5
  //#region src/ButtonGroup/ButtonGroup.d.ts
7
6
  type ButtonGroupOrientation = 'horizontal' | 'vertical';
8
7
  type ButtonGroupRadius = keyof Theme['radii'];
@@ -1,5 +1,4 @@
1
- import { T as Theme, x as PaletteColor } from "./themes-Kbk9h5cN.cjs";
2
- import "./index-DBUwu65Z.cjs";
1
+ import { M as PaletteColor, V as Theme } from "./index-DmJ7yWWi.cjs";
3
2
  import { ButtonHTMLAttributes, ElementType } from "react";
4
3
  import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
5
4
  //#region src/Pressable/Pressable.d.ts
@@ -1,7 +1,6 @@
1
- import { T as Theme, x as PaletteColor } from "./themes-RX2UX5gD.mjs";
2
- import "./index-C1WqEDtQ.mjs";
3
- import { SpaceProps } from "@soroush.tech/styled-system";
1
+ import { M as PaletteColor, V as Theme } from "./index-DmJ7yWWi.cjs";
4
2
  import { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
3
+ import { SpaceProps } from "@soroush.tech/styled-system";
5
4
  //#region src/Pagination/hooks/usePagination.d.ts
6
5
  type PaginationItemType = 'page' | 'first' | 'previous' | 'next' | 'last' | 'start-ellipsis' | 'end-ellipsis';
7
6
  /** One renderable pagination item - `Pagination` maps these onto `PaginationItem`s. */
@@ -1,7 +1,6 @@
1
- import { T as Theme, Y as TypographyVariant } from "./themes-Kbk9h5cN.cjs";
2
- import "./index-DBUwu65Z.cjs";
3
- import { CSSProperties, ElementType, HTMLAttributes } from "react";
1
+ import { V as Theme, dt as TypographyVariant } from "./index-CVNJEUwJ.mjs";
4
2
  import { BorderProps, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
3
+ import { CSSProperties, ElementType, HTMLAttributes } from "react";
5
4
  //#region src/Typography/Typography.d.ts
6
5
  type TypographyAlign = 'left' | 'right' | 'center' | 'justify' | 'inherit';
7
6
  /** Valid values for the color prop - derived from theme.text keys. */
@@ -1,4 +1,4 @@
1
- import { I as ThemeLayout, M as ThemeDefaults, T as Theme, j as ThemeComponents } from "./themes-Kbk9h5cN.cjs";
1
+ import { J as ThemeDefaults, Q as ThemeLayout, V as Theme, q as ThemeComponents } from "./index-CVNJEUwJ.mjs";
2
2
  import { ComponentType, ReactNode } from "react";
3
3
  //#region src/theme/ThemeProvider.d.ts
4
4
  interface ThemeProviderProps {
@@ -1,8 +1,7 @@
1
- import { T as Theme } from "./themes-Kbk9h5cN.cjs";
2
- import "./index-DBUwu65Z.cjs";
3
- import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-DdqdSOct.cjs";
4
- import { HTMLAttributes } from "react";
1
+ import { V as Theme } from "./index-CVNJEUwJ.mjs";
2
+ import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-DIC7HKpP.mjs";
5
3
  import { SpaceProps } from "@soroush.tech/styled-system";
4
+ import { HTMLAttributes } from "react";
6
5
  //#region src/Pagination/Pagination.d.ts
7
6
  type PaginationColor = PaginationItemColor;
8
7
  type PaginationVariant = PaginationItemVariant;
@@ -1,6 +1,5 @@
1
- import { T as Theme } from "./themes-Kbk9h5cN.cjs";
2
- import "./index-DBUwu65Z.cjs";
3
- import { t as TableCellPadding } from "./TableContext-BeCxbtHH.cjs";
1
+ import { V as Theme } from "./index-DmJ7yWWi.cjs";
2
+ import { t as TableCellPadding } from "./TableContext-CBGk-Lh8.cjs";
4
3
  import { ElementType, ThHTMLAttributes } from "react";
5
4
  import { BorderProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
6
5
  //#region src/Table/TableSectionContext.d.ts
@@ -1,8 +1,7 @@
1
- import { T as Theme } from "./themes-RX2UX5gD.mjs";
2
- import "./index-C1WqEDtQ.mjs";
3
- import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-BUoVTCqX.mjs";
4
- import { SpaceProps } from "@soroush.tech/styled-system";
1
+ import { V as Theme } from "./index-DmJ7yWWi.cjs";
2
+ import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-BFruxTHv.cjs";
5
3
  import { HTMLAttributes } from "react";
4
+ import { SpaceProps } from "@soroush.tech/styled-system";
6
5
  //#region src/Pagination/Pagination.d.ts
7
6
  type PaginationColor = PaginationItemColor;
8
7
  type PaginationVariant = PaginationItemVariant;
@@ -0,0 +1,34 @@
1
+ import { V as Theme } from "./index-CVNJEUwJ.mjs";
2
+ import { MouseEvent, ReactNode } from "react";
3
+ //#region src/Tabs/TabScrollButton/TabScrollButton.d.ts
4
+ /** Which way a scroll button scrolls a row of tabs: towards its start, or its end. */
5
+ type TabScrollDirection = 'start' | 'end';
6
+ interface TabScrollButtonProps {
7
+ /** Which way it scrolls the row: towards its start, or its end. */
8
+ direction: TabScrollDirection;
9
+ /** The row's orientation. Default: its `Tabs`', else `'horizontal'`. */
10
+ orientation?: 'horizontal' | 'vertical';
11
+ /** There is nowhere further to scroll this way - kept, but off. */
12
+ disabled?: boolean;
13
+ /** There is nowhere further to scroll this way - hidden, keeping its room. */
14
+ isHidden?: boolean;
15
+ /** Its stretch of an enclosed row's divider - resolves to `theme.palette`. Default: the row's line, the selected tab's color. */
16
+ color?: keyof Theme['palette'];
17
+ /** The chevron's color - resolves against `theme.text`. Default: its `Tabs`' `textColor`, else `'primary'`. */
18
+ textColor?: keyof Theme['text'];
19
+ /** Fired when it is pressed. In a `Tabs`, it scrolls the row by its visible size. */
20
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
21
+ /** What it shows. Default: a chevron pointing the way it scrolls. */
22
+ children?: ReactNode;
23
+ className?: string;
24
+ 'data-testid'?: string;
25
+ }
26
+ /**
27
+ * @description The button that scrolls a row of tabs - a `Tabs` shows one at each end while its
28
+ * tabs overflow (`overflowBehavior="scroll"`). Out of the tab order and hidden from assistive
29
+ * technology: the arrow keys already reach every tab. A `Tabs` takes another in its place with
30
+ * `slots={{ scrollButton }}`, given these same props.
31
+ */
32
+ declare function TabScrollButton({ direction, orientation, disabled, isHidden, color: colorProp, textColor: textColorProp, onClick, children, className, 'data-testid': dataTestid }: Readonly<TabScrollButtonProps>): import("react").JSX.Element;
33
+ //#endregion
34
+ export { TabScrollButtonProps as n, TabScrollDirection as r, TabScrollButton as t };
@@ -1,8 +1,7 @@
1
- import { T as Theme } from "./themes-RX2UX5gD.mjs";
2
- import "./index-C1WqEDtQ.mjs";
3
- import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-DXvQ-JVZ.mjs";
4
- import { SpaceProps } from "@soroush.tech/styled-system";
1
+ import { V as Theme } from "./index-DmJ7yWWi.cjs";
2
+ import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-XxydXX8l.cjs";
5
3
  import { ElementType, HTMLAttributes } from "react";
4
+ import { SpaceProps } from "@soroush.tech/styled-system";
6
5
  //#region src/ButtonGroup/ButtonGroup.d.ts
7
6
  type ButtonGroupOrientation = 'horizontal' | 'vertical';
8
7
  type ButtonGroupRadius = keyof Theme['radii'];
@@ -1,5 +1,5 @@
1
- import { a as PaginationItemSize } from "./index-DdqdSOct.cjs";
2
- import "./index-Celm-8iN.cjs";
1
+ import { a as PaginationItemSize } from "./index-BFruxTHv.cjs";
2
+ import "./index-BiVvxOvj.cjs";
3
3
  import { HTMLAttributes } from "react";
4
4
  //#region src/Table/TablePaginationActions/TablePaginationActions.d.ts
5
5
  type TablePaginationActionType = 'first' | 'previous' | 'next' | 'last';
@@ -1,6 +1,7 @@
1
- import { n as TextColorToken } from "./index-BSqet8aO.cjs";
2
- import { SVGProps } from "react";
1
+ import { Z as ThemeIconSizes } from "./index-CVNJEUwJ.mjs";
2
+ import { n as TextColorToken } from "./index-BSA6SKao.mjs";
3
3
  import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
4
+ import { SVGProps } from "react";
4
5
  //#region src/Icon/icons/AccountTree.d.ts
5
6
  declare const SvgAccountTree: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
6
7
  //#endregion
@@ -118,6 +119,9 @@ declare const SvgLock: (props: SVGProps<SVGSVGElement>) => import("react").JSX.E
118
119
  //#region src/Icon/icons/Menu.d.ts
119
120
  declare const SvgMenu: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
120
121
  //#endregion
122
+ //#region src/Icon/icons/MoreHoriz.d.ts
123
+ declare const SvgMoreHoriz: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
124
+ //#endregion
121
125
  //#region src/Icon/icons/Neurology.d.ts
122
126
  declare const SvgNeurology: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
123
127
  //#endregion
@@ -214,6 +218,7 @@ declare const icons: {
214
218
  readonly link: typeof SvgLink;
215
219
  readonly lock: typeof SvgLock;
216
220
  readonly menu: typeof SvgMenu;
221
+ readonly more_horiz: typeof SvgMoreHoriz;
217
222
  readonly neurology: typeof SvgNeurology;
218
223
  readonly psychology: typeof SvgPsychology;
219
224
  readonly rebase_edit: typeof SvgRebaseEdit;
@@ -242,8 +247,11 @@ interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'color' | 'ref' | 'wid
242
247
  name: IconName;
243
248
  /** Resolves against theme.text - applied as `color`, which the SVG inherits via `currentColor`. */
244
249
  color?: TextColorToken;
245
- /** Sets both width and height (icons are square). */
246
- size?: string | number;
250
+ /**
251
+ * Sets both width and height (icons are square): one of the theme's icon sizes (`'sm'`, `'md'`,
252
+ * `'lg'`), or any CSS length. Default: the theme's `iconSize`, else `'lg'`.
253
+ */
254
+ size?: keyof ThemeIconSizes | (string & {}) | number;
247
255
  }
248
256
  declare function Icon({ name, color, size, ...rest }: Readonly<IconProps>): import("react").JSX.Element;
249
257
  //#endregion