@itcase/ui 1.8.166 → 1.8.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Drawer.js +3 -1
- package/dist/components/Drawer.js +3 -1
- package/dist/css/components/Notification/Notification.css +2 -0
- package/dist/css/components/Notification/css/__item/notification__item.css +1 -0
- package/dist/css/styles/bundle.css +2 -0
- package/dist/types/components/Drawer/Drawer.interface.d.ts +1 -1
- package/package.json +1 -1
|
@@ -97,6 +97,8 @@ const drawerConfig = {
|
|
|
97
97
|
};
|
|
98
98
|
function Drawer(props) {
|
|
99
99
|
const { appearance, className, dataTestId, dataTour, type, title, desc, enableOverlay, lockBackgroundScroll = true, stickyButton, before, after, close, isOpen, isOpenModal, onClickClose, onClose, children, } = props;
|
|
100
|
+
// compatibility with old 'closeModal' prop
|
|
101
|
+
const _onClickClose = onClickClose ?? props.closeModal;
|
|
100
102
|
const _isOpen = isOpen ?? isOpenModal;
|
|
101
103
|
const isOpenPrevRef = React.useRef(Boolean(_isOpen));
|
|
102
104
|
const isFirstRenderRef = React.useRef(true);
|
|
@@ -143,7 +145,7 @@ function Drawer(props) {
|
|
|
143
145
|
}
|
|
144
146
|
return (jsxRuntime.jsxs(ReactDrawer, { className: clsx('drawer', type && `drawer_type_${type}`, className, dataTour && `dataTour-${dataTour}`, stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), dataTour: dataTour, direction: direction || 'right', size: size || 600,
|
|
145
147
|
// Drawer set prefix "EZDrawer" for any id
|
|
146
|
-
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, duration: ANIMATION_DURATION, enableOverlay: enableOverlay, lockBackgroundScroll: lockBackgroundScroll, overlayClassName: "drawer__overlay", open: animationState.isOpen, onClose:
|
|
148
|
+
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, duration: ANIMATION_DURATION, enableOverlay: enableOverlay, lockBackgroundScroll: lockBackgroundScroll, overlayClassName: "drawer__overlay", open: animationState.isOpen, onClose: _onClickClose, children: [before && jsxRuntime.jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsxRuntime.jsx("div", { className: "drawer__close", children: jsxRuntime.jsx(Icon.Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: _onClickClose }) })), (title || desc) && (jsxRuntime.jsxs("div", { className: "drawer__header", children: [jsxRuntime.jsx(Icon.Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title }), jsxRuntime.jsx(Text.Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsxRuntime.jsx("div", { className: "drawer__wrapper", children: children }), after && jsxRuntime.jsx("div", { className: "drawer__after", children: after })] }));
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
exports.Drawer = Drawer;
|
|
@@ -95,6 +95,8 @@ const drawerConfig = {
|
|
|
95
95
|
};
|
|
96
96
|
function Drawer(props) {
|
|
97
97
|
const { appearance, className, dataTestId, dataTour, type, title, desc, enableOverlay, lockBackgroundScroll = true, stickyButton, before, after, close, isOpen, isOpenModal, onClickClose, onClose, children, } = props;
|
|
98
|
+
// compatibility with old 'closeModal' prop
|
|
99
|
+
const _onClickClose = onClickClose ?? props.closeModal;
|
|
98
100
|
const _isOpen = isOpen ?? isOpenModal;
|
|
99
101
|
const isOpenPrevRef = useRef(Boolean(_isOpen));
|
|
100
102
|
const isFirstRenderRef = useRef(true);
|
|
@@ -141,7 +143,7 @@ function Drawer(props) {
|
|
|
141
143
|
}
|
|
142
144
|
return (jsxs(ReactDrawer, { className: clsx('drawer', type && `drawer_type_${type}`, className, dataTour && `dataTour-${dataTour}`, stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), dataTour: dataTour, direction: direction || 'right', size: size || 600,
|
|
143
145
|
// Drawer set prefix "EZDrawer" for any id
|
|
144
|
-
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, duration: ANIMATION_DURATION, enableOverlay: enableOverlay, lockBackgroundScroll: lockBackgroundScroll, overlayClassName: "drawer__overlay", open: animationState.isOpen, onClose:
|
|
146
|
+
customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, duration: ANIMATION_DURATION, enableOverlay: enableOverlay, lockBackgroundScroll: lockBackgroundScroll, overlayClassName: "drawer__overlay", open: animationState.isOpen, onClose: _onClickClose, children: [before && jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsx("div", { className: "drawer__close", children: jsx(Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: _onClickClose }) })), (title || desc) && (jsxs("div", { className: "drawer__header", children: [jsx(Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title }), jsx(Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsx(Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
export { Drawer, drawerAppearance, drawerConfig };
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
top: 0;
|
|
9
9
|
right: 0;
|
|
10
10
|
z-index: 1000;
|
|
11
|
+
pointer-events: none;
|
|
11
12
|
@media (--mobile) {
|
|
12
13
|
left: 0;
|
|
13
14
|
top: inherit;
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
}
|
|
36
37
|
.notification__item {
|
|
37
38
|
width: 340px;
|
|
39
|
+
pointer-events: auto;
|
|
38
40
|
&-wrapper {
|
|
39
41
|
position: relative;
|
|
40
42
|
display: flex;
|
|
@@ -79840,6 +79840,7 @@ div.label {
|
|
|
79840
79840
|
top: 0;
|
|
79841
79841
|
right: 0;
|
|
79842
79842
|
z-index: 1000;
|
|
79843
|
+
pointer-events: none;
|
|
79843
79844
|
@media (--mobile) {
|
|
79844
79845
|
left: 0;
|
|
79845
79846
|
top: inherit;
|
|
@@ -79867,6 +79868,7 @@ div.label {
|
|
|
79867
79868
|
}
|
|
79868
79869
|
.notification__item {
|
|
79869
79870
|
width: 340px;
|
|
79871
|
+
pointer-events: auto;
|
|
79870
79872
|
&-wrapper {
|
|
79871
79873
|
position: relative;
|
|
79872
79874
|
display: flex;
|
|
@@ -19,7 +19,6 @@ interface DrawerProps extends DrawerThemeColor, StyleAttributes {
|
|
|
19
19
|
before?: ReactNode;
|
|
20
20
|
children?: ReactNode;
|
|
21
21
|
className?: string;
|
|
22
|
-
closeModal?: () => void;
|
|
23
22
|
dataTour?: string;
|
|
24
23
|
direction?: 'bottom' | 'left' | 'right' | 'top';
|
|
25
24
|
enableOverlay?: boolean;
|
|
@@ -27,5 +26,6 @@ interface DrawerProps extends DrawerThemeColor, StyleAttributes {
|
|
|
27
26
|
size?: number | string;
|
|
28
27
|
type?: string;
|
|
29
28
|
isOpen?: boolean;
|
|
29
|
+
onClickClose: VoidFunction;
|
|
30
30
|
}
|
|
31
31
|
export type { DrawerProps };
|