@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
package/dist/Popover.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as PaperElevation, r as PaperProps } from "./index-
|
|
4
|
-
import { l as ModalCloseReason } from "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.cjs";
|
|
2
|
+
import "./index-DkJzi96w.cjs";
|
|
3
|
+
import { n as PaperElevation, r as PaperProps } from "./index-BGD4OzzG.cjs";
|
|
4
|
+
import { l as ModalCloseReason } from "./index-B8KscJic.cjs";
|
|
5
5
|
import { ReactNode, Ref } from "react";
|
|
6
6
|
//#region src/Popover/utils/resolveAnchorEl.d.ts
|
|
7
7
|
type PopoverAnchorEl = HTMLElement | (() => HTMLElement | null) | null;
|
|
@@ -49,7 +49,7 @@ interface PopoverProps {
|
|
|
49
49
|
marginThreshold?: Exclude<keyof Theme['space'], 'auto'> | null;
|
|
50
50
|
/** Portal target passed to the underlying Modal. */
|
|
51
51
|
container?: HTMLElement | (() => HTMLElement | null) | null;
|
|
52
|
-
/** Ref for imperative actions
|
|
52
|
+
/** Ref for imperative actions - currently `updatePosition()`. */
|
|
53
53
|
action?: Ref<PopoverActions>;
|
|
54
54
|
/** Props for the paper slot (the surface). */
|
|
55
55
|
slotProps?: {
|
|
@@ -59,7 +59,7 @@ interface PopoverProps {
|
|
|
59
59
|
hasBackdrop?: boolean;
|
|
60
60
|
/** Disable body scroll-lock. When true, the popover re-positions on scroll. Default: false. */
|
|
61
61
|
disableScrollLock?: boolean;
|
|
62
|
-
/** Skip `aria-hidden` on background content
|
|
62
|
+
/** Skip `aria-hidden` on background content - for non-modal popovers whose trigger stays focused. Default: false. */
|
|
63
63
|
disableAriaHidden?: boolean;
|
|
64
64
|
/** Move focus into the popover on open. Default: true. */
|
|
65
65
|
shouldAutoFocus?: boolean;
|
|
@@ -77,7 +77,7 @@ interface PopoverProps {
|
|
|
77
77
|
/**
|
|
78
78
|
* @description Positions its content next to an anchor, portaled above the page.
|
|
79
79
|
* Built on `Modal`, so it inherits the portal, optional backdrop, focus management,
|
|
80
|
-
* scroll lock, and Escape/click-away close
|
|
80
|
+
* scroll lock, and Escape/click-away close - then adds anchor positioning
|
|
81
81
|
* (`anchorOrigin`/`transformOrigin`/`marginThreshold`).
|
|
82
82
|
*/
|
|
83
83
|
declare function Popover({ open, children, anchorEl, anchorReference, anchorPosition, anchorOrigin, transformOrigin, onClose, elevation, marginThreshold, container, action, slotProps, hasBackdrop, disableScrollLock, disableAriaHidden, shouldAutoFocus, shouldTrapFocus, shouldEnforceFocus, shouldRestoreFocus, shouldKeepMounted, layer }: Readonly<PopoverProps>): import("react").JSX.Element;
|
package/dist/Popover.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as PaperElevation, r as PaperProps } from "./index-
|
|
4
|
-
import { l as ModalCloseReason } from "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.mjs";
|
|
2
|
+
import "./index-CEqa8xx8.mjs";
|
|
3
|
+
import { n as PaperElevation, r as PaperProps } from "./index-BSR9zrAA.mjs";
|
|
4
|
+
import { l as ModalCloseReason } from "./index-qtKJ56yu.mjs";
|
|
5
5
|
import { ReactNode, Ref } from "react";
|
|
6
6
|
//#region src/Popover/utils/resolveAnchorEl.d.ts
|
|
7
7
|
type PopoverAnchorEl = HTMLElement | (() => HTMLElement | null) | null;
|
|
@@ -49,7 +49,7 @@ interface PopoverProps {
|
|
|
49
49
|
marginThreshold?: Exclude<keyof Theme['space'], 'auto'> | null;
|
|
50
50
|
/** Portal target passed to the underlying Modal. */
|
|
51
51
|
container?: HTMLElement | (() => HTMLElement | null) | null;
|
|
52
|
-
/** Ref for imperative actions
|
|
52
|
+
/** Ref for imperative actions - currently `updatePosition()`. */
|
|
53
53
|
action?: Ref<PopoverActions>;
|
|
54
54
|
/** Props for the paper slot (the surface). */
|
|
55
55
|
slotProps?: {
|
|
@@ -59,7 +59,7 @@ interface PopoverProps {
|
|
|
59
59
|
hasBackdrop?: boolean;
|
|
60
60
|
/** Disable body scroll-lock. When true, the popover re-positions on scroll. Default: false. */
|
|
61
61
|
disableScrollLock?: boolean;
|
|
62
|
-
/** Skip `aria-hidden` on background content
|
|
62
|
+
/** Skip `aria-hidden` on background content - for non-modal popovers whose trigger stays focused. Default: false. */
|
|
63
63
|
disableAriaHidden?: boolean;
|
|
64
64
|
/** Move focus into the popover on open. Default: true. */
|
|
65
65
|
shouldAutoFocus?: boolean;
|
|
@@ -77,7 +77,7 @@ interface PopoverProps {
|
|
|
77
77
|
/**
|
|
78
78
|
* @description Positions its content next to an anchor, portaled above the page.
|
|
79
79
|
* Built on `Modal`, so it inherits the portal, optional backdrop, focus management,
|
|
80
|
-
* scroll lock, and Escape/click-away close
|
|
80
|
+
* scroll lock, and Escape/click-away close - then adds anchor positioning
|
|
81
81
|
* (`anchorOrigin`/`transformOrigin`/`marginThreshold`).
|
|
82
82
|
*/
|
|
83
83
|
declare function Popover({ open, children, anchorEl, anchorReference, anchorPosition, anchorOrigin, transformOrigin, onClose, elevation, marginThreshold, container, action, slotProps, hasBackdrop, disableScrollLock, disableAriaHidden, shouldAutoFocus, shouldTrapFocus, shouldEnforceFocus, shouldRestoreFocus, shouldKeepMounted, layer }: Readonly<PopoverProps>): import("react").JSX.Element;
|
package/dist/Popover.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Popover } from "./Popover-
|
|
1
|
+
import { t as Popover } from "./Popover-DWOrf7sy.mjs";
|
|
2
2
|
export { Popover };
|
package/dist/Portal.cjs
CHANGED
|
@@ -8,7 +8,7 @@ function resolveContainer(container) {
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders its children into a DOM node outside the parent hierarchy (the document
|
|
10
10
|
* body by default). Resolves the container synchronously during render, so the
|
|
11
|
-
* portaled content mounts in the same commit
|
|
11
|
+
* portaled content mounts in the same commit - consumers like Modal can rely on
|
|
12
12
|
* their root ref being attached before their effects run. Renders nothing during
|
|
13
13
|
* server rendering.
|
|
14
14
|
*/
|
package/dist/Portal.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ interface PortalProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* Renders its children into a DOM node outside the parent hierarchy (the document
|
|
11
11
|
* body by default). Resolves the container synchronously during render, so the
|
|
12
|
-
* portaled content mounts in the same commit
|
|
12
|
+
* portaled content mounts in the same commit - consumers like Modal can rely on
|
|
13
13
|
* their root ref being attached before their effects run. Renders nothing during
|
|
14
14
|
* server rendering.
|
|
15
15
|
*/
|
package/dist/Portal.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ interface PortalProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* Renders its children into a DOM node outside the parent hierarchy (the document
|
|
11
11
|
* body by default). Resolves the container synchronously during render, so the
|
|
12
|
-
* portaled content mounts in the same commit
|
|
12
|
+
* portaled content mounts in the same commit - consumers like Modal can rely on
|
|
13
13
|
* their root ref being attached before their effects run. Renders nothing during
|
|
14
14
|
* server rendering.
|
|
15
15
|
*/
|
package/dist/Portal.mjs
CHANGED
|
@@ -7,7 +7,7 @@ function resolveContainer(container) {
|
|
|
7
7
|
/**
|
|
8
8
|
* Renders its children into a DOM node outside the parent hierarchy (the document
|
|
9
9
|
* body by default). Resolves the container synchronously during render, so the
|
|
10
|
-
* portaled content mounts in the same commit
|
|
10
|
+
* portaled content mounts in the same commit - consumers like Modal can rely on
|
|
11
11
|
* their root ref being attached before their effects run. Renders nothing during
|
|
12
12
|
* server rendering.
|
|
13
13
|
*/
|
package/dist/Pressable.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");
|
|
@@ -52,13 +52,13 @@ const PressableRoot = require_src.styled("div", {
|
|
|
52
52
|
]
|
|
53
53
|
})(baseStyles, feedbackStyles, focusVisibleStyles);
|
|
54
54
|
/**
|
|
55
|
-
* An unstyled clickable surface
|
|
55
|
+
* An unstyled clickable surface - button semantics (keyboard activation, focus
|
|
56
56
|
* ring, disabled state) with none of a button's looks, so it can wrap arbitrary
|
|
57
57
|
* content without changing its layout. Use it instead of an `onClick` on a
|
|
58
58
|
* `div`, which no keyboard or screen-reader user can reach.
|
|
59
59
|
*
|
|
60
60
|
* It renders a `div` by default, because `<button>` may not legally contain a
|
|
61
|
-
* link, another button, or block-level content
|
|
61
|
+
* link, another button, or block-level content - the shim gives that div a
|
|
62
62
|
* `role`, a tab stop, and Enter/Space activation, so it is announced and
|
|
63
63
|
* operated as a button either way. Pass `as="button"` for a native button, or
|
|
64
64
|
* `href` for an anchor; both skip the shim and let the browser do the work.
|
package/dist/Pressable.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as PressableProps, n as PressableColor, r as PressableFeedback, t as Pressable } from "./index-
|
|
1
|
+
import { i as PressableProps, n as PressableColor, r as PressableFeedback, t as Pressable } from "./index-CtrxW81j.cjs";
|
|
2
2
|
export { Pressable, PressableColor, PressableFeedback, PressableProps };
|
package/dist/Pressable.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as PressableProps, n as PressableColor, r as PressableFeedback, t as Pressable } from "./index-
|
|
1
|
+
import { i as PressableProps, n as PressableColor, r as PressableFeedback, t as Pressable } from "./index-8mHoIUt5.mjs";
|
|
2
2
|
export { Pressable, PressableColor, PressableFeedback, PressableProps };
|
package/dist/Pressable.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 { n as useDefaultProps, r as useTheme } from "./theme-
|
|
4
|
+
import { n as useDefaultProps, r as useTheme } from "./theme-BQGlZoma.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/Pressable/Pressable.tsx
|
|
@@ -50,13 +50,13 @@ const PressableRoot = styled("div", {
|
|
|
50
50
|
]
|
|
51
51
|
})(baseStyles, feedbackStyles, focusVisibleStyles);
|
|
52
52
|
/**
|
|
53
|
-
* An unstyled clickable surface
|
|
53
|
+
* An unstyled clickable surface - button semantics (keyboard activation, focus
|
|
54
54
|
* ring, disabled state) with none of a button's looks, so it can wrap arbitrary
|
|
55
55
|
* content without changing its layout. Use it instead of an `onClick` on a
|
|
56
56
|
* `div`, which no keyboard or screen-reader user can reach.
|
|
57
57
|
*
|
|
58
58
|
* It renders a `div` by default, because `<button>` may not legally contain a
|
|
59
|
-
* link, another button, or block-level content
|
|
59
|
+
* link, another button, or block-level content - the shim gives that div a
|
|
60
60
|
* `role`, a tab stop, and Enter/Space activation, so it is announced and
|
|
61
61
|
* operated as a button either way. Pass `as="button"` for a native button, or
|
|
62
62
|
* `href` for an anchor; both skip the shim and let the browser do the work.
|
package/dist/Quote.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_View = require("./View.cjs");
|
|
4
4
|
//#region src/Quote/Quote.tsx
|
|
5
|
-
/** A View with a 2px primary left-border
|
|
5
|
+
/** A View with a 2px primary left-border - used for terminal readouts and markdown blockquotes. */
|
|
6
6
|
const Quote = require_src.styled(require_View.View, {
|
|
7
7
|
name: "Quote",
|
|
8
8
|
label: "Quote"
|
package/dist/Quote.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { s as ViewProps } from "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.cjs";
|
|
2
|
+
import "./index-DkJzi96w.cjs";
|
|
3
|
+
import { s as ViewProps } from "./index-CvWslVk6.cjs";
|
|
4
4
|
//#region src/Quote/Quote.d.ts
|
|
5
5
|
type QuoteProps = ViewProps;
|
|
6
|
-
/** A View with a 2px primary left-border
|
|
6
|
+
/** A View with a 2px primary left-border - used for terminal readouts and markdown blockquotes. */
|
|
7
7
|
declare const Quote: import("@emotion/styled").StyledComponent<Pick<{
|
|
8
8
|
theme?: Theme;
|
|
9
9
|
as?: React.ElementType;
|
package/dist/Quote.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { s as ViewProps } from "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.mjs";
|
|
2
|
+
import "./index-CEqa8xx8.mjs";
|
|
3
|
+
import { s as ViewProps } from "./index-tv-TGYSG.mjs";
|
|
4
4
|
//#region src/Quote/Quote.d.ts
|
|
5
5
|
type QuoteProps = ViewProps;
|
|
6
|
-
/** A View with a 2px primary left-border
|
|
6
|
+
/** A View with a 2px primary left-border - used for terminal readouts and markdown blockquotes. */
|
|
7
7
|
declare const Quote: import("@emotion/styled").StyledComponent<Pick<{
|
|
8
8
|
theme?: Theme;
|
|
9
9
|
as?: React.ElementType;
|
package/dist/Quote.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as styled } from "./src-
|
|
1
|
+
import { o as styled } from "./src-DLGYOJMh.mjs";
|
|
2
2
|
import { View } from "./View.mjs";
|
|
3
3
|
//#region src/Quote/Quote.tsx
|
|
4
|
-
/** A View with a 2px primary left-border
|
|
4
|
+
/** A View with a 2px primary left-border - used for terminal readouts and markdown blockquotes. */
|
|
5
5
|
const Quote = styled(View, {
|
|
6
6
|
name: "Quote",
|
|
7
7
|
label: "Quote"
|
package/dist/Radio.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_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
4
4
|
const require_FormControl = require("./FormControl.cjs");
|
|
5
5
|
require("react");
|
package/dist/Radio.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { S as Theme, v as PaletteColor } from "./themes-9YNnlVyY.cjs";
|
|
2
|
+
import "./index-DkJzi96w.cjs";
|
|
3
3
|
import { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
|
|
4
4
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
//#region src/Radio/Radio.d.ts
|
|
@@ -24,7 +24,7 @@ interface RadioProps extends SpaceProps<Theme> {
|
|
|
24
24
|
id?: string;
|
|
25
25
|
/** Marks the field as required in a form. */
|
|
26
26
|
required?: boolean;
|
|
27
|
-
/** Radio group name
|
|
27
|
+
/** Radio group name - required for native group exclusivity. */
|
|
28
28
|
name?: string;
|
|
29
29
|
/** Value submitted with the form when this radio is selected. */
|
|
30
30
|
value?: string | number | readonly string[];
|
package/dist/Radio.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { S as Theme, v as PaletteColor } from "./themes-9YNnlVyY.mjs";
|
|
2
|
+
import "./index-CEqa8xx8.mjs";
|
|
3
3
|
import { SpaceProps } from "@soroush.tech/styled-system";
|
|
4
4
|
import { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
|
|
5
5
|
//#region src/Radio/Radio.d.ts
|
|
@@ -24,7 +24,7 @@ interface RadioProps extends SpaceProps<Theme> {
|
|
|
24
24
|
id?: string;
|
|
25
25
|
/** Marks the field as required in a form. */
|
|
26
26
|
required?: boolean;
|
|
27
|
-
/** Radio group name
|
|
27
|
+
/** Radio group name - required for native group exclusivity. */
|
|
28
28
|
name?: string;
|
|
29
29
|
/** Value submitted with the form when this radio is selected. */
|
|
30
30
|
value?: string | number | readonly string[];
|
package/dist/Radio.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 { useFormControl } from "./FormControl.mjs";
|
|
4
4
|
import "react";
|
package/dist/Select.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
-
const require_theme = require("./theme-
|
|
5
|
-
const require_Icon = require("./Icon-
|
|
4
|
+
const require_theme = require("./theme-BmEAXmwh.cjs");
|
|
5
|
+
const require_Icon = require("./Icon-CKLBJ7CC.cjs");
|
|
6
6
|
const require_FormControl = require("./FormControl.cjs");
|
|
7
7
|
const require_inputVariantStyles = require("./inputVariantStyles-BBkkYQtE.cjs");
|
|
8
8
|
const require_NativeSelect = require("./NativeSelect.cjs");
|
|
9
|
-
const require_Popover = require("./Popover-
|
|
9
|
+
const require_Popover = require("./Popover-Dz6h3A_9.cjs");
|
|
10
10
|
let react = require("react");
|
|
11
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
12
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
package/dist/Select.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as IconProps, r as IconName } from "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.cjs";
|
|
2
|
+
import "./index-DkJzi96w.cjs";
|
|
3
|
+
import { n as IconProps, r as IconName } from "./index-DPHwCZYf.cjs";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
6
6
|
//#region src/Select/utils/isOptionSelected.d.ts
|
|
@@ -14,15 +14,15 @@ type SelectBackgroundToken = keyof Theme['background'];
|
|
|
14
14
|
type SelectVariant = 'default' | 'outlined' | 'text' | 'underline';
|
|
15
15
|
type SelectSize = keyof Theme['sizes'];
|
|
16
16
|
interface SelectProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width' | 'minWidth' | 'maxWidth'> {
|
|
17
|
-
/** `MenuItem` children
|
|
17
|
+
/** `MenuItem` children - one per option. */
|
|
18
18
|
children: ReactNode;
|
|
19
19
|
/** Render a native `<select>` (delegates to `NativeSelect`, single-select) instead of the custom listbox. */
|
|
20
20
|
native?: boolean;
|
|
21
|
-
/** Allow selecting several options
|
|
21
|
+
/** Allow selecting several options - `value` becomes an array. Ignored on the native path. */
|
|
22
22
|
multiple?: boolean;
|
|
23
23
|
/** Size the trigger to the current selection instead of reserving the widest option's width. When `false` (default) the trigger keeps a stable width, avoiding layout shift on selection. */
|
|
24
24
|
autoWidth?: boolean;
|
|
25
|
-
/** Controlled value
|
|
25
|
+
/** Controlled value - a single option value, or an array when `multiple`. */
|
|
26
26
|
value?: SelectValue;
|
|
27
27
|
/** Uncontrolled initial value. */
|
|
28
28
|
defaultValue?: SelectValue;
|
|
@@ -38,13 +38,13 @@ interface SelectProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width
|
|
|
38
38
|
placeholder?: string;
|
|
39
39
|
/** Override the trigger's rendered content for the current value. */
|
|
40
40
|
renderValue?: (value: SelectValue) => ReactNode;
|
|
41
|
-
/** Corner radius
|
|
41
|
+
/** Corner radius - applies only to `default` and `outlined` variants. */
|
|
42
42
|
borderRadius?: keyof Theme['radii'];
|
|
43
|
-
/** Focus/active border color
|
|
43
|
+
/** Focus/active border color - resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
44
44
|
color?: SelectColor;
|
|
45
|
-
/** Text color of the trigger value
|
|
45
|
+
/** Text color of the trigger value - resolves against `theme.text`. Default: 'primary', overridable via `theme.defaults.accentTextColor`. */
|
|
46
46
|
textColor?: SelectTextColor;
|
|
47
|
-
/** Background color
|
|
47
|
+
/** Background color - resolves against `theme.background`. Default: `'terminal'`. */
|
|
48
48
|
bg?: SelectBackgroundToken;
|
|
49
49
|
disabled?: boolean;
|
|
50
50
|
error?: boolean;
|
|
@@ -52,7 +52,7 @@ interface SelectProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width
|
|
|
52
52
|
required?: boolean;
|
|
53
53
|
/** Controls padding and font size. Default: 'md', overridable via `theme.defaults.size`. */
|
|
54
54
|
size?: SelectSize;
|
|
55
|
-
/** Visual style
|
|
55
|
+
/** Visual style - mirrors `TextInput`/`NativeSelect`. Default: `'default'`. */
|
|
56
56
|
variant?: SelectVariant;
|
|
57
57
|
/** Dropdown affordance icon. Default: `'expand_more'` / `'expand_less'` when open. */
|
|
58
58
|
iconName?: IconName;
|
package/dist/Select.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as IconProps, r as IconName } from "./index-
|
|
1
|
+
import { S as Theme } from "./themes-9YNnlVyY.mjs";
|
|
2
|
+
import "./index-CEqa8xx8.mjs";
|
|
3
|
+
import { n as IconProps, r as IconName } from "./index-r2avCy1z.mjs";
|
|
4
4
|
import { LayoutProps, SpaceProps } from "@soroush.tech/styled-system";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
//#region src/Select/utils/isOptionSelected.d.ts
|
|
@@ -14,15 +14,15 @@ type SelectBackgroundToken = keyof Theme['background'];
|
|
|
14
14
|
type SelectVariant = 'default' | 'outlined' | 'text' | 'underline';
|
|
15
15
|
type SelectSize = keyof Theme['sizes'];
|
|
16
16
|
interface SelectProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width' | 'minWidth' | 'maxWidth'> {
|
|
17
|
-
/** `MenuItem` children
|
|
17
|
+
/** `MenuItem` children - one per option. */
|
|
18
18
|
children: ReactNode;
|
|
19
19
|
/** Render a native `<select>` (delegates to `NativeSelect`, single-select) instead of the custom listbox. */
|
|
20
20
|
native?: boolean;
|
|
21
|
-
/** Allow selecting several options
|
|
21
|
+
/** Allow selecting several options - `value` becomes an array. Ignored on the native path. */
|
|
22
22
|
multiple?: boolean;
|
|
23
23
|
/** Size the trigger to the current selection instead of reserving the widest option's width. When `false` (default) the trigger keeps a stable width, avoiding layout shift on selection. */
|
|
24
24
|
autoWidth?: boolean;
|
|
25
|
-
/** Controlled value
|
|
25
|
+
/** Controlled value - a single option value, or an array when `multiple`. */
|
|
26
26
|
value?: SelectValue;
|
|
27
27
|
/** Uncontrolled initial value. */
|
|
28
28
|
defaultValue?: SelectValue;
|
|
@@ -38,13 +38,13 @@ interface SelectProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width
|
|
|
38
38
|
placeholder?: string;
|
|
39
39
|
/** Override the trigger's rendered content for the current value. */
|
|
40
40
|
renderValue?: (value: SelectValue) => ReactNode;
|
|
41
|
-
/** Corner radius
|
|
41
|
+
/** Corner radius - applies only to `default` and `outlined` variants. */
|
|
42
42
|
borderRadius?: keyof Theme['radii'];
|
|
43
|
-
/** Focus/active border color
|
|
43
|
+
/** Focus/active border color - resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
44
44
|
color?: SelectColor;
|
|
45
|
-
/** Text color of the trigger value
|
|
45
|
+
/** Text color of the trigger value - resolves against `theme.text`. Default: 'primary', overridable via `theme.defaults.accentTextColor`. */
|
|
46
46
|
textColor?: SelectTextColor;
|
|
47
|
-
/** Background color
|
|
47
|
+
/** Background color - resolves against `theme.background`. Default: `'terminal'`. */
|
|
48
48
|
bg?: SelectBackgroundToken;
|
|
49
49
|
disabled?: boolean;
|
|
50
50
|
error?: boolean;
|
|
@@ -52,7 +52,7 @@ interface SelectProps extends SpaceProps<Theme>, Pick<LayoutProps<Theme>, 'width
|
|
|
52
52
|
required?: boolean;
|
|
53
53
|
/** Controls padding and font size. Default: 'md', overridable via `theme.defaults.size`. */
|
|
54
54
|
size?: SelectSize;
|
|
55
|
-
/** Visual style
|
|
55
|
+
/** Visual style - mirrors `TextInput`/`NativeSelect`. Default: `'default'`. */
|
|
56
56
|
variant?: SelectVariant;
|
|
57
57
|
/** Dropdown affordance icon. Default: `'expand_more'` / `'expand_less'` when open. */
|
|
58
58
|
iconName?: IconName;
|
package/dist/Select.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
|
-
import { r as useTheme } from "./theme-
|
|
4
|
-
import { t as Icon } from "./Icon-
|
|
3
|
+
import { r as useTheme } from "./theme-BQGlZoma.mjs";
|
|
4
|
+
import { t as Icon } from "./Icon-CkQGOBmm.mjs";
|
|
5
5
|
import { useFormControl } from "./FormControl.mjs";
|
|
6
6
|
import { t as inputVariantStyles } from "./inputVariantStyles-CcqpGfuP.mjs";
|
|
7
7
|
import { NativeSelect } from "./NativeSelect.mjs";
|
|
8
|
-
import { t as Popover } from "./Popover-
|
|
8
|
+
import { t as Popover } from "./Popover-DWOrf7sy.mjs";
|
|
9
9
|
import { Children, cloneElement, isValidElement, useCallback, useId, useState } from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/Select/hooks/useSelectPopover.ts
|
package/dist/Sidebar/Sidebar.cjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
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
|
+
const require_PageLayoutContext = require("../PageLayoutContext-agXGhegE.cjs");
|
|
5
|
+
const require_layoutStyles = require("../layoutStyles-B4Z1K6HZ.cjs");
|
|
4
6
|
const require_SidebarContext = require("../SidebarContext-jG6OioC-.cjs");
|
|
5
7
|
let react = require("react");
|
|
6
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
9
|
//#region src/Sidebar/Sidebar/Sidebar.tsx
|
|
10
|
+
const hideLabels = { "[data-sidebar-item-content] > :not(:first-child)": { display: "none" } };
|
|
8
11
|
const SidebarRoot = require_src.styled(require_Flex.Flex, {
|
|
9
12
|
name: "Sidebar",
|
|
10
13
|
label: "Sidebar"
|
|
@@ -13,13 +16,21 @@ const SidebarRail = require_src.styled(require_Flex.Flex, {
|
|
|
13
16
|
name: "Sidebar",
|
|
14
17
|
slot: "rail",
|
|
15
18
|
label: "SidebarRail",
|
|
16
|
-
shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "expandedWidth" && prop !== "collapsedWidth"
|
|
17
|
-
})(({ isOpen, expandedWidth, collapsedWidth }) =>
|
|
19
|
+
shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "expandedWidth" && prop !== "collapsedWidth" && prop !== "panelSide"
|
|
20
|
+
})(({ theme, isOpen, expandedWidth, collapsedWidth, panelSide }) => panelSide ? {
|
|
21
|
+
width: "100%",
|
|
22
|
+
overflowX: "hidden",
|
|
23
|
+
containerType: "inline-size",
|
|
24
|
+
...require_layoutStyles.layoutStyles(theme, ({ panels }) => {
|
|
25
|
+
const width = panels[panelSide]?.width;
|
|
26
|
+
return width === void 0 ? {} : { [`@container (width < ${require_layoutStyles.layoutLength(theme, width)})`]: hideLabels };
|
|
27
|
+
})
|
|
28
|
+
} : {
|
|
18
29
|
width: isOpen ? expandedWidth : collapsedWidth,
|
|
19
30
|
transition: "width 200ms ease",
|
|
20
31
|
overflowX: "hidden",
|
|
21
32
|
"@media (prefers-reduced-motion: reduce)": { transition: "none" }
|
|
22
|
-
})
|
|
33
|
+
});
|
|
23
34
|
const SidebarPanelRoot = require_src.styled(require_Flex.Flex, {
|
|
24
35
|
name: "Sidebar",
|
|
25
36
|
slot: "panel",
|
|
@@ -33,17 +44,20 @@ const SidebarPanelRoot = require_src.styled(require_Flex.Flex, {
|
|
|
33
44
|
/**
|
|
34
45
|
* A collapsible vertical icon rail: collapsed it shows icon-only items; open
|
|
35
46
|
* it also shows each item's label, rendered away from the anchored edge.
|
|
36
|
-
* Purely controlled via `isOpen`
|
|
47
|
+
* Purely controlled via `isOpen` - pair it with a menu button wherever your
|
|
37
48
|
* layout keeps one (usually the app bar). Children consume the state through
|
|
38
|
-
* `SidebarContext`, and any `Flex` prop (`bg`, spacing,
|
|
49
|
+
* `SidebarContext`, and any `Flex` prop (`bg`, spacing, ...) applies to the rail.
|
|
39
50
|
*
|
|
40
51
|
* With `hasPanel`, the rail gains a second column and the selected item's
|
|
41
|
-
* `children` render there instead of inside its row
|
|
52
|
+
* `children` render there instead of inside its row - an icon rail beside a
|
|
42
53
|
* detail panel. The panel appears only when the selected item has children, and
|
|
43
54
|
* is independent of `isOpen`, so a collapsed icons-only rail can sit beside an
|
|
44
55
|
* open panel.
|
|
45
56
|
*/
|
|
46
|
-
function Sidebar({ children, isOpen, anchor = "left", variant = "text", expandedWidth
|
|
57
|
+
function Sidebar({ children, isOpen, anchor = "left", variant = "text", expandedWidth, collapsedWidth, hasPanel = false, panelWidth = "18rem", panelProps, "aria-label": ariaLabel, ...rest }) {
|
|
58
|
+
const region = (0, react.useContext)(require_PageLayoutContext.PageLayoutContext);
|
|
59
|
+
const isSized = expandedWidth !== void 0 || collapsedWidth !== void 0;
|
|
60
|
+
const panelSide = region?.region === "panel" && !isSized ? region.side : void 0;
|
|
47
61
|
const panelId = (0, react.useId)();
|
|
48
62
|
const [panelNode, setPanelNode] = (0, react.useState)(null);
|
|
49
63
|
const [panelLabel, setPanelLabel] = (0, react.useState)(null);
|
|
@@ -68,14 +82,19 @@ function Sidebar({ children, isOpen, anchor = "left", variant = "text", expanded
|
|
|
68
82
|
"aria-label": ariaLabel,
|
|
69
83
|
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
70
84
|
flexShrink: 0,
|
|
85
|
+
...panelSide && {
|
|
86
|
+
width: "100%",
|
|
87
|
+
height: "100%"
|
|
88
|
+
},
|
|
71
89
|
...rest,
|
|
72
90
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarRail, {
|
|
73
91
|
flexDirection: "column",
|
|
74
92
|
gap: 1,
|
|
75
93
|
flexShrink: 0,
|
|
76
94
|
isOpen,
|
|
77
|
-
expandedWidth,
|
|
78
|
-
collapsedWidth,
|
|
95
|
+
expandedWidth: expandedWidth ?? "14rem",
|
|
96
|
+
collapsedWidth: collapsedWidth ?? "3.5rem",
|
|
97
|
+
panelSide,
|
|
79
98
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SidebarContext.SidebarContext.Provider, {
|
|
80
99
|
value: context,
|
|
81
100
|
children
|
|
@@ -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-BMJ3tyIw.cjs";
|
|
2
|
+
import { i as SidebarItemVariant, t as SidebarAnchor } from "../SidebarContext-B1lWrt77.cjs";
|
|
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.
|