@soroush.tech/design-system 0.1.0 → 1.0.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 +42 -31
- 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 -6
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +3 -3
- 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 +1 -1
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +1 -1
- package/dist/FocusTrap.cjs +1 -1
- package/dist/FocusTrap.mjs +1 -1
- package/dist/Form.cjs +2 -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 +1 -1
- package/dist/Grid.d.cts +3 -2
- package/dist/Grid.d.mts +3 -2
- package/dist/Grid.mjs +1 -1
- package/dist/{Icon-CAKRmFz3.mjs → Icon-bv8Z38l-.mjs} +44 -3
- package/dist/{Icon-1YtNCUKo.cjs → Icon-zsHe7hWR.cjs} +45 -5
- 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 +4 -4
- package/dist/Link.d.cts +10 -1
- package/dist/Link.d.mts +10 -1
- package/dist/Link.mjs +3 -2
- 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 -6
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +3 -2
- 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/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/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-DOhYeOFx.d.cts} +1 -1
- package/dist/{TableContext-BRWPghAI.mjs → TableContext-Dyr89h_k.mjs} +0 -1
- package/dist/{TableContext-2qH7XYJB.d.mts → TableContext-adilRIJZ.d.mts} +1 -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 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +1 -1
- 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-0J6U39Rl.d.mts +53 -0
- package/dist/{index-Dm9HfgV6.d.mts → index-B66h9kbP.d.mts} +17 -7
- package/dist/{index-FwTocqhP.d.cts → index-B8FOqBiS.d.cts} +2 -1
- package/dist/{index-DE5PtzPn.d.mts → index-BF2KXGBM.d.mts} +2 -2
- package/dist/{index-CeYkEXU2.d.cts → index-BGWm4HKR.d.cts} +2 -2
- package/dist/{index-DmJIuQJj.d.mts → index-BGzs2cKy.d.mts} +3 -2
- package/dist/{index-B1rCD6Oo.d.cts → index-BJcHQUga.d.mts} +3 -2
- package/dist/{index-CDVnvjIE.d.cts → index-BLnOsdgc.d.cts} +2 -2
- package/dist/{index-Bihpwn75.d.cts → index-BVX_Jq2G.d.cts} +17 -7
- package/dist/{index-8dzWTpFp.d.cts → index-BahGB82c.d.cts} +3 -2
- package/dist/{index-DASvoACZ.d.cts → index-BnCp6k4s.d.cts} +2 -2
- package/dist/{index-Dy03o__A.d.mts → index-BpLv6Y8m.d.mts} +2 -1
- package/dist/index-C-UBdWKI.d.cts +24 -0
- package/dist/{index-BqVgv2B_.d.mts → index-C1vVYigQ.d.cts} +3 -2
- package/dist/index-CJQXZ4hq.d.cts +53 -0
- package/dist/{index-C0xMvDjL.d.mts → index-CLCtvcKA.d.mts} +2 -2
- package/dist/{index-DSCMXFTn.d.cts → index-CY0Czi9Z.d.cts} +2 -1
- package/dist/{index-pX7tBQdJ.d.mts → index-CYNgNatZ.d.mts} +2 -1
- package/dist/{index-BLfFycfJ.d.mts → index-D0x1ZMVG.d.mts} +6 -2
- package/dist/{index-4rC2j7fR.d.cts → index-D2H_6WLf.d.cts} +3 -2
- package/dist/{index-BnzUumAC2.d.mts → index-DCwLdUQH.d.mts} +2 -1
- package/dist/{index-BH8jQOdF.d.mts → index-DGqakgRN.d.mts} +3 -2
- package/dist/{index-BLRMuO_x.d.mts → index-DLiHZtDi.d.mts} +3 -2
- package/dist/{index-Dp81rWM1.d.cts → index-DN7IvJeV.d.cts} +6 -2
- package/dist/{index-BX5-NfbX.d.cts → index-DdFxl06Q.d.cts} +2 -1
- package/dist/{index-z35LEYG8.d.mts → index-DhcmRr8Q.d.cts} +3 -2
- package/dist/index-DitJ7ss0.d.mts +24 -0
- package/dist/{index-CyZYXDn0.d.cts → index-DwjxjLcD.d.mts} +3 -2
- package/dist/{index-x80UG39F.d.cts → index-HnvGdPCp.d.cts} +3 -2
- package/dist/{index-CxSNNzBT2.d.mts → index-ypEBcdCx.d.mts} +2 -2
- 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-BTGww2YK.d.cts +488 -0
- package/dist/themes-BTGww2YK.d.mts +488 -0
- package/dist/{useTableSort--XMWjujs.d.cts → useTablePagination-D6T-fQFc.d.mts} +25 -25
- package/dist/{useTableSort-CpDs4cGq.d.mts → useTablePagination-_94Wrvj9.d.cts} +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 +410 -23
- 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/Table.d.mts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import "./index-Cl_yBpzW2.mjs";
|
|
1
|
+
import { n as TableContext, r as TableContextValue, t as TableCellPadding } from "./TableContext-adilRIJZ.mjs";
|
|
2
|
+
import { Table, TableAlign, TableBackgroundToken, TableBorderColorToken, TableProps, TableSize } from "./Table/Table.mjs";
|
|
3
|
+
import { TableBody, TableBodyBackgroundToken, TableBodyBorderColorToken, TableBodyColorToken, TableBodyProps } from "./Table/TableBody.mjs";
|
|
4
|
+
import { a as TableCellColorToken, c as TableCellVariant, i as TableCellBorderColorToken, l as TableSection, n as TableCellAlign, o as TableCellProps, r as TableCellBackgroundToken, s as TableCellSortDirection, t as TableCell, u as TableSectionContext } from "./index-DGqakgRN.mjs";
|
|
5
|
+
import { TableContainer, TableContainerProps } from "./Table/TableContainer.mjs";
|
|
6
|
+
import { n as TableSortLabelDirection, r as TableSortLabelProps, t as TableSortLabel } from "./index-BGzs2cKy.mjs";
|
|
7
|
+
import { a as TableSortMap, i as TableSortEntry, n as UseTablePaginationOptions, o as useTableSort, r as useTablePagination, t as TablePaginationState } from "./useTablePagination-D6T-fQFc.mjs";
|
|
8
|
+
import { TableControl, TableControlProps } from "./Table/TableControl.mjs";
|
|
9
|
+
import { TableFooter, TableFooterBackgroundToken, TableFooterBorderColorToken, TableFooterColorToken, TableFooterProps } from "./Table/TableFooter.mjs";
|
|
10
|
+
import { TableHead, TableHeadBackgroundToken, TableHeadBorderColorToken, TableHeadColorToken, TableHeadProps } from "./Table/TableHead.mjs";
|
|
11
|
+
import { n as TablePaginationActions, r as TablePaginationActionsProps, t as TablePaginationActionType } from "./index-DCwLdUQH.mjs";
|
|
12
|
+
import { TablePagination, TablePaginationDisplayedRowsInfo, TablePaginationProps } from "./Table/TablePagination.mjs";
|
|
13
|
+
import { TableRow, TableRowBackgroundToken, TableRowBorderColorToken, TableRowColor, TableRowProps } from "./Table/TableRow.mjs";
|
|
14
|
+
import { TableSelection, TableSelectionAllProps, TableSelectionRowProps, useTableSelection } from "./Table/hooks.mjs";
|
|
16
15
|
export { Table, TableAlign, TableBackgroundToken, TableBody, TableBodyBackgroundToken, TableBodyBorderColorToken, TableBodyColorToken, TableBodyProps, TableBorderColorToken, TableCell, TableCellAlign, TableCellBackgroundToken, TableCellBorderColorToken, TableCellColorToken, TableCellPadding, TableCellProps, TableCellSortDirection, TableCellVariant, TableContainer, TableContainerProps, TableContext, TableContextValue, TableControl, TableControlProps, TableFooter, TableFooterBackgroundToken, TableFooterBorderColorToken, TableFooterColorToken, TableFooterProps, TableHead, TableHeadBackgroundToken, TableHeadBorderColorToken, TableHeadColorToken, TableHeadProps, TablePagination, TablePaginationActionType, TablePaginationActions, TablePaginationActionsProps, TablePaginationDisplayedRowsInfo, TablePaginationProps, TablePaginationState, TableProps, TableRow, TableRowBackgroundToken, TableRowBorderColorToken, TableRowColor, TableRowProps, TableSection, TableSectionContext, TableSelection, TableSelectionAllProps, TableSelectionRowProps, TableSize, TableSortEntry, TableSortLabel, TableSortLabelDirection, TableSortLabelProps, TableSortMap, UseTablePaginationOptions, useTablePagination, useTableSelection, useTableSort };
|
package/dist/Table.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as TableContext } from "./TableContext-
|
|
1
|
+
import { t as TableContext } from "./TableContext-Dyr89h_k.mjs";
|
|
2
2
|
import { TableSortLabel } from "./Table/TableSortLabel.mjs";
|
|
3
3
|
import { useTablePagination, useTableSelection, useTableSort } from "./Table/hooks.mjs";
|
|
4
4
|
import { Table } from "./Table/Table.mjs";
|
package/dist/TextInput.cjs
CHANGED
|
@@ -1,3 +1,229 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const require_src = require("./src-C8PIppTy.cjs");
|
|
3
|
+
const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
4
|
+
const require_theme = require("./theme-Du6xgPsg.cjs");
|
|
5
|
+
const require_FormControl = require("./FormControl.cjs");
|
|
6
|
+
const require_inputVariantStyles = require("./inputVariantStyles-BBkkYQtE.cjs");
|
|
7
|
+
let react = require("react");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
10
|
+
//#region src/TextInput/TextAreaAutoResize.tsx
|
|
11
|
+
const adjust = (el, minRows, maxRows) => {
|
|
12
|
+
const style = getComputedStyle(el);
|
|
13
|
+
const lineHeight = Number.parseFloat(style.lineHeight) || Number.parseFloat(style.fontSize) * 1.2;
|
|
14
|
+
const paddingY = Number.parseFloat(style.paddingTop) + Number.parseFloat(style.paddingBottom);
|
|
15
|
+
el.style.height = "auto";
|
|
16
|
+
const scrollHeight = el.scrollHeight;
|
|
17
|
+
const min = minRows == null ? 0 : Number(minRows) * lineHeight + paddingY;
|
|
18
|
+
const max = maxRows == null ? Infinity : Number(maxRows) * lineHeight + paddingY;
|
|
19
|
+
el.style.height = `${Math.min(max, Math.max(min, scrollHeight))}px`;
|
|
20
|
+
el.style.overflow = scrollHeight > max ? "auto" : "hidden";
|
|
21
|
+
};
|
|
22
|
+
const TextAreaAutoResize = (0, react.forwardRef)(function TextAreaAutoResize({ value, onChange, minRows, maxRows, ...rest }, forwardedRef) {
|
|
23
|
+
const innerRef = (0, react.useRef)(null);
|
|
24
|
+
const setRef = (0, react.useCallback)((el) => {
|
|
25
|
+
innerRef.current = el;
|
|
26
|
+
if (typeof forwardedRef === "function") forwardedRef(el);
|
|
27
|
+
else if (forwardedRef) forwardedRef.current = el;
|
|
28
|
+
}, [forwardedRef]);
|
|
29
|
+
(0, react.useLayoutEffect)(() => {
|
|
30
|
+
adjust(innerRef.current, minRows, maxRows);
|
|
31
|
+
}, [
|
|
32
|
+
value,
|
|
33
|
+
minRows,
|
|
34
|
+
maxRows
|
|
35
|
+
]);
|
|
36
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
37
|
+
ref: setRef,
|
|
38
|
+
value,
|
|
39
|
+
onChange: (0, react.useCallback)((e) => {
|
|
40
|
+
adjust(e.currentTarget, minRows, maxRows);
|
|
41
|
+
onChange?.(e);
|
|
42
|
+
}, [
|
|
43
|
+
onChange,
|
|
44
|
+
minRows,
|
|
45
|
+
maxRows
|
|
46
|
+
]),
|
|
47
|
+
...rest
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/TextInput/TextInput.tsx
|
|
52
|
+
const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([
|
|
53
|
+
..._soroush_tech_styled_system_should_forward_prop.props,
|
|
54
|
+
"as",
|
|
55
|
+
"color",
|
|
56
|
+
"textColor",
|
|
57
|
+
"variant",
|
|
58
|
+
"error",
|
|
59
|
+
"disabled",
|
|
60
|
+
"fullWidth"
|
|
61
|
+
]);
|
|
62
|
+
const baseStyle = {
|
|
63
|
+
display: "inline-flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
transition: "border-color 0.15s ease"
|
|
66
|
+
};
|
|
67
|
+
const backgroundStyle = ({ theme, textColor = require_themeDefault.themeDefault(theme, "accentTextColor", "primary") }) => {
|
|
68
|
+
return {
|
|
69
|
+
backgroundColor: (0, require_src.src_exports.get)(theme, `background.${require_themeDefault.themeDefault(theme, "inputBg", "terminal")}`),
|
|
70
|
+
color: (0, require_src.src_exports.get)(theme, `text.${textColor}`),
|
|
71
|
+
fontFamily: (0, require_src.src_exports.get)(theme, "fonts.body"),
|
|
72
|
+
fontSize: (0, require_src.src_exports.get)(theme, "fontSizes.1"),
|
|
73
|
+
lineHeight: (0, require_src.src_exports.get)(theme, "lineHeights.base")
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
const colorBorder = ({ theme, color = require_themeDefault.themeDefault(theme, "color", "primary"), error }) => {
|
|
77
|
+
return { borderColor: error ? (0, require_src.src_exports.get)(theme, "palette.error.main") : (0, require_src.src_exports.get)(theme, `palette.${color}.light`) };
|
|
78
|
+
};
|
|
79
|
+
const focusVisibleRing = ({ theme }) => {
|
|
80
|
+
return { "&:has(:focus-visible)": {
|
|
81
|
+
outline: `2px solid ${(0, require_src.src_exports.get)(theme, `palette.${require_themeDefault.themeDefault(theme, "color", "primary")}.main`)}`,
|
|
82
|
+
outlineOffset: "2px"
|
|
83
|
+
} };
|
|
84
|
+
};
|
|
85
|
+
const focusWithinColor = ({ theme, color = require_themeDefault.themeDefault(theme, "color", "primary"), error }) => ({ "&:focus-within": { borderColor: error ? (0, require_src.src_exports.get)(theme, "palette.error.main") : (0, require_src.src_exports.get)(theme, `palette.${color}.main`) } });
|
|
86
|
+
const borderRadiusStyle = ({ variant: v = "default", borderRadius, theme }) => {
|
|
87
|
+
if (v === "underline" || v === "text" || !borderRadius) return {};
|
|
88
|
+
return { borderRadius: (0, require_src.src_exports.get)(theme, `radii.${borderRadius}`) };
|
|
89
|
+
};
|
|
90
|
+
const layoutStyles = ({ fullWidth, disabled }) => ({
|
|
91
|
+
...fullWidth ? {
|
|
92
|
+
display: "flex",
|
|
93
|
+
width: "100%"
|
|
94
|
+
} : {},
|
|
95
|
+
...disabled ? {
|
|
96
|
+
opacity: .5,
|
|
97
|
+
cursor: "not-allowed",
|
|
98
|
+
pointerEvents: "none"
|
|
99
|
+
} : {}
|
|
100
|
+
});
|
|
101
|
+
const nativeBaseStyles = {
|
|
102
|
+
flex: 1,
|
|
103
|
+
minWidth: 0,
|
|
104
|
+
width: "100%",
|
|
105
|
+
border: "none",
|
|
106
|
+
outline: "none",
|
|
107
|
+
background: "transparent",
|
|
108
|
+
color: "inherit",
|
|
109
|
+
fontFamily: "inherit",
|
|
110
|
+
lineHeight: "inherit",
|
|
111
|
+
"&::placeholder": {
|
|
112
|
+
color: "inherit",
|
|
113
|
+
opacity: .5
|
|
114
|
+
},
|
|
115
|
+
"&:disabled": { cursor: "not-allowed" }
|
|
116
|
+
};
|
|
117
|
+
const textAreaBaseStyles = {
|
|
118
|
+
resize: "none",
|
|
119
|
+
overflow: "auto"
|
|
120
|
+
};
|
|
121
|
+
function InputBase({ inputSize, inputComponent, ...props }) {
|
|
122
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(inputComponent ?? "input", {
|
|
123
|
+
...props,
|
|
124
|
+
size: inputSize
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const widthStyles = (0, require_src.src_exports.system)({
|
|
128
|
+
width: true,
|
|
129
|
+
minWidth: true,
|
|
130
|
+
maxWidth: true
|
|
131
|
+
});
|
|
132
|
+
const sizeVariants = ({ theme, size }) => {
|
|
133
|
+
const s = theme.sizes[size];
|
|
134
|
+
return {
|
|
135
|
+
paddingTop: theme.space[s.paddingTop],
|
|
136
|
+
paddingBottom: theme.space[s.paddingBottom],
|
|
137
|
+
paddingLeft: theme.space[s.paddingLeft],
|
|
138
|
+
paddingRight: theme.space[s.paddingRight],
|
|
139
|
+
fontSize: theme.fontSizes[s.fontSize]
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
const TextInputRoot = require_src.styled("div", {
|
|
143
|
+
name: "TextInput",
|
|
144
|
+
label: "TextInput",
|
|
145
|
+
shouldForwardProp,
|
|
146
|
+
systemProps: [require_src.src_exports.space, widthStyles]
|
|
147
|
+
})(baseStyle, require_inputVariantStyles.inputVariantStyles, borderRadiusStyle, colorBorder, focusWithinColor, focusVisibleRing, backgroundStyle, layoutStyles);
|
|
148
|
+
const StyledInput = require_src.styled(InputBase, {
|
|
149
|
+
name: "TextInput",
|
|
150
|
+
slot: "input",
|
|
151
|
+
label: "TextInputInput"
|
|
152
|
+
})(nativeBaseStyles, sizeVariants);
|
|
153
|
+
const shouldForwardInputProps = (prop) => prop !== "size";
|
|
154
|
+
const StyledTextarea = require_src.styled("textarea", {
|
|
155
|
+
name: "TextInput",
|
|
156
|
+
slot: "input",
|
|
157
|
+
label: "TextInputTextarea",
|
|
158
|
+
shouldForwardProp: shouldForwardInputProps
|
|
159
|
+
})(nativeBaseStyles, textAreaBaseStyles, sizeVariants);
|
|
160
|
+
const StyledAutoResizeTextarea = require_src.styled(TextAreaAutoResize, {
|
|
161
|
+
name: "TextInput",
|
|
162
|
+
slot: "input",
|
|
163
|
+
label: "TextInputTextarea",
|
|
164
|
+
shouldForwardProp: shouldForwardInputProps
|
|
165
|
+
})(nativeBaseStyles, textAreaBaseStyles, sizeVariants);
|
|
166
|
+
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 }) {
|
|
167
|
+
const fc = require_FormControl.useFormControl({
|
|
168
|
+
id: idProp,
|
|
169
|
+
error: errorProp,
|
|
170
|
+
disabled: disabledProp,
|
|
171
|
+
required: requiredProp,
|
|
172
|
+
size: sizeProp,
|
|
173
|
+
fullWidth: fullWidthProp,
|
|
174
|
+
color: colorProp,
|
|
175
|
+
textColor: textColorProp
|
|
176
|
+
});
|
|
177
|
+
const { id, error, disabled, required, size, fullWidth } = fc;
|
|
178
|
+
const theme = require_theme.useTheme();
|
|
179
|
+
const color = fc.color ?? require_themeDefault.themeDefault(theme, "color", "primary");
|
|
180
|
+
const textColor = fc.textColor ?? require_themeDefault.themeDefault(theme, "accentTextColor", "primary");
|
|
181
|
+
const variant = variantProp ?? require_themeDefault.themeDefault(theme, "inputVariant", "default");
|
|
182
|
+
const isAutoResize = resize;
|
|
183
|
+
const isMultiline = multiline || rows !== void 0 && Number(rows) > 1;
|
|
184
|
+
const isTextarea = (isAutoResize || isMultiline) && (!type || type === "text");
|
|
185
|
+
const rootClassName = [className, classes?.root].filter(Boolean).join(" ") || void 0;
|
|
186
|
+
const resolvedInputComponent = inputComponent ?? components?.Input;
|
|
187
|
+
const inputElProps = {
|
|
188
|
+
...inputProps,
|
|
189
|
+
id,
|
|
190
|
+
name,
|
|
191
|
+
disabled,
|
|
192
|
+
required,
|
|
193
|
+
autoComplete,
|
|
194
|
+
autoFocus,
|
|
195
|
+
placeholder,
|
|
196
|
+
readOnly,
|
|
197
|
+
onChange,
|
|
198
|
+
value,
|
|
199
|
+
className: classes?.input,
|
|
200
|
+
type: isTextarea ? void 0 : type,
|
|
201
|
+
rows: isMultiline && rows !== void 0 ? Number(rows) : void 0,
|
|
202
|
+
size,
|
|
203
|
+
"aria-describedby": inputProps?.["aria-describedby"] ?? fc["aria-describedby"]
|
|
204
|
+
};
|
|
205
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextInputRoot, {
|
|
206
|
+
as: components?.Root,
|
|
207
|
+
color,
|
|
208
|
+
textColor,
|
|
209
|
+
variant,
|
|
210
|
+
error,
|
|
211
|
+
disabled,
|
|
212
|
+
fullWidth,
|
|
213
|
+
borderRadius,
|
|
214
|
+
className: rootClassName,
|
|
215
|
+
"data-testid": dataTestid,
|
|
216
|
+
...spaceProps,
|
|
217
|
+
children: isTextarea && isAutoResize ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledAutoResizeTextarea, {
|
|
218
|
+
...inputElProps,
|
|
219
|
+
minRows: minRows ?? rows,
|
|
220
|
+
maxRows
|
|
221
|
+
}) : isTextarea ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledTextarea, { ...inputElProps }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledInput, {
|
|
222
|
+
inputComponent: resolvedInputComponent,
|
|
223
|
+
inputSize,
|
|
224
|
+
...inputElProps
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
//#endregion
|
|
229
|
+
exports.TextInput = TextInput;
|
package/dist/TextInput.d.cts
CHANGED
|
@@ -1,2 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as index_d_exports } from "./index-BVX_Jq2G.cjs";
|
|
2
|
+
import { m as Theme } from "./themes-BTGww2YK.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 { m as Theme } from "./themes-BTGww2YK.mjs";
|
|
2
|
+
import { r as index_d_exports } from "./index-B66h9kbP.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 };
|