@soroush.tech/design-system 0.1.0 → 1.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/README.md +47 -36
- package/dist/AppBar.cjs +2 -2
- package/dist/AppBar.d.cts +3 -2
- package/dist/AppBar.d.mts +3 -2
- package/dist/AppBar.mjs +2 -2
- package/dist/Avatar.cjs +4 -4
- package/dist/Avatar.d.cts +3 -2
- package/dist/Avatar.d.mts +3 -2
- package/dist/Avatar.mjs +3 -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 +5 -12
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +3 -9
- package/dist/ButtonGroup.cjs +2 -2
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/ButtonGroup.mjs +2 -2
- package/dist/Card.cjs +6 -7
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +4 -4
- package/dist/Checkbox.cjs +2 -2
- package/dist/Checkbox.d.cts +42 -1
- package/dist/Checkbox.d.mts +42 -1
- package/dist/Checkbox.mjs +2 -2
- package/dist/CircularProgress.cjs +2 -2
- package/dist/CircularProgress.d.cts +3 -2
- package/dist/CircularProgress.d.mts +3 -2
- package/dist/CircularProgress.mjs +2 -2
- package/dist/Drawer.cjs +2 -2
- package/dist/Drawer.d.cts +2 -2
- package/dist/Drawer.d.mts +2 -2
- package/dist/Drawer.mjs +2 -2
- package/dist/Flex.cjs +3 -7
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +3 -9
- package/dist/FocusTrap.cjs +1 -1
- package/dist/FocusTrap.mjs +1 -1
- package/dist/Form.cjs +2 -3
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/Form.mjs +2 -3
- package/dist/{FormContext-CRmRgDgu.cjs → FormContext-BGCsWAFc.cjs} +0 -1
- package/dist/{FormContext-_G3sxJyQ.mjs → FormContext-LrjAGe6U.mjs} +0 -1
- package/dist/FormControl.cjs +6 -6
- package/dist/FormControl.d.cts +2 -2
- package/dist/FormControl.d.mts +2 -2
- package/dist/FormControl.mjs +5 -5
- package/dist/{FormControlContext-aeKTjRKY.cjs → FormControlContext-74gvPGFk.cjs} +0 -1
- package/dist/{FormControlContext-CyxdOxdN.mjs → FormControlContext-CC2kToms.mjs} +0 -1
- package/dist/FormHelperText.cjs +3 -3
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormHelperText.mjs +3 -3
- package/dist/FormLabel.cjs +3 -3
- package/dist/FormLabel.d.cts +17 -1
- package/dist/FormLabel.d.mts +17 -1
- package/dist/FormLabel.mjs +3 -3
- package/dist/Grid.cjs +3 -26
- package/dist/Grid.d.cts +4 -10
- package/dist/Grid.d.mts +4 -10
- package/dist/Grid.mjs +3 -25
- package/dist/{Icon-1YtNCUKo.cjs → Icon-BOjk5r39.cjs} +75 -5
- package/dist/{Icon-CAKRmFz3.mjs → Icon-CYjD0Bad.mjs} +74 -3
- 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 +16 -1
- package/dist/Image.d.mts +16 -1
- package/dist/Image.mjs +1 -1
- package/dist/LinearProgress.cjs +2 -2
- package/dist/LinearProgress.d.cts +3 -2
- package/dist/LinearProgress.d.mts +3 -2
- package/dist/LinearProgress.mjs +2 -2
- package/dist/Link.cjs +5 -9
- package/dist/Link.d.cts +9 -1
- package/dist/Link.d.mts +9 -1
- package/dist/Link.mjs +4 -7
- package/dist/MenuItem.cjs +6 -7
- package/dist/MenuItem.d.cts +2 -1
- package/dist/MenuItem.d.mts +2 -1
- package/dist/MenuItem.mjs +4 -3
- package/dist/{Modal-BDMPTSXv.cjs → Modal-DZH-DzMZ.cjs} +2 -2
- package/dist/{Modal-DR60peRg.mjs → Modal-dy5l7gfH.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 +5 -5
- package/dist/NativeSelect.d.cts +3 -2
- package/dist/NativeSelect.d.mts +3 -2
- package/dist/NativeSelect.mjs +4 -3
- 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 +1 -1
- package/dist/Pagination.d.cts +2 -22
- package/dist/Pagination.d.mts +2 -22
- package/dist/Pagination.mjs +1 -1
- package/dist/Paper.cjs +5 -8
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +3 -4
- package/dist/{Popover-B61J7C79.mjs → Popover-Chgtjn-N.mjs} +3 -2
- package/dist/{Popover-CRDLmywF.cjs → Popover-pEVboMZO.cjs} +4 -4
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +4 -3
- package/dist/Popover.d.mts +4 -3
- package/dist/Popover.mjs +1 -1
- package/dist/Pressable.cjs +123 -0
- package/dist/Pressable.d.cts +2 -0
- package/dist/Pressable.d.mts +2 -0
- package/dist/Pressable.mjs +121 -0
- package/dist/Quote.cjs +1 -1
- package/dist/Quote.d.cts +13 -1
- package/dist/Quote.d.mts +13 -1
- package/dist/Quote.mjs +1 -1
- package/dist/Radio.cjs +2 -2
- package/dist/Radio.d.cts +2 -2
- package/dist/Radio.d.mts +2 -2
- package/dist/Radio.mjs +2 -2
- package/dist/Select.cjs +10 -32
- package/dist/Select.d.cts +3 -2
- package/dist/Select.d.mts +3 -2
- package/dist/Select.mjs +9 -30
- package/dist/Sidebar/Sidebar.cjs +94 -0
- package/dist/Sidebar/Sidebar.d.cts +59 -0
- package/dist/Sidebar/Sidebar.d.mts +59 -0
- package/dist/Sidebar/Sidebar.mjs +93 -0
- package/dist/Sidebar/SidebarItem.cjs +125 -0
- package/dist/Sidebar/SidebarItem.d.cts +39 -0
- package/dist/Sidebar/SidebarItem.d.mts +39 -0
- package/dist/Sidebar/SidebarItem.mjs +124 -0
- package/dist/Sidebar.cjs +7 -0
- package/dist/Sidebar.d.cts +4 -0
- package/dist/Sidebar.d.mts +4 -0
- package/dist/Sidebar.mjs +4 -0
- package/dist/SidebarContext-DgSLwjur.mjs +10 -0
- package/dist/SidebarContext-ao6lRfTX.d.cts +37 -0
- package/dist/SidebarContext-ao6lRfTX.d.mts +37 -0
- package/dist/SidebarContext-jG6OioC-.cjs +14 -0
- package/dist/Skeleton.cjs +1 -1
- package/dist/Skeleton.d.cts +2 -1
- package/dist/Skeleton.d.mts +2 -1
- package/dist/Skeleton.mjs +1 -1
- package/dist/Switch.cjs +4 -4
- package/dist/Switch.d.cts +2 -1
- package/dist/Switch.d.mts +2 -1
- package/dist/Switch.mjs +3 -2
- package/dist/Table/Table.cjs +2 -2
- package/dist/Table/Table.d.cts +47 -1
- package/dist/Table/Table.d.mts +47 -1
- package/dist/Table/Table.mjs +2 -2
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.d.cts +21 -1
- package/dist/Table/TableBody.d.mts +21 -1
- package/dist/Table/TableBody.mjs +1 -1
- package/dist/Table/TableCell.cjs +3 -3
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableCell.mjs +3 -3
- package/dist/Table/TableContainer.cjs +1 -1
- package/dist/Table/TableContainer.d.cts +17 -1
- package/dist/Table/TableContainer.d.mts +17 -1
- package/dist/Table/TableContainer.mjs +1 -1
- package/dist/Table/TableControl.d.cts +27 -1
- package/dist/Table/TableControl.d.mts +27 -1
- package/dist/Table/TableFooter.cjs +1 -1
- package/dist/Table/TableFooter.d.cts +21 -1
- package/dist/Table/TableFooter.d.mts +21 -1
- package/dist/Table/TableFooter.mjs +1 -1
- package/dist/Table/TableHead.cjs +1 -1
- package/dist/Table/TableHead.d.cts +21 -1
- package/dist/Table/TableHead.d.mts +21 -1
- package/dist/Table/TableHead.mjs +1 -1
- package/dist/Table/TablePagination.cjs +1 -1
- package/dist/Table/TablePagination.d.cts +44 -1
- package/dist/Table/TablePagination.d.mts +44 -1
- package/dist/Table/TablePagination.mjs +1 -1
- package/dist/Table/TablePaginationActions.cjs +4 -4
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +3 -2
- package/dist/Table/TableRow.cjs +3 -3
- package/dist/Table/TableRow.d.cts +29 -1
- package/dist/Table/TableRow.d.mts +29 -1
- package/dist/Table/TableRow.mjs +3 -3
- package/dist/Table/TableSortLabel.cjs +3 -3
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +3 -3
- package/dist/Table/hooks.d.cts +39 -2
- package/dist/Table/hooks.d.mts +39 -2
- package/dist/Table.cjs +1 -1
- package/dist/Table.d.cts +14 -15
- package/dist/Table.d.mts +14 -15
- package/dist/Table.mjs +1 -1
- package/dist/{TableContext-qqp35o8z.cjs → TableContext-Bfg1C3Sr.cjs} +0 -1
- package/dist/{TableContext-2qH7XYJB.d.cts → TableContext-BoOxdk8p.d.cts} +1 -1
- package/dist/{TableContext-2qH7XYJB.d.mts → TableContext-DV31j6HO.d.mts} +1 -1
- package/dist/{TableContext-BRWPghAI.mjs → TableContext-Dyr89h_k.mjs} +0 -1
- package/dist/TextInput.cjs +228 -2
- package/dist/TextInput.d.cts +79 -1
- package/dist/TextInput.d.mts +79 -1
- package/dist/TextInput.mjs +226 -1
- package/dist/ToggleButton/ToggleButton.cjs +4 -4
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.mjs +3 -2
- package/dist/ToggleButton/ToggleButtonGroup.cjs +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.mjs +3 -2
- package/dist/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton.d.mts +1 -1
- package/dist/Typography.cjs +3 -3
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +2 -1
- package/dist/View.cjs +1 -3
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +1 -3
- package/dist/emotion-BAyqVw0c.mjs +6 -0
- package/dist/emotion-DviPkkGL.cjs +10 -0
- package/dist/engine.cjs +80 -0
- package/dist/engine.d.cts +21 -0
- package/dist/engine.d.mts +21 -0
- package/dist/engine.mjs +69 -0
- package/dist/{index-BqVgv2B_.d.mts → index--mvTGo8F.d.cts} +3 -2
- package/dist/{index-DSCMXFTn.d.cts → index-ATXjtAOY.d.mts} +2 -1
- package/dist/{index-CDVnvjIE.d.cts → index-B2hrssyF.d.mts} +2 -2
- package/dist/index-B3FrhO2r.d.cts +24 -0
- package/dist/{index-BnzUumAC2.d.mts → index-B7aaTHOe.d.cts} +2 -1
- package/dist/{index-DmJIuQJj.d.mts → index-BItZoGZ1.d.mts} +3 -2
- package/dist/{index-DASvoACZ.d.cts → index-BJ8OC_Zh.d.cts} +2 -2
- package/dist/{index-BLfFycfJ.d.mts → index-BL3jwIQU.d.mts} +9 -2
- package/dist/{index-4rC2j7fR.d.cts → index-BNP_iejT.d.cts} +3 -2
- package/dist/{index-Dy03o__A.d.mts → index-BfpjEqqt.d.cts} +2 -1
- package/dist/index-BoOs5h_b.d.mts +53 -0
- package/dist/{index-CeYkEXU2.d.cts → index-BwUnDd9W.d.mts} +2 -2
- package/dist/{index-BH8jQOdF.d.mts → index-C7j38wne.d.mts} +3 -2
- package/dist/{index-Dp81rWM1.d.cts → index-CA_X-mXg.d.cts} +9 -2
- package/dist/index-CO3Qq0I0.d.mts +49 -0
- package/dist/{index-BLRMuO_x.d.mts → index-CYTaYcm3.d.cts} +3 -4
- package/dist/index-Ca0Pj5m2.d.mts +24 -0
- package/dist/{index-DE5PtzPn.d.mts → index-CvaEVk-f.d.cts} +2 -2
- package/dist/{index-C0xMvDjL.d.mts → index-D8U2tk1L.d.mts} +2 -2
- package/dist/{index-Dm9HfgV6.d.mts → index-D8b5OCLe.d.mts} +17 -7
- package/dist/{index-B1rCD6Oo.d.cts → index-DEv2QslH.d.mts} +4 -6
- package/dist/{index-CyZYXDn0.d.cts → index-DF3Hweir.d.mts} +3 -2
- package/dist/{index-Bihpwn75.d.cts → index-DLJ-li1B.d.cts} +17 -7
- package/dist/{index-FwTocqhP.d.cts → index-DjtGkwRM.d.cts} +2 -3
- package/dist/{index-BX5-NfbX.d.cts → index-Ds__py2h.d.mts} +2 -1
- package/dist/{index-x80UG39F.d.cts → index-KZUd8B5E.d.mts} +3 -4
- package/dist/index-MsUtFRul.d.cts +53 -0
- package/dist/index-dtLxevvf.d.cts +49 -0
- package/dist/{index-pX7tBQdJ.d.mts → index-q6EgsH9R.d.mts} +2 -3
- package/dist/{index-8dzWTpFp.d.cts → index-v99yMdts.d.cts} +3 -2
- package/dist/{index-CxSNNzBT2.d.mts → index-yr4HkKOj.d.cts} +2 -2
- package/dist/{index-z35LEYG8.d.mts → index-zFYi0f1t.d.cts} +4 -6
- package/dist/index.cjs +2 -32
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{src-DcNT2aIK.mjs → src-BJy4dM4f.mjs} +5 -10
- package/dist/{src-BiocWFSR.cjs → src-C8PIppTy.cjs} +2 -7
- package/dist/{hooks.cjs → style.cjs} +5 -23
- package/dist/style.d.cts +23 -0
- package/dist/style.d.mts +23 -0
- package/dist/{hooks.mjs → style.mjs} +6 -16
- package/dist/theme-Du6xgPsg.cjs +470 -0
- package/dist/{themes.mjs → theme-V6lYzd3j.mjs} +68 -14
- package/dist/theme.cjs +23 -0
- package/dist/theme.d.cts +3 -0
- package/dist/theme.d.mts +3 -0
- package/dist/theme.mjs +3 -0
- package/dist/{themeDefault-B-QjpGEO.cjs → themeDefault-Cebi08Cv.cjs} +1 -1
- package/dist/{themeDefault-CjXaY3ok.mjs → themeDefault-Z3KmyIbm.mjs} +1 -1
- package/dist/themes-CUV79qWU.d.cts +503 -0
- package/dist/themes-CUV79qWU.d.mts +503 -0
- package/dist/{useTableSort--XMWjujs.d.cts → useTablePagination-7jiSvKCh.d.cts} +25 -25
- package/dist/{useTableSort-CpDs4cGq.d.mts → useTablePagination-HaIcJPv-.d.mts} +25 -25
- package/dist/utils.cjs +0 -29
- package/dist/utils.d.cts +1 -19
- package/dist/utils.d.mts +1 -19
- package/dist/utils.mjs +1 -27
- package/package.json +431 -24
- package/dist/CodeBlock.cjs +0 -101
- package/dist/CodeBlock.d.cts +0 -2
- package/dist/CodeBlock.d.mts +0 -2
- package/dist/CodeBlock.mjs +0 -100
- package/dist/Field.cjs +0 -59
- package/dist/Field.d.cts +0 -36
- package/dist/Field.d.mts +0 -36
- package/dist/Field.mjs +0 -58
- package/dist/Markdown/Control.cjs +0 -61
- package/dist/Markdown/Control.d.cts +0 -18
- package/dist/Markdown/Control.d.mts +0 -18
- package/dist/Markdown/Control.mjs +0 -60
- package/dist/Markdown/Editor.cjs +0 -130
- package/dist/Markdown/Editor.d.cts +0 -40
- package/dist/Markdown/Editor.d.mts +0 -40
- package/dist/Markdown/Editor.mjs +0 -128
- package/dist/Markdown/Preview.cjs +0 -241
- package/dist/Markdown/Preview.d.cts +0 -55
- package/dist/Markdown/Preview.d.mts +0 -55
- package/dist/Markdown/Preview.mjs +0 -236
- package/dist/Markdown/Toolbar.cjs +0 -4
- package/dist/Markdown/Toolbar.d.cts +0 -13
- package/dist/Markdown/Toolbar.d.mts +0 -13
- package/dist/Markdown/Toolbar.mjs +0 -2
- package/dist/Markdown.cjs +0 -13
- package/dist/Markdown.d.cts +0 -80
- package/dist/Markdown.d.mts +0 -80
- package/dist/Markdown.mjs +0 -6
- package/dist/MarkdownContext-BN8A3W-J.mjs +0 -11
- package/dist/MarkdownContext-DSwjzpH8.cjs +0 -22
- package/dist/TextInput-6o37Zddp.cjs +0 -231
- package/dist/TextInput-D_lHYJlL.mjs +0 -224
- package/dist/ThemeProvider.cjs +0 -15
- package/dist/ThemeProvider.d.cts +0 -20
- package/dist/ThemeProvider.d.mts +0 -20
- package/dist/ThemeProvider.mjs +0 -14
- package/dist/Toolbar-B-W22Sk4.cjs +0 -459
- package/dist/Toolbar-KbR97iJS.mjs +0 -448
- package/dist/applyAction-B2B-hnP3.mjs +0 -98
- package/dist/applyAction-B2uVHxOE.cjs +0 -103
- package/dist/createTheme-Dts2F4R_.d.cts +0 -21
- package/dist/createTheme-Dts2F4R_.d.mts +0 -21
- package/dist/hooks/useCopyToClipboard.cjs +0 -33
- package/dist/hooks/useCopyToClipboard.d.cts +0 -16
- package/dist/hooks/useCopyToClipboard.d.mts +0 -16
- package/dist/hooks/useCopyToClipboard.mjs +0 -31
- package/dist/hooks.d.cts +0 -40
- package/dist/hooks.d.mts +0 -40
- package/dist/index-BPrjvi7B.d.cts +0 -13
- package/dist/index-BlfIbAMs.d.cts +0 -45
- package/dist/index-BoqlPb3Z.d.mts +0 -13
- package/dist/index-Bwi4kRpf.d.mts +0 -79
- package/dist/index-Bx24ZnOV.d.mts +0 -43
- package/dist/index-C-P_hipv.d.mts +0 -21
- package/dist/index-C5_ciaeo.d.cts +0 -79
- package/dist/index-CDcGTGR4.d.cts +0 -21
- package/dist/index-CEOZI-6L.d.mts +0 -48
- package/dist/index-CLU39rUS2.d.mts +0 -30
- package/dist/index-CM_KCTee.d.cts +0 -48
- package/dist/index-CT9uGKrs.d.cts +0 -30
- package/dist/index-CcYSvIJi.d.cts +0 -21
- package/dist/index-CdF_4ckE.d.mts +0 -11
- package/dist/index-Cl_yBpzW2.d.mts +0 -13
- package/dist/index-Cv_UOfYx.d.mts +0 -18
- package/dist/index-DBGE6yKw.d.mts +0 -16
- package/dist/index-DCQ2fsDu.d.mts +0 -40
- package/dist/index-DD2AVtiR.d.cts +0 -16
- package/dist/index-DOPXpr2J.d.cts +0 -43
- package/dist/index-DTkQSXQD.d.cts +0 -11
- package/dist/index-DeJWkpf9.d.cts +0 -16
- package/dist/index-DeiZHSwA.d.cts +0 -12
- package/dist/index-Des8BisQ.d.mts +0 -12
- package/dist/index-Dg8-CPOO.d.cts +0 -18
- package/dist/index-DgRS5Aqv.d.mts +0 -16
- package/dist/index-Dtzj8X58.d.cts +0 -40
- package/dist/index-DvW2eETV.d.mts +0 -21
- package/dist/index-GVsFY00r.d.cts +0 -21
- package/dist/index-Nqco3fsM.d.cts +0 -13
- package/dist/index-g-9DZ_KQ.d.cts +0 -28
- package/dist/index-g9EThkSg.d.mts +0 -21
- package/dist/index-kpk9e3xM2.d.mts +0 -45
- package/dist/index-u57CbuAU2.d.mts +0 -28
- package/dist/themes-D1SAp3SL.d.mts +0 -500
- package/dist/themes-D81JYbqm.d.cts +0 -500
- package/dist/themes.cjs +0 -318
- package/dist/themes.d.cts +0 -3
- package/dist/themes.d.mts +0 -3
- package/dist/useDefaultProps-Cb-5FNok.cjs +0 -19
- package/dist/useDefaultProps-CoApb4KT.mjs +0 -14
- package/dist/utils/styleCache.cjs +0 -7
- package/dist/utils/styleCache.d.cts +0 -3
- package/dist/utils/styleCache.d.mts +0 -4
- package/dist/utils/styleCache.mjs +0 -5
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_src = require("../src-C8PIppTy.cjs");
|
|
3
|
+
const require_Flex = require("../Flex.cjs");
|
|
4
|
+
const require_utils = require("../utils.cjs");
|
|
5
|
+
const require_Typography = require("../Typography.cjs");
|
|
6
|
+
const require_Icon = require("../Icon-BOjk5r39.cjs");
|
|
7
|
+
const require_Portal = require("../Portal.cjs");
|
|
8
|
+
const require_Pressable = require("../Pressable.cjs");
|
|
9
|
+
const require_SidebarContext = require("../SidebarContext-jG6OioC-.cjs");
|
|
10
|
+
let react = require("react");
|
|
11
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
|
+
//#region src/Sidebar/SidebarItem/SidebarItem.tsx
|
|
13
|
+
const densityStyles = ({ theme, size }) => {
|
|
14
|
+
const s = theme.sizes[size];
|
|
15
|
+
return {
|
|
16
|
+
paddingTop: theme.space[s.paddingTop],
|
|
17
|
+
paddingBottom: theme.space[s.paddingBottom],
|
|
18
|
+
paddingLeft: theme.space[s.paddingLeft],
|
|
19
|
+
paddingRight: theme.space[s.paddingRight],
|
|
20
|
+
fontSize: theme.fontSizes[s.fontSize],
|
|
21
|
+
lineHeight: 1,
|
|
22
|
+
whiteSpace: "nowrap"
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const layoutStyles = ({ anchor }) => ({
|
|
26
|
+
width: "100%",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
justifyContent: anchor === "right" ? "flex-end" : "flex-start"
|
|
29
|
+
});
|
|
30
|
+
const stateStyles = ({ theme, color, isSelected, itemVariant, disabled }) => {
|
|
31
|
+
const { main } = theme.palette[color];
|
|
32
|
+
const outlined = itemVariant === "outlined";
|
|
33
|
+
const base = {
|
|
34
|
+
border: `${theme.borderWidths.thin} solid ${outlined ? (0, require_src.src_exports.get)(theme, "border.light") : "transparent"}`,
|
|
35
|
+
borderRadius: theme.radii.sq,
|
|
36
|
+
color: (0, require_src.src_exports.get)(theme, "text.primary"),
|
|
37
|
+
"&:disabled, &[aria-disabled=\"true\"]": { opacity: .5 }
|
|
38
|
+
};
|
|
39
|
+
const hoverFill = (backgroundColor) => disabled ? {} : { "&:hover": { backgroundColor } };
|
|
40
|
+
if (itemVariant === "plain") return {
|
|
41
|
+
...base,
|
|
42
|
+
color: isSelected ? main : (0, require_src.src_exports.get)(theme, "text.primary")
|
|
43
|
+
};
|
|
44
|
+
if (isSelected) return {
|
|
45
|
+
...base,
|
|
46
|
+
backgroundColor: require_utils.alpha(main, .16),
|
|
47
|
+
color: main,
|
|
48
|
+
...outlined && { borderColor: main },
|
|
49
|
+
...hoverFill(require_utils.alpha(main, .24)),
|
|
50
|
+
...disabled ? {} : { "&:active": { backgroundColor: require_utils.alpha(main, .24) } }
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
...base,
|
|
54
|
+
...hoverFill(require_utils.alpha(main, .08))
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
const SidebarItemRoot = require_src.styled(require_Pressable.Pressable, {
|
|
58
|
+
name: "SidebarItem",
|
|
59
|
+
label: "SidebarItem",
|
|
60
|
+
shouldForwardProp: (prop) => prop !== "anchor" && prop !== "isSelected" && prop !== "itemVariant" && prop !== "size"
|
|
61
|
+
})(densityStyles, layoutStyles, stateStyles);
|
|
62
|
+
/**
|
|
63
|
+
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
64
|
+
* shown while the rail is open — the `label` by default, or custom `children`
|
|
65
|
+
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
66
|
+
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
67
|
+
* here — no inherited uppercase, weight, or tracking.
|
|
68
|
+
*/
|
|
69
|
+
function SidebarItem({ icon, label, variant, size = "sm", color = "primary", children, onSelect, onClick, isSelected, ...rest }) {
|
|
70
|
+
const { isOpen, anchor, variant: railVariant, hasPanel, panelId, panelNode, setPanelLabel } = (0, react.useContext)(require_SidebarContext.SidebarContext);
|
|
71
|
+
const resolvedVariant = variant ?? railVariant;
|
|
72
|
+
const ownsPanel = hasPanel && children != null;
|
|
73
|
+
const isPorting = ownsPanel && (isSelected ?? false);
|
|
74
|
+
(0, react.useEffect)(() => {
|
|
75
|
+
if (!isPorting || !setPanelLabel) return;
|
|
76
|
+
setPanelLabel(label);
|
|
77
|
+
return () => setPanelLabel(null);
|
|
78
|
+
}, [
|
|
79
|
+
isPorting,
|
|
80
|
+
label,
|
|
81
|
+
setPanelLabel
|
|
82
|
+
]);
|
|
83
|
+
const handleClick = (event) => {
|
|
84
|
+
onClick?.(event);
|
|
85
|
+
onSelect?.();
|
|
86
|
+
};
|
|
87
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarItemRoot, {
|
|
88
|
+
feedback: resolvedVariant === "plain" ? "none" : "highlight",
|
|
89
|
+
color,
|
|
90
|
+
size,
|
|
91
|
+
itemVariant: resolvedVariant,
|
|
92
|
+
isSelected,
|
|
93
|
+
anchor,
|
|
94
|
+
"aria-label": label,
|
|
95
|
+
"aria-pressed": isSelected ?? false,
|
|
96
|
+
...ownsPanel && {
|
|
97
|
+
"aria-expanded": isSelected ?? false,
|
|
98
|
+
"aria-controls": isPorting ? panelId : void 0
|
|
99
|
+
},
|
|
100
|
+
onClick: handleClick,
|
|
101
|
+
...rest,
|
|
102
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Flex.Flex, {
|
|
103
|
+
as: "span",
|
|
104
|
+
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
gap: 2,
|
|
107
|
+
flexShrink: 0,
|
|
108
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
109
|
+
name: icon,
|
|
110
|
+
size: "1.25rem",
|
|
111
|
+
color: "inherit"
|
|
112
|
+
}), isOpen && ((ownsPanel ? null : children) ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
113
|
+
as: "span",
|
|
114
|
+
variant: "inherit",
|
|
115
|
+
m: 0,
|
|
116
|
+
children: label
|
|
117
|
+
}))]
|
|
118
|
+
})
|
|
119
|
+
}), isPorting && panelNode && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Portal.Portal, {
|
|
120
|
+
container: panelNode,
|
|
121
|
+
children
|
|
122
|
+
})] });
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
exports.SidebarItem = SidebarItem;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "../index-DLJ-li1B.cjs";
|
|
2
|
+
import { h as Theme } from "../themes-CUV79qWU.cjs";
|
|
3
|
+
import { r as IconName } from "../index-CA_X-mXg.cjs";
|
|
4
|
+
import { i as PressableProps } from "../index-dtLxevvf.cjs";
|
|
5
|
+
import { i as SidebarItemVariant } from "../SidebarContext-ao6lRfTX.cjs";
|
|
6
|
+
import { ReactNode } from "react";
|
|
7
|
+
//#region src/Sidebar/SidebarItem/SidebarItem.d.ts
|
|
8
|
+
/** Density token — controls padding and font size. Resolves against `theme.sizes`. */
|
|
9
|
+
type SidebarItemSize = keyof Theme['sizes'];
|
|
10
|
+
interface SidebarItemProps extends Omit<PressableProps, 'children' | 'feedback' | 'activeOpacity' | 'size'> {
|
|
11
|
+
/** Icon shown in both the collapsed and open states — pinned to the anchored edge. */
|
|
12
|
+
icon: IconName;
|
|
13
|
+
/** Accessible name; also the default visible content while open. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Visual style — overrides the enclosing `Sidebar`'s `variant` (default `'text'`). */
|
|
16
|
+
variant?: SidebarItemVariant;
|
|
17
|
+
/** Padding and font size — resolves against `theme.sizes`. Default: `'sm'`. */
|
|
18
|
+
size?: SidebarItemSize;
|
|
19
|
+
/** Active state — drives `aria-pressed` and the selected fill. */
|
|
20
|
+
isSelected?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Custom open-state content rendered instead of the label text (badges,
|
|
23
|
+
* counts, …) — or, under the enclosing `Sidebar`'s `hasPanel`, the content of
|
|
24
|
+
* the panel column, shown while this item is selected.
|
|
25
|
+
*/
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/** Fired when the item is activated. */
|
|
28
|
+
onSelect?: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
32
|
+
* shown while the rail is open — the `label` by default, or custom `children`
|
|
33
|
+
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
34
|
+
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
35
|
+
* here — no inherited uppercase, weight, or tracking.
|
|
36
|
+
*/
|
|
37
|
+
declare function SidebarItem({ icon, label, variant, size, color, children, onSelect, onClick, isSelected, ...rest }: Readonly<SidebarItemProps>): import("react").JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { SidebarItem, SidebarItemProps, SidebarItemSize };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { h as Theme } from "../themes-CUV79qWU.mjs";
|
|
2
|
+
import "../index-D8b5OCLe.mjs";
|
|
3
|
+
import { r as IconName } from "../index-BL3jwIQU.mjs";
|
|
4
|
+
import { i as PressableProps } from "../index-CO3Qq0I0.mjs";
|
|
5
|
+
import { i as SidebarItemVariant } from "../SidebarContext-ao6lRfTX.mjs";
|
|
6
|
+
import { ReactNode } from "react";
|
|
7
|
+
//#region src/Sidebar/SidebarItem/SidebarItem.d.ts
|
|
8
|
+
/** Density token — controls padding and font size. Resolves against `theme.sizes`. */
|
|
9
|
+
type SidebarItemSize = keyof Theme['sizes'];
|
|
10
|
+
interface SidebarItemProps extends Omit<PressableProps, 'children' | 'feedback' | 'activeOpacity' | 'size'> {
|
|
11
|
+
/** Icon shown in both the collapsed and open states — pinned to the anchored edge. */
|
|
12
|
+
icon: IconName;
|
|
13
|
+
/** Accessible name; also the default visible content while open. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Visual style — overrides the enclosing `Sidebar`'s `variant` (default `'text'`). */
|
|
16
|
+
variant?: SidebarItemVariant;
|
|
17
|
+
/** Padding and font size — resolves against `theme.sizes`. Default: `'sm'`. */
|
|
18
|
+
size?: SidebarItemSize;
|
|
19
|
+
/** Active state — drives `aria-pressed` and the selected fill. */
|
|
20
|
+
isSelected?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Custom open-state content rendered instead of the label text (badges,
|
|
23
|
+
* counts, …) — or, under the enclosing `Sidebar`'s `hasPanel`, the content of
|
|
24
|
+
* the panel column, shown while this item is selected.
|
|
25
|
+
*/
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/** Fired when the item is activated. */
|
|
28
|
+
onSelect?: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
32
|
+
* shown while the rail is open — the `label` by default, or custom `children`
|
|
33
|
+
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
34
|
+
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
35
|
+
* here — no inherited uppercase, weight, or tracking.
|
|
36
|
+
*/
|
|
37
|
+
declare function SidebarItem({ icon, label, variant, size, color, children, onSelect, onClick, isSelected, ...rest }: Readonly<SidebarItemProps>): import("react").JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { SidebarItem, SidebarItemProps, SidebarItemSize };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { a as src_exports, o as styled } from "../src-BJy4dM4f.mjs";
|
|
2
|
+
import { Flex } from "../Flex.mjs";
|
|
3
|
+
import { alpha } from "../utils.mjs";
|
|
4
|
+
import { Typography } from "../Typography.mjs";
|
|
5
|
+
import { t as Icon } from "../Icon-CYjD0Bad.mjs";
|
|
6
|
+
import { Portal } from "../Portal.mjs";
|
|
7
|
+
import { Pressable } from "../Pressable.mjs";
|
|
8
|
+
import { t as SidebarContext } from "../SidebarContext-DgSLwjur.mjs";
|
|
9
|
+
import { useContext, useEffect } from "react";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/Sidebar/SidebarItem/SidebarItem.tsx
|
|
12
|
+
const densityStyles = ({ theme, size }) => {
|
|
13
|
+
const s = theme.sizes[size];
|
|
14
|
+
return {
|
|
15
|
+
paddingTop: theme.space[s.paddingTop],
|
|
16
|
+
paddingBottom: theme.space[s.paddingBottom],
|
|
17
|
+
paddingLeft: theme.space[s.paddingLeft],
|
|
18
|
+
paddingRight: theme.space[s.paddingRight],
|
|
19
|
+
fontSize: theme.fontSizes[s.fontSize],
|
|
20
|
+
lineHeight: 1,
|
|
21
|
+
whiteSpace: "nowrap"
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const layoutStyles = ({ anchor }) => ({
|
|
25
|
+
width: "100%",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
justifyContent: anchor === "right" ? "flex-end" : "flex-start"
|
|
28
|
+
});
|
|
29
|
+
const stateStyles = ({ theme, color, isSelected, itemVariant, disabled }) => {
|
|
30
|
+
const { main } = theme.palette[color];
|
|
31
|
+
const outlined = itemVariant === "outlined";
|
|
32
|
+
const base = {
|
|
33
|
+
border: `${theme.borderWidths.thin} solid ${outlined ? (0, src_exports.get)(theme, "border.light") : "transparent"}`,
|
|
34
|
+
borderRadius: theme.radii.sq,
|
|
35
|
+
color: (0, src_exports.get)(theme, "text.primary"),
|
|
36
|
+
"&:disabled, &[aria-disabled=\"true\"]": { opacity: .5 }
|
|
37
|
+
};
|
|
38
|
+
const hoverFill = (backgroundColor) => disabled ? {} : { "&:hover": { backgroundColor } };
|
|
39
|
+
if (itemVariant === "plain") return {
|
|
40
|
+
...base,
|
|
41
|
+
color: isSelected ? main : (0, src_exports.get)(theme, "text.primary")
|
|
42
|
+
};
|
|
43
|
+
if (isSelected) return {
|
|
44
|
+
...base,
|
|
45
|
+
backgroundColor: alpha(main, .16),
|
|
46
|
+
color: main,
|
|
47
|
+
...outlined && { borderColor: main },
|
|
48
|
+
...hoverFill(alpha(main, .24)),
|
|
49
|
+
...disabled ? {} : { "&:active": { backgroundColor: alpha(main, .24) } }
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
...base,
|
|
53
|
+
...hoverFill(alpha(main, .08))
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const SidebarItemRoot = styled(Pressable, {
|
|
57
|
+
name: "SidebarItem",
|
|
58
|
+
label: "SidebarItem",
|
|
59
|
+
shouldForwardProp: (prop) => prop !== "anchor" && prop !== "isSelected" && prop !== "itemVariant" && prop !== "size"
|
|
60
|
+
})(densityStyles, layoutStyles, stateStyles);
|
|
61
|
+
/**
|
|
62
|
+
* One entry of a `Sidebar`: an icon pinned to the anchored edge, plus content
|
|
63
|
+
* shown while the rail is open — the `label` by default, or custom `children`
|
|
64
|
+
* (on a right-anchored rail the content renders to the icon's left). Built on
|
|
65
|
+
* `Pressable`, so it is a real button carrying nothing but the styling declared
|
|
66
|
+
* here — no inherited uppercase, weight, or tracking.
|
|
67
|
+
*/
|
|
68
|
+
function SidebarItem({ icon, label, variant, size = "sm", color = "primary", children, onSelect, onClick, isSelected, ...rest }) {
|
|
69
|
+
const { isOpen, anchor, variant: railVariant, hasPanel, panelId, panelNode, setPanelLabel } = useContext(SidebarContext);
|
|
70
|
+
const resolvedVariant = variant ?? railVariant;
|
|
71
|
+
const ownsPanel = hasPanel && children != null;
|
|
72
|
+
const isPorting = ownsPanel && (isSelected ?? false);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (!isPorting || !setPanelLabel) return;
|
|
75
|
+
setPanelLabel(label);
|
|
76
|
+
return () => setPanelLabel(null);
|
|
77
|
+
}, [
|
|
78
|
+
isPorting,
|
|
79
|
+
label,
|
|
80
|
+
setPanelLabel
|
|
81
|
+
]);
|
|
82
|
+
const handleClick = (event) => {
|
|
83
|
+
onClick?.(event);
|
|
84
|
+
onSelect?.();
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SidebarItemRoot, {
|
|
87
|
+
feedback: resolvedVariant === "plain" ? "none" : "highlight",
|
|
88
|
+
color,
|
|
89
|
+
size,
|
|
90
|
+
itemVariant: resolvedVariant,
|
|
91
|
+
isSelected,
|
|
92
|
+
anchor,
|
|
93
|
+
"aria-label": label,
|
|
94
|
+
"aria-pressed": isSelected ?? false,
|
|
95
|
+
...ownsPanel && {
|
|
96
|
+
"aria-expanded": isSelected ?? false,
|
|
97
|
+
"aria-controls": isPorting ? panelId : void 0
|
|
98
|
+
},
|
|
99
|
+
onClick: handleClick,
|
|
100
|
+
...rest,
|
|
101
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
102
|
+
as: "span",
|
|
103
|
+
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
gap: 2,
|
|
106
|
+
flexShrink: 0,
|
|
107
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
108
|
+
name: icon,
|
|
109
|
+
size: "1.25rem",
|
|
110
|
+
color: "inherit"
|
|
111
|
+
}), isOpen && ((ownsPanel ? null : children) ?? /* @__PURE__ */ jsx(Typography, {
|
|
112
|
+
as: "span",
|
|
113
|
+
variant: "inherit",
|
|
114
|
+
m: 0,
|
|
115
|
+
children: label
|
|
116
|
+
}))]
|
|
117
|
+
})
|
|
118
|
+
}), isPorting && panelNode && /* @__PURE__ */ jsx(Portal, {
|
|
119
|
+
container: panelNode,
|
|
120
|
+
children
|
|
121
|
+
})] });
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { SidebarItem };
|
package/dist/Sidebar.cjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_SidebarContext = require("./SidebarContext-jG6OioC-.cjs");
|
|
3
|
+
const require_Sidebar_Sidebar = require("./Sidebar/Sidebar.cjs");
|
|
4
|
+
const require_Sidebar_SidebarItem = require("./Sidebar/SidebarItem.cjs");
|
|
5
|
+
exports.Sidebar = require_Sidebar_Sidebar.Sidebar;
|
|
6
|
+
exports.SidebarContext = require_SidebarContext.SidebarContext;
|
|
7
|
+
exports.SidebarItem = require_Sidebar_SidebarItem.SidebarItem;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { i as SidebarItemVariant, n as SidebarContext, r as SidebarContextValue, t as SidebarAnchor } from "./SidebarContext-ao6lRfTX.cjs";
|
|
2
|
+
import { Sidebar, SidebarProps } from "./Sidebar/Sidebar.cjs";
|
|
3
|
+
import { SidebarItem, SidebarItemProps, SidebarItemSize } from "./Sidebar/SidebarItem.cjs";
|
|
4
|
+
export { Sidebar, SidebarAnchor, SidebarContext, SidebarContextValue, SidebarItem, SidebarItemProps, SidebarItemSize, SidebarItemVariant, SidebarProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { i as SidebarItemVariant, n as SidebarContext, r as SidebarContextValue, t as SidebarAnchor } from "./SidebarContext-ao6lRfTX.mjs";
|
|
2
|
+
import { Sidebar, SidebarProps } from "./Sidebar/Sidebar.mjs";
|
|
3
|
+
import { SidebarItem, SidebarItemProps, SidebarItemSize } from "./Sidebar/SidebarItem.mjs";
|
|
4
|
+
export { Sidebar, SidebarAnchor, SidebarContext, SidebarContextValue, SidebarItem, SidebarItemProps, SidebarItemSize, SidebarItemVariant, SidebarProps };
|
package/dist/Sidebar.mjs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/Sidebar/SidebarContext.d.ts
|
|
2
|
+
/** Screen edge a `Sidebar` hugs — item labels render away from that edge. */
|
|
3
|
+
type SidebarAnchor = 'left' | 'right';
|
|
4
|
+
/**
|
|
5
|
+
* Visual style of a `SidebarItem`: borderless (`text`, default), `outlined`, or
|
|
6
|
+
* `plain` — no fill and no hover or press feedback, so selection reads through
|
|
7
|
+
* the text color alone.
|
|
8
|
+
*/
|
|
9
|
+
type SidebarItemVariant = 'outlined' | 'text' | 'plain';
|
|
10
|
+
/**
|
|
11
|
+
* State provided by `Sidebar` and consumed by `SidebarItem`: whether labels
|
|
12
|
+
* are shown, which side the rail hugs (decides the label side), the rail-wide
|
|
13
|
+
* default item variant (an item's own `variant` wins), and whether the rail
|
|
14
|
+
* renders a panel column — which decides where an item's `children` go.
|
|
15
|
+
*/
|
|
16
|
+
interface SidebarContextValue {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
anchor: SidebarAnchor;
|
|
19
|
+
variant: SidebarItemVariant;
|
|
20
|
+
/** Whether the rail renders a panel column; items port their children into it. */
|
|
21
|
+
hasPanel: boolean;
|
|
22
|
+
/** `id` of the panel element, so the selected item can point `aria-controls` at it. */
|
|
23
|
+
panelId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The panel's DOM node — the container the selected item ports its `children`
|
|
26
|
+
* into. `null` until the panel has mounted, and whenever `hasPanel` is off.
|
|
27
|
+
*/
|
|
28
|
+
panelNode?: HTMLElement | null;
|
|
29
|
+
/**
|
|
30
|
+
* Publishes the porting item's `label` so the panel can be named after it.
|
|
31
|
+
* Only the name travels through context; the content itself is ported.
|
|
32
|
+
*/
|
|
33
|
+
setPanelLabel?: (label: string | null) => void;
|
|
34
|
+
}
|
|
35
|
+
declare const SidebarContext: import("react").Context<SidebarContextValue>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { SidebarItemVariant as i, SidebarContext as n, SidebarContextValue as r, SidebarAnchor as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/Sidebar/SidebarContext.d.ts
|
|
2
|
+
/** Screen edge a `Sidebar` hugs — item labels render away from that edge. */
|
|
3
|
+
type SidebarAnchor = 'left' | 'right';
|
|
4
|
+
/**
|
|
5
|
+
* Visual style of a `SidebarItem`: borderless (`text`, default), `outlined`, or
|
|
6
|
+
* `plain` — no fill and no hover or press feedback, so selection reads through
|
|
7
|
+
* the text color alone.
|
|
8
|
+
*/
|
|
9
|
+
type SidebarItemVariant = 'outlined' | 'text' | 'plain';
|
|
10
|
+
/**
|
|
11
|
+
* State provided by `Sidebar` and consumed by `SidebarItem`: whether labels
|
|
12
|
+
* are shown, which side the rail hugs (decides the label side), the rail-wide
|
|
13
|
+
* default item variant (an item's own `variant` wins), and whether the rail
|
|
14
|
+
* renders a panel column — which decides where an item's `children` go.
|
|
15
|
+
*/
|
|
16
|
+
interface SidebarContextValue {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
anchor: SidebarAnchor;
|
|
19
|
+
variant: SidebarItemVariant;
|
|
20
|
+
/** Whether the rail renders a panel column; items port their children into it. */
|
|
21
|
+
hasPanel: boolean;
|
|
22
|
+
/** `id` of the panel element, so the selected item can point `aria-controls` at it. */
|
|
23
|
+
panelId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The panel's DOM node — the container the selected item ports its `children`
|
|
26
|
+
* into. `null` until the panel has mounted, and whenever `hasPanel` is off.
|
|
27
|
+
*/
|
|
28
|
+
panelNode?: HTMLElement | null;
|
|
29
|
+
/**
|
|
30
|
+
* Publishes the porting item's `label` so the panel can be named after it.
|
|
31
|
+
* Only the name travels through context; the content itself is ported.
|
|
32
|
+
*/
|
|
33
|
+
setPanelLabel?: (label: string | null) => void;
|
|
34
|
+
}
|
|
35
|
+
declare const SidebarContext: import("react").Context<SidebarContextValue>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { SidebarItemVariant as i, SidebarContext as n, SidebarContextValue as r, SidebarAnchor as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/Sidebar/SidebarContext.ts
|
|
2
|
+
const SidebarContext = (0, require("react").createContext)({
|
|
3
|
+
isOpen: false,
|
|
4
|
+
anchor: "left",
|
|
5
|
+
variant: "text",
|
|
6
|
+
hasPanel: false
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
Object.defineProperty(exports, "SidebarContext", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return SidebarContext;
|
|
13
|
+
}
|
|
14
|
+
});
|
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-C8PIppTy.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,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as index_d_exports } from "./index-DLJ-li1B.cjs";
|
|
2
|
+
import { h as Theme } from "./themes-CUV79qWU.cjs";
|
|
2
3
|
import { HTMLAttributes } from "react";
|
|
3
4
|
//#region src/Skeleton/Skeleton.d.ts
|
|
4
5
|
type SkeletonVariant = 'text' | 'circular' | 'rectangular';
|
package/dist/Skeleton.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as Theme } from "./themes-CUV79qWU.mjs";
|
|
2
|
+
import { r as index_d_exports } from "./index-D8b5OCLe.mjs";
|
|
2
3
|
import { HTMLAttributes } from "react";
|
|
3
4
|
//#region src/Skeleton/Skeleton.d.ts
|
|
4
5
|
type SkeletonVariant = 'text' | 'circular' | 'rectangular';
|
package/dist/Skeleton.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as src_exports, i as props, o as styled, r as keyframes, t as createShouldForwardProp } from "./src-BJy4dM4f.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,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
3
|
-
const require_themeDefault = require("./themeDefault-
|
|
2
|
+
const require_src = require("./src-C8PIppTy.cjs");
|
|
3
|
+
const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
4
4
|
const require_utils = require("./utils.cjs");
|
|
5
|
+
const require_theme = require("./theme-Du6xgPsg.cjs");
|
|
5
6
|
require("react");
|
|
6
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
8
|
-
let _emotion_react = require("@emotion/react");
|
|
9
9
|
//#region src/Switch/Switch.tsx
|
|
10
10
|
const OUTSIDE_TRACK = {
|
|
11
11
|
sm: {
|
|
@@ -267,7 +267,7 @@ const SwitchRoot = require_src.styled("label", {
|
|
|
267
267
|
systemProps: [require_src.src_exports.space]
|
|
268
268
|
})(baseStyle, colorStyle, edgeStyle);
|
|
269
269
|
function Switch({ checked, defaultChecked, disabled = false, disableRipple: _disableRipple, color, size, variant: variantProp, marked = false, bg, edge = false, icon, checkedIcon, onChange, id, required, children, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-testid": dataTestid, ...spaceProps }) {
|
|
270
|
-
const theme =
|
|
270
|
+
const theme = require_theme.useTheme();
|
|
271
271
|
const variant = variantProp ?? require_themeDefault.themeDefault(theme, "switchVariant", "outside");
|
|
272
272
|
const effectiveIcon = icon ?? (marked && variant === "outside" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(XMarkIcon, {}) : null);
|
|
273
273
|
const effectiveCheckedIcon = checkedIcon ?? (marked && variant === "outside" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckMarkIcon, {}) : null);
|
package/dist/Switch.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as index_d_exports } from "./index-DLJ-li1B.cjs";
|
|
2
|
+
import { h as Theme } from "./themes-CUV79qWU.cjs";
|
|
2
3
|
import { ChangeEvent, ReactNode } from "react";
|
|
3
4
|
//#region src/Switch/Switch.d.ts
|
|
4
5
|
type SwitchColor = keyof Theme['palette'];
|
package/dist/Switch.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as Theme } from "./themes-CUV79qWU.mjs";
|
|
2
|
+
import { r as index_d_exports } from "./index-D8b5OCLe.mjs";
|
|
2
3
|
import { ChangeEvent, ReactNode } from "react";
|
|
3
4
|
//#region src/Switch/Switch.d.ts
|
|
4
5
|
type SwitchColor = keyof Theme['palette'];
|
package/dist/Switch.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { t as themeDefault } from "./themeDefault-
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
|
|
2
|
+
import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
|
|
3
3
|
import { alpha } from "./utils.mjs";
|
|
4
|
+
import { r as useTheme } from "./theme-V6lYzd3j.mjs";
|
|
4
5
|
import "react";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/Switch/Switch.tsx
|
package/dist/Table/Table.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
3
|
-
const require_TableContext = require("../TableContext-
|
|
2
|
+
const require_src = require("../src-C8PIppTy.cjs");
|
|
3
|
+
const require_TableContext = require("../TableContext-Bfg1C3Sr.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
package/dist/Table/Table.d.cts
CHANGED
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as index_d_exports } from "../index-DLJ-li1B.cjs";
|
|
2
|
+
import { d as PaletteColor, h as Theme } from "../themes-CUV79qWU.cjs";
|
|
3
|
+
import { t as TableCellPadding } from "../TableContext-BoOxdk8p.cjs";
|
|
4
|
+
import { ElementType, TableHTMLAttributes } from "react";
|
|
5
|
+
//#region src/Table/Table/Table.d.ts
|
|
6
|
+
/** Valid values for the bg prop — derived from theme.background keys. */
|
|
7
|
+
type TableBackgroundToken = keyof Theme['background'];
|
|
8
|
+
/** Valid values for the size prop — derived from theme.sizes keys. */
|
|
9
|
+
type TableSize = keyof Theme['sizes'];
|
|
10
|
+
/** Valid values for the borderColor prop — derived from theme.border keys. */
|
|
11
|
+
type TableBorderColorToken = keyof Theme['border'];
|
|
12
|
+
interface TableProps extends Omit<TableHTMLAttributes<HTMLTableElement>, 'color' | 'cellPadding' | 'align' | 'width' | 'border'>, index_d_exports.SpaceProps<Theme>, index_d_exports.LayoutProps<Theme>, Omit<index_d_exports.BorderProps<Theme>, 'borderColor'> {
|
|
13
|
+
/**
|
|
14
|
+
* Palette color for descendant rows' hover/selected shading — broadcast to
|
|
15
|
+
* `TableRow`s via `TableContext`; a row's own `color` wins.
|
|
16
|
+
*/
|
|
17
|
+
color?: PaletteColor;
|
|
18
|
+
/** Resolves against theme.background */
|
|
19
|
+
bg?: TableBackgroundToken;
|
|
20
|
+
/** Resolves against theme.border — light · primary · dark */
|
|
21
|
+
borderColor?: TableBorderColorToken;
|
|
22
|
+
/** Cell density — broadcast to descendant `TableCell`s via `TableContext`. Default: 'md', overridable via `theme.defaults.size`. */
|
|
23
|
+
size?: TableSize;
|
|
24
|
+
/** Cell padding mode — broadcast to descendant `TableCell`s. `'none'` zeroes cell padding. Default: `'normal'`. */
|
|
25
|
+
cellPadding?: TableCellPadding;
|
|
26
|
+
/** Makes header cells stick to the top of a scrolling `TableContainer`. Default: `false`. */
|
|
27
|
+
hasStickyHeader?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Hides inactive sort icons (revealed on hover/focus) — broadcast to
|
|
30
|
+
* descendant `TableSortLabel`s via `TableContext`. Set `false` to keep them
|
|
31
|
+
* always visible (dimmed). Default: `true`.
|
|
32
|
+
*/
|
|
33
|
+
shouldHideSortIcon?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Truncates overflowing cell text with an ellipsis — broadcast to descendant
|
|
36
|
+
* `TableCell`s via `TableContext`. Cells need a constrained width (e.g.
|
|
37
|
+
* `maxWidth`) for the truncation to kick in. Default: `false`.
|
|
38
|
+
*/
|
|
39
|
+
hasEllipsis?: boolean;
|
|
40
|
+
/** Default text alignment for every cell — cells with `align="inherit"` (the default) follow it. */
|
|
41
|
+
align?: TableAlign;
|
|
42
|
+
as?: ElementType;
|
|
43
|
+
}
|
|
44
|
+
/** Table-wide text alignment — inherited by head, body, and footer cells alike. */
|
|
45
|
+
type TableAlign = 'left' | 'right' | 'center' | 'justify';
|
|
46
|
+
declare function Table({ size, cellPadding, hasStickyHeader, shouldHideSortIcon, hasEllipsis, color, align, as, children, ...rest }: Readonly<TableProps>): import("react").JSX.Element;
|
|
47
|
+
//#endregion
|
|
2
48
|
export { Table, TableAlign, TableBackgroundToken, TableBorderColorToken, TableProps, TableSize };
|