@astral/ui 1.16.3 → 1.18.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/ActionCell/ActionCell.js +19 -39
- package/ActionCell/styles.js +5 -7
- package/Alert/Alert.js +11 -22
- package/Alert/styles.js +17 -20
- package/Autocomplete/Autocomplete.js +23 -34
- package/BackdropStack/hooks/useBackdropStackToggle/useBackdropStackToggle.js +11 -12
- package/BackdropStack/services/BackdropStackManager/BackdropStackManager.js +17 -19
- package/Badge/Badge.js +5 -16
- package/Badge/styled.d.ts +2 -16
- package/Badge/styled.js +26 -31
- package/Button/Button.js +10 -21
- package/Button/styles.js +16 -22
- package/ButtonBase/ButtonBase.js +7 -18
- package/ButtonBase/styles.d.ts +3 -3
- package/ButtonBase/styles.js +68 -73
- package/Checkbox/Checkbox.js +6 -17
- package/Checkbox/icons.js +8 -19
- package/Checkbox/styled.js +47 -32
- package/Chevron/Chevron.js +3 -14
- package/Chevron/styles.js +11 -18
- package/CircularProgress/CircularProgress.js +7 -18
- package/CircularProgress/CircularProgressStory.js +4 -4
- package/CircularProgress/CircularProgressStoryTemplate.js +4 -15
- package/Collapse/Collapse.js +1 -1
- package/ConfigProvider/ConfigProvider.js +7 -19
- package/ContentState/ContentState.d.ts +1 -1
- package/ContentState/ContentState.js +12 -24
- package/ContentState/styles.js +8 -7
- package/DashboardLayout/DashboardLayout.js +7 -7
- package/DashboardLayout/DashboardLayoutStory.js +5 -16
- package/DashboardLayout/DashboardLayoutStoryTemplate.js +4 -15
- package/DashboardLayout/Header/Header.js +9 -20
- package/DashboardLayout/Header/styles.js +17 -20
- package/DashboardLayout/Main/Main.js +5 -17
- package/DashboardLayout/Main/styled.js +7 -7
- package/DashboardLayout/Sidebar/Sidebar.js +13 -24
- package/DashboardLayout/Sidebar/SidebarNav/SidebarNav.js +5 -16
- package/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/SidebarToggleButton.js +7 -18
- package/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/styles.js +13 -11
- package/DashboardLayout/Sidebar/SidebarToggler/SidebarToggler.js +8 -19
- package/DashboardLayout/Sidebar/SidebarToggler/styled.js +11 -12
- package/DashboardLayout/Sidebar/styles.js +16 -24
- package/DashboardLayout/styles.js +11 -9
- package/DataGrid/DataGrid.js +25 -50
- package/DataGrid/DataGridBody/DataGridBody.d.ts +2 -2
- package/DataGrid/DataGridBody/DataGridBody.js +19 -31
- package/DataGrid/DataGridBody/styles.js +9 -13
- package/DataGrid/DataGridCell/DataGridCell.d.ts +2 -2
- package/DataGrid/DataGridCell/DataGridCell.js +7 -19
- package/DataGrid/DataGridHead/DataGridHead.d.ts +2 -2
- package/DataGrid/DataGridHead/DataGridHead.js +15 -28
- package/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +9 -21
- package/DataGrid/DataGridHeadColumn/styles.js +23 -23
- package/DataGrid/DataGridLoader/DataGridLoader.js +3 -4
- package/DataGrid/DataGridLoader/styles.js +22 -15
- package/DataGrid/DataGridNoData/DataGridNoData.js +5 -17
- package/DataGrid/DataGridNoData/styles.js +29 -17
- package/DataGrid/styles.js +12 -13
- package/DataGrid/types.d.ts +1 -1
- package/DataGridPagination/DataGridPagination.js +11 -22
- package/DataGridPagination/styles.js +11 -15
- package/DatePicker/DatePicker.js +22 -33
- package/DatePicker/DatePickerDay/DatePickerDay.js +4 -15
- package/DatePicker/DatePickerDay/styled.js +6 -8
- package/DatePicker/DatePickerHeader/DatePickerHeader.js +12 -23
- package/DatePicker/DatePickerHeader/styled.js +10 -9
- package/DatePicker/styled.js +94 -70
- package/DatePickerProvider/DatePickerProvider.js +4 -4
- package/Description/Description.js +5 -6
- package/Description/Name/Name.js +5 -16
- package/Description/Value/Value.js +6 -17
- package/Description/styles.js +14 -13
- package/Dialog/Dialog.js +8 -19
- package/DialogActions/DialogActions.js +6 -17
- package/DialogTitle/DialogTitle.js +8 -19
- package/Divider/Divider.js +1 -1
- package/DropdownButton/DropdownButton.js +11 -22
- package/ErrorBoundary/ErrorBoundary.js +19 -48
- package/Fab/Fab.js +7 -18
- package/Fab/styles.js +33 -37
- package/Fade/Fade.js +1 -1
- package/FormControlLabel/FormControlLabel.js +4 -15
- package/FormControlLabel/styled.js +10 -11
- package/FormHelperText/FormHelperText.js +6 -6
- package/FormHelperText/styled.js +16 -18
- package/GlobalStyles/GlobalStyles.js +12 -25
- package/Grid/Grid.js +5 -16
- package/Grid/styled.js +5 -11
- package/Grow/Grow.js +1 -1
- package/IconButton/IconButton.js +6 -17
- package/IconButton/styles.js +15 -21
- package/IconDropdownButton/IconDropdownButton.js +10 -21
- package/List/List.js +4 -15
- package/ListItem/ListItem.js +4 -15
- package/ListItem/styles.js +19 -32
- package/ListItemAvatar/ListItemAvatar.js +1 -1
- package/ListItemButton/ListItemButton.js +5 -16
- package/ListItemIcon/ListItemIcon.js +5 -16
- package/ListItemIcon/styled.js +5 -11
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/ListItemText/ListItemText.js +4 -15
- package/ListSubheader/ListSubheader.js +1 -1
- package/LocalizationProvider/LocalizationProvider.js +6 -18
- package/MaskField/MaskField.js +12 -23
- package/Menu/Menu.js +1 -1
- package/MenuGroup/MenuGroup.js +7 -18
- package/MenuGroup/stories/Icons.js +8 -19
- package/MenuGroup/stories/styled.js +12 -17
- package/MenuGroup/styled.js +14 -21
- package/MenuItem/MenuItem.js +5 -16
- package/MenuItem/styled.js +5 -11
- package/MenuList/MenuList.js +5 -16
- package/MenuList/styled.js +10 -17
- package/NavMenu/NavMenu.js +7 -18
- package/NavMenu/NavMenuItem/NavMenuItem.js +13 -25
- package/NavMenu/NavMenuItem/NavMenuItemButton/NavMenuItemButton.js +8 -19
- package/NavMenu/NavMenuItem/NavMenuItemButton/styles.js +29 -30
- package/NavMenu/NavMenuItem/NavMenuItemList/NavMenuItemList.js +8 -19
- package/Notification/Notification.js +6 -37
- package/Notification/NotificationContainer/NotificationContainer.js +7 -18
- package/Notification/NotificationContainer/styled.js +16 -7
- package/Notification/NotificationTemplate/NotificationTemplate.js +10 -22
- package/Notification/NotificationTemplate/styled.js +51 -51
- package/Notification/NotificationTemplate/utils/getActionsDirection/getActionsDirection.js +2 -2
- package/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +3 -3
- package/Notification/constants/notificationVariant.js +7 -18
- package/Notification/constants/positions.js +1 -1
- package/Notification/styled.js +18 -27
- package/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +5 -6
- package/Notification/utils/notificationTemplatePropsCreator/notificationTemplatePropsCreator.js +2 -13
- package/OverflowTypography/OverflowTypography.js +13 -22
- package/OverflowTypography/hooks/useOverflowed/useOverflowed.js +13 -16
- package/OverflowTypography/styles.js +14 -12
- package/Pagination/Pagination.js +4 -15
- package/Placeholder/Placeholder.js +4 -16
- package/Placeholder/styles.js +70 -82
- package/Product/Product.js +6 -17
- package/Profile/Profile.js +10 -21
- package/Profile/styled.js +32 -36
- package/Radio/Icon.js +6 -17
- package/Radio/Radio.d.ts +1 -1
- package/Radio/Radio.js +7 -18
- package/Radio/styled.js +43 -32
- package/Select/Select.js +16 -26
- package/Select/styled.js +36 -31
- package/SideDialog/SideDialog.js +6 -17
- package/SideDialog/styled.js +8 -8
- package/Slide/Slide.js +1 -1
- package/SwipeableDrawer/SwipeableDrawer.js +5 -16
- package/SwipeableDrawer/styles.js +73 -78
- package/Tab/Tab.js +1 -1
- package/Table/Table.js +5 -16
- package/Table/TableBody/TableBody.js +1 -1
- package/Table/TableCell/TableCell.js +1 -1
- package/Table/TableContainer/TableContainer.js +1 -1
- package/Table/TableFooter/TableFooter.js +1 -1
- package/Table/TableHead/TableHead.js +1 -1
- package/Table/TableRow/TableRow.js +1 -1
- package/Table/TableSortLabel/TableSortLabel.js +1 -1
- package/Tabs/Tabs.js +1 -1
- package/Tag/Tag.js +7 -18
- package/Tag/styled.js +84 -60
- package/TextArea/TextArea.js +6 -17
- package/TextField/TextField.js +11 -22
- package/ThemeProvider/ThemeProvider.js +7 -18
- package/Tooltip/Tooltip.js +7 -18
- package/Tooltip/styled.js +43 -58
- package/Typography/Typography.js +8 -19
- package/Zoom/Zoom.js +1 -1
- package/esm/ActionCell/ActionCell.js +11 -31
- package/esm/ActionCell/styles.js +4 -6
- package/esm/Alert/Alert.js +4 -15
- package/esm/Alert/styles.js +15 -18
- package/esm/Autocomplete/Autocomplete.js +12 -23
- package/esm/Autocomplete/constants.js +1 -1
- package/esm/BackdropStack/hooks/useBackdropStackToggle/useBackdropStackToggle.js +8 -9
- package/esm/BackdropStack/services/BackdropStackManager/BackdropStackManager.js +17 -19
- package/esm/Badge/Badge.js +3 -14
- package/esm/Badge/styled.d.ts +2 -16
- package/esm/Badge/styled.js +25 -30
- package/esm/Button/Button.js +4 -15
- package/esm/Button/styles.js +13 -19
- package/esm/ButtonBase/ButtonBase.js +3 -14
- package/esm/ButtonBase/styles.d.ts +3 -3
- package/esm/ButtonBase/styles.js +66 -71
- package/esm/Checkbox/Checkbox.js +3 -14
- package/esm/Checkbox/icons.js +6 -17
- package/esm/Checkbox/styled.js +45 -30
- package/esm/Chevron/Chevron.js +1 -12
- package/esm/Chevron/styles.js +10 -17
- package/esm/CircularProgress/CircularProgress.js +4 -15
- package/esm/CircularProgress/CircularProgressStory.js +2 -2
- package/esm/CircularProgress/CircularProgressStoryTemplate.js +2 -13
- package/esm/ConfigProvider/ConfigProvider.js +5 -17
- package/esm/ContentState/ContentState.d.ts +1 -1
- package/esm/ContentState/ContentState.js +6 -18
- package/esm/ContentState/styles.js +7 -6
- package/esm/DashboardLayout/DashboardLayout.js +2 -2
- package/esm/DashboardLayout/DashboardLayoutStory.js +3 -14
- package/esm/DashboardLayout/DashboardLayoutStoryTemplate.js +2 -13
- package/esm/DashboardLayout/Header/Header.js +4 -15
- package/esm/DashboardLayout/Header/styles.js +16 -19
- package/esm/DashboardLayout/Main/Main.js +2 -14
- package/esm/DashboardLayout/Main/styled.js +6 -6
- package/esm/DashboardLayout/Sidebar/Sidebar.js +6 -17
- package/esm/DashboardLayout/Sidebar/SidebarNav/SidebarNav.js +3 -14
- package/esm/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/SidebarToggleButton.js +3 -14
- package/esm/DashboardLayout/Sidebar/SidebarToggler/SidebarToggleButton/styles.js +11 -9
- package/esm/DashboardLayout/Sidebar/SidebarToggler/SidebarToggler.js +4 -15
- package/esm/DashboardLayout/Sidebar/SidebarToggler/styled.js +9 -10
- package/esm/DashboardLayout/Sidebar/styles.js +15 -23
- package/esm/DashboardLayout/styles.js +10 -8
- package/esm/DataGrid/DataGrid.js +17 -42
- package/esm/DataGrid/DataGridBody/DataGridBody.d.ts +2 -2
- package/esm/DataGrid/DataGridBody/DataGridBody.js +13 -25
- package/esm/DataGrid/DataGridBody/styles.js +8 -12
- package/esm/DataGrid/DataGridCell/DataGridCell.d.ts +2 -2
- package/esm/DataGrid/DataGridCell/DataGridCell.js +3 -15
- package/esm/DataGrid/DataGridHead/DataGridHead.d.ts +2 -2
- package/esm/DataGrid/DataGridHead/DataGridHead.js +8 -21
- package/esm/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +4 -16
- package/esm/DataGrid/DataGridHeadColumn/styles.js +21 -21
- package/esm/DataGrid/DataGridLoader/DataGridLoader.js +1 -2
- package/esm/DataGrid/DataGridLoader/styles.js +19 -12
- package/esm/DataGrid/DataGridNoData/DataGridNoData.js +3 -15
- package/esm/DataGrid/DataGridNoData/styles.js +27 -15
- package/esm/DataGrid/styles.js +11 -12
- package/esm/DataGrid/types.d.ts +1 -1
- package/esm/DataGridPagination/DataGridPagination.js +7 -18
- package/esm/DataGridPagination/styles.js +9 -13
- package/esm/DatePicker/DatePicker.js +11 -22
- package/esm/DatePicker/DatePickerDay/DatePickerDay.js +2 -13
- package/esm/DatePicker/DatePickerDay/styled.js +4 -6
- package/esm/DatePicker/DatePickerHeader/DatePickerHeader.js +5 -16
- package/esm/DatePicker/DatePickerHeader/styled.js +8 -7
- package/esm/DatePicker/styled.js +93 -69
- package/esm/DatePickerProvider/DatePickerProvider.js +2 -2
- package/esm/Description/Description.js +1 -2
- package/esm/Description/Name/Name.js +3 -14
- package/esm/Description/Value/Value.js +4 -15
- package/esm/Description/styles.js +13 -12
- package/esm/Dialog/Dialog.js +5 -16
- package/esm/DialogActions/DialogActions.js +3 -14
- package/esm/DialogTitle/DialogTitle.js +4 -15
- package/esm/DropdownButton/DropdownButton.js +4 -15
- package/esm/ErrorBoundary/ErrorBoundary.js +14 -43
- package/esm/Fab/Fab.js +3 -14
- package/esm/Fab/styles.js +31 -35
- package/esm/FormControlLabel/FormControlLabel.js +2 -13
- package/esm/FormControlLabel/styled.js +8 -9
- package/esm/FormHelperText/FormHelperText.js +3 -3
- package/esm/FormHelperText/styled.js +14 -16
- package/esm/GlobalStyles/GlobalStyles.js +8 -21
- package/esm/Grid/Grid.js +3 -14
- package/esm/Grid/styled.js +3 -9
- package/esm/IconButton/IconButton.js +3 -14
- package/esm/IconButton/styles.js +14 -20
- package/esm/IconDropdownButton/IconDropdownButton.js +4 -15
- package/esm/List/List.js +2 -13
- package/esm/ListItem/ListItem.js +2 -13
- package/esm/ListItem/styles.js +17 -30
- package/esm/ListItemButton/ListItemButton.js +2 -13
- package/esm/ListItemIcon/ListItemIcon.js +2 -13
- package/esm/ListItemIcon/styled.js +3 -9
- package/esm/ListItemText/ListItemText.js +2 -13
- package/esm/LocalizationProvider/LocalizationProvider.js +2 -14
- package/esm/MaskField/MaskField.js +9 -20
- package/esm/MenuGroup/MenuGroup.js +4 -15
- package/esm/MenuGroup/stories/Icons.js +7 -18
- package/esm/MenuGroup/stories/styled.js +9 -14
- package/esm/MenuGroup/styled.js +12 -19
- package/esm/MenuItem/MenuItem.js +3 -14
- package/esm/MenuItem/styled.js +3 -9
- package/esm/MenuList/MenuList.js +3 -14
- package/esm/MenuList/styled.js +8 -15
- package/esm/NavMenu/NavMenu.js +3 -14
- package/esm/NavMenu/NavMenuItem/NavMenuItem.js +8 -20
- package/esm/NavMenu/NavMenuItem/NavMenuItemButton/NavMenuItemButton.js +3 -14
- package/esm/NavMenu/NavMenuItem/NavMenuItemButton/styles.js +25 -26
- package/esm/NavMenu/NavMenuItem/NavMenuItemList/NavMenuItemList.js +4 -15
- package/esm/Notification/Notification.js +5 -36
- package/esm/Notification/NotificationContainer/NotificationContainer.js +2 -13
- package/esm/Notification/NotificationContainer/styled.js +15 -6
- package/esm/Notification/NotificationTemplate/NotificationTemplate.js +6 -18
- package/esm/Notification/NotificationTemplate/styled.js +48 -48
- package/esm/Notification/NotificationTemplate/utils/getActionsDirection/getActionsDirection.js +2 -2
- package/esm/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +3 -3
- package/esm/Notification/constants/defaultNotificationProps.js +1 -1
- package/esm/Notification/constants/notificationVariant.js +5 -16
- package/esm/Notification/constants/positions.js +1 -1
- package/esm/Notification/styled.js +20 -29
- package/esm/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +2 -3
- package/esm/Notification/utils/notificationTemplatePropsCreator/notificationTemplatePropsCreator.js +2 -13
- package/esm/OverflowTypography/OverflowTypography.js +9 -18
- package/esm/OverflowTypography/hooks/useOverflowed/useOverflowed.js +11 -14
- package/esm/OverflowTypography/styles.js +13 -11
- package/esm/Pagination/Pagination.js +2 -13
- package/esm/Placeholder/Placeholder.js +2 -14
- package/esm/Placeholder/styles.js +68 -80
- package/esm/Product/Product.js +3 -14
- package/esm/Profile/Profile.js +4 -15
- package/esm/Profile/styled.js +30 -34
- package/esm/Radio/Icon.js +4 -15
- package/esm/Radio/Radio.d.ts +1 -1
- package/esm/Radio/Radio.js +3 -14
- package/esm/Radio/styled.js +41 -30
- package/esm/Select/Select.js +8 -18
- package/esm/Select/styled.js +34 -29
- package/esm/SideDialog/SideDialog.js +3 -14
- package/esm/SideDialog/styled.js +6 -6
- package/esm/SwipeableDrawer/SwipeableDrawer.js +3 -14
- package/esm/SwipeableDrawer/styles.js +71 -76
- package/esm/Table/Table.js +3 -14
- package/esm/Tag/Tag.js +3 -14
- package/esm/Tag/styled.js +82 -58
- package/esm/TextArea/TextArea.js +3 -14
- package/esm/TextField/TextField.js +7 -18
- package/esm/ThemeProvider/ThemeProvider.js +3 -14
- package/esm/Tooltip/Tooltip.js +3 -14
- package/esm/Tooltip/styled.js +39 -54
- package/esm/Typography/Typography.js +4 -15
- package/esm/hooks/useMenu.js +7 -8
- package/esm/theme/baseTheme/baseTheme.js +7 -7
- package/esm/theme/baseTheme/baseTheme.test.js +12 -12
- package/esm/theme/breakpoints.js +1 -1
- package/esm/theme/components/MuiAlert.js +7 -12
- package/esm/theme/components/MuiAutocomplete.js +13 -20
- package/esm/theme/components/MuiButton.js +42 -43
- package/esm/theme/components/MuiButtonBase.js +1 -1
- package/esm/theme/components/MuiCircularProgress.js +3 -4
- package/esm/theme/components/MuiDialog.js +3 -5
- package/esm/theme/components/MuiDialogActions.js +2 -3
- package/esm/theme/components/MuiDialogContent.js +2 -3
- package/esm/theme/components/MuiDialogTitle.js +2 -3
- package/esm/theme/components/MuiFormHelperText.js +2 -3
- package/esm/theme/components/MuiFormLabel.js +2 -2
- package/esm/theme/components/MuiInputBase.js +2 -3
- package/esm/theme/components/MuiInputLabel.js +2 -3
- package/esm/theme/components/MuiListItemButton.js +2 -3
- package/esm/theme/components/MuiListItemText.js +2 -2
- package/esm/theme/components/MuiLoadingButton.js +10 -12
- package/esm/theme/components/MuiMenu.js +3 -5
- package/esm/theme/components/MuiMenuItem.js +2 -3
- package/esm/theme/components/MuiOutlinedInput.js +7 -12
- package/esm/theme/components/MuiPaginationItem.js +5 -7
- package/esm/theme/components/MuiTab.js +2 -3
- package/esm/theme/components/MuiTableCell.js +2 -2
- package/esm/theme/components/MuiTableHead.js +3 -4
- package/esm/theme/components/MuiTableRow.js +2 -3
- package/esm/theme/components/MuiTabs.js +3 -4
- package/esm/theme/components/MuiTypography.js +1 -1
- package/esm/theme/components/components.js +64 -35
- package/esm/theme/constants.js +1 -1
- package/esm/theme/elevation.js +1 -1
- package/esm/theme/hooks/useTheme/index.js +1 -1
- package/esm/theme/palette/brandPalette.js +16 -17
- package/esm/theme/palette/palette.js +3 -15
- package/esm/theme/shape.js +1 -1
- package/esm/theme/typography.js +4 -5
- package/hooks/useMenu.js +8 -9
- package/package.json +14 -14
- package/theme/baseTheme/baseTheme.js +14 -14
- package/theme/baseTheme/baseTheme.test.js +14 -14
- package/theme/components/MuiAlert.js +6 -11
- package/theme/components/MuiAutocomplete.js +13 -20
- package/theme/components/MuiButton.js +43 -44
- package/theme/components/MuiCircularProgress.js +2 -3
- package/theme/components/MuiDialog.js +2 -4
- package/theme/components/MuiDialogActions.js +1 -2
- package/theme/components/MuiDialogContent.js +1 -2
- package/theme/components/MuiDialogTitle.js +1 -2
- package/theme/components/MuiFormHelperText.js +1 -2
- package/theme/components/MuiFormLabel.js +1 -1
- package/theme/components/MuiInputBase.js +1 -2
- package/theme/components/MuiInputLabel.js +1 -2
- package/theme/components/MuiListItemButton.js +1 -2
- package/theme/components/MuiListItemText.js +1 -1
- package/theme/components/MuiLoadingButton.js +12 -14
- package/theme/components/MuiMenu.js +2 -4
- package/theme/components/MuiMenuItem.js +1 -2
- package/theme/components/MuiOutlinedInput.js +6 -11
- package/theme/components/MuiPaginationItem.js +4 -6
- package/theme/components/MuiTab.js +1 -2
- package/theme/components/MuiTableCell.js +1 -1
- package/theme/components/MuiTableHead.js +2 -3
- package/theme/components/MuiTableRow.js +1 -2
- package/theme/components/MuiTabs.js +2 -3
- package/theme/components/components.js +64 -35
- package/theme/hooks/useTheme/index.js +2 -2
- package/theme/palette/brandPalette.js +17 -18
- package/theme/palette/palette.js +5 -17
- package/theme/typography.js +3 -4
- package/docs/Case/Case.d.ts +0 -8
- package/docs/Case/Case.js +0 -31
- package/docs/Case/index.d.ts +0 -1
- package/docs/Case/index.js +0 -17
- package/docs/Case/styles.d.ts +0 -5
- package/docs/Case/styles.js +0 -16
- package/docs/ExampleTemplate/ExampleTemplate.d.ts +0 -13
- package/docs/ExampleTemplate/ExampleTemplate.js +0 -26
- package/docs/ExampleTemplate/index.d.ts +0 -1
- package/docs/ExampleTemplate/index.js +0 -17
- package/docs/ExampleTemplate/styles.d.ts +0 -9
- package/docs/ExampleTemplate/styles.js +0 -13
- package/docs/index.d.ts +0 -2
- package/docs/index.js +0 -18
- package/esm/docs/Case/Case.d.ts +0 -8
- package/esm/docs/Case/Case.js +0 -27
- package/esm/docs/Case/index.d.ts +0 -1
- package/esm/docs/Case/index.js +0 -1
- package/esm/docs/Case/styles.d.ts +0 -5
- package/esm/docs/Case/styles.js +0 -13
- package/esm/docs/ExampleTemplate/ExampleTemplate.d.ts +0 -13
- package/esm/docs/ExampleTemplate/ExampleTemplate.js +0 -22
- package/esm/docs/ExampleTemplate/index.d.ts +0 -1
- package/esm/docs/ExampleTemplate/index.js +0 -1
- package/esm/docs/ExampleTemplate/styles.d.ts +0 -9
- package/esm/docs/ExampleTemplate/styles.js +0 -10
- package/esm/docs/index.d.ts +0 -2
- package/esm/docs/index.js +0 -2
package/ActionCell/ActionCell.js
CHANGED
|
@@ -1,52 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.ActionCell = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function ActionCell(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return function () {
|
|
27
|
-
onClick(row);
|
|
28
|
-
};
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const icons_1 = require("@astral/icons");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const IconButton_1 = require("../IconButton");
|
|
8
|
+
const IconDropdownButton_1 = require("../IconDropdownButton");
|
|
9
|
+
const MenuItem_1 = require("../MenuItem");
|
|
10
|
+
const Tooltip_1 = require("../Tooltip");
|
|
11
|
+
const styles_1 = require("./styles");
|
|
12
|
+
function ActionCell({ actions: { main = [], secondary = [] }, row, }) {
|
|
13
|
+
const handleActionClick = (onClick) => () => {
|
|
14
|
+
onClick(row);
|
|
29
15
|
};
|
|
30
|
-
|
|
16
|
+
const renderMainAction = (0, react_1.useCallback)((action) => {
|
|
31
17
|
if (action.nested) {
|
|
32
|
-
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip,
|
|
34
|
-
var nestedActionName = _a.name, onClick = _a.onClick;
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, __assign({ onClick: handleActionClick(onClick) }, { children: nestedActionName }), nestedActionName));
|
|
36
|
-
}) })) }), name_1));
|
|
18
|
+
const { name, actions, icon } = action;
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, Object.assign({ title: name }, { children: (0, jsx_runtime_1.jsx)(IconDropdownButton_1.IconDropdownButton, Object.assign({ icon: icon, variant: "text" }, { children: actions.map(({ name: nestedActionName, onClick }) => ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, Object.assign({ onClick: handleActionClick(onClick) }, { children: nestedActionName }), nestedActionName))) })) }), name));
|
|
37
20
|
}
|
|
38
|
-
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip,
|
|
21
|
+
const { onClick, name, icon } = action;
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, Object.assign({ title: name }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, Object.assign({ variant: "text", onClick: handleActionClick(onClick) }, { children: icon })) }), name));
|
|
40
23
|
}, [handleActionClick]);
|
|
41
|
-
|
|
24
|
+
const renderSecondaryActions = (0, react_1.useMemo)(() => {
|
|
42
25
|
if (!Boolean(secondary.length)) {
|
|
43
26
|
return null;
|
|
44
27
|
}
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)(IconDropdownButton_1.IconDropdownButton,
|
|
46
|
-
var name = _a.name, onClick = _a.onClick;
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, __assign({ onClick: handleActionClick(onClick) }, { children: name }), name));
|
|
48
|
-
}) })));
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(IconDropdownButton_1.IconDropdownButton, Object.assign({ icon: (0, jsx_runtime_1.jsx)(icons_1.DotsVOutlineMd, {}), variant: "text" }, { children: secondary.map(({ name, onClick }) => ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, Object.assign({ onClick: handleActionClick(onClick) }, { children: name }), name))) })));
|
|
49
29
|
}, [secondary, handleActionClick]);
|
|
50
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.ActionCellWrapper,
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.ActionCellWrapper, Object.assign({ onClick: (event) => event.stopPropagation() }, { children: [main.map((action) => renderMainAction(action)), renderSecondaryActions] })));
|
|
51
31
|
}
|
|
52
32
|
exports.ActionCell = ActionCell;
|
package/ActionCell/styles.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
3
|
exports.ActionCellWrapper = void 0;
|
|
8
|
-
|
|
9
|
-
exports.ActionCellWrapper = styles_1.styled.div
|
|
10
|
-
|
|
4
|
+
const styles_1 = require("../styles");
|
|
5
|
+
exports.ActionCellWrapper = styles_1.styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
`;
|
package/Alert/Alert.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -23,20 +12,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
12
|
};
|
|
24
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
14
|
exports.Alert = void 0;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)(Collapse_1.Collapse,
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const material_1 = require("@mui/material");
|
|
17
|
+
const icons_1 = require("@astral/icons");
|
|
18
|
+
const Typography_1 = require("../Typography");
|
|
19
|
+
const Grid_1 = require("../Grid");
|
|
20
|
+
const Collapse_1 = require("../Collapse");
|
|
21
|
+
const styles_1 = require("./styles");
|
|
22
|
+
const Alert = (_a) => {
|
|
23
|
+
var { children, title, closeText = 'Скрыть', display = true, actions, onClose } = _a, props = __rest(_a, ["children", "title", "closeText", "display", "actions", "onClose"]);
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(Collapse_1.Collapse, Object.assign({ in: display }, { children: (0, jsx_runtime_1.jsxs)(styles_1.StyledAlert, Object.assign({}, props, { closeText: closeText, variant: "filled", onClose: onClose, iconMapping: {
|
|
36
25
|
info: (0, jsx_runtime_1.jsx)(icons_1.InfoFillMd, {}),
|
|
37
26
|
error: (0, jsx_runtime_1.jsx)(icons_1.ErrorFillMd, {}),
|
|
38
27
|
success: (0, jsx_runtime_1.jsx)(icons_1.SuccessFillMd, {}),
|
|
39
28
|
warning: (0, jsx_runtime_1.jsx)(icons_1.WarningFillMd, {}),
|
|
40
|
-
} }, { children: [title && ((0, jsx_runtime_1.jsx)(material_1.AlertTitle, { children: (0, jsx_runtime_1.jsx)(Typography_1.Typography,
|
|
29
|
+
} }, { children: [title && ((0, jsx_runtime_1.jsx)(material_1.AlertTitle, { children: (0, jsx_runtime_1.jsx)(Typography_1.Typography, Object.assign({ variant: "h5" }, { children: title })) })), (0, jsx_runtime_1.jsx)(Typography_1.Typography, Object.assign({ gutterBottom: Boolean(actions) }, { children: children })), (0, jsx_runtime_1.jsx)(Grid_1.Grid, Object.assign({ container: true, spacing: 4, autoFlow: "column", justifyContent: "flex-start" }, { children: actions }))] })) })));
|
|
41
30
|
};
|
|
42
31
|
exports.Alert = Alert;
|
package/Alert/styles.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
3
|
exports.StyledAlert = void 0;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.StyledAlert = (0, styles_1.styled)(material_1.Alert)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const styles_1 = require("../styles");
|
|
6
|
+
exports.StyledAlert = (0, styles_1.styled)(material_1.Alert) `
|
|
7
|
+
padding: ${({ theme }) => theme.spacing(3)};
|
|
8
|
+
|
|
9
|
+
.MuiAlert-message > *:last-child:not(:empty):not(.MuiTypography-root) {
|
|
10
|
+
padding: ${({ theme }) => theme.spacing(3, 0)};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
${({ theme }) => theme.breakpoints.up('sm')} {
|
|
14
|
+
padding: ${({ theme }) => theme.spacing(2, 4)};
|
|
15
|
+
|
|
16
|
+
.MuiAlert-message > *:last-child:not(:empty):not(.MuiTypography-root) {
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -23,35 +12,35 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
12
|
};
|
|
24
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
14
|
exports.Autocomplete = void 0;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return tags.map(
|
|
41
|
-
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(Tag_1.Tag,
|
|
15
|
+
const react_1 = require("react");
|
|
16
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
17
|
+
const material_1 = require("@mui/material");
|
|
18
|
+
const react_2 = require("react");
|
|
19
|
+
const icons_1 = require("@astral/icons");
|
|
20
|
+
const TextField_1 = require("../TextField");
|
|
21
|
+
const Tag_1 = require("../Tag");
|
|
22
|
+
const MenuItem_1 = require("../MenuItem");
|
|
23
|
+
const Checkbox_1 = require("../Checkbox");
|
|
24
|
+
const OverflowTypography_1 = require("../OverflowTypography");
|
|
25
|
+
const constants_1 = require("./constants");
|
|
26
|
+
const Autocomplete = (props) => {
|
|
27
|
+
const { multiple, placeholder, error, success, helperText, label, size = 'medium', getOptionLabel, renderOption: externalRenderOption, overflowOption } = props, restProps = __rest(props, ["multiple", "placeholder", "error", "success", "helperText", "label", "size", "getOptionLabel", "renderOption", "overflowOption"]);
|
|
28
|
+
const renderTags = (0, react_2.useCallback)((tags, getTagProps) => {
|
|
29
|
+
return tags.map((tag, index) => {
|
|
30
|
+
const title = (getOptionLabel && getOptionLabel(tag)) || '';
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(Tag_1.Tag, Object.assign({ deleteIcon: (0, jsx_runtime_1.jsx)(icons_1.CrossSmOutlineSm, {}), color: "grey", label: title }, getTagProps({ index }))));
|
|
43
32
|
});
|
|
44
33
|
}, [getOptionLabel]);
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
const renderInput = (0, react_2.useCallback)((inputParams) => ((0, jsx_runtime_1.jsx)(TextField_1.TextField, Object.assign({}, inputParams, { placeholder: placeholder, label: label, success: success, error: error, helperText: helperText, size: size }))), [placeholder, label, success, error, helperText, size]);
|
|
35
|
+
const renderOption = (0, react_2.useCallback)((optionProps, option, optionState) => {
|
|
47
36
|
if (externalRenderOption) {
|
|
48
37
|
return externalRenderOption(optionProps, option, optionState);
|
|
49
38
|
}
|
|
50
|
-
|
|
51
|
-
return ((0, react_1.createElement)(MenuItem_1.MenuItem,
|
|
39
|
+
const selected = Boolean(optionProps['aria-selected']);
|
|
40
|
+
return ((0, react_1.createElement)(MenuItem_1.MenuItem, Object.assign({}, optionProps, { key: optionProps.id }),
|
|
52
41
|
multiple && ((0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: selected }) })),
|
|
53
|
-
(0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography,
|
|
42
|
+
(0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, Object.assign({ rowsCount: constants_1.DEFAULT_AUTOCOMPLETE_ELEMENT_ROWS_COUNT }, overflowOption, { children: optionProps.key }))));
|
|
54
43
|
}, [multiple, externalRenderOption]);
|
|
55
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete,
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, Object.assign({}, restProps, { size: size, multiple: multiple, getOptionLabel: getOptionLabel, disableCloseOnSelect: multiple, renderTags: renderTags, renderInput: renderInput, renderOption: renderOption, popupIcon: (0, jsx_runtime_1.jsx)(icons_1.ChevronDOutlineMd, {}), clearIcon: (0, jsx_runtime_1.jsx)(icons_1.CrossSmOutlineSm, {}), componentsProps: { clearIndicator: { disableRipple: true } }, noOptionsText: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" })));
|
|
56
45
|
};
|
|
57
46
|
exports.Autocomplete = Autocomplete;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useBackdropStackToggle = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const nanoid_1 = require("nanoid");
|
|
6
|
+
const BackdropStackManager_1 = require("../../services/BackdropStackManager");
|
|
7
7
|
/**
|
|
8
8
|
* @description хук предназначен для быстрого использования backdropStackManager в реакт компонентах, хранит неуправляемый стейт, если вам нужно управлять этим стейтом, воспользуйтесь backdropStackManager в своем компоненте напрямую.
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var handleOpen = function () {
|
|
10
|
+
const useBackdropStackToggle = ({ id: parentId, } = {}) => {
|
|
11
|
+
const id = (0, react_1.useRef)(parentId || (0, nanoid_1.nanoid)());
|
|
12
|
+
const { pop, push, remove } = BackdropStackManager_1.backdropStackManager;
|
|
13
|
+
const [isOpened, setOpened] = (0, react_1.useState)(false);
|
|
14
|
+
const handleOpen = () => {
|
|
16
15
|
push(id.current);
|
|
17
16
|
setOpened(true);
|
|
18
17
|
};
|
|
19
|
-
|
|
18
|
+
const handleClose = (_, reason) => {
|
|
20
19
|
setOpened(!pop(id.current, reason));
|
|
21
20
|
};
|
|
22
|
-
(0, react_1.useEffect)(
|
|
23
|
-
return { isOpened
|
|
21
|
+
(0, react_1.useEffect)(() => () => remove(id.current), []);
|
|
22
|
+
return { isOpened, handleOpen, handleClose };
|
|
24
23
|
};
|
|
25
24
|
exports.useBackdropStackToggle = useBackdropStackToggle;
|
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.backdropStackManager = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _this = this;
|
|
4
|
+
const nanoid_1 = require("nanoid");
|
|
5
|
+
class BackdropStackManager {
|
|
6
|
+
constructor() {
|
|
8
7
|
this.stack = [];
|
|
9
8
|
// сохраняем информацию о том какой был предыдущий вызов pop,
|
|
10
9
|
// нужен для предотвращения синхронного закрытия при последовательности 'blur' и 'backdropClick' в рамках одного клика
|
|
11
10
|
this.previousPopInfo = [null, null];
|
|
12
11
|
this.currentPointerId = null;
|
|
13
|
-
this.checkOn =
|
|
14
|
-
|
|
12
|
+
this.checkOn = (reason) => {
|
|
13
|
+
const [previousReason, previousPointerId] = this.previousPopInfo;
|
|
15
14
|
return (reason === 'backdropClick' &&
|
|
16
15
|
previousReason === 'blur' &&
|
|
17
|
-
previousPointerId ===
|
|
16
|
+
previousPointerId === this.currentPointerId);
|
|
18
17
|
};
|
|
19
|
-
this.remove =
|
|
20
|
-
|
|
18
|
+
this.remove = (id) => {
|
|
19
|
+
this.stack = this.stack.filter((item) => item !== id);
|
|
21
20
|
};
|
|
22
|
-
this.push =
|
|
23
|
-
|
|
21
|
+
this.push = (id) => {
|
|
22
|
+
this.stack.push(id);
|
|
24
23
|
};
|
|
25
|
-
this.pop =
|
|
26
|
-
if (
|
|
24
|
+
this.pop = (id, reason) => {
|
|
25
|
+
if (this.checkOn(reason)) {
|
|
27
26
|
return false;
|
|
28
27
|
}
|
|
29
|
-
|
|
28
|
+
const lastOpenedElement = this.stack[this.stack.length - 1];
|
|
30
29
|
if (lastOpenedElement === id) {
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
this.previousPopInfo = [reason, this.currentPointerId];
|
|
31
|
+
this.stack.pop();
|
|
33
32
|
return true;
|
|
34
33
|
}
|
|
35
34
|
return false;
|
|
36
35
|
};
|
|
37
|
-
document === null || document === void 0 ? void 0 : document.addEventListener('pointerdown',
|
|
36
|
+
document === null || document === void 0 ? void 0 : document.addEventListener('pointerdown', () => (this.currentPointerId = (0, nanoid_1.nanoid)()));
|
|
38
37
|
}
|
|
39
|
-
|
|
40
|
-
}());
|
|
38
|
+
}
|
|
41
39
|
exports.backdropStackManager = new BackdropStackManager();
|
package/Badge/Badge.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -23,10 +12,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
12
|
};
|
|
24
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
14
|
exports.Badge = void 0;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(styled_1.StyledBadge,
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const styled_1 = require("./styled");
|
|
17
|
+
const Badge = (_a) => {
|
|
18
|
+
var { children, color } = _a, props = __rest(_a, ["children", "color"]);
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(styled_1.StyledBadge, Object.assign({ customColor: color }, props, { max: 99 }, { children: children })));
|
|
31
20
|
};
|
|
32
21
|
exports.Badge = Badge;
|
package/Badge/styled.d.ts
CHANGED
|
@@ -8,23 +8,9 @@ export declare const StyledBadge: import("@emotion/styled").StyledComponent<{
|
|
|
8
8
|
overlap?: "circular" | "rectangular" | undefined;
|
|
9
9
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
10
10
|
variant?: "standard" | "dot" | undefined;
|
|
11
|
-
} & {
|
|
12
|
-
components?: {
|
|
13
|
-
Root?: import("react").ElementType<any> | undefined;
|
|
14
|
-
Badge?: import("react").ElementType<any> | undefined;
|
|
15
|
-
} | undefined;
|
|
16
|
-
componentsProps?: {
|
|
17
|
-
root?: (import("react").HTMLAttributes<HTMLSpanElement> & import("@mui/base").BadgeUnstyledComponentsPropsOverrides) | undefined;
|
|
18
|
-
badge?: (import("react").HTMLAttributes<HTMLSpanElement> & import("@mui/base").BadgeUnstyledComponentsPropsOverrides) | undefined;
|
|
19
|
-
} | undefined;
|
|
20
|
-
badgeContent?: import("react").ReactNode;
|
|
21
|
-
children?: import("react").ReactNode;
|
|
22
|
-
invisible?: boolean | undefined;
|
|
23
|
-
max?: number | undefined;
|
|
24
|
-
showZero?: boolean | undefined;
|
|
25
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
11
|
+
} & import("@mui/base").BadgeUnstyledOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
26
12
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
27
|
-
}, "color" | "
|
|
13
|
+
}, "color" | "variant" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "anchorOrigin" | "overlap" | keyof import("@mui/base").BadgeUnstyledOwnProps> & {
|
|
28
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
29
15
|
} & Omit<BadgeProps, "color"> & {
|
|
30
16
|
customColor: BadgeColor;
|
package/Badge/styled.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
3
|
exports.StyledBadge = void 0;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var customColor = _a.customColor, theme = _a.theme;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const styles_1 = require("../styles");
|
|
6
|
+
const getBgColor = ({ customColor, theme }) => {
|
|
12
7
|
if (customColor === 'grey') {
|
|
13
8
|
return theme.palette.grey[300];
|
|
14
9
|
}
|
|
@@ -29,8 +24,7 @@ var getBgColor = function (_a) {
|
|
|
29
24
|
}
|
|
30
25
|
return theme.palette.primary.main;
|
|
31
26
|
};
|
|
32
|
-
|
|
33
|
-
var customColor = _a.customColor, theme = _a.theme;
|
|
27
|
+
const getTextColor = ({ customColor, theme, }) => {
|
|
34
28
|
if (customColor === 'grey') {
|
|
35
29
|
return theme.palette.text.primary;
|
|
36
30
|
}
|
|
@@ -52,24 +46,25 @@ var getTextColor = function (_a) {
|
|
|
52
46
|
return theme.palette.primary.contrastText;
|
|
53
47
|
};
|
|
54
48
|
exports.StyledBadge = (0, styles_1.styled)(material_1.Badge, {
|
|
55
|
-
shouldForwardProp:
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
});
|
|
75
|
-
|
|
49
|
+
shouldForwardProp: (prop) => prop !== 'customColor',
|
|
50
|
+
}) `
|
|
51
|
+
.MuiBadge-badge {
|
|
52
|
+
height: 20px;
|
|
53
|
+
padding: ${({ theme }) => theme.spacing(0, 1)};
|
|
54
|
+
|
|
55
|
+
color: ${({ customColor, theme }) => getTextColor({ customColor, theme })};
|
|
56
|
+
font-size: ${({ theme }) => theme.typography.small.fontSize};
|
|
57
|
+
line-height: 20px;
|
|
58
|
+
|
|
59
|
+
background-color: ${({ customColor, theme }) => getBgColor({ customColor, theme })};
|
|
60
|
+
border: 2px solid ${({ theme }) => theme.palette.common.white};
|
|
61
|
+
border-radius: 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.MuiBadge-dot {
|
|
65
|
+
width: 12px;
|
|
66
|
+
height: 12px;
|
|
67
|
+
|
|
68
|
+
border: 2px solid ${({ theme }) => theme.palette.common.white};
|
|
69
|
+
}
|
|
70
|
+
`;
|
package/Button/Button.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -23,20 +12,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
12
|
};
|
|
24
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
14
|
exports.Button = void 0;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
exports.Button = (0, react_1.forwardRef)(
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const react_1 = require("react");
|
|
17
|
+
const ButtonBase_1 = require("../ButtonBase");
|
|
18
|
+
const CircularProgress_1 = require("../CircularProgress");
|
|
19
|
+
const constants_1 = require("../CircularProgress/constants");
|
|
20
|
+
const styles_1 = require("./styles");
|
|
21
|
+
exports.Button = (0, react_1.forwardRef)((props, ref) => {
|
|
22
|
+
const { variant = ButtonBase_1.ButtonVariants.Contained, color = ButtonBase_1.ButtonColors.Primary } = props, restProps = __rest(props, ["variant", "color"]);
|
|
23
|
+
const loadingIndicatorColor = (0, react_1.useMemo)(() => {
|
|
35
24
|
if (variant !== ButtonBase_1.ButtonVariants.Contained) {
|
|
36
25
|
return constants_1.CircularProgressColors.PRIMARY;
|
|
37
26
|
}
|
|
38
27
|
return constants_1.CircularProgressColors.INVERTED;
|
|
39
28
|
}, [variant]);
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.LoadingButtonWrapper,
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.LoadingButtonWrapper, Object.assign({ ref: ref }, restProps, { variant: variant, color: color, loadingIndicator: (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, { color: loadingIndicatorColor, size: "small" }) })));
|
|
41
30
|
});
|
|
42
31
|
exports.default = exports.Button;
|
package/Button/styles.js
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
3
|
exports.LoadingButtonWrapper = void 0;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
const lab_1 = require("@mui/lab");
|
|
5
|
+
const styles_1 = require("../styles");
|
|
6
|
+
const styles_2 = require("../ButtonBase/styles");
|
|
7
|
+
const ButtonBase_1 = require("../ButtonBase");
|
|
12
8
|
exports.LoadingButtonWrapper = (0, styles_1.styled)(lab_1.LoadingButton, {
|
|
13
|
-
shouldForwardProp:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, styles_2.getButtonHeightMobile, styles_2.getButtonPaddingMobile);
|
|
26
|
-
var templateObject_1;
|
|
9
|
+
shouldForwardProp: (prop) => prop !== 'customColor' && prop !== 'customVariant',
|
|
10
|
+
}) `
|
|
11
|
+
min-width: ${({ variant }) => variant === ButtonBase_1.ButtonVariants.Link ? 'auto' : ''};
|
|
12
|
+
padding: ${({ variant }) => (variant === ButtonBase_1.ButtonVariants.Link ? 0 : '')};
|
|
13
|
+
|
|
14
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
15
|
+
height: ${styles_2.getButtonHeightMobile};
|
|
16
|
+
padding: ${styles_2.getButtonPaddingMobile};
|
|
17
|
+
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
|
+
`;
|