@soroush.tech/design-system 2.0.0-alpha.3 → 2.0.0-alpha.5

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 (213) hide show
  1. package/dist/AppBar.d.cts +3 -3
  2. package/dist/AppBar.d.mts +3 -3
  3. package/dist/Avatar.cjs +1 -1
  4. package/dist/Avatar.d.cts +3 -3
  5. package/dist/Avatar.d.mts +3 -3
  6. package/dist/Avatar.mjs +1 -1
  7. package/dist/Backdrop.d.cts +1 -1
  8. package/dist/Backdrop.d.mts +1 -1
  9. package/dist/Button.cjs +1 -1
  10. package/dist/Button.d.cts +1 -1
  11. package/dist/Button.d.mts +1 -1
  12. package/dist/Button.mjs +1 -1
  13. package/dist/ButtonGroup.d.cts +1 -1
  14. package/dist/ButtonGroup.d.mts +1 -1
  15. package/dist/Card.cjs +2 -2
  16. package/dist/Card.d.cts +3 -3
  17. package/dist/Card.d.mts +3 -3
  18. package/dist/Card.mjs +2 -2
  19. package/dist/Checkbox.d.cts +2 -2
  20. package/dist/Checkbox.d.mts +2 -2
  21. package/dist/CircularProgress.d.cts +3 -3
  22. package/dist/CircularProgress.d.mts +3 -3
  23. package/dist/Drawer.cjs +1 -0
  24. package/dist/Drawer.d.cts +2 -2
  25. package/dist/Drawer.d.mts +2 -2
  26. package/dist/Drawer.mjs +1 -0
  27. package/dist/Flex.cjs +1 -5
  28. package/dist/Flex.d.cts +1 -1
  29. package/dist/Flex.d.mts +1 -1
  30. package/dist/Flex.mjs +1 -5
  31. package/dist/Form.d.cts +1 -1
  32. package/dist/Form.d.mts +1 -1
  33. package/dist/FormControl.cjs +1 -1
  34. package/dist/FormControl.d.cts +2 -2
  35. package/dist/FormControl.d.mts +2 -2
  36. package/dist/FormControl.mjs +1 -1
  37. package/dist/FormHelperText.d.cts +1 -1
  38. package/dist/FormHelperText.d.mts +1 -1
  39. package/dist/FormLabel.d.cts +1 -1
  40. package/dist/FormLabel.d.mts +1 -1
  41. package/dist/Grid.d.cts +7 -7
  42. package/dist/Grid.d.mts +7 -7
  43. package/dist/{Icon-BGcd6yy0.mjs → Icon-CnYvHWhh.mjs} +1 -1
  44. package/dist/{Icon-Cn6Zx8wb.cjs → Icon-DRBVfAHY.cjs} +1 -1
  45. package/dist/Icon.cjs +1 -1
  46. package/dist/Icon.d.cts +1 -1
  47. package/dist/Icon.d.mts +1 -1
  48. package/dist/Icon.mjs +1 -1
  49. package/dist/Image.d.cts +2 -2
  50. package/dist/Image.d.mts +2 -2
  51. package/dist/LinearProgress.d.cts +3 -3
  52. package/dist/LinearProgress.d.mts +3 -3
  53. package/dist/Link.cjs +1 -1
  54. package/dist/Link.d.cts +1 -1
  55. package/dist/Link.d.mts +1 -1
  56. package/dist/Link.mjs +1 -1
  57. package/dist/MenuItem.cjs +2 -2
  58. package/dist/MenuItem.d.cts +2 -2
  59. package/dist/MenuItem.d.mts +2 -2
  60. package/dist/MenuItem.mjs +2 -2
  61. package/dist/Modal.d.cts +1 -1
  62. package/dist/Modal.d.mts +1 -1
  63. package/dist/NativeSelect.cjs +2 -2
  64. package/dist/NativeSelect.d.cts +3 -3
  65. package/dist/NativeSelect.d.mts +3 -3
  66. package/dist/NativeSelect.mjs +2 -2
  67. package/dist/Pagination/PaginationItem.cjs +1 -1
  68. package/dist/Pagination/PaginationItem.d.cts +1 -1
  69. package/dist/Pagination/PaginationItem.d.mts +1 -1
  70. package/dist/Pagination/PaginationItem.mjs +1 -1
  71. package/dist/Pagination.d.cts +2 -2
  72. package/dist/Pagination.d.mts +2 -2
  73. package/dist/Paper.cjs +1 -1
  74. package/dist/Paper.d.cts +1 -1
  75. package/dist/Paper.d.mts +1 -1
  76. package/dist/Paper.mjs +1 -1
  77. package/dist/{Popover-CrSABgRk.cjs → Popover-CGJO-ztB.cjs} +1 -1
  78. package/dist/{Popover-DlpXdcwt.mjs → Popover-DPcahLFU.mjs} +1 -1
  79. package/dist/Popover.cjs +1 -1
  80. package/dist/Popover.d.cts +4 -4
  81. package/dist/Popover.d.mts +4 -4
  82. package/dist/Popover.mjs +1 -1
  83. package/dist/Pressable.cjs +1 -1
  84. package/dist/Pressable.d.cts +1 -1
  85. package/dist/Pressable.d.mts +1 -1
  86. package/dist/Pressable.mjs +1 -1
  87. package/dist/Quote.d.cts +3 -3
  88. package/dist/Quote.d.mts +3 -3
  89. package/dist/Radio.d.cts +2 -2
  90. package/dist/Radio.d.mts +2 -2
  91. package/dist/Select.cjs +7 -3
  92. package/dist/Select.d.cts +3 -3
  93. package/dist/Select.d.mts +3 -3
  94. package/dist/Select.mjs +7 -3
  95. package/dist/Sidebar/Sidebar.d.cts +1 -1
  96. package/dist/Sidebar/Sidebar.d.mts +1 -1
  97. package/dist/Sidebar/SidebarItem.cjs +1 -1
  98. package/dist/Sidebar/SidebarItem.d.cts +4 -4
  99. package/dist/Sidebar/SidebarItem.d.mts +4 -4
  100. package/dist/Sidebar/SidebarItem.mjs +1 -1
  101. package/dist/Skeleton.d.cts +2 -2
  102. package/dist/Skeleton.d.mts +2 -2
  103. package/dist/Switch.cjs +1 -1
  104. package/dist/Switch.d.cts +2 -2
  105. package/dist/Switch.d.mts +2 -2
  106. package/dist/Switch.mjs +1 -1
  107. package/dist/Table/Table.d.cts +3 -3
  108. package/dist/Table/Table.d.mts +3 -3
  109. package/dist/Table/TableBody.d.cts +2 -2
  110. package/dist/Table/TableBody.d.mts +2 -2
  111. package/dist/Table/TableCell.d.cts +1 -1
  112. package/dist/Table/TableCell.d.mts +1 -1
  113. package/dist/Table/TableContainer.d.cts +3 -3
  114. package/dist/Table/TableContainer.d.mts +3 -3
  115. package/dist/Table/TableControl.d.cts +1 -1
  116. package/dist/Table/TableControl.d.mts +1 -1
  117. package/dist/Table/TableFooter.d.cts +2 -2
  118. package/dist/Table/TableFooter.d.mts +2 -2
  119. package/dist/Table/TableHead.d.cts +2 -2
  120. package/dist/Table/TableHead.d.mts +2 -2
  121. package/dist/Table/TablePagination.d.cts +2 -2
  122. package/dist/Table/TablePagination.d.mts +2 -2
  123. package/dist/Table/TablePaginationActions.cjs +1 -1
  124. package/dist/Table/TablePaginationActions.d.cts +1 -1
  125. package/dist/Table/TablePaginationActions.d.mts +1 -1
  126. package/dist/Table/TablePaginationActions.mjs +1 -1
  127. package/dist/Table/TableRow.d.cts +2 -2
  128. package/dist/Table/TableRow.d.mts +2 -2
  129. package/dist/Table/TableSortLabel.cjs +1 -1
  130. package/dist/Table/TableSortLabel.d.cts +1 -1
  131. package/dist/Table/TableSortLabel.d.mts +1 -1
  132. package/dist/Table/TableSortLabel.mjs +1 -1
  133. package/dist/Table/hooks.d.cts +1 -1
  134. package/dist/Table/hooks.d.mts +1 -1
  135. package/dist/Table.d.cts +5 -5
  136. package/dist/Table.d.mts +5 -5
  137. package/dist/{TableContext-BowhBZkZ.d.cts → TableContext-CA6a5Ol5.d.cts} +1 -1
  138. package/dist/{TableContext-GmYLRYpc.d.mts → TableContext-CIuPZ_at.d.mts} +1 -1
  139. package/dist/TextInput.cjs +1 -1
  140. package/dist/TextInput.d.cts +2 -2
  141. package/dist/TextInput.d.mts +2 -2
  142. package/dist/TextInput.mjs +1 -1
  143. package/dist/ToggleButton/ToggleButton.cjs +1 -1
  144. package/dist/ToggleButton/ToggleButton.d.cts +1 -1
  145. package/dist/ToggleButton/ToggleButton.d.mts +1 -1
  146. package/dist/ToggleButton/ToggleButton.mjs +1 -1
  147. package/dist/ToggleButton/ToggleButtonGroup.cjs +1 -1
  148. package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
  149. package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
  150. package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
  151. package/dist/Typography.cjs +1 -1
  152. package/dist/Typography.d.cts +2 -2
  153. package/dist/Typography.d.mts +2 -2
  154. package/dist/Typography.mjs +1 -1
  155. package/dist/View.d.cts +1 -1
  156. package/dist/View.d.mts +1 -1
  157. package/dist/engine.d.cts +1 -1
  158. package/dist/engine.d.mts +1 -1
  159. package/dist/{index-D5Rj4uWe.d.cts → index-5w87AK-Y.d.cts} +2 -2
  160. package/dist/{index-suqlMrTp.d.mts → index-B2ljqGWF.d.cts} +3 -3
  161. package/dist/{index-CmscFo1L.d.mts → index-BAsVlkuL.d.mts} +2 -2
  162. package/dist/{index-VwsWkazt.d.cts → index-BCQ9LmG1.d.cts} +2 -2
  163. package/dist/{index-CPNzQhUu.d.cts → index-BHIuGvMo.d.cts} +2 -2
  164. package/dist/{index-DTeurv8z.d.cts → index-BSYW7cMN.d.mts} +4 -4
  165. package/dist/{index-BBV7_p-W.d.mts → index-BUb6X9OH.d.mts} +1 -1
  166. package/dist/index-BUrUPbcB.d.mts +21 -0
  167. package/dist/{index-D2yMhmE_.d.mts → index-BYqxI8bu.d.cts} +4 -4
  168. package/dist/{index-Ddetmkqd.d.cts → index-BcU5ow8v.d.mts} +3 -3
  169. package/dist/{index-CNzkJGNq.d.cts → index-BqJWxp9I.d.cts} +3 -3
  170. package/dist/{index-BsUsSWXP.d.cts → index-C1uWcbTj.d.cts} +1 -1
  171. package/dist/{index-BbngAEDY.d.mts → index-CAjXum0k.d.cts} +2 -2
  172. package/dist/{index-di-L2lJ9.d.mts → index-CQRdyj3E.d.mts} +2 -2
  173. package/dist/{index-t6XUvJ_3.d.mts → index-CSoaaZ20.d.cts} +3 -3
  174. package/dist/{index-D0XX9v0b.d.cts → index-ChPaQZ6F.d.cts} +3 -3
  175. package/dist/{index-C7bEBYuv.d.mts → index-Cj--T8Sh.d.mts} +3 -3
  176. package/dist/index-ClclP_mB.d.cts +21 -0
  177. package/dist/{index-C8SeYUxJ.d.cts → index-CllDs3D0.d.mts} +3 -3
  178. package/dist/{index-BHyJ6P_D.d.mts → index-DLezwPW8.d.mts} +20 -2
  179. package/dist/{index-BO-vkjtm.d.cts → index-DPMcs3Q1.d.cts} +20 -2
  180. package/dist/{index-B2eLreA5.d.cts → index-DT6KvZ1x.d.cts} +2 -2
  181. package/dist/{index-CMKzrxOO.d.mts → index-DbkAYV9r.d.mts} +2 -2
  182. package/dist/{index-CxDY_w-H.d.cts → index-DmJCHY90.d.cts} +1 -1
  183. package/dist/{index-BW4rc8cK.d.cts → index-Dq5PHWL4.d.mts} +2 -2
  184. package/dist/{index-C-kvrbCi.d.cts → index-DzdiUOgM.d.cts} +2 -2
  185. package/dist/{index-DYtIEMr9.d.mts → index-FiPb4-DU.d.mts} +2 -2
  186. package/dist/{index-Dkqk_6g2.d.mts → index-e5hDFZ05.d.mts} +1 -1
  187. package/dist/{index-CGCO5eo7.d.mts → index-q3Ftmjpf.d.mts} +3 -3
  188. package/dist/{index-C58AZZQ2.d.cts → index-sCbCJL02.d.cts} +3 -3
  189. package/dist/{index-BT-mcuE6.d.mts → index-yQfi7MqO.d.mts} +3 -3
  190. package/dist/{index-DJ8NTYR8.d.mts → index-yR_0laAQ.d.mts} +2 -2
  191. package/dist/index.d.cts +2 -2
  192. package/dist/index.d.mts +2 -2
  193. package/dist/style.cjs +1 -1
  194. package/dist/style.d.cts +2 -2
  195. package/dist/style.d.mts +2 -2
  196. package/dist/style.mjs +1 -1
  197. package/dist/testing.cjs +59 -0
  198. package/dist/testing.d.cts +9 -0
  199. package/dist/testing.d.mts +9 -0
  200. package/dist/testing.mjs +58 -0
  201. package/dist/{theme-DfAqr7qo.cjs → theme-B0P8owUo.cjs} +34 -0
  202. package/dist/{theme-C1o9qa2E.mjs → theme-DdjeZjsA.mjs} +30 -2
  203. package/dist/theme.cjs +2 -1
  204. package/dist/theme.d.cts +3 -3
  205. package/dist/theme.d.mts +3 -3
  206. package/dist/theme.mjs +2 -2
  207. package/dist/{themes-Dswy4M6B.d.cts → themes-CQKn24UN.d.mts} +2 -2
  208. package/dist/{themes-C3RTORGO.d.mts → themes-DEom6o-J.d.cts} +2 -2
  209. package/dist/{useTablePagination-BueH0_dG.d.cts → useTablePagination-Ci9tV-Y3.d.cts} +1 -1
  210. package/dist/{useTablePagination-CxBh-gU8.d.mts → useTablePagination-Et2FY7SE.d.mts} +1 -1
  211. package/package.json +12 -2
  212. package/dist/index-CS4yFHlC.d.cts +0 -22
  213. package/dist/index-CWYckiaS.d.mts +0 -22
