@soroush.tech/design-system 0.1.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/LICENSE +21 -0
- package/README.md +278 -0
- package/dist/AppBar.cjs +71 -0
- package/dist/AppBar.d.cts +23 -0
- package/dist/AppBar.d.mts +23 -0
- package/dist/AppBar.mjs +69 -0
- package/dist/Avatar.cjs +106 -0
- package/dist/Avatar.d.cts +28 -0
- package/dist/Avatar.d.mts +28 -0
- package/dist/Avatar.mjs +103 -0
- package/dist/Backdrop.cjs +26 -0
- package/dist/Backdrop.d.cts +10 -0
- package/dist/Backdrop.d.mts +10 -0
- package/dist/Backdrop.mjs +25 -0
- package/dist/Button.cjs +178 -0
- package/dist/Button.d.cts +2 -0
- package/dist/Button.d.mts +2 -0
- package/dist/Button.mjs +175 -0
- package/dist/ButtonGroup.cjs +110 -0
- package/dist/ButtonGroup.d.cts +2 -0
- package/dist/ButtonGroup.d.mts +2 -0
- package/dist/ButtonGroup.mjs +107 -0
- package/dist/ButtonGroupContext-DS-kl9lG.mjs +5 -0
- package/dist/ButtonGroupContext-NtkVeDVE.cjs +9 -0
- package/dist/Card.cjs +95 -0
- package/dist/Card.d.cts +18 -0
- package/dist/Card.d.mts +18 -0
- package/dist/Card.mjs +93 -0
- package/dist/Checkbox.cjs +192 -0
- package/dist/Checkbox.d.cts +2 -0
- package/dist/Checkbox.d.mts +2 -0
- package/dist/Checkbox.mjs +190 -0
- package/dist/CircularProgress.cjs +136 -0
- package/dist/CircularProgress.d.cts +34 -0
- package/dist/CircularProgress.d.mts +34 -0
- package/dist/CircularProgress.mjs +133 -0
- package/dist/CodeBlock.cjs +101 -0
- package/dist/CodeBlock.d.cts +2 -0
- package/dist/CodeBlock.d.mts +2 -0
- package/dist/CodeBlock.mjs +100 -0
- package/dist/Drawer.cjs +69 -0
- package/dist/Drawer.d.cts +22 -0
- package/dist/Drawer.d.mts +22 -0
- package/dist/Drawer.mjs +66 -0
- package/dist/Field.cjs +59 -0
- package/dist/Field.d.cts +36 -0
- package/dist/Field.d.mts +36 -0
- package/dist/Field.mjs +58 -0
- package/dist/Flex.cjs +21 -0
- package/dist/Flex.d.cts +2 -0
- package/dist/Flex.d.mts +2 -0
- package/dist/Flex.mjs +19 -0
- package/dist/FocusTrap.cjs +82 -0
- package/dist/FocusTrap.d.cts +24 -0
- package/dist/FocusTrap.d.mts +24 -0
- package/dist/FocusTrap.mjs +81 -0
- package/dist/Form.cjs +44 -0
- package/dist/Form.d.cts +41 -0
- package/dist/Form.d.mts +41 -0
- package/dist/Form.mjs +42 -0
- package/dist/FormContext-CRmRgDgu.cjs +10 -0
- package/dist/FormContext-_G3sxJyQ.mjs +6 -0
- package/dist/FormControl.cjs +84 -0
- package/dist/FormControl.d.cts +78 -0
- package/dist/FormControl.d.mts +78 -0
- package/dist/FormControl.mjs +81 -0
- package/dist/FormControlContext-CyxdOxdN.mjs +6 -0
- package/dist/FormControlContext-aeKTjRKY.cjs +10 -0
- package/dist/FormHelperText.cjs +40 -0
- package/dist/FormHelperText.d.cts +16 -0
- package/dist/FormHelperText.d.mts +16 -0
- package/dist/FormHelperText.mjs +39 -0
- package/dist/FormLabel.cjs +34 -0
- package/dist/FormLabel.d.cts +2 -0
- package/dist/FormLabel.d.mts +2 -0
- package/dist/FormLabel.mjs +33 -0
- package/dist/Grid.cjs +37 -0
- package/dist/Grid.d.cts +21 -0
- package/dist/Grid.d.mts +21 -0
- package/dist/Grid.mjs +32 -0
- package/dist/Icon-1YtNCUKo.cjs +755 -0
- package/dist/Icon-CAKRmFz3.mjs +742 -0
- package/dist/Icon.cjs +4 -0
- package/dist/Icon.d.cts +2 -0
- package/dist/Icon.d.mts +2 -0
- package/dist/Icon.mjs +2 -0
- package/dist/Image.cjs +82 -0
- package/dist/Image.d.cts +2 -0
- package/dist/Image.d.mts +2 -0
- package/dist/Image.mjs +80 -0
- package/dist/LinearProgress.cjs +217 -0
- package/dist/LinearProgress.d.cts +36 -0
- package/dist/LinearProgress.d.mts +36 -0
- package/dist/LinearProgress.mjs +214 -0
- package/dist/Link.cjs +64 -0
- package/dist/Link.d.cts +2 -0
- package/dist/Link.d.mts +2 -0
- package/dist/Link.mjs +62 -0
- package/dist/Markdown/Control.cjs +61 -0
- package/dist/Markdown/Control.d.cts +18 -0
- package/dist/Markdown/Control.d.mts +18 -0
- package/dist/Markdown/Control.mjs +60 -0
- package/dist/Markdown/Editor.cjs +130 -0
- package/dist/Markdown/Editor.d.cts +40 -0
- package/dist/Markdown/Editor.d.mts +40 -0
- package/dist/Markdown/Editor.mjs +128 -0
- package/dist/Markdown/Preview.cjs +241 -0
- package/dist/Markdown/Preview.d.cts +55 -0
- package/dist/Markdown/Preview.d.mts +55 -0
- package/dist/Markdown/Preview.mjs +236 -0
- package/dist/Markdown/Toolbar.cjs +4 -0
- package/dist/Markdown/Toolbar.d.cts +13 -0
- package/dist/Markdown/Toolbar.d.mts +13 -0
- package/dist/Markdown/Toolbar.mjs +2 -0
- package/dist/Markdown.cjs +13 -0
- package/dist/Markdown.d.cts +80 -0
- package/dist/Markdown.d.mts +80 -0
- package/dist/Markdown.mjs +6 -0
- package/dist/MarkdownContext-BN8A3W-J.mjs +11 -0
- package/dist/MarkdownContext-DSwjzpH8.cjs +22 -0
- package/dist/MenuItem.cjs +150 -0
- package/dist/MenuItem.d.cts +51 -0
- package/dist/MenuItem.d.mts +51 -0
- package/dist/MenuItem.mjs +147 -0
- package/dist/Modal-BDMPTSXv.cjs +351 -0
- package/dist/Modal-DR60peRg.mjs +327 -0
- package/dist/Modal.cjs +6 -0
- package/dist/Modal.d.cts +2 -0
- package/dist/Modal.d.mts +2 -0
- package/dist/Modal.mjs +2 -0
- package/dist/NativeSelect.cjs +189 -0
- package/dist/NativeSelect.d.cts +62 -0
- package/dist/NativeSelect.d.mts +62 -0
- package/dist/NativeSelect.mjs +186 -0
- package/dist/Pagination/PaginationItem.cjs +116 -0
- package/dist/Pagination/PaginationItem.d.cts +2 -0
- package/dist/Pagination/PaginationItem.d.mts +2 -0
- package/dist/Pagination/PaginationItem.mjs +114 -0
- package/dist/Pagination.cjs +134 -0
- package/dist/Pagination.d.cts +23 -0
- package/dist/Pagination.d.mts +23 -0
- package/dist/Pagination.mjs +130 -0
- package/dist/Paper.cjs +51 -0
- package/dist/Paper.d.cts +2 -0
- package/dist/Paper.d.mts +2 -0
- package/dist/Paper.mjs +48 -0
- package/dist/Popover-B61J7C79.mjs +252 -0
- package/dist/Popover-CRDLmywF.cjs +259 -0
- package/dist/Popover.cjs +3 -0
- package/dist/Popover.d.cts +84 -0
- package/dist/Popover.d.mts +84 -0
- package/dist/Popover.mjs +2 -0
- package/dist/Portal.cjs +20 -0
- package/dist/Portal.d.cts +18 -0
- package/dist/Portal.d.mts +18 -0
- package/dist/Portal.mjs +19 -0
- package/dist/Quote.cjs +11 -0
- package/dist/Quote.d.cts +2 -0
- package/dist/Quote.d.mts +2 -0
- package/dist/Quote.mjs +10 -0
- package/dist/Radio.cjs +143 -0
- package/dist/Radio.d.cts +38 -0
- package/dist/Radio.d.mts +38 -0
- package/dist/Radio.mjs +141 -0
- package/dist/Select.cjs +528 -0
- package/dist/Select.d.cts +68 -0
- package/dist/Select.d.mts +68 -0
- package/dist/Select.mjs +525 -0
- package/dist/Skeleton.cjs +82 -0
- package/dist/Skeleton.d.cts +21 -0
- package/dist/Skeleton.d.mts +21 -0
- package/dist/Skeleton.mjs +79 -0
- package/dist/Switch.cjs +332 -0
- package/dist/Switch.d.cts +40 -0
- package/dist/Switch.d.mts +40 -0
- package/dist/Switch.mjs +329 -0
- package/dist/Table/Table.cjs +65 -0
- package/dist/Table/Table.d.cts +2 -0
- package/dist/Table/Table.d.mts +2 -0
- package/dist/Table/Table.mjs +63 -0
- package/dist/Table/TableBody.cjs +42 -0
- package/dist/Table/TableBody.d.cts +2 -0
- package/dist/Table/TableBody.d.mts +2 -0
- package/dist/Table/TableBody.mjs +40 -0
- package/dist/Table/TableCell.cjs +93 -0
- package/dist/Table/TableCell.d.cts +2 -0
- package/dist/Table/TableCell.d.mts +2 -0
- package/dist/Table/TableCell.mjs +91 -0
- package/dist/Table/TableContainer.cjs +15 -0
- package/dist/Table/TableContainer.d.cts +2 -0
- package/dist/Table/TableContainer.d.mts +2 -0
- package/dist/Table/TableContainer.mjs +14 -0
- package/dist/Table/TableControl.cjs +42 -0
- package/dist/Table/TableControl.d.cts +2 -0
- package/dist/Table/TableControl.d.mts +2 -0
- package/dist/Table/TableControl.mjs +41 -0
- package/dist/Table/TableFooter.cjs +42 -0
- package/dist/Table/TableFooter.d.cts +2 -0
- package/dist/Table/TableFooter.d.mts +2 -0
- package/dist/Table/TableFooter.mjs +40 -0
- package/dist/Table/TableHead.cjs +42 -0
- package/dist/Table/TableHead.d.cts +2 -0
- package/dist/Table/TableHead.d.mts +2 -0
- package/dist/Table/TableHead.mjs +40 -0
- package/dist/Table/TablePagination.cjs +89 -0
- package/dist/Table/TablePagination.d.cts +2 -0
- package/dist/Table/TablePagination.d.mts +2 -0
- package/dist/Table/TablePagination.mjs +88 -0
- package/dist/Table/TablePaginationActions.cjs +65 -0
- package/dist/Table/TablePaginationActions.d.cts +2 -0
- package/dist/Table/TablePaginationActions.d.mts +2 -0
- package/dist/Table/TablePaginationActions.mjs +63 -0
- package/dist/Table/TableRow.cjs +56 -0
- package/dist/Table/TableRow.d.cts +2 -0
- package/dist/Table/TableRow.d.mts +2 -0
- package/dist/Table/TableRow.mjs +54 -0
- package/dist/Table/TableSortLabel.cjs +62 -0
- package/dist/Table/TableSortLabel.d.cts +2 -0
- package/dist/Table/TableSortLabel.d.mts +2 -0
- package/dist/Table/TableSortLabel.mjs +60 -0
- package/dist/Table/hooks.cjs +112 -0
- package/dist/Table/hooks.d.cts +3 -0
- package/dist/Table/hooks.d.mts +3 -0
- package/dist/Table/hooks.mjs +109 -0
- package/dist/Table.cjs +31 -0
- package/dist/Table.d.cts +16 -0
- package/dist/Table.d.mts +16 -0
- package/dist/Table.mjs +15 -0
- package/dist/TableContext-2qH7XYJB.d.cts +19 -0
- package/dist/TableContext-2qH7XYJB.d.mts +19 -0
- package/dist/TableContext-BRWPghAI.mjs +6 -0
- package/dist/TableContext-qqp35o8z.cjs +10 -0
- package/dist/TableSectionContext-meIG4lFZ.mjs +5 -0
- package/dist/TableSectionContext-pYlJ-duI.cjs +9 -0
- package/dist/TextInput-6o37Zddp.cjs +231 -0
- package/dist/TextInput-D_lHYJlL.mjs +224 -0
- package/dist/TextInput.cjs +3 -0
- package/dist/TextInput.d.cts +2 -0
- package/dist/TextInput.d.mts +2 -0
- package/dist/TextInput.mjs +2 -0
- package/dist/ThemeProvider.cjs +15 -0
- package/dist/ThemeProvider.d.cts +20 -0
- package/dist/ThemeProvider.d.mts +20 -0
- package/dist/ThemeProvider.mjs +14 -0
- package/dist/ToggleButton/ToggleButton.cjs +58 -0
- package/dist/ToggleButton/ToggleButton.d.cts +14 -0
- package/dist/ToggleButton/ToggleButton.d.mts +14 -0
- package/dist/ToggleButton/ToggleButton.mjs +56 -0
- package/dist/ToggleButton/ToggleButtonGroup.cjs +54 -0
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +23 -0
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +23 -0
- package/dist/ToggleButton/ToggleButtonGroup.mjs +52 -0
- package/dist/ToggleButton.cjs +7 -0
- package/dist/ToggleButton.d.cts +4 -0
- package/dist/ToggleButton.d.mts +4 -0
- package/dist/ToggleButton.mjs +4 -0
- package/dist/ToggleButtonGroupContext-CqD-Afho.d.cts +15 -0
- package/dist/ToggleButtonGroupContext-CqD-Afho.d.mts +15 -0
- package/dist/ToggleButtonGroupContext-DxIyy8ze.mjs +5 -0
- package/dist/ToggleButtonGroupContext-Ewc5Ixas.cjs +9 -0
- package/dist/Toolbar-B-W22Sk4.cjs +459 -0
- package/dist/Toolbar-KbR97iJS.mjs +448 -0
- package/dist/Typography.cjs +64 -0
- package/dist/Typography.d.cts +3 -0
- package/dist/Typography.d.mts +3 -0
- package/dist/Typography.mjs +61 -0
- package/dist/View.cjs +40 -0
- package/dist/View.d.cts +2 -0
- package/dist/View.d.mts +2 -0
- package/dist/View.mjs +38 -0
- package/dist/applyAction-B2B-hnP3.mjs +98 -0
- package/dist/applyAction-B2uVHxOE.cjs +103 -0
- package/dist/createTheme-Dts2F4R_.d.cts +21 -0
- package/dist/createTheme-Dts2F4R_.d.mts +21 -0
- package/dist/hooks/useCopyToClipboard.cjs +33 -0
- package/dist/hooks/useCopyToClipboard.d.cts +16 -0
- package/dist/hooks/useCopyToClipboard.d.mts +16 -0
- package/dist/hooks/useCopyToClipboard.mjs +31 -0
- package/dist/hooks.cjs +52 -0
- package/dist/hooks.d.cts +40 -0
- package/dist/hooks.d.mts +40 -0
- package/dist/hooks.mjs +41 -0
- package/dist/index-4rC2j7fR.d.cts +46 -0
- package/dist/index-8dzWTpFp.d.cts +24 -0
- package/dist/index-B1rCD6Oo.d.cts +17 -0
- package/dist/index-BH8jQOdF.d.mts +46 -0
- package/dist/index-BLRMuO_x.d.mts +24 -0
- package/dist/index-BLfFycfJ.d.mts +72 -0
- package/dist/index-BPrjvi7B.d.cts +13 -0
- package/dist/index-BX5-NfbX.d.cts +94 -0
- package/dist/index-Bihpwn75.d.cts +64 -0
- package/dist/index-BlfIbAMs.d.cts +45 -0
- package/dist/index-BnzUumAC2.d.mts +30 -0
- package/dist/index-BoqlPb3Z.d.mts +13 -0
- package/dist/index-BqVgv2B_.d.mts +42 -0
- package/dist/index-Bwi4kRpf.d.mts +79 -0
- package/dist/index-Bx24ZnOV.d.mts +43 -0
- package/dist/index-C-P_hipv.d.mts +21 -0
- package/dist/index-C0xMvDjL.d.mts +49 -0
- package/dist/index-C5_ciaeo.d.cts +79 -0
- package/dist/index-CDVnvjIE.d.cts +27 -0
- package/dist/index-CDcGTGR4.d.cts +21 -0
- package/dist/index-CEOZI-6L.d.mts +48 -0
- package/dist/index-CLU39rUS2.d.mts +30 -0
- package/dist/index-CM_KCTee.d.cts +48 -0
- package/dist/index-CT9uGKrs.d.cts +30 -0
- package/dist/index-CcYSvIJi.d.cts +21 -0
- package/dist/index-CdF_4ckE.d.mts +11 -0
- package/dist/index-CeYkEXU2.d.cts +68 -0
- package/dist/index-Cl_yBpzW2.d.mts +13 -0
- package/dist/index-Cv_UOfYx.d.mts +18 -0
- package/dist/index-CxSNNzBT2.d.mts +68 -0
- package/dist/index-CyZYXDn0.d.cts +42 -0
- package/dist/index-DASvoACZ.d.cts +49 -0
- package/dist/index-DBGE6yKw.d.mts +16 -0
- package/dist/index-DCQ2fsDu.d.mts +40 -0
- package/dist/index-DD2AVtiR.d.cts +16 -0
- package/dist/index-DE5PtzPn.d.mts +27 -0
- package/dist/index-DOPXpr2J.d.cts +43 -0
- package/dist/index-DSCMXFTn.d.cts +30 -0
- package/dist/index-DTkQSXQD.d.cts +11 -0
- package/dist/index-DeJWkpf9.d.cts +16 -0
- package/dist/index-DeiZHSwA.d.cts +12 -0
- package/dist/index-Des8BisQ.d.mts +12 -0
- package/dist/index-Dg8-CPOO.d.cts +18 -0
- package/dist/index-DgRS5Aqv.d.mts +16 -0
- package/dist/index-Dm9HfgV6.d.mts +63 -0
- package/dist/index-DmJIuQJj.d.mts +24 -0
- package/dist/index-Dp81rWM1.d.cts +72 -0
- package/dist/index-Dtzj8X58.d.cts +40 -0
- package/dist/index-DvW2eETV.d.mts +21 -0
- package/dist/index-Dy03o__A.d.mts +94 -0
- package/dist/index-FwTocqhP.d.cts +34 -0
- package/dist/index-GVsFY00r.d.cts +21 -0
- package/dist/index-Nqco3fsM.d.cts +13 -0
- package/dist/index-g-9DZ_KQ.d.cts +28 -0
- package/dist/index-g9EThkSg.d.mts +21 -0
- package/dist/index-kpk9e3xM2.d.mts +45 -0
- package/dist/index-pX7tBQdJ.d.mts +34 -0
- package/dist/index-u57CbuAU2.d.mts +28 -0
- package/dist/index-x80UG39F.d.cts +24 -0
- package/dist/index-z35LEYG8.d.mts +17 -0
- package/dist/index.cjs +68 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +3 -0
- package/dist/inputVariantStyles-BBkkYQtE.cjs +32 -0
- package/dist/inputVariantStyles-CcqpGfuP.mjs +28 -0
- package/dist/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/dist/rolldown-runtime-DDXJien1.cjs +50 -0
- package/dist/src-BiocWFSR.cjs +60 -0
- package/dist/src-DcNT2aIK.mjs +49 -0
- package/dist/themeDefault-B-QjpGEO.cjs +16 -0
- package/dist/themeDefault-CjXaY3ok.mjs +11 -0
- package/dist/themes-D1SAp3SL.d.mts +500 -0
- package/dist/themes-D81JYbqm.d.cts +500 -0
- package/dist/themes.cjs +318 -0
- package/dist/themes.d.cts +3 -0
- package/dist/themes.d.mts +3 -0
- package/dist/themes.mjs +303 -0
- package/dist/useDefaultProps-Cb-5FNok.cjs +19 -0
- package/dist/useDefaultProps-CoApb4KT.mjs +14 -0
- package/dist/useTableSort--XMWjujs.d.cts +51 -0
- package/dist/useTableSort-CpDs4cGq.d.mts +51 -0
- package/dist/utils/styleCache.cjs +7 -0
- package/dist/utils/styleCache.d.cts +3 -0
- package/dist/utils/styleCache.d.mts +4 -0
- package/dist/utils/styleCache.mjs +5 -0
- package/dist/utils.cjs +65 -0
- package/dist/utils.d.cts +39 -0
- package/dist/utils.d.mts +39 -0
- package/dist/utils.mjs +58 -0
- package/package.json +125 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { a as createShouldForwardProp, c as props, d as styled, l as src_exports } from "./src-DcNT2aIK.mjs";
|
|
2
|
+
import { PaginationItem } from "./Pagination/PaginationItem.mjs";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/Pagination/hooks/usePagination.ts
|
|
6
|
+
const range = (start, end) => Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
7
|
+
/**
|
|
8
|
+
* Headless pagination model — computes the item list (nav buttons, page numbers,
|
|
9
|
+
* ellipses) with selection, boundary disabling, and controlled/uncontrolled paging.
|
|
10
|
+
*/
|
|
11
|
+
function usePagination({ count, page: pageProp, defaultPage = 1, siblingCount = 1, boundaryCount = 1, disabled = false, shouldShowFirstButton = false, shouldShowLastButton = false, shouldHidePrevButton = false, shouldHideNextButton = false, onChange }) {
|
|
12
|
+
const [pageState, setPageState] = useState(defaultPage);
|
|
13
|
+
const page = pageProp ?? pageState;
|
|
14
|
+
const handleClick = (value) => {
|
|
15
|
+
if (pageProp === void 0) setPageState(value);
|
|
16
|
+
onChange?.(value);
|
|
17
|
+
};
|
|
18
|
+
const startPages = range(1, Math.min(boundaryCount, count));
|
|
19
|
+
const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);
|
|
20
|
+
const siblingsStart = Math.max(Math.min(page - siblingCount, count - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);
|
|
21
|
+
const siblingsEnd = Math.min(Math.max(page + siblingCount, boundaryCount + siblingCount * 2 + 2), endPages.length > 0 ? endPages[0] - 2 : count - 1);
|
|
22
|
+
const startEllipsisFallback = boundaryCount + 1 < count - boundaryCount ? [boundaryCount + 1] : [];
|
|
23
|
+
const endEllipsisFallback = count - boundaryCount > boundaryCount ? [count - boundaryCount] : [];
|
|
24
|
+
const itemList = [
|
|
25
|
+
...shouldShowFirstButton ? ["first"] : [],
|
|
26
|
+
...shouldHidePrevButton ? [] : ["previous"],
|
|
27
|
+
...startPages,
|
|
28
|
+
...siblingsStart > boundaryCount + 2 ? ["start-ellipsis"] : startEllipsisFallback,
|
|
29
|
+
...range(siblingsStart, siblingsEnd),
|
|
30
|
+
...siblingsEnd < count - boundaryCount - 1 ? ["end-ellipsis"] : endEllipsisFallback,
|
|
31
|
+
...endPages,
|
|
32
|
+
...shouldHideNextButton ? [] : ["next"],
|
|
33
|
+
...shouldShowLastButton ? ["last"] : []
|
|
34
|
+
];
|
|
35
|
+
const navTargets = {
|
|
36
|
+
first: 1,
|
|
37
|
+
previous: page - 1,
|
|
38
|
+
next: page + 1,
|
|
39
|
+
last: count
|
|
40
|
+
};
|
|
41
|
+
return { items: itemList.map((item) => {
|
|
42
|
+
if (typeof item === "number") return {
|
|
43
|
+
type: "page",
|
|
44
|
+
page: item,
|
|
45
|
+
isSelected: item === page,
|
|
46
|
+
isDisabled: disabled,
|
|
47
|
+
onClick: () => handleClick(item)
|
|
48
|
+
};
|
|
49
|
+
if (item === "start-ellipsis" || item === "end-ellipsis") return {
|
|
50
|
+
type: item,
|
|
51
|
+
page: null,
|
|
52
|
+
isSelected: false,
|
|
53
|
+
isDisabled: true
|
|
54
|
+
};
|
|
55
|
+
const target = navTargets[item];
|
|
56
|
+
return {
|
|
57
|
+
type: item,
|
|
58
|
+
page: target,
|
|
59
|
+
isSelected: false,
|
|
60
|
+
isDisabled: disabled || (item === "first" || item === "previous" ? page <= 1 : page >= count),
|
|
61
|
+
onClick: () => handleClick(target)
|
|
62
|
+
};
|
|
63
|
+
}) };
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/Pagination/Pagination.tsx
|
|
67
|
+
const defaultGetItemAriaLabel = (type, page, isSelected) => {
|
|
68
|
+
if (type === "page") return isSelected ? `page ${page}` : `Go to page ${page}`;
|
|
69
|
+
return `Go to ${type} page`;
|
|
70
|
+
};
|
|
71
|
+
const shouldForwardProp = createShouldForwardProp([...props]);
|
|
72
|
+
const PaginationNav = styled("nav", {
|
|
73
|
+
name: "Pagination",
|
|
74
|
+
label: "PaginationNav",
|
|
75
|
+
shouldForwardProp,
|
|
76
|
+
systemProps: [src_exports.space]
|
|
77
|
+
})();
|
|
78
|
+
const PaginationList = styled("ul", {
|
|
79
|
+
name: "Pagination",
|
|
80
|
+
slot: "list",
|
|
81
|
+
label: "Pagination",
|
|
82
|
+
shouldForwardProp
|
|
83
|
+
})({
|
|
84
|
+
display: "flex",
|
|
85
|
+
flexWrap: "wrap",
|
|
86
|
+
alignItems: "center",
|
|
87
|
+
gap: "0.25rem",
|
|
88
|
+
listStyle: "none",
|
|
89
|
+
margin: 0,
|
|
90
|
+
padding: 0
|
|
91
|
+
});
|
|
92
|
+
function Pagination({ count, page, defaultPage, siblingCount, boundaryCount, disabled, shouldShowFirstButton, shouldShowLastButton, shouldHidePrevButton, shouldHideNextButton, onChange, color, variant, shape, size, getItemAriaLabel = defaultGetItemAriaLabel, "aria-label": ariaLabel = "pagination navigation", ...rest }) {
|
|
93
|
+
const { items } = usePagination({
|
|
94
|
+
count,
|
|
95
|
+
page,
|
|
96
|
+
defaultPage,
|
|
97
|
+
siblingCount,
|
|
98
|
+
boundaryCount,
|
|
99
|
+
disabled,
|
|
100
|
+
shouldShowFirstButton,
|
|
101
|
+
shouldShowLastButton,
|
|
102
|
+
shouldHidePrevButton,
|
|
103
|
+
shouldHideNextButton,
|
|
104
|
+
onChange
|
|
105
|
+
});
|
|
106
|
+
return /* @__PURE__ */ jsx(PaginationNav, {
|
|
107
|
+
"aria-label": ariaLabel,
|
|
108
|
+
...rest,
|
|
109
|
+
children: /* @__PURE__ */ jsx(PaginationList, { children: items.map((item, index) => {
|
|
110
|
+
const isEllipsis = item.type === "start-ellipsis" || item.type === "end-ellipsis";
|
|
111
|
+
return /* @__PURE__ */ jsx("li", {
|
|
112
|
+
"aria-hidden": isEllipsis || void 0,
|
|
113
|
+
children: /* @__PURE__ */ jsx(PaginationItem, {
|
|
114
|
+
type: item.type,
|
|
115
|
+
page: item.page,
|
|
116
|
+
isSelected: item.isSelected,
|
|
117
|
+
disabled: item.isDisabled,
|
|
118
|
+
onClick: item.onClick,
|
|
119
|
+
color,
|
|
120
|
+
variant,
|
|
121
|
+
shape,
|
|
122
|
+
size,
|
|
123
|
+
"aria-label": isEllipsis ? void 0 : getItemAriaLabel(item.type, item.page, item.isSelected)
|
|
124
|
+
})
|
|
125
|
+
}, `${item.type}-${item.page ?? index}`);
|
|
126
|
+
}) })
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
export { Pagination, PaginationItem, usePagination };
|
package/dist/Paper.cjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_src = require("./src-BiocWFSR.cjs");
|
|
3
|
+
const require_themeDefault = require("./themeDefault-B-QjpGEO.cjs");
|
|
4
|
+
const require_Flex = require("./Flex.cjs");
|
|
5
|
+
require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
8
|
+
let _emotion_react = require("@emotion/react");
|
|
9
|
+
//#region src/Paper/Paper.tsx
|
|
10
|
+
const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([
|
|
11
|
+
"elevation",
|
|
12
|
+
"aspectRatio",
|
|
13
|
+
"transition",
|
|
14
|
+
"borderColor",
|
|
15
|
+
"borderWidth",
|
|
16
|
+
"borderStyle"
|
|
17
|
+
]);
|
|
18
|
+
const paperSystem = (0, require_src.src_exports.system)({
|
|
19
|
+
elevation: {
|
|
20
|
+
property: "boxShadow",
|
|
21
|
+
scale: "shadows"
|
|
22
|
+
},
|
|
23
|
+
aspectRatio: { property: "aspectRatio" },
|
|
24
|
+
transition: { property: "transition" },
|
|
25
|
+
borderColor: {
|
|
26
|
+
property: "borderColor",
|
|
27
|
+
scale: "border"
|
|
28
|
+
},
|
|
29
|
+
borderWidth: {
|
|
30
|
+
property: "borderWidth",
|
|
31
|
+
scale: "borderWidths"
|
|
32
|
+
},
|
|
33
|
+
borderStyle: { property: "borderStyle" }
|
|
34
|
+
});
|
|
35
|
+
const PaperRoot = require_src.styled(require_Flex.Flex, {
|
|
36
|
+
name: "Paper",
|
|
37
|
+
label: "paper",
|
|
38
|
+
shouldForwardProp
|
|
39
|
+
})(paperSystem);
|
|
40
|
+
function Paper({ elevation = 1, p = 2, bg, borderRadius, ...rest }) {
|
|
41
|
+
const theme = (0, _emotion_react.useTheme)();
|
|
42
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaperRoot, {
|
|
43
|
+
elevation,
|
|
44
|
+
p,
|
|
45
|
+
bg: bg ?? require_themeDefault.themeDefault(theme, "surfaceBg", "paper"),
|
|
46
|
+
borderRadius: borderRadius ?? require_themeDefault.themeDefault(theme, "surfaceRadius", "sq"),
|
|
47
|
+
...rest
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.Paper = Paper;
|
package/dist/Paper.d.cts
ADDED
package/dist/Paper.d.mts
ADDED
package/dist/Paper.mjs
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { a as createShouldForwardProp, d as styled, l as src_exports, u as useTheme } from "./src-DcNT2aIK.mjs";
|
|
2
|
+
import { t as themeDefault } from "./themeDefault-CjXaY3ok.mjs";
|
|
3
|
+
import { Flex } from "./Flex.mjs";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/Paper/Paper.tsx
|
|
7
|
+
const shouldForwardProp = createShouldForwardProp([
|
|
8
|
+
"elevation",
|
|
9
|
+
"aspectRatio",
|
|
10
|
+
"transition",
|
|
11
|
+
"borderColor",
|
|
12
|
+
"borderWidth",
|
|
13
|
+
"borderStyle"
|
|
14
|
+
]);
|
|
15
|
+
const paperSystem = (0, src_exports.system)({
|
|
16
|
+
elevation: {
|
|
17
|
+
property: "boxShadow",
|
|
18
|
+
scale: "shadows"
|
|
19
|
+
},
|
|
20
|
+
aspectRatio: { property: "aspectRatio" },
|
|
21
|
+
transition: { property: "transition" },
|
|
22
|
+
borderColor: {
|
|
23
|
+
property: "borderColor",
|
|
24
|
+
scale: "border"
|
|
25
|
+
},
|
|
26
|
+
borderWidth: {
|
|
27
|
+
property: "borderWidth",
|
|
28
|
+
scale: "borderWidths"
|
|
29
|
+
},
|
|
30
|
+
borderStyle: { property: "borderStyle" }
|
|
31
|
+
});
|
|
32
|
+
const PaperRoot = styled(Flex, {
|
|
33
|
+
name: "Paper",
|
|
34
|
+
label: "paper",
|
|
35
|
+
shouldForwardProp
|
|
36
|
+
})(paperSystem);
|
|
37
|
+
function Paper({ elevation = 1, p = 2, bg, borderRadius, ...rest }) {
|
|
38
|
+
const theme = useTheme();
|
|
39
|
+
return /* @__PURE__ */ jsx(PaperRoot, {
|
|
40
|
+
elevation,
|
|
41
|
+
p,
|
|
42
|
+
bg: bg ?? themeDefault(theme, "surfaceBg", "paper"),
|
|
43
|
+
borderRadius: borderRadius ?? themeDefault(theme, "surfaceRadius", "sq"),
|
|
44
|
+
...rest
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { Paper };
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { a as createShouldForwardProp, d as styled, u as useTheme } from "./src-DcNT2aIK.mjs";
|
|
2
|
+
import { Paper } from "./Paper.mjs";
|
|
3
|
+
import { t as Modal } from "./Modal-DR60peRg.mjs";
|
|
4
|
+
import { useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/Popover/utils/resolveAnchorEl.ts
|
|
7
|
+
/** Resolves the `anchorEl` prop, which may be an element or a function returning one. */
|
|
8
|
+
function resolveAnchorEl(anchorEl) {
|
|
9
|
+
return (typeof anchorEl === "function" ? anchorEl() : anchorEl) ?? null;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/Popover/utils/getOffset.ts
|
|
13
|
+
/** Vertical offset within a rect for an anchor/transform origin keyword or explicit px. */
|
|
14
|
+
function getOffsetTop(rect, vertical) {
|
|
15
|
+
if (typeof vertical === "number") return vertical;
|
|
16
|
+
if (vertical === "center") return rect.height / 2;
|
|
17
|
+
if (vertical === "bottom") return rect.height;
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
/** Horizontal offset within a rect for an anchor/transform origin keyword or explicit px. */
|
|
21
|
+
function getOffsetLeft(rect, horizontal) {
|
|
22
|
+
if (typeof horizontal === "number") return horizontal;
|
|
23
|
+
if (horizontal === "center") return rect.width / 2;
|
|
24
|
+
if (horizontal === "right") return rect.width;
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/Popover/utils/getTransformOriginValue.ts
|
|
29
|
+
/** Serializes a resolved transform origin (in px) to a CSS `transform-origin` value. */
|
|
30
|
+
function getTransformOriginValue(origin) {
|
|
31
|
+
return `${origin.horizontal}px ${origin.vertical}px`;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/Popover/utils/computePopoverPosition.ts
|
|
35
|
+
/** Mirrors a keyword origin to the opposite edge; numbers and `center` are unchanged. */
|
|
36
|
+
function flipVertical(origin) {
|
|
37
|
+
if (origin === "top") return "bottom";
|
|
38
|
+
if (origin === "bottom") return "top";
|
|
39
|
+
return origin;
|
|
40
|
+
}
|
|
41
|
+
function flipHorizontal(origin) {
|
|
42
|
+
if (origin === "left") return "right";
|
|
43
|
+
if (origin === "right") return "left";
|
|
44
|
+
return origin;
|
|
45
|
+
}
|
|
46
|
+
function resolveAxis({ anchorStart, anchorSize, anchorOrigin, transformOrigin, paperSize, viewportSize, margin, offset, flip }) {
|
|
47
|
+
const preferredTransform = offset(paperSize, transformOrigin);
|
|
48
|
+
const preferredPosition = anchorStart + offset(anchorSize, anchorOrigin) - preferredTransform;
|
|
49
|
+
let position = preferredPosition;
|
|
50
|
+
let transformOffset = preferredTransform;
|
|
51
|
+
if (margin != null) {
|
|
52
|
+
const fits = (candidate) => candidate >= margin && candidate + paperSize <= viewportSize - margin;
|
|
53
|
+
if (!fits(preferredPosition)) {
|
|
54
|
+
const flippedTransform = offset(paperSize, flip(transformOrigin));
|
|
55
|
+
const flippedPosition = anchorStart + offset(anchorSize, flip(anchorOrigin)) - flippedTransform;
|
|
56
|
+
if (fits(flippedPosition)) {
|
|
57
|
+
position = flippedPosition;
|
|
58
|
+
transformOffset = flippedTransform;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (position < margin) {
|
|
62
|
+
const diff = position - margin;
|
|
63
|
+
position -= diff;
|
|
64
|
+
transformOffset += diff;
|
|
65
|
+
} else if (position + paperSize > viewportSize - margin) {
|
|
66
|
+
const diff = position + paperSize - (viewportSize - margin);
|
|
67
|
+
position -= diff;
|
|
68
|
+
transformOffset += diff;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
position,
|
|
73
|
+
transformOffset
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Places the paper so its `transformOrigin` meets the anchor's `anchorOrigin`, flipping
|
|
78
|
+
* to the opposite side at a viewport edge and clamping as a fallback. Returns `null`
|
|
79
|
+
* coordinates for `anchorReference === 'none'`.
|
|
80
|
+
*/
|
|
81
|
+
function computePopoverPosition(params) {
|
|
82
|
+
const { anchorReference, anchorRect, anchorPosition, paperRect, anchorOrigin, transformOrigin, viewport, marginThreshold } = params;
|
|
83
|
+
if (anchorReference === "none") return {
|
|
84
|
+
top: null,
|
|
85
|
+
left: null,
|
|
86
|
+
transformOrigin: getTransformOriginValue({
|
|
87
|
+
vertical: getOffsetTop(paperRect, transformOrigin.vertical),
|
|
88
|
+
horizontal: getOffsetLeft(paperRect, transformOrigin.horizontal)
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
const rect = anchorReference === "anchorPosition" ? {
|
|
92
|
+
top: anchorPosition?.top ?? 0,
|
|
93
|
+
left: anchorPosition?.left ?? 0,
|
|
94
|
+
width: 0,
|
|
95
|
+
height: 0
|
|
96
|
+
} : anchorRect ?? {
|
|
97
|
+
top: 0,
|
|
98
|
+
left: 0,
|
|
99
|
+
width: 0,
|
|
100
|
+
height: 0
|
|
101
|
+
};
|
|
102
|
+
const vertical = resolveAxis({
|
|
103
|
+
anchorStart: rect.top,
|
|
104
|
+
anchorSize: rect.height,
|
|
105
|
+
anchorOrigin: anchorOrigin.vertical,
|
|
106
|
+
transformOrigin: transformOrigin.vertical,
|
|
107
|
+
paperSize: paperRect.height,
|
|
108
|
+
viewportSize: viewport.height,
|
|
109
|
+
margin: marginThreshold,
|
|
110
|
+
offset: (size, origin) => getOffsetTop({ height: size }, origin),
|
|
111
|
+
flip: (origin) => flipVertical(origin)
|
|
112
|
+
});
|
|
113
|
+
const horizontal = resolveAxis({
|
|
114
|
+
anchorStart: rect.left,
|
|
115
|
+
anchorSize: rect.width,
|
|
116
|
+
anchorOrigin: anchorOrigin.horizontal,
|
|
117
|
+
transformOrigin: transformOrigin.horizontal,
|
|
118
|
+
paperSize: paperRect.width,
|
|
119
|
+
viewportSize: viewport.width,
|
|
120
|
+
margin: marginThreshold,
|
|
121
|
+
offset: (size, origin) => getOffsetLeft({ width: size }, origin),
|
|
122
|
+
flip: (origin) => flipHorizontal(origin)
|
|
123
|
+
});
|
|
124
|
+
return {
|
|
125
|
+
top: Math.floor(vertical.position),
|
|
126
|
+
left: Math.floor(horizontal.position),
|
|
127
|
+
transformOrigin: getTransformOriginValue({
|
|
128
|
+
vertical: vertical.transformOffset,
|
|
129
|
+
horizontal: horizontal.transformOffset
|
|
130
|
+
})
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/Popover/Popover.tsx
|
|
135
|
+
const ANCHOR_ORIGIN_DEFAULT = {
|
|
136
|
+
vertical: "top",
|
|
137
|
+
horizontal: "left"
|
|
138
|
+
};
|
|
139
|
+
const Positioner = styled("div", {
|
|
140
|
+
name: "Popover",
|
|
141
|
+
slot: "positioner",
|
|
142
|
+
label: "PopoverPositioner",
|
|
143
|
+
shouldForwardProp: createShouldForwardProp(["isPositioned"])
|
|
144
|
+
})(({ isPositioned }) => ({
|
|
145
|
+
position: "absolute",
|
|
146
|
+
...isPositioned ? {} : { opacity: 0 }
|
|
147
|
+
}));
|
|
148
|
+
const Surface = styled(Paper, {
|
|
149
|
+
name: "Popover",
|
|
150
|
+
label: "Popover"
|
|
151
|
+
})({
|
|
152
|
+
overflowY: "auto",
|
|
153
|
+
overflowX: "hidden",
|
|
154
|
+
minWidth: 16,
|
|
155
|
+
minHeight: 16,
|
|
156
|
+
maxWidth: "calc(100vw - 32px)",
|
|
157
|
+
maxHeight: "calc(100vh - 32px)",
|
|
158
|
+
outline: 0
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* @description Positions its content next to an anchor, portaled above the page.
|
|
162
|
+
* Built on `Modal`, so it inherits the portal, optional backdrop, focus management,
|
|
163
|
+
* scroll lock, and Escape/click-away close — then adds anchor positioning
|
|
164
|
+
* (`anchorOrigin`/`transformOrigin`/`marginThreshold`).
|
|
165
|
+
*/
|
|
166
|
+
function Popover({ open, children, anchorEl = null, anchorReference = "anchorEl", anchorPosition, anchorOrigin = ANCHOR_ORIGIN_DEFAULT, transformOrigin = ANCHOR_ORIGIN_DEFAULT, onClose, elevation = 8, marginThreshold = 2, container, action, slotProps, hasBackdrop = false, disableScrollLock = false, disableAriaHidden = false, shouldAutoFocus = true, shouldTrapFocus = true, shouldEnforceFocus = true, shouldRestoreFocus = true, shouldKeepMounted = false, layer = "modal" }) {
|
|
167
|
+
const theme = useTheme();
|
|
168
|
+
const positionerRef = useRef(null);
|
|
169
|
+
const [isPositioned, setIsPositioned] = useState(false);
|
|
170
|
+
const anchorTop = anchorPosition?.top;
|
|
171
|
+
const anchorLeft = anchorPosition?.left;
|
|
172
|
+
const marginThresholdPx = marginThreshold == null ? null : Number.parseFloat(String(theme.space[marginThreshold]));
|
|
173
|
+
const setPositioningStyles = useCallback(() => {
|
|
174
|
+
const element = positionerRef.current;
|
|
175
|
+
if (!element) return;
|
|
176
|
+
const resolved = resolveAnchorEl(anchorEl);
|
|
177
|
+
const positioning = computePopoverPosition({
|
|
178
|
+
anchorReference,
|
|
179
|
+
anchorRect: anchorReference === "anchorEl" && resolved ? resolved.getBoundingClientRect() : null,
|
|
180
|
+
anchorPosition: anchorTop != null && anchorLeft != null ? {
|
|
181
|
+
top: anchorTop,
|
|
182
|
+
left: anchorLeft
|
|
183
|
+
} : void 0,
|
|
184
|
+
paperRect: {
|
|
185
|
+
width: element.offsetWidth,
|
|
186
|
+
height: element.offsetHeight
|
|
187
|
+
},
|
|
188
|
+
anchorOrigin,
|
|
189
|
+
transformOrigin,
|
|
190
|
+
viewport: {
|
|
191
|
+
width: window.innerWidth,
|
|
192
|
+
height: window.innerHeight
|
|
193
|
+
},
|
|
194
|
+
marginThreshold: marginThresholdPx
|
|
195
|
+
});
|
|
196
|
+
if (positioning.top !== null) element.style.top = `${positioning.top}px`;
|
|
197
|
+
if (positioning.left !== null) element.style.left = `${positioning.left}px`;
|
|
198
|
+
element.style.transformOrigin = positioning.transformOrigin;
|
|
199
|
+
setIsPositioned(true);
|
|
200
|
+
}, [
|
|
201
|
+
anchorEl,
|
|
202
|
+
anchorReference,
|
|
203
|
+
anchorTop,
|
|
204
|
+
anchorLeft,
|
|
205
|
+
anchorOrigin,
|
|
206
|
+
transformOrigin,
|
|
207
|
+
marginThresholdPx
|
|
208
|
+
]);
|
|
209
|
+
useLayoutEffect(() => {
|
|
210
|
+
if (open) setPositioningStyles();
|
|
211
|
+
});
|
|
212
|
+
useEffect(() => {
|
|
213
|
+
if (!open) return;
|
|
214
|
+
const handle = () => setPositioningStyles();
|
|
215
|
+
window.addEventListener("resize", handle);
|
|
216
|
+
if (disableScrollLock) window.addEventListener("scroll", handle, true);
|
|
217
|
+
return () => {
|
|
218
|
+
window.removeEventListener("resize", handle);
|
|
219
|
+
window.removeEventListener("scroll", handle, true);
|
|
220
|
+
};
|
|
221
|
+
}, [
|
|
222
|
+
open,
|
|
223
|
+
disableScrollLock,
|
|
224
|
+
setPositioningStyles
|
|
225
|
+
]);
|
|
226
|
+
useImperativeHandle(action, () => ({ updatePosition: setPositioningStyles }), [setPositioningStyles]);
|
|
227
|
+
return /* @__PURE__ */ jsx(Modal, {
|
|
228
|
+
isOpen: open,
|
|
229
|
+
onClose,
|
|
230
|
+
hasBackdrop,
|
|
231
|
+
shouldKeepMounted,
|
|
232
|
+
shouldLockScroll: !disableScrollLock,
|
|
233
|
+
disableAriaHidden,
|
|
234
|
+
shouldAutoFocus,
|
|
235
|
+
shouldTrapFocus,
|
|
236
|
+
shouldEnforceFocus,
|
|
237
|
+
shouldRestoreFocus,
|
|
238
|
+
portalContainer: container,
|
|
239
|
+
layer,
|
|
240
|
+
children: /* @__PURE__ */ jsx(Positioner, {
|
|
241
|
+
ref: positionerRef,
|
|
242
|
+
isPositioned,
|
|
243
|
+
children: /* @__PURE__ */ jsx(Surface, {
|
|
244
|
+
elevation,
|
|
245
|
+
...slotProps?.paper,
|
|
246
|
+
children
|
|
247
|
+
})
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
export { Popover as t };
|