@zendeskgarden/react-accordions 9.0.0-next.8 → 9.0.0-next.9
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/accordion/components/Header.js +4 -4
- package/dist/esm/elements/timeline/components/Content.js +1 -1
- package/dist/esm/styled/accordion/StyledAccordion.js +1 -1
- package/dist/esm/styled/accordion/StyledButton.js +1 -1
- package/dist/esm/styled/accordion/StyledHeader.js +1 -1
- package/dist/esm/styled/accordion/StyledInnerPanel.js +1 -1
- package/dist/esm/styled/accordion/StyledPanel.js +1 -1
- package/dist/esm/styled/accordion/StyledRotateIcon.js +6 -18
- package/dist/esm/styled/accordion/StyledSection.js +1 -1
- package/dist/esm/styled/stepper/StyledContent.js +1 -1
- package/dist/esm/styled/stepper/StyledIcon.js +1 -1
- package/dist/esm/styled/stepper/StyledInnerContent.js +1 -1
- package/dist/esm/styled/stepper/StyledLabel.js +1 -1
- package/dist/esm/styled/stepper/StyledLabelText.js +1 -1
- package/dist/esm/styled/stepper/StyledLine.js +1 -1
- package/dist/esm/styled/stepper/StyledStep.js +1 -1
- package/dist/esm/styled/stepper/StyledStepper.js +1 -1
- package/dist/esm/styled/timeline/StyledContent.js +1 -1
- package/dist/esm/styled/timeline/StyledItem.js +1 -1
- package/dist/esm/styled/timeline/StyledItemIcon.js +4 -12
- package/dist/esm/styled/timeline/StyledOppositeContent.js +1 -1
- package/dist/esm/styled/timeline/StyledSeparator.js +1 -1
- package/dist/esm/styled/timeline/StyledTimeline.js +1 -1
- package/dist/index.cjs.js +32 -50
- package/dist/typings/styled/accordion/StyledRotateIcon.d.ts +5 -2
- package/dist/typings/styled/timeline/StyledItemIcon.d.ts +2 -2
- package/package.json +3 -3
|
@@ -82,10 +82,10 @@ const HeaderComponent = forwardRef((props, ref) => {
|
|
|
82
82
|
onMouseOut: composeEventHandlers(onMouseOut, () => setIsHovered(false)),
|
|
83
83
|
...other
|
|
84
84
|
})), children, React__default.createElement(StyledRotateIcon, {
|
|
85
|
-
isCompact: isCompact,
|
|
86
|
-
isHovered: isHovered,
|
|
87
|
-
isRotated: isExpanded,
|
|
88
|
-
isCollapsible: isCollapsible,
|
|
85
|
+
$isCompact: isCompact,
|
|
86
|
+
$isHovered: isHovered,
|
|
87
|
+
$isRotated: isExpanded,
|
|
88
|
+
$isCollapsible: isCollapsible,
|
|
89
89
|
onMouseOver: composeEventHandlers(onMouseOver, () => setIsHovered(true)),
|
|
90
90
|
onMouseOut: composeEventHandlers(onMouseOut, () => setIsHovered(false))
|
|
91
91
|
}, React__default.createElement(SvgChevronDownStroke, null))));
|
|
@@ -41,7 +41,7 @@ const ContentComponent = forwardRef((props, ref) => {
|
|
|
41
41
|
surfaceColor
|
|
42
42
|
} = useTimelineItemContext();
|
|
43
43
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledSeparator, null, React__default.createElement(StyledItemIcon, {
|
|
44
|
-
surfaceColor: surfaceColor
|
|
44
|
+
$surfaceColor: surfaceColor
|
|
45
45
|
}, icon || React__default.createElement(SvgCircleFullStroke, null))), React__default.createElement(StyledTimelineContent, Object.assign({
|
|
46
46
|
ref: ref
|
|
47
47
|
}, props)));
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
|
|
|
10
10
|
const COMPONENT_ID = 'accordions.accordion';
|
|
11
11
|
const StyledAccordion = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledAccordion",
|
|
16
16
|
componentId: "sc-niv9ic-0"
|
|
@@ -18,7 +18,7 @@ const colorStyles = props => {
|
|
|
18
18
|
};
|
|
19
19
|
const StyledButton = styled.button.attrs({
|
|
20
20
|
'data-garden-id': COMPONENT_ID,
|
|
21
|
-
'data-garden-version': '9.0.0-next.
|
|
21
|
+
'data-garden-version': '9.0.0-next.9'
|
|
22
22
|
}).withConfig({
|
|
23
23
|
displayName: "StyledButton",
|
|
24
24
|
componentId: "sc-xj3hy7-0"
|
|
@@ -11,7 +11,7 @@ import { StyledButton } from './StyledButton.js';
|
|
|
11
11
|
const COMPONENT_ID = 'accordions.header';
|
|
12
12
|
const StyledHeader = styled.div.attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.0.0-next.
|
|
14
|
+
'data-garden-version': '9.0.0-next.9'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledHeader",
|
|
17
17
|
componentId: "sc-2c6rbr-0"
|
|
@@ -11,7 +11,7 @@ import { StyledPanel } from './StyledPanel.js';
|
|
|
11
11
|
const COMPONENT_ID = 'accordions.step_inner_panel';
|
|
12
12
|
const StyledInnerPanel = styled.div.attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.0.0-next.
|
|
14
|
+
'data-garden-version': '9.0.0-next.9'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledInnerPanel",
|
|
17
17
|
componentId: "sc-8nbueg-0"
|
|
@@ -40,7 +40,7 @@ const sizeStyles = props => {
|
|
|
40
40
|
};
|
|
41
41
|
const StyledPanel = styled.section.attrs({
|
|
42
42
|
'data-garden-id': COMPONENT_ID,
|
|
43
|
-
'data-garden-version': '9.0.0-next.
|
|
43
|
+
'data-garden-version': '9.0.0-next.9'
|
|
44
44
|
}).withConfig({
|
|
45
45
|
displayName: "StyledPanel",
|
|
46
46
|
componentId: "sc-1piryze-0"
|
|
@@ -4,37 +4,25 @@
|
|
|
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
|
-
import { cloneElement, Children } from 'react';
|
|
8
7
|
import styled, { css } from 'styled-components';
|
|
9
|
-
import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
|
|
8
|
+
import { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
|
|
10
9
|
|
|
11
10
|
const COMPONENT_ID = 'accordions.rotate_icon';
|
|
12
11
|
const colorStyles = props => {
|
|
13
|
-
const showColor = props
|
|
12
|
+
const showColor = props.$isCollapsible || !props.$isRotated;
|
|
14
13
|
let color = getColorV8('neutralHue', 600, props.theme);
|
|
15
|
-
if (showColor && props
|
|
14
|
+
if (showColor && props.$isHovered) {
|
|
16
15
|
color = getColorV8('primaryHue', 600, props.theme);
|
|
17
16
|
}
|
|
18
17
|
return css(["color:", ";&:hover{color:", ";}"], color, showColor && color);
|
|
19
18
|
};
|
|
20
|
-
const StyledRotateIcon = styled(
|
|
21
|
-
_ref => {
|
|
22
|
-
let {
|
|
23
|
-
children,
|
|
24
|
-
isRotated,
|
|
25
|
-
isHovered,
|
|
26
|
-
isCompact,
|
|
27
|
-
isCollapsible,
|
|
28
|
-
...props
|
|
29
|
-
} = _ref;
|
|
30
|
-
return cloneElement(Children.only(children), props);
|
|
31
|
-
}).attrs({
|
|
19
|
+
const StyledRotateIcon = styled(StyledBaseIcon).attrs({
|
|
32
20
|
'data-garden-id': COMPONENT_ID,
|
|
33
|
-
'data-garden-version': '9.0.0-next.
|
|
21
|
+
'data-garden-version': '9.0.0-next.9'
|
|
34
22
|
}).withConfig({
|
|
35
23
|
displayName: "StyledRotateIcon",
|
|
36
24
|
componentId: "sc-hp435q-0"
|
|
37
|
-
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.1s ease-in-out;box-sizing:content-box;padding:", ";width:", ";min-width:", ";height:", ";vertical-align:middle;", " ", ";"], props => props
|
|
25
|
+
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.1s ease-in-out;box-sizing:content-box;padding:", ";width:", ";min-width:", ";height:", ";vertical-align:middle;", " ", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => props.$isCompact ? `${props.theme.space.base * 1.5}px ${props.theme.space.base * 3}px` : `${props.theme.space.base * 5}px`, props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
38
26
|
StyledRotateIcon.defaultProps = {
|
|
39
27
|
theme: DEFAULT_THEME
|
|
40
28
|
};
|
|
@@ -11,7 +11,7 @@ import { StyledPanel } from './StyledPanel.js';
|
|
|
11
11
|
const COMPONENT_ID = 'accordions.section';
|
|
12
12
|
const StyledSection = styled.div.attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.0.0-next.
|
|
14
|
+
'data-garden-version': '9.0.0-next.9'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledSection",
|
|
17
17
|
componentId: "sc-v2t9bd-0"
|
|
@@ -23,7 +23,7 @@ const sizeStyles = props => {
|
|
|
23
23
|
};
|
|
24
24
|
const StyledContent = styled.div.attrs({
|
|
25
25
|
'data-garden-id': COMPONENT_ID,
|
|
26
|
-
'data-garden-version': '9.0.0-next.
|
|
26
|
+
'data-garden-version': '9.0.0-next.9'
|
|
27
27
|
}).withConfig({
|
|
28
28
|
displayName: "StyledContent",
|
|
29
29
|
componentId: "sc-mazvvo-0"
|
|
@@ -22,7 +22,7 @@ const colorStyles = props => {
|
|
|
22
22
|
};
|
|
23
23
|
const StyledIcon = styled.div.attrs({
|
|
24
24
|
'data-garden-id': COMPONENT_ID,
|
|
25
|
-
'data-garden-version': '9.0.0-next.
|
|
25
|
+
'data-garden-version': '9.0.0-next.9'
|
|
26
26
|
}).withConfig({
|
|
27
27
|
displayName: "StyledIcon",
|
|
28
28
|
componentId: "sc-v20nz9-1"
|
|
@@ -10,7 +10,7 @@ import { getLineHeight, getColorV8, retrieveComponentStyles, DEFAULT_THEME } fro
|
|
|
10
10
|
const COMPONENT_ID = 'accordions.step_inner_content';
|
|
11
11
|
const StyledInnerContent = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledInnerContent",
|
|
16
16
|
componentId: "sc-1xs9fh7-0"
|
|
@@ -10,7 +10,7 @@ import { getLineHeight, getColorV8, retrieveComponentStyles, DEFAULT_THEME } fro
|
|
|
10
10
|
const COMPONENT_ID = 'accordions.step_label';
|
|
11
11
|
const StyledLabel = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledLabel",
|
|
16
16
|
componentId: "sc-1o82llj-0"
|
|
@@ -10,7 +10,7 @@ import { DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'accordions.step_label_text';
|
|
11
11
|
const StyledLabelText = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledLabelText",
|
|
16
16
|
componentId: "sc-111m5zo-0"
|
|
@@ -10,7 +10,7 @@ import { getColorV8, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'accordions.step_line';
|
|
11
11
|
const StyledLine = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledLine",
|
|
16
16
|
componentId: "sc-1gkpjbr-0"
|
|
@@ -12,7 +12,7 @@ import { StyledLine } from './StyledLine.js';
|
|
|
12
12
|
const COMPONENT_ID = 'accordions.step';
|
|
13
13
|
const StyledStep = styled.li.attrs({
|
|
14
14
|
'data-garden-id': COMPONENT_ID,
|
|
15
|
-
'data-garden-version': '9.0.0-next.
|
|
15
|
+
'data-garden-version': '9.0.0-next.9'
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "StyledStep",
|
|
18
18
|
componentId: "sc-12fiwtz-0"
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
|
|
|
10
10
|
const COMPONENT_ID = 'accordions.stepper';
|
|
11
11
|
const StyledStepper = styled.ol.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledStepper",
|
|
16
16
|
componentId: "sc-dsxw0f-0"
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
|
|
|
10
10
|
const COMPONENT_ID = 'timeline.content';
|
|
11
11
|
const StyledTimelineContent = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledContent__StyledTimelineContent",
|
|
16
16
|
componentId: "sc-19phgu1-0"
|
|
@@ -13,7 +13,7 @@ import { StyledOppositeContent } from './StyledOppositeContent.js';
|
|
|
13
13
|
const COMPONENT_ID = 'timeline.item';
|
|
14
14
|
const StyledTimelineItem = styled.li.attrs({
|
|
15
15
|
'data-garden-id': COMPONENT_ID,
|
|
16
|
-
'data-garden-version': '9.0.0-next.
|
|
16
|
+
'data-garden-version': '9.0.0-next.9'
|
|
17
17
|
}).withConfig({
|
|
18
18
|
displayName: "StyledItem__StyledTimelineItem",
|
|
19
19
|
componentId: "sc-5mcnzm-0"
|
|
@@ -4,26 +4,18 @@
|
|
|
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
|
-
import { cloneElement, Children } from 'react';
|
|
8
7
|
import styled from 'styled-components';
|
|
9
8
|
import { math } from 'polished';
|
|
10
|
-
import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledBaseIcon, getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
11
10
|
|
|
12
11
|
const COMPONENT_ID = 'timeline.icon';
|
|
13
|
-
const StyledItemIcon = styled(
|
|
14
|
-
let {
|
|
15
|
-
surfaceColor,
|
|
16
|
-
children,
|
|
17
|
-
...props
|
|
18
|
-
} = _ref;
|
|
19
|
-
return cloneElement(Children.only(children), props);
|
|
20
|
-
}).attrs({
|
|
12
|
+
const StyledItemIcon = styled(StyledBaseIcon).attrs({
|
|
21
13
|
'data-garden-id': COMPONENT_ID,
|
|
22
|
-
'data-garden-version': '9.0.0-next.
|
|
14
|
+
'data-garden-version': '9.0.0-next.9'
|
|
23
15
|
}).withConfig({
|
|
24
16
|
displayName: "StyledItemIcon",
|
|
25
17
|
componentId: "sc-vz2l6e-0"
|
|
26
|
-
})(["z-index:1;box-sizing:content-box;background-color:", ";padding:", "px 0;width:", ";height:", ";color:", ";", ";"], props => props
|
|
18
|
+
})(["z-index:1;box-sizing:content-box;background-color:", ";padding:", "px 0;width:", ";height:", ";color:", ";", ";"], props => props.$surfaceColor || getColorV8('background', 600 , props.theme), props => props.theme.space.base, props => math(`${props.theme.iconSizes.sm} + 1`), props => math(`${props.theme.iconSizes.sm} + 1`), props => getColorV8('neutralHue', 600, props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
27
19
|
StyledItemIcon.defaultProps = {
|
|
28
20
|
theme: DEFAULT_THEME
|
|
29
21
|
};
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
|
|
|
10
10
|
const COMPONENT_ID = 'timeline.opposite.content';
|
|
11
11
|
const StyledOppositeContent = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledOppositeContent",
|
|
16
16
|
componentId: "sc-jurh2k-0"
|
|
@@ -10,7 +10,7 @@ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgard
|
|
|
10
10
|
const COMPONENT_ID = 'timeline.content.separator';
|
|
11
11
|
const StyledSeparator = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledSeparator",
|
|
16
16
|
componentId: "sc-fki51e-0"
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
|
|
|
10
10
|
const COMPONENT_ID = 'timeline';
|
|
11
11
|
const StyledTimeline = styled.ol.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.9'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledTimeline",
|
|
16
16
|
componentId: "sc-pig5kv-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -54,7 +54,7 @@ const sizeStyles$2 = props => {
|
|
|
54
54
|
};
|
|
55
55
|
const StyledContent = styled__default.default.div.attrs({
|
|
56
56
|
'data-garden-id': COMPONENT_ID$k,
|
|
57
|
-
'data-garden-version': '9.0.0-next.
|
|
57
|
+
'data-garden-version': '9.0.0-next.9'
|
|
58
58
|
}).withConfig({
|
|
59
59
|
displayName: "StyledContent",
|
|
60
60
|
componentId: "sc-mazvvo-0"
|
|
@@ -66,7 +66,7 @@ StyledContent.defaultProps = {
|
|
|
66
66
|
const COMPONENT_ID$j = 'accordions.step_line';
|
|
67
67
|
const StyledLine = styled__default.default.div.attrs({
|
|
68
68
|
'data-garden-id': COMPONENT_ID$j,
|
|
69
|
-
'data-garden-version': '9.0.0-next.
|
|
69
|
+
'data-garden-version': '9.0.0-next.9'
|
|
70
70
|
}).withConfig({
|
|
71
71
|
displayName: "StyledLine",
|
|
72
72
|
componentId: "sc-1gkpjbr-0"
|
|
@@ -78,7 +78,7 @@ StyledLine.defaultProps = {
|
|
|
78
78
|
const COMPONENT_ID$i = 'accordions.step';
|
|
79
79
|
const StyledStep = styled__default.default.li.attrs({
|
|
80
80
|
'data-garden-id': COMPONENT_ID$i,
|
|
81
|
-
'data-garden-version': '9.0.0-next.
|
|
81
|
+
'data-garden-version': '9.0.0-next.9'
|
|
82
82
|
}).withConfig({
|
|
83
83
|
displayName: "StyledStep",
|
|
84
84
|
componentId: "sc-12fiwtz-0"
|
|
@@ -90,7 +90,7 @@ StyledStep.defaultProps = {
|
|
|
90
90
|
const COMPONENT_ID$h = 'accordions.step_inner_content';
|
|
91
91
|
const StyledInnerContent = styled__default.default.div.attrs({
|
|
92
92
|
'data-garden-id': COMPONENT_ID$h,
|
|
93
|
-
'data-garden-version': '9.0.0-next.
|
|
93
|
+
'data-garden-version': '9.0.0-next.9'
|
|
94
94
|
}).withConfig({
|
|
95
95
|
displayName: "StyledInnerContent",
|
|
96
96
|
componentId: "sc-1xs9fh7-0"
|
|
@@ -102,7 +102,7 @@ StyledInnerContent.defaultProps = {
|
|
|
102
102
|
const COMPONENT_ID$g = 'accordions.stepper';
|
|
103
103
|
const StyledStepper = styled__default.default.ol.attrs({
|
|
104
104
|
'data-garden-id': COMPONENT_ID$g,
|
|
105
|
-
'data-garden-version': '9.0.0-next.
|
|
105
|
+
'data-garden-version': '9.0.0-next.9'
|
|
106
106
|
}).withConfig({
|
|
107
107
|
displayName: "StyledStepper",
|
|
108
108
|
componentId: "sc-dsxw0f-0"
|
|
@@ -126,7 +126,7 @@ const colorStyles$3 = props => {
|
|
|
126
126
|
};
|
|
127
127
|
const StyledIcon = styled__default.default.div.attrs({
|
|
128
128
|
'data-garden-id': COMPONENT_ID$f,
|
|
129
|
-
'data-garden-version': '9.0.0-next.
|
|
129
|
+
'data-garden-version': '9.0.0-next.9'
|
|
130
130
|
}).withConfig({
|
|
131
131
|
displayName: "StyledIcon",
|
|
132
132
|
componentId: "sc-v20nz9-1"
|
|
@@ -141,7 +141,7 @@ StyledIcon.defaultProps = {
|
|
|
141
141
|
const COMPONENT_ID$e = 'accordions.step_label';
|
|
142
142
|
const StyledLabel = styled__default.default.div.attrs({
|
|
143
143
|
'data-garden-id': COMPONENT_ID$e,
|
|
144
|
-
'data-garden-version': '9.0.0-next.
|
|
144
|
+
'data-garden-version': '9.0.0-next.9'
|
|
145
145
|
}).withConfig({
|
|
146
146
|
displayName: "StyledLabel",
|
|
147
147
|
componentId: "sc-1o82llj-0"
|
|
@@ -153,7 +153,7 @@ StyledLabel.defaultProps = {
|
|
|
153
153
|
const COMPONENT_ID$d = 'accordions.step_label_text';
|
|
154
154
|
const StyledLabelText = styled__default.default.div.attrs({
|
|
155
155
|
'data-garden-id': COMPONENT_ID$d,
|
|
156
|
-
'data-garden-version': '9.0.0-next.
|
|
156
|
+
'data-garden-version': '9.0.0-next.9'
|
|
157
157
|
}).withConfig({
|
|
158
158
|
displayName: "StyledLabelText",
|
|
159
159
|
componentId: "sc-111m5zo-0"
|
|
@@ -165,7 +165,7 @@ StyledLabelText.defaultProps = {
|
|
|
165
165
|
const COMPONENT_ID$c = 'accordions.accordion';
|
|
166
166
|
const StyledAccordion = styled__default.default.div.attrs({
|
|
167
167
|
'data-garden-id': COMPONENT_ID$c,
|
|
168
|
-
'data-garden-version': '9.0.0-next.
|
|
168
|
+
'data-garden-version': '9.0.0-next.9'
|
|
169
169
|
}).withConfig({
|
|
170
170
|
displayName: "StyledAccordion",
|
|
171
171
|
componentId: "sc-niv9ic-0"
|
|
@@ -207,7 +207,7 @@ const sizeStyles = props => {
|
|
|
207
207
|
};
|
|
208
208
|
const StyledPanel = styled__default.default.section.attrs({
|
|
209
209
|
'data-garden-id': COMPONENT_ID$b,
|
|
210
|
-
'data-garden-version': '9.0.0-next.
|
|
210
|
+
'data-garden-version': '9.0.0-next.9'
|
|
211
211
|
}).withConfig({
|
|
212
212
|
displayName: "StyledPanel",
|
|
213
213
|
componentId: "sc-1piryze-0"
|
|
@@ -220,7 +220,7 @@ StyledPanel.defaultProps = {
|
|
|
220
220
|
const COMPONENT_ID$a = 'accordions.section';
|
|
221
221
|
const StyledSection = styled__default.default.div.attrs({
|
|
222
222
|
'data-garden-id': COMPONENT_ID$a,
|
|
223
|
-
'data-garden-version': '9.0.0-next.
|
|
223
|
+
'data-garden-version': '9.0.0-next.9'
|
|
224
224
|
}).withConfig({
|
|
225
225
|
displayName: "StyledSection",
|
|
226
226
|
componentId: "sc-v2t9bd-0"
|
|
@@ -240,7 +240,7 @@ const colorStyles$1 = props => {
|
|
|
240
240
|
};
|
|
241
241
|
const StyledButton = styled__default.default.button.attrs({
|
|
242
242
|
'data-garden-id': COMPONENT_ID$9,
|
|
243
|
-
'data-garden-version': '9.0.0-next.
|
|
243
|
+
'data-garden-version': '9.0.0-next.9'
|
|
244
244
|
}).withConfig({
|
|
245
245
|
displayName: "StyledButton",
|
|
246
246
|
componentId: "sc-xj3hy7-0"
|
|
@@ -252,7 +252,7 @@ StyledButton.defaultProps = {
|
|
|
252
252
|
const COMPONENT_ID$8 = 'accordions.header';
|
|
253
253
|
const StyledHeader = styled__default.default.div.attrs({
|
|
254
254
|
'data-garden-id': COMPONENT_ID$8,
|
|
255
|
-
'data-garden-version': '9.0.0-next.
|
|
255
|
+
'data-garden-version': '9.0.0-next.9'
|
|
256
256
|
}).withConfig({
|
|
257
257
|
displayName: "StyledHeader",
|
|
258
258
|
componentId: "sc-2c6rbr-0"
|
|
@@ -268,7 +268,7 @@ StyledHeader.defaultProps = {
|
|
|
268
268
|
const COMPONENT_ID$7 = 'accordions.step_inner_panel';
|
|
269
269
|
const StyledInnerPanel = styled__default.default.div.attrs({
|
|
270
270
|
'data-garden-id': COMPONENT_ID$7,
|
|
271
|
-
'data-garden-version': '9.0.0-next.
|
|
271
|
+
'data-garden-version': '9.0.0-next.9'
|
|
272
272
|
}).withConfig({
|
|
273
273
|
displayName: "StyledInnerPanel",
|
|
274
274
|
componentId: "sc-8nbueg-0"
|
|
@@ -279,31 +279,20 @@ StyledInnerPanel.defaultProps = {
|
|
|
279
279
|
|
|
280
280
|
const COMPONENT_ID$6 = 'accordions.rotate_icon';
|
|
281
281
|
const colorStyles = props => {
|
|
282
|
-
const showColor = props
|
|
282
|
+
const showColor = props.$isCollapsible || !props.$isRotated;
|
|
283
283
|
let color = reactTheming.getColorV8('neutralHue', 600, props.theme);
|
|
284
|
-
if (showColor && props
|
|
284
|
+
if (showColor && props.$isHovered) {
|
|
285
285
|
color = reactTheming.getColorV8('primaryHue', 600, props.theme);
|
|
286
286
|
}
|
|
287
287
|
return styled.css(["color:", ";&:hover{color:", ";}"], color, showColor && color);
|
|
288
288
|
};
|
|
289
|
-
const StyledRotateIcon = styled__default.default(
|
|
290
|
-
_ref => {
|
|
291
|
-
let {
|
|
292
|
-
children,
|
|
293
|
-
isRotated,
|
|
294
|
-
isHovered,
|
|
295
|
-
isCompact,
|
|
296
|
-
isCollapsible,
|
|
297
|
-
...props
|
|
298
|
-
} = _ref;
|
|
299
|
-
return React.cloneElement(React.Children.only(children), props);
|
|
300
|
-
}).attrs({
|
|
289
|
+
const StyledRotateIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
301
290
|
'data-garden-id': COMPONENT_ID$6,
|
|
302
|
-
'data-garden-version': '9.0.0-next.
|
|
291
|
+
'data-garden-version': '9.0.0-next.9'
|
|
303
292
|
}).withConfig({
|
|
304
293
|
displayName: "StyledRotateIcon",
|
|
305
294
|
componentId: "sc-hp435q-0"
|
|
306
|
-
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.1s ease-in-out;box-sizing:content-box;padding:", ";width:", ";min-width:", ";height:", ";vertical-align:middle;", " ", ";"], props => props
|
|
295
|
+
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.1s ease-in-out;box-sizing:content-box;padding:", ";width:", ";min-width:", ";height:", ";vertical-align:middle;", " ", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => props.$isCompact ? `${props.theme.space.base * 1.5}px ${props.theme.space.base * 3}px` : `${props.theme.space.base * 5}px`, props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
307
296
|
StyledRotateIcon.defaultProps = {
|
|
308
297
|
theme: reactTheming.DEFAULT_THEME
|
|
309
298
|
};
|
|
@@ -311,7 +300,7 @@ StyledRotateIcon.defaultProps = {
|
|
|
311
300
|
const COMPONENT_ID$5 = 'timeline';
|
|
312
301
|
const StyledTimeline = styled__default.default.ol.attrs({
|
|
313
302
|
'data-garden-id': COMPONENT_ID$5,
|
|
314
|
-
'data-garden-version': '9.0.0-next.
|
|
303
|
+
'data-garden-version': '9.0.0-next.9'
|
|
315
304
|
}).withConfig({
|
|
316
305
|
displayName: "StyledTimeline",
|
|
317
306
|
componentId: "sc-pig5kv-0"
|
|
@@ -323,7 +312,7 @@ StyledTimeline.defaultProps = {
|
|
|
323
312
|
const COMPONENT_ID$4 = 'timeline.content.separator';
|
|
324
313
|
const StyledSeparator = styled__default.default.div.attrs({
|
|
325
314
|
'data-garden-id': COMPONENT_ID$4,
|
|
326
|
-
'data-garden-version': '9.0.0-next.
|
|
315
|
+
'data-garden-version': '9.0.0-next.9'
|
|
327
316
|
}).withConfig({
|
|
328
317
|
displayName: "StyledSeparator",
|
|
329
318
|
componentId: "sc-fki51e-0"
|
|
@@ -335,7 +324,7 @@ StyledSeparator.defaultProps = {
|
|
|
335
324
|
const COMPONENT_ID$3 = 'timeline.content';
|
|
336
325
|
const StyledTimelineContent = styled__default.default.div.attrs({
|
|
337
326
|
'data-garden-id': COMPONENT_ID$3,
|
|
338
|
-
'data-garden-version': '9.0.0-next.
|
|
327
|
+
'data-garden-version': '9.0.0-next.9'
|
|
339
328
|
}).withConfig({
|
|
340
329
|
displayName: "StyledContent__StyledTimelineContent",
|
|
341
330
|
componentId: "sc-19phgu1-0"
|
|
@@ -347,7 +336,7 @@ StyledTimelineContent.defaultProps = {
|
|
|
347
336
|
const COMPONENT_ID$2 = 'timeline.opposite.content';
|
|
348
337
|
const StyledOppositeContent = styled__default.default.div.attrs({
|
|
349
338
|
'data-garden-id': COMPONENT_ID$2,
|
|
350
|
-
'data-garden-version': '9.0.0-next.
|
|
339
|
+
'data-garden-version': '9.0.0-next.9'
|
|
351
340
|
}).withConfig({
|
|
352
341
|
displayName: "StyledOppositeContent",
|
|
353
342
|
componentId: "sc-jurh2k-0"
|
|
@@ -359,7 +348,7 @@ StyledOppositeContent.defaultProps = {
|
|
|
359
348
|
const COMPONENT_ID$1 = 'timeline.item';
|
|
360
349
|
const StyledTimelineItem = styled__default.default.li.attrs({
|
|
361
350
|
'data-garden-id': COMPONENT_ID$1,
|
|
362
|
-
'data-garden-version': '9.0.0-next.
|
|
351
|
+
'data-garden-version': '9.0.0-next.9'
|
|
363
352
|
}).withConfig({
|
|
364
353
|
displayName: "StyledItem__StyledTimelineItem",
|
|
365
354
|
componentId: "sc-5mcnzm-0"
|
|
@@ -369,20 +358,13 @@ StyledTimelineItem.defaultProps = {
|
|
|
369
358
|
};
|
|
370
359
|
|
|
371
360
|
const COMPONENT_ID = 'timeline.icon';
|
|
372
|
-
const StyledItemIcon = styled__default.default(
|
|
373
|
-
let {
|
|
374
|
-
surfaceColor,
|
|
375
|
-
children,
|
|
376
|
-
...props
|
|
377
|
-
} = _ref;
|
|
378
|
-
return React.cloneElement(React.Children.only(children), props);
|
|
379
|
-
}).attrs({
|
|
361
|
+
const StyledItemIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
380
362
|
'data-garden-id': COMPONENT_ID,
|
|
381
|
-
'data-garden-version': '9.0.0-next.
|
|
363
|
+
'data-garden-version': '9.0.0-next.9'
|
|
382
364
|
}).withConfig({
|
|
383
365
|
displayName: "StyledItemIcon",
|
|
384
366
|
componentId: "sc-vz2l6e-0"
|
|
385
|
-
})(["z-index:1;box-sizing:content-box;background-color:", ";padding:", "px 0;width:", ";height:", ";color:", ";", ";"], props => props
|
|
367
|
+
})(["z-index:1;box-sizing:content-box;background-color:", ";padding:", "px 0;width:", ";height:", ";color:", ";", ";"], props => props.$surfaceColor || reactTheming.getColorV8('background', 600 , props.theme), props => props.theme.space.base, props => polished.math(`${props.theme.iconSizes.sm} + 1`), props => polished.math(`${props.theme.iconSizes.sm} + 1`), props => reactTheming.getColorV8('neutralHue', 600, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
386
368
|
StyledItemIcon.defaultProps = {
|
|
387
369
|
theme: reactTheming.DEFAULT_THEME
|
|
388
370
|
};
|
|
@@ -518,10 +500,10 @@ const HeaderComponent = React.forwardRef((props, ref) => {
|
|
|
518
500
|
onMouseOut: containerUtilities.composeEventHandlers(onMouseOut, () => setIsHovered(false)),
|
|
519
501
|
...other
|
|
520
502
|
})), children, React__namespace.default.createElement(StyledRotateIcon, {
|
|
521
|
-
isCompact: isCompact,
|
|
522
|
-
isHovered: isHovered,
|
|
523
|
-
isRotated: isExpanded,
|
|
524
|
-
isCollapsible: isCollapsible,
|
|
503
|
+
$isCompact: isCompact,
|
|
504
|
+
$isHovered: isHovered,
|
|
505
|
+
$isRotated: isExpanded,
|
|
506
|
+
$isCollapsible: isCollapsible,
|
|
525
507
|
onMouseOver: containerUtilities.composeEventHandlers(onMouseOver, () => setIsHovered(true)),
|
|
526
508
|
onMouseOut: containerUtilities.composeEventHandlers(onMouseOut, () => setIsHovered(false))
|
|
527
509
|
}, React__namespace.default.createElement(SvgChevronDownStroke, null))));
|
|
@@ -842,7 +824,7 @@ const ContentComponent = React.forwardRef((props, ref) => {
|
|
|
842
824
|
surfaceColor
|
|
843
825
|
} = useTimelineItemContext();
|
|
844
826
|
return React__namespace.default.createElement(React__namespace.default.Fragment, null, React__namespace.default.createElement(StyledSeparator, null, React__namespace.default.createElement(StyledItemIcon, {
|
|
845
|
-
surfaceColor: surfaceColor
|
|
827
|
+
$surfaceColor: surfaceColor
|
|
846
828
|
}, icon || React__namespace.default.createElement(SvgCircleFullStroke, null))), React__namespace.default.createElement(StyledTimelineContent, Object.assign({
|
|
847
829
|
ref: ref
|
|
848
830
|
}, props)));
|
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
import { DefaultTheme } from 'styled-components';
|
|
9
9
|
interface IStyledRotateIcon {
|
|
10
|
-
isCompact?: boolean;
|
|
10
|
+
$isCompact?: boolean;
|
|
11
|
+
$isRotated?: boolean;
|
|
12
|
+
$isHovered?: boolean;
|
|
13
|
+
$isCollapsible?: boolean;
|
|
11
14
|
}
|
|
12
|
-
export declare const StyledRotateIcon: import("styled-components").StyledComponent<({ children,
|
|
15
|
+
export declare const StyledRotateIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
|
|
13
16
|
'data-garden-id': string;
|
|
14
17
|
'data-garden-version': string;
|
|
15
18
|
} & IStyledRotateIcon, "data-garden-id" | "data-garden-version">;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
interface IStyledItemIcon {
|
|
9
|
-
surfaceColor?: string;
|
|
9
|
+
$surfaceColor?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* 1. Odd sizing allows the timeline line to center respective of the circle icon.
|
|
13
13
|
*/
|
|
14
|
-
export declare const StyledItemIcon: import("styled-components").StyledComponent<({
|
|
14
|
+
export declare const StyledItemIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, import("styled-components").DefaultTheme, {
|
|
15
15
|
'data-garden-id': string;
|
|
16
16
|
'data-garden-version': string;
|
|
17
17
|
} & IStyledItemIcon, "data-garden-id" | "data-garden-version">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-accordions",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.9",
|
|
4
4
|
"description": "Components related to accordions in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"styled-components": "^5.3.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^9.0.0-next.
|
|
36
|
+
"@zendeskgarden/react-theming": "^9.0.0-next.9",
|
|
37
37
|
"@zendeskgarden/svg-icons": "7.0.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"zendeskgarden:src": "src/index.ts",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "771281b562d376a6aee04b0cd71dd888b3ae4a1d"
|
|
51
51
|
}
|