@@ -1,4 +1,4 @@
1
- import { M as ThemeDefaults, T as Theme, j as ThemeComponents } from "./themes-Dswy4M6B.cjs";
1
+ import { I as ThemeLayout, M as ThemeDefaults, T as Theme, j as ThemeComponents } from "./themes-DEom6o-J.cjs";
2
2
  import { ComponentType, ReactNode } from "react";
3
3
  //#region src/theme/ThemeProvider.d.ts
4
4
  interface ThemeProviderProps {
@@ -17,6 +17,24 @@ interface ThemeProviderProps {
17
17
  }
18
18
  declare function ThemeProvider({ children, theme, defaults }: Readonly<ThemeProviderProps>): import("react").JSX.Element;
19
19
  //#endregion
20
+ //#region src/theme/LayoutProvider.d.ts
21
+ interface LayoutProviderProps {
22
+ /**
23
+ * The page's layout: `theme.layout`'s shape - `content`, `panels`, `bars` per breakpoint -
24
+ * partial. A value holds from its breakpoint up, until the page sets it again. Keep it stable
25
+ * (defined outside the component, or memoized): a new object re-derives the theme.
26
+ */
27
+ layout: ThemeLayout;
28
+ children: ReactNode;
29
+ }
30
+ /**
31
+ * @description A page-level layout: everything inside sees `theme.layout` with the page's
32
+ * values merged on top - `View`, `Flex` and `Grid` with `layout`, and `useTheme().layout`. It
33
+ * derives the theme from the one around it and changes nothing else, so colours, light/dark
34
+ * switching and every other token stay the app theme's. Nested providers stack.
35
+ */
36
+ declare function LayoutProvider({ layout, children }: Readonly<LayoutProviderProps>): import("react").JSX.Element;
37
+ //#endregion
20
38
  //#region src/theme/utils/themeDefault.d.ts
21
39
  /**
22
40
  * Resolves a component's default token/variant key: the theme's optional
@@ -50,4 +68,4 @@ declare function withTheme<P extends object>(WrappedComponent: ComponentType<P &
50
68
  theme: Theme;
51
69
  }>): (props: P) => import("react").JSX.Element;
52
70
  //#endregion
53
- export { ThemeProvider as a, themeDefault as i, useDefaultProps as n, useTheme as r, withTheme as t };
71
+ export { LayoutProvider as a, themeDefault as i, useDefaultProps as n, LayoutProviderProps as o, useTheme as r, ThemeProvider as s, withTheme as t };
@@ -1,5 +1,5 @@
1
- import { T as Theme, i as ButtonVariants, x as PaletteColor } from "./themes-Dswy4M6B.cjs";
2
- import "./index-BsUsSWXP.cjs";
1
+ import { T as Theme, i as ButtonVariants, x as PaletteColor } from "./themes-DEom6o-J.cjs";
2
+ import "./index-C1uWcbTj.cjs";
3
3
  import { ButtonHTMLAttributes, ReactNode } from "react";
4
4
  import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
5
5
  //#region src/Button/Button.d.ts
@@ -1,5 +1,5 @@
1
- import { T as Theme, x as PaletteColor } from "./themes-C3RTORGO.mjs";
2
- import "./index-Dkqk_6g2.mjs";
1
+ import { T as Theme, x as PaletteColor } from "./themes-CQKn24UN.mjs";
2
+ import "./index-e5hDFZ05.mjs";
3
3
  import { SpaceProps } from "@soroush.tech/styled-system";
4
4
  import { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
5
5
  //#region src/Pagination/hooks/usePagination.d.ts
@@ -1,4 +1,4 @@
1
- import { n as TextColorToken } from "./index-D5Rj4uWe.cjs";
1
+ import { n as TextColorToken } from "./index-5w87AK-Y.cjs";
2
2
  import { SVGProps } from "react";
3
3
  import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
4
4
  //#region src/Icon/icons/AccountTree.d.ts
@@ -1,5 +1,5 @@
1
- import { T as Theme } from "./themes-Dswy4M6B.cjs";
2
- import "./index-BsUsSWXP.cjs";
1
+ import { T as Theme } from "./themes-CQKn24UN.mjs";
2
+ import "./index-e5hDFZ05.mjs";
3
3
  import { KeyboardEvent, MouseEvent, ReactNode, Ref, RefCallback, SyntheticEvent } from "react";
4
4
  //#region src/Modal/useModal.d.ts
5
5
  type ModalCloseReason = 'escapeKey' | 'backdropClick';
@@ -1,5 +1,5 @@
1
- import { a as PaginationItemSize } from "./index-VwsWkazt.cjs";
2
- import "./index-C58AZZQ2.cjs";
1
+ import { a as PaginationItemSize } from "./index-BCQ9LmG1.cjs";
2
+ import "./index-sCbCJL02.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,5 +1,5 @@
1
- import { T as Theme, i as ButtonVariants, x as PaletteColor } from "./themes-C3RTORGO.mjs";
2
- import "./index-Dkqk_6g2.mjs";
1
+ import { T as Theme, i as ButtonVariants, x as PaletteColor } from "./themes-CQKn24UN.mjs";
2
+ import "./index-e5hDFZ05.mjs";
3
3
  import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
4
4
  import { ButtonHTMLAttributes, ReactNode } from "react";
5
5
  //#region src/Button/Button.d.ts
@@ -1,4 +1,4 @@
1
- import { T as Theme } from "./themes-C3RTORGO.mjs";
1
+ import { T as Theme } from "./themes-CQKn24UN.mjs";
2
2
  import { CreateStyledComponent, FilteringStyledOptions, Interpolation, StyledOptions } from "@emotion/styled";
3
3
  import { PropsOf, css as css$1, keyframes } from "@emotion/react";
4
4
  import { createShouldForwardProp, props } from "@soroush.tech/styled-system/should-forward-prop";
@@ -1,6 +1,6 @@
1
- import { T as Theme } from "./themes-C3RTORGO.mjs";
2
- import "./index-Dkqk_6g2.mjs";
3
- import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-CMKzrxOO.mjs";
1
+ import { T as Theme } from "./themes-CQKn24UN.mjs";
2
+ import "./index-e5hDFZ05.mjs";
3
+ import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-DbkAYV9r.mjs";
4
4
  import { SpaceProps } from "@soroush.tech/styled-system";
5
5
  import { HTMLAttributes } from "react";
6
6
  //#region src/Pagination/Pagination.d.ts
@@ -1,6 +1,6 @@
1
- import { T as Theme } from "./themes-Dswy4M6B.cjs";
2
- import "./index-BsUsSWXP.cjs";
3
- import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-VwsWkazt.cjs";
1
+ import { T as Theme } from "./themes-DEom6o-J.cjs";
2
+ import "./index-C1uWcbTj.cjs";
3
+ import { a as PaginationItemSize, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, s as PaginationItemType } from "./index-BCQ9LmG1.cjs";
4
4
  import { HTMLAttributes } from "react";
5
5
  import { SpaceProps } from "@soroush.tech/styled-system";
6
6
  //#region src/Pagination/Pagination.d.ts
@@ -1,6 +1,6 @@
1
- import { T as Theme } from "./themes-C3RTORGO.mjs";
2
- import "./index-Dkqk_6g2.mjs";
3
- import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-DYtIEMr9.mjs";
1
+ import { T as Theme } from "./themes-CQKn24UN.mjs";
2
+ import "./index-e5hDFZ05.mjs";
3
+ import { n as ButtonColor, o as ButtonSize, s as ButtonVariant } from "./index-FiPb4-DU.mjs";
4
4
  import { SpaceProps } from "@soroush.tech/styled-system";
5
5
  import { ElementType, HTMLAttributes } from "react";
6
6
  //#region src/ButtonGroup/ButtonGroup.d.ts
@@ -1,5 +1,5 @@
1
- import { T as Theme, Y as TypographyVariant } from "./themes-C3RTORGO.mjs";
2
- import "./index-Dkqk_6g2.mjs";
1
+ import { T as Theme, Y as TypographyVariant } from "./themes-CQKn24UN.mjs";
2
+ import "./index-e5hDFZ05.mjs";
3
3
  import { BorderProps, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
4
4
  import { CSSProperties, ElementType, HTMLAttributes } from "react";
5
5
  //#region src/Typography/Typography.d.ts
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as Theme, a as CSSObject, x as PaletteColor } from "./themes-Dswy4M6B.cjs";
2
- import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-BsUsSWXP.cjs";
1
+ import { T as Theme, a as CSSObject, x as PaletteColor } from "./themes-DEom6o-J.cjs";
2
+ import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-C1uWcbTj.cjs";
3
3
  export * from "@soroush.tech/styled-system";
4
4
  export { type CSSObject, type PaletteColor, type Theme, type ThemeCustomizationOptions, createShouldForwardProp, css, keyframes, props, styled };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as Theme, a as CSSObject, x as PaletteColor } from "./themes-C3RTORGO.mjs";
2
- import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-Dkqk_6g2.mjs";
1
+ import { T as Theme, a as CSSObject, x as PaletteColor } from "./themes-CQKn24UN.mjs";
2
+ import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-e5hDFZ05.mjs";
3
3
  export * from "@soroush.tech/styled-system";
4
4
  export { type CSSObject, type PaletteColor, type Theme, type ThemeCustomizationOptions, createShouldForwardProp, css, keyframes, props, styled };
package/dist/style.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_theme = require("./theme-DfAqr7qo.cjs");
2
+ const require_theme = require("./theme-B0P8owUo.cjs");
3
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
4
  let _emotion_react = require("@emotion/react");
5
5
  //#region src/style/hooks/useStyle.ts
package/dist/style.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as Theme, a as CSSObject } from "./themes-Dswy4M6B.cjs";
2
- import "./index-BO-vkjtm.cjs";
1
+ import { T as Theme, a as CSSObject } from "./themes-DEom6o-J.cjs";
2
+ import "./index-DPMcs3Q1.cjs";
3
3
  import { ComponentType, ReactNode } from "react";
4
4
  //#region src/style/hooks/useStyle.d.ts
5
5
  type StyleFactory = {
package/dist/style.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as Theme, a as CSSObject } from "./themes-C3RTORGO.mjs";
2
- import "./index-BHyJ6P_D.mjs";
1
+ import { T as Theme, a as CSSObject } from "./themes-CQKn24UN.mjs";
2
+ import "./index-DLezwPW8.mjs";
3
3
  import { ComponentType, ReactNode } from "react";
4
4
  //#region src/style/hooks/useStyle.d.ts
5
5
  type StyleFactory = {
package/dist/style.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as useTheme } from "./theme-C1o9qa2E.mjs";
1
+ import { r as useTheme } from "./theme-DdjeZjsA.mjs";
2
2
  import { n as EmotionThemeContext } from "./emotion-BAyqVw0c.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/style/hooks/useStyle.ts
@@ -0,0 +1,59 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/testing/installPopover.ts
3
+ const OPEN = "data-popover-open";
4
+ const setOpen = (element, open) => {
5
+ if (element.hasAttribute(OPEN) === open) return;
6
+ element.toggleAttribute(OPEN, open);
7
+ element.style.display = open ? "block" : "";
8
+ const [oldState, newState] = open ? ["closed", "open"] : ["open", "closed"];
9
+ element.dispatchEvent(Object.assign(new Event("toggle"), {
10
+ oldState,
11
+ newState
12
+ }));
13
+ };
14
+ /**
15
+ * @description Installs a Popover API stand-in on the test document - for jsdom, which has
16
+ * none - so components built on HTML popovers (`Drawer`) open, close and fire `toggle` in unit
17
+ * tests. Does nothing where the real API exists. Returns a function that removes it again.
18
+ */
19
+ function installPopover() {
20
+ const proto = HTMLElement.prototype;
21
+ if (typeof proto.showPopover === "function") return () => {};
22
+ proto.showPopover = function() {
23
+ setOpen(this, true);
24
+ };
25
+ proto.hidePopover = function() {
26
+ setOpen(this, false);
27
+ };
28
+ proto.togglePopover = function(options) {
29
+ const open = (typeof options === "boolean" ? options : options?.force) ?? !this.hasAttribute(OPEN);
30
+ setOpen(this, open);
31
+ return open;
32
+ };
33
+ const style = document.createElement("style");
34
+ style.textContent = `[popover]:not([${OPEN}]) { display: none; }`;
35
+ document.head.append(style);
36
+ const onKeyDown = (event) => {
37
+ if (event.key !== "Escape") return;
38
+ for (const element of document.querySelectorAll(`[popover]:not([popover="manual"])[${OPEN}]`)) setOpen(element, false);
39
+ };
40
+ const onClick = (event) => {
41
+ const button = event.target.closest("[popovertarget]");
42
+ const target = button && document.getElementById(button.getAttribute("popovertarget"));
43
+ if (!target?.hasAttribute("popover")) return;
44
+ const action = button.getAttribute("popovertargetaction") ?? "toggle";
45
+ setOpen(target, action === "toggle" ? !target.hasAttribute(OPEN) : action === "show");
46
+ };
47
+ document.addEventListener("keydown", onKeyDown);
48
+ document.addEventListener("click", onClick);
49
+ return () => {
50
+ delete proto.showPopover;
51
+ delete proto.hidePopover;
52
+ delete proto.togglePopover;
53
+ style.remove();
54
+ document.removeEventListener("keydown", onKeyDown);
55
+ document.removeEventListener("click", onClick);
56
+ };
57
+ }
58
+ //#endregion
59
+ exports.installPopover = installPopover;
@@ -0,0 +1,9 @@
1
+ //#region src/testing/installPopover.d.ts
2
+ /**
3
+ * @description Installs a Popover API stand-in on the test document - for jsdom, which has
4
+ * none - so components built on HTML popovers (`Drawer`) open, close and fire `toggle` in unit
5
+ * tests. Does nothing where the real API exists. Returns a function that removes it again.
6
+ */
7
+ declare function installPopover(): () => void;
8
+ //#endregion
9
+ export { installPopover };
@@ -0,0 +1,9 @@
1
+ //#region src/testing/installPopover.d.ts
2
+ /**
3
+ * @description Installs a Popover API stand-in on the test document - for jsdom, which has
4
+ * none - so components built on HTML popovers (`Drawer`) open, close and fire `toggle` in unit
5
+ * tests. Does nothing where the real API exists. Returns a function that removes it again.
6
+ */
7
+ declare function installPopover(): () => void;
8
+ //#endregion
9
+ export { installPopover };
@@ -0,0 +1,58 @@
1
+ //#region src/testing/installPopover.ts
2
+ const OPEN = "data-popover-open";
3
+ const setOpen = (element, open) => {
4
+ if (element.hasAttribute(OPEN) === open) return;
5
+ element.toggleAttribute(OPEN, open);
6
+ element.style.display = open ? "block" : "";
7
+ const [oldState, newState] = open ? ["closed", "open"] : ["open", "closed"];
8
+ element.dispatchEvent(Object.assign(new Event("toggle"), {
9
+ oldState,
10
+ newState
11
+ }));
12
+ };
13
+ /**
14
+ * @description Installs a Popover API stand-in on the test document - for jsdom, which has
15
+ * none - so components built on HTML popovers (`Drawer`) open, close and fire `toggle` in unit
16
+ * tests. Does nothing where the real API exists. Returns a function that removes it again.
17
+ */
18
+ function installPopover() {
19
+ const proto = HTMLElement.prototype;
20
+ if (typeof proto.showPopover === "function") return () => {};
21
+ proto.showPopover = function() {
22
+ setOpen(this, true);
23
+ };
24
+ proto.hidePopover = function() {
25
+ setOpen(this, false);
26
+ };
27
+ proto.togglePopover = function(options) {
28
+ const open = (typeof options === "boolean" ? options : options?.force) ?? !this.hasAttribute(OPEN);
29
+ setOpen(this, open);
30
+ return open;
31
+ };
32
+ const style = document.createElement("style");
33
+ style.textContent = `[popover]:not([${OPEN}]) { display: none; }`;
34
+ document.head.append(style);
35
+ const onKeyDown = (event) => {
36
+ if (event.key !== "Escape") return;
37
+ for (const element of document.querySelectorAll(`[popover]:not([popover="manual"])[${OPEN}]`)) setOpen(element, false);
38
+ };
39
+ const onClick = (event) => {
40
+ const button = event.target.closest("[popovertarget]");
41
+ const target = button && document.getElementById(button.getAttribute("popovertarget"));
42
+ if (!target?.hasAttribute("popover")) return;
43
+ const action = button.getAttribute("popovertargetaction") ?? "toggle";
44
+ setOpen(target, action === "toggle" ? !target.hasAttribute(OPEN) : action === "show");
45
+ };
46
+ document.addEventListener("keydown", onKeyDown);
47
+ document.addEventListener("click", onClick);
48
+ return () => {
49
+ delete proto.showPopover;
50
+ delete proto.hidePopover;
51
+ delete proto.togglePopover;
52
+ style.remove();
53
+ document.removeEventListener("keydown", onKeyDown);
54
+ document.removeEventListener("click", onClick);
55
+ };
56
+ }
57
+ //#endregion
58
+ export { installPopover };
@@ -422,6 +422,34 @@ function ThemeProvider({ children, theme = baseTheme, defaults }) {
422
422
  });
