@sb1/ffe-buttons-react 14.1.2 → 16.0.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/es/ActionButton.js +2 -14
- package/es/BaseButton.js +1 -7
- package/es/PrimaryButton.js +0 -3
- package/es/SecondaryButton.js +0 -3
- package/es/ShortcutButton.js +0 -3
- package/es/TaskButton.js +0 -3
- package/lib/ActionButton.js +2 -14
- package/lib/BaseButton.js +1 -7
- package/lib/PrimaryButton.js +0 -3
- package/lib/SecondaryButton.js +0 -3
- package/lib/ShortcutButton.js +0 -3
- package/lib/TaskButton.js +0 -3
- package/package.json +2 -2
- package/types/index.d.ts +2 -6
package/es/ActionButton.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className"
|
|
1
|
+
var _excluded = ["className"];
|
|
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
|
|
|
@@ -12,14 +12,11 @@ import classNames from 'classnames';
|
|
|
12
12
|
import Button from './BaseButton';
|
|
13
13
|
export default function ActionButton(props) {
|
|
14
14
|
var className = props.className,
|
|
15
|
-
ghost = props.ghost,
|
|
16
15
|
rest = _objectWithoutProperties(props, _excluded);
|
|
17
16
|
|
|
18
17
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
19
18
|
buttonType: "action",
|
|
20
|
-
className: classNames(className
|
|
21
|
-
'ffe-button--ghost': ghost
|
|
22
|
-
})
|
|
19
|
+
className: classNames(className)
|
|
23
20
|
}, rest));
|
|
24
21
|
}
|
|
25
22
|
ActionButton.propTypes = {
|
|
@@ -32,18 +29,12 @@ ActionButton.propTypes = {
|
|
|
32
29
|
/** Extra class names */
|
|
33
30
|
className: string,
|
|
34
31
|
|
|
35
|
-
/** Condensed modifier. Use in condensed designs */
|
|
36
|
-
condensed: bool,
|
|
37
|
-
|
|
38
32
|
/** Disable a button in certain situations */
|
|
39
33
|
disabled: bool,
|
|
40
34
|
|
|
41
35
|
/** The rendered element, like an `<a />` or `<Link />` */
|
|
42
36
|
element: oneOfType([func, string, elementType]),
|
|
43
37
|
|
|
44
|
-
/** Applies the ghost modifier if true. */
|
|
45
|
-
ghost: bool,
|
|
46
|
-
|
|
47
38
|
/** Ref-setting function, or ref created by useRef, passed to the button element */
|
|
48
39
|
innerRef: oneOfType([func, shape({
|
|
49
40
|
current: object
|
|
@@ -57,7 +48,4 @@ ActionButton.propTypes = {
|
|
|
57
48
|
|
|
58
49
|
/** Icon shown to the right of the label */
|
|
59
50
|
rightIcon: node
|
|
60
|
-
};
|
|
61
|
-
ActionButton.defaultProps = {
|
|
62
|
-
ghost: false
|
|
63
51
|
};
|
package/es/BaseButton.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["ariaLoadingMessage", "buttonType", "children", "className", "
|
|
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,
|
|
@@ -74,9 +71,6 @@ BaseButton.propTypes = {
|
|
|
74
71
|
/** Extra class names */
|
|
75
72
|
className: string,
|
|
76
73
|
|
|
77
|
-
/** Condensed modifier. Use in condensed designs */
|
|
78
|
-
condensed: bool,
|
|
79
|
-
|
|
80
74
|
/** Disable a button in certain situations */
|
|
81
75
|
disabled: bool,
|
|
82
76
|
|
package/es/PrimaryButton.js
CHANGED
package/es/SecondaryButton.js
CHANGED
package/es/ShortcutButton.js
CHANGED
package/es/TaskButton.js
CHANGED
package/lib/ActionButton.js
CHANGED
|
@@ -13,7 +13,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _BaseButton = _interopRequireDefault(require("./BaseButton"));
|
|
15
15
|
|
|
16
|
-
var _excluded = ["className"
|
|
16
|
+
var _excluded = ["className"];
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -25,14 +25,11 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
25
25
|
|
|
26
26
|
function ActionButton(props) {
|
|
27
27
|
var className = props.className,
|
|
28
|
-
ghost = props.ghost,
|
|
29
28
|
rest = _objectWithoutProperties(props, _excluded);
|
|
30
29
|
|
|
31
30
|
return /*#__PURE__*/_react.default.createElement(_BaseButton.default, _extends({
|
|
32
31
|
buttonType: "action",
|
|
33
|
-
className: (0, _classnames.default)(className
|
|
34
|
-
'ffe-button--ghost': ghost
|
|
35
|
-
})
|
|
32
|
+
className: (0, _classnames.default)(className)
|
|
36
33
|
}, rest));
|
|
37
34
|
}
|
|
38
35
|
|
|
@@ -46,18 +43,12 @@ ActionButton.propTypes = {
|
|
|
46
43
|
/** Extra class names */
|
|
47
44
|
className: _propTypes.string,
|
|
48
45
|
|
|
49
|
-
/** Condensed modifier. Use in condensed designs */
|
|
50
|
-
condensed: _propTypes.bool,
|
|
51
|
-
|
|
52
46
|
/** Disable a button in certain situations */
|
|
53
47
|
disabled: _propTypes.bool,
|
|
54
48
|
|
|
55
49
|
/** The rendered element, like an `<a />` or `<Link />` */
|
|
56
50
|
element: (0, _propTypes.oneOfType)([_propTypes.func, _propTypes.string, _propTypes.elementType]),
|
|
57
51
|
|
|
58
|
-
/** Applies the ghost modifier if true. */
|
|
59
|
-
ghost: _propTypes.bool,
|
|
60
|
-
|
|
61
52
|
/** Ref-setting function, or ref created by useRef, passed to the button element */
|
|
62
53
|
innerRef: (0, _propTypes.oneOfType)([_propTypes.func, (0, _propTypes.shape)({
|
|
63
54
|
current: _propTypes.object
|
|
@@ -71,7 +62,4 @@ ActionButton.propTypes = {
|
|
|
71
62
|
|
|
72
63
|
/** Icon shown to the right of the label */
|
|
73
64
|
rightIcon: _propTypes.node
|
|
74
|
-
};
|
|
75
|
-
ActionButton.defaultProps = {
|
|
76
|
-
ghost: false
|
|
77
65
|
};
|
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", "
|
|
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,
|
|
@@ -85,9 +82,6 @@ BaseButton.propTypes = {
|
|
|
85
82
|
/** Extra class names */
|
|
86
83
|
className: _propTypes.string,
|
|
87
84
|
|
|
88
|
-
/** Condensed modifier. Use in condensed designs */
|
|
89
|
-
condensed: _propTypes.bool,
|
|
90
|
-
|
|
91
85
|
/** Disable a button in certain situations */
|
|
92
86
|
disabled: _propTypes.bool,
|
|
93
87
|
|
package/lib/PrimaryButton.js
CHANGED
|
@@ -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
|
|
package/lib/SecondaryButton.js
CHANGED
|
@@ -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
|
|
package/lib/ShortcutButton.js
CHANGED
|
@@ -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": "
|
|
3
|
+
"version": "16.0.1",
|
|
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": "
|
|
49
|
+
"gitHead": "c34e730c113b66c9c56b7a4f7283b145501a3849"
|
|
50
50
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -19,16 +19,13 @@ 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;
|
|
26
25
|
rightIcon?: React.ReactNode;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
export interface ActionButtonProps extends BaseButtonProps {
|
|
30
|
-
ghost?: boolean;
|
|
31
|
-
}
|
|
28
|
+
export interface ActionButtonProps extends BaseButtonProps {}
|
|
32
29
|
|
|
33
30
|
export interface BackButtonProps extends MinimalBaseButtonProps {
|
|
34
31
|
children?: React.ReactNode;
|
|
@@ -38,6 +35,7 @@ export interface ButtonGroupProps {
|
|
|
38
35
|
className?: string;
|
|
39
36
|
thin?: boolean;
|
|
40
37
|
inline?: boolean;
|
|
38
|
+
children: React.ReactNode;
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
export interface ExpandButtonProps extends MinimalBaseButtonProps {
|
|
@@ -62,14 +60,12 @@ export interface SecondaryButtonProps extends BaseButtonProps {}
|
|
|
62
60
|
|
|
63
61
|
export interface ShortcutButtonProps extends MinimalBaseButtonProps {
|
|
64
62
|
children?: React.ReactNode;
|
|
65
|
-
condensed?: boolean;
|
|
66
63
|
disabled?: boolean;
|
|
67
64
|
leftIcon?: React.ReactNode;
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
export interface TaskButtonProps extends MinimalBaseButtonProps {
|
|
71
68
|
children?: React.ReactNode;
|
|
72
|
-
condensed?: boolean;
|
|
73
69
|
disabled?: boolean;
|
|
74
70
|
icon: React.ReactNode;
|
|
75
71
|
}
|