@zendeskgarden/react-modals 9.12.3 → 9.12.5
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/esm/elements/Body.js +3 -3
- package/dist/esm/elements/Close.js +4 -4
- package/dist/esm/elements/Drawer/Drawer.js +14 -12
- package/dist/esm/elements/Drawer/Header.js +4 -5
- package/dist/esm/elements/Footer.js +3 -3
- package/dist/esm/elements/FooterItem.js +3 -3
- package/dist/esm/elements/Header.js +9 -10
- package/dist/esm/elements/Modal.js +13 -14
- package/dist/esm/elements/TooltipDialog/Body.js +4 -4
- package/dist/esm/elements/TooltipDialog/Close.js +5 -5
- package/dist/esm/elements/TooltipDialog/Footer.js +4 -4
- package/dist/esm/elements/TooltipDialog/FooterItem.js +4 -4
- package/dist/esm/elements/TooltipDialog/Title.js +5 -6
- package/dist/esm/elements/TooltipDialog/TooltipDialog.js +22 -20
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/extends.js +4 -4
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +3 -3
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-error-stroke.svg.js +2 -2
- package/dist/esm/node_modules/polished/dist/polished.esm.js +3 -12
- package/dist/esm/styled/StyledBackdrop.js +19 -22
- package/dist/esm/styled/StyledBody.js +9 -12
- package/dist/esm/styled/StyledClose.js +6 -6
- package/dist/esm/styled/StyledDrawer.js +6 -7
- package/dist/esm/styled/StyledDrawerBody.js +3 -3
- package/dist/esm/styled/StyledDrawerClose.js +3 -4
- package/dist/esm/styled/StyledDrawerFooter.js +9 -12
- package/dist/esm/styled/StyledDrawerFooterItem.js +1 -1
- package/dist/esm/styled/StyledDrawerHeader.js +3 -3
- package/dist/esm/styled/StyledFooter.js +3 -3
- package/dist/esm/styled/StyledFooterItem.js +3 -3
- package/dist/esm/styled/StyledHeader.js +8 -9
- package/dist/esm/styled/StyledModal.js +9 -10
- package/dist/esm/styled/StyledTooltipDialog.js +5 -5
- package/dist/esm/styled/StyledTooltipDialogBackdrop.js +3 -3
- package/dist/esm/styled/StyledTooltipDialogBody.js +9 -12
- package/dist/esm/styled/StyledTooltipDialogClose.js +3 -3
- package/dist/esm/styled/StyledTooltipDialogFooter.js +3 -3
- package/dist/esm/styled/StyledTooltipDialogFooterItem.js +3 -3
- package/dist/esm/styled/StyledTooltipDialogTitle.js +10 -13
- package/dist/index.cjs.js +136 -164
- package/dist/typings/elements/TooltipDialog/TooltipDialog.d.ts +0 -6
- package/package.json +6 -6
|
@@ -29,7 +29,7 @@ import '../styled/StyledDrawerFooter.js';
|
|
|
29
29
|
import '../styled/StyledDrawerFooterItem.js';
|
|
30
30
|
import { useModalContext } from '../utils/useModalContext.js';
|
|
31
31
|
|
|
32
|
-
const Body = forwardRef((props, ref) => {
|
|
32
|
+
const Body$2 = forwardRef((props, ref) => {
|
|
33
33
|
const {
|
|
34
34
|
getContentProps
|
|
35
35
|
} = useModalContext();
|
|
@@ -37,6 +37,6 @@ const Body = forwardRef((props, ref) => {
|
|
|
37
37
|
ref: ref
|
|
38
38
|
}));
|
|
39
39
|
});
|
|
40
|
-
Body.displayName = 'Modal.Body';
|
|
40
|
+
Body$2.displayName = 'Modal.Body';
|
|
41
41
|
|
|
42
|
-
export { Body };
|
|
42
|
+
export { Body$2 as Body };
|
|
@@ -31,7 +31,7 @@ import { useText } from '@zendeskgarden/react-theming';
|
|
|
31
31
|
import { useModalContext } from '../utils/useModalContext.js';
|
|
32
32
|
import SvgXStroke from '../node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js';
|
|
33
33
|
|
|
34
|
-
const Close = forwardRef((props, ref) => {
|
|
34
|
+
const Close$2 = forwardRef((props, ref) => {
|
|
35
35
|
const {
|
|
36
36
|
getCloseProps,
|
|
37
37
|
setIsCloseButtonPresent
|
|
@@ -40,7 +40,7 @@ const Close = forwardRef((props, ref) => {
|
|
|
40
40
|
setIsCloseButtonPresent(true);
|
|
41
41
|
return () => setIsCloseButtonPresent(false);
|
|
42
42
|
});
|
|
43
|
-
const ariaLabel = useText(Close, props, 'aria-label', 'Close modal', props['aria-describedby'] === undefined );
|
|
43
|
+
const ariaLabel = useText(Close$2, props, 'aria-label', 'Close modal', props['aria-describedby'] === undefined );
|
|
44
44
|
return React__default.createElement(StyledClose, Object.assign({}, getCloseProps({
|
|
45
45
|
...props,
|
|
46
46
|
'aria-label': ariaLabel
|
|
@@ -48,6 +48,6 @@ const Close = forwardRef((props, ref) => {
|
|
|
48
48
|
ref: ref
|
|
49
49
|
}), React__default.createElement(SvgXStroke, null));
|
|
50
50
|
});
|
|
51
|
-
Close.displayName = 'Modal.Close';
|
|
51
|
+
Close$2.displayName = 'Modal.Close';
|
|
52
52
|
|
|
53
|
-
export { Close };
|
|
53
|
+
export { Close$2 as Close };
|
|
@@ -42,17 +42,16 @@ import { Close } from './Close.js';
|
|
|
42
42
|
import { Footer } from './Footer.js';
|
|
43
43
|
import { FooterItem } from './FooterItem.js';
|
|
44
44
|
|
|
45
|
-
const DrawerComponent = forwardRef((
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} = _ref;
|
|
45
|
+
const DrawerComponent = forwardRef(({
|
|
46
|
+
id,
|
|
47
|
+
isOpen,
|
|
48
|
+
onClose,
|
|
49
|
+
backdropProps,
|
|
50
|
+
appendToNode,
|
|
51
|
+
focusOnMount = true,
|
|
52
|
+
restoreFocus = true,
|
|
53
|
+
...props
|
|
54
|
+
}, ref) => {
|
|
56
55
|
const modalRef = useRef(null);
|
|
57
56
|
const transitionRef = useRef(null);
|
|
58
57
|
const triggerRef = useRef(null);
|
|
@@ -60,6 +59,9 @@ const DrawerComponent = forwardRef((_ref, ref) => {
|
|
|
60
59
|
const environment = useDocument(theme);
|
|
61
60
|
const [isCloseButtonPresent, setIsCloseButtonPresent] = useState(false);
|
|
62
61
|
const [hasHeader, setHasHeader] = useState(false);
|
|
62
|
+
const handleClose = event => {
|
|
63
|
+
isOpen && onClose?.(event);
|
|
64
|
+
};
|
|
63
65
|
const {
|
|
64
66
|
getTitleProps,
|
|
65
67
|
getCloseProps,
|
|
@@ -72,7 +74,7 @@ const DrawerComponent = forwardRef((_ref, ref) => {
|
|
|
72
74
|
focusOnMount: false ,
|
|
73
75
|
restoreFocus: false ,
|
|
74
76
|
environment,
|
|
75
|
-
onClose
|
|
77
|
+
onClose: handleClose
|
|
76
78
|
});
|
|
77
79
|
useEffect(() => {
|
|
78
80
|
if (environment) {
|
|
@@ -30,11 +30,10 @@ import '../../styled/StyledDrawerBody.js';
|
|
|
30
30
|
import '../../styled/StyledDrawerFooter.js';
|
|
31
31
|
import '../../styled/StyledDrawerFooterItem.js';
|
|
32
32
|
|
|
33
|
-
const HeaderComponent = forwardRef((
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} = _ref;
|
|
33
|
+
const HeaderComponent = forwardRef(({
|
|
34
|
+
tag = 'div',
|
|
35
|
+
...other
|
|
36
|
+
}, ref) => {
|
|
38
37
|
const {
|
|
39
38
|
isCloseButtonPresent,
|
|
40
39
|
hasHeader,
|
|
@@ -29,7 +29,7 @@ import '../styled/StyledDrawerFooter.js';
|
|
|
29
29
|
import '../styled/StyledDrawerFooterItem.js';
|
|
30
30
|
import { useModalContext } from '../utils/useModalContext.js';
|
|
31
31
|
|
|
32
|
-
const Footer = React__default.forwardRef((props, ref) => {
|
|
32
|
+
const Footer$2 = React__default.forwardRef((props, ref) => {
|
|
33
33
|
const {
|
|
34
34
|
isLarge
|
|
35
35
|
} = useModalContext();
|
|
@@ -38,6 +38,6 @@ const Footer = React__default.forwardRef((props, ref) => {
|
|
|
38
38
|
$isLarge: isLarge
|
|
39
39
|
}, props));
|
|
40
40
|
});
|
|
41
|
-
Footer.displayName = 'Modal.Footer';
|
|
41
|
+
Footer$2.displayName = 'Modal.Footer';
|
|
42
42
|
|
|
43
|
-
export { Footer };
|
|
43
|
+
export { Footer$2 as Footer };
|
|
@@ -28,9 +28,9 @@ import '../styled/StyledDrawerBody.js';
|
|
|
28
28
|
import '../styled/StyledDrawerFooter.js';
|
|
29
29
|
import '../styled/StyledDrawerFooterItem.js';
|
|
30
30
|
|
|
31
|
-
const FooterItem = React__default.forwardRef((props, ref) => React__default.createElement(StyledFooterItem, Object.assign({
|
|
31
|
+
const FooterItem$2 = React__default.forwardRef((props, ref) => React__default.createElement(StyledFooterItem, Object.assign({
|
|
32
32
|
ref: ref
|
|
33
33
|
}, props)));
|
|
34
|
-
FooterItem.displayName = 'Modal.FooterItem';
|
|
34
|
+
FooterItem$2.displayName = 'Modal.FooterItem';
|
|
35
35
|
|
|
36
|
-
export { FooterItem };
|
|
36
|
+
export { FooterItem$2 as FooterItem };
|
|
@@ -30,13 +30,12 @@ import '../styled/StyledDrawerBody.js';
|
|
|
30
30
|
import '../styled/StyledDrawerFooter.js';
|
|
31
31
|
import '../styled/StyledDrawerFooterItem.js';
|
|
32
32
|
|
|
33
|
-
const Header = forwardRef((
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} = _ref;
|
|
33
|
+
const Header$1 = forwardRef(({
|
|
34
|
+
children,
|
|
35
|
+
isDanger,
|
|
36
|
+
tag = 'div',
|
|
37
|
+
...other
|
|
38
|
+
}, ref) => {
|
|
40
39
|
const {
|
|
41
40
|
isCloseButtonPresent,
|
|
42
41
|
hasHeader,
|
|
@@ -60,10 +59,10 @@ const Header = forwardRef((_ref, ref) => {
|
|
|
60
59
|
ref: ref
|
|
61
60
|
}), !!isDanger && React__default.createElement(StyledDangerIcon, null), children);
|
|
62
61
|
});
|
|
63
|
-
Header.displayName = 'Modal.Header';
|
|
64
|
-
Header.propTypes = {
|
|
62
|
+
Header$1.displayName = 'Modal.Header';
|
|
63
|
+
Header$1.propTypes = {
|
|
65
64
|
isDanger: PropTypes.bool,
|
|
66
65
|
tag: PropTypes.any
|
|
67
66
|
};
|
|
68
67
|
|
|
69
|
-
export { Header };
|
|
68
|
+
export { Header$1 as Header };
|
|
@@ -57,20 +57,19 @@ const isOverflowing = element => {
|
|
|
57
57
|
const marginRight = parseInt(style.getPropertyValue('margin-right'), 10);
|
|
58
58
|
return marginLeft + doc.body.clientWidth + marginRight < win.innerWidth;
|
|
59
59
|
};
|
|
60
|
-
const ModalComponent = forwardRef((
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
} = _ref;
|
|
60
|
+
const ModalComponent = forwardRef(({
|
|
61
|
+
backdropProps,
|
|
62
|
+
children,
|
|
63
|
+
onClose,
|
|
64
|
+
isLarge,
|
|
65
|
+
isCentered = true,
|
|
66
|
+
isAnimated = true,
|
|
67
|
+
id,
|
|
68
|
+
appendToNode,
|
|
69
|
+
focusOnMount,
|
|
70
|
+
restoreFocus,
|
|
71
|
+
...modalProps
|
|
72
|
+
}, ref) => {
|
|
74
73
|
const theme = useContext(ThemeContext);
|
|
75
74
|
const modalRef = useRef(null);
|
|
76
75
|
const environment = useDocument(theme);
|
|
@@ -29,7 +29,7 @@ import '../../styled/StyledDrawerFooter.js';
|
|
|
29
29
|
import '../../styled/StyledDrawerFooterItem.js';
|
|
30
30
|
import { useTooltipDialogContext } from '../../utils/useTooltipDialogContext.js';
|
|
31
31
|
|
|
32
|
-
const BodyComponent = forwardRef((props, ref) => {
|
|
32
|
+
const BodyComponent$1 = forwardRef((props, ref) => {
|
|
33
33
|
const {
|
|
34
34
|
getContentProps
|
|
35
35
|
} = useTooltipDialogContext();
|
|
@@ -37,7 +37,7 @@ const BodyComponent = forwardRef((props, ref) => {
|
|
|
37
37
|
ref: ref
|
|
38
38
|
}));
|
|
39
39
|
});
|
|
40
|
-
BodyComponent.displayName = 'TooltipDialog.Body';
|
|
41
|
-
const Body = BodyComponent;
|
|
40
|
+
BodyComponent$1.displayName = 'TooltipDialog.Body';
|
|
41
|
+
const Body$1 = BodyComponent$1;
|
|
42
42
|
|
|
43
|
-
export { Body };
|
|
43
|
+
export { Body$1 as Body };
|
|
@@ -31,11 +31,11 @@ import { useText } from '@zendeskgarden/react-theming';
|
|
|
31
31
|
import { useTooltipDialogContext } from '../../utils/useTooltipDialogContext.js';
|
|
32
32
|
import SvgXStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js';
|
|
33
33
|
|
|
34
|
-
const CloseComponent = forwardRef((props, ref) => {
|
|
34
|
+
const CloseComponent$1 = forwardRef((props, ref) => {
|
|
35
35
|
const {
|
|
36
36
|
getCloseProps
|
|
37
37
|
} = useTooltipDialogContext();
|
|
38
|
-
const ariaLabel = useText(CloseComponent, props, 'aria-label', 'Close tooltip', props['aria-describedby'] === undefined );
|
|
38
|
+
const ariaLabel = useText(CloseComponent$1, props, 'aria-label', 'Close tooltip', props['aria-describedby'] === undefined );
|
|
39
39
|
return React__default.createElement(StyledTooltipDialogClose, Object.assign({}, getCloseProps({
|
|
40
40
|
...props,
|
|
41
41
|
'aria-label': ariaLabel
|
|
@@ -44,7 +44,7 @@ const CloseComponent = forwardRef((props, ref) => {
|
|
|
44
44
|
size: "small"
|
|
45
45
|
}), React__default.createElement(SvgXStroke, null));
|
|
46
46
|
});
|
|
47
|
-
CloseComponent.displayName = 'TooltipDialog.Close';
|
|
48
|
-
const Close = CloseComponent;
|
|
47
|
+
CloseComponent$1.displayName = 'TooltipDialog.Close';
|
|
48
|
+
const Close$1 = CloseComponent$1;
|
|
49
49
|
|
|
50
|
-
export { Close };
|
|
50
|
+
export { Close$1 as Close };
|
|
@@ -28,10 +28,10 @@ import '../../styled/StyledDrawerBody.js';
|
|
|
28
28
|
import '../../styled/StyledDrawerFooter.js';
|
|
29
29
|
import '../../styled/StyledDrawerFooterItem.js';
|
|
30
30
|
|
|
31
|
-
const FooterComponent = forwardRef((props, ref) => React__default.createElement(StyledTooltipDialogFooter, Object.assign({
|
|
31
|
+
const FooterComponent$1 = forwardRef((props, ref) => React__default.createElement(StyledTooltipDialogFooter, Object.assign({
|
|
32
32
|
ref: ref
|
|
33
33
|
}, props)));
|
|
34
|
-
FooterComponent.displayName = 'TooltipDialog.Footer';
|
|
35
|
-
const Footer = FooterComponent;
|
|
34
|
+
FooterComponent$1.displayName = 'TooltipDialog.Footer';
|
|
35
|
+
const Footer$1 = FooterComponent$1;
|
|
36
36
|
|
|
37
|
-
export { Footer };
|
|
37
|
+
export { Footer$1 as Footer };
|
|
@@ -28,10 +28,10 @@ import '../../styled/StyledDrawerBody.js';
|
|
|
28
28
|
import '../../styled/StyledDrawerFooter.js';
|
|
29
29
|
import '../../styled/StyledDrawerFooterItem.js';
|
|
30
30
|
|
|
31
|
-
const FooterItemComponent = forwardRef((props, ref) => React__default.createElement(StyledTooltipDialogFooterItem, Object.assign({
|
|
31
|
+
const FooterItemComponent$1 = forwardRef((props, ref) => React__default.createElement(StyledTooltipDialogFooterItem, Object.assign({
|
|
32
32
|
ref: ref
|
|
33
33
|
}, props)));
|
|
34
|
-
FooterItemComponent.displayName = 'TooltipDialog.FooterItem';
|
|
35
|
-
const FooterItem = FooterItemComponent;
|
|
34
|
+
FooterItemComponent$1.displayName = 'TooltipDialog.FooterItem';
|
|
35
|
+
const FooterItem$1 = FooterItemComponent$1;
|
|
36
36
|
|
|
37
|
-
export { FooterItem };
|
|
37
|
+
export { FooterItem$1 as FooterItem };
|
|
@@ -30,12 +30,11 @@ import '../../styled/StyledDrawerBody.js';
|
|
|
30
30
|
import '../../styled/StyledDrawerFooter.js';
|
|
31
31
|
import '../../styled/StyledDrawerFooterItem.js';
|
|
32
32
|
|
|
33
|
-
const TitleComponent = forwardRef((
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = _ref;
|
|
33
|
+
const TitleComponent = forwardRef(({
|
|
34
|
+
children,
|
|
35
|
+
tag = 'div',
|
|
36
|
+
...other
|
|
37
|
+
}, ref) => {
|
|
39
38
|
const {
|
|
40
39
|
getTitleProps,
|
|
41
40
|
hasTitle,
|
|
@@ -8,7 +8,7 @@ import React__default, { useContext, useRef, useState, useEffect } from 'react';
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import { ThemeContext } from 'styled-components';
|
|
10
10
|
import { CSSTransition } from 'react-transition-group';
|
|
11
|
-
import { useFloating,
|
|
11
|
+
import { useFloating, offset, autoPlacement, flip, platform, autoUpdate } from '@floating-ui/react-dom';
|
|
12
12
|
import { useModal } from '@zendeskgarden/container-modal';
|
|
13
13
|
import { mergeRefs } from 'react-merge-refs';
|
|
14
14
|
import { TooltipDialogContext } from '../../utils/useTooltipDialogContext.js';
|
|
@@ -44,24 +44,23 @@ import { DEFAULT_THEME, useDocument, getFloatingPlacements, useText } from '@zen
|
|
|
44
44
|
import { createPortal } from 'react-dom';
|
|
45
45
|
|
|
46
46
|
const PLACEMENT_DEFAULT = 'top';
|
|
47
|
-
const TooltipDialogComponent = React__default.forwardRef((
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} = _ref;
|
|
47
|
+
const TooltipDialogComponent = React__default.forwardRef(({
|
|
48
|
+
appendToNode,
|
|
49
|
+
referenceElement,
|
|
50
|
+
placement: _placement = 'auto',
|
|
51
|
+
fallbackPlacements: _fallbackPlacements,
|
|
52
|
+
offset: _offset,
|
|
53
|
+
onClose,
|
|
54
|
+
hasArrow = true,
|
|
55
|
+
keepMounted,
|
|
56
|
+
isAnimated,
|
|
57
|
+
zIndex,
|
|
58
|
+
backdropProps,
|
|
59
|
+
focusOnMount = true,
|
|
60
|
+
restoreFocus = true,
|
|
61
|
+
id,
|
|
62
|
+
...props
|
|
63
|
+
}, ref) => {
|
|
65
64
|
const theme = useContext(ThemeContext) || DEFAULT_THEME;
|
|
66
65
|
const environment = useDocument(theme);
|
|
67
66
|
const previousReferenceElementRef = useRef();
|
|
@@ -69,6 +68,9 @@ const TooltipDialogComponent = React__default.forwardRef((_ref, ref) => {
|
|
|
69
68
|
const transitionRef = useRef(null);
|
|
70
69
|
const [floatingElement, setFloatingElement] = useState();
|
|
71
70
|
const [hasTitle, setHasTitle] = useState(false);
|
|
71
|
+
const handleClose = event => {
|
|
72
|
+
referenceElement && onClose?.(event);
|
|
73
|
+
};
|
|
72
74
|
const {
|
|
73
75
|
getTitleProps,
|
|
74
76
|
getCloseProps,
|
|
@@ -77,7 +79,7 @@ const TooltipDialogComponent = React__default.forwardRef((_ref, ref) => {
|
|
|
77
79
|
getModalProps
|
|
78
80
|
} = useModal({
|
|
79
81
|
idPrefix: id,
|
|
80
|
-
onClose,
|
|
82
|
+
onClose: handleClose,
|
|
81
83
|
modalRef,
|
|
82
84
|
focusOnMount,
|
|
83
85
|
restoreFocus: false,
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
function _extends() {
|
|
8
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
+
function _extends$1() {
|
|
8
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
9
9
|
for (var e = 1; e < arguments.length; e++) {
|
|
10
10
|
var t = arguments[e];
|
|
11
11
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
12
12
|
}
|
|
13
13
|
return n;
|
|
14
|
-
}, _extends.apply(null, arguments);
|
|
14
|
+
}, _extends$1.apply(null, arguments);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export { _extends as default };
|
|
17
|
+
export { _extends$1 as default };
|
|
@@ -24,9 +24,9 @@ function _wrapNativeSuper(t) {
|
|
|
24
24
|
return Wrapper.prototype = Object.create(t.prototype, {
|
|
25
25
|
constructor: {
|
|
26
26
|
value: Wrapper,
|
|
27
|
-
enumerable:
|
|
28
|
-
writable:
|
|
29
|
-
configurable:
|
|
27
|
+
enumerable: false,
|
|
28
|
+
writable: true,
|
|
29
|
+
configurable: true
|
|
30
30
|
}
|
|
31
31
|
}), _setPrototypeOf(Wrapper, t);
|
|
32
32
|
}, _wrapNativeSuper(t);
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
|
|
9
9
|
var _g, _circle;
|
|
10
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
|
+
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
11
11
|
var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
|
|
12
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: 16,
|
|
15
15
|
height: 16,
|
|
@@ -505,17 +505,13 @@ function hslToHex(hue, saturation, lightness) {
|
|
|
505
505
|
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
506
506
|
}
|
|
507
507
|
function hsl(value, saturation, lightness) {
|
|
508
|
-
if (typeof value === '
|
|
509
|
-
return hslToHex(value, saturation, lightness);
|
|
510
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
508
|
+
if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
511
509
|
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
512
510
|
}
|
|
513
511
|
throw new PolishedError(1);
|
|
514
512
|
}
|
|
515
513
|
function hsla(value, saturation, lightness, alpha) {
|
|
516
|
-
if (typeof value === '
|
|
517
|
-
return "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
518
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
514
|
+
if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
519
515
|
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
520
516
|
}
|
|
521
517
|
throw new PolishedError(2);
|
|
@@ -529,12 +525,7 @@ function rgb(value, green, blue) {
|
|
|
529
525
|
throw new PolishedError(6);
|
|
530
526
|
}
|
|
531
527
|
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
|
|
532
|
-
if (typeof firstValue === '
|
|
533
|
-
var rgbValue = parseToRgb(firstValue);
|
|
534
|
-
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
535
|
-
} else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {
|
|
536
|
-
return "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
537
|
-
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
528
|
+
if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
538
529
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
539
530
|
}
|
|
540
531
|
throw new PolishedError(7);
|
|
@@ -8,36 +8,33 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import styled, { keyframes, css } from 'styled-components';
|
|
9
9
|
import { getColor, componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'modals.backdrop';
|
|
12
|
-
const animationName = keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
|
|
13
|
-
const animationStyles = props => {
|
|
11
|
+
const COMPONENT_ID$j = 'modals.backdrop';
|
|
12
|
+
const animationName$1 = keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
|
|
13
|
+
const animationStyles$1 = props => {
|
|
14
14
|
if (props.$isAnimated) {
|
|
15
|
-
return css(["animation:", " 0.15s ease-in;"], animationName);
|
|
15
|
+
return css(["animation:", " 0.15s ease-in;"], animationName$1);
|
|
16
16
|
}
|
|
17
17
|
return '';
|
|
18
18
|
};
|
|
19
19
|
const StyledBackdrop = styled.div.attrs({
|
|
20
|
-
'data-garden-id': COMPONENT_ID,
|
|
21
|
-
'data-garden-version': '9.12.
|
|
20
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
21
|
+
'data-garden-version': '9.12.5'
|
|
22
22
|
}).withConfig({
|
|
23
23
|
displayName: "StyledBackdrop",
|
|
24
24
|
componentId: "sc-mzdjpo-0"
|
|
25
|
-
})(["display:flex;position:fixed;inset:0;align-items:", ";justify-content:", ";z-index:400;background-color:", ";overflow:auto;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";", ";", ";"], props => props.$isCentered && 'center', props => props.$isCentered && 'center',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}, props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', animationStyles, componentStyles);
|
|
25
|
+
})(["display:flex;position:fixed;inset:0;align-items:", ";justify-content:", ";z-index:400;background-color:", ";overflow:auto;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";", ";", ";"], props => props.$isCentered && 'center', props => props.$isCentered && 'center', ({
|
|
26
|
+
theme
|
|
27
|
+
}) => getColor({
|
|
28
|
+
theme,
|
|
29
|
+
hue: 'neutralHue',
|
|
30
|
+
transparency: theme.opacity[1000],
|
|
31
|
+
light: {
|
|
32
|
+
shade: 900
|
|
33
|
+
},
|
|
34
|
+
dark: {
|
|
35
|
+
shade: 1200
|
|
36
|
+
}
|
|
37
|
+
}), props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', animationStyles$1, componentStyles);
|
|
41
38
|
StyledBackdrop.propTypes = {
|
|
42
39
|
$isCentered: PropTypes.bool,
|
|
43
40
|
$isAnimated: PropTypes.bool
|
|
@@ -7,21 +7,18 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { getLineHeight, getColor, componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'modals.body';
|
|
10
|
+
const COMPONENT_ID$i = 'modals.body';
|
|
11
11
|
const StyledBody = styled.div.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
13
|
+
'data-garden-version': '9.12.5'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledBody",
|
|
16
16
|
componentId: "sc-14rzecg-0"
|
|
17
|
-
})(["display:block;margin:0;padding:", ";height:100%;overflow:auto;line-height:", ";color-scheme:only ", ";color:", ";font-size:", ";", ";"], props => `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px`, props => getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), p => p.theme.colors.base,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
variable: 'foreground.default'
|
|
24
|
-
});
|
|
25
|
-
}, props => props.theme.fontSizes.md, componentStyles);
|
|
17
|
+
})(["display:block;margin:0;padding:", ";height:100%;overflow:auto;line-height:", ";color-scheme:only ", ";color:", ";font-size:", ";", ";"], props => `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px`, props => getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), p => p.theme.colors.base, ({
|
|
18
|
+
theme
|
|
19
|
+
}) => getColor({
|
|
20
|
+
theme,
|
|
21
|
+
variable: 'foreground.default'
|
|
22
|
+
}), props => props.theme.fontSizes.md, componentStyles);
|
|
26
23
|
|
|
27
24
|
export { StyledBody };
|
|
@@ -8,18 +8,18 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { IconButton } from '@zendeskgarden/react-buttons';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'modals.close';
|
|
12
|
-
const BASE_MULTIPLIERS = {
|
|
11
|
+
const COMPONENT_ID$h = 'modals.close';
|
|
12
|
+
const BASE_MULTIPLIERS$1 = {
|
|
13
13
|
top: 2.5,
|
|
14
14
|
side: 6.5,
|
|
15
15
|
size: 10
|
|
16
16
|
};
|
|
17
17
|
const StyledClose = styled(IconButton).attrs({
|
|
18
|
-
'data-garden-id': COMPONENT_ID,
|
|
19
|
-
'data-garden-version': '9.12.
|
|
18
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
19
|
+
'data-garden-version': '9.12.5'
|
|
20
20
|
}).withConfig({
|
|
21
21
|
displayName: "StyledClose",
|
|
22
22
|
componentId: "sc-iseudj-0"
|
|
23
|
-
})(["position:absolute;top:", "px;", ":", ";", ";"], props => props.theme.space.base * BASE_MULTIPLIERS.top, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base * BASE_MULTIPLIERS.side}px`, componentStyles);
|
|
23
|
+
})(["position:absolute;top:", "px;", ":", ";", ";"], props => props.theme.space.base * BASE_MULTIPLIERS$1.top, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base * BASE_MULTIPLIERS$1.side}px`, componentStyles);
|
|
24
24
|
|
|
25
|
-
export { BASE_MULTIPLIERS, StyledClose };
|
|
25
|
+
export { BASE_MULTIPLIERS$1 as BASE_MULTIPLIERS, StyledClose };
|
|
@@ -7,12 +7,11 @@
|
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'modals.drawer_modal';
|
|
10
|
+
const COMPONENT_ID$5 = 'modals.drawer_modal';
|
|
11
11
|
const DRAWER_WIDTH = 380;
|
|
12
|
-
const colorStyles =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
12
|
+
const colorStyles = ({
|
|
13
|
+
theme
|
|
14
|
+
}) => {
|
|
16
15
|
const offsetY = `${theme.space.base * 5}px`;
|
|
17
16
|
const blurRadius = `${theme.space.base * 7}px`;
|
|
18
17
|
const shadowColor = getColor({
|
|
@@ -31,8 +30,8 @@ const colorStyles = _ref => {
|
|
|
31
30
|
return css(["border-color:", ";box-shadow:", ";background-color:", ";"], borderColor, shadow, backgroundColor);
|
|
32
31
|
};
|
|
33
32
|
const StyledDrawer = styled.div.attrs({
|
|
34
|
-
'data-garden-id': COMPONENT_ID,
|
|
35
|
-
'data-garden-version': '9.12.
|
|
33
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
34
|
+
'data-garden-version': '9.12.5'
|
|
36
35
|
}).withConfig({
|
|
37
36
|
displayName: "StyledDrawer",
|
|
38
37
|
componentId: "sc-zp66t3-0"
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { StyledBody } from './StyledBody.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'modals.drawer_modal.body';
|
|
11
|
+
const COMPONENT_ID$2 = 'modals.drawer_modal.body';
|
|
12
12
|
const StyledDrawerBody = styled(StyledBody).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$2,
|
|
14
|
+
'data-garden-version': '9.12.5'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledDrawerBody",
|
|
17
17
|
componentId: "sc-13qufyn-0"
|
|
@@ -8,15 +8,14 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { StyledClose, BASE_MULTIPLIERS as BASE_MULTIPLIERS$1 } from './StyledClose.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'modals.drawer_modal.close';
|
|
11
|
+
const COMPONENT_ID$4 = 'modals.drawer_modal.close';
|
|
12
12
|
const BASE_MULTIPLIERS = {
|
|
13
|
-
top: BASE_MULTIPLIERS$1.top,
|
|
14
13
|
side: 2,
|
|
15
14
|
size: BASE_MULTIPLIERS$1.size
|
|
16
15
|
};
|
|
17
16
|
const StyledDrawerClose = styled(StyledClose).attrs({
|
|
18
|
-
'data-garden-id': COMPONENT_ID,
|
|
19
|
-
'data-garden-version': '9.12.
|
|
17
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
18
|
+
'data-garden-version': '9.12.5'
|
|
20
19
|
}).withConfig({
|
|
21
20
|
displayName: "StyledDrawerClose",
|
|
22
21
|
componentId: "sc-1a0xt3x-0"
|