423
423
  }
424
424
  //#endregion
425
+ //#region src/theme/LayoutProvider.tsx
426
+ const pageLayout = (theme, layout) => {
427
+ const page = layout;
428
+ let carried = {};
429
+ const merged = {};
430
+ for (const key of Object.keys(theme.breakpoints)) {
431
+ carried = deepMerge(carried, page[key] ?? {});
432
+ if (Object.keys(carried).length > 0) merged[key] = carried;
433
+ }
434
+ return merged;
435
+ };
436
+ /**
437
+ * @description A page-level layout: everything inside sees `theme.layout` with the page's
438
+ * values merged on top - `View`, `Flex` and `Grid` with `layout`, and `useTheme().layout`. It
439
+ * derives the theme from the one around it and changes nothing else, so colours, light/dark
440
+ * switching and every other token stay the app theme's. Nested providers stack.
441
+ */
442
+ function LayoutProvider({ layout, children }) {
443
+ const derive = (0, react.useCallback)((outer) => {
444
+ const theme = "breakpoints" in outer ? outer : baseTheme;
445
+ return createTheme(theme, { layout: pageLayout(theme, layout) });
446
+ }, [layout]);
447
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_emotion_react.ThemeProvider, {
448
+ theme: derive,
449
+ children
450
+ });
451
+ }
452
+ //#endregion
425
453
  //#region src/theme/hooks/useTheme.ts
