@veritone-ce/design-system 2.8.14-next.2.0 → 2.8.14
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/dist/cjs/Accordion/Accordion.js +120 -0
- package/dist/cjs/Accordion/AccordionGroup.js +61 -0
- package/dist/cjs/Accordion/Context.js +39 -0
- package/dist/cjs/Accordion/styles.module.scss.js +7 -0
- package/dist/cjs/Alert/index.js +70 -0
- package/dist/cjs/Alert/styles.module.scss.js +7 -0
- package/dist/cjs/Badge/index.js +67 -0
- package/dist/cjs/Badge/styles.module.scss.js +7 -0
- package/dist/cjs/Button/index.js +71 -0
- package/dist/cjs/Button/styles.module.scss.js +7 -0
- package/dist/cjs/Checkbox/index.js +164 -0
- package/dist/cjs/Checkbox/styles.module.scss.js +7 -0
- package/dist/cjs/Chip/index.js +51 -0
- package/dist/cjs/Chip/styles.module.scss.js +7 -0
- package/dist/cjs/CircularProgress/index.js +59 -0
- package/dist/cjs/CircularProgress/styles.module.scss.js +7 -0
- package/dist/cjs/ColorPicker/index.js +64 -0
- package/dist/cjs/ColorPicker/styles.module.scss.js +7 -0
- package/dist/cjs/DatePicker/Calendar.js +190 -0
- package/dist/cjs/DatePicker/DateField.js +30 -0
- package/dist/cjs/DatePicker/index.js +152 -0
- package/dist/cjs/DatePicker/styles.module.scss.js +7 -0
- package/dist/cjs/DateRangePicker/index.js +23 -0
- package/dist/cjs/DateRangePicker/styles.module.scss.js +7 -0
- package/dist/cjs/Dialog/components.js +250 -0
- package/dist/cjs/Dialog/factory.js +16 -0
- package/dist/cjs/Dialog/state.js +72 -0
- package/dist/cjs/Dialog/styles.module.scss.js +7 -0
- package/dist/cjs/Drawer/components.js +291 -0
- package/dist/cjs/Drawer/factory.js +16 -0
- package/dist/cjs/Drawer/state.js +70 -0
- package/dist/cjs/Drawer/styles.module.scss.js +7 -0
- package/dist/cjs/ErrorBoundary/index.js +56 -0
- package/dist/cjs/ErrorBoundary/styles.module.scss.js +7 -0
- package/dist/cjs/FileUploader/controlled.js +310 -0
- package/dist/cjs/FileUploader/styles.module.scss.js +7 -0
- package/dist/cjs/FormControl/context.js +16 -0
- package/dist/cjs/FormControl/index.js +64 -0
- package/dist/cjs/FormControl/styles.module.scss.js +7 -0
- package/dist/cjs/Icon/factory.js +24 -0
- package/dist/cjs/Icon/internal.js +60 -0
- package/dist/cjs/Icon/styles.module.scss.js +7 -0
- package/dist/cjs/Icon/wrappers.js +51 -0
- package/dist/cjs/IconButton/index.js +59 -0
- package/dist/cjs/IconButton/styles.module.scss.js +7 -0
- package/dist/cjs/Input/index.js +63 -0
- package/dist/cjs/Input/styles.module.scss.js +7 -0
- package/dist/cjs/Menu/controlled.js +420 -0
- package/dist/cjs/Menu/factory.js +13 -0
- package/dist/cjs/Menu/styles.module.scss.js +7 -0
- package/dist/cjs/Pagination/index.js +54 -0
- package/dist/cjs/Pagination/styles.module.scss.js +7 -0
- package/dist/cjs/RadioButton/index.js +85 -0
- package/dist/cjs/RadioButton/styles.module.scss.js +7 -0
- package/dist/cjs/Select/controlled.js +208 -0
- package/dist/cjs/Select/factory.js +23 -0
- package/dist/cjs/Select/styles.module.scss.js +7 -0
- package/dist/cjs/Select/uncontrolled.js +61 -0
- package/dist/cjs/StatusChip/index.js +39 -0
- package/dist/cjs/StatusChip/styles.module.scss.js +7 -0
- package/dist/cjs/Stepper/auto.js +127 -0
- package/dist/cjs/Stepper/stepper.js +48 -0
- package/dist/cjs/Stepper/styles.module.scss.js +7 -0
- package/dist/cjs/Table/AutoTable/common.js +131 -0
- package/dist/cjs/Table/AutoTable/controlled.js +95 -0
- package/dist/cjs/Table/AutoTable/index.js +110 -0
- package/dist/cjs/Table/AutoTable/styles.module.scss.js +7 -0
- package/dist/cjs/Table/AutoTable/virtual.js +173 -0
- package/dist/cjs/Table/TableCell/index.js +49 -0
- package/dist/cjs/Table/TableCell/styles.module.scss.js +7 -0
- package/dist/cjs/Table/TableRow/index.js +33 -0
- package/dist/cjs/Table/TableRow/styles.module.scss.js +7 -0
- package/dist/cjs/Table/index.js +76 -0
- package/dist/cjs/Table/styles.module.scss.js +7 -0
- package/dist/cjs/TablePagination/index.js +118 -0
- package/dist/cjs/TablePagination/styles.module.scss.js +7 -0
- package/dist/cjs/Textarea/index.js +59 -0
- package/dist/cjs/Textarea/styles.module.scss.js +7 -0
- package/dist/cjs/Toast/content.js +18 -0
- package/dist/cjs/Toast/hook.js +69 -0
- package/dist/cjs/Toast/index.js +15 -0
- package/dist/cjs/Toast/styles.module.scss.js +7 -0
- package/dist/cjs/Tooltip/index.js +135 -0
- package/dist/cjs/Tooltip/styles.module.scss.js +7 -0
- package/dist/cjs/Typography/index.js +52 -0
- package/dist/cjs/Typography/variants.module.scss.js +7 -0
- package/dist/cjs/bundled_modules/@babel/runtime/helpers/esm/extends.js +20 -0
- package/dist/cjs/bundled_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +18 -0
- package/dist/cjs/bundled_modules/@mui/material/usePagination/usePagination.js +121 -0
- package/dist/cjs/bundled_modules/@react-spring/animated/dist/react-spring_animated.modern.js +338 -0
- package/dist/cjs/bundled_modules/@react-spring/core/dist/react-spring_core.modern.js +1799 -0
- package/dist/cjs/bundled_modules/@react-spring/rafz/dist/react-spring_rafz.modern.js +160 -0
- package/dist/cjs/bundled_modules/@react-spring/shared/dist/react-spring_shared.modern.js +775 -0
- package/dist/cjs/bundled_modules/@react-spring/web/dist/react-spring_web.modern.js +382 -0
- package/dist/cjs/bundled_modules/jotai/esm/react.js +160 -0
- package/dist/cjs/bundled_modules/jotai/esm/vanilla/internals.js +539 -0
- package/dist/cjs/bundled_modules/jotai/esm/vanilla.js +114 -0
- package/dist/cjs/extras/markdown/index.js +244 -0
- package/dist/cjs/extras/markdown/styles.module.scss.js +7 -0
- package/dist/cjs/extras/uploady/index.js +12 -0
- package/dist/cjs/extras/uploady/uploady.js +112 -0
- package/dist/cjs/index.js +165 -0
- package/dist/cjs/popover/utils.js +8 -0
- package/dist/cjs/styles/components.module.scss.js +7 -0
- package/dist/cjs/styles/createPalette.js +227 -0
- package/dist/cjs/styles/createTheme.js +16 -0
- package/dist/cjs/styles/createTypography.js +114 -0
- package/dist/cjs/styles/css-vars.js +88 -0
- package/dist/cjs/styles/cx.js +8 -0
- package/dist/cjs/styles/defaultTheme.js +68 -0
- package/dist/cjs/styles/defaultThemeOptions.js +168 -0
- package/dist/cjs/styles/font-metrics.js +28 -0
- package/dist/cjs/styles/portal.js +14 -0
- package/dist/cjs/styles/provider.client.js +41 -0
- package/dist/cjs/styles/provider.css-vars.js +32 -0
- package/dist/cjs/styles/themeOptions.js +16 -0
- package/dist/cjs/styles/typography.js +20 -0
- package/dist/cjs/styles/useTheme.js +13 -0
- package/dist/cjs/styles.css +1 -0
- package/dist/cjs/unstable/Breadcrumbs/factory.js +15 -0
- package/dist/cjs/unstable/Breadcrumbs/index.js +73 -0
- package/dist/cjs/unstable/Breadcrumbs/index.module.scss.js +7 -0
- package/dist/cjs/unstable/Card/index.js +33 -0
- package/dist/cjs/unstable/Card/styles.module.scss.js +7 -0
- package/dist/cjs/unstable/LinearProgress/index.js +41 -0
- package/dist/cjs/unstable/LinearProgress/styles.module.scss.js +7 -0
- package/dist/cjs/unstable/Tabs/index.js +39 -0
- package/dist/cjs/unstable/Tabs/index.module.scss.js +7 -0
- package/dist/cjs/unstable/extras/dialogs/index.js +48 -0
- package/dist/cjs/unstable/extras/drawers/index.js +58 -0
- package/dist/cjs/unstable/extras/drawers/index.module.scss.js +7 -0
- package/dist/cjs/unstable/extras/forms/button.js +31 -0
- package/dist/cjs/unstable/extras/forms/checkbox.js +35 -0
- package/dist/cjs/unstable/extras/forms/index.js +23 -0
- package/dist/cjs/unstable/extras/forms/input.js +26 -0
- package/dist/cjs/unstable/extras/forms/select.js +52 -0
- package/dist/cjs/unstable/extras/forms/shared.js +62 -0
- package/dist/cjs/unstable/extras/forms/textarea.js +26 -0
- package/dist/cjs/unstable/extras/forms/upload.js +103 -0
- package/dist/cjs/unstable/index.js +21 -0
- package/dist/cjs/utils/capitalize.js +13 -0
- package/dist/cjs/utils/isNil.js +8 -0
- package/dist/esm/Accordion/Accordion.js +116 -0
- package/dist/esm/Accordion/AccordionGroup.js +57 -0
- package/dist/esm/Accordion/Context.js +33 -0
- package/dist/esm/Accordion/styles.module.scss.js +3 -0
- package/dist/esm/Alert/index.js +66 -0
- package/dist/esm/Alert/styles.module.scss.js +3 -0
- package/dist/esm/Badge/index.js +63 -0
- package/dist/esm/Badge/styles.module.scss.js +3 -0
- package/dist/esm/Button/index.js +67 -0
- package/dist/esm/Button/styles.module.scss.js +3 -0
- package/dist/esm/Checkbox/index.js +160 -0
- package/dist/esm/Checkbox/styles.module.scss.js +3 -0
- package/dist/esm/Chip/index.js +47 -0
- package/dist/esm/Chip/styles.module.scss.js +3 -0
- package/dist/esm/CircularProgress/index.js +55 -0
- package/dist/esm/CircularProgress/styles.module.scss.js +3 -0
- package/dist/esm/ColorPicker/index.js +59 -0
- package/dist/esm/ColorPicker/styles.module.scss.js +3 -0
- package/dist/esm/DatePicker/Calendar.js +186 -0
- package/dist/esm/DatePicker/DateField.js +26 -0
- package/dist/esm/DatePicker/index.js +148 -0
- package/dist/esm/DatePicker/styles.module.scss.js +3 -0
- package/dist/esm/DateRangePicker/index.js +19 -0
- package/dist/esm/DateRangePicker/styles.module.scss.js +3 -0
- package/dist/esm/Dialog/components.js +218 -0
- package/dist/esm/Dialog/factory.js +14 -0
- package/dist/esm/Dialog/state.js +49 -0
- package/dist/esm/Dialog/styles.module.scss.js +3 -0
- package/dist/esm/Drawer/components.js +259 -0
- package/dist/esm/Drawer/factory.js +14 -0
- package/dist/esm/Drawer/state.js +47 -0
- package/dist/esm/Drawer/styles.module.scss.js +3 -0
- package/dist/esm/ErrorBoundary/index.js +52 -0
- package/dist/esm/ErrorBoundary/styles.module.scss.js +3 -0
- package/dist/esm/FileUploader/controlled.js +304 -0
- package/dist/esm/FileUploader/styles.module.scss.js +3 -0
- package/dist/esm/FormControl/context.js +13 -0
- package/dist/esm/FormControl/index.js +60 -0
- package/dist/esm/FormControl/styles.module.scss.js +3 -0
- package/dist/esm/Icon/factory.js +21 -0
- package/dist/esm/Icon/internal.js +52 -0
- package/dist/esm/Icon/styles.module.scss.js +3 -0
- package/dist/esm/Icon/wrappers.js +48 -0
- package/dist/esm/IconButton/index.js +55 -0
- package/dist/esm/IconButton/styles.module.scss.js +3 -0
- package/dist/esm/Input/index.js +59 -0
- package/dist/esm/Input/styles.module.scss.js +3 -0
- package/dist/esm/Menu/controlled.js +414 -0
- package/dist/esm/Menu/factory.js +11 -0
- package/dist/esm/Menu/styles.module.scss.js +3 -0
- package/dist/esm/Pagination/index.js +50 -0
- package/dist/esm/Pagination/styles.module.scss.js +3 -0
- package/dist/esm/RadioButton/index.js +81 -0
- package/dist/esm/RadioButton/styles.module.scss.js +3 -0
- package/dist/esm/Select/controlled.js +204 -0
- package/dist/esm/Select/factory.js +20 -0
- package/dist/esm/Select/styles.module.scss.js +3 -0
- package/dist/esm/Select/uncontrolled.js +57 -0
- package/dist/esm/StatusChip/index.js +35 -0
- package/dist/esm/StatusChip/styles.module.scss.js +3 -0
- package/dist/esm/Stepper/auto.js +123 -0
- package/dist/esm/Stepper/stepper.js +44 -0
- package/dist/esm/Stepper/styles.module.scss.js +3 -0
- package/dist/esm/Table/AutoTable/common.js +125 -0
- package/dist/esm/Table/AutoTable/controlled.js +91 -0
- package/dist/esm/Table/AutoTable/index.js +106 -0
- package/dist/esm/Table/AutoTable/styles.module.scss.js +3 -0
- package/dist/esm/Table/AutoTable/virtual.js +168 -0
- package/dist/esm/Table/TableCell/index.js +45 -0
- package/dist/esm/Table/TableCell/styles.module.scss.js +3 -0
- package/dist/esm/Table/TableRow/index.js +29 -0
- package/dist/esm/Table/TableRow/styles.module.scss.js +3 -0
- package/dist/esm/Table/index.js +69 -0
- package/dist/esm/Table/styles.module.scss.js +3 -0
- package/dist/esm/TablePagination/index.js +114 -0
- package/dist/esm/TablePagination/styles.module.scss.js +3 -0
- package/dist/esm/Textarea/index.js +55 -0
- package/dist/esm/Textarea/styles.module.scss.js +3 -0
- package/dist/esm/Toast/content.js +14 -0
- package/dist/esm/Toast/hook.js +66 -0
- package/dist/esm/Toast/index.js +11 -0
- package/dist/esm/Toast/styles.module.scss.js +3 -0
- package/dist/esm/Tooltip/index.js +131 -0
- package/dist/esm/Tooltip/styles.module.scss.js +3 -0
- package/dist/esm/Typography/index.js +48 -0
- package/dist/esm/Typography/variants.module.scss.js +3 -0
- package/dist/esm/bundled_modules/@babel/runtime/helpers/esm/extends.js +16 -0
- package/dist/esm/bundled_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
- package/dist/esm/bundled_modules/@mui/material/usePagination/usePagination.js +117 -0
- package/dist/esm/bundled_modules/@react-spring/animated/dist/react-spring_animated.modern.js +308 -0
- package/dist/esm/bundled_modules/@react-spring/core/dist/react-spring_core.modern.js +1765 -0
- package/dist/esm/bundled_modules/@react-spring/rafz/dist/react-spring_rafz.modern.js +158 -0
- package/dist/esm/bundled_modules/@react-spring/shared/dist/react-spring_shared.modern.js +730 -0
- package/dist/esm/bundled_modules/@react-spring/web/dist/react-spring_web.modern.js +365 -0
- package/dist/esm/bundled_modules/jotai/esm/react.js +155 -0
- package/dist/esm/bundled_modules/jotai/esm/vanilla/internals.js +535 -0
- package/dist/esm/bundled_modules/jotai/esm/vanilla.js +110 -0
- package/dist/esm/extras/markdown/index.js +242 -0
- package/dist/esm/extras/markdown/styles.module.scss.js +3 -0
- package/dist/esm/extras/uploady/index.js +2 -0
- package/dist/esm/extras/uploady/uploady.js +106 -0
- package/dist/esm/index.js +58 -0
- package/dist/esm/popover/utils.js +6 -0
- package/dist/esm/styles/components.module.scss.js +3 -0
- package/dist/esm/styles/createPalette.js +225 -0
- package/dist/esm/styles/createTheme.js +12 -0
- package/dist/esm/styles/createTypography.js +111 -0
- package/dist/esm/styles/css-vars.js +81 -0
- package/dist/esm/styles/cx.js +6 -0
- package/dist/esm/styles/defaultTheme.js +62 -0
- package/dist/esm/styles/defaultThemeOptions.js +166 -0
- package/dist/esm/styles/external/baseline.css +1 -0
- package/dist/esm/styles/external/fonts/default.css +3 -0
- package/dist/esm/styles/font-metrics.js +26 -0
- package/dist/esm/styles/portal.js +12 -0
- package/dist/esm/styles/provider.client.js +18 -0
- package/dist/esm/styles/provider.css-vars.js +30 -0
- package/dist/esm/styles/scss/_index.scss +1 -0
- package/dist/esm/styles/scss/theme.generated.scss +880 -0
- package/dist/esm/styles/themeOptions.js +12 -0
- package/dist/esm/styles/typography.js +18 -0
- package/dist/esm/styles/useTheme.js +9 -0
- package/dist/esm/styles.css +1 -0
- package/dist/esm/unstable/Breadcrumbs/factory.js +13 -0
- package/dist/esm/unstable/Breadcrumbs/index.js +67 -0
- package/dist/esm/unstable/Breadcrumbs/index.module.scss.js +3 -0
- package/dist/esm/unstable/Card/index.js +29 -0
- package/dist/esm/unstable/Card/styles.module.scss.js +3 -0
- package/dist/esm/unstable/LinearProgress/index.js +37 -0
- package/dist/esm/unstable/LinearProgress/styles.module.scss.js +3 -0
- package/dist/esm/unstable/Tabs/index.js +34 -0
- package/dist/esm/unstable/Tabs/index.module.scss.js +3 -0
- package/dist/esm/unstable/extras/dialogs/index.js +46 -0
- package/dist/esm/unstable/extras/drawers/index.js +56 -0
- package/dist/esm/unstable/extras/drawers/index.module.scss.js +3 -0
- package/dist/esm/unstable/extras/forms/button.js +29 -0
- package/dist/esm/unstable/extras/forms/checkbox.js +33 -0
- package/dist/esm/unstable/extras/forms/index.js +8 -0
- package/dist/esm/unstable/extras/forms/input.js +24 -0
- package/dist/esm/unstable/extras/forms/select.js +49 -0
- package/dist/esm/unstable/extras/forms/shared.js +59 -0
- package/dist/esm/unstable/extras/forms/textarea.js +24 -0
- package/dist/esm/unstable/extras/forms/upload.js +100 -0
- package/dist/esm/unstable/index.js +6 -0
- package/dist/esm/utils/capitalize.js +3 -0
- package/dist/esm/utils/isNil.js +6 -0
- package/dist/types/Accordion/Accordion.d.ts +75 -0
- package/dist/types/Accordion/AccordionGroup.d.ts +40 -0
- package/dist/types/Accordion/Context.d.ts +19 -0
- package/dist/types/Accordion/index.d.ts +3 -0
- package/dist/types/Alert/index.d.ts +14 -0
- package/dist/types/Badge/index.d.ts +20 -0
- package/dist/types/Button/index.d.ts +30 -0
- package/dist/types/Checkbox/index.d.ts +28 -0
- package/dist/types/Chip/index.d.ts +13 -0
- package/dist/types/CircularProgress/index.d.ts +10 -0
- package/dist/types/ColorPicker/index.d.ts +13 -0
- package/dist/types/DatePicker/Calendar.d.ts +9 -0
- package/dist/types/DatePicker/DateField.d.ts +3 -0
- package/dist/types/DatePicker/index.d.ts +25 -0
- package/dist/types/DateRangePicker/index.d.ts +16 -0
- package/dist/types/Dialog/components.d.ts +95 -0
- package/dist/types/Dialog/factory.d.ts +18 -0
- package/dist/types/Dialog/index.d.ts +3 -0
- package/dist/types/Dialog/state.d.ts +121 -0
- package/dist/types/Drawer/components.d.ts +112 -0
- package/dist/types/Drawer/factory.d.ts +17 -0
- package/dist/types/Drawer/index.d.ts +3 -0
- package/dist/types/Drawer/state.d.ts +114 -0
- package/dist/types/ErrorBoundary/index.d.ts +24 -0
- package/dist/types/FileUploader/controlled.d.ts +59 -0
- package/dist/types/FileUploader/index.d.ts +1 -0
- package/dist/types/FormControl/context.d.ts +7 -0
- package/dist/types/FormControl/index.d.ts +15 -0
- package/dist/types/Icon/factory.d.ts +14 -0
- package/dist/types/Icon/index.d.ts +3 -0
- package/dist/types/Icon/internal.d.ts +7 -0
- package/dist/types/Icon/shared.d.ts +10 -0
- package/dist/types/Icon/wrappers.d.ts +6 -0
- package/dist/types/IconButton/index.d.ts +18 -0
- package/dist/types/Input/index.d.ts +24 -0
- package/dist/types/Menu/controlled.d.ts +56 -0
- package/dist/types/Menu/factory.d.ts +6 -0
- package/dist/types/Menu/index.d.ts +3 -0
- package/dist/types/Pagination/index.d.ts +7 -0
- package/dist/types/RadioButton/index.d.ts +20 -0
- package/dist/types/Select/controlled.d.ts +18 -0
- package/dist/types/Select/factory.d.ts +11 -0
- package/dist/types/Select/index.d.ts +5 -0
- package/dist/types/Select/types.d.ts +42 -0
- package/dist/types/Select/uncontrolled.d.ts +14 -0
- package/dist/types/StatusChip/index.d.ts +12 -0
- package/dist/types/Stepper/auto.d.ts +18 -0
- package/dist/types/Stepper/index.d.ts +4 -0
- package/dist/types/Stepper/stepper.d.ts +14 -0
- package/dist/types/Table/AutoTable/common.d.ts +31 -0
- package/dist/types/Table/AutoTable/controlled.d.ts +14 -0
- package/dist/types/Table/AutoTable/index.d.ts +46 -0
- package/dist/types/Table/AutoTable/types.d.ts +106 -0
- package/dist/types/Table/AutoTable/virtual.d.ts +22 -0
- package/dist/types/Table/TableCell/index.d.ts +14 -0
- package/dist/types/Table/TableRow/index.d.ts +10 -0
- package/dist/types/Table/index.d.ts +67 -0
- package/dist/types/TablePagination/index.d.ts +18 -0
- package/dist/types/Textarea/index.d.ts +22 -0
- package/dist/types/Toast/content.d.ts +4 -0
- package/dist/types/Toast/hook.d.ts +22 -0
- package/dist/types/Toast/index.d.ts +9 -0
- package/dist/types/Tooltip/index.d.ts +17 -0
- package/dist/types/Typography/index.d.ts +23 -0
- package/dist/types/extras/markdown/index.d.ts +27 -0
- package/dist/types/extras/uploady/index.d.ts +1 -0
- package/dist/types/extras/uploady/uploady.d.ts +30 -0
- package/dist/types/index.d.ts +68 -0
- package/dist/types/popover/index.d.ts +2 -0
- package/dist/types/popover/types.d.ts +8 -0
- package/dist/types/popover/utils.d.ts +2 -0
- package/dist/types/styles/createPalette.d.ts +3 -0
- package/dist/types/styles/createTheme.d.ts +8 -0
- package/dist/types/styles/createTypography.d.ts +16 -0
- package/dist/types/styles/css-vars.d.ts +27 -0
- package/dist/types/styles/cx.d.ts +1 -0
- package/dist/types/styles/defaultTheme.d.ts +4 -0
- package/dist/types/styles/defaultThemeOptions.d.ts +192 -0
- package/dist/types/styles/font-metrics.d.ts +22 -0
- package/dist/types/styles/index.d.ts +18 -0
- package/dist/types/styles/palette.d.ts +68 -0
- package/dist/types/styles/portal.d.ts +3 -0
- package/dist/types/styles/provider.client.d.ts +15 -0
- package/dist/types/styles/provider.css-vars.d.ts +10 -0
- package/dist/types/styles/themeOptions.d.ts +89 -0
- package/dist/types/styles/typography.d.ts +25 -0
- package/dist/types/styles/useTheme.d.ts +2 -0
- package/dist/types/unstable/Breadcrumbs/factory.d.ts +5 -0
- package/dist/types/unstable/Breadcrumbs/index.d.ts +30 -0
- package/dist/types/unstable/Card/index.d.ts +11 -0
- package/dist/types/unstable/LinearProgress/index.d.ts +14 -0
- package/dist/types/unstable/Tabs/index.d.ts +13 -0
- package/dist/types/unstable/extras/chart/index.d.ts +33 -0
- package/dist/types/unstable/extras/dialogs/index.d.ts +19 -0
- package/dist/types/unstable/extras/drawers/index.d.ts +19 -0
- package/dist/types/unstable/extras/forms/button.d.ts +8 -0
- package/dist/types/unstable/extras/forms/checkbox.d.ts +5 -0
- package/dist/types/unstable/extras/forms/index.d.ts +7 -0
- package/dist/types/unstable/extras/forms/input.d.ts +5 -0
- package/dist/types/unstable/extras/forms/select.d.ts +8 -0
- package/dist/types/unstable/extras/forms/shared.d.ts +8 -0
- package/dist/types/unstable/extras/forms/textarea.d.ts +5 -0
- package/dist/types/unstable/extras/forms/upload.d.ts +13 -0
- package/dist/types/unstable/index.d.ts +7 -0
- package/dist/types/utils/capitalize.d.ts +2 -0
- package/dist/types/utils/controlled.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/isNil.d.ts +1 -0
- package/package.json +24 -8
- package/CHANGELOG.md +0 -2666
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { type ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import type { IconSize } from './wrappers.js';
|
|
3
|
+
export type CommonIconProps<ExtraProps extends object = {}> = {
|
|
4
|
+
name?: string;
|
|
5
|
+
size?: IconSize;
|
|
6
|
+
'data-testid'?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & ExtraProps;
|
|
10
|
+
export type GenericIconComponent<ExtraProps extends object = {}> = ForwardRefExoticComponent<CommonIconProps<ExtraProps> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GenericIconComponent } from './shared.js';
|
|
3
|
+
import type { SvgIconProps } from '@mui/material';
|
|
4
|
+
export type IconSize = 'large' | 'medium' | 'small' | 'inherit';
|
|
5
|
+
export declare function adaptMuiSvgIcon(MuiIcon: React.ComponentType<SvgIconProps>): GenericIconComponent;
|
|
6
|
+
export declare function adaptSvgIcon(svg: React.JSX.Element): GenericIconComponent;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { MouseEventHandler } from 'react';
|
|
2
|
+
import { type PaletteActionVariantsColors, type ResolvablePaletteValue } from '../styles/index.js';
|
|
3
|
+
export type IconButtonVariant = 'primary' | 'secondary';
|
|
4
|
+
export type IconButtonPalette = ResolvablePaletteValue<PaletteActionVariantsColors>;
|
|
5
|
+
export type IconButtonProps = {
|
|
6
|
+
variant?: IconButtonVariant;
|
|
7
|
+
palette?: IconButtonPalette;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
11
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
'data-testid'?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export default IconButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type InputProps = React.ComponentPropsWithoutRef<'input'> & {
|
|
3
|
+
placeholder?: string | undefined;
|
|
4
|
+
value?: string | ReadonlyArray<string> | number | undefined;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
startIcon?: React.ReactNode;
|
|
8
|
+
endIcon?: React.ReactNode;
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
14
|
+
placeholder?: string | undefined;
|
|
15
|
+
value?: string | ReadonlyArray<string> | number | undefined;
|
|
16
|
+
error?: boolean | undefined;
|
|
17
|
+
disabled?: boolean | undefined;
|
|
18
|
+
startIcon?: React.ReactNode;
|
|
19
|
+
endIcon?: React.ReactNode;
|
|
20
|
+
'data-testid'?: string | undefined;
|
|
21
|
+
style?: React.CSSProperties | undefined;
|
|
22
|
+
className?: string | undefined;
|
|
23
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
24
|
+
export default Input;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PopoverAnchor, type PopoverPlacement, type PopoverStrategy, type PopoverPortalElProp } from '../popover/index.js';
|
|
3
|
+
export type MenuOption = {
|
|
4
|
+
label: string;
|
|
5
|
+
render?: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
onSelect(e: React.MouseEvent<HTMLButtonElement>): void;
|
|
8
|
+
'data-pendo'?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
options?: MenuOption[];
|
|
11
|
+
};
|
|
12
|
+
export type MenuRole = 'tooltip' | 'dialog' | 'alertdialog' | 'menu' | 'listbox' | 'grid' | 'tree' | 'select' | 'label' | 'combobox';
|
|
13
|
+
export type MenuVirtualizeOptions = {
|
|
14
|
+
itemSize?: number;
|
|
15
|
+
overscan?: number;
|
|
16
|
+
maxHeight?: number;
|
|
17
|
+
};
|
|
18
|
+
export type MenuProps = {
|
|
19
|
+
anchor?: PopoverAnchor;
|
|
20
|
+
anchorId?: string;
|
|
21
|
+
portalEl?: PopoverPortalElProp;
|
|
22
|
+
open: boolean;
|
|
23
|
+
role?: MenuRole;
|
|
24
|
+
placement?: PopoverPlacement;
|
|
25
|
+
strategy?: PopoverStrategy;
|
|
26
|
+
disableAutoFocus?: boolean;
|
|
27
|
+
enableTypeahead?: boolean;
|
|
28
|
+
matchAnchorWidth?: boolean;
|
|
29
|
+
virtualize?: boolean | MenuVirtualizeOptions;
|
|
30
|
+
onReachEnd?: () => void;
|
|
31
|
+
reachEndOffset?: number;
|
|
32
|
+
options: MenuOption[];
|
|
33
|
+
dismissEnabled?: boolean;
|
|
34
|
+
onDismiss?: () => void;
|
|
35
|
+
'data-testid'?: string;
|
|
36
|
+
style?: React.CSSProperties;
|
|
37
|
+
className?: string;
|
|
38
|
+
};
|
|
39
|
+
declare function Menu({ open: isOpen, role: assumeRole, placement, strategy, enableTypeahead, matchAnchorWidth, virtualize, onReachEnd, reachEndOffset, options, dismissEnabled, disableAutoFocus, className, ...props }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export type MenuItemProps = {
|
|
41
|
+
label?: string;
|
|
42
|
+
render?: React.ReactNode;
|
|
43
|
+
icon?: React.ReactNode;
|
|
44
|
+
isActive: boolean;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
'data-pendo'?: string;
|
|
47
|
+
};
|
|
48
|
+
export declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
interface NestedMenuProps {
|
|
50
|
+
parentOpen: boolean;
|
|
51
|
+
option: MenuOption;
|
|
52
|
+
disableAutoFocus?: boolean;
|
|
53
|
+
dismissEnabled?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare function NestedMenu({ parentOpen, option, disableAutoFocus, dismissEnabled }: NestedMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export default Menu;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PopoverPortalElProp } from '../popover/types.js';
|
|
2
|
+
import { type MenuProps } from './controlled.js';
|
|
3
|
+
export type MenuFactoryOptions = {
|
|
4
|
+
portalEl?: PopoverPortalElProp;
|
|
5
|
+
};
|
|
6
|
+
export declare function createMenuComponent({ portalEl }: MenuFactoryOptions): (props: MenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type RadioButtonProps = Omit<React.ComponentPropsWithoutRef<'input'>, 'type'> & {
|
|
3
|
+
defaultChecked?: boolean;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const RadioButton: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type"> & {
|
|
12
|
+
defaultChecked?: boolean | undefined;
|
|
13
|
+
checked?: boolean | undefined;
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
'data-testid'?: string | undefined;
|
|
17
|
+
style?: React.CSSProperties | undefined;
|
|
18
|
+
className?: string | undefined;
|
|
19
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
export default RadioButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CommonSelectProps, SelectMultiValue, SelectSingleValue } from './types.js';
|
|
3
|
+
export type ControlledSelectProps<OptionValue, Multiple extends boolean | undefined> = CommonSelectProps<OptionValue> & {
|
|
4
|
+
value: Multiple extends true ? SelectMultiValue<OptionValue> : SelectSingleValue<OptionValue>;
|
|
5
|
+
inputValue: string;
|
|
6
|
+
/**
|
|
7
|
+
* If `true`, `value` must be an array and the menu will support multiple selections.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
multiple: Multiple;
|
|
11
|
+
onChange(event: React.SyntheticEvent<HTMLElement>, newValue: Multiple extends true ? SelectMultiValue<OptionValue> : SelectSingleValue<OptionValue>): void;
|
|
12
|
+
onBlur?(): void;
|
|
13
|
+
onInputChange(event: React.SyntheticEvent<HTMLElement>, newValue: string): void;
|
|
14
|
+
'data-pendo'?: string;
|
|
15
|
+
tight?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function ControlledSelect<OptionValue, Multiple extends boolean | undefined>({ ref, value, freeSolo, triggerChangeOnBlur, multiple, endIcon, placeholder, clearable, tight, ...props }: ControlledSelectProps<OptionValue, Multiple>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default ControlledSelect;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PopoverPortalElProp } from '../popover/types.js';
|
|
2
|
+
import Select from './uncontrolled.js';
|
|
3
|
+
import ControlledSelect from './controlled.js';
|
|
4
|
+
export type SelectFactoryOptions = {
|
|
5
|
+
portalEl?: PopoverPortalElProp;
|
|
6
|
+
};
|
|
7
|
+
export declare function createSelectComponent({ portalEl }: SelectFactoryOptions): typeof Select;
|
|
8
|
+
export type ControlledSelectFactoryOptions = {
|
|
9
|
+
portalEl?: PopoverPortalElProp;
|
|
10
|
+
};
|
|
11
|
+
export declare function createControlledSelectComponent({ portalEl }: ControlledSelectFactoryOptions): typeof ControlledSelect;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PopoverStrategy, PopoverPortalElProp } from '../popover/index.js';
|
|
3
|
+
export type SelectOption<OptionValue> = {
|
|
4
|
+
value: OptionValue;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactElement;
|
|
7
|
+
};
|
|
8
|
+
export type SelectOptions<OptionValue> = SelectOption<OptionValue>[];
|
|
9
|
+
export type SelectSingleValue<Value> = Value | null;
|
|
10
|
+
export type SelectMultiValue<Value> = Value[] | null;
|
|
11
|
+
export type MenuVirtualizeOptions = {
|
|
12
|
+
itemSize?: number;
|
|
13
|
+
overscan?: number;
|
|
14
|
+
maxHeight?: number;
|
|
15
|
+
};
|
|
16
|
+
export type CommonSelectProps<OptionValue> = {
|
|
17
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
18
|
+
placeholder?: string | undefined;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
error?: boolean;
|
|
21
|
+
startIcon?: React.ReactNode;
|
|
22
|
+
endIcon?: React.ReactNode;
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
size?: number;
|
|
25
|
+
/**
|
|
26
|
+
* If true, the Select is free solo, meaning that the user input is not bound to provided options.
|
|
27
|
+
*/
|
|
28
|
+
freeSolo?: boolean;
|
|
29
|
+
triggerChangeOnBlur?: boolean;
|
|
30
|
+
pattern?: string;
|
|
31
|
+
multiple?: boolean;
|
|
32
|
+
options: SelectOptions<OptionValue>;
|
|
33
|
+
filterOptions?: (options: SelectOptions<OptionValue>) => SelectOptions<OptionValue>;
|
|
34
|
+
virtualize?: boolean | MenuVirtualizeOptions;
|
|
35
|
+
onMenuReachEnd?: () => void;
|
|
36
|
+
menuReachEndOffset?: number;
|
|
37
|
+
portalEl?: PopoverPortalElProp;
|
|
38
|
+
dropdownStrategy?: PopoverStrategy;
|
|
39
|
+
'data-testid'?: string;
|
|
40
|
+
style?: React.CSSProperties;
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CommonSelectProps, SelectMultiValue, SelectSingleValue } from './types.js';
|
|
3
|
+
export type { SelectOption, SelectOptions, SelectSingleValue } from './types.js';
|
|
4
|
+
export type SelectProps<OptionValue, Multiple extends boolean | undefined> = CommonSelectProps<OptionValue> & {
|
|
5
|
+
defaultValue?: Multiple extends true ? SelectMultiValue<OptionValue> : SelectSingleValue<OptionValue>;
|
|
6
|
+
value?: Multiple extends true ? SelectMultiValue<OptionValue> : SelectSingleValue<OptionValue>;
|
|
7
|
+
inputValue?: string;
|
|
8
|
+
onChange?(event: React.SyntheticEvent<HTMLElement>, newValue: Multiple extends true ? SelectMultiValue<OptionValue> : SelectSingleValue<OptionValue>): void;
|
|
9
|
+
onBlur?(): void;
|
|
10
|
+
onInputChange?(event: React.SyntheticEvent<HTMLElement>, newValue: string, tight?: boolean): void;
|
|
11
|
+
tight?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function Select<OptionValue, Multiple extends boolean | undefined>({ ref, defaultValue, value: propsValue, inputValue: propsInputValue, onChange: propsOnChange, onInputChange: propsOnInputChange, tight, ...props }: SelectProps<OptionValue, Multiple>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Select;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PaletteActionVariantsColors } from '../styles/index.js';
|
|
3
|
+
export type StatusChipPalette = PaletteActionVariantsColors;
|
|
4
|
+
export type StatusChipProps = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
palette?: StatusChipPalette;
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
};
|
|
11
|
+
declare const StatusChip: ({ children, palette: palette, ...props }: StatusChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default StatusChip;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Step } from './stepper.js';
|
|
3
|
+
export type AutoStep = Step & {
|
|
4
|
+
validateStep?: () => boolean;
|
|
5
|
+
step: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type AutoStepperProps = {
|
|
8
|
+
steps: AutoStep[];
|
|
9
|
+
onCancel: () => void;
|
|
10
|
+
onFinish: () => void;
|
|
11
|
+
backLabel?: string;
|
|
12
|
+
cancelLabel?: string;
|
|
13
|
+
nextLabel?: string;
|
|
14
|
+
finishLabel?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
export default function AutoStepper({ steps, onCancel, onFinish, backLabel, cancelLabel, nextLabel, finishLabel }: AutoStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type Step = {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type StepperProps = {
|
|
7
|
+
steps: Step[];
|
|
8
|
+
activeStep: number;
|
|
9
|
+
onChangeStep(activeStep: number): void;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Stepper: ({ steps, activeStep, onChangeStep, style, className }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Stepper;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ColumnDef as RTColumnDef, PaginationState, Row, RowSelectionState, SortingState, RowData } from '@tanstack/react-table';
|
|
2
|
+
import type { ColumnDef, ColumnHelper } from './types.js';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare function createColumnHelper<TData extends RowData, TMeta = unknown>(): ColumnHelper<TData, TMeta>;
|
|
5
|
+
export type AutoTableHookOptions<TData, TMeta = unknown> = {
|
|
6
|
+
data: TData[] | ReadonlyArray<TData>;
|
|
7
|
+
columns: ColumnDef<TData, TMeta>[];
|
|
8
|
+
meta?: TMeta;
|
|
9
|
+
getRowId?: (originalRow: TData, index: number, parent?: Row<TData>) => string;
|
|
10
|
+
sorting: SortingState;
|
|
11
|
+
enableSorting: boolean;
|
|
12
|
+
onSortingChange(newSorting: SortingState): void;
|
|
13
|
+
manualSorting?: boolean;
|
|
14
|
+
rowSelection: RowSelectionState;
|
|
15
|
+
enableRowSelection: boolean;
|
|
16
|
+
onRowSelectionChange(newRowSelection: RowSelectionState): void;
|
|
17
|
+
pagination: PaginationState;
|
|
18
|
+
enablePagination: boolean;
|
|
19
|
+
onPageChange(newPage: number): void;
|
|
20
|
+
onRowsPerPageChange(newRowsPerPage: number): void;
|
|
21
|
+
manualPagination?: boolean;
|
|
22
|
+
manualRowCount?: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function useAutoTable<TData, TMeta = unknown>(options: AutoTableHookOptions<TData, TMeta>): import("@tanstack/react-table").Table<TData>;
|
|
25
|
+
export declare function mapColumnDefs<TData, TMeta>(columnDefs: ColumnDef<TData, TMeta>[]): RTColumnDef<TData>[];
|
|
26
|
+
export declare function mapColumnDef<TData, TMeta, VData = unknown>(columnDef: ColumnDef<TData, TMeta, VData>): RTColumnDef<TData, VData>;
|
|
27
|
+
export type ErrorContainerProps = {
|
|
28
|
+
error: boolean | string;
|
|
29
|
+
};
|
|
30
|
+
export type ErrorContainer = React.ComponentType<ErrorContainerProps>;
|
|
31
|
+
export declare const DefaultErrorContainer: ErrorContainer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AutoTableHookOptions, type ErrorContainer as ErrorContainerType } from './common.js';
|
|
3
|
+
export type ControlledAutoTableProps<TData, TMeta = unknown> = AutoTableHookOptions<TData, TMeta> & {
|
|
4
|
+
stickyHeader?: boolean | {
|
|
5
|
+
offset: number;
|
|
6
|
+
};
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
zeroStateMessage?: React.ReactNode;
|
|
9
|
+
error?: boolean | string;
|
|
10
|
+
ErrorContainer?: ErrorContainerType;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export default function ControlledAutoTable<TData, TMeta = unknown>({ stickyHeader, loading, zeroStateMessage, error, ErrorContainer, style, className, ...options }: ControlledAutoTableProps<TData, TMeta>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { SortingState, RowSelectionState, Row } from '@tanstack/react-table';
|
|
2
|
+
import React, { type CSSProperties } from 'react';
|
|
3
|
+
import type { ColumnDef } from './types.js';
|
|
4
|
+
import { type ErrorContainer as ErrorContainerType } from './common.js';
|
|
5
|
+
export { createColumnHelper } from './common.js';
|
|
6
|
+
export type AutoTableProps<TData, TMeta = unknown> = {
|
|
7
|
+
data: TData[] | ReadonlyArray<TData>;
|
|
8
|
+
columns: ColumnDef<TData, TMeta>[];
|
|
9
|
+
meta?: TMeta;
|
|
10
|
+
getRowId?: (originalRow: TData, index: number, parent?: Row<TData>) => string;
|
|
11
|
+
/** controlled sorting */
|
|
12
|
+
sorting?: SortingState;
|
|
13
|
+
/** uncontrolled sorting */
|
|
14
|
+
defaultSorting?: SortingState;
|
|
15
|
+
enableSorting?: boolean;
|
|
16
|
+
onSortingChange?(newSorting: SortingState): void;
|
|
17
|
+
manualSorting?: boolean;
|
|
18
|
+
rowSelection?: RowSelectionState;
|
|
19
|
+
enableRowSelection?: boolean;
|
|
20
|
+
onRowSelectionChange?(newRowSelection: RowSelectionState): void;
|
|
21
|
+
page?: number;
|
|
22
|
+
rowsPerPage?: number;
|
|
23
|
+
enablePagination?: boolean;
|
|
24
|
+
onPageChange?(newPage: number): void;
|
|
25
|
+
onRowsPerPageChange?(newRowsPerPage: number): void;
|
|
26
|
+
manualRowCount?: number;
|
|
27
|
+
virtualizer?: {
|
|
28
|
+
scrollOffset?: number;
|
|
29
|
+
getScrollElement: () => Element | null;
|
|
30
|
+
renderWhenNotVisible?: boolean;
|
|
31
|
+
rowSize: number;
|
|
32
|
+
headerSize?: number;
|
|
33
|
+
overscan?: number;
|
|
34
|
+
};
|
|
35
|
+
stickyHeader?: boolean | {
|
|
36
|
+
offset: number;
|
|
37
|
+
};
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
zeroStateMessage?: React.ReactNode;
|
|
40
|
+
error?: boolean | string;
|
|
41
|
+
ErrorContainer?: ErrorContainerType;
|
|
42
|
+
style?: CSSProperties;
|
|
43
|
+
className?: string;
|
|
44
|
+
};
|
|
45
|
+
declare function AutoTable<TData, TMeta = unknown>(props: AutoTableProps<TData, TMeta>): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export default AutoTable;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export { type SortingState } from '@tanstack/react-table';
|
|
2
|
+
import { AccessorFn, Cell, Column, ColumnDefTemplate, ColumnMeta, DeepKeys, DeepValue, Getter, Header, Row, RowData, SortingFnOption, Table } from '@tanstack/react-table';
|
|
3
|
+
export type InternalColumnMeta = {
|
|
4
|
+
noVerticalPadding?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type ColumnHelper<TData extends RowData, TMeta> = {
|
|
7
|
+
accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never>(accessor: TAccessor, column: TAccessor extends AccessorFn<TData> ? DisplayColumnDef<TData, TMeta, TValue> : IdentifiedColumnDef<TData, TMeta, TValue>) => AccessorColumnDef<TData, TMeta, TValue>;
|
|
8
|
+
display: (column: DisplayColumnDef<TData, TMeta>) => ColumnDef<TData, TMeta, unknown>;
|
|
9
|
+
};
|
|
10
|
+
export interface HeaderContext<TData, TMeta, TValue> {
|
|
11
|
+
/**
|
|
12
|
+
* An instance of a column.
|
|
13
|
+
*/
|
|
14
|
+
column: Column<TData, TValue>;
|
|
15
|
+
/**
|
|
16
|
+
* An instance of a header.
|
|
17
|
+
*/
|
|
18
|
+
header: Header<TData, TValue>;
|
|
19
|
+
/**
|
|
20
|
+
* The table instance.
|
|
21
|
+
*/
|
|
22
|
+
table: Table<TData>;
|
|
23
|
+
meta: TMeta;
|
|
24
|
+
}
|
|
25
|
+
export type StringOrTemplateHeader<TData, TMeta, TValue> = string | ColumnDefTemplate<HeaderContext<TData, TMeta, TValue>>;
|
|
26
|
+
interface StringHeaderIdentifier {
|
|
27
|
+
header: string;
|
|
28
|
+
id?: string;
|
|
29
|
+
}
|
|
30
|
+
interface IdIdentifier<TData extends RowData, TMeta, TValue> {
|
|
31
|
+
id: string;
|
|
32
|
+
header?: StringOrTemplateHeader<TData, TMeta, TValue>;
|
|
33
|
+
}
|
|
34
|
+
type ColumnIdentifiers<TData extends RowData, TMeta, TValue> = IdIdentifier<TData, TMeta, TValue> | StringHeaderIdentifier;
|
|
35
|
+
export interface IdentifiedColumnDef<TData extends RowData, TMeta = unknown, TValue = unknown> extends ColumnDefBase<TData, TMeta, TValue> {
|
|
36
|
+
id?: string;
|
|
37
|
+
header?: StringOrTemplateHeader<TData, TMeta, TValue>;
|
|
38
|
+
}
|
|
39
|
+
export interface CellContext<TData extends RowData, TMeta, TValue> {
|
|
40
|
+
cell: Cell<TData, TValue>;
|
|
41
|
+
column: Column<TData, TValue>;
|
|
42
|
+
getValue: Getter<TValue>;
|
|
43
|
+
renderValue: Getter<TValue | null>;
|
|
44
|
+
row: Row<TData>;
|
|
45
|
+
table: Table<TData>;
|
|
46
|
+
meta: TMeta;
|
|
47
|
+
}
|
|
48
|
+
export interface ColumnDefBase<TData extends RowData, TMeta = unknown, TValue = unknown> {
|
|
49
|
+
getUniqueValues?: AccessorFn<TData, unknown[]>;
|
|
50
|
+
meta?: ColumnMeta<TData, TValue>;
|
|
51
|
+
cell?: ColumnDefTemplate<CellContext<TData, TMeta, TValue>>;
|
|
52
|
+
noVerticalPadding?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Enables/Disables multi-sorting for this column.
|
|
55
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablemultisort)
|
|
56
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
57
|
+
*/
|
|
58
|
+
enableMultiSort?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Enables/Disables sorting for this column.
|
|
61
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablesorting)
|
|
62
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
63
|
+
*/
|
|
64
|
+
enableSorting?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring
|
|
67
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#invertsorting)
|
|
68
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
69
|
+
*/
|
|
70
|
+
invertSorting?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Set to `true` for sorting toggles on this column to start in the descending direction.
|
|
73
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#sortdescfirst)
|
|
74
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
75
|
+
*/
|
|
76
|
+
sortDescFirst?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* The sorting function to use with this column.
|
|
79
|
+
* - A `string` referencing a built-in sorting function
|
|
80
|
+
* - A custom sorting function
|
|
81
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#sortingfn)
|
|
82
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
83
|
+
*/
|
|
84
|
+
sortingFn?: SortingFnOption<TData>;
|
|
85
|
+
/**
|
|
86
|
+
* - `false`
|
|
87
|
+
* - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)
|
|
88
|
+
* - `-1`
|
|
89
|
+
* - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)
|
|
90
|
+
* - `1`
|
|
91
|
+
* - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)
|
|
92
|
+
*/
|
|
93
|
+
sortUndefined?: false | -1 | 1;
|
|
94
|
+
}
|
|
95
|
+
export type DisplayColumnDef<TData extends RowData, TMeta = unknown, TValue = unknown> = ColumnDefBase<TData, TMeta, TValue> & ColumnIdentifiers<TData, TMeta, TValue>;
|
|
96
|
+
interface AccessorFnColumnDefBase<TData extends RowData, TMeta, TValue = unknown> extends ColumnDefBase<TData, TMeta, TValue> {
|
|
97
|
+
accessorFn: AccessorFn<TData, TValue>;
|
|
98
|
+
}
|
|
99
|
+
export type AccessorFnColumnDef<TData extends RowData, TMeta = unknown, TValue = unknown> = AccessorFnColumnDefBase<TData, TMeta, TValue> & ColumnIdentifiers<TData, TMeta, TValue>;
|
|
100
|
+
interface AccessorKeyColumnDefBase<TData extends RowData, TMeta, TValue = unknown> extends ColumnDefBase<TData, TMeta, TValue> {
|
|
101
|
+
id?: string;
|
|
102
|
+
accessorKey: (string & {}) | keyof TData;
|
|
103
|
+
}
|
|
104
|
+
export type AccessorKeyColumnDef<TData extends RowData, TMeta = unknown, TValue = unknown> = AccessorKeyColumnDefBase<TData, TMeta, TValue> & Partial<ColumnIdentifiers<TData, TMeta, TValue>>;
|
|
105
|
+
export type AccessorColumnDef<TData extends RowData, TMeta, TValue = unknown> = AccessorKeyColumnDef<TData, TMeta, TValue> | AccessorFnColumnDef<TData, TMeta, TValue>;
|
|
106
|
+
export type ColumnDef<TData extends RowData, TMeta = unknown, TValue = unknown> = DisplayColumnDef<TData, TMeta, TValue> | AccessorColumnDef<TData, TMeta, TValue>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AutoTableHookOptions, type ErrorContainer as ErrorContainerType } from './common.js';
|
|
3
|
+
export type VirtualControlledAutoTableProps<TData, TMeta = unknown> = AutoTableHookOptions<TData, TMeta> & {
|
|
4
|
+
stickyHeader?: boolean | {
|
|
5
|
+
offset: number;
|
|
6
|
+
};
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
zeroStateMessage?: React.ReactNode;
|
|
9
|
+
error?: boolean | string;
|
|
10
|
+
ErrorContainer?: ErrorContainerType;
|
|
11
|
+
scrollOffset?: number;
|
|
12
|
+
getScrollElement: () => Element | null;
|
|
13
|
+
renderWhenNotVisible?: boolean;
|
|
14
|
+
rowSize: number;
|
|
15
|
+
headerSize?: number;
|
|
16
|
+
overscan?: number;
|
|
17
|
+
debug?: boolean;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const TableMessageMaxHeight = 100;
|
|
22
|
+
export default function VirtualControlledAutoTable<TData, TMeta = unknown>({ stickyHeader, loading, zeroStateMessage, error, ErrorContainer, scrollOffset, getScrollElement, renderWhenNotVisible, rowSize, headerSize, overscan, debug, style, className, ...options }: VirtualControlledAutoTableProps<TData, TMeta>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TableCellProps = React.ComponentPropsWithoutRef<'td'> & {
|
|
3
|
+
'data-testid'?: string | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
noVerticalPadding?: boolean;
|
|
6
|
+
variant?: 'header' | 'data';
|
|
7
|
+
};
|
|
8
|
+
declare const TableCell: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & {
|
|
9
|
+
'data-testid'?: string | undefined;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
noVerticalPadding?: boolean | undefined;
|
|
12
|
+
variant?: "data" | "header" | undefined;
|
|
13
|
+
} & React.RefAttributes<HTMLTableCellElement>>;
|
|
14
|
+
export default TableCell;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TableRowProps = React.ComponentPropsWithoutRef<'tr'> & {
|
|
3
|
+
'data-testid'?: string | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const TableRow: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & {
|
|
7
|
+
'data-testid'?: string | undefined;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
} & React.RefAttributes<HTMLTableRowElement>>;
|
|
10
|
+
export default TableRow;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React, { type CSSProperties, MouseEventHandler } from 'react';
|
|
2
|
+
export type TableProps = {
|
|
3
|
+
'data-testid'?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Set the header sticky.
|
|
6
|
+
*
|
|
7
|
+
* ⚠️ It doesn't work with IE11.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
stickyHeader?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const Table: (props: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export type TableBodyProps = {
|
|
17
|
+
'data-testid'?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const TableBody: (props: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export type TableFooterProps = {
|
|
24
|
+
'data-testid'?: string;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
className?: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const TableFooter: (props: TableFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export type TableHeadProps = {
|
|
31
|
+
'data-testid'?: string;
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
className?: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const TableHead: (props: TableHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export type TableSortLabelProps = {
|
|
38
|
+
'data-testid'?: string;
|
|
39
|
+
/**
|
|
40
|
+
* If `true`, the label will have the active styling (should be true for the sorted column).
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
active?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Label contents, the arrow will be appended automatically.
|
|
46
|
+
*/
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* The current sort direction.
|
|
50
|
+
* @default 'asc'
|
|
51
|
+
*/
|
|
52
|
+
direction?: 'asc' | 'desc';
|
|
53
|
+
/**
|
|
54
|
+
* Hide sort icon when active is false.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
hideSortIcon?: boolean;
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
onClick?: MouseEventHandler<HTMLSpanElement>;
|
|
60
|
+
style?: CSSProperties;
|
|
61
|
+
className?: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const TableSortLabel: (props: TableSortLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export type TableZeroStateProps = {
|
|
65
|
+
children: React.ReactNode;
|
|
66
|
+
};
|
|
67
|
+
export declare const TableMessage: (props: TableZeroStateProps) => import("react/jsx-runtime").JSX.Element;
|