@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
package/dist/TextInput.d.cts
CHANGED
|
@@ -1,2 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as index_d_exports } from "./index-DLJ-li1B.cjs";
|
|
2
|
+
import { h as Theme } from "./themes-CUV79qWU.cjs";
|
|
3
|
+
import { ChangeEventHandler, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
4
|
+
//#region src/TextInput/TextInput.d.ts
|
|
5
|
+
type TextInputColor = keyof Theme['palette'];
|
|
6
|
+
type TextInputTextColor = keyof Theme['text'];
|
|
7
|
+
type TextInputVariant = 'default' | 'outlined' | 'text' | 'underline';
|
|
8
|
+
type TextInputSize = keyof Theme['sizes'];
|
|
9
|
+
interface TextInputClasses {
|
|
10
|
+
root?: string;
|
|
11
|
+
input?: string;
|
|
12
|
+
}
|
|
13
|
+
interface TextInputProps extends index_d_exports.SpaceProps<Theme>, Pick<index_d_exports.LayoutProps<Theme>, 'width' | 'minWidth' | 'maxWidth'> {
|
|
14
|
+
/** Corner radius — applies only to `default` and `outlined` variants. Resolves against `theme.radii`. */
|
|
15
|
+
borderRadius?: keyof Theme['radii'];
|
|
16
|
+
autoComplete?: string;
|
|
17
|
+
autoFocus?: boolean;
|
|
18
|
+
/** Class names applied to inner elements. `root` targets the wrapper; `input` targets the native element. */
|
|
19
|
+
classes?: TextInputClasses;
|
|
20
|
+
/** Override components for the Root and Input slots. */
|
|
21
|
+
components?: {
|
|
22
|
+
Input?: ElementType;
|
|
23
|
+
Root?: ElementType;
|
|
24
|
+
};
|
|
25
|
+
/** Focus/active border color — resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
26
|
+
color?: TextInputColor;
|
|
27
|
+
/** Text color of the typed value — resolves against `theme.text`. Default: 'primary', overridable via `theme.defaults.accentTextColor`. */
|
|
28
|
+
textColor?: TextInputTextColor;
|
|
29
|
+
/** Disables the input. */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** Marks the field as invalid — applies error border color. */
|
|
32
|
+
error?: boolean;
|
|
33
|
+
/** Stretches the root to fill its container. */
|
|
34
|
+
fullWidth?: boolean;
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Custom component for the input element. Takes priority over `components.Input`. Default: `'input'`. */
|
|
37
|
+
inputComponent?: ElementType;
|
|
38
|
+
/** Native HTML `size` attribute — visible width in character widths. Has no effect with `multiline` or `resize`. */
|
|
39
|
+
inputSize?: number;
|
|
40
|
+
/** Extra props spread onto the native element. Explicit top-level props take priority. */
|
|
41
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
42
|
+
/** Maximum rows before the auto-grow textarea starts scrolling. Only applies when `resize` is set. */
|
|
43
|
+
maxRows?: number | string;
|
|
44
|
+
/** Minimum rows for the auto-grow textarea. Only applies when `resize` is set. */
|
|
45
|
+
minRows?: number | string;
|
|
46
|
+
/**
|
|
47
|
+
* Renders a `<textarea>` that grows with its content.
|
|
48
|
+
* Combine with `rows` to fix the height instead of auto-growing.
|
|
49
|
+
*/
|
|
50
|
+
multiline?: boolean;
|
|
51
|
+
name?: string;
|
|
52
|
+
onChange?: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
readOnly?: boolean;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
/** Auto-grows the textarea as content increases. Requires `multiline`. */
|
|
57
|
+
resize?: boolean;
|
|
58
|
+
/** Controls padding and font size. Default: 'md', overridable via `theme.defaults.size`. */
|
|
59
|
+
size?: TextInputSize;
|
|
60
|
+
/**
|
|
61
|
+
* Fixes the textarea height to this many rows. Also enables `multiline`
|
|
62
|
+
* when value is greater than 1. Disables resize.
|
|
63
|
+
*/
|
|
64
|
+
rows?: number | string;
|
|
65
|
+
/** HTML input type. Ignored when multiline. Default: `'text'`. */
|
|
66
|
+
type?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Visual style of the input.
|
|
69
|
+
* - `outlined` / `default` — full border box (default)
|
|
70
|
+
* - `underline` — border on bottom only
|
|
71
|
+
* - `text` — no border, transparent background
|
|
72
|
+
*/
|
|
73
|
+
variant?: TextInputVariant;
|
|
74
|
+
value?: string | number | readonly string[];
|
|
75
|
+
className?: string;
|
|
76
|
+
'data-testid'?: string;
|
|
77
|
+
}
|
|
78
|
+
declare function TextInput({ autoComplete, autoFocus, borderRadius, classes, components, color: colorProp, textColor: textColorProp, disabled: disabledProp, error: errorProp, fullWidth: fullWidthProp, id: idProp, inputComponent, inputProps, inputSize, maxRows, minRows, multiline, name, onChange, placeholder, readOnly, required: requiredProp, resize, rows, size: sizeProp, type, value, variant: variantProp, className, 'data-testid': dataTestid, ...spaceProps }: Readonly<TextInputProps>): import("react").JSX.Element;
|
|
79
|
+
//#endregion
|
|
2
80
|
export { TextInput, TextInputClasses, TextInputColor, TextInputProps, TextInputSize, TextInputTextColor, TextInputVariant };
|
package/dist/TextInput.d.mts
CHANGED
|
@@ -1,2 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as Theme } from "./themes-CUV79qWU.mjs";
|
|
2
|
+
import { r as index_d_exports } from "./index-D8b5OCLe.mjs";
|
|
3
|
+
import { ChangeEventHandler, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
4
|
+
//#region src/TextInput/TextInput.d.ts
|
|
5
|
+
type TextInputColor = keyof Theme['palette'];
|
|
6
|
+
type TextInputTextColor = keyof Theme['text'];
|
|
7
|
+
type TextInputVariant = 'default' | 'outlined' | 'text' | 'underline';
|
|
8
|
+
type TextInputSize = keyof Theme['sizes'];
|
|
9
|
+
interface TextInputClasses {
|
|
10
|
+
root?: string;
|
|
11
|
+
input?: string;
|
|
12
|
+
}
|
|
13
|
+
interface TextInputProps extends index_d_exports.SpaceProps<Theme>, Pick<index_d_exports.LayoutProps<Theme>, 'width' | 'minWidth' | 'maxWidth'> {
|
|
14
|
+
/** Corner radius — applies only to `default` and `outlined` variants. Resolves against `theme.radii`. */
|
|
15
|
+
borderRadius?: keyof Theme['radii'];
|
|
16
|
+
autoComplete?: string;
|
|
17
|
+
autoFocus?: boolean;
|
|
18
|
+
/** Class names applied to inner elements. `root` targets the wrapper; `input` targets the native element. */
|
|
19
|
+
classes?: TextInputClasses;
|
|
20
|
+
/** Override components for the Root and Input slots. */
|
|
21
|
+
components?: {
|
|
22
|
+
Input?: ElementType;
|
|
23
|
+
Root?: ElementType;
|
|
24
|
+
};
|
|
25
|
+
/** Focus/active border color — resolves to `theme.palette[color].main`. Default: 'primary', overridable via `theme.defaults.color`. */
|
|
26
|
+
color?: TextInputColor;
|
|
27
|
+
/** Text color of the typed value — resolves against `theme.text`. Default: 'primary', overridable via `theme.defaults.accentTextColor`. */
|
|
28
|
+
textColor?: TextInputTextColor;
|
|
29
|
+
/** Disables the input. */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** Marks the field as invalid — applies error border color. */
|
|
32
|
+
error?: boolean;
|
|
33
|
+
/** Stretches the root to fill its container. */
|
|
34
|
+
fullWidth?: boolean;
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Custom component for the input element. Takes priority over `components.Input`. Default: `'input'`. */
|
|
37
|
+
inputComponent?: ElementType;
|
|
38
|
+
/** Native HTML `size` attribute — visible width in character widths. Has no effect with `multiline` or `resize`. */
|
|
39
|
+
inputSize?: number;
|
|
40
|
+
/** Extra props spread onto the native element. Explicit top-level props take priority. */
|
|
41
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
42
|
+
/** Maximum rows before the auto-grow textarea starts scrolling. Only applies when `resize` is set. */
|
|
43
|
+
maxRows?: number | string;
|
|
44
|
+
/** Minimum rows for the auto-grow textarea. Only applies when `resize` is set. */
|
|
45
|
+
minRows?: number | string;
|
|
46
|
+
/**
|
|
47
|
+
* Renders a `<textarea>` that grows with its content.
|
|
48
|
+
* Combine with `rows` to fix the height instead of auto-growing.
|
|
49
|
+
*/
|
|
50
|
+
multiline?: boolean;
|
|
51
|
+
name?: string;
|
|
52
|
+
onChange?: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
readOnly?: boolean;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
/** Auto-grows the textarea as content increases. Requires `multiline`. */
|
|
57
|
+
resize?: boolean;
|
|
58
|
+
/** Controls padding and font size. Default: 'md', overridable via `theme.defaults.size`. */
|
|
59
|
+
size?: TextInputSize;
|
|
60
|
+
/**
|
|
61
|
+
* Fixes the textarea height to this many rows. Also enables `multiline`
|
|
62
|
+
* when value is greater than 1. Disables resize.
|
|
63
|
+
*/
|
|
64
|
+
rows?: number | string;
|
|
65
|
+
/** HTML input type. Ignored when multiline. Default: `'text'`. */
|
|
66
|
+
type?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Visual style of the input.
|
|
69
|
+
* - `outlined` / `default` — full border box (default)
|
|
70
|
+
* - `underline` — border on bottom only
|
|
71
|
+
* - `text` — no border, transparent background
|
|
72
|
+
*/
|
|
73
|
+
variant?: TextInputVariant;
|
|
74
|
+
value?: string | number | readonly string[];
|
|
75
|
+
className?: string;
|
|
76
|
+
'data-testid'?: string;
|
|
77
|
+
}
|
|
78
|
+
declare function TextInput({ autoComplete, autoFocus, borderRadius, classes, components, color: colorProp, textColor: textColorProp, disabled: disabledProp, error: errorProp, fullWidth: fullWidthProp, id: idProp, inputComponent, inputProps, inputSize, maxRows, minRows, multiline, name, onChange, placeholder, readOnly, required: requiredProp, resize, rows, size: sizeProp, type, value, variant: variantProp, className, 'data-testid': dataTestid, ...spaceProps }: Readonly<TextInputProps>): import("react").JSX.Element;
|
|
79
|
+
//#endregion
|
|
2
80
|
export { TextInput, TextInputClasses, TextInputColor, TextInputProps, TextInputSize, TextInputTextColor, TextInputVariant };
|
package/dist/TextInput.mjs
CHANGED
|
@@ -1,2 +1,227 @@
|
|
|
1
|
-
import { t as
|
|
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
|
+
import { r as useTheme } from "./theme-V6lYzd3j.mjs";
|
|
4
|
+
import { useFormControl } from "./FormControl.mjs";
|
|
5
|
+
import { t as inputVariantStyles } from "./inputVariantStyles-CcqpGfuP.mjs";
|
|
6
|
+
import { forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
//#region src/TextInput/TextAreaAutoResize.tsx
|
|
9
|
+
const adjust = (el, minRows, maxRows) => {
|
|
10
|
+
const style = getComputedStyle(el);
|
|
11
|
+
const lineHeight = Number.parseFloat(style.lineHeight) || Number.parseFloat(style.fontSize) * 1.2;
|
|
12
|
+
const paddingY = Number.parseFloat(style.paddingTop) + Number.parseFloat(style.paddingBottom);
|
|
13
|
+
el.style.height = "auto";
|
|
14
|
+
const scrollHeight = el.scrollHeight;
|
|
15
|
+
const min = minRows == null ? 0 : Number(minRows) * lineHeight + paddingY;
|
|
16
|
+
const max = maxRows == null ? Infinity : Number(maxRows) * lineHeight + paddingY;
|
|
17
|
+
el.style.height = `${Math.min(max, Math.max(min, scrollHeight))}px`;
|
|
18
|
+
el.style.overflow = scrollHeight > max ? "auto" : "hidden";
|
|
19
|
+
};
|
|
20
|
+
const TextAreaAutoResize = forwardRef(function TextAreaAutoResize({ value, onChange, minRows, maxRows, ...rest }, forwardedRef) {
|
|
21
|
+
const innerRef = useRef(null);
|
|
22
|
+
const setRef = useCallback((el) => {
|
|
23
|
+
innerRef.current = el;
|
|
24
|
+
if (typeof forwardedRef === "function") forwardedRef(el);
|
|
25
|
+
else if (forwardedRef) forwardedRef.current = el;
|
|
26
|
+
}, [forwardedRef]);
|
|
27
|
+
useLayoutEffect(() => {
|
|
28
|
+
adjust(innerRef.current, minRows, maxRows);
|
|
29
|
+
}, [
|
|
30
|
+
value,
|
|
31
|
+
minRows,
|
|
32
|
+
maxRows
|
|
33
|
+
]);
|
|
34
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
35
|
+
ref: setRef,
|
|
36
|
+
value,
|
|
37
|
+
onChange: useCallback((e) => {
|
|
38
|
+
adjust(e.currentTarget, minRows, maxRows);
|
|
39
|
+
onChange?.(e);
|
|
40
|
+
}, [
|
|
41
|
+
onChange,
|
|
42
|
+
minRows,
|
|
43
|
+
maxRows
|
|
44
|
+
]),
|
|
45
|
+
...rest
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/TextInput/TextInput.tsx
|
|
50
|
+
const shouldForwardProp = createShouldForwardProp([
|
|
51
|
+
...props,
|
|
52
|
+
"as",
|
|
53
|
+
"color",
|
|
54
|
+
"textColor",
|
|
55
|
+
"variant",
|
|
56
|
+
"error",
|
|
57
|
+
"disabled",
|
|
58
|
+
"fullWidth"
|
|
59
|
+
]);
|
|
60
|
+
const baseStyle = {
|
|
61
|
+
display: "inline-flex",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
transition: "border-color 0.15s ease"
|
|
64
|
+
};
|
|
65
|
+
const backgroundStyle = ({ theme, textColor = themeDefault(theme, "accentTextColor", "primary") }) => {
|
|
66
|
+
return {
|
|
67
|
+
backgroundColor: (0, src_exports.get)(theme, `background.${themeDefault(theme, "inputBg", "terminal")}`),
|
|
68
|
+
color: (0, src_exports.get)(theme, `text.${textColor}`),
|
|
69
|
+
fontFamily: (0, src_exports.get)(theme, "fonts.body"),
|
|
70
|
+
fontSize: (0, src_exports.get)(theme, "fontSizes.1"),
|
|
71
|
+
lineHeight: (0, src_exports.get)(theme, "lineHeights.base")
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
const colorBorder = ({ theme, color = themeDefault(theme, "color", "primary"), error }) => {
|
|
75
|
+
return { borderColor: error ? (0, src_exports.get)(theme, "palette.error.main") : (0, src_exports.get)(theme, `palette.${color}.light`) };
|
|
76
|
+
};
|
|
77
|
+
const focusVisibleRing = ({ theme }) => {
|
|
78
|
+
return { "&:has(:focus-visible)": {
|
|
79
|
+
outline: `2px solid ${(0, src_exports.get)(theme, `palette.${themeDefault(theme, "color", "primary")}.main`)}`,
|
|
80
|
+
outlineOffset: "2px"
|
|
81
|
+
} };
|
|
82
|
+
};
|
|
83
|
+
const focusWithinColor = ({ theme, color = themeDefault(theme, "color", "primary"), error }) => ({ "&:focus-within": { borderColor: error ? (0, src_exports.get)(theme, "palette.error.main") : (0, src_exports.get)(theme, `palette.${color}.main`) } });
|
|
84
|
+
const borderRadiusStyle = ({ variant: v = "default", borderRadius, theme }) => {
|
|
85
|
+
if (v === "underline" || v === "text" || !borderRadius) return {};
|
|
86
|
+
return { borderRadius: (0, src_exports.get)(theme, `radii.${borderRadius}`) };
|
|
87
|
+
};
|
|
88
|
+
const layoutStyles = ({ fullWidth, disabled }) => ({
|
|
89
|
+
...fullWidth ? {
|
|
90
|
+
display: "flex",
|
|
91
|
+
width: "100%"
|
|
92
|
+
} : {},
|
|
93
|
+
...disabled ? {
|
|
94
|
+
opacity: .5,
|
|
95
|
+
cursor: "not-allowed",
|
|
96
|
+
pointerEvents: "none"
|
|
97
|
+
} : {}
|
|
98
|
+
});
|
|
99
|
+
const nativeBaseStyles = {
|
|
100
|
+
flex: 1,
|
|
101
|
+
minWidth: 0,
|
|
102
|
+
width: "100%",
|
|
103
|
+
border: "none",
|
|
104
|
+
outline: "none",
|
|
105
|
+
background: "transparent",
|
|
106
|
+
color: "inherit",
|
|
107
|
+
fontFamily: "inherit",
|
|
108
|
+
lineHeight: "inherit",
|
|
109
|
+
"&::placeholder": {
|
|
110
|
+
color: "inherit",
|
|
111
|
+
opacity: .5
|
|
112
|
+
},
|
|
113
|
+
"&:disabled": { cursor: "not-allowed" }
|
|
114
|
+
};
|
|
115
|
+
const textAreaBaseStyles = {
|
|
116
|
+
resize: "none",
|
|
117
|
+
overflow: "auto"
|
|
118
|
+
};
|
|
119
|
+
function InputBase({ inputSize, inputComponent, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ jsx(inputComponent ?? "input", {
|
|
121
|
+
...props,
|
|
122
|
+
size: inputSize
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const widthStyles = (0, src_exports.system)({
|
|
126
|
+
width: true,
|
|
127
|
+
minWidth: true,
|
|
128
|
+
maxWidth: true
|
|
129
|
+
});
|
|
130
|
+
const sizeVariants = ({ theme, size }) => {
|
|
131
|
+
const s = theme.sizes[size];
|
|
132
|
+
return {
|
|
133
|
+
paddingTop: theme.space[s.paddingTop],
|
|
134
|
+
paddingBottom: theme.space[s.paddingBottom],
|
|
135
|
+
paddingLeft: theme.space[s.paddingLeft],
|
|
136
|
+
paddingRight: theme.space[s.paddingRight],
|
|
137
|
+
fontSize: theme.fontSizes[s.fontSize]
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
const TextInputRoot = styled("div", {
|
|
141
|
+
name: "TextInput",
|
|
142
|
+
label: "TextInput",
|
|
143
|
+
shouldForwardProp,
|
|
144
|
+
systemProps: [src_exports.space, widthStyles]
|
|
145
|
+
})(baseStyle, inputVariantStyles, borderRadiusStyle, colorBorder, focusWithinColor, focusVisibleRing, backgroundStyle, layoutStyles);
|
|
146
|
+
const StyledInput = styled(InputBase, {
|
|
147
|
+
name: "TextInput",
|
|
148
|
+
slot: "input",
|
|
149
|
+
label: "TextInputInput"
|
|
150
|
+
})(nativeBaseStyles, sizeVariants);
|
|
151
|
+
const shouldForwardInputProps = (prop) => prop !== "size";
|
|
152
|
+
const StyledTextarea = styled("textarea", {
|
|
153
|
+
name: "TextInput",
|
|
154
|
+
slot: "input",
|
|
155
|
+
label: "TextInputTextarea",
|
|
156
|
+
shouldForwardProp: shouldForwardInputProps
|
|
157
|
+
})(nativeBaseStyles, textAreaBaseStyles, sizeVariants);
|
|
158
|
+
const StyledAutoResizeTextarea = styled(TextAreaAutoResize, {
|
|
159
|
+
name: "TextInput",
|
|
160
|
+
slot: "input",
|
|
161
|
+
label: "TextInputTextarea",
|
|
162
|
+
shouldForwardProp: shouldForwardInputProps
|
|
163
|
+
})(nativeBaseStyles, textAreaBaseStyles, sizeVariants);
|
|
164
|
+
function TextInput({ autoComplete, autoFocus, borderRadius, classes, components, color: colorProp, textColor: textColorProp, disabled: disabledProp, error: errorProp, fullWidth: fullWidthProp, id: idProp, inputComponent, inputProps, inputSize, maxRows, minRows, multiline = false, name, onChange, placeholder, readOnly, required: requiredProp, resize = false, rows, size: sizeProp, type = "text", value, variant: variantProp, className, "data-testid": dataTestid, ...spaceProps }) {
|
|
165
|
+
const fc = useFormControl({
|
|
166
|
+
id: idProp,
|
|
167
|
+
error: errorProp,
|
|
168
|
+
disabled: disabledProp,
|
|
169
|
+
required: requiredProp,
|
|
170
|
+
size: sizeProp,
|
|
171
|
+
fullWidth: fullWidthProp,
|
|
172
|
+
color: colorProp,
|
|
173
|
+
textColor: textColorProp
|
|
174
|
+
});
|
|
175
|
+
const { id, error, disabled, required, size, fullWidth } = fc;
|
|
176
|
+
const theme = useTheme();
|
|
177
|
+
const color = fc.color ?? themeDefault(theme, "color", "primary");
|
|
178
|
+
const textColor = fc.textColor ?? themeDefault(theme, "accentTextColor", "primary");
|
|
179
|
+
const variant = variantProp ?? themeDefault(theme, "inputVariant", "default");
|
|
180
|
+
const isAutoResize = resize;
|
|
181
|
+
const isMultiline = multiline || rows !== void 0 && Number(rows) > 1;
|
|
182
|
+
const isTextarea = (isAutoResize || isMultiline) && (!type || type === "text");
|
|
183
|
+
const rootClassName = [className, classes?.root].filter(Boolean).join(" ") || void 0;
|
|
184
|
+
const resolvedInputComponent = inputComponent ?? components?.Input;
|
|
185
|
+
const inputElProps = {
|
|
186
|
+
...inputProps,
|
|
187
|
+
id,
|
|
188
|
+
name,
|
|
189
|
+
disabled,
|
|
190
|
+
required,
|
|
191
|
+
autoComplete,
|
|
192
|
+
autoFocus,
|
|
193
|
+
placeholder,
|
|
194
|
+
readOnly,
|
|
195
|
+
onChange,
|
|
196
|
+
value,
|
|
197
|
+
className: classes?.input,
|
|
198
|
+
type: isTextarea ? void 0 : type,
|
|
199
|
+
rows: isMultiline && rows !== void 0 ? Number(rows) : void 0,
|
|
200
|
+
size,
|
|
201
|
+
"aria-describedby": inputProps?.["aria-describedby"] ?? fc["aria-describedby"]
|
|
202
|
+
};
|
|
203
|
+
return /* @__PURE__ */ jsx(TextInputRoot, {
|
|
204
|
+
as: components?.Root,
|
|
205
|
+
color,
|
|
206
|
+
textColor,
|
|
207
|
+
variant,
|
|
208
|
+
error,
|
|
209
|
+
disabled,
|
|
210
|
+
fullWidth,
|
|
211
|
+
borderRadius,
|
|
212
|
+
className: rootClassName,
|
|
213
|
+
"data-testid": dataTestid,
|
|
214
|
+
...spaceProps,
|
|
215
|
+
children: isTextarea && isAutoResize ? /* @__PURE__ */ jsx(StyledAutoResizeTextarea, {
|
|
216
|
+
...inputElProps,
|
|
217
|
+
minRows: minRows ?? rows,
|
|
218
|
+
maxRows
|
|
219
|
+
}) : isTextarea ? /* @__PURE__ */ jsx(StyledTextarea, { ...inputElProps }) : /* @__PURE__ */ jsx(StyledInput, {
|
|
220
|
+
inputComponent: resolvedInputComponent,
|
|
221
|
+
inputSize,
|
|
222
|
+
...inputElProps
|
|
223
|
+
})
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
2
227
|
export { TextInput };
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
const require_ButtonGroupContext = require("../ButtonGroupContext-NtkVeDVE.cjs");
|
|
6
7
|
const require_Button = require("../Button.cjs");
|
|
7
8
|
const require_ToggleButtonGroupContext = require("../ToggleButtonGroupContext-Ewc5Ixas.cjs");
|
|
8
9
|
let react = require("react");
|
|
9
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
-
let _emotion_react = require("@emotion/react");
|
|
11
11
|
//#region src/ToggleButton/ToggleButton/ToggleButton.tsx
|
|
12
12
|
const stateStyles = ({ theme, color = require_themeDefault.themeDefault(theme, "neutralColor", "default"), isSelected }) => {
|
|
13
13
|
const c = theme.palette[color];
|
|
@@ -35,7 +35,7 @@ const isValueSelected = (value, groupValue) => {
|
|
|
35
35
|
function ToggleButton({ value, isSelected, color, onChange, onClick, type = "button", ...rest }) {
|
|
36
36
|
const group = (0, react.useContext)(require_ToggleButtonGroupContext.ToggleButtonGroupContext);
|
|
37
37
|
const buttonGroup = (0, react.useContext)(require_ButtonGroupContext.ButtonGroupContext);
|
|
38
|
-
const theme =
|
|
38
|
+
const theme = require_theme.useTheme();
|
|
39
39
|
const selected = isSelected ?? isValueSelected(value, group.value);
|
|
40
40
|
const resolvedColor = color ?? buttonGroup.color ?? require_themeDefault.themeDefault(theme, "neutralColor", "default");
|
|
41
41
|
const handleClick = (event) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ButtonProps } from "../index-
|
|
1
|
+
import { i as ButtonProps } from "../index-BJ8OC_Zh.cjs";
|
|
2
2
|
import { r as ToggleButtonValue } from "../ToggleButtonGroupContext-CqD-Afho.cjs";
|
|
3
3
|
//#region src/ToggleButton/ToggleButton/ToggleButton.d.ts
|
|
4
4
|
interface ToggleButtonProps extends Omit<ButtonProps, 'variant' | 'href' | 'target' | 'rel' | 'value' | 'onChange'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ButtonProps } from "../index-
|
|
1
|
+
import { i as ButtonProps } from "../index-D8U2tk1L.mjs";
|
|
2
2
|
import { r as ToggleButtonValue } from "../ToggleButtonGroupContext-CqD-Afho.mjs";
|
|
3
3
|
//#region src/ToggleButton/ToggleButton/ToggleButton.d.ts
|
|
4
4
|
interface ToggleButtonProps extends Omit<ButtonProps, 'variant' | 'href' | 'target' | 'rel' | 'value' | 'onChange'> {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as themeDefault } from "../themeDefault-
|
|
1
|
+
import { a as src_exports, o as styled } 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 { t as ButtonGroupContext } from "../ButtonGroupContext-DS-kl9lG.mjs";
|
|
5
6
|
import { Button } from "../Button.mjs";
|
|
6
7
|
import { t as ToggleButtonGroupContext } from "../ToggleButtonGroupContext-DxIyy8ze.mjs";
|
|
@@ -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
|
+
const require_theme = require("../theme-Du6xgPsg.cjs");
|
|
4
5
|
const require_ButtonGroup = require("../ButtonGroup.cjs");
|
|
5
6
|
const require_ToggleButtonGroupContext = require("../ToggleButtonGroupContext-Ewc5Ixas.cjs");
|
|
6
7
|
let react = require("react");
|
|
7
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let _emotion_react = require("@emotion/react");
|
|
9
9
|
//#region src/ToggleButton/ToggleButtonGroup/ToggleButtonGroup.tsx
|
|
10
10
|
const selectedEdgeStyles = ({ theme, orientation = "horizontal", color = require_themeDefault.themeDefault(theme, "neutralColor", "default") }) => {
|
|
11
11
|
return { "& > [aria-pressed=\"true\"]:not(:first-of-type)": { [orientation === "vertical" ? "borderTopColor" : "borderLeftColor"]: theme.palette[color].main } };
|
|
@@ -21,7 +21,7 @@ const ToggleButtonGroupRoot = require_src.styled(require_ButtonGroup.ButtonGroup
|
|
|
21
21
|
* through `ButtonGroup` as usual.
|
|
22
22
|
*/
|
|
23
23
|
function ToggleButtonGroup({ value = null, onChange, isExclusive = false, color: colorProp, children, ...rest }) {
|
|
24
|
-
const theme =
|
|
24
|
+
const theme = require_theme.useTheme();
|
|
25
25
|
const color = colorProp ?? require_themeDefault.themeDefault(theme, "neutralColor", "default");
|
|
26
26
|
const context = (0, react.useMemo)(() => {
|
|
27
27
|
const handleToggle = (buttonValue) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ButtonGroupProps } from "../index
|
|
1
|
+
import { a as ButtonGroupProps } from "../index--mvTGo8F.cjs";
|
|
2
2
|
import { r as ToggleButtonValue } from "../ToggleButtonGroupContext-CqD-Afho.cjs";
|
|
3
3
|
//#region src/ToggleButton/ToggleButtonGroup/ToggleButtonGroup.d.ts
|
|
4
4
|
interface ToggleButtonGroupProps extends Omit<ButtonGroupProps, 'variant' | 'onChange'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ButtonGroupProps } from "../index-
|
|
1
|
+
import { a as ButtonGroupProps } from "../index-DF3Hweir.mjs";
|
|
2
2
|
import { r as ToggleButtonValue } from "../ToggleButtonGroupContext-CqD-Afho.mjs";
|
|
3
3
|
//#region src/ToggleButton/ToggleButtonGroup/ToggleButtonGroup.d.ts
|
|
4
4
|
interface ToggleButtonGroupProps extends Omit<ButtonGroupProps, 'variant' | 'onChange'> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as themeDefault } from "../themeDefault-
|
|
1
|
+
import { o as styled } from "../src-BJy4dM4f.mjs";
|
|
2
|
+
import { t as themeDefault } from "../themeDefault-Z3KmyIbm.mjs";
|
|
3
|
+
import { r as useTheme } from "../theme-V6lYzd3j.mjs";
|
|
3
4
|
import { ButtonGroup } from "../ButtonGroup.mjs";
|
|
4
5
|
import { t as ToggleButtonGroupContext } from "../ToggleButtonGroupContext-DxIyy8ze.mjs";
|
|
5
6
|
import { useMemo } from "react";
|
package/dist/ToggleButton.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as ToggleButtonGroupContextValue, r as ToggleButtonValue, t as ToggleButtonGroupContext } from "./ToggleButtonGroupContext-CqD-Afho.cjs";
|
|
2
|
-
import { ToggleButtonGroup, ToggleButtonGroupProps } from "./ToggleButton/ToggleButtonGroup.cjs";
|
|
3
2
|
import { ToggleButton, ToggleButtonProps } from "./ToggleButton/ToggleButton.cjs";
|
|
3
|
+
import { ToggleButtonGroup, ToggleButtonGroupProps } from "./ToggleButton/ToggleButtonGroup.cjs";
|
|
4
4
|
export { ToggleButton, ToggleButtonGroup, ToggleButtonGroupContext, ToggleButtonGroupContextValue, ToggleButtonGroupProps, ToggleButtonProps, ToggleButtonValue };
|
package/dist/ToggleButton.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as ToggleButtonGroupContextValue, r as ToggleButtonValue, t as ToggleButtonGroupContext } from "./ToggleButtonGroupContext-CqD-Afho.mjs";
|
|
2
|
-
import { ToggleButtonGroup, ToggleButtonGroupProps } from "./ToggleButton/ToggleButtonGroup.mjs";
|
|
3
2
|
import { ToggleButton, ToggleButtonProps } from "./ToggleButton/ToggleButton.mjs";
|
|
3
|
+
import { ToggleButtonGroup, ToggleButtonGroupProps } from "./ToggleButton/ToggleButtonGroup.mjs";
|
|
4
4
|
export { ToggleButton, ToggleButtonGroup, ToggleButtonGroupContext, ToggleButtonGroupContextValue, ToggleButtonGroupProps, ToggleButtonProps, ToggleButtonValue };
|
package/dist/Typography.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-C8PIppTy.cjs");
|
|
3
|
+
const require_theme = require("./theme-Du6xgPsg.cjs");
|
|
3
4
|
require("react");
|
|
4
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
6
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
6
|
-
let _emotion_react = require("@emotion/react");
|
|
7
7
|
//#region src/Typography/Typography.tsx
|
|
8
8
|
const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([
|
|
9
9
|
..._soroush_tech_styled_system_should_forward_prop.props,
|
|
@@ -52,7 +52,7 @@ const TypographyBase = require_src.styled("p", {
|
|
|
52
52
|
whiteSpace: "nowrap"
|
|
53
53
|
} : {});
|
|
54
54
|
function Typography({ variant = "body1", as, ...rest }) {
|
|
55
|
-
const theme =
|
|
55
|
+
const theme = require_theme.useTheme();
|
|
56
56
|
const element = as ?? theme.typography[variant].element;
|
|
57
57
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TypographyBase, {
|
|
58
58
|
as: element,
|
package/dist/Typography.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-
|
|
1
|
+
import { L as TypographyVariant } from "./themes-CUV79qWU.cjs";
|
|
2
|
+
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-CvaEVk-f.cjs";
|
|
3
3
|
export { BackgroundToken, TextColorToken, Typography, TypographyAlign, TypographyProps, type TypographyVariant };
|
package/dist/Typography.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-
|
|
1
|
+
import { L as TypographyVariant } from "./themes-CUV79qWU.mjs";
|
|
2
|
+
import { a as TypographyProps, i as TypographyAlign, n as TextColorToken, r as Typography, t as BackgroundToken } from "./index-B2hrssyF.mjs";
|
|
3
3
|
export { BackgroundToken, TextColorToken, Typography, TypographyAlign, TypographyProps, type TypographyVariant };
|
package/dist/Typography.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
|
|
2
|
+
import { r as useTheme } from "./theme-V6lYzd3j.mjs";
|
|
2
3
|
import "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/Typography/Typography.tsx
|
package/dist/View.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
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 _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
5
5
|
//#region src/View/View.tsx
|
|
6
6
|
const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([
|
|
7
7
|
..._soroush_tech_styled_system_should_forward_prop.props,
|
|
8
8
|
"cursor",
|
|
9
|
-
"aspectRatio",
|
|
10
9
|
"order"
|
|
11
10
|
]);
|
|
12
11
|
const colorSystem = (0, require_src.src_exports.system)({
|
|
@@ -20,7 +19,6 @@ const colorSystem = (0, require_src.src_exports.system)({
|
|
|
20
19
|
},
|
|
21
20
|
opacity: { property: "opacity" },
|
|
22
21
|
cursor: { property: "cursor" },
|
|
23
|
-
aspectRatio: { property: "aspectRatio" },
|
|
24
22
|
order: { property: "order" }
|
|
25
23
|
});
|
|
26
24
|
const View = require_src.styled("div", {
|
package/dist/View.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ViewBorderWidthToken, i as ViewBorderRadiusToken, n as ViewBackgroundToken, o as ViewColorToken, r as ViewBorderColorToken, s as ViewProps, t as View } from "./index-
|
|
1
|
+
import { a as ViewBorderWidthToken, i as ViewBorderRadiusToken, n as ViewBackgroundToken, o as ViewColorToken, r as ViewBorderColorToken, s as ViewProps, t as View } from "./index-DjtGkwRM.cjs";
|
|
2
2
|
export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewProps };
|
package/dist/View.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ViewBorderWidthToken, i as ViewBorderRadiusToken, n as ViewBackgroundToken, o as ViewColorToken, r as ViewBorderColorToken, s as ViewProps, t as View } from "./index-
|
|
1
|
+
import { a as ViewBorderWidthToken, i as ViewBorderRadiusToken, n as ViewBackgroundToken, o as ViewColorToken, r as ViewBorderColorToken, s as ViewProps, t as View } from "./index-q6EgsH9R.mjs";
|
|
2
2
|
export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewProps };
|
package/dist/View.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
//#region src/View/View.tsx
|
|
4
4
|
const shouldForwardProp = createShouldForwardProp([
|
|
5
5
|
...props,
|
|
6
6
|
"cursor",
|
|
7
|
-
"aspectRatio",
|
|
8
7
|
"order"
|
|
9
8
|
]);
|
|
10
9
|
const colorSystem = (0, src_exports.system)({
|
|
@@ -18,7 +17,6 @@ const colorSystem = (0, src_exports.system)({
|
|
|
18
17
|
},
|
|
19
18
|
opacity: { property: "opacity" },
|
|
20
19
|
cursor: { property: "cursor" },
|
|
21
|
-
aspectRatio: { property: "aspectRatio" },
|
|
22
20
|
order: { property: "order" }
|
|
23
21
|
});
|
|
24
22
|
const View = styled("div", {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CacheProvider, Global, ThemeContext as EmotionThemeContext, ThemeProvider as EmotionThemeProvider, useTheme as useEmotionTheme } from "@emotion/react";
|
|
2
|
+
//#region src/theme/emotion.ts
|
|
3
|
+
/** `Global`, retyped against this package's own `Theme` (see `styled.ts`'s `StyledTags`). */
|
|
4
|
+
const Global$1 = Global;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { useEmotionTheme as a, Global$1 as i, EmotionThemeContext as n, EmotionThemeProvider as r, CacheProvider as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/theme/emotion.ts
|
|
2
|
+
/** `Global`, retyped against this package's own `Theme` (see `styled.ts`'s `StyledTags`). */
|
|
3
|
+
const Global = require("@emotion/react").Global;
|
|
4
|
+
//#endregion
|
|
5
|
+
Object.defineProperty(exports, "Global", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Global;
|
|
9
|
+
}
|
|
10
|
+
});
|