426
454
  /**
427
455
  * The active theme, typed as this package's own `Theme` - Emotion is an
@@ -451,6 +479,12 @@ function withTheme(WrappedComponent) {
451
479
  };
452
480
  }
453
481
  //#endregion
482
+ Object.defineProperty(exports, "LayoutProvider", {
483
+ enumerable: true,
484
+ get: function() {
485
+ return LayoutProvider;
486
+ }
487
+ });
454
488
  Object.defineProperty(exports, "ThemeProvider", {
455
489
  enumerable: true,
456
490
  get: function() {
@@ -1,7 +1,7 @@
1
1
  import { alpha, generateBoxShadow } from "./utils.mjs";
2
2
  import { a as useEmotionTheme, n as EmotionThemeContext, r as EmotionThemeProvider } from "./emotion-BAyqVw0c.mjs";
3
3
  import { createContainerQueries, createMediaHelpers } from "@soroush.tech/styled-system";
4
- import { useMemo } from "react";
4
+ import { useCallback, useMemo } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/theme/utils/spacing.ts
7
7
  const spacing = (units) => `${8 * units}px`;
@@ -422,6 +422,34 @@ function ThemeProvider({ children, theme = baseTheme, defaults }) {
422
422
  });
423
423
  }
424
424
  //#endregion
425
+ //#region src/theme/LayoutProvider.tsx
426
+ const pageLayout = (theme, layout) => {
427
+ const page = layout;
428
+ let carried = {};
429
+ const merged = {};
430
+ for (const key of Object.keys(theme.breakpoints)) {
431
+ carried = deepMerge(carried, page[key] ?? {});
432
+ if (Object.keys(carried).length > 0) merged[key] = carried;
433
+ }
434
+ return merged;
435
+ };
436
+ /**
437
+ * @description A page-level layout: everything inside sees `theme.layout` with the page's
438
+ * values merged on top - `View`, `Flex` and `Grid` with `layout`, and `useTheme().layout`. It
439
+ * derives the theme from the one around it and changes nothing else, so colours, light/dark
440
+ * switching and every other token stay the app theme's. Nested providers stack.
441
+ */
442
+ function LayoutProvider({ layout, children }) {
443
+ const derive = useCallback((outer) => {
444
+ const theme = "breakpoints" in outer ? outer : baseTheme;
445
+ return createTheme(theme, { layout: pageLayout(theme, layout) });
446
+ }, [layout]);
447
+ return /* @__PURE__ */ jsx(EmotionThemeProvider, {
448
+ theme: derive,
449
+ children
450
+ });
451
+ }
452
+ //#endregion
425
453
  //#region src/theme/hooks/useTheme.ts
