@zendeskgarden/react-accordions 8.69.2 → 8.69.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +25 -47
- package/dist/index.esm.js +25 -47
- package/dist/typings/elements/accordion/Accordion.d.ts +21 -21
- package/dist/typings/elements/accordion/components/Header.d.ts +11 -11
- package/dist/typings/elements/accordion/components/Label.d.ts +11 -11
- package/dist/typings/elements/accordion/components/Panel.d.ts +11 -11
- package/dist/typings/elements/accordion/components/Section.d.ts +11 -11
- package/dist/typings/elements/stepper/Stepper.d.ts +19 -19
- package/dist/typings/elements/stepper/components/Content.d.ts +11 -11
- package/dist/typings/elements/stepper/components/Label.d.ts +12 -12
- package/dist/typings/elements/stepper/components/Step.d.ts +11 -11
- package/dist/typings/elements/timeline/Timeline.d.ts +19 -19
- package/dist/typings/elements/timeline/components/Content.d.ts +11 -11
- package/dist/typings/elements/timeline/components/Item.d.ts +16 -16
- package/dist/typings/elements/timeline/components/OppositeContent.d.ts +11 -11
- package/dist/typings/index.d.ts +12 -12
- package/dist/typings/styled/accordion/StyledAccordion.d.ts +10 -10
- package/dist/typings/styled/accordion/StyledButton.d.ts +20 -20
- package/dist/typings/styled/accordion/StyledHeader.d.ts +13 -13
- package/dist/typings/styled/accordion/StyledInnerPanel.d.ts +15 -15
- package/dist/typings/styled/accordion/StyledPanel.d.ts +15 -15
- package/dist/typings/styled/accordion/StyledRotateIcon.d.ts +16 -16
- package/dist/typings/styled/accordion/StyledSection.d.ts +10 -10
- package/dist/typings/styled/index.d.ts +27 -27
- package/dist/typings/styled/stepper/StyledContent.d.ts +12 -12
- package/dist/typings/styled/stepper/StyledIcon.d.ts +14 -14
- package/dist/typings/styled/stepper/StyledInnerContent.d.ts +8 -11
- package/dist/typings/styled/stepper/StyledLabel.d.ts +12 -12
- package/dist/typings/styled/stepper/StyledLabelText.d.ts +12 -12
- package/dist/typings/styled/stepper/StyledLine.d.ts +10 -10
- package/dist/typings/styled/stepper/StyledStep.d.ts +11 -11
- package/dist/typings/styled/stepper/StyledStepper.d.ts +14 -14
- package/dist/typings/styled/timeline/StyledContent.d.ts +10 -10
- package/dist/typings/styled/timeline/StyledItem.d.ts +16 -16
- package/dist/typings/styled/timeline/StyledItemIcon.d.ts +18 -18
- package/dist/typings/styled/timeline/StyledOppositeContent.d.ts +10 -10
- package/dist/typings/styled/timeline/StyledSeparator.d.ts +10 -10
- package/dist/typings/styled/timeline/StyledTimeline.d.ts +13 -13
- package/dist/typings/types/index.d.ts +55 -55
- package/dist/typings/utils/index.d.ts +13 -13
- package/dist/typings/utils/useAccordionContext.d.ts +19 -19
- package/dist/typings/utils/useHeaderContext.d.ts +13 -13
- package/dist/typings/utils/useSectionContext.d.ts +12 -12
- package/dist/typings/utils/useStepContext.d.ts +12 -12
- package/dist/typings/utils/useStepperContext.d.ts +14 -14
- package/dist/typings/utils/useTimelineContext.d.ts +12 -12
- package/dist/typings/utils/useTimelineItemContext.d.ts +13 -13
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -70,15 +70,15 @@ const sizeStyles$1 = props => {
|
|
|
70
70
|
const marginRight = rtl ? space.base * 3 : '0';
|
|
71
71
|
const marginLeft = rtl ? '0' : space.base * 3;
|
|
72
72
|
const marginVertical = space.base * 3;
|
|
73
|
-
return styled.css(["margin:", "px ", "px ", "px ", "px;padding:0 ", "px ", "px ", "px;"], marginVertical, marginRight, marginVertical, marginLeft, paddingRight, paddingBottom, paddingLeft);
|
|
73
|
+
return styled.css(["margin:", "px ", "px ", "px ", "px;padding:0 ", "px ", "px ", "px;min-width:", "px;height:auto;"], marginVertical, marginRight, marginVertical, marginLeft, paddingRight, paddingBottom, paddingLeft, space.base * 30);
|
|
74
74
|
};
|
|
75
75
|
const StyledContent = styled__default.default.div.attrs({
|
|
76
76
|
'data-garden-id': COMPONENT_ID$k,
|
|
77
|
-
'data-garden-version': '8.69.
|
|
77
|
+
'data-garden-version': '8.69.3'
|
|
78
78
|
}).withConfig({
|
|
79
79
|
displayName: "StyledContent",
|
|
80
80
|
componentId: "sc-mazvvo-0"
|
|
81
|
-
})(["
|
|
81
|
+
})(["display:grid;grid-template-rows:", "fr;transition:grid-template-rows 0.25s ease-in-out;word-break:break-word;", " ", ";"], props => props.isActive ? 1 : 0, sizeStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
|
|
82
82
|
StyledContent.defaultProps = {
|
|
83
83
|
theme: reactTheming.DEFAULT_THEME
|
|
84
84
|
};
|
|
@@ -86,7 +86,7 @@ StyledContent.defaultProps = {
|
|
|
86
86
|
const COMPONENT_ID$j = 'accordions.step_line';
|
|
87
87
|
const StyledLine = styled__default.default.div.attrs({
|
|
88
88
|
'data-garden-id': COMPONENT_ID$j,
|
|
89
|
-
'data-garden-version': '8.69.
|
|
89
|
+
'data-garden-version': '8.69.3'
|
|
90
90
|
}).withConfig({
|
|
91
91
|
displayName: "StyledLine",
|
|
92
92
|
componentId: "sc-1gkpjbr-0"
|
|
@@ -98,7 +98,7 @@ StyledLine.defaultProps = {
|
|
|
98
98
|
const COMPONENT_ID$i = 'accordions.step';
|
|
99
99
|
const StyledStep = styled__default.default.li.attrs({
|
|
100
100
|
'data-garden-id': COMPONENT_ID$i,
|
|
101
|
-
'data-garden-version': '8.69.
|
|
101
|
+
'data-garden-version': '8.69.3'
|
|
102
102
|
}).withConfig({
|
|
103
103
|
displayName: "StyledStep",
|
|
104
104
|
componentId: "sc-12fiwtz-0"
|
|
@@ -110,11 +110,11 @@ StyledStep.defaultProps = {
|
|
|
110
110
|
const COMPONENT_ID$h = 'accordions.step_inner_content';
|
|
111
111
|
const StyledInnerContent = styled__default.default.div.attrs({
|
|
112
112
|
'data-garden-id': COMPONENT_ID$h,
|
|
113
|
-
'data-garden-version': '8.69.
|
|
113
|
+
'data-garden-version': '8.69.3'
|
|
114
114
|
}).withConfig({
|
|
115
115
|
displayName: "StyledInnerContent",
|
|
116
116
|
componentId: "sc-1xs9fh7-0"
|
|
117
|
-
})(["
|
|
117
|
+
})(["overflow:hidden;line-height:", ";color:", ";font-size:", ";", ";"], props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.colors.foreground, props => props.theme.fontSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
118
118
|
StyledInnerContent.defaultProps = {
|
|
119
119
|
theme: reactTheming.DEFAULT_THEME
|
|
120
120
|
};
|
|
@@ -122,7 +122,7 @@ StyledInnerContent.defaultProps = {
|
|
|
122
122
|
const COMPONENT_ID$g = 'accordions.stepper';
|
|
123
123
|
const StyledStepper = styled__default.default.ol.attrs({
|
|
124
124
|
'data-garden-id': COMPONENT_ID$g,
|
|
125
|
-
'data-garden-version': '8.69.
|
|
125
|
+
'data-garden-version': '8.69.3'
|
|
126
126
|
}).withConfig({
|
|
127
127
|
displayName: "StyledStepper",
|
|
128
128
|
componentId: "sc-dsxw0f-0"
|
|
@@ -146,7 +146,7 @@ const colorStyles$2 = props => {
|
|
|
146
146
|
};
|
|
147
147
|
const StyledIcon = styled__default.default.div.attrs({
|
|
148
148
|
'data-garden-id': COMPONENT_ID$f,
|
|
149
|
-
'data-garden-version': '8.69.
|
|
149
|
+
'data-garden-version': '8.69.3'
|
|
150
150
|
}).withConfig({
|
|
151
151
|
displayName: "StyledIcon",
|
|
152
152
|
componentId: "sc-v20nz9-1"
|
|
@@ -161,7 +161,7 @@ StyledIcon.defaultProps = {
|
|
|
161
161
|
const COMPONENT_ID$e = 'accordions.step_label';
|
|
162
162
|
const StyledLabel = styled__default.default.div.attrs({
|
|
163
163
|
'data-garden-id': COMPONENT_ID$e,
|
|
164
|
-
'data-garden-version': '8.69.
|
|
164
|
+
'data-garden-version': '8.69.3'
|
|
165
165
|
}).withConfig({
|
|
166
166
|
displayName: "StyledLabel",
|
|
167
167
|
componentId: "sc-1o82llj-0"
|
|
@@ -173,7 +173,7 @@ StyledLabel.defaultProps = {
|
|
|
173
173
|
const COMPONENT_ID$d = 'accordions.step_label_text';
|
|
174
174
|
const StyledLabelText = styled__default.default.div.attrs({
|
|
175
175
|
'data-garden-id': COMPONENT_ID$d,
|
|
176
|
-
'data-garden-version': '8.69.
|
|
176
|
+
'data-garden-version': '8.69.3'
|
|
177
177
|
}).withConfig({
|
|
178
178
|
displayName: "StyledLabelText",
|
|
179
179
|
componentId: "sc-111m5zo-0"
|
|
@@ -185,7 +185,7 @@ StyledLabelText.defaultProps = {
|
|
|
185
185
|
const COMPONENT_ID$c = 'accordions.accordion';
|
|
186
186
|
const StyledAccordion = styled__default.default.div.attrs({
|
|
187
187
|
'data-garden-id': COMPONENT_ID$c,
|
|
188
|
-
'data-garden-version': '8.69.
|
|
188
|
+
'data-garden-version': '8.69.3'
|
|
189
189
|
}).withConfig({
|
|
190
190
|
displayName: "StyledAccordion",
|
|
191
191
|
componentId: "sc-niv9ic-0"
|
|
@@ -215,7 +215,7 @@ const paddingStyles = props => {
|
|
|
215
215
|
};
|
|
216
216
|
const StyledPanel = styled__default.default.section.attrs({
|
|
217
217
|
'data-garden-id': COMPONENT_ID$b,
|
|
218
|
-
'data-garden-version': '8.69.
|
|
218
|
+
'data-garden-version': '8.69.3'
|
|
219
219
|
}).withConfig({
|
|
220
220
|
displayName: "StyledPanel",
|
|
221
221
|
componentId: "sc-1piryze-0"
|
|
@@ -228,7 +228,7 @@ StyledPanel.defaultProps = {
|
|
|
228
228
|
const COMPONENT_ID$a = 'accordions.section';
|
|
229
229
|
const StyledSection = styled__default.default.div.attrs({
|
|
230
230
|
'data-garden-id': COMPONENT_ID$a,
|
|
231
|
-
'data-garden-version': '8.69.
|
|
231
|
+
'data-garden-version': '8.69.3'
|
|
232
232
|
}).withConfig({
|
|
233
233
|
displayName: "StyledSection",
|
|
234
234
|
componentId: "sc-v2t9bd-0"
|
|
@@ -240,7 +240,7 @@ StyledSection.defaultProps = {
|
|
|
240
240
|
const COMPONENT_ID$9 = 'accordions.header';
|
|
241
241
|
const StyledHeader = styled__default.default.div.attrs({
|
|
242
242
|
'data-garden-id': COMPONENT_ID$9,
|
|
243
|
-
'data-garden-version': '8.69.
|
|
243
|
+
'data-garden-version': '8.69.3'
|
|
244
244
|
}).withConfig({
|
|
245
245
|
displayName: "StyledHeader",
|
|
246
246
|
componentId: "sc-2c6rbr-0"
|
|
@@ -265,7 +265,7 @@ const colorStyles$1 = props => {
|
|
|
265
265
|
};
|
|
266
266
|
const StyledButton = styled__default.default.button.attrs({
|
|
267
267
|
'data-garden-id': COMPONENT_ID$8,
|
|
268
|
-
'data-garden-version': '8.69.
|
|
268
|
+
'data-garden-version': '8.69.3'
|
|
269
269
|
}).withConfig({
|
|
270
270
|
displayName: "StyledButton",
|
|
271
271
|
componentId: "sc-xj3hy7-0"
|
|
@@ -277,7 +277,7 @@ StyledButton.defaultProps = {
|
|
|
277
277
|
const COMPONENT_ID$7 = 'accordions.step_inner_panel';
|
|
278
278
|
const StyledInnerPanel = styled__default.default.div.attrs({
|
|
279
279
|
'data-garden-id': COMPONENT_ID$7,
|
|
280
|
-
'data-garden-version': '8.69.
|
|
280
|
+
'data-garden-version': '8.69.3'
|
|
281
281
|
}).withConfig({
|
|
282
282
|
displayName: "StyledInnerPanel",
|
|
283
283
|
componentId: "sc-8nbueg-0"
|
|
@@ -309,7 +309,7 @@ _ref => {
|
|
|
309
309
|
return React.cloneElement(React.Children.only(children), props);
|
|
310
310
|
}).attrs({
|
|
311
311
|
'data-garden-id': COMPONENT_ID$6,
|
|
312
|
-
'data-garden-version': '8.69.
|
|
312
|
+
'data-garden-version': '8.69.3'
|
|
313
313
|
}).withConfig({
|
|
314
314
|
displayName: "StyledRotateIcon",
|
|
315
315
|
componentId: "sc-hp435q-0"
|
|
@@ -321,7 +321,7 @@ StyledRotateIcon.defaultProps = {
|
|
|
321
321
|
const COMPONENT_ID$5 = 'timeline';
|
|
322
322
|
const StyledTimeline = styled__default.default.ol.attrs({
|
|
323
323
|
'data-garden-id': COMPONENT_ID$5,
|
|
324
|
-
'data-garden-version': '8.69.
|
|
324
|
+
'data-garden-version': '8.69.3'
|
|
325
325
|
}).withConfig({
|
|
326
326
|
displayName: "StyledTimeline",
|
|
327
327
|
componentId: "sc-pig5kv-0"
|
|
@@ -333,7 +333,7 @@ StyledTimeline.defaultProps = {
|
|
|
333
333
|
const COMPONENT_ID$4 = 'timeline.content.separator';
|
|
334
334
|
const StyledSeparator = styled__default.default.div.attrs({
|
|
335
335
|
'data-garden-id': COMPONENT_ID$4,
|
|
336
|
-
'data-garden-version': '8.69.
|
|
336
|
+
'data-garden-version': '8.69.3'
|
|
337
337
|
}).withConfig({
|
|
338
338
|
displayName: "StyledSeparator",
|
|
339
339
|
componentId: "sc-fki51e-0"
|
|
@@ -345,7 +345,7 @@ StyledSeparator.defaultProps = {
|
|
|
345
345
|
const COMPONENT_ID$3 = 'timeline.content';
|
|
346
346
|
const StyledTimelineContent = styled__default.default.div.attrs({
|
|
347
347
|
'data-garden-id': COMPONENT_ID$3,
|
|
348
|
-
'data-garden-version': '8.69.
|
|
348
|
+
'data-garden-version': '8.69.3'
|
|
349
349
|
}).withConfig({
|
|
350
350
|
displayName: "StyledContent__StyledTimelineContent",
|
|
351
351
|
componentId: "sc-19phgu1-0"
|
|
@@ -357,7 +357,7 @@ StyledTimelineContent.defaultProps = {
|
|
|
357
357
|
const COMPONENT_ID$2 = 'timeline.opposite.content';
|
|
358
358
|
const StyledOppositeContent = styled__default.default.div.attrs({
|
|
359
359
|
'data-garden-id': COMPONENT_ID$2,
|
|
360
|
-
'data-garden-version': '8.69.
|
|
360
|
+
'data-garden-version': '8.69.3'
|
|
361
361
|
}).withConfig({
|
|
362
362
|
displayName: "StyledOppositeContent",
|
|
363
363
|
componentId: "sc-jurh2k-0"
|
|
@@ -369,7 +369,7 @@ StyledOppositeContent.defaultProps = {
|
|
|
369
369
|
const COMPONENT_ID$1 = 'timeline.item';
|
|
370
370
|
const StyledTimelineItem = styled__default.default.li.attrs({
|
|
371
371
|
'data-garden-id': COMPONENT_ID$1,
|
|
372
|
-
'data-garden-version': '8.69.
|
|
372
|
+
'data-garden-version': '8.69.3'
|
|
373
373
|
}).withConfig({
|
|
374
374
|
displayName: "StyledItem__StyledTimelineItem",
|
|
375
375
|
componentId: "sc-5mcnzm-0"
|
|
@@ -388,7 +388,7 @@ const StyledItemIcon = styled__default.default(_ref => {
|
|
|
388
388
|
return React.cloneElement(React.Children.only(children), props);
|
|
389
389
|
}).attrs({
|
|
390
390
|
'data-garden-id': COMPONENT_ID,
|
|
391
|
-
'data-garden-version': '8.69.
|
|
391
|
+
'data-garden-version': '8.69.3'
|
|
392
392
|
}).withConfig({
|
|
393
393
|
displayName: "StyledItemIcon",
|
|
394
394
|
componentId: "sc-vz2l6e-0"
|
|
@@ -782,7 +782,6 @@ LabelComponent.propTypes = {
|
|
|
782
782
|
const Label = LabelComponent;
|
|
783
783
|
|
|
784
784
|
const ContentComponent$1 = React.forwardRef((props, ref) => {
|
|
785
|
-
const contentRef = React.useRef();
|
|
786
785
|
const {
|
|
787
786
|
activeIndex,
|
|
788
787
|
isHorizontal
|
|
@@ -791,31 +790,10 @@ const ContentComponent$1 = React.forwardRef((props, ref) => {
|
|
|
791
790
|
currentStepIndex
|
|
792
791
|
} = useStepContext();
|
|
793
792
|
const isActive = currentStepIndex === activeIndex;
|
|
794
|
-
const theme = React.useContext(styled.ThemeContext);
|
|
795
|
-
const environment = reactTheming.useDocument(theme);
|
|
796
|
-
React.useEffect(() => {
|
|
797
|
-
if (environment && isActive && isHorizontal === false) {
|
|
798
|
-
const win = environment.defaultView || window;
|
|
799
|
-
const updateMaxHeight = debounce__default.default(() => {
|
|
800
|
-
if (contentRef.current) {
|
|
801
|
-
const child = contentRef.current.children[0];
|
|
802
|
-
child.style.maxHeight = `${child.scrollHeight}px`;
|
|
803
|
-
}
|
|
804
|
-
}, 100);
|
|
805
|
-
win.addEventListener('resize', updateMaxHeight);
|
|
806
|
-
updateMaxHeight();
|
|
807
|
-
return () => {
|
|
808
|
-
updateMaxHeight.cancel();
|
|
809
|
-
win.removeEventListener('resize', updateMaxHeight);
|
|
810
|
-
};
|
|
811
|
-
}
|
|
812
|
-
return undefined;
|
|
813
|
-
}, [isActive, isHorizontal, contentRef, environment]);
|
|
814
793
|
return isHorizontal === false ? React__namespace.default.createElement(StyledContent, _extends$3({
|
|
815
|
-
ref:
|
|
794
|
+
ref: ref,
|
|
816
795
|
isActive: isActive
|
|
817
796
|
}, props), React__namespace.default.createElement(StyledInnerContent, {
|
|
818
|
-
isActive: isActive,
|
|
819
797
|
"aria-hidden": !isActive
|
|
820
798
|
}, props.children)) : null;
|
|
821
799
|
});
|
package/dist/index.esm.js
CHANGED
|
@@ -43,15 +43,15 @@ const sizeStyles$1 = props => {
|
|
|
43
43
|
const marginRight = rtl ? space.base * 3 : '0';
|
|
44
44
|
const marginLeft = rtl ? '0' : space.base * 3;
|
|
45
45
|
const marginVertical = space.base * 3;
|
|
46
|
-
return css(["margin:", "px ", "px ", "px ", "px;padding:0 ", "px ", "px ", "px;"], marginVertical, marginRight, marginVertical, marginLeft, paddingRight, paddingBottom, paddingLeft);
|
|
46
|
+
return css(["margin:", "px ", "px ", "px ", "px;padding:0 ", "px ", "px ", "px;min-width:", "px;height:auto;"], marginVertical, marginRight, marginVertical, marginLeft, paddingRight, paddingBottom, paddingLeft, space.base * 30);
|
|
47
47
|
};
|
|
48
48
|
const StyledContent = styled.div.attrs({
|
|
49
49
|
'data-garden-id': COMPONENT_ID$k,
|
|
50
|
-
'data-garden-version': '8.69.
|
|
50
|
+
'data-garden-version': '8.69.3'
|
|
51
51
|
}).withConfig({
|
|
52
52
|
displayName: "StyledContent",
|
|
53
53
|
componentId: "sc-mazvvo-0"
|
|
54
|
-
})(["
|
|
54
|
+
})(["display:grid;grid-template-rows:", "fr;transition:grid-template-rows 0.25s ease-in-out;word-break:break-word;", " ", ";"], props => props.isActive ? 1 : 0, sizeStyles$1, props => retrieveComponentStyles(COMPONENT_ID$k, props));
|
|
55
55
|
StyledContent.defaultProps = {
|
|
56
56
|
theme: DEFAULT_THEME
|
|
57
57
|
};
|
|
@@ -59,7 +59,7 @@ StyledContent.defaultProps = {
|
|
|
59
59
|
const COMPONENT_ID$j = 'accordions.step_line';
|
|
60
60
|
const StyledLine = styled.div.attrs({
|
|
61
61
|
'data-garden-id': COMPONENT_ID$j,
|
|
62
|
-
'data-garden-version': '8.69.
|
|
62
|
+
'data-garden-version': '8.69.3'
|
|
63
63
|
}).withConfig({
|
|
64
64
|
displayName: "StyledLine",
|
|
65
65
|
componentId: "sc-1gkpjbr-0"
|
|
@@ -71,7 +71,7 @@ StyledLine.defaultProps = {
|
|
|
71
71
|
const COMPONENT_ID$i = 'accordions.step';
|
|
72
72
|
const StyledStep = styled.li.attrs({
|
|
73
73
|
'data-garden-id': COMPONENT_ID$i,
|
|
74
|
-
'data-garden-version': '8.69.
|
|
74
|
+
'data-garden-version': '8.69.3'
|
|
75
75
|
}).withConfig({
|
|
76
76
|
displayName: "StyledStep",
|
|
77
77
|
componentId: "sc-12fiwtz-0"
|
|
@@ -83,11 +83,11 @@ StyledStep.defaultProps = {
|
|
|
83
83
|
const COMPONENT_ID$h = 'accordions.step_inner_content';
|
|
84
84
|
const StyledInnerContent = styled.div.attrs({
|
|
85
85
|
'data-garden-id': COMPONENT_ID$h,
|
|
86
|
-
'data-garden-version': '8.69.
|
|
86
|
+
'data-garden-version': '8.69.3'
|
|
87
87
|
}).withConfig({
|
|
88
88
|
displayName: "StyledInnerContent",
|
|
89
89
|
componentId: "sc-1xs9fh7-0"
|
|
90
|
-
})(["
|
|
90
|
+
})(["overflow:hidden;line-height:", ";color:", ";font-size:", ";", ";"], props => getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.colors.foreground, props => props.theme.fontSizes.md, props => retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
91
91
|
StyledInnerContent.defaultProps = {
|
|
92
92
|
theme: DEFAULT_THEME
|
|
93
93
|
};
|
|
@@ -95,7 +95,7 @@ StyledInnerContent.defaultProps = {
|
|
|
95
95
|
const COMPONENT_ID$g = 'accordions.stepper';
|
|
96
96
|
const StyledStepper = styled.ol.attrs({
|
|
97
97
|
'data-garden-id': COMPONENT_ID$g,
|
|
98
|
-
'data-garden-version': '8.69.
|
|
98
|
+
'data-garden-version': '8.69.3'
|
|
99
99
|
}).withConfig({
|
|
100
100
|
displayName: "StyledStepper",
|
|
101
101
|
componentId: "sc-dsxw0f-0"
|
|
@@ -119,7 +119,7 @@ const colorStyles$2 = props => {
|
|
|
119
119
|
};
|
|
120
120
|
const StyledIcon = styled.div.attrs({
|
|
121
121
|
'data-garden-id': COMPONENT_ID$f,
|
|
122
|
-
'data-garden-version': '8.69.
|
|
122
|
+
'data-garden-version': '8.69.3'
|
|
123
123
|
}).withConfig({
|
|
124
124
|
displayName: "StyledIcon",
|
|
125
125
|
componentId: "sc-v20nz9-1"
|
|
@@ -134,7 +134,7 @@ StyledIcon.defaultProps = {
|
|
|
134
134
|
const COMPONENT_ID$e = 'accordions.step_label';
|
|
135
135
|
const StyledLabel = styled.div.attrs({
|
|
136
136
|
'data-garden-id': COMPONENT_ID$e,
|
|
137
|
-
'data-garden-version': '8.69.
|
|
137
|
+
'data-garden-version': '8.69.3'
|
|
138
138
|
}).withConfig({
|
|
139
139
|
displayName: "StyledLabel",
|
|
140
140
|
componentId: "sc-1o82llj-0"
|
|
@@ -146,7 +146,7 @@ StyledLabel.defaultProps = {
|
|
|
146
146
|
const COMPONENT_ID$d = 'accordions.step_label_text';
|
|
147
147
|
const StyledLabelText = styled.div.attrs({
|
|
148
148
|
'data-garden-id': COMPONENT_ID$d,
|
|
149
|
-
'data-garden-version': '8.69.
|
|
149
|
+
'data-garden-version': '8.69.3'
|
|
150
150
|
}).withConfig({
|
|
151
151
|
displayName: "StyledLabelText",
|
|
152
152
|
componentId: "sc-111m5zo-0"
|
|
@@ -158,7 +158,7 @@ StyledLabelText.defaultProps = {
|
|
|
158
158
|
const COMPONENT_ID$c = 'accordions.accordion';
|
|
159
159
|
const StyledAccordion = styled.div.attrs({
|
|
160
160
|
'data-garden-id': COMPONENT_ID$c,
|
|
161
|
-
'data-garden-version': '8.69.
|
|
161
|
+
'data-garden-version': '8.69.3'
|
|
162
162
|
}).withConfig({
|
|
163
163
|
displayName: "StyledAccordion",
|
|
164
164
|
componentId: "sc-niv9ic-0"
|
|
@@ -188,7 +188,7 @@ const paddingStyles = props => {
|
|
|
188
188
|
};
|
|
189
189
|
const StyledPanel = styled.section.attrs({
|
|
190
190
|
'data-garden-id': COMPONENT_ID$b,
|
|
191
|
-
'data-garden-version': '8.69.
|
|
191
|
+
'data-garden-version': '8.69.3'
|
|
192
192
|
}).withConfig({
|
|
193
193
|
displayName: "StyledPanel",
|
|
194
194
|
componentId: "sc-1piryze-0"
|
|
@@ -201,7 +201,7 @@ StyledPanel.defaultProps = {
|
|
|
201
201
|
const COMPONENT_ID$a = 'accordions.section';
|
|
202
202
|
const StyledSection = styled.div.attrs({
|
|
203
203
|
'data-garden-id': COMPONENT_ID$a,
|
|
204
|
-
'data-garden-version': '8.69.
|
|
204
|
+
'data-garden-version': '8.69.3'
|
|
205
205
|
}).withConfig({
|
|
206
206
|
displayName: "StyledSection",
|
|
207
207
|
componentId: "sc-v2t9bd-0"
|
|
@@ -213,7 +213,7 @@ StyledSection.defaultProps = {
|
|
|
213
213
|
const COMPONENT_ID$9 = 'accordions.header';
|
|
214
214
|
const StyledHeader = styled.div.attrs({
|
|
215
215
|
'data-garden-id': COMPONENT_ID$9,
|
|
216
|
-
'data-garden-version': '8.69.
|
|
216
|
+
'data-garden-version': '8.69.3'
|
|
217
217
|
}).withConfig({
|
|
218
218
|
displayName: "StyledHeader",
|
|
219
219
|
componentId: "sc-2c6rbr-0"
|
|
@@ -238,7 +238,7 @@ const colorStyles$1 = props => {
|
|
|
238
238
|
};
|
|
239
239
|
const StyledButton = styled.button.attrs({
|
|
240
240
|
'data-garden-id': COMPONENT_ID$8,
|
|
241
|
-
'data-garden-version': '8.69.
|
|
241
|
+
'data-garden-version': '8.69.3'
|
|
242
242
|
}).withConfig({
|
|
243
243
|
displayName: "StyledButton",
|
|
244
244
|
componentId: "sc-xj3hy7-0"
|
|
@@ -250,7 +250,7 @@ StyledButton.defaultProps = {
|
|
|
250
250
|
const COMPONENT_ID$7 = 'accordions.step_inner_panel';
|
|
251
251
|
const StyledInnerPanel = styled.div.attrs({
|
|
252
252
|
'data-garden-id': COMPONENT_ID$7,
|
|
253
|
-
'data-garden-version': '8.69.
|
|
253
|
+
'data-garden-version': '8.69.3'
|
|
254
254
|
}).withConfig({
|
|
255
255
|
displayName: "StyledInnerPanel",
|
|
256
256
|
componentId: "sc-8nbueg-0"
|
|
@@ -282,7 +282,7 @@ _ref => {
|
|
|
282
282
|
return cloneElement(Children.only(children), props);
|
|
283
283
|
}).attrs({
|
|
284
284
|
'data-garden-id': COMPONENT_ID$6,
|
|
285
|
-
'data-garden-version': '8.69.
|
|
285
|
+
'data-garden-version': '8.69.3'
|
|
286
286
|
}).withConfig({
|
|
287
287
|
displayName: "StyledRotateIcon",
|
|
288
288
|
componentId: "sc-hp435q-0"
|
|
@@ -294,7 +294,7 @@ StyledRotateIcon.defaultProps = {
|
|
|
294
294
|
const COMPONENT_ID$5 = 'timeline';
|
|
295
295
|
const StyledTimeline = styled.ol.attrs({
|
|
296
296
|
'data-garden-id': COMPONENT_ID$5,
|
|
297
|
-
'data-garden-version': '8.69.
|
|
297
|
+
'data-garden-version': '8.69.3'
|
|
298
298
|
}).withConfig({
|
|
299
299
|
displayName: "StyledTimeline",
|
|
300
300
|
componentId: "sc-pig5kv-0"
|
|
@@ -306,7 +306,7 @@ StyledTimeline.defaultProps = {
|
|
|
306
306
|
const COMPONENT_ID$4 = 'timeline.content.separator';
|
|
307
307
|
const StyledSeparator = styled.div.attrs({
|
|
308
308
|
'data-garden-id': COMPONENT_ID$4,
|
|
309
|
-
'data-garden-version': '8.69.
|
|
309
|
+
'data-garden-version': '8.69.3'
|
|
310
310
|
}).withConfig({
|
|
311
311
|
displayName: "StyledSeparator",
|
|
312
312
|
componentId: "sc-fki51e-0"
|
|
@@ -318,7 +318,7 @@ StyledSeparator.defaultProps = {
|
|
|
318
318
|
const COMPONENT_ID$3 = 'timeline.content';
|
|
319
319
|
const StyledTimelineContent = styled.div.attrs({
|
|
320
320
|
'data-garden-id': COMPONENT_ID$3,
|
|
321
|
-
'data-garden-version': '8.69.
|
|
321
|
+
'data-garden-version': '8.69.3'
|
|
322
322
|
}).withConfig({
|
|
323
323
|
displayName: "StyledContent__StyledTimelineContent",
|
|
324
324
|
componentId: "sc-19phgu1-0"
|
|
@@ -330,7 +330,7 @@ StyledTimelineContent.defaultProps = {
|
|
|
330
330
|
const COMPONENT_ID$2 = 'timeline.opposite.content';
|
|
331
331
|
const StyledOppositeContent = styled.div.attrs({
|
|
332
332
|
'data-garden-id': COMPONENT_ID$2,
|
|
333
|
-
'data-garden-version': '8.69.
|
|
333
|
+
'data-garden-version': '8.69.3'
|
|
334
334
|
}).withConfig({
|
|
335
335
|
displayName: "StyledOppositeContent",
|
|
336
336
|
componentId: "sc-jurh2k-0"
|
|
@@ -342,7 +342,7 @@ StyledOppositeContent.defaultProps = {
|
|
|
342
342
|
const COMPONENT_ID$1 = 'timeline.item';
|
|
343
343
|
const StyledTimelineItem = styled.li.attrs({
|
|
344
344
|
'data-garden-id': COMPONENT_ID$1,
|
|
345
|
-
'data-garden-version': '8.69.
|
|
345
|
+
'data-garden-version': '8.69.3'
|
|
346
346
|
}).withConfig({
|
|
347
347
|
displayName: "StyledItem__StyledTimelineItem",
|
|
348
348
|
componentId: "sc-5mcnzm-0"
|
|
@@ -361,7 +361,7 @@ const StyledItemIcon = styled(_ref => {
|
|
|
361
361
|
return cloneElement(Children.only(children), props);
|
|
362
362
|
}).attrs({
|
|
363
363
|
'data-garden-id': COMPONENT_ID,
|
|
364
|
-
'data-garden-version': '8.69.
|
|
364
|
+
'data-garden-version': '8.69.3'
|
|
365
365
|
}).withConfig({
|
|
366
366
|
displayName: "StyledItemIcon",
|
|
367
367
|
componentId: "sc-vz2l6e-0"
|
|
@@ -755,7 +755,6 @@ LabelComponent.propTypes = {
|
|
|
755
755
|
const Label = LabelComponent;
|
|
756
756
|
|
|
757
757
|
const ContentComponent$1 = forwardRef((props, ref) => {
|
|
758
|
-
const contentRef = useRef();
|
|
759
758
|
const {
|
|
760
759
|
activeIndex,
|
|
761
760
|
isHorizontal
|
|
@@ -764,31 +763,10 @@ const ContentComponent$1 = forwardRef((props, ref) => {
|
|
|
764
763
|
currentStepIndex
|
|
765
764
|
} = useStepContext();
|
|
766
765
|
const isActive = currentStepIndex === activeIndex;
|
|
767
|
-
const theme = useContext(ThemeContext);
|
|
768
|
-
const environment = useDocument(theme);
|
|
769
|
-
useEffect(() => {
|
|
770
|
-
if (environment && isActive && isHorizontal === false) {
|
|
771
|
-
const win = environment.defaultView || window;
|
|
772
|
-
const updateMaxHeight = debounce(() => {
|
|
773
|
-
if (contentRef.current) {
|
|
774
|
-
const child = contentRef.current.children[0];
|
|
775
|
-
child.style.maxHeight = `${child.scrollHeight}px`;
|
|
776
|
-
}
|
|
777
|
-
}, 100);
|
|
778
|
-
win.addEventListener('resize', updateMaxHeight);
|
|
779
|
-
updateMaxHeight();
|
|
780
|
-
return () => {
|
|
781
|
-
updateMaxHeight.cancel();
|
|
782
|
-
win.removeEventListener('resize', updateMaxHeight);
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
return undefined;
|
|
786
|
-
}, [isActive, isHorizontal, contentRef, environment]);
|
|
787
766
|
return isHorizontal === false ? React__default.createElement(StyledContent, _extends$3({
|
|
788
|
-
ref:
|
|
767
|
+
ref: ref,
|
|
789
768
|
isActive: isActive
|
|
790
769
|
}, props), React__default.createElement(StyledInnerContent, {
|
|
791
|
-
isActive: isActive,
|
|
792
770
|
"aria-hidden": !isActive
|
|
793
771
|
}, props.children)) : null;
|
|
794
772
|
});
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { IAccordionProps } from '../../types';
|
|
9
|
-
import { Section } from '../accordion/components/Section';
|
|
10
|
-
import { Header } from '../accordion/components/Header';
|
|
11
|
-
import { Label } from '../accordion/components/Label';
|
|
12
|
-
import { Panel } from '../accordion/components/Panel';
|
|
13
|
-
/**
|
|
14
|
-
* @extends HTMLAttributes<HTMLDivElement>
|
|
15
|
-
*/
|
|
16
|
-
export declare const Accordion: React.ForwardRefExoticComponent<IAccordionProps & React.RefAttributes<HTMLDivElement>> & {
|
|
17
|
-
Header: typeof Header;
|
|
18
|
-
Label: typeof Label;
|
|
19
|
-
Panel: typeof Panel;
|
|
20
|
-
Section: typeof Section;
|
|
21
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IAccordionProps } from '../../types';
|
|
9
|
+
import { Section } from '../accordion/components/Section';
|
|
10
|
+
import { Header } from '../accordion/components/Header';
|
|
11
|
+
import { Label } from '../accordion/components/Label';
|
|
12
|
+
import { Panel } from '../accordion/components/Panel';
|
|
13
|
+
/**
|
|
14
|
+
* @extends HTMLAttributes<HTMLDivElement>
|
|
15
|
+
*/
|
|
16
|
+
export declare const Accordion: React.ForwardRefExoticComponent<IAccordionProps & React.RefAttributes<HTMLDivElement>> & {
|
|
17
|
+
Header: typeof Header;
|
|
18
|
+
Label: typeof Label;
|
|
19
|
+
Panel: typeof Panel;
|
|
20
|
+
Section: typeof Section;
|
|
21
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* @extends HTMLAttributes<HTMLDivElement>
|
|
10
|
-
*/
|
|
11
|
-
export declare const Header: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLDivElement>
|
|
10
|
+
*/
|
|
11
|
+
export declare const Header: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* @extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
10
|
-
*/
|
|
11
|
-
export declare const Label: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
10
|
+
*/
|
|
11
|
+
export declare const Label: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* @extends HTMLAttributes<HTMLElement>
|
|
10
|
-
*/
|
|
11
|
-
export declare const Panel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLElement>
|
|
10
|
+
*/
|
|
11
|
+
export declare const Panel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* @extends HTMLAttributes<HTMLElement>
|
|
10
|
-
*/
|
|
11
|
-
export declare const Section: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLElement>
|
|
10
|
+
*/
|
|
11
|
+
export declare const Section: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { IStepperProps } from '../../types';
|
|
9
|
-
import { Step } from './components/Step';
|
|
10
|
-
import { Label } from './components/Label';
|
|
11
|
-
import { Content } from './components/Content';
|
|
12
|
-
/**
|
|
13
|
-
* @extends OlHTMLAttributes<HTMLOListElement>
|
|
14
|
-
*/
|
|
15
|
-
export declare const Stepper: React.ForwardRefExoticComponent<IStepperProps & React.RefAttributes<HTMLOListElement>> & {
|
|
16
|
-
Content: typeof Content;
|
|
17
|
-
Label: typeof Label;
|
|
18
|
-
Step: typeof Step;
|
|
19
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IStepperProps } from '../../types';
|
|
9
|
+
import { Step } from './components/Step';
|
|
10
|
+
import { Label } from './components/Label';
|
|
11
|
+
import { Content } from './components/Content';
|
|
12
|
+
/**
|
|
13
|
+
* @extends OlHTMLAttributes<HTMLOListElement>
|
|
14
|
+
*/
|
|
15
|
+
export declare const Stepper: React.ForwardRefExoticComponent<IStepperProps & React.RefAttributes<HTMLOListElement>> & {
|
|
16
|
+
Content: typeof Content;
|
|
17
|
+
Label: typeof Label;
|
|
18
|
+
Step: typeof Step;
|
|
19
|
+
};
|