@zendeskgarden/react-modals 9.1.1 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/elements/Drawer/Drawer.js +1 -1
- package/dist/esm/elements/Drawer/Header.js +1 -1
- package/dist/esm/elements/Footer.js +1 -1
- package/dist/esm/elements/Header.js +1 -1
- package/dist/esm/elements/Modal.js +5 -5
- package/dist/esm/elements/TooltipDialog/TooltipDialog.js +7 -7
- package/dist/esm/styled/StyledBackdrop.js +5 -5
- package/dist/esm/styled/StyledBody.js +1 -1
- package/dist/esm/styled/StyledClose.js +1 -1
- package/dist/esm/styled/StyledDrawer.js +1 -1
- package/dist/esm/styled/StyledDrawerBody.js +1 -1
- package/dist/esm/styled/StyledDrawerClose.js +1 -1
- package/dist/esm/styled/StyledDrawerFooter.js +1 -1
- package/dist/esm/styled/StyledDrawerFooterItem.js +1 -1
- package/dist/esm/styled/StyledDrawerHeader.js +2 -2
- package/dist/esm/styled/StyledFooter.js +3 -3
- package/dist/esm/styled/StyledFooterItem.js +1 -1
- package/dist/esm/styled/StyledHeader.js +4 -4
- package/dist/esm/styled/StyledModal.js +6 -6
- package/dist/esm/styled/StyledTooltipDialog.js +6 -6
- package/dist/esm/styled/StyledTooltipDialogBackdrop.js +1 -1
- package/dist/esm/styled/StyledTooltipDialogBody.js +1 -1
- package/dist/esm/styled/StyledTooltipDialogClose.js +1 -1
- package/dist/esm/styled/StyledTooltipDialogFooter.js +1 -1
- package/dist/esm/styled/StyledTooltipDialogFooterItem.js +1 -1
- package/dist/esm/styled/StyledTooltipDialogTitle.js +1 -1
- package/dist/esm/styled/StyledTooltipWrapper.js +3 -3
- package/dist/index.cjs.js +59 -59
- package/dist/typings/styled/StyledBackdrop.d.ts +2 -2
- package/dist/typings/styled/StyledFooter.d.ts +1 -1
- package/dist/typings/styled/StyledHeader.d.ts +2 -2
- package/dist/typings/styled/StyledModal.d.ts +3 -3
- package/dist/typings/styled/StyledTooltipDialog.d.ts +5 -4
- package/dist/typings/styled/StyledTooltipWrapper.d.ts +4 -3
- package/package.json +4 -4
|
@@ -154,7 +154,7 @@ const DrawerComponent = forwardRef((_ref, ref) => {
|
|
|
154
154
|
classNames: "garden-drawer-transition",
|
|
155
155
|
nodeRef: transitionRef
|
|
156
156
|
}, React__default.createElement(StyledBackdrop, Object.assign({
|
|
157
|
-
isAnimated: true
|
|
157
|
+
$isAnimated: true
|
|
158
158
|
}, getBackdropProps(backdropProps)), React__default.createElement(StyledDrawer, Object.assign({}, modalProps, ariaProps, props, {
|
|
159
159
|
ref: mergeRefs([ref, modalRef, transitionRef])
|
|
160
160
|
}))))), rootNode);
|
|
@@ -53,7 +53,7 @@ const HeaderComponent = forwardRef((_ref, ref) => {
|
|
|
53
53
|
}, [hasHeader, setHasHeader]);
|
|
54
54
|
return React__default.createElement(StyledDrawerHeader, Object.assign({}, getTitleProps(other), {
|
|
55
55
|
as: tag,
|
|
56
|
-
isCloseButtonPresent: isCloseButtonPresent,
|
|
56
|
+
$isCloseButtonPresent: isCloseButtonPresent,
|
|
57
57
|
ref: ref
|
|
58
58
|
}));
|
|
59
59
|
});
|
|
@@ -35,7 +35,7 @@ const Footer = React__default.forwardRef((props, ref) => {
|
|
|
35
35
|
} = useModalContext();
|
|
36
36
|
return React__default.createElement(StyledFooter, Object.assign({
|
|
37
37
|
ref: ref,
|
|
38
|
-
isLarge: isLarge
|
|
38
|
+
$isLarge: isLarge
|
|
39
39
|
}, props));
|
|
40
40
|
});
|
|
41
41
|
Footer.displayName = 'Modal.Footer';
|
|
@@ -54,7 +54,7 @@ const Header = forwardRef((_ref, ref) => {
|
|
|
54
54
|
}, [hasHeader, setHasHeader]);
|
|
55
55
|
return React__default.createElement(StyledHeader, Object.assign({}, getTitleProps(other), {
|
|
56
56
|
as: tag,
|
|
57
|
-
isCloseButtonPresent: isCloseButtonPresent,
|
|
57
|
+
$isCloseButtonPresent: isCloseButtonPresent,
|
|
58
58
|
ref: ref
|
|
59
59
|
}), !!other.isDanger && React__default.createElement(StyledDangerIcon, null), children);
|
|
60
60
|
});
|
|
@@ -156,12 +156,12 @@ const ModalComponent = forwardRef((_ref, ref) => {
|
|
|
156
156
|
return createPortal(React__default.createElement(ModalsContext.Provider, {
|
|
157
157
|
value: value
|
|
158
158
|
}, React__default.createElement(StyledBackdrop, Object.assign({
|
|
159
|
-
isCentered: isCentered,
|
|
160
|
-
isAnimated: isAnimated
|
|
159
|
+
$isCentered: isCentered,
|
|
160
|
+
$isAnimated: isAnimated
|
|
161
161
|
}, getBackdropProps(backdropProps)), React__default.createElement(StyledModal, Object.assign({
|
|
162
|
-
isCentered: isCentered,
|
|
163
|
-
isAnimated: isAnimated,
|
|
164
|
-
isLarge: isLarge
|
|
162
|
+
$isCentered: isCentered,
|
|
163
|
+
$isAnimated: isAnimated,
|
|
164
|
+
$isLarge: isLarge
|
|
165
165
|
}, modalContainerProps, ariaProps, modalProps, {
|
|
166
166
|
ref: mergeRefs([ref, modalRef])
|
|
167
167
|
}), children))), rootNode);
|
|
@@ -150,14 +150,14 @@ const TooltipDialogComponent = React__default.forwardRef((_ref, ref) => {
|
|
|
150
150
|
style: {
|
|
151
151
|
transform
|
|
152
152
|
},
|
|
153
|
-
placement: placement,
|
|
154
|
-
zIndex: zIndex,
|
|
155
|
-
isAnimated: isAnimated
|
|
153
|
+
$placement: placement,
|
|
154
|
+
$zIndex: zIndex,
|
|
155
|
+
$isAnimated: isAnimated
|
|
156
156
|
}, React__default.createElement(StyledTooltipDialog, Object.assign({
|
|
157
|
-
transitionState: transitionState,
|
|
158
|
-
placement: placement,
|
|
159
|
-
hasArrow: hasArrow,
|
|
160
|
-
isAnimated: isAnimated
|
|
157
|
+
$transitionState: transitionState,
|
|
158
|
+
$placement: placement,
|
|
159
|
+
$hasArrow: hasArrow,
|
|
160
|
+
$isAnimated: isAnimated
|
|
161
161
|
}, modalProps, ariaProps, props, {
|
|
162
162
|
ref: mergeRefs([modalRef, ref])
|
|
163
163
|
})))));
|
|
@@ -11,18 +11,18 @@ import { getColor, retrieveComponentStyles } from '@zendeskgarden/react-theming'
|
|
|
11
11
|
const COMPONENT_ID = 'modals.backdrop';
|
|
12
12
|
const animationName = keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
|
|
13
13
|
const animationStyles = props => {
|
|
14
|
-
if (props
|
|
14
|
+
if (props.$isAnimated) {
|
|
15
15
|
return css(["animation:", " 0.15s ease-in;"], animationName);
|
|
16
16
|
}
|
|
17
17
|
return '';
|
|
18
18
|
};
|
|
19
19
|
const StyledBackdrop = styled.div.attrs({
|
|
20
20
|
'data-garden-id': COMPONENT_ID,
|
|
21
|
-
'data-garden-version': '9.
|
|
21
|
+
'data-garden-version': '9.2.0'
|
|
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
|
|
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', _ref => {
|
|
26
26
|
let {
|
|
27
27
|
theme
|
|
28
28
|
} = _ref;
|
|
@@ -39,8 +39,8 @@ const StyledBackdrop = styled.div.attrs({
|
|
|
39
39
|
});
|
|
40
40
|
}, props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', animationStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
41
41
|
StyledBackdrop.propTypes = {
|
|
42
|
-
isCentered: PropTypes.bool,
|
|
43
|
-
isAnimated: PropTypes.bool
|
|
42
|
+
$isCentered: PropTypes.bool,
|
|
43
|
+
$isAnimated: PropTypes.bool
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export { StyledBackdrop };
|
|
@@ -10,7 +10,7 @@ import { getLineHeight, getColor, retrieveComponentStyles } from '@zendeskgarden
|
|
|
10
10
|
const COMPONENT_ID = 'modals.body';
|
|
11
11
|
const StyledBody = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.2.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledBody",
|
|
16
16
|
componentId: "sc-14rzecg-0"
|
|
@@ -16,7 +16,7 @@ const BASE_MULTIPLIERS = {
|
|
|
16
16
|
};
|
|
17
17
|
const StyledClose = styled(IconButton).attrs({
|
|
18
18
|
'data-garden-id': COMPONENT_ID,
|
|
19
|
-
'data-garden-version': '9.
|
|
19
|
+
'data-garden-version': '9.2.0'
|
|
20
20
|
}).withConfig({
|
|
21
21
|
displayName: "StyledClose",
|
|
22
22
|
componentId: "sc-iseudj-0"
|
|
@@ -32,7 +32,7 @@ const colorStyles = _ref => {
|
|
|
32
32
|
};
|
|
33
33
|
const StyledDrawer = styled.div.attrs({
|
|
34
34
|
'data-garden-id': COMPONENT_ID,
|
|
35
|
-
'data-garden-version': '9.
|
|
35
|
+
'data-garden-version': '9.2.0'
|
|
36
36
|
}).withConfig({
|
|
37
37
|
displayName: "StyledDrawer",
|
|
38
38
|
componentId: "sc-zp66t3-0"
|
|
@@ -11,7 +11,7 @@ import { StyledBody } from './StyledBody.js';
|
|
|
11
11
|
const COMPONENT_ID = 'modals.drawer_modal.body';
|
|
12
12
|
const StyledDrawerBody = styled(StyledBody).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.2.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledDrawerBody",
|
|
17
17
|
componentId: "sc-13qufyn-0"
|
|
@@ -16,7 +16,7 @@ const BASE_MULTIPLIERS = {
|
|
|
16
16
|
};
|
|
17
17
|
const StyledDrawerClose = styled(StyledClose).attrs({
|
|
18
18
|
'data-garden-id': COMPONENT_ID,
|
|
19
|
-
'data-garden-version': '9.
|
|
19
|
+
'data-garden-version': '9.2.0'
|
|
20
20
|
}).withConfig({
|
|
21
21
|
displayName: "StyledDrawerClose",
|
|
22
22
|
componentId: "sc-1a0xt3x-0"
|
|
@@ -10,7 +10,7 @@ import { getColor, retrieveComponentStyles } from '@zendeskgarden/react-theming'
|
|
|
10
10
|
const COMPONENT_ID = 'modals.drawer_modal.footer';
|
|
11
11
|
const StyledDrawerFooter = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.2.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledDrawerFooter",
|
|
16
16
|
componentId: "sc-kc7e6p-0"
|
|
@@ -11,7 +11,7 @@ import { StyledFooterItem } from './StyledFooterItem.js';
|
|
|
11
11
|
const COMPONENT_ID = 'modals.drawer_modal.footer_item';
|
|
12
12
|
const StyledDrawerFooterItem = styled(StyledFooterItem).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.2.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledDrawerFooterItem",
|
|
17
17
|
componentId: "sc-m2yul4-0"
|
|
@@ -12,10 +12,10 @@ import { BASE_MULTIPLIERS } from './StyledDrawerClose.js';
|
|
|
12
12
|
const COMPONENT_ID = 'modals.drawer_modal.header';
|
|
13
13
|
const StyledDrawerHeader = styled(StyledHeader).attrs({
|
|
14
14
|
'data-garden-id': COMPONENT_ID,
|
|
15
|
-
'data-garden-version': '9.
|
|
15
|
+
'data-garden-version': '9.2.0'
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "StyledDrawerHeader",
|
|
18
18
|
componentId: "sc-y4mgkj-0"
|
|
19
|
-
})(["padding:", "px;", " ", ";"], props => props.theme.space.base * 5, props => props
|
|
19
|
+
})(["padding:", "px;", " ", ";"], props => props.theme.space.base * 5, props => props.$isCloseButtonPresent && `padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * (BASE_MULTIPLIERS.size + BASE_MULTIPLIERS.side + 2)}px;`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
20
20
|
|
|
21
21
|
export { StyledDrawerHeader };
|
|
@@ -10,13 +10,13 @@ import { getColor, retrieveComponentStyles } from '@zendeskgarden/react-theming'
|
|
|
10
10
|
const COMPONENT_ID = 'modals.footer';
|
|
11
11
|
const StyledFooter = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.2.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledFooter",
|
|
16
16
|
componentId: "sc-d8pfdu-0"
|
|
17
|
-
})(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:", ";padding:", ";", ";"], props => props
|
|
17
|
+
})(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:", ";padding:", ";", ";"], props => props.$isLarge && `${props.theme.borders.sm} ${getColor({
|
|
18
18
|
theme: props.theme,
|
|
19
19
|
variable: 'border.default'
|
|
20
|
-
})}`, props => props
|
|
20
|
+
})}`, props => props.$isLarge ? `${props.theme.space.base * 8}px ${props.theme.space.base * 10}px` : `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px ${props.theme.space.base * 8}px`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
21
21
|
|
|
22
22
|
export { StyledFooter };
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'modals.footer_item';
|
|
11
11
|
const StyledFooterItem = styled.span.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.2.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledFooterItem",
|
|
16
16
|
componentId: "sc-1mb76hl-0"
|
|
@@ -11,7 +11,7 @@ import { BASE_MULTIPLIERS } from './StyledClose.js';
|
|
|
11
11
|
const COMPONENT_ID = 'modals.header';
|
|
12
12
|
const colorStyles = _ref => {
|
|
13
13
|
let {
|
|
14
|
-
isDanger,
|
|
14
|
+
$isDanger,
|
|
15
15
|
theme
|
|
16
16
|
} = _ref;
|
|
17
17
|
const bottomBorderColor = getColor({
|
|
@@ -20,16 +20,16 @@ const colorStyles = _ref => {
|
|
|
20
20
|
});
|
|
21
21
|
const color = getColor({
|
|
22
22
|
theme,
|
|
23
|
-
variable: isDanger ? 'foreground.danger' : 'foreground.default'
|
|
23
|
+
variable: $isDanger ? 'foreground.danger' : 'foreground.default'
|
|
24
24
|
});
|
|
25
25
|
return css(["border-bottom-color:", ";color:", ";"], bottomBorderColor, color);
|
|
26
26
|
};
|
|
27
27
|
const StyledHeader = styled.div.attrs({
|
|
28
28
|
'data-garden-id': COMPONENT_ID,
|
|
29
|
-
'data-garden-version': '9.
|
|
29
|
+
'data-garden-version': '9.2.0'
|
|
30
30
|
}).withConfig({
|
|
31
31
|
displayName: "StyledHeader",
|
|
32
32
|
componentId: "sc-1787r9v-0"
|
|
33
|
-
})(["display:block;position:", ";margin:0;border-bottom:", ";padding:", ";", " line-height:", ";font-size:", ";font-weight:", ";", ";", ";"], props => props
|
|
33
|
+
})(["display:block;position:", ";margin:0;border-bottom:", ";padding:", ";", " line-height:", ";font-size:", ";font-weight:", ";", ";", ";"], props => props.$isDanger && 'relative', props => props.theme.borders.sm, props => `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px`, props => props.$isCloseButtonPresent && `padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * (BASE_MULTIPLIERS.size + BASE_MULTIPLIERS.side + 2)}px;`, props => getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props => props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
34
34
|
|
|
35
35
|
export { StyledHeader };
|
|
@@ -11,7 +11,7 @@ import { retrieveComponentStyles, getColor, mediaQuery } from '@zendeskgarden/re
|
|
|
11
11
|
const COMPONENT_ID = 'modals.modal';
|
|
12
12
|
const animationName = keyframes(["0%{transform:scale(0);opacity:0;}50%{transform:scale(1.05);}100%{opacity:1;}"]);
|
|
13
13
|
const animationStyles = props => {
|
|
14
|
-
if (props
|
|
14
|
+
if (props.$isAnimated) {
|
|
15
15
|
return css(["animation:", " 0.3s ease-in;"], animationName);
|
|
16
16
|
}
|
|
17
17
|
return '';
|
|
@@ -38,18 +38,18 @@ const colorStyles = _ref => {
|
|
|
38
38
|
return css(["border-color:", ";box-shadow:", ";background-color:", ";"], borderColor, shadow, backgroundColor);
|
|
39
39
|
};
|
|
40
40
|
const sizeStyles = props => {
|
|
41
|
-
return css(["", "{width:", ";}"], mediaQuery('up', props
|
|
41
|
+
return css(["", "{width:", ";}"], mediaQuery('up', props.$isLarge ? 'md' : 'sm', props.theme), props.$isLarge ? props.theme.breakpoints.md : props.theme.breakpoints.sm);
|
|
42
42
|
};
|
|
43
43
|
const StyledModal = styled.div.attrs({
|
|
44
44
|
'data-garden-id': COMPONENT_ID,
|
|
45
|
-
'data-garden-version': '9.
|
|
45
|
+
'data-garden-version': '9.2.0'
|
|
46
46
|
}).withConfig({
|
|
47
47
|
displayName: "StyledModal",
|
|
48
48
|
componentId: "sc-1pe1axu-0"
|
|
49
|
-
})(["display:flex;position:fixed;flex-direction:column;animation-delay:0.01s;margin:", ";border:", ";border-radius:", ";min-height:60px;max-height:calc(100vh - ", "px);overflow:auto;direction:", ";", ";", ";", ";&:focus{outline:none;}@media (max-height:399px){top:", "px;bottom:auto;margin-bottom:", "px;max-height:none;}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){right:", ";bottom:", ";transform:", ";}", ";"], props => props
|
|
49
|
+
})(["display:flex;position:fixed;flex-direction:column;animation-delay:0.01s;margin:", ";border:", ";border-radius:", ";min-height:60px;max-height:calc(100vh - ", "px);overflow:auto;direction:", ";", ";", ";", ";&:focus{outline:none;}@media (max-height:399px){top:", "px;bottom:auto;margin-bottom:", "px;max-height:none;}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){right:", ";bottom:", ";transform:", ";}", ";"], props => props.$isCentered ? '0' : `${props.theme.space.base * 12}px`, props => props.theme.borders.sm, props => props.theme.borderRadii.md, props => props.theme.space.base * 24, props => props.theme.rtl && 'rtl', animationStyles, sizeStyles, colorStyles, props => props.theme.space.base * 6, props => props.theme.space.base * 6, props => props.$isCentered && '50%', props => props.$isCentered && '50%', props => props.$isCentered && 'translate(50%, 50%)', props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
50
50
|
StyledModal.propTypes = {
|
|
51
|
-
isLarge: PropTypes.bool,
|
|
52
|
-
isAnimated: PropTypes.bool
|
|
51
|
+
$isLarge: PropTypes.bool,
|
|
52
|
+
$isAnimated: PropTypes.bool
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
export { StyledModal };
|
|
@@ -19,21 +19,21 @@ const sizeStyles = props => `
|
|
|
19
19
|
`;
|
|
20
20
|
const StyledTooltipDialog = styled.div.attrs(props => ({
|
|
21
21
|
'data-garden-id': COMPONENT_ID,
|
|
22
|
-
'data-garden-version': '9.
|
|
23
|
-
className: props
|
|
22
|
+
'data-garden-version': '9.2.0',
|
|
23
|
+
className: props.$isAnimated && 'is-animated'
|
|
24
24
|
})).withConfig({
|
|
25
25
|
displayName: "StyledTooltipDialog",
|
|
26
26
|
componentId: "sc-iv3db-0"
|
|
27
27
|
})(["", ";", " ", ";"], props => {
|
|
28
|
-
const computedArrowStyles = arrowStyles(getArrowPosition(props.theme, props
|
|
28
|
+
const computedArrowStyles = arrowStyles(getArrowPosition(props.theme, props.$placement), {
|
|
29
29
|
size: `${props.theme.space.base * 2}px`,
|
|
30
30
|
inset: '1px',
|
|
31
31
|
animationModifier: '.is-animated'
|
|
32
32
|
});
|
|
33
|
-
if (props
|
|
34
|
-
return props
|
|
33
|
+
if (props.$isAnimated) {
|
|
34
|
+
return props.$hasArrow && props.$transitionState === 'entered' && computedArrowStyles;
|
|
35
35
|
}
|
|
36
|
-
return props
|
|
36
|
+
return props.$hasArrow && computedArrowStyles;
|
|
37
37
|
}, sizeStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
38
38
|
|
|
39
39
|
export { StyledTooltipDialog };
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'modals.tooltip_dialog.backdrop';
|
|
11
11
|
const StyledTooltipDialogBackdrop = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.2.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledTooltipDialogBackdrop",
|
|
16
16
|
componentId: "sc-zrk625-0"
|
|
@@ -10,7 +10,7 @@ import { getLineHeight, getColor, retrieveComponentStyles } from '@zendeskgarden
|
|
|
10
10
|
const COMPONENT_ID = 'modals.tooltip_dialog.body';
|
|
11
11
|
const StyledTooltipDialogBody = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.2.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledTooltipDialogBody",
|
|
16
16
|
componentId: "sc-132lcoq-0"
|
|
@@ -11,7 +11,7 @@ import { StyledClose } from './StyledClose.js';
|
|
|
11
11
|
const COMPONENT_ID = 'modals.tooltip_dialog.close';
|
|
12
12
|
const StyledTooltipDialogClose = styled(StyledClose).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.2.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledTooltipDialogClose",
|
|
17
17
|
componentId: "sc-18xlgfi-0"
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'modals.tooltip_dialog.footer';
|
|
11
11
|
const StyledTooltipDialogFooter = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.
|
|
13
|
+
'data-garden-version': '9.2.0'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledTooltipDialogFooter",
|
|
16
16
|
componentId: "sc-kjomsm-0"
|
|
@@ -11,7 +11,7 @@ import { StyledFooterItem } from './StyledFooterItem.js';
|
|
|
11
11
|
const COMPONENT_ID = 'modals.tooltip_dialog.footer_item';
|
|
12
12
|
const StyledTooltipDialogFooterItem = styled(StyledFooterItem).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.
|
|
14
|
+
'data-garden-version': '9.2.0'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledTooltipDialogFooterItem",
|
|
17
17
|
componentId: "sc-u2rmo8-0"
|
|
@@ -15,7 +15,7 @@ const sizeStyles = props => `
|
|
|
15
15
|
`;
|
|
16
16
|
const StyledTooltipDialogTitle = styled.div.attrs({
|
|
17
17
|
'data-garden-id': COMPONENT_ID,
|
|
18
|
-
'data-garden-version': '9.
|
|
18
|
+
'data-garden-version': '9.2.0'
|
|
19
19
|
}).withConfig({
|
|
20
20
|
displayName: "StyledTooltipDialogTitle",
|
|
21
21
|
componentId: "sc-1rceixg-0"
|
|
@@ -8,14 +8,14 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { menuStyles, getMenuPosition } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
10
|
const StyledTooltipWrapper = styled.div.attrs(props => ({
|
|
11
|
-
className: props
|
|
11
|
+
className: props.$isAnimated && 'is-animated'
|
|
12
12
|
})).withConfig({
|
|
13
13
|
displayName: "StyledTooltipWrapper",
|
|
14
14
|
componentId: "sc-1xk05kf-0"
|
|
15
|
-
})(["top:0;left:0;", ";"], props => menuStyles(getMenuPosition(props
|
|
15
|
+
})(["top:0;left:0;", ";"], props => menuStyles(getMenuPosition(props.$placement), {
|
|
16
16
|
theme: props.theme,
|
|
17
17
|
hidden: false,
|
|
18
|
-
zIndex: props
|
|
18
|
+
zIndex: props.$zIndex,
|
|
19
19
|
animationModifier: '.is-animated'
|
|
20
20
|
}));
|
|
21
21
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -57,18 +57,18 @@ var activeElement__default = /*#__PURE__*/_interopDefault(activeElement);
|
|
|
57
57
|
const COMPONENT_ID$j = 'modals.backdrop';
|
|
58
58
|
const animationName$1 = styled.keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
|
|
59
59
|
const animationStyles$1 = props => {
|
|
60
|
-
if (props
|
|
60
|
+
if (props.$isAnimated) {
|
|
61
61
|
return styled.css(["animation:", " 0.15s ease-in;"], animationName$1);
|
|
62
62
|
}
|
|
63
63
|
return '';
|
|
64
64
|
};
|
|
65
65
|
const StyledBackdrop = styled__default.default.div.attrs({
|
|
66
66
|
'data-garden-id': COMPONENT_ID$j,
|
|
67
|
-
'data-garden-version': '9.
|
|
67
|
+
'data-garden-version': '9.2.0'
|
|
68
68
|
}).withConfig({
|
|
69
69
|
displayName: "StyledBackdrop",
|
|
70
70
|
componentId: "sc-mzdjpo-0"
|
|
71
|
-
})(["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
|
|
71
|
+
})(["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', _ref => {
|
|
72
72
|
let {
|
|
73
73
|
theme
|
|
74
74
|
} = _ref;
|
|
@@ -85,14 +85,14 @@ const StyledBackdrop = styled__default.default.div.attrs({
|
|
|
85
85
|
});
|
|
86
86
|
}, props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', animationStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$j, props));
|
|
87
87
|
StyledBackdrop.propTypes = {
|
|
88
|
-
isCentered: PropTypes__default.default.bool,
|
|
89
|
-
isAnimated: PropTypes__default.default.bool
|
|
88
|
+
$isCentered: PropTypes__default.default.bool,
|
|
89
|
+
$isAnimated: PropTypes__default.default.bool
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
const COMPONENT_ID$i = 'modals.body';
|
|
93
93
|
const StyledBody = styled__default.default.div.attrs({
|
|
94
94
|
'data-garden-id': COMPONENT_ID$i,
|
|
95
|
-
'data-garden-version': '9.
|
|
95
|
+
'data-garden-version': '9.2.0'
|
|
96
96
|
}).withConfig({
|
|
97
97
|
displayName: "StyledBody",
|
|
98
98
|
componentId: "sc-14rzecg-0"
|
|
@@ -114,7 +114,7 @@ const BASE_MULTIPLIERS$1 = {
|
|
|
114
114
|
};
|
|
115
115
|
const StyledClose = styled__default.default(reactButtons.IconButton).attrs({
|
|
116
116
|
'data-garden-id': COMPONENT_ID$h,
|
|
117
|
-
'data-garden-version': '9.
|
|
117
|
+
'data-garden-version': '9.2.0'
|
|
118
118
|
}).withConfig({
|
|
119
119
|
displayName: "StyledClose",
|
|
120
120
|
componentId: "sc-iseudj-0"
|
|
@@ -123,19 +123,19 @@ const StyledClose = styled__default.default(reactButtons.IconButton).attrs({
|
|
|
123
123
|
const COMPONENT_ID$g = 'modals.footer';
|
|
124
124
|
const StyledFooter = styled__default.default.div.attrs({
|
|
125
125
|
'data-garden-id': COMPONENT_ID$g,
|
|
126
|
-
'data-garden-version': '9.
|
|
126
|
+
'data-garden-version': '9.2.0'
|
|
127
127
|
}).withConfig({
|
|
128
128
|
displayName: "StyledFooter",
|
|
129
129
|
componentId: "sc-d8pfdu-0"
|
|
130
|
-
})(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:", ";padding:", ";", ";"], props => props
|
|
130
|
+
})(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:", ";padding:", ";", ";"], props => props.$isLarge && `${props.theme.borders.sm} ${reactTheming.getColor({
|
|
131
131
|
theme: props.theme,
|
|
132
132
|
variable: 'border.default'
|
|
133
|
-
})}`, props => props
|
|
133
|
+
})}`, props => props.$isLarge ? `${props.theme.space.base * 8}px ${props.theme.space.base * 10}px` : `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px ${props.theme.space.base * 8}px`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
134
134
|
|
|
135
135
|
const COMPONENT_ID$f = 'modals.footer_item';
|
|
136
136
|
const StyledFooterItem = styled__default.default.span.attrs({
|
|
137
137
|
'data-garden-id': COMPONENT_ID$f,
|
|
138
|
-
'data-garden-version': '9.
|
|
138
|
+
'data-garden-version': '9.2.0'
|
|
139
139
|
}).withConfig({
|
|
140
140
|
displayName: "StyledFooterItem",
|
|
141
141
|
componentId: "sc-1mb76hl-0"
|
|
@@ -144,7 +144,7 @@ const StyledFooterItem = styled__default.default.span.attrs({
|
|
|
144
144
|
const COMPONENT_ID$e = 'modals.header';
|
|
145
145
|
const colorStyles$2 = _ref => {
|
|
146
146
|
let {
|
|
147
|
-
isDanger,
|
|
147
|
+
$isDanger,
|
|
148
148
|
theme
|
|
149
149
|
} = _ref;
|
|
150
150
|
const bottomBorderColor = reactTheming.getColor({
|
|
@@ -153,17 +153,17 @@ const colorStyles$2 = _ref => {
|
|
|
153
153
|
});
|
|
154
154
|
const color = reactTheming.getColor({
|
|
155
155
|
theme,
|
|
156
|
-
variable: isDanger ? 'foreground.danger' : 'foreground.default'
|
|
156
|
+
variable: $isDanger ? 'foreground.danger' : 'foreground.default'
|
|
157
157
|
});
|
|
158
158
|
return styled.css(["border-bottom-color:", ";color:", ";"], bottomBorderColor, color);
|
|
159
159
|
};
|
|
160
160
|
const StyledHeader = styled__default.default.div.attrs({
|
|
161
161
|
'data-garden-id': COMPONENT_ID$e,
|
|
162
|
-
'data-garden-version': '9.
|
|
162
|
+
'data-garden-version': '9.2.0'
|
|
163
163
|
}).withConfig({
|
|
164
164
|
displayName: "StyledHeader",
|
|
165
165
|
componentId: "sc-1787r9v-0"
|
|
166
|
-
})(["display:block;position:", ";margin:0;border-bottom:", ";padding:", ";", " line-height:", ";font-size:", ";font-weight:", ";", ";", ";"], props => props
|
|
166
|
+
})(["display:block;position:", ";margin:0;border-bottom:", ";padding:", ";", " line-height:", ";font-size:", ";font-weight:", ";", ";", ";"], props => props.$isDanger && 'relative', props => props.theme.borders.sm, props => `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px`, props => props.$isCloseButtonPresent && `padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * (BASE_MULTIPLIERS$1.size + BASE_MULTIPLIERS$1.side + 2)}px;`, props => reactTheming.getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props => props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
|
|
167
167
|
|
|
168
168
|
var _g, _circle;
|
|
169
169
|
function _extends$1() { return _extends$1 = 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$1.apply(null, arguments); }
|
|
@@ -201,7 +201,7 @@ const StyledDangerIcon = styled__default.default(SvgAlertErrorStroke).withConfig
|
|
|
201
201
|
const COMPONENT_ID$d = 'modals.modal';
|
|
202
202
|
const animationName = styled.keyframes(["0%{transform:scale(0);opacity:0;}50%{transform:scale(1.05);}100%{opacity:1;}"]);
|
|
203
203
|
const animationStyles = props => {
|
|
204
|
-
if (props
|
|
204
|
+
if (props.$isAnimated) {
|
|
205
205
|
return styled.css(["animation:", " 0.3s ease-in;"], animationName);
|
|
206
206
|
}
|
|
207
207
|
return '';
|
|
@@ -228,45 +228,45 @@ const colorStyles$1 = _ref => {
|
|
|
228
228
|
return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";"], borderColor, shadow, backgroundColor);
|
|
229
229
|
};
|
|
230
230
|
const sizeStyles$2 = props => {
|
|
231
|
-
return styled.css(["", "{width:", ";}"], reactTheming.mediaQuery('up', props
|
|
231
|
+
return styled.css(["", "{width:", ";}"], reactTheming.mediaQuery('up', props.$isLarge ? 'md' : 'sm', props.theme), props.$isLarge ? props.theme.breakpoints.md : props.theme.breakpoints.sm);
|
|
232
232
|
};
|
|
233
233
|
const StyledModal = styled__default.default.div.attrs({
|
|
234
234
|
'data-garden-id': COMPONENT_ID$d,
|
|
235
|
-
'data-garden-version': '9.
|
|
235
|
+
'data-garden-version': '9.2.0'
|
|
236
236
|
}).withConfig({
|
|
237
237
|
displayName: "StyledModal",
|
|
238
238
|
componentId: "sc-1pe1axu-0"
|
|
239
|
-
})(["display:flex;position:fixed;flex-direction:column;animation-delay:0.01s;margin:", ";border:", ";border-radius:", ";min-height:60px;max-height:calc(100vh - ", "px);overflow:auto;direction:", ";", ";", ";", ";&:focus{outline:none;}@media (max-height:399px){top:", "px;bottom:auto;margin-bottom:", "px;max-height:none;}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){right:", ";bottom:", ";transform:", ";}", ";"], props => props
|
|
239
|
+
})(["display:flex;position:fixed;flex-direction:column;animation-delay:0.01s;margin:", ";border:", ";border-radius:", ";min-height:60px;max-height:calc(100vh - ", "px);overflow:auto;direction:", ";", ";", ";", ";&:focus{outline:none;}@media (max-height:399px){top:", "px;bottom:auto;margin-bottom:", "px;max-height:none;}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){right:", ";bottom:", ";transform:", ";}", ";"], props => props.$isCentered ? '0' : `${props.theme.space.base * 12}px`, props => props.theme.borders.sm, props => props.theme.borderRadii.md, props => props.theme.space.base * 24, props => props.theme.rtl && 'rtl', animationStyles, sizeStyles$2, colorStyles$1, props => props.theme.space.base * 6, props => props.theme.space.base * 6, props => props.$isCentered && '50%', props => props.$isCentered && '50%', props => props.$isCentered && 'translate(50%, 50%)', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
|
|
240
240
|
StyledModal.propTypes = {
|
|
241
|
-
isLarge: PropTypes__default.default.bool,
|
|
242
|
-
isAnimated: PropTypes__default.default.bool
|
|
241
|
+
$isLarge: PropTypes__default.default.bool,
|
|
242
|
+
$isAnimated: PropTypes__default.default.bool
|
|
243
243
|
};
|
|
244
244
|
|
|
245
245
|
const COMPONENT_ID$c = 'modals.tooltip_dialog.backdrop';
|
|
246
246
|
const StyledTooltipDialogBackdrop = styled__default.default.div.attrs({
|
|
247
247
|
'data-garden-id': COMPONENT_ID$c,
|
|
248
|
-
'data-garden-version': '9.
|
|
248
|
+
'data-garden-version': '9.2.0'
|
|
249
249
|
}).withConfig({
|
|
250
250
|
displayName: "StyledTooltipDialogBackdrop",
|
|
251
251
|
componentId: "sc-zrk625-0"
|
|
252
252
|
})(["position:fixed;inset:0;z-index:400;overflow:hidden;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";&.garden-tooltip-modal-transition-exit-active{pointer-events:none;}&.garden-tooltip-modal-transition-exit-active div{transition:opacity 200ms;opacity:0;}", ";"], props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
|
|
253
253
|
|
|
254
254
|
const StyledTooltipWrapper = styled__default.default.div.attrs(props => ({
|
|
255
|
-
className: props
|
|
255
|
+
className: props.$isAnimated && 'is-animated'
|
|
256
256
|
})).withConfig({
|
|
257
257
|
displayName: "StyledTooltipWrapper",
|
|
258
258
|
componentId: "sc-1xk05kf-0"
|
|
259
|
-
})(["top:0;left:0;", ";"], props => reactTheming.menuStyles(reactTheming.getMenuPosition(props
|
|
259
|
+
})(["top:0;left:0;", ";"], props => reactTheming.menuStyles(reactTheming.getMenuPosition(props.$placement), {
|
|
260
260
|
theme: props.theme,
|
|
261
261
|
hidden: false,
|
|
262
|
-
zIndex: props
|
|
262
|
+
zIndex: props.$zIndex,
|
|
263
263
|
animationModifier: '.is-animated'
|
|
264
264
|
}));
|
|
265
265
|
|
|
266
266
|
const COMPONENT_ID$b = 'modals.tooltip_dialog.close';
|
|
267
267
|
const StyledTooltipDialogClose = styled__default.default(StyledClose).attrs({
|
|
268
268
|
'data-garden-id': COMPONENT_ID$b,
|
|
269
|
-
'data-garden-version': '9.
|
|
269
|
+
'data-garden-version': '9.2.0'
|
|
270
270
|
}).withConfig({
|
|
271
271
|
displayName: "StyledTooltipDialogClose",
|
|
272
272
|
componentId: "sc-18xlgfi-0"
|
|
@@ -283,21 +283,21 @@ const sizeStyles$1 = props => `
|
|
|
283
283
|
`;
|
|
284
284
|
const StyledTooltipDialog = styled__default.default.div.attrs(props => ({
|
|
285
285
|
'data-garden-id': COMPONENT_ID$a,
|
|
286
|
-
'data-garden-version': '9.
|
|
287
|
-
className: props
|
|
286
|
+
'data-garden-version': '9.2.0',
|
|
287
|
+
className: props.$isAnimated && 'is-animated'
|
|
288
288
|
})).withConfig({
|
|
289
289
|
displayName: "StyledTooltipDialog",
|
|
290
290
|
componentId: "sc-iv3db-0"
|
|
291
291
|
})(["", ";", " ", ";"], props => {
|
|
292
|
-
const computedArrowStyles = reactTheming.arrowStyles(reactTheming.getArrowPosition(props.theme, props
|
|
292
|
+
const computedArrowStyles = reactTheming.arrowStyles(reactTheming.getArrowPosition(props.theme, props.$placement), {
|
|
293
293
|
size: `${props.theme.space.base * 2}px`,
|
|
294
294
|
inset: '1px',
|
|
295
295
|
animationModifier: '.is-animated'
|
|
296
296
|
});
|
|
297
|
-
if (props
|
|
298
|
-
return props
|
|
297
|
+
if (props.$isAnimated) {
|
|
298
|
+
return props.$hasArrow && props.$transitionState === 'entered' && computedArrowStyles;
|
|
299
299
|
}
|
|
300
|
-
return props
|
|
300
|
+
return props.$hasArrow && computedArrowStyles;
|
|
301
301
|
}, sizeStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
302
302
|
|
|
303
303
|
const COMPONENT_ID$9 = 'modals.tooltip_dialog.title';
|
|
@@ -308,7 +308,7 @@ const sizeStyles = props => `
|
|
|
308
308
|
`;
|
|
309
309
|
const StyledTooltipDialogTitle = styled__default.default.div.attrs({
|
|
310
310
|
'data-garden-id': COMPONENT_ID$9,
|
|
311
|
-
'data-garden-version': '9.
|
|
311
|
+
'data-garden-version': '9.2.0'
|
|
312
312
|
}).withConfig({
|
|
313
313
|
displayName: "StyledTooltipDialogTitle",
|
|
314
314
|
componentId: "sc-1rceixg-0"
|
|
@@ -325,7 +325,7 @@ const StyledTooltipDialogTitle = styled__default.default.div.attrs({
|
|
|
325
325
|
const COMPONENT_ID$8 = 'modals.tooltip_dialog.body';
|
|
326
326
|
const StyledTooltipDialogBody = styled__default.default.div.attrs({
|
|
327
327
|
'data-garden-id': COMPONENT_ID$8,
|
|
328
|
-
'data-garden-version': '9.
|
|
328
|
+
'data-garden-version': '9.2.0'
|
|
329
329
|
}).withConfig({
|
|
330
330
|
displayName: "StyledTooltipDialogBody",
|
|
331
331
|
componentId: "sc-132lcoq-0"
|
|
@@ -342,7 +342,7 @@ const StyledTooltipDialogBody = styled__default.default.div.attrs({
|
|
|
342
342
|
const COMPONENT_ID$7 = 'modals.tooltip_dialog.footer';
|
|
343
343
|
const StyledTooltipDialogFooter = styled__default.default.div.attrs({
|
|
344
344
|
'data-garden-id': COMPONENT_ID$7,
|
|
345
|
-
'data-garden-version': '9.
|
|
345
|
+
'data-garden-version': '9.2.0'
|
|
346
346
|
}).withConfig({
|
|
347
347
|
displayName: "StyledTooltipDialogFooter",
|
|
348
348
|
componentId: "sc-kjomsm-0"
|
|
@@ -351,7 +351,7 @@ const StyledTooltipDialogFooter = styled__default.default.div.attrs({
|
|
|
351
351
|
const COMPONENT_ID$6 = 'modals.tooltip_dialog.footer_item';
|
|
352
352
|
const StyledTooltipDialogFooterItem = styled__default.default(StyledFooterItem).attrs({
|
|
353
353
|
'data-garden-id': COMPONENT_ID$6,
|
|
354
|
-
'data-garden-version': '9.
|
|
354
|
+
'data-garden-version': '9.2.0'
|
|
355
355
|
}).withConfig({
|
|
356
356
|
displayName: "StyledTooltipDialogFooterItem",
|
|
357
357
|
componentId: "sc-u2rmo8-0"
|
|
@@ -382,7 +382,7 @@ const colorStyles = _ref => {
|
|
|
382
382
|
};
|
|
383
383
|
const StyledDrawer = styled__default.default.div.attrs({
|
|
384
384
|
'data-garden-id': COMPONENT_ID$5,
|
|
385
|
-
'data-garden-version': '9.
|
|
385
|
+
'data-garden-version': '9.2.0'
|
|
386
386
|
}).withConfig({
|
|
387
387
|
displayName: "StyledDrawer",
|
|
388
388
|
componentId: "sc-zp66t3-0"
|
|
@@ -396,7 +396,7 @@ const BASE_MULTIPLIERS = {
|
|
|
396
396
|
};
|
|
397
397
|
const StyledDrawerClose = styled__default.default(StyledClose).attrs({
|
|
398
398
|
'data-garden-id': COMPONENT_ID$4,
|
|
399
|
-
'data-garden-version': '9.
|
|
399
|
+
'data-garden-version': '9.2.0'
|
|
400
400
|
}).withConfig({
|
|
401
401
|
displayName: "StyledDrawerClose",
|
|
402
402
|
componentId: "sc-1a0xt3x-0"
|
|
@@ -405,16 +405,16 @@ const StyledDrawerClose = styled__default.default(StyledClose).attrs({
|
|
|
405
405
|
const COMPONENT_ID$3 = 'modals.drawer_modal.header';
|
|
406
406
|
const StyledDrawerHeader = styled__default.default(StyledHeader).attrs({
|
|
407
407
|
'data-garden-id': COMPONENT_ID$3,
|
|
408
|
-
'data-garden-version': '9.
|
|
408
|
+
'data-garden-version': '9.2.0'
|
|
409
409
|
}).withConfig({
|
|
410
410
|
displayName: "StyledDrawerHeader",
|
|
411
411
|
componentId: "sc-y4mgkj-0"
|
|
412
|
-
})(["padding:", "px;", " ", ";"], props => props.theme.space.base * 5, props => props
|
|
412
|
+
})(["padding:", "px;", " ", ";"], props => props.theme.space.base * 5, props => props.$isCloseButtonPresent && `padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * (BASE_MULTIPLIERS.size + BASE_MULTIPLIERS.side + 2)}px;`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
413
413
|
|
|
414
414
|
const COMPONENT_ID$2 = 'modals.drawer_modal.body';
|
|
415
415
|
const StyledDrawerBody = styled__default.default(StyledBody).attrs({
|
|
416
416
|
'data-garden-id': COMPONENT_ID$2,
|
|
417
|
-
'data-garden-version': '9.
|
|
417
|
+
'data-garden-version': '9.2.0'
|
|
418
418
|
}).withConfig({
|
|
419
419
|
displayName: "StyledDrawerBody",
|
|
420
420
|
componentId: "sc-13qufyn-0"
|
|
@@ -423,7 +423,7 @@ const StyledDrawerBody = styled__default.default(StyledBody).attrs({
|
|
|
423
423
|
const COMPONENT_ID$1 = 'modals.drawer_modal.footer';
|
|
424
424
|
const StyledDrawerFooter = styled__default.default.div.attrs({
|
|
425
425
|
'data-garden-id': COMPONENT_ID$1,
|
|
426
|
-
'data-garden-version': '9.
|
|
426
|
+
'data-garden-version': '9.2.0'
|
|
427
427
|
}).withConfig({
|
|
428
428
|
displayName: "StyledDrawerFooter",
|
|
429
429
|
componentId: "sc-kc7e6p-0"
|
|
@@ -440,7 +440,7 @@ const StyledDrawerFooter = styled__default.default.div.attrs({
|
|
|
440
440
|
const COMPONENT_ID = 'modals.drawer_modal.footer_item';
|
|
441
441
|
const StyledDrawerFooterItem = styled__default.default(StyledFooterItem).attrs({
|
|
442
442
|
'data-garden-id': COMPONENT_ID,
|
|
443
|
-
'data-garden-version': '9.
|
|
443
|
+
'data-garden-version': '9.2.0'
|
|
444
444
|
}).withConfig({
|
|
445
445
|
displayName: "StyledDrawerFooterItem",
|
|
446
446
|
componentId: "sc-m2yul4-0"
|
|
@@ -507,7 +507,7 @@ const Footer$2 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
507
507
|
} = useModalContext();
|
|
508
508
|
return React__namespace.default.createElement(StyledFooter, Object.assign({
|
|
509
509
|
ref: ref,
|
|
510
|
-
isLarge: isLarge
|
|
510
|
+
$isLarge: isLarge
|
|
511
511
|
}, props));
|
|
512
512
|
});
|
|
513
513
|
Footer$2.displayName = 'Modal.Footer';
|
|
@@ -541,7 +541,7 @@ const Header$1 = React.forwardRef((_ref, ref) => {
|
|
|
541
541
|
}, [hasHeader, setHasHeader]);
|
|
542
542
|
return React__namespace.default.createElement(StyledHeader, Object.assign({}, getTitleProps(other), {
|
|
543
543
|
as: tag,
|
|
544
|
-
isCloseButtonPresent: isCloseButtonPresent,
|
|
544
|
+
$isCloseButtonPresent: isCloseButtonPresent,
|
|
545
545
|
ref: ref
|
|
546
546
|
}), !!other.isDanger && React__namespace.default.createElement(StyledDangerIcon, null), children);
|
|
547
547
|
});
|
|
@@ -665,12 +665,12 @@ const ModalComponent = React.forwardRef((_ref, ref) => {
|
|
|
665
665
|
return ReactDOM.createPortal(React__namespace.default.createElement(ModalsContext.Provider, {
|
|
666
666
|
value: value
|
|
667
667
|
}, React__namespace.default.createElement(StyledBackdrop, Object.assign({
|
|
668
|
-
isCentered: isCentered,
|
|
669
|
-
isAnimated: isAnimated
|
|
668
|
+
$isCentered: isCentered,
|
|
669
|
+
$isAnimated: isAnimated
|
|
670
670
|
}, getBackdropProps(backdropProps)), React__namespace.default.createElement(StyledModal, Object.assign({
|
|
671
|
-
isCentered: isCentered,
|
|
672
|
-
isAnimated: isAnimated,
|
|
673
|
-
isLarge: isLarge
|
|
671
|
+
$isCentered: isCentered,
|
|
672
|
+
$isAnimated: isAnimated,
|
|
673
|
+
$isLarge: isLarge
|
|
674
674
|
}, modalContainerProps, ariaProps, modalProps, {
|
|
675
675
|
ref: reactMergeRefs.mergeRefs([ref, modalRef])
|
|
676
676
|
}), children))), rootNode);
|
|
@@ -888,14 +888,14 @@ const TooltipDialogComponent = React__namespace.default.forwardRef((_ref, ref) =
|
|
|
888
888
|
style: {
|
|
889
889
|
transform
|
|
890
890
|
},
|
|
891
|
-
placement: placement,
|
|
892
|
-
zIndex: zIndex,
|
|
893
|
-
isAnimated: isAnimated
|
|
891
|
+
$placement: placement,
|
|
892
|
+
$zIndex: zIndex,
|
|
893
|
+
$isAnimated: isAnimated
|
|
894
894
|
}, React__namespace.default.createElement(StyledTooltipDialog, Object.assign({
|
|
895
|
-
transitionState: transitionState,
|
|
896
|
-
placement: placement,
|
|
897
|
-
hasArrow: hasArrow,
|
|
898
|
-
isAnimated: isAnimated
|
|
895
|
+
$transitionState: transitionState,
|
|
896
|
+
$placement: placement,
|
|
897
|
+
$hasArrow: hasArrow,
|
|
898
|
+
$isAnimated: isAnimated
|
|
899
899
|
}, modalProps, ariaProps, props, {
|
|
900
900
|
ref: reactMergeRefs.mergeRefs([modalRef, ref])
|
|
901
901
|
})))));
|
|
@@ -951,7 +951,7 @@ const HeaderComponent = React.forwardRef((_ref, ref) => {
|
|
|
951
951
|
}, [hasHeader, setHasHeader]);
|
|
952
952
|
return React__namespace.default.createElement(StyledDrawerHeader, Object.assign({}, getTitleProps(other), {
|
|
953
953
|
as: tag,
|
|
954
|
-
isCloseButtonPresent: isCloseButtonPresent,
|
|
954
|
+
$isCloseButtonPresent: isCloseButtonPresent,
|
|
955
955
|
ref: ref
|
|
956
956
|
}));
|
|
957
957
|
});
|
|
@@ -1119,7 +1119,7 @@ const DrawerComponent = React.forwardRef((_ref, ref) => {
|
|
|
1119
1119
|
classNames: "garden-drawer-transition",
|
|
1120
1120
|
nodeRef: transitionRef
|
|
1121
1121
|
}, React__namespace.default.createElement(StyledBackdrop, Object.assign({
|
|
1122
|
-
isAnimated: true
|
|
1122
|
+
$isAnimated: true
|
|
1123
1123
|
}, getBackdropProps(backdropProps)), React__namespace.default.createElement(StyledDrawer, Object.assign({}, modalProps, ariaProps, props, {
|
|
1124
1124
|
ref: reactMergeRefs.mergeRefs([ref, modalRef, transitionRef])
|
|
1125
1125
|
}))))), rootNode);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
interface IStyledFooter {
|
|
8
|
-
isLarge?: boolean;
|
|
8
|
+
$isLarge?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const StyledFooter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledFooter, never>;
|
|
11
11
|
export {};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
export interface IStyledHeaderProps {
|
|
9
|
-
isDanger?: boolean;
|
|
10
|
-
isCloseButtonPresent?: boolean;
|
|
9
|
+
$isDanger?: boolean;
|
|
10
|
+
$isCloseButtonPresent?: boolean;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* 1. the padding added to the Header is based on the close button size and spacing,
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
export interface IStyledModalProps {
|
|
9
|
-
isLarge?: boolean;
|
|
10
|
-
isCentered?: boolean;
|
|
11
|
-
isAnimated?: boolean;
|
|
9
|
+
$isLarge?: boolean;
|
|
10
|
+
$isCentered?: boolean;
|
|
11
|
+
$isAnimated?: boolean;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* 1. IE11 centering hack.
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
import { Placement } from '@floating-ui/react-dom';
|
|
9
9
|
import { TransitionStatus } from 'react-transition-group';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export interface IStyledTooltipDialogProps {
|
|
11
|
+
$hasArrow?: boolean;
|
|
12
|
+
$isAnimated?: boolean;
|
|
13
|
+
$placement: Placement;
|
|
14
|
+
$transitionState?: TransitionStatus;
|
|
14
15
|
}
|
|
15
16
|
export declare const StyledTooltipDialog: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledTooltipDialogProps, never>;
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { Placement } from '@floating-ui/react-dom';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
interface IStyledTooltipWrapperProps {
|
|
9
|
+
$placement: Placement;
|
|
10
|
+
$isAnimated?: boolean;
|
|
11
|
+
$zIndex?: number;
|
|
11
12
|
}
|
|
12
13
|
export declare const StyledTooltipWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledTooltipWrapperProps, never>;
|
|
13
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-modals",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "Components relating to modals in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@floating-ui/react-dom": "^2.0.0",
|
|
25
25
|
"@zendeskgarden/container-modal": "^1.0.15",
|
|
26
26
|
"@zendeskgarden/container-utilities": "^2.0.0",
|
|
27
|
-
"@zendeskgarden/react-buttons": "^9.
|
|
27
|
+
"@zendeskgarden/react-buttons": "^9.2.0",
|
|
28
28
|
"dom-helpers": "^5.1.0",
|
|
29
29
|
"prop-types": "^15.5.7",
|
|
30
30
|
"react-merge-refs": "^2.0.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/react-transition-group": "4.4.11",
|
|
41
|
-
"@zendeskgarden/react-theming": "^9.
|
|
41
|
+
"@zendeskgarden/react-theming": "^9.2.0",
|
|
42
42
|
"@zendeskgarden/svg-icons": "7.3.0"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"zendeskgarden:src": "src/index.ts",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "23a86c9a1e830685e277544c089b44614c2261ac"
|
|
55
55
|
}
|