@sb1/ffe-buttons-react 15.0.0 → 16.0.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.
@@ -29,9 +29,6 @@ ActionButton.propTypes = {
29
29
  /** Extra class names */
30
30
  className: string,
31
31
 
32
- /** Condensed modifier. Use in condensed designs */
33
- condensed: bool,
34
-
35
32
  /** Disable a button in certain situations */
36
33
  disabled: bool,
37
34
 
package/es/BaseButton.js CHANGED
@@ -1,4 +1,4 @@
1
- var _excluded = ["ariaLoadingMessage", "buttonType", "children", "className", "condensed", "element", "innerRef", "isLoading", "leftIcon", "rightIcon", "onClick"];
1
+ var _excluded = ["ariaLoadingMessage", "buttonType", "children", "className", "element", "innerRef", "isLoading", "leftIcon", "rightIcon", "onClick"];
2
2
 
3
3
  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); }
4
4
 
@@ -18,7 +18,6 @@ var BaseButton = function BaseButton(props) {
18
18
  buttonType = props.buttonType,
19
19
  children = props.children,
20
20
  className = props.className,
21
- condensed = props.condensed,
22
21
  Element = props.element,
23
22
  innerRef = props.innerRef,
24
23
  isLoading = props.isLoading,
@@ -32,8 +31,6 @@ var BaseButton = function BaseButton(props) {
32
31
  "aria-busy": isLoading && supportsSpinner,
33
32
  "aria-disabled": rest.disabled || isLoading && supportsSpinner,
34
33
  className: classNames('ffe-button', "ffe-button--".concat(buttonType), {
35
- 'ffe-button--condensed': condensed
36
- }, {
37
34
  'ffe-button--loading': isLoading && supportsSpinner
38
35
  }, className),
39
36
  ref: innerRef,
@@ -48,11 +45,12 @@ var BaseButton = function BaseButton(props) {
48
45
  }, rest), /*#__PURE__*/React.createElement("span", {
49
46
  className: "ffe-button__label"
50
47
  }, leftIcon && /*#__PURE__*/React.cloneElement(leftIcon, {
51
- className: 'ffe-button__icon ffe-button__icon--left'
48
+ className: 'ffe-button__icon ffe-button__icon--left',
49
+ 'aria-hidden': 'true'
52
50
  }), children, rightIcon && /*#__PURE__*/React.cloneElement(rightIcon, {
53
- className: 'ffe-button__icon ffe-button__icon--right'
54
- })), supportsSpinner && /*#__PURE__*/React.createElement("span", {
55
- "aria-hidden": !isLoading,
51
+ className: 'ffe-button__icon ffe-button__icon--right',
52
+ 'aria-hidden': 'true'
53
+ })), supportsSpinner && isLoading && /*#__PURE__*/React.createElement("span", {
56
54
  "aria-label": ariaLoadingMessage,
57
55
  className: "ffe-button__spinner"
58
56
  }));
