@zendeskgarden/react-buttons 9.11.0 → 9.11.2
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/Button.js +1 -4
- package/dist/esm/elements/ChevronButton.js +14 -8
- package/dist/esm/elements/IconButton.js +3 -8
- package/dist/esm/elements/ToggleButton.js +2 -3
- package/dist/esm/elements/ToggleIconButton.js +6 -5
- package/dist/esm/styled/StyledAnchor.js +1 -1
- package/dist/esm/styled/StyledButton.js +1 -1
- package/dist/esm/styled/StyledExternalIcon.js +1 -1
- package/dist/esm/styled/StyledIcon.js +1 -1
- package/dist/esm/styled/StyledIconButton.js +1 -1
- package/dist/esm/styled/StyledSplitButton.js +1 -1
- package/dist/index.cjs.js +32 -34
- package/package.json +3 -3
|
@@ -27,7 +27,7 @@ const ButtonComponent = forwardRef((_ref, ref) => {
|
|
|
27
27
|
isPill,
|
|
28
28
|
isPrimary,
|
|
29
29
|
isStretched,
|
|
30
|
-
size,
|
|
30
|
+
size = 'medium',
|
|
31
31
|
...other
|
|
32
32
|
} = _ref;
|
|
33
33
|
const splitButtonFocusInset = useSplitButtonContext();
|
|
@@ -57,9 +57,6 @@ ButtonComponent.propTypes = {
|
|
|
57
57
|
isStretched: PropTypes.bool,
|
|
58
58
|
size: PropTypes.oneOf(SIZE)
|
|
59
59
|
};
|
|
60
|
-
ButtonComponent.defaultProps = {
|
|
61
|
-
size: 'medium'
|
|
62
|
-
};
|
|
63
60
|
const Button = ButtonComponent;
|
|
64
61
|
Button.EndIcon = EndIcon;
|
|
65
62
|
Button.StartIcon = StartIcon;
|
|
@@ -8,15 +8,21 @@ import React__default, { forwardRef } from 'react';
|
|
|
8
8
|
import { IconButton } from './IconButton.js';
|
|
9
9
|
import SvgChevronDownStroke from '../node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js';
|
|
10
10
|
|
|
11
|
-
const ChevronButton = forwardRef((
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const ChevronButton = forwardRef((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
isBasic = false,
|
|
14
|
+
isPill = false,
|
|
15
|
+
size = 'medium',
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
return React__default.createElement(IconButton, Object.assign({
|
|
19
|
+
ref: ref,
|
|
20
|
+
isBasic: isBasic,
|
|
21
|
+
isPill: isPill,
|
|
22
|
+
size: size
|
|
23
|
+
}, props), React__default.createElement(SvgChevronDownStroke, null));
|
|
24
|
+
});
|
|
14
25
|
ChevronButton.displayName = 'ChevronButton';
|
|
15
26
|
ChevronButton.propTypes = IconButton.propTypes;
|
|
16
|
-
ChevronButton.defaultProps = {
|
|
17
|
-
isBasic: false,
|
|
18
|
-
isPill: false,
|
|
19
|
-
size: 'medium'
|
|
20
|
-
};
|
|
21
27
|
|
|
22
28
|
export { ChevronButton };
|
|
@@ -19,13 +19,13 @@ const IconButton = forwardRef((_ref, ref) => {
|
|
|
19
19
|
let {
|
|
20
20
|
children,
|
|
21
21
|
focusInset,
|
|
22
|
-
isBasic,
|
|
22
|
+
isBasic = true,
|
|
23
23
|
isDanger,
|
|
24
24
|
isNeutral,
|
|
25
|
-
isPill,
|
|
25
|
+
isPill = true,
|
|
26
26
|
isPrimary,
|
|
27
27
|
isRotated,
|
|
28
|
-
size,
|
|
28
|
+
size = 'medium',
|
|
29
29
|
...other
|
|
30
30
|
} = _ref;
|
|
31
31
|
const splitButtonFocusInset = useSplitButtonContext();
|
|
@@ -53,10 +53,5 @@ IconButton.propTypes = {
|
|
|
53
53
|
isRotated: PropTypes.bool,
|
|
54
54
|
size: PropTypes.oneOf(SIZE)
|
|
55
55
|
};
|
|
56
|
-
IconButton.defaultProps = {
|
|
57
|
-
isPill: true,
|
|
58
|
-
isBasic: true,
|
|
59
|
-
size: 'medium'
|
|
60
|
-
};
|
|
61
56
|
|
|
62
57
|
export { IconButton };
|
|
@@ -11,10 +11,12 @@ import { Button } from './Button.js';
|
|
|
11
11
|
const ToggleButton = forwardRef((_ref, ref) => {
|
|
12
12
|
let {
|
|
13
13
|
isPressed,
|
|
14
|
+
size = 'medium',
|
|
14
15
|
...otherProps
|
|
15
16
|
} = _ref;
|
|
16
17
|
return React__default.createElement(Button, Object.assign({
|
|
17
18
|
"aria-pressed": isPressed,
|
|
19
|
+
size: size,
|
|
18
20
|
ref: ref
|
|
19
21
|
}, otherProps));
|
|
20
22
|
});
|
|
@@ -23,8 +25,5 @@ ToggleButton.propTypes = {
|
|
|
23
25
|
...Button.propTypes,
|
|
24
26
|
isPressed: PropTypes.oneOf([true, false, 'mixed'])
|
|
25
27
|
};
|
|
26
|
-
ToggleButton.defaultProps = {
|
|
27
|
-
size: 'medium'
|
|
28
|
-
};
|
|
29
28
|
|
|
30
29
|
export { ToggleButton };
|
|
@@ -11,10 +11,16 @@ import { IconButton } from './IconButton.js';
|
|
|
11
11
|
const ToggleIconButton = forwardRef((_ref, ref) => {
|
|
12
12
|
let {
|
|
13
13
|
isPressed,
|
|
14
|
+
isPill = true,
|
|
15
|
+
isBasic = true,
|
|
16
|
+
size = 'medium',
|
|
14
17
|
...otherProps
|
|
15
18
|
} = _ref;
|
|
16
19
|
return React__default.createElement(IconButton, Object.assign({
|
|
17
20
|
"aria-pressed": isPressed,
|
|
21
|
+
isPill: isPill,
|
|
22
|
+
isBasic: isBasic,
|
|
23
|
+
size: size,
|
|
18
24
|
ref: ref
|
|
19
25
|
}, otherProps));
|
|
20
26
|
});
|
|
@@ -23,10 +29,5 @@ ToggleIconButton.propTypes = {
|
|
|
23
29
|
...IconButton.propTypes,
|
|
24
30
|
isPressed: PropTypes.oneOf([true, false, 'mixed'])
|
|
25
31
|
};
|
|
26
|
-
ToggleIconButton.defaultProps = {
|
|
27
|
-
isPill: true,
|
|
28
|
-
isBasic: true,
|
|
29
|
-
size: 'medium'
|
|
30
|
-
};
|
|
31
32
|
|
|
32
33
|
export { ToggleIconButton };
|
|
@@ -11,7 +11,7 @@ import { StyledButton } from './StyledButton.js';
|
|
|
11
11
|
const COMPONENT_ID = 'buttons.anchor';
|
|
12
12
|
const StyledAnchor = styled(StyledButton).attrs(props => ({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.11.
|
|
14
|
+
'data-garden-version': '9.11.2',
|
|
15
15
|
as: 'a',
|
|
16
16
|
dir: props.theme.rtl ? 'rtl' : undefined,
|
|
17
17
|
$isLink: true,
|
|
@@ -308,7 +308,7 @@ const sizeStyles = props => {
|
|
|
308
308
|
};
|
|
309
309
|
const StyledButton = styled.button.attrs(props => ({
|
|
310
310
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID,
|
|
311
|
-
'data-garden-version': '9.11.
|
|
311
|
+
'data-garden-version': '9.11.2',
|
|
312
312
|
type: props.type || 'button'
|
|
313
313
|
})).withConfig({
|
|
314
314
|
displayName: "StyledButton",
|
|
@@ -11,7 +11,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
11
11
|
const COMPONENT_ID = 'buttons.external_icon';
|
|
12
12
|
const StyledExternalIcon = styled(SvgNewWindowStroke).attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.11.
|
|
14
|
+
'data-garden-version': '9.11.2'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledExternalIcon",
|
|
17
17
|
componentId: "sc-16oz07e-0"
|
|
@@ -19,7 +19,7 @@ const sizeStyles = props => {
|
|
|
19
19
|
};
|
|
20
20
|
const StyledIcon = styled(StyledBaseIcon).attrs({
|
|
21
21
|
'data-garden-id': COMPONENT_ID,
|
|
22
|
-
'data-garden-version': '9.11.
|
|
22
|
+
'data-garden-version': '9.11.2'
|
|
23
23
|
}).withConfig({
|
|
24
24
|
displayName: "StyledIcon",
|
|
25
25
|
componentId: "sc-19meqgg-0"
|
|
@@ -51,7 +51,7 @@ const StyledIconButton = styled(StyledButton).attrs(props => {
|
|
|
51
51
|
const externalId = props['data-garden-id'];
|
|
52
52
|
return {
|
|
53
53
|
'data-garden-id': externalId && externalId !== COMPONENT_ID$1 ? externalId : COMPONENT_ID,
|
|
54
|
-
'data-garden-version': '9.11.
|
|
54
|
+
'data-garden-version': '9.11.2'
|
|
55
55
|
};
|
|
56
56
|
}).withConfig({
|
|
57
57
|
displayName: "StyledIconButton",
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'buttons.button_group_view';
|
|
11
11
|
const StyledSplitButton = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.11.
|
|
13
|
+
'data-garden-version': '9.11.2'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledSplitButton",
|
|
16
16
|
componentId: "sc-1u4v04v-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -41,7 +41,7 @@ const SIZE = ['small', 'medium', 'large'];
|
|
|
41
41
|
const COMPONENT_ID$5 = 'buttons.button_group_view';
|
|
42
42
|
const StyledSplitButton = styled__default.default.div.attrs({
|
|
43
43
|
'data-garden-id': COMPONENT_ID$5,
|
|
44
|
-
'data-garden-version': '9.11.
|
|
44
|
+
'data-garden-version': '9.11.2'
|
|
45
45
|
}).withConfig({
|
|
46
46
|
displayName: "StyledSplitButton",
|
|
47
47
|
componentId: "sc-1u4v04v-0"
|
|
@@ -59,7 +59,7 @@ const sizeStyles$1 = props => {
|
|
|
59
59
|
};
|
|
60
60
|
const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
61
61
|
'data-garden-id': COMPONENT_ID$4,
|
|
62
|
-
'data-garden-version': '9.11.
|
|
62
|
+
'data-garden-version': '9.11.2'
|
|
63
63
|
}).withConfig({
|
|
64
64
|
displayName: "StyledIcon",
|
|
65
65
|
componentId: "sc-19meqgg-0"
|
|
@@ -363,7 +363,7 @@ const sizeStyles = props => {
|
|
|
363
363
|
};
|
|
364
364
|
const StyledButton = styled__default.default.button.attrs(props => ({
|
|
365
365
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$3,
|
|
366
|
-
'data-garden-version': '9.11.
|
|
366
|
+
'data-garden-version': '9.11.2',
|
|
367
367
|
type: props.type || 'button'
|
|
368
368
|
})).withConfig({
|
|
369
369
|
displayName: "StyledButton",
|
|
@@ -373,7 +373,7 @@ const StyledButton = styled__default.default.button.attrs(props => ({
|
|
|
373
373
|
const COMPONENT_ID$2 = 'buttons.anchor';
|
|
374
374
|
const StyledAnchor = styled__default.default(StyledButton).attrs(props => ({
|
|
375
375
|
'data-garden-id': COMPONENT_ID$2,
|
|
376
|
-
'data-garden-version': '9.11.
|
|
376
|
+
'data-garden-version': '9.11.2',
|
|
377
377
|
as: 'a',
|
|
378
378
|
dir: props.theme.rtl ? 'rtl' : undefined,
|
|
379
379
|
$isLink: true,
|
|
@@ -404,7 +404,7 @@ var SvgNewWindowStroke = function SvgNewWindowStroke(props) {
|
|
|
404
404
|
const COMPONENT_ID$1 = 'buttons.external_icon';
|
|
405
405
|
const StyledExternalIcon = styled__default.default(SvgNewWindowStroke).attrs({
|
|
406
406
|
'data-garden-id': COMPONENT_ID$1,
|
|
407
|
-
'data-garden-version': '9.11.
|
|
407
|
+
'data-garden-version': '9.11.2'
|
|
408
408
|
}).withConfig({
|
|
409
409
|
displayName: "StyledExternalIcon",
|
|
410
410
|
componentId: "sc-16oz07e-0"
|
|
@@ -452,7 +452,7 @@ const StyledIconButton = styled__default.default(StyledButton).attrs(props => {
|
|
|
452
452
|
const externalId = props['data-garden-id'];
|
|
453
453
|
return {
|
|
454
454
|
'data-garden-id': externalId && externalId !== COMPONENT_ID$3 ? externalId : COMPONENT_ID,
|
|
455
|
-
'data-garden-version': '9.11.
|
|
455
|
+
'data-garden-version': '9.11.2'
|
|
456
456
|
};
|
|
457
457
|
}).withConfig({
|
|
458
458
|
displayName: "StyledIconButton",
|
|
@@ -500,7 +500,7 @@ const ButtonComponent = React.forwardRef((_ref, ref) => {
|
|
|
500
500
|
isPill,
|
|
501
501
|
isPrimary,
|
|
502
502
|
isStretched,
|
|
503
|
-
size,
|
|
503
|
+
size = 'medium',
|
|
504
504
|
...other
|
|
505
505
|
} = _ref;
|
|
506
506
|
const splitButtonFocusInset = useSplitButtonContext();
|
|
@@ -530,9 +530,6 @@ ButtonComponent.propTypes = {
|
|
|
530
530
|
isStretched: PropTypes__default.default.bool,
|
|
531
531
|
size: PropTypes__default.default.oneOf(SIZE)
|
|
532
532
|
};
|
|
533
|
-
ButtonComponent.defaultProps = {
|
|
534
|
-
size: 'medium'
|
|
535
|
-
};
|
|
536
533
|
const Button = ButtonComponent;
|
|
537
534
|
Button.EndIcon = EndIcon;
|
|
538
535
|
Button.StartIcon = StartIcon;
|
|
@@ -583,13 +580,13 @@ const IconButton = React.forwardRef((_ref, ref) => {
|
|
|
583
580
|
let {
|
|
584
581
|
children,
|
|
585
582
|
focusInset,
|
|
586
|
-
isBasic,
|
|
583
|
+
isBasic = true,
|
|
587
584
|
isDanger,
|
|
588
585
|
isNeutral,
|
|
589
|
-
isPill,
|
|
586
|
+
isPill = true,
|
|
590
587
|
isPrimary,
|
|
591
588
|
isRotated,
|
|
592
|
-
size,
|
|
589
|
+
size = 'medium',
|
|
593
590
|
...other
|
|
594
591
|
} = _ref;
|
|
595
592
|
const splitButtonFocusInset = useSplitButtonContext();
|
|
@@ -617,11 +614,6 @@ IconButton.propTypes = {
|
|
|
617
614
|
isRotated: PropTypes__default.default.bool,
|
|
618
615
|
size: PropTypes__default.default.oneOf(SIZE)
|
|
619
616
|
};
|
|
620
|
-
IconButton.defaultProps = {
|
|
621
|
-
isPill: true,
|
|
622
|
-
isBasic: true,
|
|
623
|
-
size: 'medium'
|
|
624
|
-
};
|
|
625
617
|
|
|
626
618
|
var _path;
|
|
627
619
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
@@ -639,16 +631,22 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
|
639
631
|
})));
|
|
640
632
|
};
|
|
641
633
|
|
|
642
|
-
const ChevronButton = React.forwardRef((
|
|
643
|
-
|
|
644
|
-
|
|
634
|
+
const ChevronButton = React.forwardRef((_ref, ref) => {
|
|
635
|
+
let {
|
|
636
|
+
isBasic = false,
|
|
637
|
+
isPill = false,
|
|
638
|
+
size = 'medium',
|
|
639
|
+
...props
|
|
640
|
+
} = _ref;
|
|
641
|
+
return React__namespace.default.createElement(IconButton, Object.assign({
|
|
642
|
+
ref: ref,
|
|
643
|
+
isBasic: isBasic,
|
|
644
|
+
isPill: isPill,
|
|
645
|
+
size: size
|
|
646
|
+
}, props), React__namespace.default.createElement(SvgChevronDownStroke, null));
|
|
647
|
+
});
|
|
645
648
|
ChevronButton.displayName = 'ChevronButton';
|
|
646
649
|
ChevronButton.propTypes = IconButton.propTypes;
|
|
647
|
-
ChevronButton.defaultProps = {
|
|
648
|
-
isBasic: false,
|
|
649
|
-
isPill: false,
|
|
650
|
-
size: 'medium'
|
|
651
|
-
};
|
|
652
650
|
|
|
653
651
|
const SplitButton = React.forwardRef((_ref, ref) => {
|
|
654
652
|
let {
|
|
@@ -666,10 +664,12 @@ SplitButton.displayName = 'SplitButton';
|
|
|
666
664
|
const ToggleButton = React.forwardRef((_ref, ref) => {
|
|
667
665
|
let {
|
|
668
666
|
isPressed,
|
|
667
|
+
size = 'medium',
|
|
669
668
|
...otherProps
|
|
670
669
|
} = _ref;
|
|
671
670
|
return React__namespace.default.createElement(Button, Object.assign({
|
|
672
671
|
"aria-pressed": isPressed,
|
|
672
|
+
size: size,
|
|
673
673
|
ref: ref
|
|
674
674
|
}, otherProps));
|
|
675
675
|
});
|
|
@@ -678,17 +678,20 @@ ToggleButton.propTypes = {
|
|
|
678
678
|
...Button.propTypes,
|
|
679
679
|
isPressed: PropTypes__default.default.oneOf([true, false, 'mixed'])
|
|
680
680
|
};
|
|
681
|
-
ToggleButton.defaultProps = {
|
|
682
|
-
size: 'medium'
|
|
683
|
-
};
|
|
684
681
|
|
|
685
682
|
const ToggleIconButton = React.forwardRef((_ref, ref) => {
|
|
686
683
|
let {
|
|
687
684
|
isPressed,
|
|
685
|
+
isPill = true,
|
|
686
|
+
isBasic = true,
|
|
687
|
+
size = 'medium',
|
|
688
688
|
...otherProps
|
|
689
689
|
} = _ref;
|
|
690
690
|
return React__namespace.default.createElement(IconButton, Object.assign({
|
|
691
691
|
"aria-pressed": isPressed,
|
|
692
|
+
isPill: isPill,
|
|
693
|
+
isBasic: isBasic,
|
|
694
|
+
size: size,
|
|
692
695
|
ref: ref
|
|
693
696
|
}, otherProps));
|
|
694
697
|
});
|
|
@@ -697,11 +700,6 @@ ToggleIconButton.propTypes = {
|
|
|
697
700
|
...IconButton.propTypes,
|
|
698
701
|
isPressed: PropTypes__default.default.oneOf([true, false, 'mixed'])
|
|
699
702
|
};
|
|
700
|
-
ToggleIconButton.defaultProps = {
|
|
701
|
-
isPill: true,
|
|
702
|
-
isBasic: true,
|
|
703
|
-
size: 'medium'
|
|
704
|
-
};
|
|
705
703
|
|
|
706
704
|
exports.Anchor = Anchor;
|
|
707
705
|
exports.Button = Button;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-buttons",
|
|
3
|
-
"version": "9.11.
|
|
3
|
+
"version": "9.11.2",
|
|
4
4
|
"description": "Components relating to buttons 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 || ^6.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^9.11.
|
|
36
|
+
"@zendeskgarden/react-theming": "^9.11.2",
|
|
37
37
|
"@zendeskgarden/svg-icons": "7.5.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"zendeskgarden:src": "src/index.ts",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "3adb38d25d0a3fa38ff21c7707950623f22b5db7"
|
|
50
50
|
}
|