426
454
  /**
427
455
  * The active theme, typed as this package's own `Theme` - Emotion is an
@@ -451,4 +479,4 @@ function withTheme(WrappedComponent) {
451
479
  };
452
480
  }
453
481
  //#endregion
454
- export { space as C, createTheme as D, zOrder as E, withBreakpointHelpers as O, sizes as S, up as T, letterSpacings as _, avatar as a, only as b, borderWidths as c, down as d, fontSizes as f, layout as g, icon as h, ThemeProvider as i, breakpoints as l, fonts as m, useDefaultProps as n, baseTheme as o, fontWeights as p, useTheme as r, between as s, withTheme as t, containerQueries as u, lineHeights as v, typography as w, radii as x, not as y };
482
+ export { sizes as C, zOrder as D, up as E, createTheme as O, radii as S, typography as T, layout as _, ThemeProvider as a, not as b, between as c, containerQueries as d, down as f, icon as g, fonts as h, LayoutProvider as i, withBreakpointHelpers as k, borderWidths as l, fontWeights as m, useDefaultProps as n, avatar as o, fontSizes as p, useTheme as r, baseTheme as s, withTheme as t, breakpoints as u, letterSpacings as v, space as w, only as x, lineHeights as y };
package/dist/theme.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
3
- const require_theme = require("./theme-DfAqr7qo.cjs");
3
+ const require_theme = require("./theme-B0P8owUo.cjs");
4
+ exports.LayoutProvider = require_theme.LayoutProvider;
4
5
  exports.ThemeProvider = require_theme.ThemeProvider;
5
6
  exports.avatar = require_theme.avatar;
6
7
  exports.baseTheme = require_theme.baseTheme;
package/dist/theme.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as between, A as ThemeBreakpoints, B as ThemeRadii, C as PressableOwnerState, Ct as withBreakpointHelpers, D as ThemeBackground, E as ThemeAvatarSizes, F as ThemeIconSizes, G as ThemeSwitch, H as ThemeSizes, I as ThemeLayout, J as ThemeZOrder, K as ThemeText, L as ThemeLetterSpacings, M as ThemeDefaults, N as ThemeFontWeights, O as ThemeBorder, P as ThemeFonts, Q as baseTheme, R as ThemeLineHeights, S as PaletteEntry, St as BreakpointHelpers, T as Theme, U as ThemeSkeleton, V as ThemeShadow, W as ThemeSpace, X as TypographyVariantStyle, Y as TypographyVariant, Z as avatar, _ as LayoutPanel, _t as up, a as CSSObject, at as fontWeights, b as OpenScale, bt as ThemeOverride, c as CardSlotTypographyProps, ct as layout, d as ComponentVariant, dt as not, et as borderWidths, f as DefaultBreakpoints, ft as only, g as LayoutLength, gt as typography, h as LayoutEntry, ht as space, i as ButtonVariants, it as fontSizes, j as ThemeComponents, k as ThemeBorderWidths, l as ComponentConfig, lt as letterSpacings, m as LayoutContent, mt as sizes, n as BreakpointOverrides, nt as containerQueries, o as CardOwnerState, ot as fonts, p as LayoutBars, pt as radii, q as ThemeTypographyVariants, r as ButtonOwnerState, rt as down, s as CardSlotIconProps, st as icon, t as BreakpointKey, tt as breakpoints, u as ComponentStyle, ut as lineHeights, v as LayoutPanels, vt as zOrder, w as SizeEntry, x as PaletteColor, xt as createTheme, y as LayoutSpace, yt as DeepPartial, z as ThemePalette } from "./themes-Dswy4M6B.cjs";
2
- import { a as ThemeProvider, i as themeDefault, n as useDefaultProps, r as useTheme, t as withTheme } from "./index-BO-vkjtm.cjs";
3
- export { BreakpointHelpers, BreakpointKey, BreakpointOverrides, ButtonOwnerState, ButtonVariants, CSSObject, CardOwnerState, CardSlotIconProps, CardSlotTypographyProps, ComponentConfig, ComponentStyle, ComponentVariant, type DeepPartial, DefaultBreakpoints, LayoutBars, LayoutContent, LayoutEntry, LayoutLength, LayoutPanel, LayoutPanels, LayoutSpace, OpenScale, PaletteColor, PaletteEntry, PressableOwnerState, SizeEntry, Theme, ThemeAvatarSizes, ThemeBackground, ThemeBorder, ThemeBorderWidths, ThemeBreakpoints, ThemeComponents, ThemeDefaults, ThemeFontWeights, ThemeFonts, ThemeIconSizes, ThemeLayout, ThemeLetterSpacings, ThemeLineHeights, type ThemeOverride, ThemePalette, ThemeProvider, ThemeRadii, ThemeShadow, ThemeSizes, ThemeSkeleton, ThemeSpace, ThemeSwitch, ThemeText, ThemeTypographyVariants, ThemeZOrder, TypographyVariant, TypographyVariantStyle, avatar, baseTheme, between, borderWidths, breakpoints, containerQueries, createTheme, down, fontSizes, fontWeights, fonts, icon, layout, letterSpacings, lineHeights, not, only, radii, sizes, space, themeDefault, typography, up, useDefaultProps, useTheme, withBreakpointHelpers, withTheme, zOrder };
1
+ import { $ as between, A as ThemeBreakpoints, B as ThemeRadii, C as PressableOwnerState, Ct as withBreakpointHelpers, D as ThemeBackground, E as ThemeAvatarSizes, F as ThemeIconSizes, G as ThemeSwitch, H as ThemeSizes, I as ThemeLayout, J as ThemeZOrder, K as ThemeText, L as ThemeLetterSpacings, M as ThemeDefaults, N as ThemeFontWeights, O as ThemeBorder, P as ThemeFonts, Q as baseTheme, R as ThemeLineHeights, S as PaletteEntry, St as BreakpointHelpers, T as Theme, U as ThemeSkeleton, V as ThemeShadow, W as ThemeSpace, X as TypographyVariantStyle, Y as TypographyVariant, Z as avatar, _ as LayoutPanel, _t as up, a as CSSObject, at as fontWeights, b as OpenScale, bt as ThemeOverride, c as CardSlotTypographyProps, ct as layout, d as ComponentVariant, dt as not, et as borderWidths, f as DefaultBreakpoints, ft as only, g as LayoutLength, gt as typography, h as LayoutEntry, ht as space, i as ButtonVariants, it as fontSizes, j as ThemeComponents, k as ThemeBorderWidths, l as ComponentConfig, lt as letterSpacings, m as LayoutContent, mt as sizes, n as BreakpointOverrides, nt as containerQueries, o as CardOwnerState, ot as fonts, p as LayoutBars, pt as radii, q as ThemeTypographyVariants, r as ButtonOwnerState, rt as down, s as CardSlotIconProps, st as icon, t as BreakpointKey, tt as breakpoints, u as ComponentStyle, ut as lineHeights, v as LayoutPanels, vt as zOrder, w as SizeEntry, x as PaletteColor, xt as createTheme, y as LayoutSpace, yt as DeepPartial, z as ThemePalette } from "./themes-DEom6o-J.cjs";
2
+ import { a as LayoutProvider, i as themeDefault, n as useDefaultProps, o as LayoutProviderProps, r as useTheme, s as ThemeProvider, t as withTheme } from "./index-DPMcs3Q1.cjs";
3
+ export { BreakpointHelpers, BreakpointKey, BreakpointOverrides, ButtonOwnerState, ButtonVariants, CSSObject, CardOwnerState, CardSlotIconProps, CardSlotTypographyProps, ComponentConfig, ComponentStyle, ComponentVariant, type DeepPartial, DefaultBreakpoints, LayoutBars, LayoutContent, LayoutEntry, LayoutLength, LayoutPanel, LayoutPanels, LayoutProvider, LayoutProviderProps, LayoutSpace, OpenScale, PaletteColor, PaletteEntry, PressableOwnerState, SizeEntry, Theme, ThemeAvatarSizes, ThemeBackground, ThemeBorder, ThemeBorderWidths, ThemeBreakpoints, ThemeComponents, ThemeDefaults, ThemeFontWeights, ThemeFonts, ThemeIconSizes, ThemeLayout, ThemeLetterSpacings, ThemeLineHeights, type ThemeOverride, ThemePalette, ThemeProvider, ThemeRadii, ThemeShadow, ThemeSizes, ThemeSkeleton, ThemeSpace, ThemeSwitch, ThemeText, ThemeTypographyVariants, ThemeZOrder, TypographyVariant, TypographyVariantStyle, avatar, baseTheme, between, borderWidths, breakpoints, containerQueries, createTheme, down, fontSizes, fontWeights, fonts, icon, layout, letterSpacings, lineHeights, not, only, radii, sizes, space, themeDefault, typography, up, useDefaultProps, useTheme, withBreakpointHelpers, withTheme, zOrder };
package/dist/theme.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as between, A as ThemeBreakpoints, B as ThemeRadii, C as PressableOwnerState, Ct as withBreakpointHelpers, D as ThemeBackground, E as ThemeAvatarSizes, F as ThemeIconSizes, G as ThemeSwitch, H as ThemeSizes, I as ThemeLayout, J as ThemeZOrder, K as ThemeText, L as ThemeLetterSpacings, M as ThemeDefaults, N as ThemeFontWeights, O as ThemeBorder, P as ThemeFonts, Q as baseTheme, R as ThemeLineHeights, S as PaletteEntry, St as BreakpointHelpers, T as Theme, U as ThemeSkeleton, V as ThemeShadow, W as ThemeSpace, X as TypographyVariantStyle, Y as TypographyVariant, Z as avatar, _ as LayoutPanel, _t as up, a as CSSObject, at as fontWeights, b as OpenScale, bt as ThemeOverride, c as CardSlotTypographyProps, ct as layout, d as ComponentVariant, dt as not, et as borderWidths, f as DefaultBreakpoints, ft as only, g as LayoutLength, gt as typography, h as LayoutEntry, ht as space, i as ButtonVariants, it as fontSizes, j as ThemeComponents, k as ThemeBorderWidths, l as ComponentConfig, lt as letterSpacings, m as LayoutContent, mt as sizes, n as BreakpointOverrides, nt as containerQueries, o as CardOwnerState, ot as fonts, p as LayoutBars, pt as radii, q as ThemeTypographyVariants, r as ButtonOwnerState, rt as down, s as CardSlotIconProps, st as icon, t as BreakpointKey, tt as breakpoints, u as ComponentStyle, ut as lineHeights, v as LayoutPanels, vt as zOrder, w as SizeEntry, x as PaletteColor, xt as createTheme, y as LayoutSpace, yt as DeepPartial, z as ThemePalette } from "./themes-C3RTORGO.mjs";
2
- import { a as ThemeProvider, i as themeDefault, n as useDefaultProps, r as useTheme, t as withTheme } from "./index-BHyJ6P_D.mjs";
3
- export { BreakpointHelpers, BreakpointKey, BreakpointOverrides, ButtonOwnerState, ButtonVariants, CSSObject, CardOwnerState, CardSlotIconProps, CardSlotTypographyProps, ComponentConfig, ComponentStyle, ComponentVariant, type DeepPartial, DefaultBreakpoints, LayoutBars, LayoutContent, LayoutEntry, LayoutLength, LayoutPanel, LayoutPanels, LayoutSpace, OpenScale, PaletteColor, PaletteEntry, PressableOwnerState, SizeEntry, Theme, ThemeAvatarSizes, ThemeBackground, ThemeBorder, ThemeBorderWidths, ThemeBreakpoints, ThemeComponents, ThemeDefaults, ThemeFontWeights, ThemeFonts, ThemeIconSizes, ThemeLayout, ThemeLetterSpacings, ThemeLineHeights, type ThemeOverride, ThemePalette, ThemeProvider, ThemeRadii, ThemeShadow, ThemeSizes, ThemeSkeleton, ThemeSpace, ThemeSwitch, ThemeText, ThemeTypographyVariants, ThemeZOrder, TypographyVariant, TypographyVariantStyle, avatar, baseTheme, between, borderWidths, breakpoints, containerQueries, createTheme, down, fontSizes, fontWeights, fonts, icon, layout, letterSpacings, lineHeights, not, only, radii, sizes, space, themeDefault, typography, up, useDefaultProps, useTheme, withBreakpointHelpers, withTheme, zOrder };
1
+ import { $ as between, A as ThemeBreakpoints, B as ThemeRadii, C as PressableOwnerState, Ct as withBreakpointHelpers, D as ThemeBackground, E as ThemeAvatarSizes, F as ThemeIconSizes, G as ThemeSwitch, H as ThemeSizes, I as ThemeLayout, J as ThemeZOrder, K as ThemeText, L as ThemeLetterSpacings, M as ThemeDefaults, N as ThemeFontWeights, O as ThemeBorder, P as ThemeFonts, Q as baseTheme, R as ThemeLineHeights, S as PaletteEntry, St as BreakpointHelpers, T as Theme, U as ThemeSkeleton, V as ThemeShadow, W as ThemeSpace, X as TypographyVariantStyle, Y as TypographyVariant, Z as avatar, _ as LayoutPanel, _t as up, a as CSSObject, at as fontWeights, b as OpenScale, bt as ThemeOverride, c as CardSlotTypographyProps, ct as layout, d as ComponentVariant, dt as not, et as borderWidths, f as DefaultBreakpoints, ft as only, g as LayoutLength, gt as typography, h as LayoutEntry, ht as space, i as ButtonVariants, it as fontSizes, j as ThemeComponents, k as ThemeBorderWidths, l as ComponentConfig, lt as letterSpacings, m as LayoutContent, mt as sizes, n as BreakpointOverrides, nt as containerQueries, o as CardOwnerState, ot as fonts, p as LayoutBars, pt as radii, q as ThemeTypographyVariants, r as ButtonOwnerState, rt as down, s as CardSlotIconProps, st as icon, t as BreakpointKey, tt as breakpoints, u as ComponentStyle, ut as lineHeights, v as LayoutPanels, vt as zOrder, w as SizeEntry, x as PaletteColor, xt as createTheme, y as LayoutSpace, yt as DeepPartial, z as ThemePalette } from "./themes-CQKn24UN.mjs";
2
+ import { a as LayoutProvider, i as themeDefault, n as useDefaultProps, o as LayoutProviderProps, r as useTheme, s as ThemeProvider, t as withTheme } from "./index-DLezwPW8.mjs";
3
+ export { BreakpointHelpers, BreakpointKey, BreakpointOverrides, ButtonOwnerState, ButtonVariants, CSSObject, CardOwnerState, CardSlotIconProps, CardSlotTypographyProps, ComponentConfig, ComponentStyle, ComponentVariant, type DeepPartial, DefaultBreakpoints, LayoutBars, LayoutContent, LayoutEntry, LayoutLength, LayoutPanel, LayoutPanels, LayoutProvider, LayoutProviderProps, LayoutSpace, OpenScale, PaletteColor, PaletteEntry, PressableOwnerState, SizeEntry, Theme, ThemeAvatarSizes, ThemeBackground, ThemeBorder, ThemeBorderWidths, ThemeBreakpoints, ThemeComponents, ThemeDefaults, ThemeFontWeights, ThemeFonts, ThemeIconSizes, ThemeLayout, ThemeLetterSpacings, ThemeLineHeights, type ThemeOverride, ThemePalette, ThemeProvider, ThemeRadii, ThemeShadow, ThemeSizes, ThemeSkeleton, ThemeSpace, ThemeSwitch, ThemeText, ThemeTypographyVariants, ThemeZOrder, TypographyVariant, TypographyVariantStyle, avatar, baseTheme, between, borderWidths, breakpoints, containerQueries, createTheme, down, fontSizes, fontWeights, fonts, icon, layout, letterSpacings, lineHeights, not, only, radii, sizes, space, themeDefault, typography, up, useDefaultProps, useTheme, withBreakpointHelpers, withTheme, zOrder };
package/dist/theme.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
2
- import { C as space, D as createTheme, E as zOrder, O as withBreakpointHelpers, S as sizes, T as up, _ as letterSpacings, a as avatar, b as only, c as borderWidths, d as down, f as fontSizes, g as layout, h as icon, i as ThemeProvider, l as breakpoints, m as fonts, n as useDefaultProps, o as baseTheme, p as fontWeights, r as useTheme, s as between, t as withTheme, u as containerQueries, v as lineHeights, w as typography, x as radii, y as not } from "./theme-C1o9qa2E.mjs";
3
- export { ThemeProvider, avatar, baseTheme, between, borderWidths, breakpoints, containerQueries, createTheme, down, fontSizes, fontWeights, fonts, icon, layout, letterSpacings, lineHeights, not, only, radii, sizes, space, themeDefault, typography, up, useDefaultProps, useTheme, withBreakpointHelpers, withTheme, zOrder };
2
+ import { C as sizes, D as zOrder, E as up, O as createTheme, S as radii, T as typography, _ as layout, a as ThemeProvider, b as not, c as between, d as containerQueries, f as down, g as icon, h as fonts, i as LayoutProvider, k as withBreakpointHelpers, l as borderWidths, m as fontWeights, n as useDefaultProps, o as avatar, p as fontSizes, r as useTheme, s as baseTheme, t as withTheme, u as breakpoints, v as letterSpacings, w as space, x as only, y as lineHeights } from "./theme-DdjeZjsA.mjs";
3
+ export { LayoutProvider, ThemeProvider, avatar, baseTheme, between, borderWidths, breakpoints, containerQueries, createTheme, down, fontSizes, fontWeights, fonts, icon, layout, letterSpacings, lineHeights, not, only, radii, sizes, space, themeDefault, typography, up, useDefaultProps, useTheme, withBreakpointHelpers, withTheme, zOrder };
@@ -1,6 +1,6 @@
1
1
  import { CSSObject } from "@emotion/react";
2
- import { ElementType } from "react";
3
2
  import { ContainerQueries, QueryHelpers } from "@soroush.tech/styled-system";
3
+ import { ElementType } from "react";
4
4
  //#region src/theme/breakpoints.d.ts
5
5
  /**
6
6
  * The query helpers a theme's breakpoint scale carries: `up` / `down` / `only` / `between` /
@@ -229,7 +229,7 @@ interface DefaultBreakpoints {
229
229
  interface BreakpointOverrides {}
230
230
  type RemovedBreakpoints = keyof { [K in keyof BreakpointOverrides as BreakpointOverrides[K] extends false ? K : never]: true; };
231
231
  /** The theme's breakpoint names: the defaults, plus every override set to `true`, minus every one set to `false`. */
