@astral/ui 0.37.0 → 0.40.1
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 +7 -6
- package/ActionCell/index.js +5 -1
- package/Autocomplete/Autocomplete.js +4 -4
- package/Autocomplete/index.js +5 -1
- package/Badge/Badge.js +1 -1
- package/Badge/index.js +5 -1
- package/Badge/styled.d.ts +3 -3
- package/Badge/styled.js +24 -12
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +3 -2
- package/Button/index.js +5 -1
- package/ButtonBase/ButtonBase.d.ts +1 -1
- package/ButtonBase/ButtonBase.js +1 -1
- package/ButtonBase/index.js +5 -1
- package/ButtonBase/styled.js +9 -3
- package/Checkbox/Checkbox.js +2 -2
- package/Checkbox/icons.js +3 -3
- package/Checkbox/index.js +5 -1
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +1 -1
- package/CircularProgress/CircularProgressStory.js +1 -1
- package/CircularProgress/CircularProgressStoryTemplate.js +1 -1
- package/CircularProgress/index.js +5 -1
- package/Collapse/index.js +5 -1
- package/ContentState/ContentState.js +10 -8
- package/ContentState/index.js +5 -1
- package/ContentState/styles.d.ts +5 -0
- package/ContentState/styles.js +10 -0
- package/DashboardLayout/DashboardLayout.js +1 -1
- package/DashboardLayout/DashboardLayoutStory.js +1 -1
- package/DashboardLayout/DashboardLayoutStoryTemplate.js +1 -1
- package/DashboardLayout/Header/Header.js +1 -1
- package/DashboardLayout/Header/index.js +5 -1
- package/DashboardLayout/Main/Main.js +1 -1
- package/DashboardLayout/Main/index.js +5 -1
- package/DashboardLayout/Sidebar/Sidebar.js +1 -1
- package/DashboardLayout/Sidebar/index.js +5 -1
- package/DashboardLayout/Sidebar/styled.d.ts +1 -1
- package/DashboardLayout/index.js +5 -1
- package/DataGrid/DataGrid.d.ts +73 -3
- package/DataGrid/DataGrid.js +7 -5
- package/DataGrid/DataGridBody/DataGridBody.d.ts +14 -3
- package/DataGrid/DataGridBody/DataGridBody.js +10 -5
- package/DataGrid/DataGridBody/index.js +5 -1
- package/DataGrid/DataGridBody/styled.d.ts +1 -1
- package/DataGrid/DataGridCell/DataGridCell.d.ts +8 -3
- package/DataGrid/DataGridCell/DataGridCell.js +7 -4
- package/DataGrid/DataGridCell/index.js +5 -1
- package/DataGrid/DataGridHead/DataGridHead.d.ts +12 -3
- package/DataGrid/DataGridHead/DataGridHead.js +5 -5
- package/DataGrid/DataGridHead/index.d.ts +0 -1
- package/DataGrid/DataGridHead/index.js +5 -2
- package/DataGrid/DataGridHeadColumn/DataGridHeadColumn.d.ts +13 -3
- package/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +12 -7
- package/DataGrid/DataGridHeadColumn/index.d.ts +0 -1
- package/DataGrid/DataGridHeadColumn/index.js +5 -2
- package/DataGrid/DataGridHeadColumn/styled.d.ts +3 -3
- package/DataGrid/DataGridHeadColumn/styled.js +3 -3
- package/DataGrid/DataGridLoader/DataGridLoader.d.ts +3 -1
- package/DataGrid/DataGridLoader/DataGridLoader.js +1 -1
- package/DataGrid/DataGridLoader/index.d.ts +0 -1
- package/DataGrid/DataGridLoader/index.js +5 -2
- package/DataGrid/DataGridLoader/styled.d.ts +3 -3
- package/DataGrid/index.js +5 -1
- package/DataGrid/styled.d.ts +1 -1
- package/DataGrid/types.d.ts +48 -23
- package/DataGridPagination/DataGridPagination.js +1 -1
- package/DataGridPagination/index.js +5 -1
- package/DataGridPagination/styled.d.ts +1 -1
- package/DatePicker/DatePicker.js +3 -3
- package/DatePicker/DatePickerDay/DatePickerDay.js +1 -1
- package/DatePicker/DatePickerDay/styled.d.ts +1 -1
- package/DatePicker/DatePickerHeader/DatePickerHeader.js +1 -1
- package/DatePicker/DatePickerHeader/styled.d.ts +1 -1
- package/DatePicker/index.js +5 -1
- package/DatePickerProvider/DatePickerProvider.js +1 -1
- package/DatePickerProvider/index.js +5 -1
- package/Dialog/Dialog.js +3 -2
- package/Dialog/index.js +5 -1
- package/DialogActions/DialogActions.js +1 -1
- package/DialogActions/index.js +5 -1
- package/DialogContent/index.js +5 -1
- package/DialogContentText/index.js +5 -1
- package/DialogTitle/DialogTitle.js +6 -3
- package/DialogTitle/index.js +5 -1
- package/Divider/index.js +5 -1
- package/DropdownButton/DropdownButton.d.ts +1 -1
- package/DropdownButton/DropdownButton.js +1 -1
- package/DropdownButton/index.js +5 -1
- package/DropdownButton/styles.d.ts +1 -1
- package/FormControlLabel/FormControlLabel.js +1 -1
- package/FormControlLabel/index.js +5 -1
- package/FormHelperText/FormHelperText.js +3 -3
- package/FormHelperText/index.js +5 -1
- package/FormHelperText/styled.d.ts +2 -6
- package/GlobalStyles/GlobalStyles.js +2 -2
- package/GlobalStyles/index.js +5 -1
- package/Grid/Grid.js +1 -1
- package/Grid/index.js +5 -1
- package/Grid/styled.d.ts +2 -2
- package/IconButton/IconButton.d.ts +1 -1
- package/IconButton/IconButton.js +1 -1
- package/IconButton/index.js +5 -1
- package/IconButton/styled.d.ts +1 -1
- package/IconButton/styled.js +2 -1
- package/IconDropdownButton/IconDropdownButton.d.ts +1 -1
- package/IconDropdownButton/IconDropdownButton.js +1 -1
- package/IconDropdownButton/index.js +5 -1
- package/List/List.js +1 -1
- package/List/index.js +5 -1
- package/List/styled.d.ts +2 -2
- package/ListItem/ListItem.js +1 -1
- package/ListItem/index.js +5 -1
- package/ListItem/styled.d.ts +6 -6
- package/ListItem/styled.js +8 -4
- package/ListItemAvatar/index.js +5 -1
- package/ListItemButton/ListItemButton.js +1 -1
- package/ListItemButton/index.js +5 -1
- package/ListItemButton/styled.d.ts +2 -2
- package/ListItemButton/styled.js +6 -3
- package/ListItemIcon/ListItemIcon.js +1 -1
- package/ListItemIcon/index.js +5 -1
- package/ListItemSecondaryAction/index.js +5 -1
- package/ListItemText/ListItemText.js +1 -1
- package/ListItemText/index.js +5 -1
- package/ListProvider/index.js +5 -1
- package/ListSubheader/index.js +5 -1
- package/LocalizationProvider/LocalizationProvider.js +1 -1
- package/LocalizationProvider/index.js +5 -1
- package/MaskField/MaskField.js +2 -2
- package/MaskField/index.js +5 -1
- package/Menu/index.js +5 -1
- package/MenuGroup/MenuGroup.js +1 -1
- package/MenuGroup/index.js +5 -1
- package/MenuGroup/stories/Icons.js +7 -7
- package/MenuGroup/stories/styled.d.ts +3 -3
- package/MenuGroup/styled.d.ts +1 -1
- package/MenuItem/MenuItem.js +1 -1
- package/MenuItem/index.js +5 -1
- package/MenuItem/styled.d.ts +2 -2
- package/MenuList/MenuList.js +1 -1
- package/MenuList/index.js +5 -1
- package/MenuList/styled.d.ts +2 -2
- package/Notification/NotificationContainer/NotificationContainer.js +1 -1
- package/Notification/NotificationContainer/index.js +5 -1
- package/Notification/NotificationTemplate/NotificationTemplate.js +3 -3
- package/Notification/NotificationTemplate/index.js +5 -1
- package/Notification/NotificationTemplate/styled.d.ts +3 -5
- package/Notification/NotificationTemplate/utils/getActionsDirection/index.js +5 -1
- package/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +2 -1
- package/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/index.js +5 -1
- package/Notification/NotificationTemplate/utils/index.js +5 -1
- package/Notification/constants/index.js +5 -1
- package/Notification/constants/notificationVariant.js +4 -4
- package/Notification/index.js +5 -1
- package/Notification/styled.d.ts +4 -12
- package/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.d.ts +1 -0
- package/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +4 -4
- package/Notification/utils/getNotificationIconByVariant/index.js +5 -1
- package/Notification/utils/index.js +5 -1
- package/Notification/utils/notificationTemplatePropsCreator/index.js +5 -1
- package/Pagination/Pagination.js +1 -1
- package/Pagination/index.js +5 -1
- package/Placeholder/Placeholder.js +1 -1
- package/Placeholder/index.js +5 -1
- package/Placeholder/styled.d.ts +2 -2
- package/Product/Product.d.ts +1 -1
- package/Product/Product.js +1 -1
- package/Product/index.js +5 -1
- package/Profile/Profile.js +1 -1
- package/Profile/index.js +5 -1
- package/Profile/styled.d.ts +2 -4
- package/Radio/Icon.js +2 -2
- package/Radio/Radio.d.ts +1 -1
- package/Radio/Radio.js +2 -2
- package/Radio/index.js +5 -1
- package/RadioGroup/index.js +5 -1
- package/Select/Select.js +2 -2
- package/Select/index.js +5 -1
- package/Select/styled.d.ts +2 -2
- package/SideDialog/SideDialog.js +1 -1
- package/SideDialog/index.js +5 -1
- package/SideDialogActions/index.js +5 -1
- package/SideDialogContent/index.js +5 -1
- package/SideDialogContentText/index.js +5 -1
- package/SideDialogTitle/index.js +5 -1
- package/Table/Table.js +1 -1
- package/Table/TableBody/index.js +5 -1
- package/Table/TableCell/index.js +5 -1
- package/Table/TableContainer/index.js +5 -1
- package/Table/TableFooter/index.js +5 -1
- package/Table/TableHead/index.js +5 -1
- package/Table/TableRow/index.js +5 -1
- package/Table/TableSortLabel/index.js +5 -1
- package/Table/index.js +5 -1
- package/Tag/Tag.js +1 -1
- package/Tag/index.js +5 -1
- package/Tag/styled.d.ts +3 -3
- package/Tag/styled.js +6 -3
- package/TextArea/TextArea.d.ts +1 -1
- package/TextArea/TextArea.js +1 -1
- package/TextArea/index.js +5 -1
- package/TextField/TextField.d.ts +1 -1
- package/TextField/TextField.js +6 -5
- package/TextField/index.js +5 -1
- package/ThemeProvider/ThemeProvider.js +1 -1
- package/ThemeProvider/index.js +5 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +1 -1
- package/Tooltip/index.js +5 -1
- package/Tooltip/styled.js +1 -1
- package/Typography/index.js +5 -1
- package/esm/ActionCell/ActionCell.js +7 -6
- package/esm/Autocomplete/Autocomplete.js +4 -4
- package/esm/Badge/Badge.js +1 -1
- package/esm/Badge/styled.d.ts +3 -3
- package/esm/Badge/styled.js +24 -12
- package/esm/Button/Button.d.ts +1 -1
- package/esm/Button/Button.js +3 -2
- package/esm/ButtonBase/ButtonBase.d.ts +1 -1
- package/esm/ButtonBase/ButtonBase.js +1 -1
- package/esm/ButtonBase/styled.js +4 -2
- package/esm/Checkbox/Checkbox.js +2 -2
- package/esm/Checkbox/icons.js +3 -3
- package/esm/CircularProgress/CircularProgress.d.ts +1 -1
- package/esm/CircularProgress/CircularProgress.js +1 -1
- package/esm/CircularProgress/CircularProgressStory.js +1 -1
- package/esm/CircularProgress/CircularProgressStoryTemplate.js +1 -1
- package/esm/ContentState/ContentState.js +11 -9
- package/esm/ContentState/styles.d.ts +5 -0
- package/esm/ContentState/styles.js +7 -0
- package/esm/DashboardLayout/DashboardLayout.js +1 -1
- package/esm/DashboardLayout/DashboardLayoutStory.js +1 -1
- package/esm/DashboardLayout/DashboardLayoutStoryTemplate.js +1 -1
- package/esm/DashboardLayout/Header/Header.js +1 -1
- package/esm/DashboardLayout/Main/Main.js +1 -1
- package/esm/DashboardLayout/Sidebar/Sidebar.js +1 -1
- package/esm/DashboardLayout/Sidebar/styled.d.ts +1 -1
- package/esm/DataGrid/DataGrid.d.ts +73 -3
- package/esm/DataGrid/DataGrid.js +7 -5
- package/esm/DataGrid/DataGridBody/DataGridBody.d.ts +14 -3
- package/esm/DataGrid/DataGridBody/DataGridBody.js +10 -5
- package/esm/DataGrid/DataGridBody/styled.d.ts +1 -1
- package/esm/DataGrid/DataGridCell/DataGridCell.d.ts +8 -3
- package/esm/DataGrid/DataGridCell/DataGridCell.js +8 -5
- package/esm/DataGrid/DataGridHead/DataGridHead.d.ts +12 -3
- package/esm/DataGrid/DataGridHead/DataGridHead.js +5 -5
- package/esm/DataGrid/DataGridHead/index.d.ts +0 -1
- package/esm/DataGrid/DataGridHead/index.js +0 -1
- package/esm/DataGrid/DataGridHeadColumn/DataGridHeadColumn.d.ts +13 -3
- package/esm/DataGrid/DataGridHeadColumn/DataGridHeadColumn.js +12 -7
- package/esm/DataGrid/DataGridHeadColumn/index.d.ts +0 -1
- package/esm/DataGrid/DataGridHeadColumn/index.js +0 -1
- package/esm/DataGrid/DataGridHeadColumn/styled.d.ts +3 -3
- package/esm/DataGrid/DataGridHeadColumn/styled.js +3 -3
- package/esm/DataGrid/DataGridLoader/DataGridLoader.d.ts +3 -1
- package/esm/DataGrid/DataGridLoader/DataGridLoader.js +1 -1
- package/esm/DataGrid/DataGridLoader/index.d.ts +0 -1
- package/esm/DataGrid/DataGridLoader/index.js +0 -1
- package/esm/DataGrid/DataGridLoader/styled.d.ts +3 -3
- package/esm/DataGrid/styled.d.ts +1 -1
- package/esm/DataGrid/types.d.ts +48 -23
- package/esm/DataGridPagination/DataGridPagination.js +1 -1
- package/esm/DataGridPagination/styled.d.ts +1 -1
- package/esm/DatePicker/DatePicker.js +3 -3
- package/esm/DatePicker/DatePickerDay/DatePickerDay.js +1 -1
- package/esm/DatePicker/DatePickerDay/styled.d.ts +1 -1
- package/esm/DatePicker/DatePickerHeader/DatePickerHeader.js +1 -1
- package/esm/DatePicker/DatePickerHeader/styled.d.ts +1 -1
- package/esm/DatePickerProvider/DatePickerProvider.js +1 -1
- package/esm/Dialog/Dialog.js +3 -2
- package/esm/DialogActions/DialogActions.js +1 -1
- package/esm/DialogTitle/DialogTitle.js +6 -3
- package/esm/DropdownButton/DropdownButton.d.ts +1 -1
- package/esm/DropdownButton/DropdownButton.js +1 -1
- package/esm/DropdownButton/styles.d.ts +1 -1
- package/esm/FormControlLabel/FormControlLabel.js +1 -1
- package/esm/FormHelperText/FormHelperText.js +5 -5
- package/esm/FormHelperText/styled.d.ts +2 -6
- package/esm/GlobalStyles/GlobalStyles.js +2 -2
- package/esm/Grid/Grid.js +1 -1
- package/esm/Grid/styled.d.ts +2 -2
- package/esm/IconButton/IconButton.d.ts +1 -1
- package/esm/IconButton/IconButton.js +1 -1
- package/esm/IconButton/styled.d.ts +1 -1
- package/esm/IconButton/styled.js +2 -1
- package/esm/IconDropdownButton/IconDropdownButton.d.ts +1 -1
- package/esm/IconDropdownButton/IconDropdownButton.js +1 -1
- package/esm/List/List.js +1 -1
- package/esm/List/styled.d.ts +2 -2
- package/esm/ListItem/ListItem.js +1 -1
- package/esm/ListItem/styled.d.ts +6 -6
- package/esm/ListItem/styled.js +8 -4
- package/esm/ListItemButton/ListItemButton.js +1 -1
- package/esm/ListItemButton/styled.d.ts +2 -2
- package/esm/ListItemButton/styled.js +6 -3
- package/esm/ListItemIcon/ListItemIcon.js +1 -1
- package/esm/ListItemText/ListItemText.js +1 -1
- package/esm/LocalizationProvider/LocalizationProvider.js +1 -1
- package/esm/MaskField/MaskField.js +2 -2
- package/esm/MenuGroup/MenuGroup.js +1 -1
- package/esm/MenuGroup/stories/Icons.js +7 -7
- package/esm/MenuGroup/stories/styled.d.ts +3 -3
- package/esm/MenuGroup/styled.d.ts +1 -1
- package/esm/MenuItem/MenuItem.js +1 -1
- package/esm/MenuItem/styled.d.ts +2 -2
- package/esm/MenuList/MenuList.js +1 -1
- package/esm/MenuList/styled.d.ts +2 -2
- package/esm/Notification/NotificationContainer/NotificationContainer.js +1 -1
- package/esm/Notification/NotificationTemplate/NotificationTemplate.js +3 -3
- package/esm/Notification/NotificationTemplate/styled.d.ts +3 -5
- package/esm/Notification/NotificationTemplate/utils/getNotificationTemplateStyles/getNotificationTemplateStyles.js +2 -1
- package/esm/Notification/constants/notificationVariant.js +4 -4
- package/esm/Notification/styled.d.ts +4 -12
- package/esm/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.d.ts +1 -0
- package/esm/Notification/utils/getNotificationIconByVariant/getNotificationIconByVariant.js +4 -4
- package/esm/Pagination/Pagination.js +1 -1
- package/esm/Placeholder/Placeholder.js +1 -1
- package/esm/Placeholder/styled.d.ts +2 -2
- package/esm/Product/Product.d.ts +1 -1
- package/esm/Product/Product.js +1 -1
- package/esm/Profile/Profile.js +3 -3
- package/esm/Profile/styled.d.ts +2 -4
- package/esm/Radio/Icon.js +2 -2
- package/esm/Radio/Radio.d.ts +1 -1
- package/esm/Radio/Radio.js +2 -2
- package/esm/Select/Select.js +2 -2
- package/esm/Select/styled.d.ts +2 -2
- package/esm/SideDialog/SideDialog.js +1 -1
- package/esm/Table/Table.js +1 -1
- package/esm/Tag/Tag.js +1 -1
- package/esm/Tag/styled.d.ts +3 -3
- package/esm/Tag/styled.js +6 -3
- package/esm/TextArea/TextArea.d.ts +1 -1
- package/esm/TextArea/TextArea.js +1 -1
- package/esm/TextField/TextField.d.ts +1 -1
- package/esm/TextField/TextField.js +8 -7
- package/esm/ThemeProvider/ThemeProvider.js +1 -1
- package/esm/Tooltip/Tooltip.d.ts +1 -1
- package/esm/Tooltip/Tooltip.js +1 -1
- package/esm/Tooltip/styled.js +1 -1
- package/esm/hooks/useMenu.js +2 -1
- package/esm/theme/components/MuiOutlinedInput.js +1 -2
- package/esm/theme/components/MuiTableRow.d.ts +3 -0
- package/esm/theme/components/MuiTableRow.js +13 -0
- package/esm/theme/components/components.js +2 -6
- package/esm/theme/palette/palette.js +1 -1
- package/hooks/index.js +5 -1
- package/hooks/useMenu.js +2 -1
- package/index.js +5 -1
- package/package.json +7 -7
- package/server/index.js +5 -1
- package/theme/components/MuiOutlinedInput.js +1 -2
- package/theme/components/MuiTableRow.d.ts +3 -0
- package/theme/components/{MuiYearPicker.js → MuiTableRow.js} +5 -5
- package/theme/components/components.js +2 -6
- package/theme/components/index.js +5 -1
- package/theme/hooks/index.js +5 -1
- package/theme/index.js +5 -1
- package/theme/palette/index.js +5 -1
- package/theme/palette/palette.js +1 -1
- package/DataGrid/DataGridBody/types.d.ts +0 -11
- package/DataGrid/DataGridBody/types.js +0 -2
- package/DataGrid/DataGridCell/types.d.ts +0 -5
- package/DataGrid/DataGridCell/types.js +0 -2
- package/DataGrid/DataGridHead/types.d.ts +0 -11
- package/DataGrid/DataGridHead/types.js +0 -2
- package/DataGrid/DataGridHeadColumn/types.d.ts +0 -11
- package/DataGrid/DataGridHeadColumn/types.js +0 -2
- package/DataGrid/DataGridLoader/types.d.ts +0 -3
- package/DataGrid/DataGridLoader/types.js +0 -2
- package/esm/DataGrid/DataGridBody/types.d.ts +0 -11
- package/esm/DataGrid/DataGridBody/types.js +0 -1
- package/esm/DataGrid/DataGridCell/types.d.ts +0 -5
- package/esm/DataGrid/DataGridCell/types.js +0 -1
- package/esm/DataGrid/DataGridHead/types.d.ts +0 -11
- package/esm/DataGrid/DataGridHead/types.js +0 -1
- package/esm/DataGrid/DataGridHeadColumn/types.d.ts +0 -11
- package/esm/DataGrid/DataGridHeadColumn/types.js +0 -1
- package/esm/DataGrid/DataGridLoader/types.d.ts +0 -3
- package/esm/DataGrid/DataGridLoader/types.js +0 -1
- package/esm/theme/components/MuiCalendarPicker.d.ts +0 -2
- package/esm/theme/components/MuiCalendarPicker.js +0 -16
- package/esm/theme/components/MuiPickersDay.d.ts +0 -2
- package/esm/theme/components/MuiPickersDay.js +0 -46
- package/esm/theme/components/MuiYearPicker.d.ts +0 -2
- package/esm/theme/components/MuiYearPicker.js +0 -13
- package/theme/components/MuiCalendarPicker.d.ts +0 -2
- package/theme/components/MuiCalendarPicker.js +0 -19
- package/theme/components/MuiPickersDay.d.ts +0 -2
- package/theme/components/MuiPickersDay.js +0 -49
- package/theme/components/MuiYearPicker.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TableCellProps } from '@mui/material';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
3
|
export declare const StyledTableSortLabel: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
active?: boolean | undefined;
|
|
5
5
|
children?: import("react").ReactNode;
|
|
@@ -26,7 +26,7 @@ export declare const StyledTableSortLabel: import("@emotion/styled").StyledCompo
|
|
|
26
26
|
tabIndex?: number | undefined;
|
|
27
27
|
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
28
28
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
29
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "
|
|
29
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
30
30
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
31
31
|
}, "disabled" | "active" | "onFocusVisible" | "tabIndex" | "action" | "children" | "direction" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "hideSortIcon" | "IconComponent"> & {
|
|
32
32
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -34,5 +34,5 @@ export declare const StyledTableSortLabel: import("@emotion/styled").StyledCompo
|
|
|
34
34
|
export declare const StyledTableCell: import("@emotion/styled").StyledComponent<TableCellProps & {
|
|
35
35
|
theme?: import("@emotion/react").Theme | undefined;
|
|
36
36
|
} & {
|
|
37
|
-
|
|
37
|
+
width?: CSSProperties['width'];
|
|
38
38
|
}, {}, {}>;
|
|
@@ -9,9 +9,9 @@ export var StyledTableSortLabel = styled(TableSortLabel)(templateObject_1 || (te
|
|
|
9
9
|
return hideSortIcon && 'hidden';
|
|
10
10
|
});
|
|
11
11
|
export var StyledTableCell = styled(TableCell, {
|
|
12
|
-
shouldForwardProp: function (prop) { return prop !== '
|
|
12
|
+
shouldForwardProp: function (prop) { return prop !== 'width'; },
|
|
13
13
|
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", ";\n\n cursor: pointer;\n\n user-select: none;\n"], ["\n width: ", ";\n\n cursor: pointer;\n\n user-select: none;\n"])), function (_a) {
|
|
14
|
-
var
|
|
15
|
-
return
|
|
14
|
+
var _b = _a.width, width = _b === void 0 ? 'auto' : _b;
|
|
15
|
+
return width;
|
|
16
16
|
});
|
|
17
17
|
var templateObject_1, templateObject_2;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
export declare type DataGridLoaderProps = {
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
};
|
|
3
5
|
declare const DataGridLoader: ({ loading }: DataGridLoaderProps) => JSX.Element;
|
|
4
6
|
export default DataGridLoader;
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Backdrop, LoaderWrapper, StyledDivider, StyledLinearProgress, } from './styled';
|
|
3
3
|
var DataGridLoader = function (_a) {
|
|
4
4
|
var _b = _a.loading, loading = _b === void 0 ? false : _b;
|
|
5
|
-
return (_jsxs(LoaderWrapper, { children: [loading && _jsx(Backdrop, {}
|
|
5
|
+
return (_jsxs(LoaderWrapper, { children: [loading && _jsx(Backdrop, {}), loading ? _jsx(StyledLinearProgress, {}) : _jsx(StyledDivider, {})] }));
|
|
6
6
|
};
|
|
7
7
|
export default DataGridLoader;
|
|
@@ -12,10 +12,10 @@ export declare const StyledDivider: import("@emotion/styled").StyledComponent<{
|
|
|
12
12
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
13
13
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
14
14
|
textAlign?: "left" | "right" | "center" | undefined;
|
|
15
|
-
variant?: "inset" | "
|
|
16
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "
|
|
15
|
+
variant?: "inset" | "fullWidth" | "middle" | undefined;
|
|
16
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLHRElement>> & {
|
|
17
17
|
ref?: ((instance: HTMLHRElement | null) => void) | import("react").RefObject<HTMLHRElement> | null | undefined;
|
|
18
|
-
}, "light" | "children" | "
|
|
18
|
+
}, "light" | "children" | "variant" | "textAlign" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "absolute" | "orientation" | "flexItem"> & {
|
|
19
19
|
theme?: import("@emotion/react").Theme | undefined;
|
|
20
20
|
}, {}, {}>;
|
|
21
21
|
export declare const LoaderWrapper: import("@emotion/styled").StyledComponent<{
|
package/esm/DataGrid/styled.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const StyledTableContainer: import("@emotion/styled").StyledCompo
|
|
|
7
7
|
children?: import("react").ReactNode;
|
|
8
8
|
classes?: Partial<import("@mui/material").TableContainerClasses> | undefined;
|
|
9
9
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
10
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
10
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
11
11
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
12
|
}, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx"> & {
|
|
13
13
|
theme?: import("@emotion/react").Theme | undefined;
|
package/esm/DataGrid/types.d.ts
CHANGED
|
@@ -1,32 +1,57 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { TableCellProps } from '@mui/material';
|
|
2
3
|
import { SortStates } from './constants';
|
|
3
|
-
export declare type CellValue = string | number | boolean | Date |
|
|
4
|
+
export declare type CellValue = string | number | boolean | Date | undefined | object;
|
|
4
5
|
export declare type SortState = `${SortStates}`;
|
|
5
|
-
export declare type RenderCell<
|
|
6
|
+
export declare type RenderCell<Data> = (params: Data) => ReactNode;
|
|
6
7
|
export declare type DataGridRow = Record<string, any>;
|
|
7
|
-
export declare type DataGridSort<
|
|
8
|
-
|
|
8
|
+
export declare type DataGridSort<SortField> = {
|
|
9
|
+
/**
|
|
10
|
+
* @example {fieldId: 'test'}
|
|
11
|
+
* Значение поля сортируемой колонки
|
|
12
|
+
*/
|
|
13
|
+
fieldId: SortField;
|
|
14
|
+
/**
|
|
15
|
+
* @example {sort: 'asc'}
|
|
16
|
+
* Значение возрастающий или убывающий сортировки (asc | desc)
|
|
17
|
+
*/
|
|
9
18
|
sort: SortState;
|
|
10
19
|
};
|
|
11
|
-
export declare type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
loading?: boolean;
|
|
22
|
-
minDisplayRows?: number;
|
|
23
|
-
};
|
|
24
|
-
export declare type DataGridColumns<Column extends {}> = {
|
|
25
|
-
field: keyof Column & string;
|
|
20
|
+
export declare type DataGridColumns<Data extends {}> = {
|
|
21
|
+
/**
|
|
22
|
+
* @example {field: 'test'}
|
|
23
|
+
* Значение ключа поля данных для колонки
|
|
24
|
+
*/
|
|
25
|
+
field?: keyof Data;
|
|
26
|
+
/**
|
|
27
|
+
* @example {label: 'Тестовая колонка'}
|
|
28
|
+
* Название колонки таблицы
|
|
29
|
+
*/
|
|
26
30
|
label?: string;
|
|
31
|
+
/**
|
|
32
|
+
* @example {sortable: 'true'}
|
|
33
|
+
* Флажок включающий сортировку колонки
|
|
34
|
+
*/
|
|
27
35
|
sortable?: boolean;
|
|
28
36
|
pointer?: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
/**
|
|
38
|
+
* @example {renderCell: (row) => <div>Hello Cell</div>'}
|
|
39
|
+
* Кастомное отображение ячеек для колонки
|
|
40
|
+
*/
|
|
41
|
+
renderCell?: RenderCell<Data>;
|
|
42
|
+
/**
|
|
43
|
+
* @example {format: (row) => new Date(row.createDate).toLocaleDateString()}
|
|
44
|
+
* Функция для кастомного форматирования данных ячеек для колонки
|
|
45
|
+
*/
|
|
46
|
+
format?: (data: Data) => CellValue;
|
|
47
|
+
/**
|
|
48
|
+
* @example {align: 'left'}
|
|
49
|
+
* CSS свойство размещения контента в ячейке
|
|
50
|
+
*/
|
|
51
|
+
align?: TableCellProps['align'];
|
|
52
|
+
/**
|
|
53
|
+
* @example {width: '100%'}
|
|
54
|
+
* CSS свойство ширины ячейки
|
|
55
|
+
*/
|
|
56
|
+
width?: CSSProperties['width'];
|
|
32
57
|
};
|
|
@@ -30,5 +30,5 @@ export var DataGridPagination = function (_a) {
|
|
|
30
30
|
var rangeStart = useMemo(function () { return page * rowsPerPage; }, [page]);
|
|
31
31
|
var rangeEnd = useMemo(function () { return page * rowsPerPage + rowsPerPage; }, [page]);
|
|
32
32
|
var formattedRange = "".concat(rangeStart, " \u2014 ").concat(rangeEnd, " \u0438\u0437 ").concat(totalCount, " \u0437\u0430\u043F\u0438\u0441\u0435\u0439");
|
|
33
|
-
return (_jsxs(PaginationWrapper, __assign({ className: className }, { children: [_jsx(Range, __assign({ variant: "h6" }, { children: formattedRange })
|
|
33
|
+
return (_jsxs(PaginationWrapper, __assign({ className: className }, { children: [_jsx(Range, __assign({ variant: "h6" }, { children: formattedRange })), _jsx(Pagination, __assign({ count: count }, props))] })));
|
|
34
34
|
};
|
|
@@ -13,7 +13,7 @@ export declare const Range: import("@emotion/styled").StyledComponent<import("@m
|
|
|
13
13
|
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
14
14
|
variant?: "inherit" | "small" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "caption" | "button" | "overline" | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | "div" | undefined;
|
|
15
15
|
variantMapping?: Partial<Record<"inherit" | "small" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "caption" | "button" | "overline" | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | "div", string>> | undefined;
|
|
16
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "
|
|
16
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
17
17
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
18
18
|
}, "children" | "variant" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | ("fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint") | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
19
19
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -54,14 +54,14 @@ export var DatePicker = forwardRef(function (props, ref) {
|
|
|
54
54
|
onChange(date, e);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
return (_jsx(DatePickerWrapper, { children: _jsx(ReactDatePicker, __assign({}, restProps, { locale: locale, selected: value, openToDate: value !== null && value !== void 0 ? value : undefined, dateFormat: dateFormat, placeholderText: placeholder, onChange: onChange, onChangeRaw: handleChangeRaw, renderCustomHeader: function (renderProps) { return (_jsx(DatePickerHeader, __assign({}, renderProps)
|
|
58
|
-
endAdornment: (_jsx(InputAdornment, __assign({ position: "end" }, { children: _jsx(CalendarOutlineMd, {}
|
|
57
|
+
return (_jsx(DatePickerWrapper, { children: _jsx(ReactDatePicker, __assign({}, restProps, { locale: locale, selected: value, openToDate: value !== null && value !== void 0 ? value : undefined, dateFormat: dateFormat, placeholderText: placeholder, onChange: onChange, onChangeRaw: handleChangeRaw, renderCustomHeader: function (renderProps) { return (_jsx(DatePickerHeader, __assign({}, renderProps))); }, renderDayContents: function (dayOfMonth) { return (_jsx(DatePickerDay, { dayOfMonth: dayOfMonth })); }, customInput: _jsx(MaskField, __assign({}, restInputProps, { mask: Date, autofix: "pad", onAccept: handleMaskFieldAccept, InputProps: {
|
|
58
|
+
endAdornment: (_jsx(InputAdornment, __assign({ position: "end" }, { children: _jsx(CalendarOutlineMd, {}) }))),
|
|
59
59
|
}, inputRef: function (el) {
|
|
60
60
|
// если передан ref - пишем в ref.current элемент из MaskField (inputRef принимает только функцию)
|
|
61
61
|
if (ref) {
|
|
62
62
|
ref.current =
|
|
63
63
|
el;
|
|
64
64
|
}
|
|
65
|
-
} })
|
|
65
|
+
} })) })) }));
|
|
66
66
|
});
|
|
67
67
|
export default DatePicker;
|
|
@@ -12,5 +12,5 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { DatePickerDayButton } from './styled';
|
|
14
14
|
export var DatePickerDay = function (props) {
|
|
15
|
-
return (_jsx(DatePickerDayButton, __assign({ variant: "text" }, { children: props.dayOfMonth })
|
|
15
|
+
return (_jsx(DatePickerDayButton, __assign({ variant: "text" }, { children: props.dayOfMonth })));
|
|
16
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const DatePickerDayButton: import("@emotion/styled").StyledComponent<Pick<import("../../Button").ButtonProps, "disabled" | "
|
|
2
|
+
export declare const DatePickerDayButton: import("@emotion/styled").StyledComponent<Pick<import("../../Button").ButtonProps, "disabled" | "href" | "onFocusVisible" | "tabIndex" | "type" | "action" | "children" | "form" | "slot" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "component" | "selected" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon" | "loading" | "loadingIndicator" | "loadingPosition"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
}, {}, {}>;
|
|
@@ -20,5 +20,5 @@ export var DatePickerHeader = function (props) {
|
|
|
20
20
|
var increaseMonth = props.increaseMonth, decreaseMonth = props.decreaseMonth, date = props.date;
|
|
21
21
|
var locale = useContext(DatePickerContext).locale;
|
|
22
22
|
var localizedDate = useMemo(function () { return format(date, 'LLLL yyy', { locale: locale }); }, [date]);
|
|
23
|
-
return (_jsxs(DatePickerHeaderWrapper, { children: [_jsx(IconButton, __assign({ variant: "text", onClick: decreaseMonth }, { children: _jsx(PreviousOutlineMd, {}
|
|
23
|
+
return (_jsxs(DatePickerHeaderWrapper, { children: [_jsx(IconButton, __assign({ variant: "text", onClick: decreaseMonth }, { children: _jsx(PreviousOutlineMd, {}) })), _jsx(DatePickerHeaderTitle, __assign({ variant: "h6" }, { children: localizedDate })), _jsx(IconButton, __assign({ variant: "text", onClick: increaseMonth }, { children: _jsx(NextOutlineMd, {}) }))] }));
|
|
24
24
|
};
|
|
@@ -13,7 +13,7 @@ export declare const DatePickerHeaderTitle: import("@emotion/styled").StyledComp
|
|
|
13
13
|
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
14
14
|
variant?: "inherit" | "small" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "caption" | "button" | "overline" | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | "div" | undefined;
|
|
15
15
|
variantMapping?: Partial<Record<"inherit" | "small" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "caption" | "button" | "overline" | "h7" | "h8" | "h9" | "ui" | "link" | "pointer" | "code" | "div", string>> | undefined;
|
|
16
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "
|
|
16
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | "css" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
17
17
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
18
18
|
}, "children" | "variant" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | ("fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint") | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
19
19
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -15,5 +15,5 @@ import ru from 'date-fns/locale/ru';
|
|
|
15
15
|
export var DatePickerContext = createContext({ locale: ru });
|
|
16
16
|
export var DatePickerProvider = function (props) {
|
|
17
17
|
var children = props.children, _a = props.locale, locale = _a === void 0 ? ru : _a;
|
|
18
|
-
return (_jsx(DatePickerContext.Provider, __assign({ value: { locale: locale } }, { children: children })
|
|
18
|
+
return (_jsx(DatePickerContext.Provider, __assign({ value: { locale: locale } }, { children: children })));
|
|
19
19
|
};
|
package/esm/Dialog/Dialog.js
CHANGED
|
@@ -27,9 +27,10 @@ export var Dialog = function (_a) {
|
|
|
27
27
|
var children = _a.children, title = _a.title, disableBackdropClick = _a.disableBackdropClick, onClose = _a.onClose, props = __rest(_a, ["children", "title", "disableBackdropClick", "onClose"]);
|
|
28
28
|
var handleClose = onClose &&
|
|
29
29
|
(function (event, reason) {
|
|
30
|
-
if (disableBackdropClick && reason == 'backdropClick')
|
|
30
|
+
if (disableBackdropClick && reason == 'backdropClick') {
|
|
31
31
|
return;
|
|
32
|
+
}
|
|
32
33
|
onClose(event, reason);
|
|
33
34
|
});
|
|
34
|
-
return (_jsxs(MuiDialog, __assign({ onClose: handleClose }, props, { children: [title && _jsx(DialogTitle, __assign({ onClose: onClose }, { children: title })
|
|
35
|
+
return (_jsxs(MuiDialog, __assign({ onClose: handleClose }, props, { children: [title && _jsx(DialogTitle, __assign({ onClose: onClose }, { children: title })), children] })));
|
|
35
36
|
};
|
|
@@ -25,5 +25,5 @@ import { DialogActions as MuiDialogActions, } from '@mui/material';
|
|
|
25
25
|
import { Grid } from '../Grid';
|
|
26
26
|
export var DialogActions = function (_a) {
|
|
27
27
|
var children = _a.children, disableSpacing = _a.disableSpacing, props = __rest(_a, ["children", "disableSpacing"]);
|
|
28
|
-
return (_jsx(MuiDialogActions, __assign({}, props, { children: _jsx(Grid, __assign({ container: true, autoFlow: "column", justifyContent: "end", spacing: disableSpacing ? 0 : 2 }, { children: children })
|
|
28
|
+
return (_jsx(MuiDialogActions, __assign({}, props, { children: _jsx(Grid, __assign({ container: true, autoFlow: "column", justifyContent: "end", spacing: disableSpacing ? 0 : 2 }, { children: children })) })));
|
|
29
29
|
};
|
|
@@ -23,11 +23,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import { DialogTitle as MuiDialogTitle } from '@mui/material';
|
|
25
25
|
import { CrossOutlineMd } from '@astral/icons';
|
|
26
|
-
import { useCallback } from 'react';
|
|
27
26
|
import { IconButton } from '../IconButton';
|
|
28
27
|
export var DialogTitle = function (_a) {
|
|
29
28
|
// 'escapeKeyDown' в документашке написано что это опциональный тип, и можно стрингу любую туда закидывать, а по факту либо escapeKeyDown либо backdropClick
|
|
30
29
|
var children = _a.children, onClose = _a.onClose, props = __rest(_a, ["children", "onClose"]);
|
|
31
|
-
var onClickTitle =
|
|
32
|
-
|
|
30
|
+
var onClickTitle = function (e) {
|
|
31
|
+
if (onClose) {
|
|
32
|
+
onClose(e, 'escapeKeyDown');
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
return (_jsxs(MuiDialogTitle, __assign({}, props, { children: [children, onClose && (_jsx(IconButton, __assign({ variant: "text", onClick: onClickTitle }, { children: _jsx(CrossOutlineMd, {}) })))] })));
|
|
33
36
|
};
|
|
@@ -6,4 +6,4 @@ export declare type DropdownButtonProps = Omit<ButtonProps, 'endIcon' | 'loading
|
|
|
6
6
|
*/
|
|
7
7
|
name: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const DropdownButton: import("react").ForwardRefExoticComponent<Pick<DropdownButtonProps, "disabled" | "
|
|
9
|
+
export declare const DropdownButton: import("react").ForwardRefExoticComponent<Pick<DropdownButtonProps, "disabled" | "href" | "onFocusVisible" | "tabIndex" | "type" | "action" | "children" | "form" | "slot" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "component" | "selected" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "fullWidth" | "startIcon" | "loadingIndicator" | "loadingPosition"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -30,5 +30,5 @@ import { DropdownButtonWrapper } from './styles';
|
|
|
30
30
|
export var DropdownButton = forwardRef(function (_a, ref) {
|
|
31
31
|
var children = _a.children, name = _a.name, props = __rest(_a, ["children", "name"]);
|
|
32
32
|
var _b = useMenu(), open = _b.open, anchorRef = _b.anchorRef, handleOpenMenu = _b.handleOpenMenu, handleCloseMenu = _b.handleCloseMenu;
|
|
33
|
-
return (_jsxs(_Fragment, { children: [_jsx(ClickAwayListener, __assign({ ref: ref, onClickAway: handleCloseMenu }, { children: _jsx(DropdownButtonWrapper, __assign({}, props, { ref: anchorRef, onClick: handleOpenMenu, selected: open, endIcon: _jsx(ChevronDOutlineMd, {}
|
|
33
|
+
return (_jsxs(_Fragment, { children: [_jsx(ClickAwayListener, __assign({ ref: ref, onClickAway: handleCloseMenu }, { children: _jsx(DropdownButtonWrapper, __assign({}, props, { ref: anchorRef, onClick: handleOpenMenu, selected: open, endIcon: _jsx(ChevronDOutlineMd, {}) }, { children: name })) })), _jsx(Menu, __assign({ open: open, anchorEl: anchorRef.current }, { children: children }))] }));
|
|
34
34
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const DropdownButtonWrapper: import("@emotion/styled").StyledComponent<Pick<import("../Button").ButtonProps, "disabled" | "
|
|
2
|
+
export declare const DropdownButtonWrapper: import("@emotion/styled").StyledComponent<Pick<import("../Button").ButtonProps, "disabled" | "href" | "onFocusVisible" | "tabIndex" | "type" | "action" | "children" | "form" | "slot" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "component" | "selected" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon" | "loading" | "loadingIndicator" | "loadingPosition"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
}, {}, {}>;
|
|
@@ -24,5 +24,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
24
24
|
import { StyledFormControlLabel } from './styled';
|
|
25
25
|
export var FormControlLabel = function (_a) {
|
|
26
26
|
var props = __rest(_a, []);
|
|
27
|
-
return _jsx(StyledFormControlLabel, __assign({}, props)
|
|
27
|
+
return _jsx(StyledFormControlLabel, __assign({}, props));
|
|
28
28
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
3
|
import { Content, ErrorIcon, SuccessIcon } from './styled';
|
|
4
4
|
export var FormHelperText = function (props) {
|
|
5
5
|
var success = props.success, error = props.error, children = props.children;
|
|
6
6
|
var Icon = useMemo(function () {
|
|
7
7
|
if (success) {
|
|
8
|
-
return _jsx(SuccessIcon, {}
|
|
8
|
+
return _jsx(SuccessIcon, {});
|
|
9
9
|
}
|
|
10
10
|
if (error) {
|
|
11
|
-
return _jsx(ErrorIcon, {}
|
|
11
|
+
return _jsx(ErrorIcon, {});
|
|
12
12
|
}
|
|
13
13
|
return null;
|
|
14
14
|
}, [success, error]);
|
|
15
15
|
if (children) {
|
|
16
|
-
return (_jsxs(
|
|
16
|
+
return (_jsxs(_Fragment, { children: [Icon, _jsx(Content, { children: children })] }));
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
};
|