@soroush.tech/design-system 1.3.2 → 2.0.0-alpha.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 +72 -37
- package/dist/AppBar.cjs +5 -1
- package/dist/AppBar.d.cts +6 -6
- package/dist/AppBar.d.mts +6 -6
- package/dist/AppBar.mjs +5 -1
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.d.cts +6 -6
- package/dist/Avatar.d.mts +6 -6
- package/dist/Avatar.mjs +2 -2
- package/dist/Backdrop.cjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Backdrop.mjs +1 -1
- package/dist/Button.cjs +2 -2
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +2 -2
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/ButtonGroup.mjs +1 -1
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +3 -3
- package/dist/Checkbox.cjs +1 -1
- package/dist/Checkbox.d.cts +2 -2
- package/dist/Checkbox.d.mts +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/CircularProgress.cjs +1 -1
- package/dist/CircularProgress.d.cts +6 -6
- package/dist/CircularProgress.d.mts +6 -6
- package/dist/CircularProgress.mjs +1 -1
- package/dist/Drawer.cjs +2 -2
- package/dist/Drawer.d.cts +3 -3
- package/dist/Drawer.d.mts +3 -3
- package/dist/Drawer.mjs +2 -2
- package/dist/Flex.cjs +1 -1
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +1 -1
- package/dist/FocusTrap.cjs +1 -1
- package/dist/FocusTrap.mjs +1 -1
- package/dist/Form.cjs +2 -2
- package/dist/Form.d.cts +5 -5
- package/dist/Form.d.mts +5 -5
- package/dist/Form.mjs +2 -2
- package/dist/FormControl.cjs +2 -2
- package/dist/FormControl.d.cts +8 -8
- package/dist/FormControl.d.mts +8 -8
- package/dist/FormControl.mjs +2 -2
- package/dist/FormHelperText.cjs +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormHelperText.mjs +1 -1
- package/dist/FormLabel.cjs +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/FormLabel.mjs +1 -1
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.d.cts +1 -15
- package/dist/Grid.d.mts +1 -15
- package/dist/Grid.mjs +1 -1
- package/dist/{Icon-ByDvM-t1.cjs → Icon-CKLBJ7CC.cjs} +2 -2
- package/dist/{Icon-CU_nUmsU.mjs → Icon-CkQGOBmm.mjs} +2 -2
- 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.cjs +1 -1
- package/dist/Image.d.cts +3 -3
- package/dist/Image.d.mts +3 -3
- package/dist/Image.mjs +1 -1
- package/dist/LinearProgress.cjs +1 -1
- package/dist/LinearProgress.d.cts +5 -5
- package/dist/LinearProgress.d.mts +5 -5
- package/dist/LinearProgress.mjs +1 -1
- package/dist/Link.cjs +2 -2
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Link.mjs +2 -2
- package/dist/MenuItem.cjs +3 -3
- package/dist/MenuItem.d.cts +9 -9
- package/dist/MenuItem.d.mts +9 -9
- package/dist/MenuItem.mjs +3 -3
- package/dist/{Modal-Bjfv7n4e.cjs → Modal-CApyh_V5.cjs} +2 -2
- package/dist/{Modal-Bv-mf8Fn.mjs → Modal-CYNcPk-2.mjs} +2 -2
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NativeSelect.cjs +3 -3
- package/dist/NativeSelect.d.cts +12 -12
- package/dist/NativeSelect.d.mts +12 -12
- package/dist/NativeSelect.mjs +3 -3
- package/dist/PageLayout/LayoutGrid.cjs +21 -0
- package/dist/PageLayout/LayoutGrid.d.cts +22 -0
- package/dist/PageLayout/LayoutGrid.d.mts +22 -0
- package/dist/PageLayout/LayoutGrid.mjs +20 -0
- package/dist/PageLayout/PageLayout.cjs +148 -0
- package/dist/PageLayout/PageLayout.d.cts +31 -0
- package/dist/PageLayout/PageLayout.d.mts +31 -0
- package/dist/PageLayout/PageLayout.mjs +147 -0
- package/dist/PageLayout.cjs +7 -0
- package/dist/PageLayout.d.cts +19 -0
- package/dist/PageLayout.d.mts +19 -0
- package/dist/PageLayout.mjs +4 -0
- package/dist/PageLayoutContext-DjJ1_7Xc.mjs +5 -0
- package/dist/PageLayoutContext-agXGhegE.cjs +9 -0
- package/dist/Pagination/PaginationItem.cjs +3 -3
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +3 -3
- package/dist/Pagination.cjs +2 -2
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Pagination.mjs +2 -2
- package/dist/Paper.cjs +2 -2
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +2 -2
- package/dist/{Popover-CH3yI-j-.mjs → Popover-DWOrf7sy.mjs} +4 -4
- package/dist/{Popover-COoJ2p2I.cjs → Popover-Dz6h3A_9.cjs} +4 -4
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +7 -7
- package/dist/Popover.d.mts +7 -7
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.cjs +1 -1
- package/dist/Portal.d.cts +1 -1
- package/dist/Portal.d.mts +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Pressable.cjs +4 -4
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Pressable.mjs +4 -4
- package/dist/Quote.cjs +2 -2
- package/dist/Quote.d.cts +4 -4
- package/dist/Quote.d.mts +4 -4
- package/dist/Quote.mjs +2 -2
- package/dist/Radio.cjs +1 -1
- package/dist/Radio.d.cts +3 -3
- package/dist/Radio.d.mts +3 -3
- package/dist/Radio.mjs +1 -1
- package/dist/Select.cjs +4 -4
- package/dist/Select.d.cts +11 -11
- package/dist/Select.d.mts +11 -11
- package/dist/Select.mjs +4 -4
- package/dist/Sidebar/Sidebar.cjs +29 -10
- package/dist/Sidebar/Sidebar.d.cts +16 -13
- package/dist/Sidebar/Sidebar.d.mts +16 -13
- package/dist/Sidebar/Sidebar.mjs +30 -11
- package/dist/Sidebar/SidebarItem.cjs +5 -4
- package/dist/Sidebar/SidebarItem.d.cts +13 -13
- package/dist/Sidebar/SidebarItem.d.mts +13 -13
- package/dist/Sidebar/SidebarItem.mjs +5 -4
- package/dist/Sidebar.d.cts +1 -1
- package/dist/Sidebar.d.mts +1 -1
- package/dist/{SidebarContext-ao6lRfTX.d.cts → SidebarContext-B1lWrt77.d.cts} +4 -4
- package/dist/{SidebarContext-ao6lRfTX.d.mts → SidebarContext-B1lWrt77.d.mts} +4 -4
- package/dist/Skeleton.cjs +1 -1
- package/dist/Skeleton.d.cts +3 -3
- package/dist/Skeleton.d.mts +3 -3
- package/dist/Skeleton.mjs +1 -1
- package/dist/Switch.cjs +2 -2
- package/dist/Switch.d.cts +5 -5
- package/dist/Switch.d.mts +5 -5
- package/dist/Switch.mjs +2 -2
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.d.cts +14 -14
- package/dist/Table/Table.d.mts +14 -14
- package/dist/Table/Table.mjs +1 -1
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.d.cts +6 -6
- package/dist/Table/TableBody.d.mts +6 -6
- package/dist/Table/TableBody.mjs +1 -1
- package/dist/Table/TableCell.cjs +1 -1
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableCell.mjs +1 -1
- package/dist/Table/TableContainer.cjs +2 -2
- package/dist/Table/TableContainer.d.cts +4 -4
- package/dist/Table/TableContainer.d.mts +4 -4
- package/dist/Table/TableContainer.mjs +2 -2
- package/dist/Table/TableControl.cjs +1 -1
- package/dist/Table/TableControl.d.cts +7 -7
- package/dist/Table/TableControl.d.mts +7 -7
- package/dist/Table/TableControl.mjs +1 -1
- package/dist/Table/TableFooter.cjs +1 -1
- package/dist/Table/TableFooter.d.cts +6 -6
- package/dist/Table/TableFooter.d.mts +6 -6
- package/dist/Table/TableFooter.mjs +1 -1
- package/dist/Table/TableHead.cjs +1 -1
- package/dist/Table/TableHead.d.cts +6 -6
- package/dist/Table/TableHead.d.mts +6 -6
- package/dist/Table/TableHead.mjs +1 -1
- package/dist/Table/TablePagination.cjs +3 -3
- package/dist/Table/TablePagination.d.cts +4 -4
- package/dist/Table/TablePagination.d.mts +4 -4
- package/dist/Table/TablePagination.mjs +3 -3
- package/dist/Table/TablePaginationActions.cjs +2 -2
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +2 -2
- package/dist/Table/TableRow.cjs +1 -1
- package/dist/Table/TableRow.d.cts +7 -7
- package/dist/Table/TableRow.d.mts +7 -7
- package/dist/Table/TableRow.mjs +1 -1
- package/dist/Table/TableSortLabel.cjs +2 -2
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +2 -2
- package/dist/Table/hooks.cjs +5 -5
- package/dist/Table/hooks.d.cts +5 -5
- package/dist/Table/hooks.d.mts +5 -5
- package/dist/Table/hooks.mjs +5 -5
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-BoOxdk8p.d.cts → TableContext-DBOk01Xl.d.mts} +2 -2
- package/dist/{TableContext-DV31j6HO.d.mts → TableContext-DRAhXvq3.d.cts} +2 -2
- package/dist/TextInput.cjs +2 -2
- package/dist/TextInput.d.cts +10 -10
- package/dist/TextInput.d.mts +10 -10
- package/dist/TextInput.mjs +2 -2
- package/dist/ToggleButton/ToggleButton.cjs +2 -2
- package/dist/ToggleButton/ToggleButton.d.cts +3 -3
- package/dist/ToggleButton/ToggleButton.d.mts +3 -3
- package/dist/ToggleButton/ToggleButton.mjs +2 -2
- package/dist/ToggleButton/ToggleButtonGroup.cjs +3 -3
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.mjs +3 -3
- package/dist/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton.d.mts +1 -1
- package/dist/{ToggleButtonGroupContext-CqD-Afho.d.cts → ToggleButtonGroupContext-10jEsQdg.d.cts} +2 -2
- package/dist/{ToggleButtonGroupContext-CqD-Afho.d.mts → ToggleButtonGroupContext-10jEsQdg.d.mts} +2 -2
- package/dist/Typography.cjs +2 -2
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +2 -2
- package/dist/View.cjs +1 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +1 -1
- package/dist/engine.cjs +2 -2
- package/dist/engine.d.cts +3 -3
- package/dist/engine.d.mts +3 -3
- package/dist/engine.mjs +2 -2
- package/dist/{index-CrXLEJO4.d.mts → index-8mHoIUt5.d.mts} +8 -8
- package/dist/{index-DLUE7t3O.d.cts → index-B41OXLX8.d.mts} +4 -4
- package/dist/{index-X4STXeE2.d.cts → index-B6vxRNLt.d.cts} +14 -14
- package/dist/{index-BBWtMvkm.d.cts → index-B8KscJic.d.cts} +3 -3
- package/dist/{index-MsUtFRul.d.cts → index-BDD-L8uL.d.cts} +3 -3
- package/dist/{index-BW-9sqFG.d.cts → index-BGD4OzzG.d.cts} +6 -6
- package/dist/index-BJ5Tsf7u.d.cts +16 -0
- package/dist/{index-n2OyTMr6.d.mts → index-BMJ3tyIw.d.cts} +4 -4
- package/dist/{index-CbGfrKZi.d.mts → index-BNpkmtaM.d.mts} +6 -6
- package/dist/{index-CKz1lEdR.d.mts → index-BSR9zrAA.d.mts} +6 -6
- package/dist/index-BnFxdnEL.d.mts +16 -0
- package/dist/{index-BYYEoNec.d.cts → index-CCrocxBL.d.cts} +6 -6
- package/dist/{index-q9peil7T.d.mts → index-CEqa8xx8.d.mts} +7 -7
- package/dist/{index-CiShdd2j.d.cts → index-CLttbRhG.d.cts} +8 -8
- package/dist/{index-DfhMdqqI.d.mts → index-CVb5zbas.d.mts} +14 -14
- package/dist/{index-DEEHBUUZ.d.cts → index-Cjlax0-f.d.mts} +4 -4
- package/dist/{index-BoOs5h_b.d.mts → index-CoHrw2p7.d.mts} +3 -3
- package/dist/{index-CCfnnT2l.d.cts → index-CohgpyUj.d.cts} +7 -7
- package/dist/{index-CSXMCqrV.d.cts → index-CtrxW81j.d.cts} +8 -8
- package/dist/{index-m9jUR509.d.mts → index-CvWslVk6.d.cts} +9 -9
- package/dist/{index-3hPS6Lm8.d.mts → index-CzmA09Yf.d.mts} +8 -8
- package/dist/{index-uH0EeDBZ.d.cts → index-D4i9vrQM.d.mts} +12 -12
- package/dist/{index-DkPJUFzd.d.cts → index-DNNg9RoR.d.cts} +5 -5
- package/dist/{index-B0xTqpvt.d.mts → index-DPHwCZYf.d.cts} +4 -4
- package/dist/{index-2QPYJgCl.d.cts → index-DkJzi96w.d.cts} +7 -7
- package/dist/{index-D07y72Xr.d.mts → index-DsKd9VW5.d.mts} +7 -7
- package/dist/{index-CohsoGjZ.d.cts → index-DuefjNlC.d.mts} +7 -7
- package/dist/{index-DGku7hLP.d.mts → index-EYR0z1Qv.d.cts} +4 -4
- package/dist/{index-hcZwhQmR.d.mts → index-IEvuh6Cd.d.mts} +5 -5
- package/dist/{index-BAfSyQaP.d.mts → index-S3NZS-Qp.d.cts} +12 -12
- package/dist/{index-DxBKLmUS.d.mts → index-bN91IhZi.d.cts} +7 -7
- package/dist/{index-CTYZyQ2g.d.mts → index-qtKJ56yu.d.mts} +3 -3
- package/dist/{index-D_AwmCU5.d.cts → index-r2avCy1z.d.mts} +4 -4
- package/dist/{index-BPzvFTi5.d.cts → index-tv-TGYSG.d.mts} +9 -9
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/layoutStyles-B4Z1K6HZ.cjs +67 -0
- package/dist/layoutStyles-f0ISNjsC.mjs +56 -0
- package/dist/{src-D3tHU94W.mjs → src-DLGYOJMh.mjs} +1 -1
- package/dist/{src-BJrcLd7P.cjs → src-DU81aGy9.cjs} +1 -1
- 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/{theme-Cudynq5K.mjs → theme-BQGlZoma.mjs} +53 -5
- package/dist/{theme-CleLAV6A.cjs → theme-BmEAXmwh.cjs} +64 -4
- package/dist/theme.cjs +3 -1
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.mjs +2 -2
- package/dist/{themes-CUV79qWU.d.cts → themes-9YNnlVyY.d.cts} +90 -21
- package/dist/{themes-CUV79qWU.d.mts → themes-9YNnlVyY.d.mts} +90 -21
- package/dist/{useTablePagination--XtCc2YL.d.cts → useTablePagination-CLoac5oX.d.cts} +6 -6
- package/dist/{useTablePagination-RgVhJs-7.d.mts → useTablePagination-RelVsdMR.d.mts} +6 -6
- package/package.json +15 -5
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { n as FlexProps } from "../index-
|
|
2
|
-
import { i as SidebarItemVariant, t as SidebarAnchor } from "../SidebarContext-
|
|
1
|
+
import { n as FlexProps } from "../index-B41OXLX8.mjs";
|
|
2
|
+
import { i as SidebarItemVariant, t as SidebarAnchor } from "../SidebarContext-B1lWrt77.mjs";
|
|
3
3
|
import { ElementType, ReactNode } from "react";
|
|
4
4
|
//#region src/Sidebar/Sidebar/Sidebar.d.ts
|
|
5
5
|
interface SidebarProps extends FlexProps {
|
|
6
6
|
/**
|
|
7
|
-
* Rail contents
|
|
8
|
-
* a footer, dividers,
|
|
7
|
+
* Rail contents - `SidebarItem`s, but any node composes (a sponsor logo,
|
|
8
|
+
* a footer, dividers, ...). Items read the open state from `SidebarContext`.
|
|
9
9
|
*/
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
/**
|
|
12
|
-
* Whether item labels are shown. Controlled
|
|
12
|
+
* Whether item labels are shown. Controlled - the toggle lives with the
|
|
13
13
|
* consumer (typically a menu button in the app bar).
|
|
14
14
|
*/
|
|
15
15
|
isOpen: boolean;
|
|
16
|
-
/** Screen edge the rail hugs
|
|
16
|
+
/** Screen edge the rail hugs - labels render away from it. Default: `'left'`. */
|
|
17
17
|
anchor?: SidebarAnchor;
|
|
18
|
-
/** Default variant for every item
|
|
18
|
+
/** Default variant for every item - an item's own `variant` wins. Default: `'text'`. */
|
|
19
19
|
variant?: SidebarItemVariant;
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Rail width while open. Default: `'14rem'`. In a `PageLayout` panel, with neither
|
|
22
|
+
* width set, the rail fills the panel's track instead.
|
|
23
|
+
*/
|
|
21
24
|
expandedWidth?: string;
|
|
22
25
|
/** Rail width while collapsed (icons only). Default: `'3.5rem'`. */
|
|
23
26
|
collapsedWidth?: string;
|
|
@@ -30,7 +33,7 @@ interface SidebarProps extends FlexProps {
|
|
|
30
33
|
/** Width of the panel column. Only meaningful with `hasPanel`. Default: `'18rem'`. */
|
|
31
34
|
panelWidth?: string;
|
|
32
35
|
/**
|
|
33
|
-
* Props for the panel column
|
|
36
|
+
* Props for the panel column - any `Flex` prop, plus `as` to change its
|
|
34
37
|
* element. Overrides `panelWidth` and the derived `aria-label`; its `id` and
|
|
35
38
|
* ref stay owned by the rail, which needs them as the port target and the
|
|
36
39
|
* `aria-controls` anchor.
|
|
@@ -38,18 +41,18 @@ interface SidebarProps extends FlexProps {
|
|
|
38
41
|
panelProps?: Omit<FlexProps, 'children' | 'id'> & {
|
|
39
42
|
as?: ElementType;
|
|
40
43
|
};
|
|
41
|
-
/** Accessible name of the navigation landmark
|
|
44
|
+
/** Accessible name of the navigation landmark - required so multiple navs stay distinguishable. */
|
|
42
45
|
'aria-label': string;
|
|
43
46
|
}
|
|
44
47
|
/**
|
|
45
48
|
* A collapsible vertical icon rail: collapsed it shows icon-only items; open
|
|
46
49
|
* it also shows each item's label, rendered away from the anchored edge.
|
|
47
|
-
* Purely controlled via `isOpen`
|
|
50
|
+
* Purely controlled via `isOpen` - pair it with a menu button wherever your
|
|
48
51
|
* layout keeps one (usually the app bar). Children consume the state through
|
|
49
|
-
* `SidebarContext`, and any `Flex` prop (`bg`, spacing,
|
|
52
|
+
* `SidebarContext`, and any `Flex` prop (`bg`, spacing, ...) applies to the rail.
|
|
50
53
|
*
|
|
51
54
|
* With `hasPanel`, the rail gains a second column and the selected item's
|
|
52
|
-
* `children` render there instead of inside its row
|
|
55
|
+
* `children` render there instead of inside its row - an icon rail beside a
|
|
53
56
|
* detail panel. The panel appears only when the selected item has children, and
|
|
54
57
|
* is independent of `isOpen`, so a collapsed icons-only rail can sit beside an
|
|
55
58
|
* open panel.
|
package/dist/Sidebar/Sidebar.mjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { o as styled } from "../src-
|
|
1
|
+
import { o as styled } from "../src-DLGYOJMh.mjs";
|
|
2
2
|
import { Flex } from "../Flex.mjs";
|
|
3
|
+
import { t as PageLayoutContext } from "../PageLayoutContext-DjJ1_7Xc.mjs";
|
|
4
|
+
import { n as layoutStyles, t as layoutLength } from "../layoutStyles-f0ISNjsC.mjs";
|
|
3
5
|
import { t as SidebarContext } from "../SidebarContext-DgSLwjur.mjs";
|
|
4
|
-
import { useId, useMemo, useState } from "react";
|
|
6
|
+
import { useContext, useId, useMemo, useState } from "react";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
//#region src/Sidebar/Sidebar/Sidebar.tsx
|
|
9
|
+
const hideLabels = { "[data-sidebar-item-content] > :not(:first-child)": { display: "none" } };
|
|
7
10
|
const SidebarRoot = styled(Flex, {
|
|
8
11
|
name: "Sidebar",
|
|
9
12
|
label: "Sidebar"
|
|
@@ -12,13 +15,21 @@ const SidebarRail = styled(Flex, {
|
|
|
12
15
|
name: "Sidebar",
|
|
13
16
|
slot: "rail",
|
|
14
17
|
label: "SidebarRail",
|
|
15
|
-
shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "expandedWidth" && prop !== "collapsedWidth"
|
|
16
|
-
})(({ isOpen, expandedWidth, collapsedWidth }) =>
|
|
18
|
+
shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "expandedWidth" && prop !== "collapsedWidth" && prop !== "panelSide"
|
|
19
|
+
})(({ theme, isOpen, expandedWidth, collapsedWidth, panelSide }) => panelSide ? {
|
|
20
|
+
width: "100%",
|
|
21
|
+
overflowX: "hidden",
|
|
22
|
+
containerType: "inline-size",
|
|
23
|
+
...layoutStyles(theme, ({ panels }) => {
|
|
24
|
+
const width = panels[panelSide]?.width;
|
|
25
|
+
return width === void 0 ? {} : { [`@container (width < ${layoutLength(theme, width)})`]: hideLabels };
|
|
26
|
+
})
|
|
27
|
+
} : {
|
|
17
28
|
width: isOpen ? expandedWidth : collapsedWidth,
|
|
18
29
|
transition: "width 200ms ease",
|
|
19
30
|
overflowX: "hidden",
|
|
20
31
|
"@media (prefers-reduced-motion: reduce)": { transition: "none" }
|
|
21
|
-
})
|
|
32
|
+
});
|
|
22
33
|
const SidebarPanelRoot = styled(Flex, {
|
|
23
34
|
name: "Sidebar",
|
|
24
35
|
slot: "panel",
|
|
@@ -32,17 +43,20 @@ const SidebarPanelRoot = styled(Flex, {
|
|
|
32
43
|
/**
|
|
33
44
|
* A collapsible vertical icon rail: collapsed it shows icon-only items; open
|
|
34
45
|
* it also shows each item's label, rendered away from the anchored edge.
|
|
35
|
-
* Purely controlled via `isOpen`
|
|
46
|
+
* Purely controlled via `isOpen` - pair it with a menu button wherever your
|
|
36
47
|
* layout keeps one (usually the app bar). Children consume the state through
|
|
37
|
-
* `SidebarContext`, and any `Flex` prop (`bg`, spacing,
|
|
48
|
+
* `SidebarContext`, and any `Flex` prop (`bg`, spacing, ...) applies to the rail.
|
|
38
49
|
*
|
|
39
50
|
* With `hasPanel`, the rail gains a second column and the selected item's
|
|
40
|
-
* `children` render there instead of inside its row
|
|
51
|
+
* `children` render there instead of inside its row - an icon rail beside a
|
|
41
52
|
* detail panel. The panel appears only when the selected item has children, and
|
|
42
53
|
* is independent of `isOpen`, so a collapsed icons-only rail can sit beside an
|
|
43
54
|
* open panel.
|
|
44
55
|
*/
|
|
45
|
-
function Sidebar({ children, isOpen, anchor = "left", variant = "text", expandedWidth
|
|
56
|
+
function Sidebar({ children, isOpen, anchor = "left", variant = "text", expandedWidth, collapsedWidth, hasPanel = false, panelWidth = "18rem", panelProps, "aria-label": ariaLabel, ...rest }) {
|
|
57
|
+
const region = useContext(PageLayoutContext);
|
|
58
|
+
const isSized = expandedWidth !== void 0 || collapsedWidth !== void 0;
|
|
59
|
+
const panelSide = region?.region === "panel" && !isSized ? region.side : void 0;
|
|
46
60
|
const panelId = useId();
|
|
47
61
|
const [panelNode, setPanelNode] = useState(null);
|
|
48
62
|
const [panelLabel, setPanelLabel] = useState(null);
|
|
@@ -67,14 +81,19 @@ function Sidebar({ children, isOpen, anchor = "left", variant = "text", expanded
|
|
|
67
81
|
"aria-label": ariaLabel,
|
|
68
82
|
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
69
83
|
flexShrink: 0,
|
|
84
|
+
...panelSide && {
|
|
85
|
+
width: "100%",
|
|
86
|
+
height: "100%"
|
|
87
|
+
},
|
|
70
88
|
...rest,
|
|
71
89
|
children: [/* @__PURE__ */ jsx(SidebarRail, {
|
|
72
90
|
flexDirection: "column",
|
|
73
91
|
gap: 1,
|
|
74
92
|
flexShrink: 0,
|
|
75
93
|
isOpen,
|
|
76
|
-
expandedWidth,
|
|
77
|
-
collapsedWidth,
|
|
94
|
+
expandedWidth: expandedWidth ?? "14rem",
|
|
95
|
+
collapsedWidth: collapsedWidth ?? "3.5rem",
|
|
96
|
+
panelSide,
|
|
78
97
|
children: /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
79
98
|
value: context,
|
|
80
99
|
children
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
2
|
+
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
3
|
const require_Flex = require("../Flex.cjs");
|
|
4
4
|
const require_utils = require("../utils.cjs");
|
|
5
5
|
const require_Typography = require("../Typography.cjs");
|
|
6
|
-
const require_Icon = require("../Icon-
|
|
6
|
+
const require_Icon = require("../Icon-CKLBJ7CC.cjs");
|
|
7
7
|
const require_Portal = require("../Portal.cjs");
|
|
8
8
|
const require_Pressable = require("../Pressable.cjs");
|
|
9
9
|
const require_SidebarContext = require("../SidebarContext-jG6OioC-.cjs");
|
|
@@ -61,10 +61,10 @@ const SidebarItemRoot = require_src.styled(require_Pressable.Pressable, {
|
|
|
61
61
|
})(densityStyles, layoutStyles, stateStyles);
|
|
62
62
|
/**
|
|
63
63
|
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
64
|
-
* shown while the rail is open
|
|
64
|
+
* shown while the rail is open - the `label` by default, or custom `children`
|
|
65
65
|
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
66
66
|
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
67
|
-
* here
|
|
67
|
+
* here - no inherited uppercase, weight, or tracking.
|
|
68
68
|
*/
|
|
69
69
|
function SidebarItem({ icon, label, variant, size = "sm", color = "primary", children, onSelect, onClick, isSelected, ...rest }) {
|
|
70
70
|
const { isOpen, anchor, variant: railVariant, hasPanel, panelId, panelNode, setPanelLabel } = (0, react.useContext)(require_SidebarContext.SidebarContext);
|
|
@@ -101,6 +101,7 @@ function SidebarItem({ icon, label, variant, size = "sm", color = "primary", chi
|
|
|
101
101
|
...rest,
|
|
102
102
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Flex.Flex, {
|
|
103
103
|
as: "span",
|
|
104
|
+
"data-sidebar-item-content": "",
|
|
104
105
|
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
105
106
|
alignItems: "center",
|
|
106
107
|
gap: 2,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-
|
|
3
|
-
import { r as IconName } from "../index-
|
|
4
|
-
import { i as PressableProps } from "../index-
|
|
5
|
-
import { i as SidebarItemVariant } from "../SidebarContext-
|
|
1
|
+
import { S as Theme } from "../themes-9YNnlVyY.cjs";
|
|
2
|
+
import "../index-DkJzi96w.cjs";
|
|
3
|
+
import { r as IconName } from "../index-DPHwCZYf.cjs";
|
|
4
|
+
import { i as PressableProps } from "../index-CtrxW81j.cjs";
|
|
5
|
+
import { i as SidebarItemVariant } from "../SidebarContext-B1lWrt77.cjs";
|
|
6
6
|
import { ReactNode } from "react";
|
|
7
7
|
//#region src/Sidebar/SidebarItem/SidebarItem.d.ts
|
|
8
|
-
/** Density token
|
|
8
|
+
/** Density token - controls padding and font size. Resolves against `theme.sizes`. */
|
|
9
9
|
type SidebarItemSize = keyof Theme['sizes'];
|
|
10
10
|
interface SidebarItemProps extends Omit<PressableProps, 'children' | 'feedback' | 'activeOpacity' | 'size'> {
|
|
11
|
-
/** Icon shown in both the collapsed and open states
|
|
11
|
+
/** Icon shown in both the collapsed and open states - pinned to the anchored edge. */
|
|
12
12
|
icon: IconName;
|
|
13
13
|
/** Accessible name; also the default visible content while open. */
|
|
14
14
|
label: string;
|
|
15
|
-
/** Visual style
|
|
15
|
+
/** Visual style - overrides the enclosing `Sidebar`'s `variant` (default `'text'`). */
|
|
16
16
|
variant?: SidebarItemVariant;
|
|
17
|
-
/** Padding and font size
|
|
17
|
+
/** Padding and font size - resolves against `theme.sizes`. Default: `'sm'`. */
|
|
18
18
|
size?: SidebarItemSize;
|
|
19
|
-
/** Active state
|
|
19
|
+
/** Active state - drives `aria-pressed` and the selected fill. */
|
|
20
20
|
isSelected?: boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Custom open-state content rendered instead of the label text (badges,
|
|
23
|
-
* counts,
|
|
23
|
+
* counts, ...) - or, under the enclosing `Sidebar`'s `hasPanel`, the content of
|
|
24
24
|
* the panel column, shown while this item is selected.
|
|
25
25
|
*/
|
|
26
26
|
children?: ReactNode;
|
|
@@ -29,10 +29,10 @@ interface SidebarItemProps extends Omit<PressableProps, 'children' | 'feedback'
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
32
|
-
* shown while the rail is open
|
|
32
|
+
* shown while the rail is open - the `label` by default, or custom `children`
|
|
33
33
|
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
34
34
|
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
35
|
-
* here
|
|
35
|
+
* here - no inherited uppercase, weight, or tracking.
|
|
36
36
|
*/
|
|
37
37
|
declare function SidebarItem({ icon, label, variant, size, color, children, onSelect, onClick, isSelected, ...rest }: Readonly<SidebarItemProps>): import("react").JSX.Element;
|
|
38
38
|
//#endregion
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-
|
|
3
|
-
import { r as IconName } from "../index-
|
|
4
|
-
import { i as PressableProps } from "../index-
|
|
5
|
-
import { i as SidebarItemVariant } from "../SidebarContext-
|
|
1
|
+
import { S as Theme } from "../themes-9YNnlVyY.mjs";
|
|
2
|
+
import "../index-CEqa8xx8.mjs";
|
|
3
|
+
import { r as IconName } from "../index-r2avCy1z.mjs";
|
|
4
|
+
import { i as PressableProps } from "../index-8mHoIUt5.mjs";
|
|
5
|
+
import { i as SidebarItemVariant } from "../SidebarContext-B1lWrt77.mjs";
|
|
6
6
|
import { ReactNode } from "react";
|
|
7
7
|
//#region src/Sidebar/SidebarItem/SidebarItem.d.ts
|
|
8
|
-
/** Density token
|
|
8
|
+
/** Density token - controls padding and font size. Resolves against `theme.sizes`. */
|
|
9
9
|
type SidebarItemSize = keyof Theme['sizes'];
|
|
10
10
|
interface SidebarItemProps extends Omit<PressableProps, 'children' | 'feedback' | 'activeOpacity' | 'size'> {
|
|
11
|
-
/** Icon shown in both the collapsed and open states
|
|
11
|
+
/** Icon shown in both the collapsed and open states - pinned to the anchored edge. */
|
|
12
12
|
icon: IconName;
|
|
13
13
|
/** Accessible name; also the default visible content while open. */
|
|
14
14
|
label: string;
|
|
15
|
-
/** Visual style
|
|
15
|
+
/** Visual style - overrides the enclosing `Sidebar`'s `variant` (default `'text'`). */
|
|
16
16
|
variant?: SidebarItemVariant;
|
|
17
|
-
/** Padding and font size
|
|
17
|
+
/** Padding and font size - resolves against `theme.sizes`. Default: `'sm'`. */
|
|
18
18
|
size?: SidebarItemSize;
|
|
19
|
-
/** Active state
|
|
19
|
+
/** Active state - drives `aria-pressed` and the selected fill. */
|
|
20
20
|
isSelected?: boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Custom open-state content rendered instead of the label text (badges,
|
|
23
|
-
* counts,
|
|
23
|
+
* counts, ...) - or, under the enclosing `Sidebar`'s `hasPanel`, the content of
|
|
24
24
|
* the panel column, shown while this item is selected.
|
|
25
25
|
*/
|
|
26
26
|
children?: ReactNode;
|
|
@@ -29,10 +29,10 @@ interface SidebarItemProps extends Omit<PressableProps, 'children' | 'feedback'
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
32
|
-
* shown while the rail is open
|
|
32
|
+
* shown while the rail is open - the `label` by default, or custom `children`
|
|
33
33
|
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
34
34
|
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
35
|
-
* here
|
|
35
|
+
* here - no inherited uppercase, weight, or tracking.
|
|
36
36
|
*/
|
|
37
37
|
declare function SidebarItem({ icon, label, variant, size, color, children, onSelect, onClick, isSelected, ...rest }: Readonly<SidebarItemProps>): import("react").JSX.Element;
|
|
38
38
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as src_exports, o as styled } from "../src-
|
|
1
|
+
import { a as src_exports, o as styled } from "../src-DLGYOJMh.mjs";
|
|
2
2
|
import { Flex } from "../Flex.mjs";
|
|
3
3
|
import { alpha } from "../utils.mjs";
|
|
4
4
|
import { Typography } from "../Typography.mjs";
|
|
5
|
-
import { t as Icon } from "../Icon-
|
|
5
|
+
import { t as Icon } from "../Icon-CkQGOBmm.mjs";
|
|
6
6
|
import { Portal } from "../Portal.mjs";
|
|
7
7
|
import { Pressable } from "../Pressable.mjs";
|
|
8
8
|
import { t as SidebarContext } from "../SidebarContext-DgSLwjur.mjs";
|
|
@@ -60,10 +60,10 @@ const SidebarItemRoot = styled(Pressable, {
|
|
|
60
60
|
})(densityStyles, layoutStyles, stateStyles);
|
|
61
61
|
/**
|
|
62
62
|
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
63
|
-
* shown while the rail is open
|
|
63
|
+
* shown while the rail is open - the `label` by default, or custom `children`
|
|
64
64
|
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
65
65
|
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
66
|
-
* here
|
|
66
|
+
* here - no inherited uppercase, weight, or tracking.
|
|
67
67
|
*/
|
|
68
68
|
function SidebarItem({ icon, label, variant, size = "sm", color = "primary", children, onSelect, onClick, isSelected, ...rest }) {
|
|
69
69
|
const { isOpen, anchor, variant: railVariant, hasPanel, panelId, panelNode, setPanelLabel } = useContext(SidebarContext);
|
|
@@ -100,6 +100,7 @@ function SidebarItem({ icon, label, variant, size = "sm", color = "primary", chi
|
|
|
100
100
|
...rest,
|
|
101
101
|
children: /* @__PURE__ */ jsxs(Flex, {
|
|
102
102
|
as: "span",
|
|
103
|
+
"data-sidebar-item-content": "",
|
|
103
104
|
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
104
105
|
alignItems: "center",
|
|
105
106
|
gap: 2,
|
package/dist/Sidebar.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as SidebarItemVariant, n as SidebarContext, r as SidebarContextValue, t as SidebarAnchor } from "./SidebarContext-
|
|
1
|
+
import { i as SidebarItemVariant, n as SidebarContext, r as SidebarContextValue, t as SidebarAnchor } from "./SidebarContext-B1lWrt77.cjs";
|
|
2
2
|
import { Sidebar, SidebarProps } from "./Sidebar/Sidebar.cjs";
|
|
3
3
|
import { SidebarItem, SidebarItemProps, SidebarItemSize } from "./Sidebar/SidebarItem.cjs";
|
|
4
4
|
export { Sidebar, SidebarAnchor, SidebarContext, SidebarContextValue, SidebarItem, SidebarItemProps, SidebarItemSize, SidebarItemVariant, SidebarProps };
|
package/dist/Sidebar.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as SidebarItemVariant, n as SidebarContext, r as SidebarContextValue, t as SidebarAnchor } from "./SidebarContext-
|
|
1
|
+
import { i as SidebarItemVariant, n as SidebarContext, r as SidebarContextValue, t as SidebarAnchor } from "./SidebarContext-B1lWrt77.mjs";
|
|
2
2
|
import { Sidebar, SidebarProps } from "./Sidebar/Sidebar.mjs";
|
|
3
3
|
import { SidebarItem, SidebarItemProps, SidebarItemSize } from "./Sidebar/SidebarItem.mjs";
|
|
4
4
|
export { Sidebar, SidebarAnchor, SidebarContext, SidebarContextValue, SidebarItem, SidebarItemProps, SidebarItemSize, SidebarItemVariant, SidebarProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/Sidebar/SidebarContext.d.ts
|
|
2
|
-
/** Screen edge a `Sidebar` hugs
|
|
2
|
+
/** Screen edge a `Sidebar` hugs - item labels render away from that edge. */
|
|
3
3
|
type SidebarAnchor = 'left' | 'right';
|
|
4
4
|
/**
|
|
5
5
|
* Visual style of a `SidebarItem`: borderless (`text`, default), `outlined`, or
|
|
6
|
-
* `plain`
|
|
6
|
+
* `plain` - no fill and no hover or press feedback, so selection reads through
|
|
7
7
|
* the text color alone.
|
|
8
8
|
*/
|
|
9
9
|
type SidebarItemVariant = 'outlined' | 'text' | 'plain';
|
|
@@ -11,7 +11,7 @@ type SidebarItemVariant = 'outlined' | 'text' | 'plain';
|
|
|
11
11
|
* State provided by `Sidebar` and consumed by `SidebarItem`: whether labels
|
|
12
12
|
* are shown, which side the rail hugs (decides the label side), the rail-wide
|
|
13
13
|
* default item variant (an item's own `variant` wins), and whether the rail
|
|
14
|
-
* renders a panel column
|
|
14
|
+
* renders a panel column - which decides where an item's `children` go.
|
|
15
15
|
*/
|
|
16
16
|
interface SidebarContextValue {
|
|
17
17
|
isOpen: boolean;
|
|
@@ -22,7 +22,7 @@ interface SidebarContextValue {
|
|
|
22
22
|
/** `id` of the panel element, so the selected item can point `aria-controls` at it. */
|
|
23
23
|
panelId?: string;
|
|
24
24
|
/**
|
|
25
|
-
* The panel's DOM node
|
|
25
|
+
* The panel's DOM node - the container the selected item ports its `children`
|
|
26
26
|
* into. `null` until the panel has mounted, and whenever `hasPanel` is off.
|
|
27
27
|
*/
|
|
28
28
|
panelNode?: HTMLElement | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/Sidebar/SidebarContext.d.ts
|
|
2
|
-
/** Screen edge a `Sidebar` hugs
|
|
2
|
+
/** Screen edge a `Sidebar` hugs - item labels render away from that edge. */
|
|
3
3
|
type SidebarAnchor = 'left' | 'right';
|
|
4
4
|
/**
|
|
5
5
|
* Visual style of a `SidebarItem`: borderless (`text`, default), `outlined`, or
|
|
6
|
-
* `plain`
|
|
6
|
+
* `plain` - no fill and no hover or press feedback, so selection reads through
|
|
7
7
|
* the text color alone.
|
|
8
8
|
*/
|
|
9
9
|
type SidebarItemVariant = 'outlined' | 'text' | 'plain';
|
|
@@ -11,7 +11,7 @@ type SidebarItemVariant = 'outlined' | 'text' | 'plain';
|
|
|
11
11
|
* State provided by `Sidebar` and consumed by `SidebarItem`: whether labels
|
|
12
12
|
* are shown, which side the rail hugs (decides the label side), the rail-wide
|
|
13
13
|
* default item variant (an item's own `variant` wins), and whether the rail
|
|
14
|
-
* renders a panel column
|
|
14
|
+
* renders a panel column - which decides where an item's `children` go.
|
|
15
15
|
*/
|
|
16
16
|
interface SidebarContextValue {
|
|
17
17
|
isOpen: boolean;
|
|
@@ -22,7 +22,7 @@ interface SidebarContextValue {
|
|
|
22
22
|
/** `id` of the panel element, so the selected item can point `aria-controls` at it. */
|
|
23
23
|
panelId?: string;
|
|
24
24
|
/**
|
|
25
|
-
* The panel's DOM node
|
|
25
|
+
* The panel's DOM node - the container the selected item ports its `children`
|
|
26
26
|
* into. `null` until the panel has mounted, and whenever `hasPanel` is off.
|
|
27
27
|
*/
|
|
28
28
|
panelNode?: HTMLElement | null;
|
package/dist/Skeleton.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-DU81aGy9.cjs");
|
|
3
3
|
require("react");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
package/dist/Skeleton.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.cjs";
|
|
2
|
+
import "./index-DkJzi96w.cjs";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
import { PaddingProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
//#region src/Skeleton/Skeleton.d.ts
|
|
@@ -9,7 +9,7 @@ type SkeletonRadius = keyof Theme['radii'];
|
|
|
9
9
|
interface SkeletonProps extends HTMLAttributes<HTMLSpanElement>, Omit<SpaceProps<Theme>, keyof PaddingProps> {
|
|
10
10
|
/** Shape of the placeholder. Default: `'text'`. */
|
|
11
11
|
variant?: SkeletonVariant;
|
|
12
|
-
/** Corner radius
|
|
12
|
+
/** Corner radius - resolves against `theme.radii` (sq · sm · md · lg). Overrides the variant default. */
|
|
13
13
|
borderRadius?: SkeletonRadius;
|
|
14
14
|
/** Loading animation. `false` disables it. Default: `'pulse'`. */
|
|
15
15
|
animation?: SkeletonAnimation;
|
package/dist/Skeleton.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.mjs";
|
|
2
|
+
import "./index-CEqa8xx8.mjs";
|
|
3
3
|
import { PaddingProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { HTMLAttributes } from "react";
|
|
5
5
|
//#region src/Skeleton/Skeleton.d.ts
|
|
@@ -9,7 +9,7 @@ type SkeletonRadius = keyof Theme['radii'];
|
|
|
9
9
|
interface SkeletonProps extends HTMLAttributes<HTMLSpanElement>, Omit<SpaceProps<Theme>, keyof PaddingProps> {
|
|
10
10
|
/** Shape of the placeholder. Default: `'text'`. */
|
|
11
11
|
variant?: SkeletonVariant;
|
|
12
|
-
/** Corner radius
|
|
12
|
+
/** Corner radius - resolves against `theme.radii` (sq · sm · md · lg). Overrides the variant default. */
|
|
13
13
|
borderRadius?: SkeletonRadius;
|
|
14
14
|
/** Loading animation. `false` disables it. Default: `'pulse'`. */
|
|
15
15
|
animation?: SkeletonAnimation;
|
package/dist/Skeleton.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as src_exports, i as props, o as styled, r as keyframes, t as createShouldForwardProp } from "./src-
|
|
1
|
+
import { a as src_exports, i as props, o as styled, r as keyframes, t as createShouldForwardProp } from "./src-DLGYOJMh.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/Skeleton/Skeleton.tsx
|
package/dist/Switch.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-DU81aGy9.cjs");
|
|
3
3
|
const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
4
4
|
const require_utils = require("./utils.cjs");
|
|
5
|
-
const require_theme = require("./theme-
|
|
5
|
+
const require_theme = require("./theme-BmEAXmwh.cjs");
|
|
6
6
|
require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
package/dist/Switch.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.cjs";
|
|
2
|
+
import "./index-DkJzi96w.cjs";
|
|
3
3
|
import { ChangeEvent, ReactNode } from "react";
|
|
4
4
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
//#region src/Switch/Switch.d.ts
|
|
@@ -11,7 +11,7 @@ interface SwitchProps extends SpaceProps<Theme> {
|
|
|
11
11
|
checked?: boolean;
|
|
12
12
|
defaultChecked?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
-
/** Accepted for API parity
|
|
14
|
+
/** Accepted for API parity - the design system does not implement ripple. */
|
|
15
15
|
disableRipple?: boolean;
|
|
16
16
|
color?: SwitchColor;
|
|
17
17
|
size?: SwitchSize;
|
|
@@ -19,8 +19,8 @@ interface SwitchProps extends SpaceProps<Theme> {
|
|
|
19
19
|
bg?: keyof Theme['background'];
|
|
20
20
|
/**
|
|
21
21
|
* Shows ✓/✕ indicators.
|
|
22
|
-
* - `"outside"`
|
|
23
|
-
* - `"inside"`
|
|
22
|
+
* - `"outside"` - marks appear as SVG icons inside the thumb.
|
|
23
|
+
* - `"inside"` - marks appear as CSS pseudo-elements in the track.
|
|
24
24
|
* Custom `icon`/`checkedIcon` override the defaults when `marked` is true.
|
|
25
25
|
*/
|
|
26
26
|
marked?: boolean;
|
package/dist/Switch.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.mjs";
|
|
2
|
+
import "./index-CEqa8xx8.mjs";
|
|
3
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ChangeEvent, ReactNode } from "react";
|
|
5
5
|
//#region src/Switch/Switch.d.ts
|
|
@@ -11,7 +11,7 @@ interface SwitchProps extends SpaceProps<Theme> {
|
|
|
11
11
|
checked?: boolean;
|
|
12
12
|
defaultChecked?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
-
/** Accepted for API parity
|
|
14
|
+
/** Accepted for API parity - the design system does not implement ripple. */
|
|
15
15
|
disableRipple?: boolean;
|
|
16
16
|
color?: SwitchColor;
|
|
17
17
|
size?: SwitchSize;
|
|
@@ -19,8 +19,8 @@ interface SwitchProps extends SpaceProps<Theme> {
|
|
|
19
19
|
bg?: keyof Theme['background'];
|
|
20
20
|
/**
|
|
21
21
|
* Shows ✓/✕ indicators.
|
|
22
|
-
* - `"outside"`
|
|
23
|
-
* - `"inside"`
|
|
22
|
+
* - `"outside"` - marks appear as SVG icons inside the thumb.
|
|
23
|
+
* - `"inside"` - marks appear as CSS pseudo-elements in the track.
|
|
24
24
|
* Custom `icon`/`checkedIcon` override the defaults when `marked` is true.
|
|
25
25
|
*/
|
|
26
26
|
marked?: boolean;
|
package/dist/Switch.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-DLGYOJMh.mjs";
|
|
2
2
|
import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
|
|
3
3
|
import { alpha } from "./utils.mjs";
|
|
4
|
-
import { r as useTheme } from "./theme-
|
|
4
|
+
import { r as useTheme } from "./theme-BQGlZoma.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/Switch/Switch.tsx
|
package/dist/Table/Table.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
2
|
+
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
3
|
const require_TableContext = require("../TableContext-Bfg1C3Sr.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/Table/Table.d.cts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-
|
|
3
|
-
import { t as TableCellPadding } from "../TableContext-
|
|
1
|
+
import { S as Theme, v as PaletteColor } from "../themes-9YNnlVyY.cjs";
|
|
2
|
+
import "../index-DkJzi96w.cjs";
|
|
3
|
+
import { t as TableCellPadding } from "../TableContext-DRAhXvq3.cjs";
|
|
4
4
|
import { ElementType, TableHTMLAttributes } from "react";
|
|
5
5
|
import { BorderProps, LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
6
6
|
//#region src/Table/Table/Table.d.ts
|
|
7
|
-
/** Valid values for the bg prop
|
|
7
|
+
/** Valid values for the bg prop - derived from theme.background keys. */
|
|
8
8
|
type TableBackgroundToken = keyof Theme['background'];
|
|
9
|
-
/** Valid values for the size prop
|
|
9
|
+
/** Valid values for the size prop - derived from theme.sizes keys. */
|
|
10
10
|
type TableSize = keyof Theme['sizes'];
|
|
11
|
-
/** Valid values for the borderColor prop
|
|
11
|
+
/** Valid values for the borderColor prop - derived from theme.border keys. */
|
|
12
12
|
type TableBorderColorToken = keyof Theme['border'];
|
|
13
13
|
interface TableProps extends Omit<TableHTMLAttributes<HTMLTableElement>, 'color' | 'cellPadding' | 'align' | 'width' | 'border'>, SpaceProps<Theme>, LayoutProps<Theme>, Omit<BorderProps<Theme>, 'borderColor'> {
|
|
14
14
|
/**
|
|
15
|
-
* Palette color for descendant rows' hover/selected shading
|
|
15
|
+
* Palette color for descendant rows' hover/selected shading - broadcast to
|
|
16
16
|
* `TableRow`s via `TableContext`; a row's own `color` wins.
|
|
17
17
|
*/
|
|
18
18
|
color?: PaletteColor;
|
|
19
19
|
/** Resolves against theme.background */
|
|
20
20
|
bg?: TableBackgroundToken;
|
|
21
|
-
/** Resolves against theme.border
|
|
21
|
+
/** Resolves against theme.border - light · primary · dark */
|
|
22
22
|
borderColor?: TableBorderColorToken;
|
|
23
|
-
/** Cell density
|
|
23
|
+
/** Cell density - broadcast to descendant `TableCell`s via `TableContext`. Default: 'md', overridable via `theme.defaults.size`. */
|
|
24
24
|
size?: TableSize;
|
|
25
|
-
/** Cell padding mode
|
|
25
|
+
/** Cell padding mode - broadcast to descendant `TableCell`s. `'none'` zeroes cell padding. Default: `'normal'`. */
|
|
26
26
|
cellPadding?: TableCellPadding;
|
|
27
27
|
/** Makes header cells stick to the top of a scrolling `TableContainer`. Default: `false`. */
|
|
28
28
|
hasStickyHeader?: boolean;
|
|
29
29
|
/**
|
|
30
|
-
* Hides inactive sort icons (revealed on hover/focus)
|
|
30
|
+
* Hides inactive sort icons (revealed on hover/focus) - broadcast to
|
|
31
31
|
* descendant `TableSortLabel`s via `TableContext`. Set `false` to keep them
|
|
32
32
|
* always visible (dimmed). Default: `true`.
|
|
33
33
|
*/
|
|
34
34
|
shouldHideSortIcon?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
* Truncates overflowing cell text with an ellipsis
|
|
36
|
+
* Truncates overflowing cell text with an ellipsis - broadcast to descendant
|
|
37
37
|
* `TableCell`s via `TableContext`. Cells need a constrained width (e.g.
|
|
38
38
|
* `maxWidth`) for the truncation to kick in. Default: `false`.
|
|
39
39
|
*/
|
|
40
40
|
hasEllipsis?: boolean;
|
|
41
|
-
/** Default text alignment for every cell
|
|
41
|
+
/** Default text alignment for every cell - cells with `align="inherit"` (the default) follow it. */
|
|
42
42
|
align?: TableAlign;
|
|
43
43
|
as?: ElementType;
|
|
44
44
|
}
|
|
45
|
-
/** Table-wide text alignment
|
|
45
|
+
/** Table-wide text alignment - inherited by head, body, and footer cells alike. */
|
|
46
46
|
type TableAlign = 'left' | 'right' | 'center' | 'justify';
|
|
47
47
|
declare function Table({ size, cellPadding, hasStickyHeader, shouldHideSortIcon, hasEllipsis, color, align, as, children, ...rest }: Readonly<TableProps>): import("react").JSX.Element;
|
|
48
48
|
//#endregion
|