232
- type BreakpointKey = Exclude<keyof DefaultBreakpoints | keyof BreakpointOverrides, RemovedBreakpoints>;
232
+ type BreakpointKey = Exclude<keyof (Omit<DefaultBreakpoints, keyof BreakpointOverrides> & BreakpointOverrides), RemovedBreakpoints>;
233
233
  /**
234
234
  * `theme.breakpoints`: where each window class starts, ascending, in declared order. A key holds
235
235
  * from its value until the next key, so `xs: '0px'` applies everywhere until `sm` overrides it;
@@ -1,6 +1,6 @@
1
1
  import { CSSObject } from "@emotion/react";
2
- import { ContainerQueries, QueryHelpers } from "@soroush.tech/styled-system";
3
2
  import { ElementType } from "react";
3
+ import { ContainerQueries, QueryHelpers } from "@soroush.tech/styled-system";
4
4
  //#region src/theme/breakpoints.d.ts
5
5
  /**
6
6
  * The query helpers a theme's breakpoint scale carries: `up` / `down` / `only` / `between` /
@@ -229,7 +229,7 @@ interface DefaultBreakpoints {
229
229
  interface BreakpointOverrides {}
230
230
  type RemovedBreakpoints = keyof { [K in keyof BreakpointOverrides as BreakpointOverrides[K] extends false ? K : never]: true; };
231
231
  /** The theme's breakpoint names: the defaults, plus every override set to `true`, minus every one set to `false`. */
