@zendeskgarden/react-accordions 8.47.0 → 8.48.1
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 +182 -183
- package/dist/index.esm.js +123 -122
- package/dist/typings/elements/accordion/Accordion.d.ts +8 -10
- package/dist/typings/elements/accordion/components/Header.d.ts +3 -0
- package/dist/typings/elements/accordion/components/Label.d.ts +3 -0
- package/dist/typings/elements/accordion/components/Panel.d.ts +3 -0
- package/dist/typings/elements/accordion/components/Section.d.ts +3 -0
- package/dist/typings/elements/stepper/Stepper.d.ts +7 -9
- package/dist/typings/elements/stepper/components/Content.d.ts +3 -0
- package/dist/typings/elements/stepper/components/Label.d.ts +8 -6
- package/dist/typings/elements/stepper/components/Step.d.ts +3 -0
- package/dist/typings/elements/timeline/Timeline.d.ts +8 -10
- package/dist/typings/elements/timeline/components/Content.d.ts +3 -0
- package/dist/typings/elements/timeline/components/Item.d.ts +12 -5
- package/dist/typings/elements/timeline/components/OppositeContent.d.ts +3 -0
- package/dist/typings/index.d.ts +4 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -21,14 +21,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
21
21
|
|
|
22
22
|
if (Object.getOwnPropertySymbols) {
|
|
23
23
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
keys.push.apply(keys, symbols);
|
|
24
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
25
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
26
|
+
})), keys.push.apply(keys, symbols);
|
|
32
27
|
}
|
|
33
28
|
|
|
34
29
|
return keys;
|
|
@@ -36,19 +31,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
36
31
|
|
|
37
32
|
function _objectSpread2(target) {
|
|
38
33
|
for (var i = 1; i < arguments.length; i++) {
|
|
39
|
-
var source = arguments[i]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
46
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
47
|
-
} else {
|
|
48
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
49
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
50
|
-
});
|
|
51
|
-
}
|
|
34
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
35
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
36
|
+
_defineProperty(target, key, source[key]);
|
|
37
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
38
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
39
|
+
});
|
|
52
40
|
}
|
|
53
41
|
|
|
54
42
|
return target;
|
|
@@ -197,7 +185,7 @@ var sizeStyles$1 = function sizeStyles(props) {
|
|
|
197
185
|
};
|
|
198
186
|
var StyledContent = styled.div.attrs({
|
|
199
187
|
'data-garden-id': COMPONENT_ID$k,
|
|
200
|
-
'data-garden-version': '8.
|
|
188
|
+
'data-garden-version': '8.48.1'
|
|
201
189
|
}).withConfig({
|
|
202
190
|
displayName: "StyledContent",
|
|
203
191
|
componentId: "sc-mazvvo-0"
|
|
@@ -213,7 +201,7 @@ StyledContent.defaultProps = {
|
|
|
213
201
|
var COMPONENT_ID$j = 'accordions.step_line';
|
|
214
202
|
var StyledLine = styled.div.attrs({
|
|
215
203
|
'data-garden-id': COMPONENT_ID$j,
|
|
216
|
-
'data-garden-version': '8.
|
|
204
|
+
'data-garden-version': '8.48.1'
|
|
217
205
|
}).withConfig({
|
|
218
206
|
displayName: "StyledLine",
|
|
219
207
|
componentId: "sc-1gkpjbr-0"
|
|
@@ -235,7 +223,7 @@ StyledLine.defaultProps = {
|
|
|
235
223
|
var COMPONENT_ID$i = 'accordions.step';
|
|
236
224
|
var StyledStep = styled.li.attrs({
|
|
237
225
|
'data-garden-id': COMPONENT_ID$i,
|
|
238
|
-
'data-garden-version': '8.
|
|
226
|
+
'data-garden-version': '8.48.1'
|
|
239
227
|
}).withConfig({
|
|
240
228
|
displayName: "StyledStep",
|
|
241
229
|
componentId: "sc-12fiwtz-0"
|
|
@@ -265,7 +253,7 @@ StyledStep.defaultProps = {
|
|
|
265
253
|
var COMPONENT_ID$h = 'accordions.step_inner_content';
|
|
266
254
|
var StyledInnerContent = styled.div.attrs({
|
|
267
255
|
'data-garden-id': COMPONENT_ID$h,
|
|
268
|
-
'data-garden-version': '8.
|
|
256
|
+
'data-garden-version': '8.48.1'
|
|
269
257
|
}).withConfig({
|
|
270
258
|
displayName: "StyledInnerContent",
|
|
271
259
|
componentId: "sc-1xs9fh7-0"
|
|
@@ -287,7 +275,7 @@ StyledInnerContent.defaultProps = {
|
|
|
287
275
|
var COMPONENT_ID$g = 'accordions.stepper';
|
|
288
276
|
var StyledStepper = styled.ol.attrs({
|
|
289
277
|
'data-garden-id': COMPONENT_ID$g,
|
|
290
|
-
'data-garden-version': '8.
|
|
278
|
+
'data-garden-version': '8.48.1'
|
|
291
279
|
}).withConfig({
|
|
292
280
|
displayName: "StyledStepper",
|
|
293
281
|
componentId: "sc-dsxw0f-0"
|
|
@@ -315,7 +303,7 @@ var colorStyles$2 = function colorStyles(props) {
|
|
|
315
303
|
};
|
|
316
304
|
var StyledIcon = styled.div.attrs({
|
|
317
305
|
'data-garden-id': COMPONENT_ID$f,
|
|
318
|
-
'data-garden-version': '8.
|
|
306
|
+
'data-garden-version': '8.48.1'
|
|
319
307
|
}).withConfig({
|
|
320
308
|
displayName: "StyledIcon",
|
|
321
309
|
componentId: "sc-v20nz9-1"
|
|
@@ -332,7 +320,7 @@ StyledIcon.defaultProps = {
|
|
|
332
320
|
var COMPONENT_ID$e = 'accordions.step_label';
|
|
333
321
|
var StyledLabel = styled.div.attrs({
|
|
334
322
|
'data-garden-id': COMPONENT_ID$e,
|
|
335
|
-
'data-garden-version': '8.
|
|
323
|
+
'data-garden-version': '8.48.1'
|
|
336
324
|
}).withConfig({
|
|
337
325
|
displayName: "StyledLabel",
|
|
338
326
|
componentId: "sc-1o82llj-0"
|
|
@@ -360,7 +348,7 @@ StyledLabel.defaultProps = {
|
|
|
360
348
|
var COMPONENT_ID$d = 'accordions.step_label_text';
|
|
361
349
|
var StyledLabelText = styled.div.attrs({
|
|
362
350
|
'data-garden-id': COMPONENT_ID$d,
|
|
363
|
-
'data-garden-version': '8.
|
|
351
|
+
'data-garden-version': '8.48.1'
|
|
364
352
|
}).withConfig({
|
|
365
353
|
displayName: "StyledLabelText",
|
|
366
354
|
componentId: "sc-111m5zo-0"
|
|
@@ -378,7 +366,7 @@ StyledLabelText.defaultProps = {
|
|
|
378
366
|
var COMPONENT_ID$c = 'accordions.accordion';
|
|
379
367
|
var StyledAccordion = styled.div.attrs({
|
|
380
368
|
'data-garden-id': COMPONENT_ID$c,
|
|
381
|
-
'data-garden-version': '8.
|
|
369
|
+
'data-garden-version': '8.48.1'
|
|
382
370
|
}).withConfig({
|
|
383
371
|
displayName: "StyledAccordion",
|
|
384
372
|
componentId: "sc-niv9ic-0"
|
|
@@ -408,7 +396,7 @@ var paddingStyles = function paddingStyles(props) {
|
|
|
408
396
|
};
|
|
409
397
|
var StyledPanel = styled.section.attrs({
|
|
410
398
|
'data-garden-id': COMPONENT_ID$b,
|
|
411
|
-
'data-garden-version': '8.
|
|
399
|
+
'data-garden-version': '8.48.1'
|
|
412
400
|
}).withConfig({
|
|
413
401
|
displayName: "StyledPanel",
|
|
414
402
|
componentId: "sc-1piryze-0"
|
|
@@ -425,7 +413,7 @@ StyledPanel.defaultProps = {
|
|
|
425
413
|
var COMPONENT_ID$a = 'accordions.section';
|
|
426
414
|
var StyledSection = styled.div.attrs({
|
|
427
415
|
'data-garden-id': COMPONENT_ID$a,
|
|
428
|
-
'data-garden-version': '8.
|
|
416
|
+
'data-garden-version': '8.48.1'
|
|
429
417
|
}).withConfig({
|
|
430
418
|
displayName: "StyledSection",
|
|
431
419
|
componentId: "sc-v2t9bd-0"
|
|
@@ -439,7 +427,7 @@ StyledSection.defaultProps = {
|
|
|
439
427
|
var COMPONENT_ID$9 = 'accordions.header';
|
|
440
428
|
var StyledHeader = styled.div.attrs({
|
|
441
429
|
'data-garden-id': COMPONENT_ID$9,
|
|
442
|
-
'data-garden-version': '8.
|
|
430
|
+
'data-garden-version': '8.48.1'
|
|
443
431
|
}).withConfig({
|
|
444
432
|
displayName: "StyledHeader",
|
|
445
433
|
componentId: "sc-2c6rbr-0"
|
|
@@ -467,7 +455,7 @@ var colorStyles$1 = function colorStyles(props) {
|
|
|
467
455
|
};
|
|
468
456
|
var StyledButton = styled.button.attrs({
|
|
469
457
|
'data-garden-id': COMPONENT_ID$8,
|
|
470
|
-
'data-garden-version': '8.
|
|
458
|
+
'data-garden-version': '8.48.1'
|
|
471
459
|
}).withConfig({
|
|
472
460
|
displayName: "StyledButton",
|
|
473
461
|
componentId: "sc-xj3hy7-0"
|
|
@@ -493,7 +481,7 @@ StyledButton.defaultProps = {
|
|
|
493
481
|
var COMPONENT_ID$7 = 'accordions.step_inner_panel';
|
|
494
482
|
var StyledInnerPanel = styled.div.attrs({
|
|
495
483
|
'data-garden-id': COMPONENT_ID$7,
|
|
496
|
-
'data-garden-version': '8.
|
|
484
|
+
'data-garden-version': '8.48.1'
|
|
497
485
|
}).withConfig({
|
|
498
486
|
displayName: "StyledInnerPanel",
|
|
499
487
|
componentId: "sc-8nbueg-0"
|
|
@@ -534,7 +522,7 @@ function (_ref) {
|
|
|
534
522
|
return cloneElement(Children.only(children), props);
|
|
535
523
|
}).attrs({
|
|
536
524
|
'data-garden-id': COMPONENT_ID$6,
|
|
537
|
-
'data-garden-version': '8.
|
|
525
|
+
'data-garden-version': '8.48.1'
|
|
538
526
|
}).withConfig({
|
|
539
527
|
displayName: "StyledRotateIcon",
|
|
540
528
|
componentId: "sc-hp435q-0"
|
|
@@ -556,7 +544,7 @@ StyledRotateIcon.defaultProps = {
|
|
|
556
544
|
var COMPONENT_ID$5 = 'timeline';
|
|
557
545
|
var StyledTimeline = styled.ol.attrs({
|
|
558
546
|
'data-garden-id': COMPONENT_ID$5,
|
|
559
|
-
'data-garden-version': '8.
|
|
547
|
+
'data-garden-version': '8.48.1'
|
|
560
548
|
}).withConfig({
|
|
561
549
|
displayName: "StyledTimeline",
|
|
562
550
|
componentId: "sc-pig5kv-0"
|
|
@@ -570,7 +558,7 @@ StyledTimeline.defaultProps = {
|
|
|
570
558
|
var COMPONENT_ID$4 = 'timeline.content.separator';
|
|
571
559
|
var StyledSeparator = styled.div.attrs({
|
|
572
560
|
'data-garden-id': COMPONENT_ID$4,
|
|
573
|
-
'data-garden-version': '8.
|
|
561
|
+
'data-garden-version': '8.48.1'
|
|
574
562
|
}).withConfig({
|
|
575
563
|
displayName: "StyledSeparator",
|
|
576
564
|
componentId: "sc-fki51e-0"
|
|
@@ -588,7 +576,7 @@ StyledSeparator.defaultProps = {
|
|
|
588
576
|
var COMPONENT_ID$3 = 'timeline.content';
|
|
589
577
|
var StyledTimelineContent = styled.div.attrs({
|
|
590
578
|
'data-garden-id': COMPONENT_ID$3,
|
|
591
|
-
'data-garden-version': '8.
|
|
579
|
+
'data-garden-version': '8.48.1'
|
|
592
580
|
}).withConfig({
|
|
593
581
|
displayName: "StyledContent__StyledTimelineContent",
|
|
594
582
|
componentId: "sc-19phgu1-0"
|
|
@@ -604,7 +592,7 @@ StyledTimelineContent.defaultProps = {
|
|
|
604
592
|
var COMPONENT_ID$2 = 'timeline.opposite.content';
|
|
605
593
|
var StyledOppositeContent = styled.div.attrs({
|
|
606
594
|
'data-garden-id': COMPONENT_ID$2,
|
|
607
|
-
'data-garden-version': '8.
|
|
595
|
+
'data-garden-version': '8.48.1'
|
|
608
596
|
}).withConfig({
|
|
609
597
|
displayName: "StyledOppositeContent",
|
|
610
598
|
componentId: "sc-jurh2k-0"
|
|
@@ -622,7 +610,7 @@ StyledOppositeContent.defaultProps = {
|
|
|
622
610
|
var COMPONENT_ID$1 = 'timeline.item';
|
|
623
611
|
var StyledTimelineItem = styled.li.attrs({
|
|
624
612
|
'data-garden-id': COMPONENT_ID$1,
|
|
625
|
-
'data-garden-version': '8.
|
|
613
|
+
'data-garden-version': '8.48.1'
|
|
626
614
|
}).withConfig({
|
|
627
615
|
displayName: "StyledItem__StyledTimelineItem",
|
|
628
616
|
componentId: "sc-5mcnzm-0"
|
|
@@ -646,7 +634,7 @@ var StyledItemIcon = styled(function (_ref) {
|
|
|
646
634
|
return cloneElement(Children.only(children), props);
|
|
647
635
|
}).attrs({
|
|
648
636
|
'data-garden-id': COMPONENT_ID,
|
|
649
|
-
'data-garden-version': '8.
|
|
637
|
+
'data-garden-version': '8.48.1'
|
|
650
638
|
}).withConfig({
|
|
651
639
|
displayName: "StyledItemIcon",
|
|
652
640
|
componentId: "sc-vz2l6e-0"
|
|
@@ -730,7 +718,7 @@ var useTimelineItemContext = function useTimelineItemContext() {
|
|
|
730
718
|
return context;
|
|
731
719
|
};
|
|
732
720
|
|
|
733
|
-
var
|
|
721
|
+
var StepComponent = forwardRef(function (props, ref) {
|
|
734
722
|
var _useStepperContext = useStepperContext(),
|
|
735
723
|
currentIndexRef = _useStepperContext.currentIndexRef,
|
|
736
724
|
isHorizontal = _useStepperContext.isHorizontal;
|
|
@@ -758,31 +746,32 @@ var Step = forwardRef(function (props, ref) {
|
|
|
758
746
|
isHorizontal: isHorizontal
|
|
759
747
|
}, props), isHorizontal && React__default.createElement(StyledLine, null), props.children));
|
|
760
748
|
});
|
|
761
|
-
|
|
749
|
+
StepComponent.displayName = 'Stepper.Step';
|
|
750
|
+
var Step = StepComponent;
|
|
762
751
|
|
|
763
|
-
|
|
752
|
+
var _path$1;
|
|
764
753
|
|
|
765
|
-
|
|
766
|
-
fill: "none",
|
|
767
|
-
stroke: "currentColor",
|
|
768
|
-
strokeLinecap: "round",
|
|
769
|
-
strokeLinejoin: "round",
|
|
770
|
-
strokeWidth: 1.25,
|
|
771
|
-
d: "M3 9l3 3 7-7"
|
|
772
|
-
});
|
|
754
|
+
function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
773
755
|
|
|
774
|
-
function SvgCheckSmStroke(props) {
|
|
756
|
+
var SvgCheckSmStroke = function SvgCheckSmStroke(props) {
|
|
775
757
|
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
776
758
|
xmlns: "http://www.w3.org/2000/svg",
|
|
777
759
|
width: 16,
|
|
778
760
|
height: 16,
|
|
779
|
-
viewBox: "0 0 16 16",
|
|
780
761
|
focusable: "false",
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
}
|
|
762
|
+
viewBox: "0 0 16 16",
|
|
763
|
+
"aria-hidden": "true"
|
|
764
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
765
|
+
fill: "none",
|
|
766
|
+
stroke: "currentColor",
|
|
767
|
+
strokeLinecap: "round",
|
|
768
|
+
strokeLinejoin: "round",
|
|
769
|
+
strokeWidth: 1.25,
|
|
770
|
+
d: "M3 9l3 3 7-7"
|
|
771
|
+
})));
|
|
772
|
+
};
|
|
784
773
|
|
|
785
|
-
var
|
|
774
|
+
var LabelComponent$1 = forwardRef(function (props, ref) {
|
|
786
775
|
var _useStepContext = useStepContext(),
|
|
787
776
|
currentStepIndex = _useStepContext.currentStepIndex;
|
|
788
777
|
var _useStepperContext = useStepperContext(),
|
|
@@ -805,13 +794,14 @@ var Label$1 = forwardRef(function (props, ref) {
|
|
|
805
794
|
isHorizontal: isHorizontal
|
|
806
795
|
}, props.children));
|
|
807
796
|
});
|
|
808
|
-
|
|
809
|
-
|
|
797
|
+
LabelComponent$1.displayName = 'Stepper.Label';
|
|
798
|
+
LabelComponent$1.propTypes = {
|
|
810
799
|
icon: PropTypes.node,
|
|
811
800
|
isHidden: PropTypes.bool
|
|
812
801
|
};
|
|
802
|
+
var Label$1 = LabelComponent$1;
|
|
813
803
|
|
|
814
|
-
var
|
|
804
|
+
var ContentComponent$1 = forwardRef(function (props, ref) {
|
|
815
805
|
var contentRef = useRef();
|
|
816
806
|
var _useStepperContext = useStepperContext(),
|
|
817
807
|
activeIndex = _useStepperContext.activeIndex,
|
|
@@ -842,10 +832,11 @@ var Content$1 = forwardRef(function (props, ref) {
|
|
|
842
832
|
isActive: isActive
|
|
843
833
|
}, props.children)) : null;
|
|
844
834
|
});
|
|
845
|
-
|
|
835
|
+
ContentComponent$1.displayName = 'Stepper.Content';
|
|
836
|
+
var Content$1 = ContentComponent$1;
|
|
846
837
|
|
|
847
838
|
var _excluded$4 = ["isHorizontal", "activeIndex"];
|
|
848
|
-
var
|
|
839
|
+
var StepperComponent = forwardRef(function (_ref, ref) {
|
|
849
840
|
var isHorizontal = _ref.isHorizontal,
|
|
850
841
|
activeIndex = _ref.activeIndex,
|
|
851
842
|
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
@@ -867,16 +858,17 @@ var Stepper = forwardRef(function (_ref, ref) {
|
|
|
867
858
|
isHorizontal: isHorizontal
|
|
868
859
|
}, props)));
|
|
869
860
|
});
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
Stepper.Content = Content$1;
|
|
873
|
-
Stepper.displayName = 'Stepper';
|
|
874
|
-
Stepper.defaultProps = {
|
|
861
|
+
StepperComponent.displayName = 'Stepper';
|
|
862
|
+
StepperComponent.defaultProps = {
|
|
875
863
|
activeIndex: 0,
|
|
876
864
|
isHorizontal: false
|
|
877
865
|
};
|
|
866
|
+
var Stepper = StepperComponent;
|
|
867
|
+
Stepper.Content = Content$1;
|
|
868
|
+
Stepper.Label = Label$1;
|
|
869
|
+
Stepper.Step = Step;
|
|
878
870
|
|
|
879
|
-
var
|
|
871
|
+
var SectionComponent = forwardRef(function (props, ref) {
|
|
880
872
|
var _useAccordionContext = useAccordionContext(),
|
|
881
873
|
currentIndexRef = _useAccordionContext.currentIndexRef;
|
|
882
874
|
var sectionIndexRef = useRef(currentIndexRef.current++);
|
|
@@ -887,29 +879,30 @@ var Section = forwardRef(function (props, ref) {
|
|
|
887
879
|
ref: ref
|
|
888
880
|
}, props)));
|
|
889
881
|
});
|
|
890
|
-
|
|
882
|
+
SectionComponent.displayName = 'Accordion.Section';
|
|
883
|
+
var Section = SectionComponent;
|
|
891
884
|
|
|
892
|
-
|
|
885
|
+
var _path;
|
|
893
886
|
|
|
894
|
-
|
|
895
|
-
fill: "currentColor",
|
|
896
|
-
d: "M12.688 5.61a.5.5 0 01.69.718l-.066.062-5 4a.5.5 0 01-.542.054l-.082-.054-5-4a.5.5 0 01.55-.83l.074.05L8 9.359l4.688-3.75z"
|
|
897
|
-
});
|
|
887
|
+
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
898
888
|
|
|
899
|
-
function SvgChevronDownStroke(props) {
|
|
889
|
+
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
900
890
|
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
901
891
|
xmlns: "http://www.w3.org/2000/svg",
|
|
902
892
|
width: 16,
|
|
903
893
|
height: 16,
|
|
904
|
-
viewBox: "0 0 16 16",
|
|
905
894
|
focusable: "false",
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
}
|
|
895
|
+
viewBox: "0 0 16 16",
|
|
896
|
+
"aria-hidden": "true"
|
|
897
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
898
|
+
fill: "currentColor",
|
|
899
|
+
d: "M12.688 5.61a.5.5 0 01.69.718l-.066.062-5 4a.5.5 0 01-.542.054l-.082-.054-5-4a.5.5 0 01.55-.83l.074.05L8 9.359l4.688-3.75z"
|
|
900
|
+
})));
|
|
901
|
+
};
|
|
909
902
|
|
|
910
903
|
var _excluded$3 = ["onClick", "onFocus", "onBlur", "onMouseOver", "onMouseOut", "children"],
|
|
911
904
|
_excluded2 = ["onClick", "onKeyDown"];
|
|
912
|
-
var
|
|
905
|
+
var HeaderComponent = forwardRef(function (props, ref) {
|
|
913
906
|
var _useAccordionContext = useAccordionContext(),
|
|
914
907
|
ariaLevel = _useAccordionContext.level,
|
|
915
908
|
isCompact = _useAccordionContext.isCompact,
|
|
@@ -990,9 +983,10 @@ var Header = forwardRef(function (props, ref) {
|
|
|
990
983
|
})
|
|
991
984
|
}, React__default.createElement(SvgChevronDownStroke, null))));
|
|
992
985
|
});
|
|
993
|
-
|
|
986
|
+
HeaderComponent.displayName = 'Accordion.Header';
|
|
987
|
+
var Header = HeaderComponent;
|
|
994
988
|
|
|
995
|
-
var
|
|
989
|
+
var LabelComponent = forwardRef(function (props, ref) {
|
|
996
990
|
var sectionIndex = useSectionContext();
|
|
997
991
|
var _useAccordionContext = useAccordionContext(),
|
|
998
992
|
isCompact = _useAccordionContext.isCompact,
|
|
@@ -1010,9 +1004,10 @@ var Label = forwardRef(function (props, ref) {
|
|
|
1010
1004
|
isCollapsible: isCollapsible
|
|
1011
1005
|
}, otherTriggerProps, props));
|
|
1012
1006
|
});
|
|
1013
|
-
|
|
1007
|
+
LabelComponent.displayName = 'Accordion.Label';
|
|
1008
|
+
var Label = LabelComponent;
|
|
1014
1009
|
|
|
1015
|
-
var
|
|
1010
|
+
var PanelComponent = forwardRef(function (props, ref) {
|
|
1016
1011
|
var _useAccordionContext = useAccordionContext(),
|
|
1017
1012
|
isCompact = _useAccordionContext.isCompact,
|
|
1018
1013
|
isBare = _useAccordionContext.isBare,
|
|
@@ -1051,10 +1046,11 @@ var Panel = forwardRef(function (props, ref) {
|
|
|
1051
1046
|
isAnimated: isAnimated
|
|
1052
1047
|
}, props.children));
|
|
1053
1048
|
});
|
|
1054
|
-
|
|
1049
|
+
PanelComponent.displayName = 'Accordion.Panel';
|
|
1050
|
+
var Panel = PanelComponent;
|
|
1055
1051
|
|
|
1056
1052
|
var _excluded$2 = ["level", "isBare", "onChange", "isCompact", "isAnimated", "isExpandable", "isCollapsible", "defaultExpandedSections", "expandedSections"];
|
|
1057
|
-
var
|
|
1053
|
+
var AccordionComponent = forwardRef(function (_ref, ref) {
|
|
1058
1054
|
var level = _ref.level,
|
|
1059
1055
|
isBare = _ref.isBare,
|
|
1060
1056
|
onChange = _ref.onChange,
|
|
@@ -1100,12 +1096,8 @@ var Accordion = forwardRef(function (_ref, ref) {
|
|
|
1100
1096
|
ref: ref
|
|
1101
1097
|
}, props)));
|
|
1102
1098
|
});
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
Accordion.Label = Label;
|
|
1106
|
-
Accordion.Panel = Panel;
|
|
1107
|
-
Accordion.displayName = 'Accordion';
|
|
1108
|
-
Accordion.defaultProps = {
|
|
1099
|
+
AccordionComponent.displayName = 'Accordion';
|
|
1100
|
+
AccordionComponent.defaultProps = {
|
|
1109
1101
|
isBare: false,
|
|
1110
1102
|
isCompact: false,
|
|
1111
1103
|
isAnimated: true,
|
|
@@ -1116,9 +1108,22 @@ Accordion.defaultProps = {
|
|
|
1116
1108
|
return undefined;
|
|
1117
1109
|
}
|
|
1118
1110
|
};
|
|
1111
|
+
var Accordion = AccordionComponent;
|
|
1112
|
+
Accordion.Header = Header;
|
|
1113
|
+
Accordion.Label = Label;
|
|
1114
|
+
Accordion.Panel = Panel;
|
|
1115
|
+
Accordion.Section = Section;
|
|
1116
|
+
|
|
1117
|
+
var OppositeContentComponent = forwardRef(function (props, ref) {
|
|
1118
|
+
return React__default.createElement(StyledOppositeContent, _extends$3({
|
|
1119
|
+
ref: ref
|
|
1120
|
+
}, props));
|
|
1121
|
+
});
|
|
1122
|
+
OppositeContentComponent.displayName = 'Timeline.OppositeContent';
|
|
1123
|
+
var OppositeContent = OppositeContentComponent;
|
|
1119
1124
|
|
|
1120
1125
|
var _excluded$1 = ["icon", "surfaceColor"];
|
|
1121
|
-
var
|
|
1126
|
+
var ItemComponent = forwardRef(function (_ref, ref) {
|
|
1122
1127
|
var icon = _ref.icon,
|
|
1123
1128
|
surfaceColor = _ref.surfaceColor,
|
|
1124
1129
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
@@ -1133,7 +1138,7 @@ var Item = forwardRef(function (_ref, ref) {
|
|
|
1133
1138
|
var hasOppositeContent = false;
|
|
1134
1139
|
Children.forEach(props.children, function (child) {
|
|
1135
1140
|
if (child) {
|
|
1136
|
-
if (child.type ===
|
|
1141
|
+
if (child.type === OppositeContent) {
|
|
1137
1142
|
hasOppositeContent = true;
|
|
1138
1143
|
}
|
|
1139
1144
|
}
|
|
@@ -1146,30 +1151,31 @@ var Item = forwardRef(function (_ref, ref) {
|
|
|
1146
1151
|
hasOppositeContent: hasOppositeContent
|
|
1147
1152
|
}, props)));
|
|
1148
1153
|
});
|
|
1149
|
-
|
|
1154
|
+
ItemComponent.displayName = 'Timeline.Item';
|
|
1155
|
+
var Item = ItemComponent;
|
|
1150
1156
|
|
|
1151
|
-
|
|
1157
|
+
var _circle;
|
|
1152
1158
|
|
|
1153
|
-
var
|
|
1154
|
-
cx: 6,
|
|
1155
|
-
cy: 6,
|
|
1156
|
-
r: 4.5,
|
|
1157
|
-
fill: "none",
|
|
1158
|
-
stroke: "currentColor"
|
|
1159
|
-
});
|
|
1159
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1160
1160
|
|
|
1161
|
-
function SvgCircleFullStroke(props) {
|
|
1161
|
+
var SvgCircleFullStroke = function SvgCircleFullStroke(props) {
|
|
1162
1162
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
1163
1163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1164
1164
|
width: 12,
|
|
1165
1165
|
height: 12,
|
|
1166
|
-
viewBox: "0 0 12 12",
|
|
1167
1166
|
focusable: "false",
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
}
|
|
1167
|
+
viewBox: "0 0 12 12",
|
|
1168
|
+
"aria-hidden": "true"
|
|
1169
|
+
}, props), _circle || (_circle = /*#__PURE__*/React.createElement("circle", {
|
|
1170
|
+
cx: 6,
|
|
1171
|
+
cy: 6,
|
|
1172
|
+
r: 4.5,
|
|
1173
|
+
fill: "none",
|
|
1174
|
+
stroke: "currentColor"
|
|
1175
|
+
})));
|
|
1176
|
+
};
|
|
1171
1177
|
|
|
1172
|
-
var
|
|
1178
|
+
var ContentComponent = forwardRef(function (props, ref) {
|
|
1173
1179
|
var _useTimelineItemConte = useTimelineItemContext(),
|
|
1174
1180
|
icon = _useTimelineItemConte.icon,
|
|
1175
1181
|
surfaceColor = _useTimelineItemConte.surfaceColor;
|
|
@@ -1179,17 +1185,11 @@ var Content = forwardRef(function (props, ref) {
|
|
|
1179
1185
|
ref: ref
|
|
1180
1186
|
}, props)));
|
|
1181
1187
|
});
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
var OppositeContent = forwardRef(function (props, ref) {
|
|
1185
|
-
return React__default.createElement(StyledOppositeContent, _extends$3({
|
|
1186
|
-
ref: ref
|
|
1187
|
-
}, props));
|
|
1188
|
-
});
|
|
1189
|
-
OppositeContent.displayName = 'OppositeContent';
|
|
1188
|
+
ContentComponent.displayName = 'Timeline.Content';
|
|
1189
|
+
var Content = ContentComponent;
|
|
1190
1190
|
|
|
1191
1191
|
var _excluded = ["isAlternate"];
|
|
1192
|
-
var
|
|
1192
|
+
var TimelineComponent = forwardRef(function (_ref, ref) {
|
|
1193
1193
|
var isAlternate = _ref.isAlternate,
|
|
1194
1194
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1195
1195
|
var value = useMemo(function () {
|
|
@@ -1203,9 +1203,10 @@ var Timeline = forwardRef(function (_ref, ref) {
|
|
|
1203
1203
|
ref: ref
|
|
1204
1204
|
}, props)));
|
|
1205
1205
|
});
|
|
1206
|
-
|
|
1206
|
+
TimelineComponent.displayName = 'Timeline';
|
|
1207
|
+
var Timeline = TimelineComponent;
|
|
1207
1208
|
Timeline.Content = Content;
|
|
1209
|
+
Timeline.Item = Item;
|
|
1208
1210
|
Timeline.OppositeContent = OppositeContent;
|
|
1209
|
-
Timeline.displayName = 'Timeline';
|
|
1210
1211
|
|
|
1211
1212
|
export { Accordion, Stepper, Timeline };
|
|
@@ -4,18 +4,12 @@
|
|
|
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 {
|
|
7
|
+
import React, { HTMLAttributes } from 'react';
|
|
8
8
|
import { Section } from '../accordion/components/Section';
|
|
9
9
|
import { Header } from '../accordion/components/Header';
|
|
10
10
|
import { Label } from '../accordion/components/Label';
|
|
11
11
|
import { Panel } from '../accordion/components/Panel';
|
|
12
|
-
interface
|
|
13
|
-
Section: typeof Section;
|
|
14
|
-
Header: typeof Header;
|
|
15
|
-
Label: typeof Label;
|
|
16
|
-
Panel: typeof Panel;
|
|
17
|
-
}
|
|
18
|
-
interface IAccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
12
|
+
export interface IAccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
19
13
|
/** Sets `aria-level` heading rank in the document structure */
|
|
20
14
|
level: number;
|
|
21
15
|
/** Sets the expanded sections in a controlled accordion */
|
|
@@ -42,5 +36,9 @@ interface IAccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange
|
|
|
42
36
|
/**
|
|
43
37
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
44
38
|
*/
|
|
45
|
-
export declare const Accordion:
|
|
46
|
-
|
|
39
|
+
export declare const Accordion: React.ForwardRefExoticComponent<IAccordionProps & React.RefAttributes<HTMLDivElement>> & {
|
|
40
|
+
Header: typeof Header;
|
|
41
|
+
Label: typeof Label;
|
|
42
|
+
Panel: typeof Panel;
|
|
43
|
+
Section: typeof Section;
|
|
44
|
+
};
|
|
@@ -5,4 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLDivElement>
|
|
10
|
+
*/
|
|
8
11
|
export declare const Header: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,4 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
10
|
+
*/
|
|
8
11
|
export declare const Label: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -5,4 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLElement>
|
|
10
|
+
*/
|
|
8
11
|
export declare const Panel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -5,4 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLElement>
|
|
10
|
+
*/
|
|
8
11
|
export declare const Section: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,16 +4,11 @@
|
|
|
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 { OlHTMLAttributes
|
|
7
|
+
import React, { OlHTMLAttributes } from 'react';
|
|
8
8
|
import { Step } from './components/Step';
|
|
9
9
|
import { Label } from './components/Label';
|
|
10
10
|
import { Content } from './components/Content';
|
|
11
|
-
interface
|
|
12
|
-
Step: typeof Step;
|
|
13
|
-
Label: typeof Label;
|
|
14
|
-
Content: typeof Content;
|
|
15
|
-
}
|
|
16
|
-
interface IStepperProps extends OlHTMLAttributes<HTMLOListElement> {
|
|
11
|
+
export interface IStepperProps extends OlHTMLAttributes<HTMLOListElement> {
|
|
17
12
|
/** Defines the currently active step, starting at 0 */
|
|
18
13
|
activeIndex?: number;
|
|
19
14
|
/** Applies horizontal layout styling */
|
|
@@ -22,5 +17,8 @@ interface IStepperProps extends OlHTMLAttributes<HTMLOListElement> {
|
|
|
22
17
|
/**
|
|
23
18
|
* @extends OlHTMLAttributes<HTMLOListElement>
|
|
24
19
|
*/
|
|
25
|
-
export declare const Stepper:
|
|
26
|
-
|
|
20
|
+
export declare const Stepper: React.ForwardRefExoticComponent<IStepperProps & React.RefAttributes<HTMLOListElement>> & {
|
|
21
|
+
Content: typeof Content;
|
|
22
|
+
Label: typeof Label;
|
|
23
|
+
Step: typeof Step;
|
|
24
|
+
};
|
|
@@ -5,4 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @extends HTMLAttributes<HTMLDivElement>
|
|
10
|
+
*/
|
|
8
11
|
export declare const Content: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|