@soroush.tech/design-system 2.0.0-alpha.4 → 2.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/AppBar.d.cts +3 -3
- package/dist/AppBar.d.mts +3 -3
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.d.cts +3 -3
- package/dist/Avatar.d.mts +3 -3
- package/dist/Avatar.mjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Button.cjs +1 -1
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/Card.cjs +2 -2
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +2 -2
- package/dist/Checkbox.d.cts +2 -2
- package/dist/Checkbox.d.mts +2 -2
- package/dist/CircularProgress.cjs +1 -0
- package/dist/CircularProgress.d.cts +3 -3
- package/dist/CircularProgress.d.mts +3 -3
- package/dist/CircularProgress.mjs +1 -0
- package/dist/Drawer.cjs +3 -1
- package/dist/Drawer.d.cts +2 -2
- package/dist/Drawer.d.mts +2 -2
- package/dist/Drawer.mjs +3 -1
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/FormControl.cjs +1 -1
- package/dist/FormControl.d.cts +2 -2
- package/dist/FormControl.d.mts +2 -2
- package/dist/FormControl.mjs +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/Grid.d.cts +3 -3
- package/dist/Grid.d.mts +3 -3
- package/dist/{Icon-BGcd6yy0.mjs → Icon-CH3asUJu.mjs} +1 -1
- package/dist/{Icon-Cn6Zx8wb.cjs → Icon-CI6q2Eyi.cjs} +1 -1
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.d.cts +1 -1
- package/dist/Icon.d.mts +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/Image.d.cts +2 -2
- package/dist/Image.d.mts +2 -2
- package/dist/LinearProgress.d.cts +3 -3
- package/dist/LinearProgress.d.mts +3 -3
- package/dist/Link.cjs +1 -1
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.d.cts +2 -2
- package/dist/MenuItem.d.mts +2 -2
- package/dist/MenuItem.mjs +2 -2
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/NativeSelect.cjs +2 -2
- package/dist/NativeSelect.d.cts +3 -3
- package/dist/NativeSelect.d.mts +3 -3
- package/dist/NativeSelect.mjs +2 -2
- package/dist/Pagination/PaginationItem.cjs +1 -1
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +1 -1
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Paper.cjs +1 -1
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +1 -1
- package/dist/{Popover-DlpXdcwt.mjs → Popover-DwnSLpp1.mjs} +1 -1
- package/dist/{Popover-CrSABgRk.cjs → Popover-TpwRSORC.cjs} +1 -1
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +4 -4
- package/dist/Popover.d.mts +4 -4
- package/dist/Popover.mjs +1 -1
- package/dist/Pressable.cjs +1 -1
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Pressable.mjs +1 -1
- package/dist/Quote.d.cts +3 -3
- package/dist/Quote.d.mts +3 -3
- package/dist/Radio.d.cts +2 -2
- package/dist/Radio.d.mts +2 -2
- package/dist/Select.cjs +7 -3
- package/dist/Select.d.cts +3 -3
- package/dist/Select.d.mts +3 -3
- package/dist/Select.mjs +7 -3
- package/dist/Sidebar/Sidebar.d.cts +1 -1
- package/dist/Sidebar/Sidebar.d.mts +1 -1
- package/dist/Sidebar/SidebarItem.cjs +1 -1
- package/dist/Sidebar/SidebarItem.d.cts +4 -4
- package/dist/Sidebar/SidebarItem.d.mts +4 -4
- package/dist/Sidebar/SidebarItem.mjs +1 -1
- package/dist/Skeleton.d.cts +2 -2
- package/dist/Skeleton.d.mts +2 -2
- package/dist/Switch.cjs +1 -1
- package/dist/Switch.d.cts +2 -2
- package/dist/Switch.d.mts +2 -2
- package/dist/Switch.mjs +1 -1
- package/dist/Table/Table.d.cts +3 -3
- package/dist/Table/Table.d.mts +3 -3
- package/dist/Table/TableBody.d.cts +2 -2
- package/dist/Table/TableBody.d.mts +2 -2
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableContainer.d.cts +3 -3
- package/dist/Table/TableContainer.d.mts +3 -3
- package/dist/Table/TableControl.d.cts +1 -1
- package/dist/Table/TableControl.d.mts +1 -1
- package/dist/Table/TableFooter.d.cts +2 -2
- package/dist/Table/TableFooter.d.mts +2 -2
- package/dist/Table/TableHead.d.cts +2 -2
- package/dist/Table/TableHead.d.mts +2 -2
- package/dist/Table/TablePagination.d.cts +2 -2
- package/dist/Table/TablePagination.d.mts +2 -2
- package/dist/Table/TablePaginationActions.cjs +1 -1
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +1 -1
- package/dist/Table/TableRow.d.cts +2 -2
- package/dist/Table/TableRow.d.mts +2 -2
- package/dist/Table/TableSortLabel.cjs +1 -1
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +1 -1
- package/dist/Table/hooks.d.cts +1 -1
- package/dist/Table/hooks.d.mts +1 -1
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-BowhBZkZ.d.cts → TableContext-BeCxbtHH.d.cts} +1 -1
- package/dist/{TableContext-GmYLRYpc.d.mts → TableContext-BiRiYkVZ.d.mts} +1 -1
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.d.cts +2 -2
- package/dist/TextInput.d.mts +2 -2
- package/dist/TextInput.mjs +1 -1
- package/dist/ToggleButton/ToggleButton.cjs +1 -1
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.mjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.cjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
- package/dist/Typography.cjs +1 -1
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +1 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/{index-DTeurv8z.d.cts → index-B78VkB0-.d.cts} +3 -3
- package/dist/{index-D0XX9v0b.d.cts → index-BB-dLv5V.d.mts} +4 -4
- package/dist/{index-D5Rj4uWe.d.cts → index-BSqet8aO.d.cts} +2 -2
- package/dist/{index-CMKzrxOO.d.mts → index-BUoVTCqX.d.mts} +2 -2
- package/dist/{index-N_TM6YXV.d.cts → index-B_dKjEDR.d.mts} +3 -3
- package/dist/{index-BbngAEDY.d.mts → index-Belxmt1X.d.cts} +2 -2
- package/dist/{index-D2yMhmE_.d.mts → index-BfZuh9c2.d.mts} +3 -3
- package/dist/{index-B2eLreA5.d.cts → index-BhibLnZ0.d.cts} +2 -2
- package/dist/{index-C-kvrbCi.d.cts → index-Bid71KeF.d.cts} +2 -2
- package/dist/{index-Dkqk_6g2.d.mts → index-C1WqEDtQ.d.mts} +1 -1
- package/dist/{index-C_VwtHyK.d.mts → index-CA7HnbtH.d.cts} +3 -3
- package/dist/{index-DRM_YhHL.d.cts → index-CKZaErxJ.d.mts} +3 -3
- package/dist/{index-CGCO5eo7.d.mts → index-Celm-8iN.d.cts} +4 -4
- package/dist/{index-C58AZZQ2.d.cts → index-Chg6pSrr.d.mts} +4 -4
- package/dist/{index-BHyJ6P_D.d.mts → index-CrN4MSUF.d.cts} +20 -2
- package/dist/{index-BBV7_p-W.d.mts → index-Ctqajtac.d.cts} +2 -2
- package/dist/{index-CPNzQhUu.d.cts → index-CxUsrlg1.d.cts} +2 -2
- package/dist/{index-BsUsSWXP.d.cts → index-DBUwu65Z.d.cts} +1 -1
- package/dist/{index-CNzkJGNq.d.cts → index-DNwF3DUX.d.cts} +3 -3
- package/dist/{index-CxDY_w-H.d.cts → index-DO9J-Fla.d.mts} +2 -2
- package/dist/{index-DYtIEMr9.d.mts → index-DXvQ-JVZ.d.mts} +2 -2
- package/dist/{index-BT-mcuE6.d.mts → index-DbEnSf2m.d.cts} +4 -4
- package/dist/{index-VwsWkazt.d.cts → index-DdqdSOct.d.cts} +2 -2
- package/dist/{index-BUvlTtD7.d.mts → index-DzQJSYIh.d.cts} +3 -3
- package/dist/{index-CmscFo1L.d.mts → index-GpnmW6vu.d.mts} +2 -2
- package/dist/{index-di-L2lJ9.d.mts → index-S-ClM6WM.d.mts} +2 -2
- package/dist/{index-BO-vkjtm.d.cts → index-VOsBSWEu.d.mts} +20 -2
- package/dist/{index-BW4rc8cK.d.cts → index-Wnv6jCR3.d.mts} +2 -2
- package/dist/{index-C8SeYUxJ.d.cts → index-cuv3o-L7.d.mts} +3 -3
- package/dist/{index-t6XUvJ_3.d.mts → index-nB94D7UM.d.cts} +3 -3
- package/dist/{index-C7bEBYuv.d.mts → index-nc4Sxiy9.d.mts} +3 -3
- package/dist/{index-DJ8NTYR8.d.mts → index-smqjMLAZ.d.mts} +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/style.cjs +1 -1
- package/dist/style.d.cts +2 -2
- package/dist/style.d.mts +2 -2
- package/dist/style.mjs +1 -1
- package/dist/testing.cjs +60 -0
- package/dist/testing.d.cts +9 -0
- package/dist/testing.d.mts +9 -0
- package/dist/testing.mjs +59 -0
- package/dist/{theme-DfAqr7qo.cjs → theme-BXlAP3xf.cjs} +40 -1
- package/dist/{theme-C1o9qa2E.mjs → theme-CDVxig_g.mjs} +36 -3
- package/dist/theme.cjs +2 -1
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.mjs +2 -2
- package/dist/{themes-Dswy4M6B.d.cts → themes-Kbk9h5cN.d.cts} +6 -1
- package/dist/{themes-C3RTORGO.d.mts → themes-RX2UX5gD.d.mts} +6 -1
- package/dist/{useTablePagination-BueH0_dG.d.cts → useTablePagination-COTiNH_8.d.mts} +1 -1
- package/dist/{useTablePagination-CxBh-gU8.d.mts → useTablePagination-WFkaUZu8.d.cts} +1 -1
- package/package.json +12 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Theme, x as PaletteColor } from "./themes-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { T as Theme, x as PaletteColor } from "./themes-Kbk9h5cN.cjs";
|
|
2
|
+
import "./index-DBUwu65Z.cjs";
|
|
3
3
|
import { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
|
|
4
4
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
//#region src/Pagination/hooks/usePagination.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as Theme } from "./themes-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as FlexProps } from "./index-
|
|
1
|
+
import { T as Theme } from "./themes-Kbk9h5cN.cjs";
|
|
2
|
+
import "./index-DBUwu65Z.cjs";
|
|
3
|
+
import { n as FlexProps } from "./index-CA7HnbtH.cjs";
|
|
4
4
|
import { CSSProperties, ElementType } from "react";
|
|
5
5
|
//#region src/Paper/Paper.d.ts
|
|
6
6
|
type PaperElevation = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Theme, x as PaletteColor } from "./themes-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { T as Theme, x as PaletteColor } from "./themes-RX2UX5gD.mjs";
|
|
2
|
+
import "./index-C1WqEDtQ.mjs";
|
|
3
3
|
import { BorderProps, LayoutProps, SpaceProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ButtonHTMLAttributes, ElementType } from "react";
|
|
5
5
|
//#region src/Pressable/Pressable.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as PaginationItemSize } from "./index-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { a as PaginationItemSize } from "./index-BUoVTCqX.mjs";
|
|
2
|
+
import "./index-Chg6pSrr.mjs";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
//#region src/Table/TablePaginationActions/TablePaginationActions.d.ts
|
|
5
5
|
type TablePaginationActionType = 'first' | 'previous' | 'next' | 'last';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as ThemeDefaults, T as Theme, j as ThemeComponents } from "./themes-
|
|
1
|
+
import { I as ThemeLayout, M as ThemeDefaults, T as Theme, j as ThemeComponents } from "./themes-RX2UX5gD.mjs";
|
|
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 {
|
|
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 } from "./themes-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { T as Theme } from "./themes-RX2UX5gD.mjs";
|
|
2
|
+
import "./index-C1WqEDtQ.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,7 +1,7 @@
|
|
|
1
|
-
import { T as Theme } from "./themes-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { CSSProperties, HTMLAttributes } from "react";
|
|
1
|
+
import { T as Theme } from "./themes-RX2UX5gD.mjs";
|
|
2
|
+
import "./index-C1WqEDtQ.mjs";
|
|
4
3
|
import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
4
|
+
import { CSSProperties, HTMLAttributes } from "react";
|
|
5
5
|
//#region src/View/View.d.ts
|
|
6
6
|
/** Valid values for the color prop - derived from theme.text keys. */
|
|
7
7
|
type ViewColorToken = keyof Theme['text'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as Theme } from "./themes-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
1
|
+
import { T as Theme } from "./themes-Kbk9h5cN.cjs";
|
|
2
|
+
import "./index-DBUwu65Z.cjs";
|
|
4
3
|
import { CSSProperties, HTMLAttributes } from "react";
|
|
4
|
+
import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps } from "@soroush.tech/styled-system";
|
|
5
5
|
//#region src/View/View.d.ts
|
|
6
6
|
/** Valid values for the color prop - derived from theme.text keys. */
|
|
7
7
|
type ViewColorToken = keyof Theme['text'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as Theme } from "./themes-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as IconProps, r as IconName } from "./index-
|
|
1
|
+
import { T as Theme } from "./themes-RX2UX5gD.mjs";
|
|
2
|
+
import "./index-C1WqEDtQ.mjs";
|
|
3
|
+
import { n as IconProps, r as IconName } from "./index-DO9J-Fla.mjs";
|
|
4
4
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
import { ButtonHTMLAttributes } from "react";
|
|
6
6
|
//#region src/Table/TableSortLabel/TableSortLabel.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Theme, Y as TypographyVariant } from "./themes-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { T as Theme, Y as TypographyVariant } from "./themes-RX2UX5gD.mjs";
|
|
2
|
+
import "./index-C1WqEDtQ.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-
|
|
2
|
-
import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-
|
|
1
|
+
import { T as Theme, a as CSSObject, x as PaletteColor } from "./themes-Kbk9h5cN.cjs";
|
|
2
|
+
import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-DBUwu65Z.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-
|
|
2
|
-
import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-
|
|
1
|
+
import { T as Theme, a as CSSObject, x as PaletteColor } from "./themes-RX2UX5gD.mjs";
|
|
2
|
+
import { a as ThemeCustomizationOptions, i as props, n as css, o as styled, r as keyframes, t as createShouldForwardProp } from "./index-C1WqEDtQ.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-
|
|
2
|
+
const require_theme = require("./theme-BXlAP3xf.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-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { T as Theme, a as CSSObject } from "./themes-Kbk9h5cN.cjs";
|
|
2
|
+
import "./index-CrN4MSUF.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-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { T as Theme, a as CSSObject } from "./themes-RX2UX5gD.mjs";
|
|
2
|
+
import "./index-VOsBSWEu.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
package/dist/testing.cjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
if (!(event.target instanceof Element)) return;
|
|
42
|
+
const button = event.target.closest("[popovertarget]");
|
|
43
|
+
const target = button && document.getElementById(button.getAttribute("popovertarget"));
|
|
44
|
+
if (!target?.hasAttribute("popover")) return;
|
|
45
|
+
const action = button.getAttribute("popovertargetaction") ?? "toggle";
|
|
46
|
+
setOpen(target, action === "toggle" ? !target.hasAttribute(OPEN) : action === "show");
|
|
47
|
+
};
|
|
48
|
+
document.addEventListener("keydown", onKeyDown);
|
|
49
|
+
document.addEventListener("click", onClick);
|
|
50
|
+
return () => {
|
|
51
|
+
delete proto.showPopover;
|
|
52
|
+
delete proto.hidePopover;
|
|
53
|
+
delete proto.togglePopover;
|
|
54
|
+
style.remove();
|
|
55
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
56
|
+
document.removeEventListener("click", onClick);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
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 };
|
package/dist/testing.mjs
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
if (!(event.target instanceof Element)) return;
|
|
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
|
+
export { installPopover };
|
|
@@ -4,7 +4,7 @@ let react = require("react");
|
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
let _emotion_react = require("@emotion/react");
|
|
6
6
|
//#region src/theme/utils/spacing.ts
|
|
7
|
-
const spacing = (units) => `${8 * units}px`;
|
|
7
|
+
const spacing = (units) => units === 0 ? "0px" : `${Math.max(1, Math.round(8 * units))}px`;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/theme/breakpoints.ts
|
|
10
10
|
/**
|
|
@@ -157,9 +157,14 @@ const sizes = {
|
|
|
157
157
|
};
|
|
158
158
|
const space = {
|
|
159
159
|
0: 0,
|
|
160
|
+
.125: spacing(.125),
|
|
161
|
+
.25: spacing(.25),
|
|
160
162
|
.5: spacing(.5),
|
|
163
|
+
.75: spacing(.75),
|
|
161
164
|
1: spacing(1),
|
|
165
|
+
1.25: spacing(1.25),
|
|
162
166
|
1.5: spacing(1.5),
|
|
167
|
+
1.75: spacing(1.75),
|
|
163
168
|
2: spacing(2),
|
|
164
169
|
3: spacing(3),
|
|
165
170
|
4: spacing(4),
|
|
@@ -422,6 +427,34 @@ function ThemeProvider({ children, theme = baseTheme, defaults }) {
|
|
|
422
427
|
});
|
|
423
428
|
}
|
|
424
429
|
//#endregion
|
|
430
|
+
//#region src/theme/LayoutProvider.tsx
|
|
431
|
+
const pageLayout = (theme, layout) => {
|
|
432
|
+
const page = layout;
|
|
433
|
+
let carried = {};
|
|
434
|
+
const merged = {};
|
|
435
|
+
for (const key of Object.keys(theme.breakpoints)) {
|
|
436
|
+
carried = deepMerge(carried, page[key] ?? {});
|
|
437
|
+
if (Object.keys(carried).length > 0) merged[key] = carried;
|
|
438
|
+
}
|
|
439
|
+
return merged;
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* @description A page-level layout: everything inside sees `theme.layout` with the page's
|
|
443
|
+
* values merged on top - `View`, `Flex` and `Grid` with `layout`, and `useTheme().layout`. It
|
|
444
|
+
* derives the theme from the one around it and changes nothing else, so colours, light/dark
|
|
445
|
+
* switching and every other token stay the app theme's. Nested providers stack.
|
|
446
|
+
*/
|
|
447
|
+
function LayoutProvider({ layout, children }) {
|
|
448
|
+
const derive = (0, react.useCallback)((outer) => {
|
|
449
|
+
const theme = "breakpoints" in outer ? outer : baseTheme;
|
|
450
|
+
return createTheme(theme, { layout: pageLayout(theme, layout) });
|
|
451
|
+
}, [layout]);
|
|
452
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_emotion_react.ThemeProvider, {
|
|
453
|
+
theme: derive,
|
|
454
|
+
children
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
//#endregion
|
|
425
458
|
//#region src/theme/hooks/useTheme.ts
|
|
426
459
|
/**
|
|
427
460
|
* The active theme, typed as this package's own `Theme` - Emotion is an
|
|
@@ -451,6 +484,12 @@ function withTheme(WrappedComponent) {
|
|
|
451
484
|
};
|
|
452
485
|
}
|
|
453
486
|
//#endregion
|
|
487
|
+
Object.defineProperty(exports, "LayoutProvider", {
|
|
488
|
+
enumerable: true,
|
|
489
|
+
get: function() {
|
|
490
|
+
return LayoutProvider;
|
|
491
|
+
}
|
|
492
|
+
});
|
|
454
493
|
Object.defineProperty(exports, "ThemeProvider", {
|
|
455
494
|
enumerable: true,
|
|
456
495
|
get: function() {
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
-
const spacing = (units) => `${8 * units}px`;
|
|
7
|
+
const spacing = (units) => units === 0 ? "0px" : `${Math.max(1, Math.round(8 * units))}px`;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/theme/breakpoints.ts
|
|
10
10
|
/**
|
|
@@ -157,9 +157,14 @@ const sizes = {
|
|
|
157
157
|
};
|
|
158
158
|
const space = {
|
|
159
159
|
0: 0,
|
|
160
|
+
.125: spacing(.125),
|
|
161
|
+
.25: spacing(.25),
|
|
160
162
|
.5: spacing(.5),
|
|
163
|
+
.75: spacing(.75),
|
|
161
164
|
1: spacing(1),
|
|
165
|
+
1.25: spacing(1.25),
|
|
162
166
|
1.5: spacing(1.5),
|
|
167
|
+
1.75: spacing(1.75),
|
|
163
168
|
2: spacing(2),
|
|
164
169
|
3: spacing(3),
|
|
165
170
|
4: spacing(4),
|
|
@@ -422,6 +427,34 @@ function ThemeProvider({ children, theme = baseTheme, defaults }) {
|
|
|
422
427
|
});
|
|
423
428
|
}
|
|
424
429
|
//#endregion
|
|
430
|
+
//#region src/theme/LayoutProvider.tsx
|
|
431
|
+
const pageLayout = (theme, layout) => {
|
|
432
|
+
const page = layout;
|
|
433
|
+
let carried = {};
|
|
434
|
+
const merged = {};
|
|
435
|
+
for (const key of Object.keys(theme.breakpoints)) {
|
|
436
|
+
carried = deepMerge(carried, page[key] ?? {});
|
|
437
|
+
if (Object.keys(carried).length > 0) merged[key] = carried;
|
|
438
|
+
}
|
|
439
|
+
return merged;
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* @description A page-level layout: everything inside sees `theme.layout` with the page's
|
|
443
|
+
* values merged on top - `View`, `Flex` and `Grid` with `layout`, and `useTheme().layout`. It
|
|
444
|
+
* derives the theme from the one around it and changes nothing else, so colours, light/dark
|
|
445
|
+
* switching and every other token stay the app theme's. Nested providers stack.
|
|
446
|
+
*/
|
|
447
|
+
function LayoutProvider({ layout, children }) {
|
|
448
|
+
const derive = useCallback((outer) => {
|
|
449
|
+
const theme = "breakpoints" in outer ? outer : baseTheme;
|
|
450
|
+
return createTheme(theme, { layout: pageLayout(theme, layout) });
|
|
451
|
+
}, [layout]);
|
|
452
|
+
return /* @__PURE__ */ jsx(EmotionThemeProvider, {
|
|
453
|
+
theme: derive,
|
|
454
|
+
children
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
//#endregion
|
|
425
458
|
//#region src/theme/hooks/useTheme.ts
|
|
426
459
|
/**
|
|
427
460
|
* The active theme, typed as this package's own `Theme` - Emotion is an
|
|
@@ -451,4 +484,4 @@ function withTheme(WrappedComponent) {
|
|
|
451
484
|
};
|
|
452
485
|
}
|
|
453
486
|
//#endregion
|
|
454
|
-
export {
|
|
487
|
+
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-
|
|
3
|
+
const require_theme = require("./theme-BXlAP3xf.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-
|
|
2
|
-
import { a as
|
|
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-Kbk9h5cN.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-CrN4MSUF.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-
|
|
2
|
-
import { a as
|
|
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-RX2UX5gD.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-VOsBSWEu.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
|
|
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-CDVxig_g.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 };
|
|
@@ -172,9 +172,14 @@ interface ThemeLetterSpacings {
|
|
|
172
172
|
interface ThemeSpace {
|
|
173
173
|
auto: string;
|
|
174
174
|
0: number | string;
|
|
175
|
+
0.125: number | string;
|
|
176
|
+
0.25: number | string;
|
|
175
177
|
0.5: number | string;
|
|
178
|
+
0.75: number | string;
|
|
176
179
|
1: number | string;
|
|
180
|
+
1.25: number | string;
|
|
177
181
|
1.5: number | string;
|
|
182
|
+
1.75: number | string;
|
|
178
183
|
2: number | string;
|
|
179
184
|
3: number | string;
|
|
180
185
|
4: number | string;
|
|
@@ -229,7 +234,7 @@ interface DefaultBreakpoints {
|
|
|
229
234
|
interface BreakpointOverrides {}
|
|
230
235
|
type RemovedBreakpoints = keyof { [K in keyof BreakpointOverrides as BreakpointOverrides[K] extends false ? K : never]: true; };
|
|
231
236
|
/** 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
|
|
237
|
+
type BreakpointKey = Exclude<keyof (Omit<DefaultBreakpoints, keyof BreakpointOverrides> & BreakpointOverrides), RemovedBreakpoints>;
|
|
233
238
|
/**
|
|
234
239
|
* `theme.breakpoints`: where each window class starts, ascending, in declared order. A key holds
|
|
235
240
|
* from its value until the next key, so `xs: '0px'` applies everywhere until `sm` overrides it;
|
|
@@ -172,9 +172,14 @@ interface ThemeLetterSpacings {
|
|
|
172
172
|
interface ThemeSpace {
|
|
173
173
|
auto: string;
|
|
174
174
|
0: number | string;
|
|
175
|
+
0.125: number | string;
|
|
176
|
+
0.25: number | string;
|
|
175
177
|
0.5: number | string;
|
|
178
|
+
0.75: number | string;
|
|
176
179
|
1: number | string;
|
|
180
|
+
1.25: number | string;
|
|
177
181
|
1.5: number | string;
|
|
182
|
+
1.75: number | string;
|
|
178
183
|
2: number | string;
|
|
179
184
|
3: number | string;
|
|
180
185
|
4: number | string;
|
|
@@ -229,7 +234,7 @@ interface DefaultBreakpoints {
|
|
|
229
234
|
interface BreakpointOverrides {}
|
|
230
235
|
type RemovedBreakpoints = keyof { [K in keyof BreakpointOverrides as BreakpointOverrides[K] extends false ? K : never]: true; };
|
|
231
236
|
/** 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
|
|
237
|
+
type BreakpointKey = Exclude<keyof (Omit<DefaultBreakpoints, keyof BreakpointOverrides> & BreakpointOverrides), RemovedBreakpoints>;
|
|
233
238
|
/**
|
|
234
239
|
* `theme.breakpoints`: where each window class starts, ascending, in declared order. A key holds
|
|
235
240
|
* 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-
|
|
1
|
+
import { n as TableSortLabelDirection } from "./index-nc4Sxiy9.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 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TableSortLabelDirection } from "./index-
|
|
1
|
+
import { n as TableSortLabelDirection } from "./index-DNwF3DUX.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 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soroush.tech/design-system",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.0",
|
|
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-
|
|
490
|
+
"@soroush.tech/styled-system": "^6.0.0-rc.0"
|
|
481
491
|
},
|
|
482
492
|
"peerDependencies": {
|
|
483
493
|
"react": "^19.2.8",
|