232
- type BreakpointKey = Exclude<keyof DefaultBreakpoints | keyof BreakpointOverrides, RemovedBreakpoints>;
232
+ type BreakpointKey = Exclude<keyof (Omit<DefaultBreakpoints, keyof BreakpointOverrides> & BreakpointOverrides), RemovedBreakpoints>;
233
233
  /**
234
234
  * `theme.breakpoints`: where each window class starts, ascending, in declared order. A key holds
235
235
  * from its value until the next key, so `xs: '0px'` applies everywhere until `sm` overrides it;
@@ -1,4 +1,4 @@
1
- import { n as TableSortLabelDirection } from "./index-CNzkJGNq.cjs";
1
+ import { n as TableSortLabelDirection } from "./index-BqJWxp9I.cjs";
2
2
  //#region src/Table/hooks/useTableSort.d.ts
3
3
  /** One column's sort state - spreads directly onto `TableSortLabel`. */
4
4
  interface TableSortEntry {
@@ -1,4 +1,4 @@
1
- import { n as TableSortLabelDirection } from "./index-C7bEBYuv.mjs";
1
+ import { n as TableSortLabelDirection } from "./index-Cj--T8Sh.mjs";
2
2
  //#region src/Table/hooks/useTableSort.d.ts
3
3
  /** One column's sort state - spreads directly onto `TableSortLabel`. */
4
4
  interface TableSortEntry {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soroush.tech/design-system",
3
- "version": "2.0.0-alpha.3",
3
+ "version": "2.0.0-alpha.5",
4
4
  "description": "Emotion + @soroush.tech/styled-system React component library - token-driven light/dark themes, layout primitives, forms, and overlays.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -408,6 +408,16 @@
408
408
  "default": "./dist/theme.cjs"
409
409
  }
410
410
  },
