@mezzanine-ui/react 0.6.4 → 0.7.3
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/Accordion/Accordion.js +3 -2
- package/Accordion/AccordionDetails.js +3 -2
- package/Accordion/AccordionSummary.js +3 -2
- package/Alert/Alert.js +3 -2
- package/AppBar/AppBar.js +3 -2
- package/AppBar/AppBarBrand.js +3 -2
- package/AppBar/AppBarMain.js +3 -2
- package/AppBar/AppBarSupport.js +3 -2
- package/Badge/Badge.js +3 -2
- package/Badge/BadgeContainer.js +3 -2
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +3 -2
- package/Button/ButtonGroup.js +3 -2
- package/Button/IconButton.js +3 -2
- package/Button/index.js +2 -2
- package/Calendar/Calendar.js +3 -2
- package/Calendar/CalendarCell.js +1 -1
- package/Calendar/CalendarContext.js +1 -2
- package/Calendar/CalendarControls.js +1 -1
- package/Calendar/CalendarDayOfWeek.js +1 -1
- package/Calendar/CalendarDays.js +1 -1
- package/Calendar/CalendarMonths.js +1 -1
- package/Calendar/CalendarWeeks.js +1 -1
- package/Calendar/CalendarYears.js +1 -1
- package/Card/Card.js +3 -2
- package/Card/CardActions.js +3 -2
- package/Checkbox/CheckAll.js +3 -2
- package/Checkbox/Checkbox.js +3 -2
- package/Checkbox/CheckboxGroup.js +3 -2
- package/ConfirmActions/ConfirmActions.js +3 -2
- package/DatePicker/DatePicker.js +4 -3
- package/DatePicker/DatePickerCalendar.js +3 -2
- package/DateRangePicker/DateRangePicker.js +4 -3
- package/DateRangePicker/DateRangePickerCalendar.js +3 -2
- package/DateRangePicker/useDateRangePickerValue.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.js +4 -3
- package/DateTimePicker/DateTimePickerPanel.js +3 -2
- package/Drawer/Drawer.d.ts +2 -7
- package/Drawer/Drawer.js +8 -23
- package/Dropdown/Dropdown.js +3 -2
- package/Empty/Empty.js +3 -2
- package/Form/FormField.js +3 -2
- package/Form/FormLabel.js +3 -2
- package/Form/FormMessage.js +3 -2
- package/Icon/Icon.d.ts +4 -0
- package/Icon/Icon.js +6 -4
- package/Input/Input.js +4 -3
- package/Loading/Loading.js +3 -2
- package/Menu/Menu.js +3 -2
- package/Menu/MenuDivider.js +3 -2
- package/Menu/MenuItem.js +3 -2
- package/Menu/MenuItemGroup.js +3 -2
- package/Message/Message.d.ts +8 -5
- package/Message/Message.js +29 -13
- package/Message/index.d.ts +1 -1
- package/Modal/Modal.d.ts +2 -7
- package/Modal/Modal.js +11 -59
- package/Modal/ModalActions.js +3 -2
- package/Modal/ModalBody.js +3 -2
- package/Modal/ModalFooter.js +3 -2
- package/Modal/ModalHeader.js +3 -2
- package/Modal/index.d.ts +1 -0
- package/Modal/index.js +1 -0
- package/Modal/useModalContainer.d.ts +6 -0
- package/Modal/useModalContainer.js +27 -0
- package/Navigation/Navigation.js +3 -2
- package/Navigation/NavigationItem.js +3 -2
- package/Navigation/NavigationSubMenu.js +3 -2
- package/Notification/Notification.js +4 -3
- package/Notifier/NotifierManager.js +1 -1
- package/Overlay/Overlay.js +3 -2
- package/PageFooter/PageFooter.js +3 -2
- package/Pagination/Pagination.js +3 -2
- package/Pagination/PaginationItem.js +3 -2
- package/Pagination/PaginationJumper.js +3 -2
- package/Picker/PickerTrigger.js +3 -2
- package/Picker/RangePickerTrigger.js +3 -2
- package/Picker/usePickerInputValue.js +1 -2
- package/Picker/usePickerValue.d.ts +1 -1
- package/Picker/useRangePickerValue.d.ts +2 -2
- package/Popconfirm/Popconfirm.js +3 -2
- package/Popover/Popover.js +3 -2
- package/Popper/Popper.js +3 -2
- package/Portal/Portal.js +3 -2
- package/Progress/Progress.js +3 -2
- package/Radio/Radio.js +4 -3
- package/Radio/RadioGroup.js +3 -2
- package/Select/AutoComplete.d.ts +1 -1
- package/Select/AutoComplete.js +4 -3
- package/Select/Option.js +3 -2
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +4 -3
- package/Select/SelectTrigger.js +3 -2
- package/Select/TreeSelect.d.ts +1 -1
- package/Select/TreeSelect.js +4 -3
- package/Skeleton/Skeleton.js +3 -2
- package/Slider/Slider.js +20 -3
- package/Slider/useSlider.js +8 -6
- package/Stepper/Step.js +3 -2
- package/Stepper/Stepper.js +3 -2
- package/Switch/Switch.js +4 -3
- package/Table/Table.d.ts +51 -44
- package/Table/Table.js +42 -23
- package/Table/TableBody.js +10 -4
- package/Table/TableBodyRow.js +3 -2
- package/Table/TableCell.js +3 -2
- package/Table/TableHeader.js +3 -2
- package/Table/editable/TableEditRenderWrapper.js +1 -1
- package/Table/expandable/TableExpandable.js +3 -2
- package/Table/pagination/TablePagination.js +13 -14
- package/Table/pagination/useTablePagination.d.ts +5 -13
- package/Table/pagination/useTablePagination.js +3 -23
- package/Table/refresh/TableRefresh.js +3 -2
- package/Table/rowSelection/TableRowSelection.js +3 -2
- package/Table/sorting/TableSortingIcon.js +3 -2
- package/Table/useTableScroll.d.ts +9 -9
- package/Table/useTableScroll.js +1 -1
- package/Tabs/Tab.js +3 -2
- package/Tabs/TabPane.js +3 -2
- package/Tabs/Tabs.js +3 -2
- package/Tabs/useTabsOverflow.js +1 -1
- package/Tag/Tag.js +3 -2
- package/TextField/TextField.js +3 -2
- package/Textarea/Textarea.js +4 -3
- package/TimePanel/TimePanel.js +3 -2
- package/TimePanel/TimePanelAction.js +3 -2
- package/TimePanel/TimePanelColumn.js +3 -2
- package/TimePicker/TimePicker.js +4 -3
- package/TimePicker/TimePickerPanel.js +3 -2
- package/Tooltip/Tooltip.js +3 -2
- package/Transition/Collapse.js +3 -2
- package/Transition/Fade.js +3 -2
- package/Transition/Grow.js +3 -2
- package/Transition/SlideFade.js +3 -2
- package/Transition/Transition.d.ts +1 -1
- package/Transition/Transition.js +1 -1
- package/Transition/Zoom.js +3 -2
- package/Tree/Tree.js +3 -2
- package/Tree/TreeNode.js +3 -2
- package/Tree/TreeNodeList.js +3 -2
- package/Typography/Typography.d.ts +1 -1
- package/Typography/Typography.js +3 -2
- package/Upload/UploadButton.js +3 -2
- package/Upload/UploadInput.js +5 -2
- package/Upload/UploadPicture.d.ts +48 -0
- package/Upload/UploadPicture.js +52 -0
- package/Upload/UploadPictureBlock.d.ts +13 -0
- package/Upload/UploadPictureBlock.js +86 -0
- package/Upload/UploadPictureWall.d.ts +71 -0
- package/Upload/UploadPictureWall.js +156 -0
- package/Upload/UploadPictureWallItem.d.ts +13 -0
- package/Upload/UploadPictureWallItem.js +19 -0
- package/Upload/UploadResult.js +3 -2
- package/Upload/index.d.ts +3 -0
- package/Upload/index.js +3 -0
- package/_internal/InputCheck/InputCheck.js +3 -2
- package/_internal/InputCheck/InputCheckGroup.js +3 -2
- package/_internal/InputTriggerPopper/InputTriggerPopper.js +3 -2
- package/_internal/SlideFadeOverlay/SlideFadeOverlay.d.ts +21 -0
- package/_internal/SlideFadeOverlay/SlideFadeOverlay.js +66 -0
- package/_internal/SlideFadeOverlay/index.d.ts +1 -0
- package/_internal/SlideFadeOverlay/index.js +1 -0
- package/_internal/SlideFadeOverlay/useTopStack.d.ts +1 -0
- package/{Modal/useIsTopModal.js → _internal/SlideFadeOverlay/useTopStack.js} +3 -3
- package/index.d.ts +4 -4
- package/index.js +52 -49
- package/package.json +6 -6
- package/utils/{rename-types.d.ts → general.d.ts} +3 -0
- package/Modal/useIsTopModal.d.ts +0 -1
package/Drawer/Drawer.js
CHANGED
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef,
|
|
2
|
+
import { forwardRef, useMemo } from 'react';
|
|
3
3
|
import { drawerClasses } from '@mezzanine-ui/core/drawer';
|
|
4
|
-
import
|
|
5
|
-
import Overlay from '../Overlay/Overlay.js';
|
|
6
|
-
import SlideFade from '../Transition/SlideFade.js';
|
|
4
|
+
import SlideFadeOverlay from '../_internal/SlideFadeOverlay/SlideFadeOverlay.js';
|
|
7
5
|
import cx from 'clsx';
|
|
8
6
|
|
|
9
7
|
const Drawer = forwardRef((props, ref) => {
|
|
10
8
|
const { className, children, container, disableCloseOnBackdropClick = false, disableCloseOnEscapeKeyDown = false, disablePortal, hideBackdrop, invisibleBackdrop, onBackdropClick, onClose, open, placement = 'left', ...rest } = props;
|
|
11
|
-
const
|
|
12
|
-
useDocumentEscapeKeyDown(() => {
|
|
13
|
-
if (!open || disableCloseOnEscapeKeyDown || !onClose) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
return onClose;
|
|
17
|
-
}, [
|
|
18
|
-
disableCloseOnEscapeKeyDown,
|
|
19
|
-
open,
|
|
20
|
-
onClose,
|
|
21
|
-
]);
|
|
22
|
-
if (!open && exited) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
const slideFadeDirection = {
|
|
9
|
+
const slideFadeDirection = useMemo(() => ({
|
|
26
10
|
top: 'down',
|
|
27
11
|
left: 'right',
|
|
28
12
|
right: 'left',
|
|
29
13
|
bottom: 'up',
|
|
30
|
-
};
|
|
31
|
-
return (jsx(
|
|
32
|
-
});
|
|
14
|
+
}), []);
|
|
15
|
+
return (jsx(SlideFadeOverlay, Object.assign({ className: drawerClasses.overlay, container: container, direction: slideFadeDirection[placement], disableCloseOnBackdropClick: disableCloseOnBackdropClick, disableCloseOnEscapeKeyDown: disableCloseOnEscapeKeyDown, disablePortal: disablePortal, hideBackdrop: hideBackdrop, invisibleBackdrop: invisibleBackdrop, onBackdropClick: onBackdropClick, onClose: onClose, open: open, ref: ref }, { children: jsx("div", Object.assign({}, rest, { className: cx(drawerClasses.host, drawerClasses[placement], className) }, { children: children }), void 0) }), void 0));
|
|
16
|
+
});
|
|
17
|
+
var Drawer$1 = Drawer;
|
|
33
18
|
|
|
34
|
-
export default
|
|
19
|
+
export { Drawer$1 as default };
|
package/Dropdown/Dropdown.js
CHANGED
package/Empty/Empty.js
CHANGED
|
@@ -11,6 +11,7 @@ const Empty = forwardRef(function Empty(props, ref) {
|
|
|
11
11
|
[emptyClasses.fullHeight]: fullHeight,
|
|
12
12
|
}, className) }, { children: [image, title && jsx("div", Object.assign({ className: emptyClasses.title }, { children: title }), void 0),
|
|
13
13
|
children && jsx("div", Object.assign({ className: emptyClasses.description }, { children: children }), void 0)] }), void 0));
|
|
14
|
-
});
|
|
14
|
+
});
|
|
15
|
+
var Empty$1 = Empty;
|
|
15
16
|
|
|
16
|
-
export default
|
|
17
|
+
export { Empty$1 as default };
|
package/Form/FormField.js
CHANGED
|
@@ -19,6 +19,7 @@ const FormField = forwardRef(function FormField(props, ref) {
|
|
|
19
19
|
[formFieldClasses.disabled]: disabled,
|
|
20
20
|
[formFieldClasses.fullWidth]: fullWidth,
|
|
21
21
|
}, className) }, { children: jsx(FormControlContext.Provider, Object.assign({ value: formControl }, { children: children }), void 0) }), void 0));
|
|
22
|
-
});
|
|
22
|
+
});
|
|
23
|
+
var FormField$1 = FormField;
|
|
23
24
|
|
|
24
|
-
export default
|
|
25
|
+
export { FormField$1 as default };
|
package/Form/FormLabel.js
CHANGED
|
@@ -12,6 +12,7 @@ const FormLabel = forwardRef(function FormLabel(props, ref) {
|
|
|
12
12
|
const { required } = useContext(FormControlContext) || {};
|
|
13
13
|
return (jsxs("label", Object.assign({}, rest, { ref: ref, className: cx(formFieldClasses.label, className), htmlFor: htmlFor }, { children: [jsxs("span", { children: [children, required && jsx("span", Object.assign({ className: formFieldClasses.asterisk }, { children: "*" }), void 0)] }, void 0),
|
|
14
14
|
(remark || remarkIcon) && (jsxs("span", Object.assign({ className: formFieldClasses.remark }, { children: [jsx("span", { children: remark }, void 0), remarkIcon] }), void 0))] }), void 0));
|
|
15
|
-
});
|
|
15
|
+
});
|
|
16
|
+
var FormLabel$1 = FormLabel;
|
|
16
17
|
|
|
17
|
-
export default
|
|
18
|
+
export { FormLabel$1 as default };
|
package/Form/FormMessage.js
CHANGED
|
@@ -13,6 +13,7 @@ const FormMessage = forwardRef(function FormMessage(props, ref) {
|
|
|
13
13
|
const { severity } = useContext(FormControlContext) || {};
|
|
14
14
|
const icon = severity ? formMessageIcons[severity] : null;
|
|
15
15
|
return (jsxs("span", Object.assign({}, rest, { ref: ref, className: cx(formFieldClasses.message, className) }, { children: [icon && (jsx(Icon, { className: formFieldClasses.severityIcon, icon: icon }, void 0)), children] }), void 0));
|
|
16
|
-
});
|
|
16
|
+
});
|
|
17
|
+
var FormMessage$1 = FormMessage;
|
|
17
18
|
|
|
18
|
-
export default
|
|
19
|
+
export { FormMessage$1 as default };
|
package/Icon/Icon.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export interface IconProps extends NativeElementPropsWithoutKeyAndRef<'i'> {
|
|
|
11
11
|
* The icon provided by `@mezzanine-ui/icons` package.
|
|
12
12
|
*/
|
|
13
13
|
icon: IconDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* Icon size in px
|
|
16
|
+
*/
|
|
17
|
+
size?: number;
|
|
14
18
|
/**
|
|
15
19
|
* Whether to spin the icon or not.
|
|
16
20
|
* @default false
|
package/Icon/Icon.js
CHANGED
|
@@ -7,9 +7,9 @@ import cx from 'clsx';
|
|
|
7
7
|
* The react component for `mezzanine` icon.
|
|
8
8
|
*/
|
|
9
9
|
const Icon = forwardRef(function Icon(props, ref) {
|
|
10
|
-
const { className, color, icon, spin = false, style: styleProp, ...rest } = props;
|
|
10
|
+
const { className, color, icon, size, spin = false, style: styleProp, ...rest } = props;
|
|
11
11
|
const { definition } = icon;
|
|
12
|
-
const cssVars = toIconCssVars({ color });
|
|
12
|
+
const cssVars = toIconCssVars({ color, size });
|
|
13
13
|
const style = {
|
|
14
14
|
...cssVars,
|
|
15
15
|
...styleProp,
|
|
@@ -17,7 +17,9 @@ const Icon = forwardRef(function Icon(props, ref) {
|
|
|
17
17
|
return (jsx("i", Object.assign({}, rest, { ref: ref, "aria-hidden": true, className: cx(iconClasses.host, {
|
|
18
18
|
[iconClasses.color]: color,
|
|
19
19
|
[iconClasses.spin]: spin,
|
|
20
|
+
[iconClasses.size]: size,
|
|
20
21
|
}, className), "data-icon-name": icon.name, style: style }, { children: jsx("svg", Object.assign({}, definition.svg, { focusable: false }, { children: jsx("path", Object.assign({}, definition.path), void 0) }), void 0) }), void 0));
|
|
21
|
-
});
|
|
22
|
+
});
|
|
23
|
+
var Icon$1 = Icon;
|
|
22
24
|
|
|
23
|
-
export default
|
|
25
|
+
export { Icon$1 as default };
|
package/Input/Input.js
CHANGED
|
@@ -3,8 +3,8 @@ import { forwardRef, useContext, useRef } from 'react';
|
|
|
3
3
|
import { inputClasses } from '@mezzanine-ui/core/input';
|
|
4
4
|
import { useComposeRefs } from '../hooks/useComposeRefs.js';
|
|
5
5
|
import { useInputWithClearControlValue } from '../Form/useInputWithClearControlValue.js';
|
|
6
|
-
import { FormControlContext } from '../Form/FormControlContext.js';
|
|
7
6
|
import TextField from '../TextField/TextField.js';
|
|
7
|
+
import { FormControlContext } from '../Form/FormControlContext.js';
|
|
8
8
|
import cx from 'clsx';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -23,6 +23,7 @@ const Input = forwardRef(function Input(props, ref) {
|
|
|
23
23
|
const composedInputRef = useComposeRefs([inputRefProp, inputRef]);
|
|
24
24
|
const active = !!value;
|
|
25
25
|
return (jsx(TextField, Object.assign({ ref: ref, active: active, className: cx(inputClasses.host, className), clearable: clearable, disabled: disabled, error: error, fullWidth: fullWidth, onClear: onClear, prefix: prefix, size: size, suffix: suffix }, { children: jsx("input", Object.assign({}, inputProps, { ref: composedInputRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onChange, placeholder: placeholder, readOnly: readOnly, required: required, value: value }), void 0) }), void 0));
|
|
26
|
-
});
|
|
26
|
+
});
|
|
27
|
+
var Input$1 = Input;
|
|
27
28
|
|
|
28
|
-
export default
|
|
29
|
+
export { Input$1 as default };
|
package/Loading/Loading.js
CHANGED
|
@@ -23,6 +23,7 @@ const Loading = forwardRef(function Loading(props, ref) {
|
|
|
23
23
|
}, className) }, { children: [jsx(Overlay, Object.assign({}, overlayProps, { container: hostRef, onSurface: true, open: loading }, { children: spinElement }), void 0), children] }), void 0));
|
|
24
24
|
}
|
|
25
25
|
return spinElement;
|
|
26
|
-
});
|
|
26
|
+
});
|
|
27
|
+
var Loading$1 = Loading;
|
|
27
28
|
|
|
28
|
-
export default
|
|
29
|
+
export { Loading$1 as default };
|
package/Menu/Menu.js
CHANGED
|
@@ -17,6 +17,7 @@ const Menu = forwardRef(function Menu(props, ref) {
|
|
|
17
17
|
...styleProp,
|
|
18
18
|
};
|
|
19
19
|
return (jsx("ul", Object.assign({}, rest, { ref: ref, className: cx(menuClasses.host, menuClasses.size(size), className), role: role, style: style }, { children: children }), void 0));
|
|
20
|
-
});
|
|
20
|
+
});
|
|
21
|
+
var Menu$1 = Menu;
|
|
21
22
|
|
|
22
|
-
export default
|
|
23
|
+
export { Menu$1 as default };
|
package/Menu/MenuDivider.js
CHANGED
|
@@ -9,6 +9,7 @@ import cx from 'clsx';
|
|
|
9
9
|
const MenuDivider = forwardRef(function MenuDivider(props, ref) {
|
|
10
10
|
const { className, ...rest } = props;
|
|
11
11
|
return (jsx("hr", Object.assign({}, rest, { ref: ref, className: cx(menuDividerClasses.host, className) }), void 0));
|
|
12
|
-
});
|
|
12
|
+
});
|
|
13
|
+
var MenuDivider$1 = MenuDivider;
|
|
13
14
|
|
|
14
|
-
export default
|
|
15
|
+
export { MenuDivider$1 as default };
|
package/Menu/MenuItem.js
CHANGED
|
@@ -21,6 +21,7 @@ const MenuItem = forwardRef(function MenuItem(props, ref) {
|
|
|
21
21
|
}
|
|
22
22
|
}, onKeyDown: onKeyDown, role: role }, { children: [jsx("div", Object.assign({ className: menuItemClasses.label }, { children: children }), void 0),
|
|
23
23
|
active && jsx(Icon, { className: menuItemClasses.activeIcon, icon: CheckIcon }, void 0)] }), void 0));
|
|
24
|
-
});
|
|
24
|
+
});
|
|
25
|
+
var MenuItem$1 = MenuItem;
|
|
25
26
|
|
|
26
|
-
export default
|
|
27
|
+
export { MenuItem$1 as default };
|
package/Menu/MenuItemGroup.js
CHANGED
|
@@ -10,6 +10,7 @@ const MenuItemGroup = forwardRef(function MenuItemGroup(props, ref) {
|
|
|
10
10
|
const { children, className, label, ...rest } = props;
|
|
11
11
|
return (jsxs("li", Object.assign({ ref: ref }, rest, { className: cx(menuItemGroupClasses.host, className) }, { children: [jsx("span", Object.assign({ className: menuItemGroupClasses.label }, { children: label }), void 0),
|
|
12
12
|
jsx("ul", Object.assign({ className: menuItemGroupClasses.items }, { children: children }), void 0)] }), void 0));
|
|
13
|
-
});
|
|
13
|
+
});
|
|
14
|
+
var MenuItemGroup$1 = MenuItemGroup;
|
|
14
15
|
|
|
15
|
-
export default
|
|
16
|
+
export { MenuItemGroup$1 as default };
|
package/Message/Message.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MessageSeverity } from '@mezzanine-ui/core/message';
|
|
2
|
+
import { IconDefinition } from '@mezzanine-ui/icons';
|
|
2
3
|
import { FC, Key } from 'react';
|
|
3
4
|
import { Notifier, NotifierData, NotifierConfig } from '../Notifier';
|
|
4
5
|
import { SlideFadeProps } from '../Transition';
|
|
@@ -11,23 +12,25 @@ export interface MessageData extends Omit<NotifierData, 'onClose'>, MessageConfi
|
|
|
11
12
|
* @default 3000
|
|
12
13
|
*/
|
|
13
14
|
duration?: NotifierData['duration'];
|
|
15
|
+
/**
|
|
16
|
+
* message icon prefix
|
|
17
|
+
*/
|
|
18
|
+
icon?: IconDefinition;
|
|
14
19
|
/**
|
|
15
20
|
* The key of message.
|
|
16
21
|
*/
|
|
17
22
|
reference?: Key;
|
|
18
23
|
/**
|
|
19
24
|
* The severity of the message.
|
|
20
|
-
* @default info
|
|
21
25
|
*/
|
|
22
26
|
severity?: MessageSeverity;
|
|
23
27
|
}
|
|
24
|
-
export
|
|
25
|
-
}
|
|
28
|
+
export declare type MessageType = FC<MessageData> & Notifier<MessageData, MessageConfigProps> & (Record<string, (message: MessageData['children'], props?: Omit<MessageData, 'children' | 'severity' | 'icon'>) => Key>);
|
|
26
29
|
/**
|
|
27
30
|
* The react component for `mezzanine` message.
|
|
28
31
|
*
|
|
29
|
-
* Use the API from the Message instance such as `Message.
|
|
32
|
+
* Use the API from the Message instance such as `Message.add` and `Message.success`
|
|
30
33
|
* to display a notification message globally.
|
|
31
34
|
*/
|
|
32
|
-
declare const Message:
|
|
35
|
+
declare const Message: MessageType;
|
|
33
36
|
export default Message;
|
package/Message/Message.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { messageClasses, messageIcons } from '@mezzanine-ui/core/message';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import SlideFade from '../Transition/SlideFade.js';
|
|
5
5
|
import Icon from '../Icon/Icon.js';
|
|
@@ -9,13 +9,11 @@ import cx from 'clsx';
|
|
|
9
9
|
/**
|
|
10
10
|
* The react component for `mezzanine` message.
|
|
11
11
|
*
|
|
12
|
-
* Use the API from the Message instance such as `Message.
|
|
12
|
+
* Use the API from the Message instance such as `Message.add` and `Message.success`
|
|
13
13
|
* to display a notification message globally.
|
|
14
14
|
*/
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
16
15
|
const Message = ((props) => {
|
|
17
|
-
const { children, duration, reference, severity
|
|
18
|
-
const icon = messageIcons[severity];
|
|
16
|
+
const { children, duration, icon, reference, severity, onExited: onExitedProp, ...restTransitionProps } = props;
|
|
19
17
|
const [open, setOpen] = useState(true);
|
|
20
18
|
useEffect(() => {
|
|
21
19
|
if (open && duration) {
|
|
@@ -31,10 +29,10 @@ const Message = ((props) => {
|
|
|
31
29
|
if (onExitedProp) {
|
|
32
30
|
onExitedProp(node);
|
|
33
31
|
}
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
if (reference)
|
|
33
|
+
Message.remove(reference);
|
|
36
34
|
};
|
|
37
|
-
return (jsx(SlideFade, Object.assign({ in: open, appear: true, onExited: onExited }, restTransitionProps, { children: jsxs("div", Object.assign({ className: cx(messageClasses.host, messageClasses.severity(severity)) }, { children: [jsx(Icon, { className: messageClasses.icon, icon: icon }, void 0),
|
|
35
|
+
return (jsx(SlideFade, Object.assign({ in: open, appear: true, onExited: onExited }, restTransitionProps, { children: jsxs("div", Object.assign({ className: cx(messageClasses.host, severity ? messageClasses.severity(severity) : '') }, { children: [icon ? (jsx(Icon, { className: messageClasses.icon, icon: icon }, void 0)) : null,
|
|
38
36
|
jsx("span", Object.assign({ className: messageClasses.content }, { children: children }), void 0)] }), void 0) }), void 0));
|
|
39
37
|
});
|
|
40
38
|
const { add, config, destroy, remove, } = createNotifier({
|
|
@@ -48,12 +46,30 @@ Message.add = add;
|
|
|
48
46
|
Message.config = config;
|
|
49
47
|
Message.destroy = destroy;
|
|
50
48
|
Message.remove = remove;
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
const severities = [{
|
|
50
|
+
key: 'success',
|
|
51
|
+
icon: messageIcons.success,
|
|
52
|
+
}, {
|
|
53
|
+
key: 'warning',
|
|
54
|
+
icon: messageIcons.warning,
|
|
55
|
+
}, {
|
|
56
|
+
key: 'error',
|
|
57
|
+
icon: messageIcons.error,
|
|
58
|
+
}, {
|
|
59
|
+
key: 'info',
|
|
60
|
+
icon: messageIcons.info,
|
|
61
|
+
}];
|
|
62
|
+
const validSeverities = ['success', 'warning', 'error', 'info'];
|
|
63
|
+
(severities).forEach((severity) => {
|
|
64
|
+
Message[severity.key] = (message, props) => Message.add({
|
|
53
65
|
...props,
|
|
54
66
|
children: message,
|
|
55
|
-
severity
|
|
67
|
+
severity: validSeverities.includes(severity.key)
|
|
68
|
+
? severity.key
|
|
69
|
+
: undefined,
|
|
70
|
+
icon: severity.icon,
|
|
56
71
|
});
|
|
57
|
-
});
|
|
72
|
+
});
|
|
73
|
+
var Message$1 = Message;
|
|
58
74
|
|
|
59
|
-
export default
|
|
75
|
+
export { Message$1 as default };
|
package/Message/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MessageSeverity, } from '@mezzanine-ui/core/message';
|
|
2
|
-
export { MessageData, default, } from './Message';
|
|
2
|
+
export { MessageData, MessageType, default, } from './Message';
|
package/Modal/Modal.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ModalSeverity, ModalSize } from '@mezzanine-ui/core/modal';
|
|
3
|
+
import { SlideFadeOverlayProps } from '../_internal/SlideFadeOverlay';
|
|
3
4
|
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
|
-
|
|
5
|
-
export interface ModalProps extends NativeElementPropsWithoutKeyAndRef<'div'>, Pick<OverlayProps, 'container' | 'disableCloseOnBackdropClick' | 'disablePortal' | 'hideBackdrop' | 'onBackdropClick' | 'onClose' | 'open'> {
|
|
6
|
-
/**
|
|
7
|
-
* Controls whether to disable closing modal while escape key down.
|
|
8
|
-
* @default false
|
|
9
|
-
*/
|
|
10
|
-
disableCloseOnEscapeKeyDown?: boolean;
|
|
5
|
+
export interface ModalProps extends Omit<SlideFadeOverlayProps, 'children'>, Pick<NativeElementPropsWithoutKeyAndRef<'div'>, 'children'> {
|
|
11
6
|
/**
|
|
12
7
|
* Whether to force full screen on any breakpoint.
|
|
13
8
|
* @default false
|
package/Modal/Modal.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { modalClasses } from '@mezzanine-ui/core/modal';
|
|
3
3
|
import { TimesIcon } from '@mezzanine-ui/icons';
|
|
4
|
-
import { forwardRef
|
|
5
|
-
import { useDocumentEscapeKeyDown } from '../hooks/useDocumentEscapeKeyDown.js';
|
|
6
|
-
import { lockBodyScroll, allowBodyScroll } from '../utils/scroll-lock.js';
|
|
7
|
-
import { useIsTopModal } from './useIsTopModal.js';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
8
5
|
import { ModalControlContext } from './ModalControl.js';
|
|
9
|
-
import
|
|
10
|
-
import SlideFade from '../Transition/SlideFade.js';
|
|
6
|
+
import useModalContainer from './useModalContainer.js';
|
|
11
7
|
import Icon from '../Icon/Icon.js';
|
|
12
8
|
import cx from 'clsx';
|
|
13
9
|
|
|
@@ -15,61 +11,17 @@ import cx from 'clsx';
|
|
|
15
11
|
* The react component for `mezzanine` modal.
|
|
16
12
|
*/
|
|
17
13
|
const Modal = forwardRef(function Modal(props, ref) {
|
|
18
|
-
const { children, className, container, disableCloseOnBackdropClick = false, disableCloseOnEscapeKeyDown = false, disablePortal, fullScreen = false, hideBackdrop, hideCloseIcon = false, loading = false, onBackdropClick, onClose, open, severity = 'info', size = 'medium', ...rest } = props;
|
|
14
|
+
const { children, className, container, disableCloseOnBackdropClick = false, disableCloseOnEscapeKeyDown = false, disablePortal = false, fullScreen = false, hideBackdrop = false, hideCloseIcon = false, invisibleBackdrop = false, loading = false, onBackdropClick, onClose, open, severity = 'info', size = 'medium', ...rest } = props;
|
|
19
15
|
const modalControl = {
|
|
20
16
|
loading,
|
|
21
17
|
severity,
|
|
22
18
|
};
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
return (event) => {
|
|
33
|
-
if (isTopModal()) {
|
|
34
|
-
event.stopPropagation();
|
|
35
|
-
onClose();
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}, [
|
|
39
|
-
disableCloseOnEscapeKeyDown,
|
|
40
|
-
isTopModal,
|
|
41
|
-
open,
|
|
42
|
-
onClose,
|
|
43
|
-
]);
|
|
44
|
-
/** lock body scroll */
|
|
45
|
-
useLayoutEffect(() => {
|
|
46
|
-
if (open) {
|
|
47
|
-
lockBodyScroll();
|
|
48
|
-
}
|
|
49
|
-
}, [open]);
|
|
50
|
-
/** unlock body scroll */
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
function checkAndAllowScroll() {
|
|
53
|
-
// wait until dom element unmount, and check if other modal existed
|
|
54
|
-
const allModals = document.querySelectorAll('.mzn-modal');
|
|
55
|
-
if (!allModals.length) {
|
|
56
|
-
allowBodyScroll();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (!open && exited) {
|
|
60
|
-
checkAndAllowScroll();
|
|
61
|
-
}
|
|
62
|
-
return (() => {
|
|
63
|
-
requestAnimationFrame(checkAndAllowScroll);
|
|
64
|
-
});
|
|
65
|
-
}, [open, exited]);
|
|
66
|
-
if (!open && exited) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return (jsx(Overlay, Object.assign({ className: modalClasses.overlay, container: container, disableCloseOnBackdropClick: disableCloseOnBackdropClick, disablePortal: disablePortal, hideBackdrop: hideBackdrop, onBackdropClick: onBackdropClick, onClose: onClose, open: open, role: "presentation" }, { children: jsx(ModalControlContext.Provider, Object.assign({ value: modalControl }, { children: jsx(SlideFade, Object.assign({ ref: ref, in: open, direction: "down", onEntered: () => setExited(false), onExited: () => setExited(true) }, { children: jsxs("div", Object.assign({}, rest, { className: cx(modalClasses.host, modalClasses.severity(severity), modalClasses.size(size), {
|
|
70
|
-
[modalClasses.fullScreen]: fullScreen,
|
|
71
|
-
[modalClasses.withCloseIcon]: !hideCloseIcon,
|
|
72
|
-
}, className), role: "dialog" }, { children: [children, !hideCloseIcon && (jsx(Icon, { className: modalClasses.closeIcon, icon: TimesIcon, onClick: onClose }, void 0))] }), void 0) }), void 0) }), void 0) }), void 0));
|
|
73
|
-
});
|
|
19
|
+
const { Container: ModalContainer } = useModalContainer();
|
|
20
|
+
return (jsx(ModalControlContext.Provider, Object.assign({ value: modalControl }, { children: jsx(ModalContainer, Object.assign({ className: modalClasses.overlay, container: container, direction: "down", disableCloseOnBackdropClick: disableCloseOnBackdropClick, disableCloseOnEscapeKeyDown: disableCloseOnEscapeKeyDown, disablePortal: disablePortal, hideBackdrop: hideBackdrop, invisibleBackdrop: invisibleBackdrop, onBackdropClick: onBackdropClick, onClose: onClose, open: open, ref: ref }, { children: jsxs("div", Object.assign({}, rest, { className: cx(modalClasses.host, modalClasses.severity(severity), modalClasses.size(size), {
|
|
21
|
+
[modalClasses.fullScreen]: fullScreen,
|
|
22
|
+
[modalClasses.withCloseIcon]: !hideCloseIcon,
|
|
23
|
+
}, className), role: "dialog" }, { children: [children, !hideCloseIcon && (jsx(Icon, { className: modalClasses.closeIcon, icon: TimesIcon, onClick: onClose }, void 0))] }), void 0) }), void 0) }), void 0));
|
|
24
|
+
});
|
|
25
|
+
var Modal$1 = Modal;
|
|
74
26
|
|
|
75
|
-
export default
|
|
27
|
+
export { Modal$1 as default };
|
package/Modal/ModalActions.js
CHANGED
|
@@ -13,6 +13,7 @@ const ModalActions = forwardRef(function ModalActions(props, ref) {
|
|
|
13
13
|
const { loading, severity, } = useContext(ModalControlContext);
|
|
14
14
|
const danger = severity === 'error';
|
|
15
15
|
return (jsxs(ModalFooter, Object.assign({}, rest, { ref: ref }, { children: [children, jsx(ConfirmActions, { cancelButtonProps: cancelButtonProps, cancelText: cancelText, className: modalClasses.actions, confirmButtonProps: confirmButtonProps, confirmText: confirmText, danger: danger, hideCancelButton: hideCancelButton, hideConfirmButton: hideConfirmButton, loading: loading, onCancel: onCancel, onConfirm: onConfirm }, void 0)] }), void 0));
|
|
16
|
-
});
|
|
16
|
+
});
|
|
17
|
+
var ModalActions$1 = ModalActions;
|
|
17
18
|
|
|
18
|
-
export default
|
|
19
|
+
export { ModalActions$1 as default };
|
package/Modal/ModalBody.js
CHANGED
|
@@ -9,6 +9,7 @@ import cx from 'clsx';
|
|
|
9
9
|
const ModalBody = forwardRef(function ModalBody(props, ref) {
|
|
10
10
|
const { children, className, ...rest } = props;
|
|
11
11
|
return (jsx("div", Object.assign({}, rest, { ref: ref, className: cx(modalClasses.body, className) }, { children: children }), void 0));
|
|
12
|
-
});
|
|
12
|
+
});
|
|
13
|
+
var ModalBody$1 = ModalBody;
|
|
13
14
|
|
|
14
|
-
export default
|
|
15
|
+
export { ModalBody$1 as default };
|
package/Modal/ModalFooter.js
CHANGED
|
@@ -9,6 +9,7 @@ import cx from 'clsx';
|
|
|
9
9
|
const ModalFooter = forwardRef(function ModalFooter(props, ref) {
|
|
10
10
|
const { children, className, ...rest } = props;
|
|
11
11
|
return (jsx("div", Object.assign({}, rest, { ref: ref, className: cx(modalClasses.footer, className) }, { children: children }), void 0));
|
|
12
|
-
});
|
|
12
|
+
});
|
|
13
|
+
var ModalFooter$1 = ModalFooter;
|
|
13
14
|
|
|
14
|
-
export default
|
|
15
|
+
export { ModalFooter$1 as default };
|
package/Modal/ModalHeader.js
CHANGED
|
@@ -15,6 +15,7 @@ const ModalHeader = forwardRef(function ModalHeader(props, ref) {
|
|
|
15
15
|
jsx("h3", Object.assign({ className: cx(modalClasses.title, {
|
|
16
16
|
[modalClasses.titleLarge]: titleLarge,
|
|
17
17
|
}), title: typeof children === 'string' ? children : undefined }, { children: children }), void 0)] }), void 0));
|
|
18
|
-
});
|
|
18
|
+
});
|
|
19
|
+
var ModalHeader$1 = ModalHeader;
|
|
19
20
|
|
|
20
|
-
export default
|
|
21
|
+
export { ModalHeader$1 as default };
|
package/Modal/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { ModalActionsProps, default as ModalActions, } from './ModalActions';
|
|
|
3
3
|
export { ModalBodyProps, default as ModalBody, } from './ModalBody';
|
|
4
4
|
export { ModalFooterProps, default as ModalFooter, } from './ModalFooter';
|
|
5
5
|
export { ModalHeaderProps, default as ModalHeader, } from './ModalHeader';
|
|
6
|
+
export { default as useModalContainer, } from './useModalContainer';
|
|
6
7
|
export { ModalProps, default, } from './Modal';
|
package/Modal/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { default as ModalActions } from './ModalActions.js';
|
|
|
2
2
|
export { default as ModalBody } from './ModalBody.js';
|
|
3
3
|
export { default as ModalFooter } from './ModalFooter.js';
|
|
4
4
|
export { default as ModalHeader } from './ModalHeader.js';
|
|
5
|
+
export { default as useModalContainer } from './useModalContainer.js';
|
|
5
6
|
export { default } from './Modal.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SlideFadeOverlayProps } from '../_internal/SlideFadeOverlay';
|
|
3
|
+
export default function useModalContainer(): {
|
|
4
|
+
Container: import("react").ForwardRefExoticComponent<SlideFadeOverlayProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
defaultOptions: Pick<SlideFadeOverlayProps, "className" | "direction" | "disableCloseOnBackdropClick" | "disableCloseOnEscapeKeyDown" | "disablePortal" | "hideBackdrop" | "invisibleBackdrop" | "open">;
|
|
6
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { modalClasses } from '@mezzanine-ui/core/modal';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import SlideFadeOverlay from '../_internal/SlideFadeOverlay/SlideFadeOverlay.js';
|
|
5
|
+
|
|
6
|
+
const defaultOptions = {
|
|
7
|
+
className: modalClasses.overlay,
|
|
8
|
+
direction: 'down',
|
|
9
|
+
disableCloseOnBackdropClick: false,
|
|
10
|
+
disableCloseOnEscapeKeyDown: false,
|
|
11
|
+
disablePortal: false,
|
|
12
|
+
hideBackdrop: false,
|
|
13
|
+
invisibleBackdrop: false,
|
|
14
|
+
open: false,
|
|
15
|
+
};
|
|
16
|
+
const ModalContainer = forwardRef((props, ref) => {
|
|
17
|
+
const { className = defaultOptions.className, children, container, direction = defaultOptions.direction, disableCloseOnBackdropClick = defaultOptions.disableCloseOnBackdropClick, disableCloseOnEscapeKeyDown = defaultOptions.disableCloseOnEscapeKeyDown, disablePortal = defaultOptions.disablePortal, hideBackdrop = defaultOptions.hideBackdrop, invisibleBackdrop = defaultOptions.invisibleBackdrop, onBackdropClick, onClose, open = defaultOptions.open, } = props;
|
|
18
|
+
return (jsx(SlideFadeOverlay, Object.assign({ className: className, container: container, direction: direction, disableCloseOnBackdropClick: disableCloseOnBackdropClick, disableCloseOnEscapeKeyDown: disableCloseOnEscapeKeyDown, disablePortal: disablePortal, hideBackdrop: hideBackdrop, invisibleBackdrop: invisibleBackdrop, onBackdropClick: onBackdropClick, onClose: onClose, open: open, ref: ref }, { children: children }), void 0));
|
|
19
|
+
});
|
|
20
|
+
function useModalContainer() {
|
|
21
|
+
return {
|
|
22
|
+
Container: ModalContainer,
|
|
23
|
+
defaultOptions,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useModalContainer as default };
|
package/Navigation/Navigation.js
CHANGED
|
@@ -43,6 +43,7 @@ const Navigation = forwardRef((props, ref) => {
|
|
|
43
43
|
return (jsx("ul", Object.assign({}, rest, { ref: ref, className: cx(navigationClasses.host, navigationClasses[orientation], className) }, { children: jsx(NavigationContext.Provider, Object.assign({ value: {
|
|
44
44
|
orientation,
|
|
45
45
|
} }, { children: ItemChildren }), void 0) }), void 0));
|
|
46
|
-
});
|
|
46
|
+
});
|
|
47
|
+
var Navigation$1 = Navigation;
|
|
47
48
|
|
|
48
|
-
export default
|
|
49
|
+
export { Navigation$1 as default };
|
|
@@ -17,6 +17,7 @@ const NavigationItem = forwardRef((props, ref) => {
|
|
|
17
17
|
}
|
|
18
18
|
}, [eventKey, onClick, orientation]);
|
|
19
19
|
return (jsxs("li", Object.assign({}, rest, { ref: ref, className: cx(navigationItemClasses.host, active && navigationItemClasses.active, className), role: "menuitem", onClick: handleClick, onKeyDown: () => { } }, { children: [icon && (jsx(Icon, { className: navigationItemClasses.icon, icon: icon }, void 0)), children] }), void 0));
|
|
20
|
-
});
|
|
20
|
+
});
|
|
21
|
+
var NavigationItem$1 = NavigationItem;
|
|
21
22
|
|
|
22
|
-
export default
|
|
23
|
+
export { NavigationItem$1 as default };
|
|
@@ -60,6 +60,7 @@ const NavigationSubMenu = forwardRef((props, ref) => {
|
|
|
60
60
|
orientation === 'vertical' && (jsx(Collapse, Object.assign({ style: {
|
|
61
61
|
width: '100%',
|
|
62
62
|
}, in: !!open }, { children: WrapChildren }), void 0))] }), void 0));
|
|
63
|
-
});
|
|
63
|
+
});
|
|
64
|
+
var NavigationSubMenu$1 = NavigationSubMenu;
|
|
64
65
|
|
|
65
|
-
export default
|
|
66
|
+
export { NavigationSubMenu$1 as default };
|
|
@@ -6,8 +6,8 @@ import Button from '../Button/Button.js';
|
|
|
6
6
|
import ButtonGroup from '../Button/ButtonGroup.js';
|
|
7
7
|
import SlideFade from '../Transition/SlideFade.js';
|
|
8
8
|
import Icon from '../Icon/Icon.js';
|
|
9
|
-
import { createNotifier } from '../Notifier/createNotifier.js';
|
|
10
9
|
import cx from 'clsx';
|
|
10
|
+
import { createNotifier } from '../Notifier/createNotifier.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The react component for `mezzanine` notification.
|
|
@@ -73,6 +73,7 @@ Notification.remove = remove;
|
|
|
73
73
|
...props,
|
|
74
74
|
severity,
|
|
75
75
|
});
|
|
76
|
-
});
|
|
76
|
+
});
|
|
77
|
+
var Notification$1 = Notification;
|
|
77
78
|
|
|
78
|
-
export default
|
|
79
|
+
export { Notification$1 as default };
|
|
@@ -28,4 +28,4 @@ function NotifierManager(props) {
|
|
|
28
28
|
return (jsx(Fragment, { children: notifiersShouldRendered.map((notifier) => (jsx(Fragment$1, { children: render(notifier) }, notifier.key))) }, void 0));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export default
|
|
31
|
+
export { NotifierManager as default };
|
package/Overlay/Overlay.js
CHANGED
|
@@ -26,6 +26,7 @@ const Overlay = forwardRef(function Overlay(props, ref) {
|
|
|
26
26
|
onBackdropClick(event);
|
|
27
27
|
}
|
|
28
28
|
} }, void 0) }), void 0)), children] }), void 0) }), void 0));
|
|
29
|
-
});
|
|
29
|
+
});
|
|
30
|
+
var Overlay$1 = Overlay;
|
|
30
31
|
|
|
31
|
-
export default
|
|
32
|
+
export { Overlay$1 as default };
|
package/PageFooter/PageFooter.js
CHANGED
|
@@ -8,6 +8,7 @@ const PageFooter = forwardRef(function PageFooter(props, ref) {
|
|
|
8
8
|
const { className, actionClassName, cancelButtonProps, cancelText, children, danger, loading, confirmButtonProps, confirmText, hideCancelButton, hideConfirmButton, onCancel, onConfirm, ...rest } = props;
|
|
9
9
|
return (jsxs("footer", Object.assign({ ref: ref }, rest, { className: cx(pageFooterClasses.host, className) }, { children: [jsx("div", Object.assign({ className: actionClassName }, { children: children }), void 0),
|
|
10
10
|
jsx(ConfirmActions, { cancelText: cancelText, confirmText: confirmText, cancelButtonProps: cancelButtonProps, confirmButtonProps: confirmButtonProps, danger: danger, hideCancelButton: hideCancelButton, hideConfirmButton: hideConfirmButton, loading: loading, onCancel: onCancel, onConfirm: onConfirm }, void 0)] }), void 0));
|
|
11
|
-
});
|
|
11
|
+
});
|
|
12
|
+
var PageFooter$1 = PageFooter;
|
|
12
13
|
|
|
13
|
-
export default
|
|
14
|
+
export { PageFooter$1 as default };
|
package/Pagination/Pagination.js
CHANGED
|
@@ -24,6 +24,7 @@ const Pagination = forwardRef((props, ref) => {
|
|
|
24
24
|
});
|
|
25
25
|
return (jsx("nav", Object.assign({}, rest, { ref: ref, "aria-label": "pagination navigation", className: cx(paginationClasses.host, className) }, { children: jsxs("ul", Object.assign({ className: paginationClasses.container }, { children: [items.map((item, index) => (jsx("li", Object.assign({ className: paginationClasses.item }, { children: itemRender(item) }), index))),
|
|
26
26
|
showJumper && (jsx("li", Object.assign({ className: paginationClasses.jumper }, { children: jsx(PaginationJumper, { buttonText: buttonText, disabled: disabled, hintText: hintText, inputPlaceholder: inputPlaceholder, onChange: onChange, pageSize: pageSize, total: total }, void 0) }), void 0))] }), void 0) }), void 0));
|
|
27
|
-
});
|
|
27
|
+
});
|
|
28
|
+
var Pagination$1 = Pagination;
|
|
28
29
|
|
|
29
|
-
export default
|
|
30
|
+
export { Pagination$1 as default };
|