@zendeskgarden/react-buttons 8.47.2 → 8.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -139,7 +139,7 @@ function _objectWithoutProperties(source, excluded) {
139
139
  var COMPONENT_ID$5 = 'buttons.button_group_view';
140
140
  var StyledButtonGroup = styled__default["default"].div.attrs({
141
141
  'data-garden-id': COMPONENT_ID$5,
142
- 'data-garden-version': '8.47.2'
142
+ 'data-garden-version': '8.48.0'
143
143
  }).withConfig({
144
144
  displayName: "StyledButtonGroup",
145
145
  componentId: "sc-1fbpzef-0"
@@ -171,7 +171,7 @@ var StyledIcon = styled__default["default"](function (_ref) {
171
171
  return React__default["default"].cloneElement(React.Children.only(children), props);
172
172
  }).attrs({
173
173
  'data-garden-id': COMPONENT_ID$4,
174
- 'data-garden-version': '8.47.2'
174
+ 'data-garden-version': '8.48.0'
175
175
  }).withConfig({
176
176
  displayName: "StyledIcon",
177
177
  componentId: "sc-19meqgg-0"
@@ -280,7 +280,7 @@ var sizeStyles = function sizeStyles(props) {
280
280
  var StyledButton = styled__default["default"].button.attrs(function (props) {
281
281
  return {
282
282
  'data-garden-id': COMPONENT_ID$3,
283
- 'data-garden-version': '8.47.2',
283
+ 'data-garden-version': '8.48.0',
284
284
  type: props.type || 'button'
285
285
  };
286
286
  }).withConfig({
@@ -333,7 +333,7 @@ var COMPONENT_ID$2 = 'buttons.anchor';
333
333
  var StyledAnchor = styled__default["default"](StyledButton).attrs(function (props) {
334
334
  return {
335
335
  'data-garden-id': COMPONENT_ID$2,
336
- 'data-garden-version': '8.47.2',
336
+ 'data-garden-version': '8.48.0',
337
337
  as: 'a',
338
338
  dir: props.theme.rtl ? 'rtl' : undefined,
339
339
  isLink: true,
@@ -374,7 +374,7 @@ var SvgNewWindowStroke = function SvgNewWindowStroke(props) {
374
374
  var COMPONENT_ID$1 = 'buttons.external_icon';
375
375
  var StyledExternalIcon = styled__default["default"](SvgNewWindowStroke).attrs({
376
376
  'data-garden-id': COMPONENT_ID$1,
377
- 'data-garden-version': '8.47.2'
377
+ 'data-garden-version': '8.48.0'
378
378
  }).withConfig({
379
379
  displayName: "StyledExternalIcon",
380
380
  componentId: "sc-16oz07e-0"
@@ -405,7 +405,7 @@ var iconStyles = function iconStyles(props) {
405
405
  };
406
406
  var StyledIconButton = styled__default["default"](StyledButton).attrs({
407
407
  'data-garden-id': COMPONENT_ID,
408
- 'data-garden-version': '8.47.2'
408
+ 'data-garden-version': '8.48.0'
409
409
  }).withConfig({
410
410
  displayName: "StyledIconButton",
411
411
  componentId: "sc-1t0ughp-0"
@@ -430,7 +430,23 @@ var useSplitButtonContext = function useSplitButtonContext() {
430
430
  return React.useContext(SplitButtonContext);
431
431
  };
432
432
 
433
- var Button = React__default["default"].forwardRef(function (props, ref) {
433
+ var StartIconComponent = function StartIconComponent(props) {
434
+ return React__default["default"].createElement(StyledIcon, _extends$2({
435
+ position: "start"
436
+ }, props));
437
+ };
438
+ StartIconComponent.displayName = 'Button.StartIcon';
439
+ var StartIcon = StartIconComponent;
440
+
441
+ var EndIconComponent = function EndIconComponent(props) {
442
+ return React__default["default"].createElement(StyledIcon, _extends$2({
443
+ position: "end"
444
+ }, props));
445
+ };
446
+ EndIconComponent.displayName = 'Button.EndIcon';
447
+ var EndIcon = EndIconComponent;
448
+
449
+ var ButtonComponent = React.forwardRef(function (props, ref) {
434
450
  var buttonGroupContext = useButtonGroupContext();
435
451
  var splitButtonContext = useSplitButtonContext();
436
452
  var computedProps = _objectSpread2(_objectSpread2({}, props), {}, {
@@ -450,7 +466,8 @@ var Button = React__default["default"].forwardRef(function (props, ref) {
450
466
  ref: ref
451
467
  }, computedProps));
452
468
  });
453
- Button.propTypes = {
469
+ ButtonComponent.displayName = 'Button';
470
+ ButtonComponent.propTypes = {
454
471
  isNeutral: PropTypes__default["default"].bool,
455
472
  isPrimary: PropTypes__default["default"].bool,
456
473
  isDanger: PropTypes__default["default"].bool,
@@ -462,25 +479,15 @@ Button.propTypes = {
462
479
  isSelected: PropTypes__default["default"].bool,
463
480
  size: PropTypes__default["default"].oneOf(['small', 'medium', 'large'])
464
481
  };
465
- Button.defaultProps = {
482
+ ButtonComponent.defaultProps = {
466
483
  size: 'medium'
467
484
  };
468
- Button.displayName = 'Button';
469
- var StartIcon = function StartIcon(props) {
470
- return React__default["default"].createElement(StyledIcon, _extends$2({
471
- position: "start"
472
- }, props));
473
- };
474
- var EndIcon = function EndIcon(props) {
475
- return React__default["default"].createElement(StyledIcon, _extends$2({
476
- position: "end"
477
- }, props));
478
- };
479
- Button.StartIcon = StartIcon;
485
+ var Button = ButtonComponent;
480
486
  Button.EndIcon = EndIcon;
487
+ Button.StartIcon = StartIcon;
481
488
 
482
489
  var _excluded$5 = ["children", "isExternal"];
483
- var Anchor = React__default["default"].forwardRef(function (_ref, ref) {
490
+ var Anchor = React.forwardRef(function (_ref, ref) {
484
491
  var children = _ref.children,
485
492
  isExternal = _ref.isExternal,
486
493
  otherProps = _objectWithoutProperties(_ref, _excluded$5);
@@ -502,7 +509,7 @@ Anchor.propTypes = {
502
509
  };
503
510
 
504
511
  var _excluded$4 = ["children", "onSelect", "selectedItem"];
505
- var ButtonGroup = function ButtonGroup(_ref) {
512
+ var ButtonGroup = React.forwardRef(function (_ref, ref) {
506
513
  var children = _ref.children,
507
514
  onSelect = _ref.onSelect,
508
515
  controlledSelectedItem = _ref.selectedItem,
@@ -523,15 +530,18 @@ var ButtonGroup = function ButtonGroup(_ref) {
523
530
  }, [selectedItem, getButtonProps]);
524
531
  return React__default["default"].createElement(ButtonGroupContext.Provider, {
525
532
  value: contextValue
526
- }, React__default["default"].createElement(StyledButtonGroup, getGroupProps(otherProps), children));
527
- };
533
+ }, React__default["default"].createElement(StyledButtonGroup, _extends$2({
534
+ ref: ref
535
+ }, getGroupProps(otherProps)), children));
536
+ });
537
+ ButtonGroup.displayName = 'ButtonGroup';
528
538
  ButtonGroup.propTypes = {
529
539
  selectedItem: PropTypes__default["default"].any,
530
540
  onSelect: PropTypes__default["default"].func
531
541
  };
532
542
 
533
543
  var _excluded$3 = ["children", "isRotated"];
534
- var IconButton = React__default["default"].forwardRef(function (_ref, ref) {
544
+ var IconButton = React.forwardRef(function (_ref, ref) {
535
545
  var children = _ref.children,
536
546
  isRotated = _ref.isRotated,
537
547
  otherProps = _objectWithoutProperties(_ref, _excluded$3);
@@ -579,7 +589,7 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
579
589
  })));
580
590
  };
581
591
 
582
- var ChevronButton = React__default["default"].forwardRef(function (_ref, ref) {
592
+ var ChevronButton = React.forwardRef(function (_ref, ref) {
583
593
  var buttonProps = _extends$2({}, _ref);
584
594
  return React__default["default"].createElement(IconButton, _extends$2({
585
595
  ref: ref
@@ -594,16 +604,19 @@ ChevronButton.defaultProps = {
594
604
  };
595
605
 
596
606
  var _excluded$2 = ["children"];
597
- var SplitButton = function SplitButton(_ref) {
607
+ var SplitButton = React.forwardRef(function (_ref, ref) {
598
608
  var children = _ref.children,
599
609
  other = _objectWithoutProperties(_ref, _excluded$2);
600
610
  return React__default["default"].createElement(SplitButtonContext.Provider, {
601
611
  value: true
602
- }, React__default["default"].createElement(StyledButtonGroup, other, children));
603
- };
612
+ }, React__default["default"].createElement(StyledButtonGroup, _extends$2({
613
+ ref: ref
614
+ }, other), children));
615
+ });
616
+ SplitButton.displayName = 'SplitButton';
604
617
 
605
618
  var _excluded$1 = ["isPressed"];
606
- var ToggleButton = React__default["default"].forwardRef(function (_ref, ref) {
619
+ var ToggleButton = React.forwardRef(function (_ref, ref) {
607
620
  var isPressed = _ref.isPressed,
608
621
  otherProps = _objectWithoutProperties(_ref, _excluded$1);
609
622
  return React__default["default"].createElement(Button, _extends$2({
@@ -616,12 +629,11 @@ ToggleButton.propTypes = _objectSpread2(_objectSpread2({}, Button.propTypes), {}
616
629
  isPressed: PropTypes__default["default"].oneOf([true, false, 'mixed'])
617
630
  });
618
631
  ToggleButton.defaultProps = {
619
- isPressed: false,
620
632
  size: 'medium'
621
633
  };
622
634
 
623
635
  var _excluded = ["isPressed"];
624
- var ToggleIconButton = React__default["default"].forwardRef(function (_ref, ref) {
636
+ var ToggleIconButton = React.forwardRef(function (_ref, ref) {
625
637
  var isPressed = _ref.isPressed,
626
638
  otherProps = _objectWithoutProperties(_ref, _excluded);
627
639
  return React__default["default"].createElement(IconButton, _extends$2({
@@ -636,7 +648,6 @@ ToggleIconButton.propTypes = _objectSpread2(_objectSpread2({}, IconButton.propTy
636
648
  ToggleIconButton.defaultProps = {
637
649
  isPill: true,
638
650
  isBasic: true,
639
- isPressed: false,
640
651
  size: 'medium'
641
652
  };
642
653
 
package/dist/index.esm.js CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import * as React from 'react';
9
- import React__default, { Children, createContext, useContext, useMemo } from 'react';
9
+ import React__default, { Children, createContext, useContext, forwardRef, useMemo } from 'react';
10
10
  import PropTypes from 'prop-types';
11
11
  import styled, { css } from 'styled-components';
12
12
  import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
@@ -111,7 +111,7 @@ function _objectWithoutProperties(source, excluded) {
111
111
  var COMPONENT_ID$5 = 'buttons.button_group_view';
112
112
  var StyledButtonGroup = styled.div.attrs({
113
113
  'data-garden-id': COMPONENT_ID$5,
114
- 'data-garden-version': '8.47.2'
114
+ 'data-garden-version': '8.48.0'
115
115
  }).withConfig({
116
116
  displayName: "StyledButtonGroup",
117
117
  componentId: "sc-1fbpzef-0"
@@ -143,7 +143,7 @@ var StyledIcon = styled(function (_ref) {
143
143
  return React__default.cloneElement(Children.only(children), props);
144
144
  }).attrs({
145
145
  'data-garden-id': COMPONENT_ID$4,
146
- 'data-garden-version': '8.47.2'
146
+ 'data-garden-version': '8.48.0'
147
147
  }).withConfig({
148
148
  displayName: "StyledIcon",
149
149
  componentId: "sc-19meqgg-0"
@@ -252,7 +252,7 @@ var sizeStyles = function sizeStyles(props) {
252
252
  var StyledButton = styled.button.attrs(function (props) {
253
253
  return {
254
254
  'data-garden-id': COMPONENT_ID$3,
255
- 'data-garden-version': '8.47.2',
255
+ 'data-garden-version': '8.48.0',
256
256
  type: props.type || 'button'
257
257
  };
258
258
  }).withConfig({
@@ -305,7 +305,7 @@ var COMPONENT_ID$2 = 'buttons.anchor';
305
305
  var StyledAnchor = styled(StyledButton).attrs(function (props) {
306
306
  return {
307
307
  'data-garden-id': COMPONENT_ID$2,
308
- 'data-garden-version': '8.47.2',
308
+ 'data-garden-version': '8.48.0',
309
309
  as: 'a',
310
310
  dir: props.theme.rtl ? 'rtl' : undefined,
311
311
  isLink: true,
@@ -346,7 +346,7 @@ var SvgNewWindowStroke = function SvgNewWindowStroke(props) {
346
346
  var COMPONENT_ID$1 = 'buttons.external_icon';
347
347
  var StyledExternalIcon = styled(SvgNewWindowStroke).attrs({
348
348
  'data-garden-id': COMPONENT_ID$1,
349
- 'data-garden-version': '8.47.2'
349
+ 'data-garden-version': '8.48.0'
350
350
  }).withConfig({
351
351
  displayName: "StyledExternalIcon",
352
352
  componentId: "sc-16oz07e-0"
@@ -377,7 +377,7 @@ var iconStyles = function iconStyles(props) {
377
377
  };
378
378
  var StyledIconButton = styled(StyledButton).attrs({
379
379
  'data-garden-id': COMPONENT_ID,
380
- 'data-garden-version': '8.47.2'
380
+ 'data-garden-version': '8.48.0'
381
381
  }).withConfig({
382
382
  displayName: "StyledIconButton",
383
383
  componentId: "sc-1t0ughp-0"
@@ -402,7 +402,23 @@ var useSplitButtonContext = function useSplitButtonContext() {
402
402
  return useContext(SplitButtonContext);
403
403
  };
404
404
 
405
- var Button = React__default.forwardRef(function (props, ref) {
405
+ var StartIconComponent = function StartIconComponent(props) {
406
+ return React__default.createElement(StyledIcon, _extends$2({
407
+ position: "start"
408
+ }, props));
409
+ };
410
+ StartIconComponent.displayName = 'Button.StartIcon';
411
+ var StartIcon = StartIconComponent;
412
+
413
+ var EndIconComponent = function EndIconComponent(props) {
414
+ return React__default.createElement(StyledIcon, _extends$2({
415
+ position: "end"
416
+ }, props));
417
+ };
418
+ EndIconComponent.displayName = 'Button.EndIcon';
419
+ var EndIcon = EndIconComponent;
420
+
421
+ var ButtonComponent = forwardRef(function (props, ref) {
406
422
  var buttonGroupContext = useButtonGroupContext();
407
423
  var splitButtonContext = useSplitButtonContext();
408
424
  var computedProps = _objectSpread2(_objectSpread2({}, props), {}, {
@@ -422,7 +438,8 @@ var Button = React__default.forwardRef(function (props, ref) {
422
438
  ref: ref
423
439
  }, computedProps));
424
440
  });
425
- Button.propTypes = {
441
+ ButtonComponent.displayName = 'Button';
442
+ ButtonComponent.propTypes = {
426
443
  isNeutral: PropTypes.bool,
427
444
  isPrimary: PropTypes.bool,
428
445
  isDanger: PropTypes.bool,
@@ -434,25 +451,15 @@ Button.propTypes = {
434
451
  isSelected: PropTypes.bool,
435
452
  size: PropTypes.oneOf(['small', 'medium', 'large'])
436
453
  };
437
- Button.defaultProps = {
454
+ ButtonComponent.defaultProps = {
438
455
  size: 'medium'
439
456
  };
440
- Button.displayName = 'Button';
441
- var StartIcon = function StartIcon(props) {
442
- return React__default.createElement(StyledIcon, _extends$2({
443
- position: "start"
444
- }, props));
445
- };
446
- var EndIcon = function EndIcon(props) {
447
- return React__default.createElement(StyledIcon, _extends$2({
448
- position: "end"
449
- }, props));
450
- };
451
- Button.StartIcon = StartIcon;
457
+ var Button = ButtonComponent;
452
458
  Button.EndIcon = EndIcon;
459
+ Button.StartIcon = StartIcon;
453
460
 
454
461
  var _excluded$5 = ["children", "isExternal"];
455
- var Anchor = React__default.forwardRef(function (_ref, ref) {
462
+ var Anchor = forwardRef(function (_ref, ref) {
456
463
  var children = _ref.children,
457
464
  isExternal = _ref.isExternal,
458
465
  otherProps = _objectWithoutProperties(_ref, _excluded$5);
@@ -474,7 +481,7 @@ Anchor.propTypes = {
474
481
  };
475
482
 
476
483
  var _excluded$4 = ["children", "onSelect", "selectedItem"];
477
- var ButtonGroup = function ButtonGroup(_ref) {
484
+ var ButtonGroup = forwardRef(function (_ref, ref) {
478
485
  var children = _ref.children,
479
486
  onSelect = _ref.onSelect,
480
487
  controlledSelectedItem = _ref.selectedItem,
@@ -495,15 +502,18 @@ var ButtonGroup = function ButtonGroup(_ref) {
495
502
  }, [selectedItem, getButtonProps]);
496
503
  return React__default.createElement(ButtonGroupContext.Provider, {
497
504
  value: contextValue
498
- }, React__default.createElement(StyledButtonGroup, getGroupProps(otherProps), children));
499
- };
505
+ }, React__default.createElement(StyledButtonGroup, _extends$2({
506
+ ref: ref
507
+ }, getGroupProps(otherProps)), children));
508
+ });
509
+ ButtonGroup.displayName = 'ButtonGroup';
500
510
  ButtonGroup.propTypes = {
501
511
  selectedItem: PropTypes.any,
502
512
  onSelect: PropTypes.func
503
513
  };
504
514
 
505
515
  var _excluded$3 = ["children", "isRotated"];
506
- var IconButton = React__default.forwardRef(function (_ref, ref) {
516
+ var IconButton = forwardRef(function (_ref, ref) {
507
517
  var children = _ref.children,
508
518
  isRotated = _ref.isRotated,
509
519
  otherProps = _objectWithoutProperties(_ref, _excluded$3);
@@ -551,7 +561,7 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
551
561
  })));
552
562
  };
553
563
 
554
- var ChevronButton = React__default.forwardRef(function (_ref, ref) {
564
+ var ChevronButton = forwardRef(function (_ref, ref) {
555
565
  var buttonProps = _extends$2({}, _ref);
556
566
  return React__default.createElement(IconButton, _extends$2({
557
567
  ref: ref
@@ -566,16 +576,19 @@ ChevronButton.defaultProps = {
566
576
  };
567
577
 
568
578
  var _excluded$2 = ["children"];
569
- var SplitButton = function SplitButton(_ref) {
579
+ var SplitButton = forwardRef(function (_ref, ref) {
570
580
  var children = _ref.children,
571
581
  other = _objectWithoutProperties(_ref, _excluded$2);
572
582
  return React__default.createElement(SplitButtonContext.Provider, {
573
583
  value: true
574
- }, React__default.createElement(StyledButtonGroup, other, children));
575
- };
584
+ }, React__default.createElement(StyledButtonGroup, _extends$2({
585
+ ref: ref
586
+ }, other), children));
587
+ });
588
+ SplitButton.displayName = 'SplitButton';
576
589
 
577
590
  var _excluded$1 = ["isPressed"];
578
- var ToggleButton = React__default.forwardRef(function (_ref, ref) {
591
+ var ToggleButton = forwardRef(function (_ref, ref) {
579
592
  var isPressed = _ref.isPressed,
580
593
  otherProps = _objectWithoutProperties(_ref, _excluded$1);
581
594
  return React__default.createElement(Button, _extends$2({
@@ -588,12 +601,11 @@ ToggleButton.propTypes = _objectSpread2(_objectSpread2({}, Button.propTypes), {}
588
601
  isPressed: PropTypes.oneOf([true, false, 'mixed'])
589
602
  });
590
603
  ToggleButton.defaultProps = {
591
- isPressed: false,
592
604
  size: 'medium'
593
605
  };
594
606
 
595
607
  var _excluded = ["isPressed"];
596
- var ToggleIconButton = React__default.forwardRef(function (_ref, ref) {
608
+ var ToggleIconButton = forwardRef(function (_ref, ref) {
597
609
  var isPressed = _ref.isPressed,
598
610
  otherProps = _objectWithoutProperties(_ref, _excluded);
599
611
  return React__default.createElement(IconButton, _extends$2({
@@ -608,7 +620,6 @@ ToggleIconButton.propTypes = _objectSpread2(_objectSpread2({}, IconButton.propTy
608
620
  ToggleIconButton.defaultProps = {
609
621
  isPill: true,
610
622
  isBasic: true,
611
- isPressed: false,
612
623
  size: 'medium'
613
624
  };
614
625
 
@@ -18,5 +18,4 @@ export interface IAnchorProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
18
18
  /**
19
19
  * @extends AnchorHTMLAttributes<HTMLAnchorElement>
20
20
  */
21
- declare const Anchor: React.FunctionComponent<IAnchorProps & React.RefAttributes<HTMLAnchorElement>>;
22
- export default Anchor;
21
+ export declare const Anchor: React.ForwardRefExoticComponent<IAnchorProps & React.RefAttributes<HTMLAnchorElement>>;
@@ -5,6 +5,14 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React, { ButtonHTMLAttributes, SVGAttributes } from 'react';
8
+ import { StartIcon } from './components/StartIcon';
9
+ import { EndIcon } from './components/EndIcon';
10
+ /**
11
+ * @deprecated use IButtonStartIconProps or IButtonEndIconProps instead
12
+ */
13
+ export interface IIconProps extends SVGAttributes<SVGSVGElement> {
14
+ isRotated?: boolean;
15
+ }
8
16
  export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
9
17
  /** Applies danger styling */
10
18
  isDanger?: boolean;
@@ -27,17 +35,10 @@ export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
27
35
  /** @ignore prop used by `ButtonGroup` */
28
36
  isSelected?: boolean;
29
37
  }
30
- export interface IIconProps extends SVGAttributes<SVGSVGElement> {
31
- isRotated?: boolean;
32
- children: any;
33
- }
34
- declare const StartIcon: (props: IIconProps) => JSX.Element;
35
- declare const EndIcon: (props: IIconProps) => JSX.Element;
36
- declare const _default: React.FunctionComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> & {
37
- StartIcon: typeof StartIcon;
38
- EndIcon: typeof EndIcon;
39
- };
40
38
  /**
41
39
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
42
40
  */
43
- export default _default;
41
+ export declare const Button: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> & {
42
+ EndIcon: typeof EndIcon;
43
+ StartIcon: typeof StartIcon;
44
+ };
@@ -18,5 +18,4 @@ export interface IButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
18
18
  /**
19
19
  * @extends HTMLAttributes<HTMLDivElement>
20
20
  */
21
- declare const ButtonGroup: React.FunctionComponent<IButtonGroupProps>;
22
- export default ButtonGroup;
21
+ export declare const ButtonGroup: React.ForwardRefExoticComponent<IButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -5,9 +5,8 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React from 'react';
8
- import { IIconButtonProps } from './IconButton';
8
+ import { IIconButtonProps as IChevronButtonProps } from './IconButton';
9
9
  /**
10
10
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
11
11
  */
12
- declare const ChevronButton: React.FunctionComponent<IIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
- export default ChevronButton;
12
+ export declare const ChevronButton: React.ForwardRefExoticComponent<IChevronButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -26,5 +26,4 @@ export interface IIconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement
26
26
  /**
27
27
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
28
28
  */
29
- declare const IconButton: React.FunctionComponent<IIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
30
- export default IconButton;
29
+ export declare const IconButton: React.ForwardRefExoticComponent<IIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -4,9 +4,8 @@
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 React, { HTMLAttributes } from 'react';
7
+ import React from 'react';
8
8
  /**
9
9
  * @extends HTMLAttributes<HTMLDivElement>
10
10
  */
11
- declare const SplitButton: React.FunctionComponent<HTMLAttributes<HTMLDivElement>>;
12
- export default SplitButton;
11
+ export declare const SplitButton: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -16,5 +16,4 @@ export interface IToggleButtonProps extends IButtonProps {
16
16
  /**
17
17
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
18
18
  */
19
- declare const ToggleButton: React.FunctionComponent<IToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
20
- export default ToggleButton;
19
+ export declare const ToggleButton: React.ForwardRefExoticComponent<IToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -16,5 +16,4 @@ export interface IToggleIconButtonProps extends IIconButtonProps {
16
16
  /**
17
17
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
18
18
  */
19
- declare const ToggleIconButton: React.FunctionComponent<IToggleIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
20
- export default ToggleIconButton;
19
+ export declare const ToggleIconButton: React.ForwardRefExoticComponent<IToggleIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,18 @@
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 { SVGAttributes } from 'react';
8
+ export interface IButtonEndIconProps extends SVGAttributes<SVGElement> {
9
+ /** Rotates icon 180 degrees */
10
+ isRotated?: boolean;
11
+ }
12
+ /**
13
+ * @extends SVGAttributes<SVGElement>
14
+ */
15
+ export declare const EndIcon: {
16
+ (props: IButtonEndIconProps): JSX.Element;
17
+ displayName: string;
18
+ };
@@ -0,0 +1,18 @@
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 { SVGAttributes } from 'react';
8
+ export interface IButtonStartIconProps extends SVGAttributes<SVGElement> {
9
+ /** Rotates icon 180 degrees */
10
+ isRotated?: boolean;
11
+ }
12
+ /**
13
+ * @extends SVGAttributes<SVGElement>
14
+ */
15
+ export declare const StartIcon: {
16
+ (props: IButtonStartIconProps): JSX.Element;
17
+ displayName: string;
18
+ };
@@ -4,16 +4,19 @@
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
- export { default as Button } from './elements/Button';
7
+ export { Button } from './elements/Button';
8
8
  export type { IButtonProps, IIconProps } from './elements/Button';
9
- export { default as Anchor } from './elements/Anchor';
9
+ export type { IButtonEndIconProps } from './elements/components/EndIcon';
10
+ export type { IButtonStartIconProps } from './elements/components/StartIcon';
11
+ export { Anchor } from './elements/Anchor';
10
12
  export type { IAnchorProps } from './elements/Anchor';
11
- export { default as ButtonGroup } from './elements/ButtonGroup';
13
+ export { ButtonGroup } from './elements/ButtonGroup';
12
14
  export type { IButtonGroupProps } from './elements/ButtonGroup';
13
- export { default as ChevronButton } from './elements/ChevronButton';
14
- export { default as IconButton } from './elements/IconButton';
15
- export { default as SplitButton } from './elements/SplitButton';
16
- export { default as ToggleButton } from './elements/ToggleButton';
15
+ export { ChevronButton } from './elements/ChevronButton';
16
+ export { IconButton } from './elements/IconButton';
17
+ export type { IIconButtonProps, IIconButtonProps as IChevronButtonProps } from './elements/IconButton';
18
+ export { SplitButton } from './elements/SplitButton';
19
+ export { ToggleButton } from './elements/ToggleButton';
17
20
  export type { IToggleButtonProps } from './elements/ToggleButton';
18
- export { default as ToggleIconButton } from './elements/ToggleIconButton';
21
+ export { ToggleIconButton } from './elements/ToggleIconButton';
19
22
  export type { IToggleIconButtonProps } from './elements/ToggleIconButton';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-buttons",
3
- "version": "8.47.2",
3
+ "version": "8.48.0",
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": "^4.2.0 || ^5.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@zendeskgarden/react-theming": "^8.47.2",
36
+ "@zendeskgarden/react-theming": "^8.48.0",
37
37
  "@zendeskgarden/svg-icons": "6.30.2"
38
38
  },
39
39
  "keywords": [
@@ -46,5 +46,5 @@
46
46
  "access": "public"
47
47
  },
48
48
  "zendeskgarden:src": "src/index.ts",
49
- "gitHead": "41cb43f285760417ae2145e47eca0e4a600455ab"
49
+ "gitHead": "75f36aee62043004650c3eb2e1583b98a87d71f8"
50
50
  }