411
+ "./testing": {
412
+ "import": {
413
+ "types": "./dist/testing.d.mts",
414
+ "default": "./dist/testing.mjs"
415
+ },
416
+ "require": {
417
+ "types": "./dist/testing.d.cts",
418
+ "default": "./dist/testing.cjs"
419
+ }
420
+ },
411
421
  "./style": {
412
422
  "import": {
413
423
  "types": "./dist/style.d.mts",
@@ -477,7 +487,7 @@
477
487
  "@emotion/cache": "^11.14.0",
478
488
  "@emotion/react": "^11.14.0",
479
489
  "@emotion/styled": "^11.14.1",
480
- "@soroush.tech/styled-system": "^6.0.0-alpha.2"
490
+ "@soroush.tech/styled-system": "^6.0.0-alpha.4"
481
491
  },
482
492
  "peerDependencies": {
483
493
  "react": "^19.2.8",
@@ -1,22 +0,0 @@
1
- import { T as Theme } from "./themes-Dswy4M6B.cjs";
2
- import "./index-BsUsSWXP.cjs";
3
- import { s as ViewProps } from "./index-C8SeYUxJ.cjs";
4
- import { FlexboxProps, LayoutGridProps } from "@soroush.tech/styled-system";
5
- //#region src/Flex/Flex.d.ts
6
- /** Valid values for the gap prop - derived from theme.space keys. */
7
- type GapToken = keyof Theme['space'];
8
- /**
9
- * `layout` lays a wrapping row out from `theme.layout` - the theme's gutter and margin per
10
- * breakpoint, with `--layout-columns` / `--layout-gutter` for the children's `span`. Entries
11
- * work as on `Grid`: `layout={{ gutter: 8 }}` at every breakpoint, `{ md: { gutter: 4 } }` at one.
12
- * View draws the frame; Flex adds the row. Column spacing comes from `gutter`, rows take `rowGap`.
13
- */
14
- interface FlexProps extends Omit<ViewProps, 'layout'>, FlexboxProps<Theme>, LayoutGridProps<Theme> {}
15
- declare const Flex: import("@emotion/styled").StyledComponent<{
16
- theme?: Theme;
17
- as?: React.ElementType;
18
- } & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
19
- theme?: Theme;
20
- } & FlexProps, {}, {}>;
21
- //#endregion
22
- export { FlexProps as n, GapToken as r, Flex as t };
@@ -1,22 +0,0 @@
1
- import { T as Theme } from "./themes-C3RTORGO.mjs";
2
- import "./index-Dkqk_6g2.mjs";
3
- import { s as ViewProps } from "./index-t6XUvJ_3.mjs";
4
- import { FlexboxProps, LayoutGridProps } from "@soroush.tech/styled-system";
5
- //#region src/Flex/Flex.d.ts
6
- /** Valid values for the gap prop - derived from theme.space keys. */
7
- type GapToken = keyof Theme['space'];
8
- /**
9
- * `layout` lays a wrapping row out from `theme.layout` - the theme's gutter and margin per
10
- * breakpoint, with `--layout-columns` / `--layout-gutter` for the children's `span`. Entries
11
- * work as on `Grid`: `layout={{ gutter: 8 }}` at every breakpoint, `{ md: { gutter: 4 } }` at one.
12
- * View draws the frame; Flex adds the row. Column spacing comes from `gutter`, rows take `rowGap`.
13
- */
14
- interface FlexProps extends Omit<ViewProps, 'layout'>, FlexboxProps<Theme>, LayoutGridProps<Theme> {}
15
- declare const Flex: import("@emotion/styled").StyledComponent<{
16
- theme?: Theme;
17
- as?: React.ElementType;
18
- } & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
19
- theme?: Theme;
20
- } & FlexProps, {}, {}>;
21
- //#endregion
22
- export { FlexProps as n, GapToken as r, Flex as t };