@max-ts/components 1.7.0 → 1.8.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/lib/components/Accordion/Accordion.js +1 -0
- package/lib/components/Accordion/Accordion.stories.js +6 -0
- package/lib/components/Accordion/index.js +1 -0
- package/lib/components/Accordion/styles.js +17 -0
- package/lib/components/ActionCell/ActionCell.js +1 -0
- package/lib/components/ActionCell/ActionCell.stories.js +1 -0
- package/lib/components/ActionCell/MainAction/MainAction.js +1 -0
- package/lib/components/ActionCell/MainAction/index.js +1 -0
- package/lib/components/ActionCell/SecondaryAction/SecondaryActions.js +1 -0
- package/lib/components/ActionCell/SecondaryAction/index.js +1 -0
- package/lib/components/ActionCell/index.js +1 -0
- package/lib/components/ActionCell/styles.js +4 -0
- package/lib/components/ActionCell/types.js +0 -0
- package/lib/components/ActionCell/useLogic/index.js +1 -0
- package/lib/components/ActionCell/useLogic/useLogic.js +1 -0
- package/lib/components/ActionGroup/ActionGroup.js +1 -0
- package/lib/components/ActionGroup/ActionGroup.stories.js +3 -0
- package/lib/components/ActionGroup/MainActions/MainActions.js +1 -0
- package/lib/components/ActionGroup/MainActions/index.js +1 -0
- package/lib/components/ActionGroup/MainActions/styles.js +5 -0
- package/lib/components/ActionGroup/SecondaryActions/SecondaryActions.js +1 -0
- package/lib/components/ActionGroup/SecondaryActions/index.js +1 -0
- package/lib/components/ActionGroup/SecondaryVisibleActions/SecondaryVisibleActions.js +1 -0
- package/lib/components/ActionGroup/SecondaryVisibleActions/index.js +1 -0
- package/lib/components/ActionGroup/SecondaryVisibleActions/styles.js +3 -0
- package/lib/components/ActionGroup/index.js +1 -0
- package/lib/components/ActionGroup/styles.js +4 -0
- package/lib/components/ActionGroup/useLogic/index.js +1 -0
- package/lib/components/ActionGroup/useLogic/useLogic.js +1 -0
- package/lib/components/Alert/Alert.js +1 -0
- package/lib/components/Alert/Alert.stories.js +1 -0
- package/lib/components/Alert/index.js +1 -0
- package/lib/components/Alert/styles.js +31 -0
- package/lib/components/Alert/types.js +0 -0
- package/lib/components/AsyncAutocomplete/AsyncAutocomplete.js +1 -0
- package/lib/components/AsyncAutocomplete/AsyncAutocomplete.stories.js +3 -0
- package/lib/components/AsyncAutocomplete/constants.js +1 -0
- package/lib/components/AsyncAutocomplete/index.js +1 -0
- package/lib/components/AsyncAutocomplete/useLogic/index.js +1 -0
- package/lib/components/AsyncAutocomplete/useLogic/useLogic.js +1 -0
- package/lib/components/Autocomplete/Autocomplete.js +1 -0
- package/lib/components/Autocomplete/Autocomplete.stories.js +3 -0
- package/lib/components/Autocomplete/constants.js +1 -0
- package/lib/components/Autocomplete/enums.js +1 -0
- package/lib/components/Autocomplete/index.js +1 -0
- package/lib/components/Autocomplete/styles.js +7 -0
- package/lib/components/Autocomplete/useLogic/index.js +1 -0
- package/lib/components/Autocomplete/useLogic/useLogic.js +1 -0
- package/lib/components/Autocomplete/useLogic/utils/checkIsInputEmpty/checkIsInputEmpty.js +1 -0
- package/lib/components/Autocomplete/useLogic/utils/checkIsInputEmpty/index.js +1 -0
- package/lib/components/Autocomplete/useLogic/utils/index.js +1 -0
- package/lib/components/Avatar/Avatar.js +1 -0
- package/lib/components/Avatar/Avatar.stories.js +1 -0
- package/lib/components/Avatar/index.js +1 -0
- package/lib/components/Avatar/styles.js +8 -0
- package/lib/components/Badge/Badge.js +1 -0
- package/lib/components/Badge/Badge.stories.js +1 -0
- package/lib/components/Badge/index.js +1 -0
- package/lib/components/Badge/styles.js +21 -0
- package/lib/components/Badge/types.js +0 -0
- package/lib/components/BottomDrawer/BottomDrawer.js +1 -0
- package/lib/components/BottomDrawer/BottomDrawer.stories.js +7 -0
- package/lib/components/BottomDrawer/constants.js +1 -0
- package/lib/components/BottomDrawer/index.js +1 -0
- package/lib/components/BottomDrawer/styles.js +26 -0
- package/lib/components/Breadcrumbs/index.js +1 -0
- package/lib/components/Button/Button.js +1 -0
- package/lib/components/Button/Button.stories.js +1 -0
- package/lib/components/Button/constants.js +1 -0
- package/lib/components/Button/enums.js +1 -0
- package/lib/components/Button/index.js +1 -0
- package/lib/components/Button/styles.js +10 -0
- package/lib/components/Button/types.js +0 -0
- package/lib/components/Button/useLogic/index.js +1 -0
- package/lib/components/Button/useLogic/useLogic.js +1 -0
- package/lib/components/ButtonBase/ButtonBase.js +1 -0
- package/lib/components/ButtonBase/index.js +1 -0
- package/lib/components/ButtonGroup/ButtonGroup.stories.js +1 -0
- package/lib/components/ButtonGroup/index.js +1 -0
- package/lib/components/Calendar/Calendar.js +1 -0
- package/lib/components/Calendar/Calendar.stories.js +1 -0
- package/lib/components/Calendar/DayButton/DayButton.js +1 -0
- package/lib/components/Calendar/DayButton/index.js +1 -0
- package/lib/components/Calendar/DayButton/styles.js +16 -0
- package/lib/components/Calendar/Dropdown/Dropdown.js +1 -0
- package/lib/components/Calendar/Dropdown/index.js +1 -0
- package/lib/components/Calendar/index.js +1 -0
- package/lib/components/Calendar/styles.js +37 -0
- package/lib/components/Card/index.js +1 -0
- package/lib/components/CardActions/index.js +1 -0
- package/lib/components/CardContent/index.js +1 -0
- package/lib/components/CardHeader/index.js +1 -0
- package/lib/components/Carousel/Carousel.js +1 -0
- package/lib/components/Carousel/Carousel.stories.js +1 -0
- package/lib/components/Carousel/CarouselContext.js +1 -0
- package/lib/components/Carousel/Content/Content.js +1 -0
- package/lib/components/Carousel/Content/index.js +1 -0
- package/lib/components/Carousel/Content/styles.js +8 -0
- package/lib/components/Carousel/Dots/Dots.js +1 -0
- package/lib/components/Carousel/Dots/index.js +1 -0
- package/lib/components/Carousel/Dots/styles.js +31 -0
- package/lib/components/Carousel/Dots/useLogic/index.js +1 -0
- package/lib/components/Carousel/Dots/useLogic/useLogic.js +1 -0
- package/lib/components/Carousel/Item/Item.js +1 -0
- package/lib/components/Carousel/Item/index.js +1 -0
- package/lib/components/Carousel/Item/styles.js +1 -0
- package/lib/components/Carousel/Next/Next.js +1 -0
- package/lib/components/Carousel/Next/index.js +1 -0
- package/lib/components/Carousel/Next/styles.js +10 -0
- package/lib/components/Carousel/Previous/Previous.js +1 -0
- package/lib/components/Carousel/Previous/index.js +1 -0
- package/lib/components/Carousel/Previous/styles.js +10 -0
- package/lib/components/Carousel/index.js +1 -0
- package/lib/components/Carousel/styles.js +3 -0
- package/lib/components/Carousel/types.js +0 -0
- package/lib/components/Carousel/useLogic/index.js +1 -0
- package/lib/components/Carousel/useLogic/useLogic.js +1 -0
- package/lib/components/Checkbox/Checkbox.js +1 -0
- package/lib/components/Checkbox/Checkbox.stories.js +1 -0
- package/lib/components/Checkbox/index.js +1 -0
- package/lib/components/Checkbox/styles.js +3 -0
- package/lib/components/CheckboxField/CheckboxField.js +1 -0
- package/lib/components/CheckboxField/CheckboxField.stories.js +1 -0
- package/lib/components/CheckboxField/index.js +1 -0
- package/lib/components/CheckboxField/styles.js +6 -0
- package/lib/components/Chevron/Chevron.js +1 -0
- package/lib/components/Chevron/Chevron.stories.js +1 -0
- package/lib/components/Chevron/index.js +1 -0
- package/lib/components/Chevron/styles.js +6 -0
- package/lib/components/CircularProgress/CircularProgress.js +1 -0
- package/lib/components/CircularProgress/CircularProgress.stories.js +1 -0
- package/lib/components/CircularProgress/constants.js +1 -0
- package/lib/components/CircularProgress/index.js +1 -0
- package/lib/components/CircularProgress/useLogic/index.js +1 -0
- package/lib/components/CircularProgress/useLogic/useLogic.js +1 -0
- package/lib/components/Collapse/Collapse.js +1 -0
- package/lib/components/Collapse/Collapse.stories.js +1 -0
- package/lib/components/Collapse/index.js +1 -0
- package/lib/components/ConfigProvider/ConfigProvider.js +1 -0
- package/lib/components/ConfigProvider/index.js +1 -0
- package/lib/components/ConfirmAction/ConfirmAction.js +1 -0
- package/lib/components/ConfirmAction/ConfirmAction.stories.js +1 -0
- package/lib/components/ConfirmAction/constants.js +1 -0
- package/lib/components/ConfirmAction/index.js +1 -0
- package/lib/components/ConfirmAction/styles.js +10 -0
- package/lib/components/ConfirmAction/useLogic/index.js +1 -0
- package/lib/components/ConfirmAction/useLogic/useLogic.js +1 -0
- package/lib/components/ConfirmDialog/ConfirmDialog.js +1 -0
- package/lib/components/ConfirmDialog/ConfirmDialog.stories.js +1 -0
- package/lib/components/ConfirmDialog/index.js +1 -0
- package/lib/components/ConfirmDialog/styles.js +5 -0
- package/lib/components/ConfirmDialog/useLogic/index.js +1 -0
- package/lib/components/ConfirmDialog/useLogic/useLogic.js +1 -0
- package/lib/components/Container/Container.js +1 -0
- package/lib/components/Container/index.js +1 -0
- package/lib/components/Container/styles.js +20 -0
- package/lib/components/ContentState/ContentState.js +1 -0
- package/lib/components/ContentState/ContentState.stories.js +7 -0
- package/lib/components/ContentState/index.js +1 -0
- package/lib/components/ContentState/styles.js +9 -0
- package/lib/components/ContentState/types.js +0 -0
- package/lib/components/CopyTypography/CopyTypography.js +1 -0
- package/lib/components/CopyTypography/CopyTypography.stories.js +7 -0
- package/lib/components/CopyTypography/enums.js +1 -0
- package/lib/components/CopyTypography/index.js +1 -0
- package/lib/components/CopyTypography/styles.js +18 -0
- package/lib/components/CopyTypography/useLogic/index.js +1 -0
- package/lib/components/CopyTypography/useLogic/useLogic.js +1 -0
- package/lib/components/DashboardLayout/DashboardContext.js +1 -0
- package/lib/components/DashboardLayout/DashboardLayout.js +1 -0
- package/lib/components/DashboardLayout/DashboardLayout.stories.js +4 -0
- package/lib/components/DashboardLayout/Main/Main.js +1 -0
- package/lib/components/DashboardLayout/Main/index.js +1 -0
- package/lib/components/DashboardLayout/Main/styles.js +7 -0
- package/lib/components/DashboardLayout/Sidebar/Sidebar.js +1 -0
- package/lib/components/DashboardLayout/Sidebar/constants.js +1 -0
- package/lib/components/DashboardLayout/Sidebar/index.js +1 -0
- package/lib/components/DashboardLayout/Sidebar/styles.js +27 -0
- package/lib/components/DashboardLayout/constants.js +1 -0
- package/lib/components/DashboardLayout/index.js +1 -0
- package/lib/components/DashboardLayout/styles.js +12 -0
- package/lib/components/DataGrid/Body/Body.js +1 -0
- package/lib/components/DataGrid/Body/index.js +1 -0
- package/lib/components/DataGrid/Body/styles.js +9 -0
- package/lib/components/DataGrid/Body/useLogic/index.js +1 -0
- package/lib/components/DataGrid/Body/useLogic/useLogic.js +1 -0
- package/lib/components/DataGrid/Cell/Cell.js +1 -0
- package/lib/components/DataGrid/Cell/index.js +1 -0
- package/lib/components/DataGrid/Cell/styles.js +11 -0
- package/lib/components/DataGrid/Cell/useLogic/index.js +1 -0
- package/lib/components/DataGrid/Cell/useLogic/useLogic.js +1 -0
- package/lib/components/DataGrid/DataGrid.js +1 -0
- package/lib/components/DataGrid/DataGrid.stories.js +1 -0
- package/lib/components/DataGrid/Footer/Footer.js +1 -0
- package/lib/components/DataGrid/Footer/index.js +1 -0
- package/lib/components/DataGrid/Footer/styles.js +8 -0
- package/lib/components/DataGrid/Head/Head.js +1 -0
- package/lib/components/DataGrid/Head/index.js +1 -0
- package/lib/components/DataGrid/Head/styles.js +12 -0
- package/lib/components/DataGrid/Head/useLogic/index.js +1 -0
- package/lib/components/DataGrid/Head/useLogic/useLogic.js +1 -0
- package/lib/components/DataGrid/HeadCell/HeadCell.js +1 -0
- package/lib/components/DataGrid/HeadCell/index.js +1 -0
- package/lib/components/DataGrid/HeadCell/styles.js +24 -0
- package/lib/components/DataGrid/HeadCell/useLogic/index.js +1 -0
- package/lib/components/DataGrid/HeadCell/useLogic/useLogic.js +1 -0
- package/lib/components/DataGrid/Loader/Loader.js +1 -0
- package/lib/components/DataGrid/Loader/index.js +1 -0
- package/lib/components/DataGrid/Loader/styles.js +14 -0
- package/lib/components/DataGrid/NoData/NoData.js +1 -0
- package/lib/components/DataGrid/NoData/index.js +1 -0
- package/lib/components/DataGrid/Row/Row.js +1 -0
- package/lib/components/DataGrid/Row/constants.js +1 -0
- package/lib/components/DataGrid/Row/index.js +1 -0
- package/lib/components/DataGrid/Row/styles.js +28 -0
- package/lib/components/DataGrid/Row/useLogic/index.js +1 -0
- package/lib/components/DataGrid/Row/useLogic/useLogic.js +1 -0
- package/lib/components/DataGrid/Row/utils/checkIsDisabled/checkIsDisabled.js +1 -0
- package/lib/components/DataGrid/Row/utils/checkIsDisabled/index.js +1 -0
- package/lib/components/DataGrid/Row/utils/index.js +1 -0
- package/lib/components/DataGrid/constants.js +1 -0
- package/lib/components/DataGrid/enums.js +1 -0
- package/lib/components/DataGrid/faker.js +1 -0
- package/lib/components/DataGrid/index.js +1 -0
- package/lib/components/DataGrid/styles.js +24 -0
- package/lib/components/DataGrid/types.js +0 -0
- package/lib/components/DataGrid/useLogic/index.js +1 -0
- package/lib/components/DataGrid/useLogic/useLogic.js +1 -0
- package/lib/components/DataGrid/useLogic/utils/getGridTemplateColumns/getGridTemplateColumns.js +1 -0
- package/lib/components/DataGrid/useLogic/utils/getGridTemplateColumns/index.js +1 -0
- package/lib/components/DataGrid/useLogic/utils/index.js +1 -0
- package/lib/components/DataGrid/utils/alignToJustifyContent/alignToJustifyContent.js +1 -0
- package/lib/components/DataGrid/utils/alignToJustifyContent/constants.js +1 -0
- package/lib/components/DataGrid/utils/alignToJustifyContent/index.js +1 -0
- package/lib/components/DataGrid/utils/index.js +1 -0
- package/lib/components/DataGridActionCell/DataGridActionCell.js +1 -0
- package/lib/components/DataGridActionCell/DataGridActionCell.stories.js +1 -0
- package/lib/components/DataGridActionCell/MainAction/MainAction.js +1 -0
- package/lib/components/DataGridActionCell/MainAction/MainIconButton/MainIconButton.js +1 -0
- package/lib/components/DataGridActionCell/MainAction/MainIconButton/index.js +1 -0
- package/lib/components/DataGridActionCell/MainAction/MainIconButton/useLogic/index.js +1 -0
- package/lib/components/DataGridActionCell/MainAction/MainIconButton/useLogic/useLogic.js +1 -0
- package/lib/components/DataGridActionCell/MainAction/index.js +1 -0
- package/lib/components/DataGridActionCell/SecondaryAction/SecondaryAction.js +1 -0
- package/lib/components/DataGridActionCell/SecondaryAction/index.js +1 -0
- package/lib/components/DataGridActionCell/index.js +1 -0
- package/lib/components/DataGridActionCell/styles.js +4 -0
- package/lib/components/DataGridActionCell/types.js +0 -0
- package/lib/components/DataGridActionCell/useLogic/index.js +1 -0
- package/lib/components/DataGridActionCell/useLogic/useLogic.js +1 -0
- package/lib/components/DataGridPagination/DataGridPagination.js +1 -0
- package/lib/components/DataGridPagination/DataGridPagination.stories.js +3 -0
- package/lib/components/DataGridPagination/constants.js +1 -0
- package/lib/components/DataGridPagination/faker.js +1 -0
- package/lib/components/DataGridPagination/index.js +1 -0
- package/lib/components/DataGridPagination/styles.js +16 -0
- package/lib/components/DataGridPagination/useLogic/index.js +1 -0
- package/lib/components/DataGridPagination/useLogic/useLogic.js +1 -0
- package/lib/components/DatePicker/DatePicker.js +1 -0
- package/lib/components/DatePicker/DatePicker.stories.js +1 -0
- package/lib/components/DatePicker/index.js +1 -0
- package/lib/components/DatePicker/styles.js +3 -0
- package/lib/components/Description/Description.js +1 -0
- package/lib/components/Description/Description.stories.js +15 -0
- package/lib/components/Description/DescriptionContext/DescriptionContext.js +1 -0
- package/lib/components/Description/DescriptionContext/DescriptionContextProvider/DescriptionContextProvider.js +1 -0
- package/lib/components/Description/DescriptionContext/DescriptionContextProvider/index.js +1 -0
- package/lib/components/Description/DescriptionContext/index.js +1 -0
- package/lib/components/Description/Name/Name.js +1 -0
- package/lib/components/Description/Name/index.js +1 -0
- package/lib/components/Description/Name/styles.js +18 -0
- package/lib/components/Description/Value/Value.js +1 -0
- package/lib/components/Description/Value/index.js +1 -0
- package/lib/components/Description/Value/styles.js +35 -0
- package/lib/components/Description/Value/useLogic/index.js +1 -0
- package/lib/components/Description/Value/useLogic/useLogic.js +1 -0
- package/lib/components/Description/constants.js +1 -0
- package/lib/components/Description/index.js +1 -0
- package/lib/components/Description/styles.js +17 -0
- package/lib/components/Description/useLogic/index.js +1 -0
- package/lib/components/Description/useLogic/useLogic.js +1 -0
- package/lib/components/DescriptionList/DescriptionList.js +1 -0
- package/lib/components/DescriptionList/DescriptionList.stories.js +5 -0
- package/lib/components/DescriptionList/index.js +1 -0
- package/lib/components/DescriptionList/styles.js +30 -0
- package/lib/components/DescriptionList/types.js +0 -0
- package/lib/components/DescriptionList/utils/getTooltipProps/getTooltipProps.js +1 -0
- package/lib/components/DescriptionList/utils/getTooltipProps/index.js +1 -0
- package/lib/components/DescriptionList/utils/index.js +1 -0
- package/lib/components/DescriptionTooltip/DescriptionTooltip.js +1 -0
- package/lib/components/DescriptionTooltip/index.js +1 -0
- package/lib/components/DescriptionTooltip/styles.js +12 -0
- package/lib/components/Dialog/Dialog.js +1 -0
- package/lib/components/Dialog/Dialog.stories.js +1 -0
- package/lib/components/Dialog/constants.js +1 -0
- package/lib/components/Dialog/index.js +1 -0
- package/lib/components/Dialog/styles.js +9 -0
- package/lib/components/DialogActions/DialogActions.js +1 -0
- package/lib/components/DialogActions/DialogActions.stories.js +1 -0
- package/lib/components/DialogActions/index.js +1 -0
- package/lib/components/DialogActions/styles.js +3 -0
- package/lib/components/DialogContent/DialogContent.js +1 -0
- package/lib/components/DialogContent/DialogContent.stories.js +1 -0
- package/lib/components/DialogContent/index.js +1 -0
- package/lib/components/DialogContent/styles.js +7 -0
- package/lib/components/DialogContentText/DialogContentText.js +1 -0
- package/lib/components/DialogContentText/DialogContentText.stories.js +1 -0
- package/lib/components/DialogContentText/index.js +1 -0
- package/lib/components/DialogContentText/styles.js +3 -0
- package/lib/components/DialogHeader/DialogHeader.js +1 -0
- package/lib/components/DialogHeader/DialogHeader.stories.js +1 -0
- package/lib/components/DialogHeader/index.js +1 -0
- package/lib/components/DialogHeader/styles.js +20 -0
- package/lib/components/DialogTitle/DialogTitle.js +1 -0
- package/lib/components/DialogTitle/index.js +1 -0
- package/lib/components/Divider/Divider.js +1 -0
- package/lib/components/Divider/Divider.stories.js +5 -0
- package/lib/components/Divider/index.js +1 -0
- package/lib/components/DropdownButton/DropdownButton.js +1 -0
- package/lib/components/DropdownButton/DropdownButton.stories.js +1 -0
- package/lib/components/DropdownButton/index.js +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.stories.js +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.stubs.js +1 -0
- package/lib/components/ErrorBoundary/constants.js +1 -0
- package/lib/components/ErrorBoundary/enums.js +1 -0
- package/lib/components/ErrorBoundary/index.js +1 -0
- package/lib/components/Filename/Filename.js +1 -0
- package/lib/components/Filename/Filename.stories.js +5 -0
- package/lib/components/Filename/index.js +1 -0
- package/lib/components/Filename/styles.js +11 -0
- package/lib/components/Filename/useLogic/index.js +1 -0
- package/lib/components/Filename/useLogic/useLogic.js +1 -0
- package/lib/components/Filename/useLogic/utils/findExtension/constants.js +1 -0
- package/lib/components/Filename/useLogic/utils/findExtension/findExtension.js +1 -0
- package/lib/components/Filename/useLogic/utils/findExtension/index.js +1 -0
- package/lib/components/Filename/useLogic/utils/index.js +1 -0
- package/lib/components/Filename/useLogic/utils/truncateString/constants.js +1 -0
- package/lib/components/Filename/useLogic/utils/truncateString/index.js +1 -0
- package/lib/components/Filename/useLogic/utils/truncateString/truncateString.js +1 -0
- package/lib/components/FormControl/FormControl.js +1 -0
- package/lib/components/FormControl/index.js +1 -0
- package/lib/components/FormControlLabel/FormControlLabel.js +1 -0
- package/lib/components/FormControlLabel/index.js +1 -0
- package/lib/components/FormControlLabel/styles.js +8 -0
- package/lib/components/FormControlLabel/types.js +0 -0
- package/lib/components/FormHelperText/FormHelperText.js +1 -0
- package/lib/components/FormHelperText/FormHelperTextContent/FormHelperTextContent.js +1 -0
- package/lib/components/FormHelperText/FormHelperTextContent/index.js +1 -0
- package/lib/components/FormHelperText/FormHelperTextContent/styles.js +15 -0
- package/lib/components/FormHelperText/index.js +1 -0
- package/lib/components/FormLabel/FormLabel.js +1 -0
- package/lib/components/FormLabel/index.js +1 -0
- package/lib/components/FormLabel/styles.js +4 -0
- package/lib/components/GuidTypography/GuidTypography.js +1 -0
- package/lib/components/GuidTypography/GuidTypography.stories.js +3 -0
- package/lib/components/GuidTypography/index.js +1 -0
- package/lib/components/IconButton/IconButton.js +1 -0
- package/lib/components/IconButton/IconButton.stories.js +1 -0
- package/lib/components/IconButton/index.js +1 -0
- package/lib/components/IconButton/styles.js +11 -0
- package/lib/components/IconDropdownButton/IconDropdownButton.js +1 -0
- package/lib/components/IconDropdownButton/IconDropdownButton.stories.js +1 -0
- package/lib/components/IconDropdownButton/index.js +1 -0
- package/lib/components/InputOTP/InputOTP.js +1 -0
- package/lib/components/InputOTP/InputOTP.stories.js +1 -0
- package/lib/components/InputOTP/Separator/Separator.js +1 -0
- package/lib/components/InputOTP/Separator/index.js +1 -0
- package/lib/components/InputOTP/Separator/styles.js +8 -0
- package/lib/components/InputOTP/Slot/Slot.js +1 -0
- package/lib/components/InputOTP/Slot/index.js +1 -0
- package/lib/components/InputOTP/Slot/styles.js +44 -0
- package/lib/components/InputOTP/index.js +1 -0
- package/lib/components/InputOTP/styles.js +22 -0
- package/lib/components/InternalErrorPlaceholder/InternalErrorPlaceholder.js +1 -0
- package/lib/components/InternalErrorPlaceholder/InternalErrorPlaceholder.stories.js +1 -0
- package/lib/components/InternalErrorPlaceholder/index.js +1 -0
- package/lib/components/Link/Link.js +1 -0
- package/lib/components/Link/Link.stories.js +1 -0
- package/lib/components/Link/index.js +1 -0
- package/lib/components/Link/styles.js +35 -0
- package/lib/components/List/List.js +1 -0
- package/lib/components/List/List.stories.js +1 -0
- package/lib/components/List/index.js +1 -0
- package/lib/components/ListItem/ListItem.js +1 -0
- package/lib/components/ListItem/ListItem.stories.js +1 -0
- package/lib/components/ListItem/constants.js +1 -0
- package/lib/components/ListItem/index.js +1 -0
- package/lib/components/ListItem/styles.js +11 -0
- package/lib/components/ListItemButton/ListItemButton.js +1 -0
- package/lib/components/ListItemButton/ListItemButton.stories.js +1 -0
- package/lib/components/ListItemButton/constants.js +1 -0
- package/lib/components/ListItemButton/index.js +1 -0
- package/lib/components/ListItemIcon/ListItemIcon.js +1 -0
- package/lib/components/ListItemIcon/ListItemIcon.stories.js +1 -0
- package/lib/components/ListItemIcon/index.js +1 -0
- package/lib/components/ListItemIcon/styles.js +3 -0
- package/lib/components/ListItemText/ListItemText.js +1 -0
- package/lib/components/ListItemText/ListItemText.stories.js +1 -0
- package/lib/components/ListItemText/index.js +1 -0
- package/lib/components/ListSubheader/ListSubheader.js +1 -0
- package/lib/components/ListSubheader/ListSubheader.stories.js +1 -0
- package/lib/components/ListSubheader/index.js +1 -0
- package/lib/components/MaskField/MaskField.js +1 -0
- package/lib/components/MaskField/index.js +1 -0
- package/lib/components/Menu/Menu.js +1 -0
- package/lib/components/Menu/Menu.stories.js +1 -0
- package/lib/components/Menu/index.js +1 -0
- package/lib/components/MenuItem/MenuItem.js +1 -0
- package/lib/components/MenuItem/MenuItem.stories.js +1 -0
- package/lib/components/MenuItem/index.js +1 -0
- package/lib/components/MenuList/MenuList.js +1 -0
- package/lib/components/MenuList/MenuList.stories.js +1 -0
- package/lib/components/MenuList/index.js +1 -0
- package/lib/components/MenuList/styles.js +8 -0
- package/lib/components/MenuList/types.js +0 -0
- package/lib/components/Notification/Notification.js +1 -0
- package/lib/components/Notification/NotificationContainer/NotificationContainer.js +1 -0
- package/lib/components/Notification/NotificationContainer/index.js +1 -0
- package/lib/components/Notification/NotificationContainer/styles.js +9 -0
- package/lib/components/Notification/constants.js +1 -0
- package/lib/components/Notification/index.js +1 -0
- package/lib/components/OutdatedReleasePlaceholder/OutdatedReleasePlaceholder.js +1 -0
- package/lib/components/OutdatedReleasePlaceholder/OutdatedReleasePlaceholder.stories.js +1 -0
- package/lib/components/OutdatedReleasePlaceholder/index.js +1 -0
- package/lib/components/OverflowTypography/OverflowTypography.js +1 -0
- package/lib/components/OverflowTypography/OverflowTypography.stories.js +3 -0
- package/lib/components/OverflowTypography/hooks/index.js +1 -0
- package/lib/components/OverflowTypography/hooks/useOverflowed/index.js +1 -0
- package/lib/components/OverflowTypography/hooks/useOverflowed/useOverflowed.js +1 -0
- package/lib/components/OverflowTypography/index.js +1 -0
- package/lib/components/OverflowTypography/styles.js +20 -0
- package/lib/components/OverflowTypography/useLogic/index.js +1 -0
- package/lib/components/OverflowTypography/useLogic/useLogic.js +1 -0
- package/lib/components/OverflowTypography/utils/index.js +1 -0
- package/lib/components/OverflowTypography/utils/truncateString/index.js +1 -0
- package/lib/components/OverflowTypography/utils/truncateString/truncateString.js +1 -0
- package/lib/components/PageLayout/Aside/Aside.js +1 -0
- package/lib/components/PageLayout/Aside/index.js +1 -0
- package/lib/components/PageLayout/Aside/styles.js +10 -0
- package/lib/components/PageLayout/Content/Content.js +1 -0
- package/lib/components/PageLayout/Content/index.js +1 -0
- package/lib/components/PageLayout/Content/styles.js +8 -0
- package/lib/components/PageLayout/Footer/Footer.js +1 -0
- package/lib/components/PageLayout/Footer/index.js +1 -0
- package/lib/components/PageLayout/Footer/styles.js +15 -0
- package/lib/components/PageLayout/Header/Header.js +1 -0
- package/lib/components/PageLayout/Header/index.js +1 -0
- package/lib/components/PageLayout/Header/styles.js +44 -0
- package/lib/components/PageLayout/PageLayout.js +1 -0
- package/lib/components/PageLayout/PageLayout.stories.js +4 -0
- package/lib/components/PageLayout/constants.js +1 -0
- package/lib/components/PageLayout/index.js +1 -0
- package/lib/components/PageLayout/styles.js +32 -0
- package/lib/components/Pagination/Pagination.js +1 -0
- package/lib/components/Pagination/Pagination.stories.js +1 -0
- package/lib/components/Pagination/index.js +1 -0
- package/lib/components/Pagination/types.js +0 -0
- package/lib/components/Paper/Paper.js +1 -0
- package/lib/components/Paper/index.js +1 -0
- package/lib/components/PeriodPicker/PeriodPicker.js +1 -0
- package/lib/components/PeriodPicker/PeriodPicker.stories.js +1 -0
- package/lib/components/PeriodPicker/YearsDropdown/YearsDropdown.js +1 -0
- package/lib/components/PeriodPicker/YearsDropdown/index.js +1 -0
- package/lib/components/PeriodPicker/constants.js +1 -0
- package/lib/components/PeriodPicker/index.js +1 -0
- package/lib/components/PeriodPicker/styles.js +16 -0
- package/lib/components/PeriodPicker/utils.js +1 -0
- package/lib/components/Placeholder/Image/Image.js +1 -0
- package/lib/components/Placeholder/Image/index.js +1 -0
- package/lib/components/Placeholder/Image/styles.js +17 -0
- package/lib/components/Placeholder/Placeholder.js +1 -0
- package/lib/components/Placeholder/Placeholder.stories.js +5 -0
- package/lib/components/Placeholder/constants.js +1 -0
- package/lib/components/Placeholder/index.js +1 -0
- package/lib/components/Placeholder/styles.js +59 -0
- package/lib/components/Placeholder/types.js +0 -0
- package/lib/components/Popover/Popover.js +1 -0
- package/lib/components/Popover/Popover.stories.js +10 -0
- package/lib/components/Popover/index.js +1 -0
- package/lib/components/Profile/MenuList/MenuList.js +1 -0
- package/lib/components/Profile/MenuList/index.js +1 -0
- package/lib/components/Profile/MenuList/styles.js +9 -0
- package/lib/components/Profile/Profile.js +1 -0
- package/lib/components/Profile/Profile.stories.js +1 -0
- package/lib/components/Profile/index.js +1 -0
- package/lib/components/Profile/styles.js +21 -0
- package/lib/components/ProgressBar/ProgressBar.js +1 -0
- package/lib/components/ProgressBar/ProgressBar.stories.js +1 -0
- package/lib/components/ProgressBar/index.js +1 -0
- package/lib/components/Radio/Icon/Icon.js +1 -0
- package/lib/components/Radio/Icon/index.js +1 -0
- package/lib/components/Radio/Radio.js +1 -0
- package/lib/components/Radio/Radio.stories.js +1 -0
- package/lib/components/Radio/constants.js +1 -0
- package/lib/components/Radio/index.js +1 -0
- package/lib/components/Radio/styles.js +57 -0
- package/lib/components/RadioField/RadioField.js +1 -0
- package/lib/components/RadioField/RadioField.stories.js +5 -0
- package/lib/components/RadioField/index.js +1 -0
- package/lib/components/RadioField/styles.js +4 -0
- package/lib/components/RadioGroup/RadioGroup.js +1 -0
- package/lib/components/RadioGroup/RadioGroup.stories.js +1 -0
- package/lib/components/RadioGroup/RadioGroupContext/RadioGroupContext.js +1 -0
- package/lib/components/RadioGroup/RadioGroupContext/RadioGroupContextProvider/RadioGroupContextProvider.js +1 -0
- package/lib/components/RadioGroup/RadioGroupContext/RadioGroupContextProvider/index.js +1 -0
- package/lib/components/RadioGroup/RadioGroupContext/index.js +1 -0
- package/lib/components/RadioGroup/index.js +1 -0
- package/lib/components/RadioGroupField/RadioGroupField.js +1 -0
- package/lib/components/RadioGroupField/index.js +1 -0
- package/lib/components/RangeInput/RangeInput.js +1 -0
- package/lib/components/RangeInput/RangeInput.stories.js +1 -0
- package/lib/components/RangeInput/index.js +1 -0
- package/lib/components/RangeInput/styles.js +49 -0
- package/lib/components/SearchField/SearchField.js +1 -0
- package/lib/components/SearchField/index.js +1 -0
- package/lib/components/SearchField/styles.js +21 -0
- package/lib/components/Select/Select.js +1 -0
- package/lib/components/Select/Select.stories.js +1 -0
- package/lib/components/Select/constants.js +1 -0
- package/lib/components/Select/index.js +1 -0
- package/lib/components/Select/styles.js +44 -0
- package/lib/components/Select/useLogic/index.js +1 -0
- package/lib/components/Select/useLogic/useLogic.js +1 -0
- package/lib/components/SidebarNav/MenuItem/MenuItem.js +1 -0
- package/lib/components/SidebarNav/MenuItem/index.js +1 -0
- package/lib/components/SidebarNav/MenuItem/styles.js +52 -0
- package/lib/components/SidebarNav/SidebarNav.js +1 -0
- package/lib/components/SidebarNav/SidebarNav.stories.js +1 -0
- package/lib/components/SidebarNav/index.js +1 -0
- package/lib/components/SidebarNav/styles.js +10 -0
- package/lib/components/SidebarNav/types.js +0 -0
- package/lib/components/SidebarProduct/SidebarProduct.js +1 -0
- package/lib/components/SidebarProduct/index.js +1 -0
- package/lib/components/SidebarProduct/styles.js +24 -0
- package/lib/components/Skeleton/Skeleton.js +1 -0
- package/lib/components/Skeleton/Skeleton.stories.js +3 -0
- package/lib/components/Skeleton/index.js +1 -0
- package/lib/components/Skeleton/styles.js +11 -0
- package/lib/components/Slider/Slider.js +1 -0
- package/lib/components/Slider/Slider.stories.js +1 -0
- package/lib/components/Slider/index.js +1 -0
- package/lib/components/Slider/styles.js +26 -0
- package/lib/components/Switch/Switch.js +1 -0
- package/lib/components/Switch/Switch.stories.js +1 -0
- package/lib/components/Switch/index.js +1 -0
- package/lib/components/Switch/styles.js +12 -0
- package/lib/components/Tab/Tab.js +1 -0
- package/lib/components/Tab/Tab.stories.js +1 -0
- package/lib/components/Tab/index.js +1 -0
- package/lib/components/Tab/styles.js +20 -0
- package/lib/components/Tabs/Tabs.js +1 -0
- package/lib/components/Tabs/Tabs.stories.js +1 -0
- package/lib/components/Tabs/index.js +1 -0
- package/lib/components/Tabs/styles.js +16 -0
- package/lib/components/Tag/Tag.js +1 -0
- package/lib/components/Tag/Tag.stories.js +11 -0
- package/lib/components/Tag/enums.js +1 -0
- package/lib/components/Tag/index.js +1 -0
- package/lib/components/Tag/styles.js +79 -0
- package/lib/components/Tag/types.js +0 -0
- package/lib/components/TagBadge/TagBadge.js +1 -0
- package/lib/components/TagBadge/TagBadge.stories.js +1 -0
- package/lib/components/TagBadge/index.js +1 -0
- package/lib/components/TagBadge/styles.js +11 -0
- package/lib/components/TagBadge/utils/getCheckableTagBadgeBgColor/getCheckableTagBadgeBgColor.js +1 -0
- package/lib/components/TagBadge/utils/getCheckableTagBadgeBgColor/index.js +1 -0
- package/lib/components/TagBadge/utils/index.js +1 -0
- package/lib/components/TagsList/Tag/Tag.js +1 -0
- package/lib/components/TagsList/Tag/index.js +1 -0
- package/lib/components/TagsList/Tag/styles.js +10 -0
- package/lib/components/TagsList/Tag/useLogic/index.js +1 -0
- package/lib/components/TagsList/Tag/useLogic/useLogic.js +1 -0
- package/lib/components/TagsList/TagsList.js +1 -0
- package/lib/components/TagsList/index.js +1 -0
- package/lib/components/TagsList/styles.js +4 -0
- package/lib/components/TagsList/types.js +0 -0
- package/lib/components/TagsList/useLogic/index.js +1 -0
- package/lib/components/TagsList/useLogic/useLogic.js +1 -0
- package/lib/components/TagsList/utils/getElementByText/getElementByText.js +1 -0
- package/lib/components/TagsList/utils/getElementByText/index.js +1 -0
- package/lib/components/TagsList/utils/getKey/getKey.js +1 -0
- package/lib/components/TagsList/utils/getKey/index.js +1 -0
- package/lib/components/TagsList/utils/index.js +1 -0
- package/lib/components/TextArea/TextArea.js +1 -0
- package/lib/components/TextArea/TextArea.stories.js +1 -0
- package/lib/components/TextArea/index.js +1 -0
- package/lib/components/TextField/TextField.js +1 -0
- package/lib/components/TextField/TextField.stories.js +1 -0
- package/lib/components/TextField/index.js +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.js +1 -0
- package/lib/components/ThemeProvider/index.js +1 -0
- package/lib/components/Tooltip/Tooltip.js +1 -0
- package/lib/components/Tooltip/Tooltip.stories.js +10 -0
- package/lib/components/Tooltip/constants.js +1 -0
- package/lib/components/Tooltip/index.js +1 -0
- package/lib/components/Tooltip/styles.js +37 -0
- package/lib/components/Tooltip/types.js +0 -0
- package/lib/components/Typography/Typography.js +1 -0
- package/lib/components/Typography/Typography.stories.js +3 -0
- package/lib/components/Typography/enums.js +1 -0
- package/lib/components/Typography/hooks/index.js +1 -0
- package/lib/components/Typography/hooks/useTypographyColor/index.js +1 -0
- package/lib/components/Typography/hooks/useTypographyColor/useTypographyColor.js +1 -0
- package/lib/components/Typography/index.js +1 -0
- package/lib/components/Typography/styles.js +3 -0
- package/lib/components/Typography/types.js +0 -0
- package/lib/components/index.js +1 -0
- package/lib/components/types.js +0 -0
- package/lib/form/EditableText/EditableText.d.ts +52 -0
- package/lib/form/EditableText/EditableText.d.ts.map +1 -0
- package/lib/form/EditableText/EditableText.js +1 -0
- package/lib/form/EditableText/EditingForm/EditingForm.d.ts +38 -0
- package/lib/form/EditableText/EditingForm/EditingForm.d.ts.map +1 -0
- package/lib/form/EditableText/EditingForm/EditingForm.js +1 -0
- package/lib/form/EditableText/EditingForm/index.d.ts +2 -0
- package/lib/form/EditableText/EditingForm/index.d.ts.map +1 -0
- package/lib/form/EditableText/EditingForm/index.js +1 -0
- package/lib/form/EditableText/EditingForm/styles.d.ts +17 -0
- package/lib/form/EditableText/EditingForm/styles.d.ts.map +1 -0
- package/lib/form/EditableText/EditingForm/styles.js +10 -0
- package/lib/form/EditableText/EditingForm/useLogic/index.d.ts +2 -0
- package/lib/form/EditableText/EditingForm/useLogic/index.d.ts.map +1 -0
- package/lib/form/EditableText/EditingForm/useLogic/index.js +1 -0
- package/lib/form/EditableText/EditingForm/useLogic/useLogic.d.ts +11 -0
- package/lib/form/EditableText/EditingForm/useLogic/useLogic.d.ts.map +1 -0
- package/lib/form/EditableText/EditingForm/useLogic/useLogic.js +1 -0
- package/lib/form/EditableText/constants.d.ts +2 -0
- package/lib/form/EditableText/constants.d.ts.map +1 -0
- package/lib/form/EditableText/constants.js +1 -0
- package/lib/form/EditableText/index.d.ts +2 -0
- package/lib/form/EditableText/index.d.ts.map +1 -0
- package/lib/form/EditableText/index.js +1 -0
- package/lib/form/EditableText/styles.d.ts +27 -0
- package/lib/form/EditableText/styles.d.ts.map +1 -0
- package/lib/form/EditableText/styles.js +43 -0
- package/lib/form/EditableText/types.d.ts +11 -0
- package/lib/form/EditableText/types.d.ts.map +1 -0
- package/lib/form/EditableText/types.js +0 -0
- package/lib/form/EditableText/useLogic/index.d.ts +2 -0
- package/lib/form/EditableText/useLogic/index.d.ts.map +1 -0
- package/lib/form/EditableText/useLogic/index.js +1 -0
- package/lib/form/EditableText/useLogic/useLogic.d.ts +19 -0
- package/lib/form/EditableText/useLogic/useLogic.d.ts.map +1 -0
- package/lib/form/EditableText/useLogic/useLogic.js +1 -0
- package/lib/form/Form/Form.js +1 -0
- package/lib/form/Form/index.js +1 -0
- package/lib/form/FormAutocomplete/FormAutocomplete.js +1 -0
- package/lib/form/FormAutocomplete/index.js +1 -0
- package/lib/form/FormCheckbox/FormCheckbox.js +1 -0
- package/lib/form/FormCheckbox/index.js +1 -0
- package/lib/form/FormCheckbox/types.js +0 -0
- package/lib/form/FormMaskField/FormMaskField.js +1 -0
- package/lib/form/FormMaskField/index.js +1 -0
- package/lib/form/FormMaskField/types.js +0 -0
- package/lib/form/FormSelect/FormSelect.js +1 -0
- package/lib/form/FormSelect/index.js +1 -0
- package/lib/form/FormSubmitButton/FormSubmitButton.js +1 -0
- package/lib/form/FormSubmitButton/index.js +1 -0
- package/lib/form/FormTextField/FormTextField.js +1 -0
- package/lib/form/FormTextField/index.js +1 -0
- package/lib/form/FormTextField/types.js +0 -0
- package/lib/form/external.js +1 -0
- package/lib/form/hooks/index.js +1 -0
- package/lib/form/hooks/useForm/index.js +1 -0
- package/lib/form/hooks/useForm/useForm.js +1 -0
- package/lib/form/hooks/useFormContext/index.js +1 -0
- package/lib/form/index.d.ts +2 -1
- package/lib/form/index.d.ts.map +1 -1
- package/lib/form/index.js +1 -0
- package/lib/form/types.js +0 -0
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/useMenu/index.js +1 -0
- package/lib/hooks/useMenu/useMenu.js +1 -0
- package/lib/hooks/useMenu/useMenu.stories.js +1 -0
- package/lib/hooks/usePopover/index.js +1 -0
- package/lib/hooks/usePopover/usePopover.js +1 -0
- package/lib/hooks/useToggle/index.js +1 -0
- package/lib/hooks/useToggle/useToggle.js +1 -0
- package/lib/hooks/useViewportType/index.js +1 -0
- package/lib/hooks/useViewportType/useViewportType.js +1 -0
- package/lib/hooks/useViewportType/useViewportType.stories.js +1 -0
- package/lib/icons/index.js +1 -0
- package/lib/index.js +1 -0
- package/lib/theme/baseTheme/baseTheme.js +1 -0
- package/lib/theme/baseTheme/index.js +1 -0
- package/lib/theme/breakpoints.js +1 -0
- package/lib/theme/components/MuiAlert.js +1 -0
- package/lib/theme/components/MuiAutocomplete.js +1 -0
- package/lib/theme/components/MuiButton.js +1 -0
- package/lib/theme/components/MuiButtonBase.js +1 -0
- package/lib/theme/components/MuiCircularProgress.js +1 -0
- package/lib/theme/components/MuiDialog.js +1 -0
- package/lib/theme/components/MuiDialogActions.js +1 -0
- package/lib/theme/components/MuiDialogContent.js +1 -0
- package/lib/theme/components/MuiDialogTitle.js +1 -0
- package/lib/theme/components/MuiDrawer.js +1 -0
- package/lib/theme/components/MuiFormHelperText.js +1 -0
- package/lib/theme/components/MuiFormLabel.js +1 -0
- package/lib/theme/components/MuiInputLabel.js +1 -0
- package/lib/theme/components/MuiLinearProgress.js +1 -0
- package/lib/theme/components/MuiListItemText.js +1 -0
- package/lib/theme/components/MuiMenu.js +1 -0
- package/lib/theme/components/MuiMenuItem.js +1 -0
- package/lib/theme/components/MuiOutlinedInput.js +1 -0
- package/lib/theme/components/MuiPaginationItem.js +1 -0
- package/lib/theme/components/MuiPaper.js +1 -0
- package/lib/theme/components/MuiStep.js +1 -0
- package/lib/theme/components/MuiStepConnector.js +1 -0
- package/lib/theme/components/MuiStepLabel.js +1 -0
- package/lib/theme/components/MuiSwitch.js +1 -0
- package/lib/theme/components/MuiTab.js +1 -0
- package/lib/theme/components/MuiTableCell.js +1 -0
- package/lib/theme/components/MuiTableHead.js +1 -0
- package/lib/theme/components/MuiTableRow.js +1 -0
- package/lib/theme/components/MuiTabs.js +1 -0
- package/lib/theme/components/MuiTextField.js +1 -0
- package/lib/theme/components/MuiToggleButton.js +1 -0
- package/lib/theme/components/MuiToggleButtonGroup.js +1 -0
- package/lib/theme/components/MuiTypography.js +1 -0
- package/lib/theme/components/components.js +1 -0
- package/lib/theme/components/index.js +1 -0
- package/lib/theme/constants.js +1 -0
- package/lib/theme/elevation.js +1 -0
- package/lib/theme/index.js +1 -0
- package/lib/theme/palette/componentsColors/componentsColors.js +1 -0
- package/lib/theme/palette/componentsColors/index.js +1 -0
- package/lib/theme/palette/componentsColors/linkColors/index.js +1 -0
- package/lib/theme/palette/componentsColors/linkColors/linkColors.js +1 -0
- package/lib/theme/palette/index.js +1 -0
- package/lib/theme/palette/palette.js +1 -0
- package/lib/theme/palette/types.js +0 -0
- package/lib/theme/shape.js +1 -0
- package/lib/theme/types.js +0 -0
- package/lib/theme/typography.js +1 -0
- package/package.json +6 -5
- package/lib/index.mjs +0 -1515
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Eye as o,Pencil as i,Send as t,Trash as n}from"lucide-react";import{useEffect as l,useMemo as r,useState as a}from"react";import{ConfigProvider as c}from"../ConfigProvider/index.js";import{DataGridActionCell as s}from"../DataGridActionCell/index.js";import{DataGridPagination as d}from"../DataGridPagination/index.js";import{DataGrid as m}from"./DataGrid.js";import{makeColumns as u,makeDataList as g,makeRandomDate as w}from"./faker.js";let k="../../illustrations/error.svg",C={title:"Components/DataGrid",component:m,tags:["autodocs"]},R={id:"1",documentName:"Договор №1",recipient:"ИП Иванов О.В.",createDate:"2022-03-24T17:50:40.206Z"},f={main:[{icon:e(o,{}),name:"Просмотреть",onClick:()=>console.log("main"),isBlockingOperation:!0},{icon:e(t,{}),nested:!0,name:"Отправить",actions:[{name:"Туда",onClick:()=>console.log("nested 1")},{name:"Сюда",onClick:()=>console.log("nested 2")}]}],secondary:[{name:"Редактировать",onClick:()=>console.log("secondary 1")},{name:"Удалить",onClick:()=>console.log("secondary 2")}]},D=[{field:"documentName",label:"Наименование документа",sortable:!0},{field:"recipient",label:"Получатель",sortable:!0},{field:"createDate",label:"Дата создания",sortable:!0,format:({createDate:e})=>new Date(e).toLocaleDateString()},{field:"actions",label:"Действия",sortable:!1,align:"center",width:"120px",renderCell:o=>e(s,{actions:f,row:o})}],p=()=>{let o=u(D),i=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[t,n]=a(!0),[r,c]=a([]);return l(()=>{setTimeout(()=>{c(i.slice(0,10)),n(!1)},1500)},[]),e(m,{keyId:"id",rows:r,columns:o,isLoading:t,onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},y=()=>{let o=u(D),i=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[t,n]=a(!0),[r,c]=a([]),[s,k]=a(1);return l(()=>{setTimeout(()=>{c(i.slice((s-1)*10,10*s)),n(!1)},1500)},[]),e(m,{keyId:"id",rows:r,columns:o,isLoading:t,footer:e(d,{rowsPerPage:10,totalCount:i.length,onChange:(e,o)=>{n(!0),k(o),setTimeout(()=>{n(!1),c(i.slice((o-1)*10,10*o))},1500)},page:s}),onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},b=()=>{let o=u(D),i=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[t,n]=a(!0),[r,c]=a([]),[s,d]=a();return l(()=>{setTimeout(()=>{c(i.slice(0,10)),n(!1)},1500)},[]),e(m,{keyId:"id",rows:r,columns:o,isLoading:t,onSort:e=>{if(e){var o,t;let i;c((o=e.fieldId,t=e.sort,(i=[...r]).sort((e,i)=>{let n=e[o],l=i[o];if(n===l)return 0;if("documentName"===o){let e=/([^\d]+)(\d+)/,o=n.match(e),i=l.match(e);if(null===o||null===i)return 0;let[,r,a]=o,[,c,s]=i,d=r.localeCompare(c)||Number(a)-Number(s);return"desc"===t?-1*d:d}return n<l?"desc"===t?1:-1:n>l?"desc"===t?-1:1:0}),i))}else c(i.slice(0,10));d(e)},sorting:s,onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},I=()=>{let o=u(D),i=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[t,n]=a(!0),[r,c]=a([]);return l(()=>{setTimeout(()=>{c(i.slice(0,10)),n(!1)},1500)},[]),e(m,{keyId:"id",activeRowId:"3",rows:r,columns:o,isLoading:t,onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},N=()=>{let o=u(D),i=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[t,n]=a([]),[r,c]=a([]),[s,d]=a(!0);return l(()=>{setTimeout(()=>{n(i.slice(0,10)),d(!1)},1500)},[]),e(m,{keyId:"id",rows:t,columns:o,isLoading:s,selectedRows:r,onSelectRow:e=>c(e),onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},L=()=>{let o=u(D,[{field:"documentName",width:"2fr"},{field:"recipient",width:"1fr"},{field:"createDate",width:"15%"}]),i=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[t,n]=a([]),[r,c]=a(!0);return l(()=>{setTimeout(()=>{n(i.slice(0,10)),c(!1)},1500)},[]),e(m,{keyId:"id",rows:t,columns:o,isLoading:r,onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},h=()=>{let o={main:[{icon:e(n,{}),name:"Удалить",needConfirm:!0,confirmText:"Если вы удалите черновик, то черновик с такими же данными нужно будет создать заново. Удалить черновик из списка?",confirmButtonProps:{text:"Да, удалить",isAccented:!0},onClick:e=>alert(`Delete: ${JSON.stringify(e)}`)}]},i=u(D,[{field:"actions",renderCell:i=>e(s,{actions:o,row:i})}]),t=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[r,c]=a([]),[d,k]=a([]),[C,f]=a(!0);return l(()=>{setTimeout(()=>{c(t.slice(0,10)),f(!1)},1500)},[]),e(m,{keyId:"id",rows:r,columns:i,isLoading:C,selectedRows:d,onSelectRow:e=>k(e),onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},T=()=>{let o=u(D),i=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[t,n]=a([]),[r,c]=a(!0);return l(()=>{setTimeout(()=>{n(i.slice(0,10)),c(!1)},1500)},[]),e(m,{keyId:"id",rows:t,columns:o,isLoading:r,isDisabled:!0,onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},S=()=>{let o={main:[{icon:e(n,{}),name:"Удалить",onClick:()=>console.log("delete")}]},i=u(D,[{field:"actions",renderCell:i=>e(s,{actions:o,row:i})}]),t=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w(),options:{isDisabled:!0,disabledReason:"Нет доступа"}},...g(R,{isDisabled:!0,disabledReason:"Нет доступа"})],[r,c]=a([]),[d,k]=a([]),[C,f]=a(!0);return l(()=>{setTimeout(()=>{c(t.slice(0,10)),f(!1)},1500)},[]),e(m,{keyId:"id",rows:r,columns:i,isLoading:C,selectedRows:d,onSelectRow:e=>k(e),onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},x=()=>{let o={main:[{icon:e(n,{}),name:"Удалить",onClick:()=>console.log("delete")}]},i=u(D,[{field:"actions",renderCell:i=>e(s,{actions:o,row:i})}]),t=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w(),options:{isDisabled:!0,isDisabledLastCell:!1,disabledReason:"Нет доступа"}},...g(R,{isDisabled:!0,isDisabledLastCell:!1,disabledReason:"Нет доступа"})],[r,c]=a([]),[d,k]=a([]),[C,f]=a(!0);return l(()=>{setTimeout(()=>{c(t.slice(0,10)),f(!1)},1500)},[]),e(m,{keyId:"id",rows:r,columns:i,isLoading:C,selectedRows:d,onSelectRow:e=>k(e),onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},E=()=>{let o=({row:o})=>{let[t,c]=a(!1),[d,m]=a(!1),[u,g]=a(!1),w=()=>{c(!0)},k=()=>{m(!0)},C=()=>{g(!0)};l(()=>{t&&setTimeout(()=>c(!1),1500),d&&setTimeout(()=>m(!1),1500),u&&setTimeout(()=>g(!1),1500)},[t,d,u]);let R=r(()=>({main:[{icon:e(i,{}),name:"Редактировать",loading:t,onClick:w},{icon:e(n,{}),name:"Удалить",loading:d,loadingNote:"Происходит удаление",isBlockingOperation:!0,onClick:k}],secondary:[{name:"Подписать",loading:u,loadingNote:"Происходит подписание",isBlockingOperation:!0,onClick:C}]}),[t,d,u]);return e(s,{actions:R,row:o})},t=u([{field:"documentName",label:"Наименование документа",sortable:!0},{field:"recipient",label:"Получатель",sortable:!0},{field:"createDate",label:"Дата создания",sortable:!0,format:({createDate:e})=>new Date(e).toLocaleDateString()},{field:"actions",label:"Действия",sortable:!1,align:"center",width:"120px",renderCell:i=>e(o,{row:i})}]),c=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[d,k]=a(!0),[C,f]=a([]);return l(()=>{setTimeout(()=>{f(c.slice(0,10)),k(!1)},1500)},[]),e(m,{keyId:"id",rows:C,columns:t,onRowClick:e=>console.log("row clicked",e),isLoading:d,onRetry:()=>{}})},v=()=>{let o=u([{field:"documentName",label:"Наименование документа",sortable:!0},{field:"recipient",label:"Получатель",sortable:!0},{field:"createDate",label:"Дата создания",sortable:!0,format:({createDate:e})=>new Date(e).toLocaleDateString()}]);return e(m,{keyId:"id",rows:[{id:"123456789",createDate:w()},...g({id:"1",documentName:"Договор №1",createDate:"2022-03-24T17:50:40.206Z"})],columns:o,onRetry:()=>{}})},W=()=>{let i={main:[{icon:e(o,{}),name:"Просмотреть",onClick:()=>console.log("main")},{icon:e(t,{}),loading:!0,name:"Отправить"}],secondary:[{name:"Редактировать",onClick:()=>console.log("secondary 1")},{name:"Удалить",onClick:()=>console.log("secondary 2")}]},n=u(D,[{field:"actions",renderCell:o=>e(s,{actions:i,row:o})}]),r=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:w()},...g(R)],[c,d]=a([]),[k,C]=a(!0);return l(()=>{setTimeout(()=>{d(r.slice(0,5)),C(!1)},1500)},[]),e(m,{keyId:"id",rows:c,columns:n,isLoading:k,onRowClick:e=>console.log("row clicked",e),onRetry:()=>{}})},j=()=>{let[o,i]=a(!0),[t,n]=a([]);return l(()=>{setTimeout(()=>{n([]),i(!1)},1500)},[]),e(c,{imagesMap:{defaultErrorImgSrc:"",noDataImgSrc:"/no-data-stub.svg",outdatedReleaseErrorImgSrc:""},children:e(m,{keyId:"id",activeRowId:"3",rows:t,columns:D,isLoading:o,onRowClick:e=>console.log("row clicked",e),onRetry:()=>{},noDataOptions:{action:{text:"Сбросить фильтры",onClick:()=>{}}}})})},G=()=>e(c,{imagesMap:{defaultErrorImgSrc:k,noDataImgSrc:"/no-data-stub.svg",outdatedReleaseErrorImgSrc:""},children:e(m,{keyId:"id",isLoading:!0,rows:[],columns:D,onRowClick:e=>console.log("row clicked",e),onRetry:()=>console.log("retry request")})}),O=()=>e(c,{imagesMap:{defaultErrorImgSrc:k,noDataImgSrc:"/no-data-stub.svg",outdatedReleaseErrorImgSrc:""},children:e(m,{keyId:"id",isError:!0,errorMsg:"Ошибка 500",rows:[],columns:D,onRowClick:e=>console.log("row clicked",e),onRetry:()=>console.log("retry request")})});export{E as ActionsDataGrid,h as ConfirmAction,x as DisabledLastCell,v as EmptyCellValue,O as ErrorExample,p as Example,G as Loading,j as NoData,L as WidthOptions,I as WithActiveRow,N as WithCheckbox,T as WithDisabledContent,S as WithDisabledRow,W as WithLoaderInButton,y as WithPagination,b as WithSorting,C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Wrapper as t}from"./styles.js";let e=({children:e})=>r(t,{children:e});export{e as Footer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./Footer.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{styled as e}from"../../../theme/index.js";let t=e("footer",{label:"DataGridFooter"})`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: flex-end;
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: ${({theme:e})=>e.spacing(2)};
|
|
7
|
+
border-top: 1px solid ${({theme:e})=>e.palette.divider};
|
|
8
|
+
`;export{t as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{useMemo as e}from"react";import{Checkbox as o}from"../../Checkbox/index.js";import{HeadCell as t}from"../HeadCell/index.js";import{CheckboxCell as i,Wrapper as m}from"./styles.js";import{useLogic as n}from"./useLogic/index.js";let l=l=>{let{checkboxProps:s,handleSort:a}=n(l),{columns:d,gridColumns:p,isSelectable:f,sorting:c,onSelectAllRows:x}=l,g=e(()=>d.map(({field:e,label:m,sortable:n,align:l},d)=>r(t,{sorting:c,field:e,label:m,isSortable:n,align:l,startAdornment:!d&&f?r(i,{children:r(o,{...s,onChange:x})}):null,onSort:a},m)),[d,c,f,s,x,a]);return r(m,{$gridColumns:p,children:g})};export{l as Head};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./Head.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{styled as e}from"../../../theme/index.js";import{ROOT_ACTION_CELL_WIDTH as r}from"../constants.js";let t=e("header",{shouldForwardProp:e=>!["$gridColumns"].includes(e.toString())})`
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: ${({$gridColumns:e})=>e};
|
|
4
|
+
|
|
5
|
+
background-color: ${({theme:e})=>e.palette.grey[200]};
|
|
6
|
+
`,o=e("div")`
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
|
|
11
|
+
width: ${r}px;
|
|
12
|
+
`;export{o as CheckboxCell,t as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as e,useMemo as r}from"react";import{SortStates as t}from"../../enums.js";let o=({rowsCount:o,sorting:d,uncheckedRowsCount:i,onSort:s})=>{let l=r(()=>!i&&o>0,[i,o]),n=r(()=>i>0&&i<o,[i,o]),c=!o;return{handleSort:e(e=>{if(!s)return;let r=d?.fieldId===e;return r&&d?.sort===t.ASC?s({fieldId:e,sort:t.DESC}):r&&d?.sort===t.DESC?s(void 0):void s({fieldId:e,sort:t.ASC})},[d,s]),checkboxProps:{checked:l,disabled:c,indeterminate:n}}};export{o as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{ArrowDownNarrowWide as i,ArrowDownUp as t,ArrowDownWideNarrow as n}from"lucide-react";import{useMemo as o}from"react";import{SortStates as s}from"../enums.js";import{StyledButton as l,StyledTypography as c,Wrapper as m}from"./styles.js";import{useLogic as a}from"./useLogic/index.js";let d=d=>{let{wrapperProps:u}=a(d),{startAdornment:f,field:p,isSortable:h,align:j,label:z,sorting:v}=d,x=o(()=>{if(!h)return null;if(v?.fieldId!==p)return r(t,{size:16});switch(v?.sort){case s.ASC:return r(i,{size:16});case s.DESC:return r(n,{size:16});default:return r(t,{size:16})}},[v,h,p]);return e(m,{$align:j,...u,children:[f&&f,h?r(l,{variant:"link",$isActive:v?.fieldId===p,endIcon:x,children:z}):r(c,{variant:"caption",children:z})]})};export{d as HeadCell};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./HeadCell.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{Button as t}from"../../index.js";import{styled as e}from"../../../theme/index.js";import{Typography as i}from"../../Typography/index.js";import{alignToJustifyContent as r}from"../utils/index.js";let o=e("div",{shouldForwardProp:t=>!["$align","$isSortable","$hasStartAdornment"].includes(t.toString())})`
|
|
2
|
+
user-select: none;
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: ${({$align:t})=>r(t)};
|
|
7
|
+
|
|
8
|
+
height: 40px;
|
|
9
|
+
padding: ${({theme:t,$hasStartAdornment:e})=>e?t.spacing(1,2,1,0):t.spacing(1,2)};
|
|
10
|
+
|
|
11
|
+
color: ${({theme:t})=>t.palette.grey[700]};
|
|
12
|
+
`,p=e(i)`
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: ${({theme:t})=>t.spacing(1)};
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
`,n=e(t,{shouldForwardProp:t=>!["$isActive"].includes(t.toString())})`
|
|
18
|
+
font-size: ${({theme:t})=>t.typography.caption.fontSize};
|
|
19
|
+
color: ${({theme:t,$isActive:e})=>e?t.palette.primary.main:t.palette.grey[700]};
|
|
20
|
+
> svg {
|
|
21
|
+
width: 16px;
|
|
22
|
+
height: 16px;
|
|
23
|
+
}
|
|
24
|
+
`;export{n as StyledButton,p as StyledTypography,o as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let r=({field:r,isSortable:e,startAdornment:o,onSort:t})=>({wrapperProps:{$hasStartAdornment:!!o,onClick:()=>{r&&e&&t(r)}}});export{r as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Backdrop as t,LoaderWrapper as o,StyledLinearProgress as m}from"./styles.js";let i=({isLoading:i=!1,isDisabled:s=!1})=>e(o,{children:[(i||s)&&r(t,{}),i&&r(m,{})]});export{i as Loader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./Loader.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{LinearProgress as e}from"@mui/material";import{styled as t}from"../../../theme/index.js";let o=t("div")`
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 0;
|
|
4
|
+
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
|
|
8
|
+
opacity: 0.3;
|
|
9
|
+
background-color: ${({theme:e})=>e.palette.background.element};
|
|
10
|
+
`,r=t("div")`
|
|
11
|
+
height: 1px;
|
|
12
|
+
`,i=t(e)`
|
|
13
|
+
height: 1px;
|
|
14
|
+
`;export{o as Backdrop,r as LoaderWrapper,i as StyledLinearProgress};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useContext as i}from"react";import{Button as r}from"../../Button/index.js";import{ConfigContext as e}from"../../ConfigProvider/index.js";import{Placeholder as o}from"../../Placeholder/index.js";let m=({title:m="Нет\xa0данных",imgAlt:l=m,action:a,size:n="small"})=>{let{imagesMap:{noDataImgSrc:c}}=i(e);return t(o,{title:m,imgSrc:c,size:n,Actions:a?t(r,{onClick:a.onClick,"aria-label":a.text,children:a.text}):void 0,imgAlt:l})};export{m as NoData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./NoData.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{useCallback as o}from"react";import{Checkbox as e}from"../../Checkbox/index.js";import{Tooltip as t}from"../../Tooltip/index.js";import{Cell as i}from"../Cell/index.js";import{DISABLE_ROW_ATTR as l}from"./constants.js";import{CheckboxCell as m,ContentWrapper as n,Wrapper as s}from"./styles.js";import{useLogic as d}from"./useLogic/index.js";import{checkIsDisabled as p}from"./utils/index.js";let a=a=>{let{rowId:c,checkboxProps:u,rowProps:f,tooltipProps:j,disabled:x}=d(a),{className:C,row:g,rowOptions:h,isSelectable:w,gridColumns:$,columns:y,emptyCellValue:b,selectedRows:k,activeRowId:v,keyId:A,onSelectRow:D,onRowClick:L,...N}=a,{isDisabledLastCell:P=!0,isNotSelectable:R}=h||{},T=o(()=>{let o=P?void 0:[y.length-1];return y?.map((t,l)=>{let n=`${c}-${l}`,s=p(x,o,l);return r(i,{row:g,cell:t,emptyCellValue:b,startAdornment:!l&&(!w||R?null:w&&!R&&r(m,{inert:!!x||void 0,onClick:r=>r.stopPropagation(),children:r(e,{...u,style:{padding:0}})})),isDisabled:s},n)})},[y,x]);return r(s,{$gridColumns:$,className:C,...N,children:r(t,{followCursor:!0,arrow:!1,...j,children:r(n,{$gridColumns:$,[l]:x,...f,children:T()})})})};export{a as Row};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let a="data-row-disable";export{a as DISABLE_ROW_ATTR};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./Row.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{styled as t}from"../../../theme/index.js";import{ROOT_ACTION_CELL_WIDTH as e}from"../constants.js";let r=t("li")`
|
|
2
|
+
position: relative;
|
|
3
|
+
border-bottom: 1px solid ${({theme:t})=>t.palette.divider};
|
|
4
|
+
&:last-of-type {
|
|
5
|
+
border-bottom: none;
|
|
6
|
+
}
|
|
7
|
+
`,o=t("div")`
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: ${({$gridColumns:t})=>t};
|
|
12
|
+
background-color: ${({theme:t,$isSelected:e})=>e?t.palette.primary[100]:"transparent"};
|
|
13
|
+
|
|
14
|
+
transition: ${({theme:t})=>t.transitions.create(["background-color"],{duration:t.transitions.duration.short})};
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
cursor: ${({$isHovered:t})=>t?"pointer":"default"};
|
|
18
|
+
|
|
19
|
+
background-color: ${({theme:t,$isHovered:e})=>e?t.palette.background.elementHover:"transparent"};
|
|
20
|
+
}
|
|
21
|
+
`,n=t("div")`
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
align-self: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
|
|
27
|
+
width: ${e}px;
|
|
28
|
+
`;export{n as CheckboxCell,o as ContentWrapper,r as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e}from"react";import{DISABLE_ROW_ATTR as t}from"../constants.js";let o=({keyId:o,columns:r,row:i,activeRowId:s,rowOptions:n,isSelectable:c,selectedRows:l,onSelectRow:p,onRowClick:d})=>{let[a,u]=e(!1),g=i[o],{isDisabled:b,disabledReason:m}=n||{},f=c&&!!l?.find(e=>e[o]===g);return{rowId:g,disabled:b,columns:r,rowProps:{$isHovered:!!(!b&&d),$isSelected:s===g,onClick:()=>{b||d?.(i)},onMouseMove:e=>{b&&"true"!==e.target.getAttribute(t)&&u(!1)}},tooltipProps:{open:a,title:m,onOpen:e=>{"true"===e.target.getAttribute(t)&&u(!0)},onClose:()=>u(!1)},checkboxProps:{checked:f,disabled:b,onChange:p(i)}}};export{o as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=(e,c,l)=>!!e&&(!c||!c.includes(l));export{e as checkIsDisabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./checkIsDisabled.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{checkIsDisabled as e}from"./checkIsDisabled/index.js";export{e as checkIsDisabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let _=44,I=36;export{_ as MIN_ROW_HEIGHT,I as ROOT_ACTION_CELL_WIDTH};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,s=((t={}).ASC="asc",t.DESC="desc",t);export{s as SortStates};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{faker as e}from"@faker-js/faker";let t=["ИП Иванов О.В.",'ООО "Новая организация"','ООО "Волшебные документы"'],r=()=>e.date.recent().toISOString(),a=(e,t=[])=>{let r=t.reduce((e,{field:t,...r})=>t?{...e,[t]:r}:e,{});return e.map(e=>({...e,...r[e?.field]||{}}))},m=(e,a)=>Array.from({length:16}).fill(e).map((e,m)=>({id:String(m+1),documentName:`Договор №${m+1}`,recipient:t[Math.floor(Math.random()*t.length)],createDate:r(),options:.5>Math.random()?a:{}})),n=(a=10,m)=>{let{isNotSelectable:n,childrenCount:o=3,childrenColumns:i}=m||{};return Array.from({length:a}).map((a,m)=>{let d=t[Math.floor(Math.random()*t.length)],l=r(),u=Math.random()>.5;return{id:e.string.uuid(),documentName:u?"Пакет документов":`Договор №${m+1}`,recipient:d,createDate:l,options:{isNotSelectable:n,childrenColumns:i},children:u?Array.from({length:o}).map((t,r)=>({id:e.string.uuid(),documentName:`Договор №${m+Number(`1${r}0`)}`,recipient:d,createDate:l})):void 0}})};export{a as makeColumns,m as makeDataList,n as makeDataListWithTree,r as makeRandomDate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./constants.js";export*from"./DataGrid.js";export*from"./enums.js";export*from"./Head/index.js";export*from"./Row/index.js";export*from"./types.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{styled as e}from"../../theme/index.js";let i=e("div",{shouldForwardProp:e=>"$maxHeight"!==e})`
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
border: ${({theme:e})=>`1px solid ${e.palette.divider}`};
|
|
11
|
+
border-radius: ${({theme:e})=>e.shape.medium};
|
|
12
|
+
max-height: ${({$maxHeight:e})=>e?`${e}px`:"initial"};
|
|
13
|
+
`,d=e("div")`
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
|
|
18
|
+
height: 100%;
|
|
19
|
+
`,r=e(d)`
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
|
|
22
|
+
background: ${({theme:e})=>e.palette.background.element};
|
|
23
|
+
mix-blend-mode: luminosity;
|
|
24
|
+
`;export{i as Container,d as DataGridWrapper,r as DisabledDataGridWrapper};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as e,useEffect as t,useMemo as r,useRef as o}from"react";import{prop as i,uniqueBy as l}from"remeda";import{getGridTemplateColumns as n}from"./utils/index.js";let s=({keyId:s,columns:f,rows:c=[],selectedRows:a=[],isLoading:d,isDisabled:p,onSelectRow:m})=>{let u=!!c?.length,g=!!m,h=d||p,w=c.filter(e=>!(e.rowOptions?.isDisabled||e.rowOptions?.isNotSelectable)),b=o([]);t(()=>{d||(b.current=c)},[c,d]);let P=n(f),S=r(()=>w.filter(e=>!a.find(t=>t[s]===e[s])).length,[w,a,s]),k=e(()=>c.length<=1?f.map(e=>({...e,sortable:!1})):f,[f,c]),x=d?b.current:c,L=e(e=>t=>{if(m){if(t.target.checked)return m([...a,e]);m(a.filter(t=>t[s]!==e[s]))}},[a,m,s]);return{isDataGridDisabled:h,renderRows:x,headProps:{rowsCount:w.length,uncheckedRowsCount:S,gridColumns:P,isSelectable:g,columns:k(),onSelectAllRows:e=>{if(m){if(e.target.checked)return m(l([...a,...w],i(s)));m(a.filter(e=>!c.find(t=>t[s]===e[s])))}}},bodyProps:{gridColumns:P,isSelectable:g,onSelectRow:L},loaderProps:{isLoading:u&&d,isDisabled:p}}};export{s as useLogic};
|
package/lib/components/DataGrid/useLogic/utils/getGridTemplateColumns/getGridTemplateColumns.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=e=>e.map(({width:e})=>"number"==typeof e?`${e}px`:e||"1fr").join(" ");export{e as getGridTemplateColumns};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./getGridTemplateColumns.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getGridTemplateColumns as e}from"./getGridTemplateColumns/index.js";export{e as getGridTemplateColumns};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ALIGN_TO_JUSTIFY_CONTENT_MAP as t,DEFAULT_JUSTIFY_CONTENT as o}from"./constants.js";let n=n=>n&&t[n]||o;export{n as alignToJustifyContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t="start",e={left:"start",center:"center",right:"end"};export{e as ALIGN_TO_JUSTIFY_CONTENT_MAP,t as DEFAULT_JUSTIFY_CONTENT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./alignToJustifyContent.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{alignToJustifyContent as t}from"./alignToJustifyContent/index.js";export{t as alignToJustifyContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as i,jsxs as o}from"react/jsx-runtime";import{MainAction as t}from"./MainAction/index.js";import{SecondaryActions as e}from"./SecondaryAction/index.js";import{Wrapper as n}from"./styles.js";import{useLogic as r}from"./useLogic/index.js";let c=c=>{let{isDisabledAction:l,handleWrapperClick:m,handleActionClick:a}=r(c),{actions:s}=c,{main:p,secondary:d}=s;return o(n,{onClick:m,children:[p.map(o=>i(t,{action:o,onActionClick:a,isDisabled:l,tooltipPlacement:"top"},o.name)),d&&i(e,{actions:d,onActionClick:a,tooltipPlacement:"left",isDisabled:l})]})};export{c as DataGridActionCell};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Pencil as e,Save as n,Trash as i}from"lucide-react";import{useEffect as t,useMemo as a,useState as l}from"react";import{DataGrid as r}from"../DataGrid/index.js";import{DataGridActionCell as c}from"./DataGridActionCell.js";let m={title:"Components/DataGridActionCell",component:c},s={main:[{icon:o(e,{}),name:"Редактировать",onClick:()=>{console.log("Редактировать")}},{icon:o(i,{}),name:"Удалить",onClick:()=>{console.log("Удалить")}}],secondary:[{name:"Подписать",onClick:()=>{console.log("Подписать")}}]},d=[{id:"1",documentName:"Документ 1"},{id:"2",documentName:"Документ 2"},{id:"3",documentName:"Документ 3"}],g={args:{actions:s},parameters:{docs:{disable:!0}}},u=()=>{let n=({row:n})=>{let[r,m]=l(!1),[s,d]=l(!1),[g,u]=l(!1),C=()=>{m(!0)},k=()=>{d(!0)},p=()=>{u(!0)};t(()=>{r&&setTimeout(()=>m(!1),1500),s&&setTimeout(()=>d(!1),1500),g&&setTimeout(()=>u(!1),1500)},[r,s,g]);let f=a(()=>({main:[{icon:o(e,{}),name:"Редактировать",loading:r,onClick:C},{icon:o(i,{}),name:"Удалить",loading:s,loadingNote:"Происходит удаление",isBlockingOperation:!0,onClick:k}],secondary:[{name:"Подписать",loading:g,loadingNote:"Происходит подписание",isBlockingOperation:!0,onClick:p}]}),[r,s,g]);return o(c,{actions:f,row:n})},m=[{field:"documentName",label:"Документ",sortable:!1},{label:"Действия",sortable:!1,width:"120px",align:"right",renderCell:e=>o(n,{row:e})}];return o(r,{rows:d,columns:m,keyId:"id",onRetry:()=>{}})},C=()=>{let[e,a]=l(!1),[r,m]=l(!1);t(()=>{e&&setTimeout(()=>{a(!1)},1500),r&&setTimeout(()=>{m(!1)},1500)},[e,r]);let s={main:[{icon:o(i,{}),name:"Удалить",onClick:()=>a(o=>!o),loading:e},{icon:o(n,{}),name:"Сохранить",loading:r,onClick:()=>m(o=>!o)}]};return o(c,{actions:s,row:{id:"123456789"}})},k=()=>{let[e,a]=l(!1),[r,m]=l(!1);t(()=>{e&&setTimeout(()=>{a(!1)},1500),r&&setTimeout(()=>{m(!1)},1500)},[e,r]);let s={main:[{icon:o(i,{}),name:"Удалить",onClick:()=>a(o=>!o),loading:e,isBlockingOperation:!0},{icon:o(n,{}),name:"Сохранить",needConfirm:!0,onClick:()=>m(o=>!o),loading:r}],secondary:[{name:"Редактировать",onClick:()=>console.log("secondary 1")}]};return o(c,{actions:s,row:{id:"123456789"}})};export{k as BlockingOperations,u as Example,g as Interaction,C as LoaderActions,m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{createElement as i}from"react";import{IconDropdownButton as o}from"../../IconDropdownButton/index.js";import{MenuItem as n}from"../../MenuItem/index.js";import{Tooltip as e}from"../../Tooltip/index.js";import{MainIconButton as r}from"./MainIconButton/index.js";let m=({action:m,onActionClick:c,isDisabled:a,tooltipPlacement:l})=>{if("actions"in m){let{disabled:r,icon:p,name:d,disabledReason:s,actions:f}=m;return t(e,{title:s||d,withoutContainer:!r,placement:l,children:t(o,{icon:p,variant:"text",disabled:a||r,children:f.map(({name:t,onClick:o,...e})=>i(n,{...e,key:t,onClick:c(o)},t))})},d)}return t(r,{action:m,onActionClick:c,isDisabled:a,tooltipPlacement:l})};export{m as MainAction};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fragment as o,jsx as t}from"react/jsx-runtime";import{ConfirmAction as n}from"../../../ConfirmAction/index.js";import{IconButton as i}from"../../../IconButton/index.js";import{Tooltip as r}from"../../../Tooltip/index.js";import{useLogic as e}from"./useLogic/index.js";let m=m=>{let{tooltipProps:c}=e(m),{action:d,onActionClick:l,isDisabled:p,tooltipPlacement:a}=m,{name:f,icon:s,needConfirm:x,confirmText:u,confirmButtonProps:j,disabledReason:C,disabled:h,loading:B,isBlockingOperation:g,loadingNote:I,onClick:b,...k}=d,v=o=>t(r,{withoutContainer:!h,placement:a,...c,children:t(i,{disabled:p||h,loading:B,...k,variant:"text",...o,children:s})},f);return t(o,{children:x?t(n,{text:u,confirmButtonProps:j,actionComponent:o=>v(o),onConfirm:l(b)}):v({onClick:l(b)})})};export{m as MainIconButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./MainIconButton.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as o,useState as e}from"react";let t=({action:t})=>{let{loading:r,disabledReason:p,name:l}=t,[n,i]=e(!1);return o(()=>{r&&i(!1)},[r]),{tooltipProps:{title:p||l,open:n,onOpen:()=>i(!0),onClose:()=>i(!1)}}};export{t as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./MainAction.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{createElement as o}from"react";import{EllipsisVertical as r}from"lucide-react";import{IconDropdownButton as e}from"../../IconDropdownButton/index.js";import{MenuItem as i}from"../../MenuItem/index.js";let n=({actions:n,onActionClick:m,tooltipPlacement:c,isDisabled:a})=>t(e,{icon:t(r,{}),variant:"text",disabled:a,children:n.map(t=>{let{onClick:r,name:e}=t;return o(i,{...t,key:e,tooltipPlacement:c,onClick:m(r)},e)})});export{n as SecondaryActions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./SecondaryAction.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./DataGridActionCell.js";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as i}from"react";let o=({row:o,actions:e})=>{let{main:t,secondary:n}=e,r=[...t,...n||[]].find(i=>i.isBlockingOperation&&i.loading);return{isDisabledAction:!!r,handleActionClick:i(i=>()=>{i?.(o)},[o]),handleWrapperClick:i=>{i.stopPropagation()}}};export{o as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fragment as e,jsx as i,jsxs as r}from"react/jsx-runtime";import{MenuItem as n}from"../MenuItem/index.js";import{Pagination as o}from"../Pagination/index.js";import{Select as t}from"../Select/index.js";import{Typography as a}from"../Typography/index.js";import{DEFAULT_ROWS_PER_PAGE as l,DEFAULT_ROWS_PER_PAGE_OPTION as m}from"./constants.js";import{PaginationWrapper as s,Range as d,RangeWrapper as c}from"./styles.js";import{useLogic as p}from"./useLogic/index.js";let h=h=>{let{isVisiblePagination:u,pageCount:f,formattedRange:j,handleChangeRowsPerPage:x}=p(h),{page:g,totalCount:v,className:y,rowsPerPage:b=l,rowsPerPageOptions:C=m,isForceCounter:P,disabled:S,onSetCountPerPage:w,...z}=h;return(u||P)&&v?r(s,{className:y,children:[r(c,{children:[w&&r(e,{children:[i(a,{variant:"body1",children:"Строк на странице:"}),i(t,{size:"small",value:b,disabled:S,isShowClearButton:!1,onChange:x,children:C.map(e=>i(n,{value:e,children:e},e))})]}),i(d,{variant:"h6",children:j()})]}),u&&i(o,{disabled:S,count:f,page:g,...z})]}):null};export{h as DataGridPagination};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useEffect as a,useState as o}from"react";import{styled as r}from"../../theme/index.js";import{DataGrid as i}from"../DataGrid/index.js";import{SearchField as n}from"../SearchField/index.js";import{DataGridPagination as m}from"./DataGridPagination.js";import{makeDataList as c,makeRandomDate as l}from"./faker.js";let d={title:"Components/DataGridPagination",component:m},s=r("footer")`
|
|
2
|
+
width: 800px;
|
|
3
|
+
`,u=[{id:"123456789",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:l()},{id:"1111111",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:l()},{id:"1111",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:l()},{id:"1111111",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:l()},{id:"111111111",documentName:"Договор №12345678",recipient:'ПАО "Первый завод"',createDate:l()},...c({id:"1",documentName:"Договор №1",recipient:"ИП Иванов О.В.",createDate:"2022-03-24T17:50:40.206Z"})],p=()=>{let[r,c]=o(!0),[l,d]=o([]),[p,g]=o(1),[f,C]=o(""),[D,h]=o(u);return a(()=>{setTimeout(()=>{d(u.slice((p-1)*10,10*p)),c(!1)},1500)},[]),a(()=>{c(!0),setTimeout(()=>{let e=f?u.filter(e=>e.documentName.toLowerCase().includes(f.toLowerCase())):u;h(e),d(e.slice((p-1)*10,10*p)),c(!1)},1500)},[f]),t(s,{children:[e(n,{placeholder:"Введите название документа",value:f,onChange:e=>C(e.target.value)}),e(i,{keyId:"id",rows:l,columns:[{field:"documentName",label:"Наименование документа"},{field:"recipient",label:"Получатель"},{field:"createDate",label:"Дата создания",sortable:!0,format:({createDate:e})=>new Date(e).toLocaleDateString()}],isLoading:r,footer:e(m,{rowsPerPage:10,page:p,disabled:r,totalCount:D.length,onChange:(e,t)=>{c(!0),g(t),setTimeout(()=>{c(!1),d(D.slice((t-1)*10,10*t))},1500)}}),onRetry:()=>{}})]})},g=()=>{let[t,a]=o(1),[r,i]=o();return e(s,{children:e(m,{totalCount:100,page:t,rowsPerPage:r,onSetCountPerPage:e=>i(e),onChange:(e,t)=>a(t)})})},f=()=>{let[t,a]=o(1);return e(s,{children:e(m,{totalCount:8,page:t,isForceCounter:!0,onChange:(e,t)=>a(t)})})};export{p as Example,f as IsForceCounter,g as OnSetCountPerPage,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let _=20,E=[20,50,100];export{_ as DEFAULT_ROWS_PER_PAGE,E as DEFAULT_ROWS_PER_PAGE_OPTION};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{faker as t}from"@faker-js/faker";let a=["ИП Иванов О.В.",'ООО "Новая организация"','ООО "Волшебные документы"'],e=()=>t.date.recent().toISOString(),r=(t,r)=>Array.from({length:16}).fill(t).map((t,o)=>({id:String(o+1),documentName:`Договор №${o+1}`,recipient:a[Math.floor(Math.random()*a.length)],createDate:e(),options:.5>Math.random()?r:{}}));export{r as makeDataList,e as makeRandomDate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./DataGridPagination.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{formControlClasses as e}from"@mui/material";import{styled as i}from"../../theme/index.js";import{Typography as t}from"../Typography/index.js";let r=i("div")`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
width: 100%;
|
|
6
|
+
`,a=i(t)`
|
|
7
|
+
color: ${({theme:e})=>e.palette.grey["700"]};
|
|
8
|
+
`,n=i("div")`
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: ${({theme:e})=>e.spacing(3)};
|
|
11
|
+
align-items: center;
|
|
12
|
+
|
|
13
|
+
.${e.root} {
|
|
14
|
+
flex-direction: unset;
|
|
15
|
+
}
|
|
16
|
+
`;export{r as PaginationWrapper,a as Range,n as RangeWrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as e,useRef as t}from"react";import{DEFAULT_ROWS_PER_PAGE as r}from"../constants.js";let a=({totalCount:a,rowsPerPage:n=r,page:o,onSetCountPerPage:i})=>{let l=t(0);e(()=>{a&&(l.current=a)},[a]);let s=a||l.current,u=Math.ceil(s/n),c=(o-1)*n+1;return{isVisiblePagination:!(!i&&s<=n),pageCount:u,formattedRange:()=>{let e;return`${c} — ${(e=o*n)<s?e:s} из ${s}`},handleChangeRowsPerPage:e=>{i?.(Number(e.target.value))}}};export{a as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fragment as e,jsx as r,jsxs as t}from"react/jsx-runtime";import{Calendar1 as o}from"lucide-react";import{useEffect as i,useState as n}from"react";import{Calendar as a}from"../Calendar/index.js";import{IconButton as l}from"../IconButton/index.js";import{MaskField as m}from"../MaskField/index.js";import{Popover as d}from"../Popover/index.js";import{DatePickerWrapper as s}from"./styles.js";let c=c=>{let{label:u,disabled:p=!1,selected:h,onSelect:g,selectMonth:f,selectYear:N,error:v,helperText:_,className:b,fullWidth:x,size:y,name:j,...k}=c,[w,C]=n(null),[z,D]=n(null),[L,M]=n(new Date),[P,S]=n(""),O=()=>{D(null)};return i(()=>{h?(S(h.toLocaleString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})),M(h)):S("")},[h]),t(e,{children:[r(m,{value:P,onChange:e=>{C(null),S(e.target.value);let[r,t,o]=e.target.value.split(".").map(Number);if(Number.isNaN(r)||Number.isNaN(t)||Number.isNaN(o)||r<1||r>31||t<1||t>12||o<1e3)return void C("Некорректная дата");let i=new Date(o,t-1,r);g?.(i),M(i)},label:u,disabled:p,className:b,fullWidth:x,size:y,name:j,endAdornment:r(l,{variant:"text",onClick:e=>{D(e.currentTarget)},children:r(o,{})}),maskProps:{mask:"__.__.____",replacement:{_:/\d/},showMask:!0},placeholder:"дд.мм.гггг",error:!!w||v,helperText:w||_}),r(d,{title:"Заголовок",open:!!z,anchorEl:z,onClose:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:r(s,{children:r(a,{month:L,onMonthChange:M,selected:h,onSelect:e=>{e?(g?.(e),M(e),S(e.toLocaleString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"}))):(S(""),g?.(void 0)),O()},...k,mode:"single",captionLayout:f&&N?"dropdown":f?"dropdown-months":N?"dropdown-years":"label"})})})]})};export{c as DatePicker};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t}from"react";import{DatePicker as r}from"./DatePicker.js";let o={title:"Components/DatePicker",component:r,parameters:{layout:"centered"},tags:["autodocs"]},a=()=>{let[o,a]=t(new Date);return e(r,{selected:o,onSelect:a,selectMonth:!0,selectYear:!0})};export{a as Default,o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./DatePicker.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{DESCRIPTION_ROOT_CLASSNAME as r}from"./constants.js";import{DescriptionContextProvider as t}from"./DescriptionContext/index.js";import{Name as i}from"./Name/index.js";import{Wrapper as o}from"./styles.js";import{useLogic as s}from"./useLogic/index.js";import{Value as m}from"./Value/index.js";let n=i=>{let{descriptionContextProviderProps:m,direction:n}=s(i),{justifyContent:a="start",component:c="dl",children:d,leader:l=!1}=i;return e(t,{leader:l,direction:n,...m,children:e(o,{$justifyContent:a,className:r,$direction:n,as:c,children:d})})};n.Name=i,n.Value=m;export{n as Description};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{Fragment as e,jsx as n,jsxs as r}from"react/jsx-runtime";import{styled as l}from"../../theme/index.js";import{Container as i}from"../Container/index.js";import{Description as c}from"./Description.js";let d={title:"Components/Description",component:c},a={args:{children:r(e,{children:[n(c.Name,{children:"Название поля"}),n(c.Value,{children:"Значение поля"})]})},parameters:{options:{showPanel:!0},docs:{disable:!0}}},h=l(i)`
|
|
2
|
+
justify-content: center;
|
|
3
|
+
`,o=l(c.Name)`
|
|
4
|
+
width: 100px;
|
|
5
|
+
|
|
6
|
+
${({theme:e})=>e.breakpoints.down("sm")} {
|
|
7
|
+
width: unset;
|
|
8
|
+
}
|
|
9
|
+
`,t=l(c.Value)`
|
|
10
|
+
width: 300px;
|
|
11
|
+
|
|
12
|
+
${({theme:e})=>e.breakpoints.down("sm")} {
|
|
13
|
+
width: unset;
|
|
14
|
+
}
|
|
15
|
+
`,p=()=>r(h,{gap:3,children:[r(c,{children:[n(c.Name,{children:"ИНН"}),n(c.Value,{children:"295995231495"})]}),r(c,{children:[n(c.Name,{children:"Описание"}),n(t,{children:"ИНН физического лица является последовательностью из 12 цифр"})]})]}),m=()=>n(h,{gap:3,children:r(c,{children:[n(c.Name,{children:"КПП"}),n(c.Value,{canCopy:!0,children:"293144576"})]})}),s=()=>r(h,{gap:3,children:[r(c,{children:[n(c.Name,{children:"КПП"}),n(c.Value,{canCopy:!0,children:"293144576"})]}),r(c,{children:[n(c.Name,{children:"Снилс"}),n(c.Value,{canCopy:!0,copyPosition:"left",children:"23339576886"})]})]}),u=()=>r(h,{gap:3,children:[r(c,{leader:!0,children:[n(c.Name,{children:"ФИО"}),n(c.Value,{children:"Швецова М. Д."})]}),r(c,{leader:!0,children:[n(c.Name,{children:"ФИО"}),n(c.Value,{children:"Швецова Мария Дмитриевна"})]})]}),V=()=>r(h,{gap:3,children:[r(c,{direction:"row",children:[n(c.Name,{children:"ИНН"}),n(c.Value,{children:"295995231495"})]}),r(c,{direction:"column",children:[n(c.Name,{children:"Описание"}),n(c.Value,{children:"ИНН физического лица является последовательностью из 12 цифр"})]})]}),N=()=>r(h,{gap:3,children:[r(c,{justifyContent:"space-between",children:[n(c.Name,{children:"ФИО"}),n(c.Value,{children:"Швецова М. Д."})]}),r(c,{justifyContent:"space-between",children:[n(c.Name,{children:"ФИО"}),n(c.Value,{children:"Швецова Мария Дмитриевна"})]})]}),y=()=>r(h,{gap:3,children:[r(c,{justifyContent:"space-between",children:[n(c.Name,{children:"ИНН"}),n(c.Value,{canCopy:!0,children:"295995231495"})]}),r(c,{justifyContent:"space-between",children:[n(c.Name,{children:"Описание"}),n(c.Value,{canCopy:!0,copyPosition:"left",children:"ИНН физического лица является последовательностью из 12 цифр"})]})]}),C=()=>r(h,{gap:4,children:[r(c,{children:[n(c.Name,{children:"Описания ИНН юридического лица"}),n(c.Value,{children:"ИНН юридического лица — последовательность из 10 арабских цифр"})]}),r(c,{children:[n(o,{children:"Описания ИНН юридического лица"}),n(t,{children:"ИНН юридического лица — последовательность из 10 арабских цифр"})]})]}),g=()=>n(h,{gap:3,children:r(c,{leader:!0,children:[n(c.Name,{children:"Описания ИНН юридического лица"}),n(t,{children:"ИНН юридического лица — последовательность из 10 арабских цифр"})]})}),f=()=>n(h,{gap:3,children:r("dl",{children:[r(c,{component:"div",children:[n(c.Name,{children:"ИНН"}),n(c.Value,{children:"295995231495"})]}),r(c,{component:"div",children:[n(c.Name,{children:"КПП"}),n(c.Value,{children:"293144576"})]})]})}),w=()=>n(h,{gap:3,children:r(c,{leader:!0,children:[n(o,{children:"Полное именование"}),n(c.Value,{children:'_тест_ОАО "Тестовое коммерческое профессиональное учреждение Специальное управление службы №007 Министерство Внутренней Разработки по делам тестирования, исправления, чрезвычайным ситуациям и ликвидации последствии действия багов"'})]})}),b=()=>r(h,{gap:3,children:[r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{color:"grey",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{color:"warning",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{color:"error",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{color:"success",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{color:"primary",children:"Значение показателя"})]})]}),j=()=>r(h,{gap:3,children:[r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{canCopy:!0,color:"grey",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{canCopy:!0,color:"warning",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{canCopy:!0,color:"error",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{canCopy:!0,color:"success",children:"Значение показателя"})]}),r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{canCopy:!0,color:"primary",children:"Значение показателя"})]})]}),L=()=>n(h,{gap:3,children:r(c,{children:[n(c.Name,{children:"Название показателя"}),n(c.Value,{})]})});export{m as CanCopy,b as Colors,j as ColorsCanCopy,s as CopyPosition,f as DescriptionList,V as Direction,L as EmptyValue,p as Example,a as Interaction,N as JustifyContent,y as JustifyContentCanCopy,u as Leader,g as LongDescriptionValueLeader,C as LongLabelValue,w as ShortLabelWithLongValue,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as t}from"react";import{DEFAULT_SEPARATOR as r}from"../constants.js";let e=t({leader:!1,separator:r,direction:"default"});export{e as DescriptionContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{DescriptionContext as e}from"../DescriptionContext.js";let t=({children:t,leader:o,separator:i,direction:n})=>r(e.Provider,{value:{leader:o,separator:i,direction:n},children:t});export{t as DescriptionContextProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./DescriptionContextProvider.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./DescriptionContext.js";export*from"./DescriptionContextProvider/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fragment as r,jsx as e,jsxs as t}from"react/jsx-runtime";import{useContext as o}from"react";import{Typography as i}from"../../Typography/index.js";import{DescriptionContext as m}from"../DescriptionContext/index.js";import{DashedSeparator as n,Wrapper as p}from"./styles.js";let c=({children:c,color:l="textSecondary",...d})=>{let{leader:s,separator:a}=o(m);return t(r,{children:[e(p,{$leader:s,children:t(i,{...d,color:l,children:[c,!s&&a]})}),s&&e(n,{})]})};export{c as Name};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./Name.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{styled as e}from"../../../theme/index.js";let r=e("dt",{shouldForwardProp:e=>"$leader"!==e})`
|
|
2
|
+
flex-shrink: 0;
|
|
3
|
+
|
|
4
|
+
max-width: ${({$leader:e})=>e?"calc(100% - 36px)":"calc(100% - 12px)"};
|
|
5
|
+
margin-right: ${({theme:e})=>e.spacing(2)};
|
|
6
|
+
`,a=e("div")`
|
|
7
|
+
flex: 1;
|
|
8
|
+
|
|
9
|
+
min-width: 12px;
|
|
10
|
+
height: 4px;
|
|
11
|
+
margin-right: ${({theme:e})=>e.spacing(2)};
|
|
12
|
+
|
|
13
|
+
border-bottom: 1px dashed ${({theme:e})=>e.palette.grey[400]};
|
|
14
|
+
|
|
15
|
+
${({theme:e})=>e.breakpoints.down("sm")} {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
`;export{a as DashedSeparator,r as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{StyledCopyTypography as r,StyledTypography as o,Wrapper as i}from"./styles.js";import{useLogic as t}from"./useLogic/index.js";let n=n=>{let{valueToRender:c,isDefaultValueRender:d,leader:l,direction:m}=t(n),{copyPosition:p="right",copyText:s,canCopy:a,children:h,stub:u,...x}=n;return d?e(o,{$direction:m,component:"dd",$leader:l,...x,children:c}):e(i,{children:e(r,{copyPosition:p,copyText:s,$direction:m,$leader:l,component:"div",...x,children:c})})};export{n as Value};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./Value.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import{CopyTypography as r,Typography as e}from"../../index.js";import{styled as o}from"../../../theme/index.js";let t=o(e,{shouldForwardProp:r=>!["$canCopy","$leader","$direction"].includes(r.toString())})`
|
|
2
|
+
cursor: ${({$canCopy:r})=>r?"pointer":"default"};
|
|
3
|
+
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
|
|
6
|
+
hyphens: auto;
|
|
7
|
+
text-align: ${({$leader:r})=>r?"right":"left"};
|
|
8
|
+
overflow-wrap: break-word;
|
|
9
|
+
|
|
10
|
+
${({theme:r})=>r.breakpoints.down("sm")} {
|
|
11
|
+
text-align: ${({$direction:r})=>"row"!==r?"left":"right"};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:hover {
|
|
15
|
+
text-decoration: ${({$canCopy:r})=>r?"underline":"none"};
|
|
16
|
+
}
|
|
17
|
+
`,i=o(r,{shouldForwardProp:r=>!["$leader","$direction"].includes(r.toString())})`
|
|
18
|
+
display: unset;
|
|
19
|
+
|
|
20
|
+
hyphens: auto;
|
|
21
|
+
text-align: ${({$leader:r})=>r?"right":"left"};
|
|
22
|
+
overflow-wrap: break-word;
|
|
23
|
+
|
|
24
|
+
${({theme:r})=>r.breakpoints.down("sm")} {
|
|
25
|
+
text-align: ${({$direction:r})=>"row"!==r?"left":"right"};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& > svg {
|
|
29
|
+
margin-bottom: ${({theme:r})=>r.spacing(-1)};
|
|
30
|
+
}
|
|
31
|
+
`,n=o("dd")`
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
|
|
34
|
+
margin: 0;
|
|
35
|
+
`;export{i as StyledCopyTypography,t as StyledTypography,n as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as e}from"react";import{ConfigContext as r}from"../../../ConfigProvider/index.js";import{DescriptionContext as o}from"../../DescriptionContext/index.js";let t=({canCopy:t,children:i,stub:n})=>{let{emptySymbol:m}=e(r),{leader:d,direction:f}=e(o);return{valueToRender:i||n||m,isDefaultValueRender:!t||!i,leader:d,direction:f}};export{t as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let A=":",t="—",E="astral-ui_descriptionRoot";export{A as DEFAULT_SEPARATOR,t as DEFAULT_SYMBOL,E as DESCRIPTION_ROOT_CLASSNAME};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./constants.js";export*from"./Description.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{styled as e}from"../../theme/index.js";let o=e("div",{shouldForwardProp:e=>!["$justifyContent","as","$direction"].includes(e.toString())})`
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: ${({$direction:e})=>"default"===e?"row":e};
|
|
5
|
+
align-items: baseline;
|
|
6
|
+
justify-content: ${({$justifyContent:e})=>e};
|
|
7
|
+
|
|
8
|
+
margin: 0;
|
|
9
|
+
|
|
10
|
+
${({theme:e})=>e.breakpoints.down("sm")} {
|
|
11
|
+
flex-direction: ${({$direction:e})=>"default"===e?"column":e};
|
|
12
|
+
|
|
13
|
+
.MuiTypography-root {
|
|
14
|
+
font-size: ${({theme:e})=>e.typography.fontSize};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`;export{o as Wrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./useLogic.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useViewportType as o}from"../../../hooks/index.js";import{DEFAULT_SEPARATOR as t}from"../constants.js";let r=({direction:r="default",separator:e=t})=>{let{isMobile:s}=o();return{descriptionContextProviderProps:{separator:"column"===r||s&&"default"===r?"":e},direction:r}};export{r as useLogic};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as i}from"react/jsx-runtime";import{useCallback as t}from"react";import{Description as o}from"../Description/index.js";import{GuidTypography as e}from"../GuidTypography/index.js";import{Tag as n}from"../Tag/index.js";import{Typography as l}from"../Typography/index.js";import{ListWrapper as p,StyledDescriptionName as c,StyledDescriptionValue as a,Wrapper as d}from"./styles.js";import{getTooltipProps as m}from"./utils/index.js";let s=({items:s,variant:h="default",title:f,direction:u,...y})=>{let x=t((i,t)=>{let{renderValue:l,color:p,canCopy:c,copyPosition:d,variant:s,copyText:h}=t;if(l)return l(i,t);if("tag"===s)return r(o.Value,{children:r(n,{label:i,color:p,variant:"light"})});if("guid"===s){let t=m(c);return r(a,{canCopy:c,$isCopy:c,color:p,copyPosition:d,copyText:h,children:r(e,{tooltipProps:t,children:i})})}return r(o.Value,{canCopy:c,color:p,copyPosition:d,children:i})},[]);return i(d,{$variant:h,children:[f&&("string"==typeof f?r(l,{variant:"h6",children:f}):f),r(p,{$direction:u,children:s.map(({name:t,value:e,options:n})=>{let{nameMaxWidth:l,...p}=n||{};return i(o,{direction:u,...y,component:"div",children:[r(c,{$nameMaxWidth:l,$direction:u,children:t}),x(e,p)]},`${t}:${e}`)})})]})};export{s as DescriptionList};
|