@@ -74,9 +72,6 @@ BaseButton.propTypes = {
74
72
  /** Extra class names */
75
73
  className: string,
76
74
 
77
- /** Condensed modifier. Use in condensed designs */
78
- condensed: bool,
79
-
80
75
  /** Disable a button in certain situations */
81
76
  disabled: bool,
82
77
 
@@ -20,9 +20,6 @@ PrimaryButton.propTypes = {
20
20
  /** Extra class names */
21
21
  className: string,
22
22
 
23
- /** Condensed modifier. Use in condensed designs */
24
- condensed: bool,
25
-
26
23
  /** Disable a button in certain situations */
27
24
  disabled: bool,
28
25
 
@@ -20,9 +20,6 @@ SecondaryButton.propTypes = {
20
20
  /** Extra class names */
21
21
  className: string,
22
22
 
23
- /** Condensed modifier. Use in condensed designs */
24
- condensed: bool,
25
-
26
23
  /** Disable a button in certain situations */
27
24
  disabled: bool,
28
25
 
@@ -19,9 +19,6 @@ ShortcutButton.propTypes = {
19
19
  /** Extra class names */
20
20
  className: string,
21
21
 
22
- /** Condensed modifier. Use in condensed designs */
23
- condensed: bool,
24
-
25
22
  /** Disable a button in certain situations */
26
23
  disabled: bool,
27
24
 
package/es/TaskButton.js CHANGED
@@ -27,9 +27,6 @@ TaskButton.propTypes = {
27
27
  /** Extra class names */
28
28
  className: string,
29
29
 
30
- /** Condensed modifier. Use in condensed designs */
31
- condensed: bool,
32
-
33
30
  /** Disable a button in certain situations */
34
31
  disabled: bool,
35
32
 
@@ -43,9 +43,6 @@ ActionButton.propTypes = {
43
43
  /** Extra class names */
44
44
  className: _propTypes.string,
45
45
 
46
- /** Condensed modifier. Use in condensed designs */
47
- condensed: _propTypes.bool,
48
-
49
46
  /** Disable a button in certain situations */
50
47
  disabled: _propTypes.bool,
51
48
 
package/lib/BaseButton.js CHANGED
@@ -11,7 +11,7 @@ var _propTypes = require("prop-types");
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
- var _excluded = ["ariaLoadingMessage", "buttonType", "children", "className", "condensed", "element", "innerRef", "isLoading", "leftIcon", "rightIcon", "onClick"];
14
+ var _excluded = ["ariaLoadingMessage", "buttonType", "children", "className", "element", "innerRef", "isLoading", "leftIcon", "rightIcon", "onClick"];
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
@@ -29,7 +29,6 @@ var BaseButton = function BaseButton(props) {
29
29
  buttonType = props.buttonType,
30
30
  children = props.children,
31
31
  className = props.className,
32
- condensed = props.condensed,
33
32
  Element = props.element,
34
33
  innerRef = props.innerRef,
35
34
  isLoading = props.isLoading,
@@ -43,8 +42,6 @@ var BaseButton = function BaseButton(props) {
43
42
  "aria-busy": isLoading && supportsSpinner,
44
43
  "aria-disabled": rest.disabled || isLoading && supportsSpinner,
45
44
  className: (0, _classnames.default)('ffe-button', "ffe-button--".concat(buttonType), {
46
- 'ffe-button--condensed': condensed
47
- }, {
48
45
  'ffe-button--loading': isLoading && supportsSpinner
49
46
  }, className),
50
47
  ref: innerRef,
@@ -59,11 +56,12 @@ var BaseButton = function BaseButton(props) {
59
56
  }, rest), /*#__PURE__*/_react.default.createElement("span", {
60
57
  className: "ffe-button__label"
61
58
  }, leftIcon && /*#__PURE__*/_react.default.cloneElement(leftIcon, {
62
- className: 'ffe-button__icon ffe-button__icon--left'
59
+ className: 'ffe-button__icon ffe-button__icon--left',
60
+ 'aria-hidden': 'true'
63
61
  }), children, rightIcon && /*#__PURE__*/_react.default.cloneElement(rightIcon, {
64
- className: 'ffe-button__icon ffe-button__icon--right'
65
- })), supportsSpinner && /*#__PURE__*/_react.default.createElement("span", {
66
- "aria-hidden": !isLoading,
62
+ className: 'ffe-button__icon ffe-button__icon--right',
63
+ 'aria-hidden': 'true'
64
+ })), supportsSpinner && isLoading && /*#__PURE__*/_react.default.createElement("span", {
67
65
  "aria-label": ariaLoadingMessage,
68
66
  className: "ffe-button__spinner"
69
67
  }));
@@ -85,9 +83,6 @@ BaseButton.propTypes = {
85
83
  /** Extra class names */
86
84
  className: _propTypes.string,
87
85
 
88
- /** Condensed modifier. Use in condensed designs */
89
- condensed: _propTypes.bool,
90
-
91
86
  /** Disable a button in certain situations */
92
87
  disabled: _propTypes.bool,
93
88
 
@@ -31,9 +31,6 @@ PrimaryButton.propTypes = {
31
31
  /** Extra class names */
32
32
  className: _propTypes.string,
33
33
 
34
- /** Condensed modifier. Use in condensed designs */
35
- condensed: _propTypes.bool,
36
-
37
34
  /** Disable a button in certain situations */
38
35
  disabled: _propTypes.bool,
39
36
 
@@ -31,9 +31,6 @@ SecondaryButton.propTypes = {
31
31
  /** Extra class names */
32
32
  className: _propTypes.string,
33
33
 
34
- /** Condensed modifier. Use in condensed designs */
35
- condensed: _propTypes.bool,
36
-
37
34
  /** Disable a button in certain situations */
38
35
  disabled: _propTypes.bool,
39
36
 
@@ -31,9 +31,6 @@ ShortcutButton.propTypes = {
31
31
  /** Extra class names */
32
32
  className: _propTypes.string,
33
33
 
34
- /** Condensed modifier. Use in condensed designs */
35
- condensed: _propTypes.bool,
36
-
37
34
  /** Disable a button in certain situations */
38
35
  disabled: _propTypes.bool,
39
36
 
package/lib/TaskButton.js CHANGED
@@ -38,9 +38,6 @@ TaskButton.propTypes = {
38
38
  /** Extra class names */
39
39
  className: _propTypes.string,
40
40
 
41
- /** Condensed modifier. Use in condensed designs */
42
- condensed: _propTypes.bool,
43
-
44
41
  /** Disable a button in certain situations */
45
42
  disabled: _propTypes.bool,
46
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-buttons-react",
3
- "version": "15.0.0",
3
+ "version": "16.0.2",
4
4
  "description": "React implementation of ffe-buttons",
5
5
  "keywords": [
6
6
  "ffe"
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "0ff2b9371adf4b9fda3acbe2ec821d43f2105877"
49
+ "gitHead": "aedebe00873310156565d8bd15a210558f2dd57f"
50
50
  }
package/types/index.d.ts CHANGED
@@ -19,7 +19,6 @@ export interface MinimalBaseButtonProps extends React.HTMLProps<HTMLElement> {
19
19
  export interface BaseButtonProps extends MinimalBaseButtonProps {
20
20
  children?: React.ReactNode;
21
21
  ariaLoadingMessage?: string;
22
- condensed?: boolean;
23
22
  disabled?: boolean;
24
23
  isLoading?: boolean;
25
24
  leftIcon?: React.ReactNode;
@@ -36,6 +35,7 @@ export interface ButtonGroupProps {
36
35
  className?: string;
37
36
  thin?: boolean;
38
37
  inline?: boolean;
38
+ children: React.ReactNode;
39
39
  }
40
40
 
41
41
  export interface ExpandButtonProps extends MinimalBaseButtonProps {
@@ -60,14 +60,12 @@ export interface SecondaryButtonProps extends BaseButtonProps {}
60
60
 
61
61
  export interface ShortcutButtonProps extends MinimalBaseButtonProps {
62
62
  children?: React.ReactNode;
63
- condensed?: boolean;
64
63
  disabled?: boolean;
65
64
  leftIcon?: React.ReactNode;
66
65
  }
67
66
 
68
67
  export interface TaskButtonProps extends MinimalBaseButtonProps {
69
68
  children?: React.ReactNode;
70
- condensed?: boolean;
71
69
  disabled?: boolean;
72
70
  icon: React.ReactNode;
73
71
  }