@sb1/ffe-buttons-react 21.0.17 → 21.0.19
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 +1 -1
- package/es/BaseButton.js +5 -7
- package/es/ButtonGroup.js +1 -1
- package/es/ExpandButton.js +5 -7
- package/es/InlineBaseButton.js +3 -5
- package/es/InlineExpandButton.js +1 -1
- package/es/PrimaryButton.js +1 -1
- package/es/SecondaryButton.js +1 -1
- package/es/TaskButton.js +1 -1
- package/es/TertiaryButton.js +1 -1
- package/lib/ActionButton.js +1 -1
- package/lib/BaseButton.js +5 -7
- package/lib/ButtonGroup.js +1 -1
- package/lib/ExpandButton.js +5 -7
- package/lib/InlineBaseButton.js +3 -5
- package/lib/InlineExpandButton.js +1 -1
- package/lib/PrimaryButton.js +1 -1
- package/lib/SecondaryButton.js +1 -1
- package/lib/TaskButton.js +1 -1
- package/lib/TertiaryButton.js +1 -1
- package/package.json +7 -6
package/es/ActionButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["className", "leftIcon", "rightIcon"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, func, node, string, oneOfType, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import classNames from 'classnames';
|
package/es/BaseButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["ariaLoadingMessage", "buttonType", "children", "className", "element", "innerRef", "isLoading", "leftIcon", "rightIcon", "onClick"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, func, node, oneOf, oneOfType, string, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import classNames from 'classnames';
|
|
@@ -10,11 +10,13 @@ import classNames from 'classnames';
|
|
|
10
10
|
* Internal component
|
|
11
11
|
*/
|
|
12
12
|
var BaseButton = function BaseButton(props) {
|
|
13
|
-
var
|
|
13
|
+
var _props$ariaLoadingMes = props.ariaLoadingMessage,
|
|
14
|
+
ariaLoadingMessage = _props$ariaLoadingMes === void 0 ? 'Vennligst vent' : _props$ariaLoadingMes,
|
|
14
15
|
buttonType = props.buttonType,
|
|
15
16
|
children = props.children,
|
|
16
17
|
className = props.className,
|
|
17
|
-
|
|
18
|
+
_props$element = props.element,
|
|
19
|
+
Element = _props$element === void 0 ? 'button' : _props$element,
|
|
18
20
|
innerRef = props.innerRef,
|
|
19
21
|
isLoading = props.isLoading,
|
|
20
22
|
leftIcon = props.leftIcon,
|
|
@@ -80,8 +82,4 @@ BaseButton.propTypes = {
|
|
|
80
82
|
/** Called when button is clicked if not loading or disabled */
|
|
81
83
|
onClick: func
|
|
82
84
|
};
|
|
83
|
-
BaseButton.defaultProps = {
|
|
84
|
-
ariaLoadingMessage: 'Vennligst vent',
|
|
85
|
-
element: 'button'
|
|
86
|
-
};
|
|
87
85
|
export default BaseButton;
|
package/es/ButtonGroup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["className", "thin", "inline"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, string } from 'prop-types';
|
|
7
7
|
import classNames from 'classnames';
|
package/es/ExpandButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["children", "className", "closeLabel", "element", "innerRef", "isExpanded"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, func, oneOfType, string, node, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import classNames from 'classnames';
|
|
@@ -9,8 +9,10 @@ import { Icon } from '@sb1/ffe-icons-react';
|
|
|
9
9
|
var ExpandButton = function ExpandButton(props) {
|
|
10
10
|
var children = props.children,
|
|
11
11
|
className = props.className,
|
|
12
|
-
closeLabel = props.closeLabel,
|
|
13
|
-
|
|
12
|
+
_props$closeLabel = props.closeLabel,
|
|
13
|
+
closeLabel = _props$closeLabel === void 0 ? 'Lukk' : _props$closeLabel,
|
|
14
|
+
_props$element = props.element,
|
|
15
|
+
Element = _props$element === void 0 ? 'button' : _props$element,
|
|
14
16
|
innerRef = props.innerRef,
|
|
15
17
|
isExpanded = props.isExpanded,
|
|
16
18
|
rest = _objectWithoutProperties(props, _excluded);
|
|
@@ -46,8 +48,4 @@ ExpandButton.propTypes = {
|
|
|
46
48
|
/** Use to listen for clicks and toggle the `isExpanded` property together with whatever it is you're expanding. */
|
|
47
49
|
onClick: func.isRequired
|
|
48
50
|
};
|
|
49
|
-
ExpandButton.defaultProps = {
|
|
50
|
-
closeLabel: 'Lukk',
|
|
51
|
-
element: 'button'
|
|
52
|
-
};
|
|
53
51
|
export default ExpandButton;
|
package/es/InlineBaseButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["buttonType", "children", "className", "element", "innerRef", "leftIcon", "rightIcon"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { func, string, oneOf, oneOfType, node, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import classNames from 'classnames';
|
|
@@ -14,7 +14,8 @@ var InlineBaseButton = function InlineBaseButton(props) {
|
|
|
14
14
|
var buttonType = props.buttonType,
|
|
15
15
|
children = props.children,
|
|
16
16
|
className = props.className,
|
|
17
|
-
|
|
17
|
+
_props$element = props.element,
|
|
18
|
+
Element = _props$element === void 0 ? 'button' : _props$element,
|
|
18
19
|
innerRef = props.innerRef,
|
|
19
20
|
leftIcon = props.leftIcon,
|
|
20
21
|
rightIcon = props.rightIcon,
|
|
@@ -53,7 +54,4 @@ InlineBaseButton.propTypes = {
|
|
|
53
54
|
/** Icon shown to the right of the label */
|
|
54
55
|
rightIcon: node
|
|
55
56
|
};
|
|
56
|
-
InlineBaseButton.defaultProps = {
|
|
57
|
-
element: 'button'
|
|
58
|
-
};
|
|
59
57
|
export default InlineBaseButton;
|
package/es/InlineExpandButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["isExpanded", "className"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, func, node, oneOfType, object, shape, string } from 'prop-types';
|
|
7
7
|
import { Icon } from '@sb1/ffe-icons-react';
|
package/es/PrimaryButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["leftIcon", "rightIcon"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, func, oneOfType, node, string, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import Button from './BaseButton';
|
package/es/SecondaryButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["leftIcon", "rightIcon"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, func, oneOfType, string, node, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import Button from './BaseButton';
|
package/es/TaskButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["icon"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { bool, func, node, string, oneOfType, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import Button from './BaseButton';
|
package/es/TertiaryButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["leftIcon", "rightIcon"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { func, node, oneOfType, string, object, shape, elementType } from 'prop-types';
|
|
7
7
|
import InlineButton from './InlineBaseButton';
|
package/lib/ActionButton.js
CHANGED
|
@@ -12,7 +12,7 @@ var _excluded = ["className", "leftIcon", "rightIcon"];
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
14
14
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
function ActionButton(props) {
|
|
17
17
|
var className = props.className,
|
|
18
18
|
leftIcon = props.leftIcon,
|
package/lib/BaseButton.js
CHANGED
|
@@ -11,16 +11,18 @@ var _excluded = ["ariaLoadingMessage", "buttonType", "children", "className", "e
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
/**
|
|
16
16
|
* Internal component
|
|
17
17
|
*/
|
|
18
18
|
var BaseButton = function BaseButton(props) {
|
|
19
|
-
var
|
|
19
|
+
var _props$ariaLoadingMes = props.ariaLoadingMessage,
|
|
20
|
+
ariaLoadingMessage = _props$ariaLoadingMes === void 0 ? 'Vennligst vent' : _props$ariaLoadingMes,
|
|
20
21
|
buttonType = props.buttonType,
|
|
21
22
|
children = props.children,
|
|
22
23
|
className = props.className,
|
|
23
|
-
|
|
24
|
+
_props$element = props.element,
|
|
25
|
+
Element = _props$element === void 0 ? 'button' : _props$element,
|
|
24
26
|
innerRef = props.innerRef,
|
|
25
27
|
isLoading = props.isLoading,
|
|
26
28
|
leftIcon = props.leftIcon,
|
|
@@ -86,8 +88,4 @@ BaseButton.propTypes = {
|
|
|
86
88
|
/** Called when button is clicked if not loading or disabled */
|
|
87
89
|
onClick: _propTypes.func
|
|
88
90
|
};
|
|
89
|
-
BaseButton.defaultProps = {
|
|
90
|
-
ariaLoadingMessage: 'Vennligst vent',
|
|
91
|
-
element: 'button'
|
|
92
|
-
};
|
|
93
91
|
var _default = exports.default = BaseButton;
|
package/lib/ButtonGroup.js
CHANGED
|
@@ -11,7 +11,7 @@ var _excluded = ["className", "thin", "inline"];
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
var ButtonGroup = function ButtonGroup(_ref) {
|
|
16
16
|
var className = _ref.className,
|
|
17
17
|
thin = _ref.thin,
|
package/lib/ExpandButton.js
CHANGED
|
@@ -12,12 +12,14 @@ var _excluded = ["children", "className", "closeLabel", "element", "innerRef", "
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
14
14
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
var ExpandButton = function ExpandButton(props) {
|
|
17
17
|
var children = props.children,
|
|
18
18
|
className = props.className,
|
|
19
|
-
closeLabel = props.closeLabel,
|
|
20
|
-
|
|
19
|
+
_props$closeLabel = props.closeLabel,
|
|
20
|
+
closeLabel = _props$closeLabel === void 0 ? 'Lukk' : _props$closeLabel,
|
|
21
|
+
_props$element = props.element,
|
|
22
|
+
Element = _props$element === void 0 ? 'button' : _props$element,
|
|
21
23
|
innerRef = props.innerRef,
|
|
22
24
|
isExpanded = props.isExpanded,
|
|
23
25
|
rest = _objectWithoutProperties(props, _excluded);
|
|
@@ -53,8 +55,4 @@ ExpandButton.propTypes = {
|
|
|
53
55
|
/** Use to listen for clicks and toggle the `isExpanded` property together with whatever it is you're expanding. */
|
|
54
56
|
onClick: _propTypes.func.isRequired
|
|
55
57
|
};
|
|
56
|
-
ExpandButton.defaultProps = {
|
|
57
|
-
closeLabel: 'Lukk',
|
|
58
|
-
element: 'button'
|
|
59
|
-
};
|
|
60
58
|
var _default = exports.default = ExpandButton;
|
package/lib/InlineBaseButton.js
CHANGED
|
@@ -11,7 +11,7 @@ var _excluded = ["buttonType", "children", "className", "element", "innerRef", "
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
/**
|
|
16
16
|
* Internal component
|
|
17
17
|
* @ignore
|
|
@@ -20,7 +20,8 @@ var InlineBaseButton = function InlineBaseButton(props) {
|
|
|
20
20
|
var buttonType = props.buttonType,
|
|
21
21
|
children = props.children,
|
|
22
22
|
className = props.className,
|
|
23
|
-
|
|
23
|
+
_props$element = props.element,
|
|
24
|
+
Element = _props$element === void 0 ? 'button' : _props$element,
|
|
24
25
|
innerRef = props.innerRef,
|
|
25
26
|
leftIcon = props.leftIcon,
|
|
26
27
|
rightIcon = props.rightIcon,
|
|
@@ -59,7 +60,4 @@ InlineBaseButton.propTypes = {
|
|
|
59
60
|
/** Icon shown to the right of the label */
|
|
60
61
|
rightIcon: _propTypes.node
|
|
61
62
|
};
|
|
62
|
-
InlineBaseButton.defaultProps = {
|
|
63
|
-
element: 'button'
|
|
64
|
-
};
|
|
65
63
|
var _default = exports.default = InlineBaseButton;
|
|
@@ -13,7 +13,7 @@ var _excluded = ["isExpanded", "className"];
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
15
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
16
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
var InlineExpandButton = function InlineExpandButton(props) {
|
|
18
18
|
var isExpanded = props.isExpanded,
|
|
19
19
|
className = props.className,
|
package/lib/PrimaryButton.js
CHANGED
|
@@ -11,7 +11,7 @@ var _excluded = ["leftIcon", "rightIcon"];
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
var PrimaryButton = function PrimaryButton(props) {
|
|
16
16
|
var leftIcon = props.leftIcon,
|
|
17
17
|
rightIcon = props.rightIcon,
|
package/lib/SecondaryButton.js
CHANGED
|
@@ -11,7 +11,7 @@ var _excluded = ["leftIcon", "rightIcon"];
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
var SecondaryButton = function SecondaryButton(props) {
|
|
16
16
|
var leftIcon = props.leftIcon,
|
|
17
17
|
rightIcon = props.rightIcon,
|
package/lib/TaskButton.js
CHANGED
|
@@ -11,7 +11,7 @@ var _excluded = ["icon"];
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
var TaskButton = function TaskButton(_ref) {
|
|
16
16
|
var icon = _ref.icon,
|
|
17
17
|
rest = _objectWithoutProperties(_ref, _excluded);
|
package/lib/TertiaryButton.js
CHANGED
|
@@ -11,7 +11,7 @@ var _excluded = ["leftIcon", "rightIcon"];
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
var TertiaryButton = function TertiaryButton(props) {
|
|
16
16
|
var leftIcon = props.leftIcon,
|
|
17
17
|
rightIcon = props.rightIcon,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-buttons-react",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.19",
|
|
4
4
|
"description": "React implementation of ffe-buttons",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -24,18 +24,19 @@
|
|
|
24
24
|
"build": "ffe-buildtool babel",
|
|
25
25
|
"watch": "ffe-buildtool babel-watch",
|
|
26
26
|
"lint": "eslint src",
|
|
27
|
+
"lint:fix": "eslint src --fix",
|
|
27
28
|
"test": "ffe-buildtool jest",
|
|
28
29
|
"test:watch": "ffe-buildtool jest --watch"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@sb1/ffe-buttons": "^18.0.
|
|
32
|
-
"@sb1/ffe-icons-react": "^9.0.
|
|
32
|
+
"@sb1/ffe-buttons": "^18.0.19",
|
|
33
|
+
"@sb1/ffe-icons-react": "^9.0.9",
|
|
33
34
|
"classnames": "^2.3.1",
|
|
34
35
|
"prop-types": "^15.7.2"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@sb1/ffe-buildtool": "^0.5.
|
|
38
|
-
"eslint": "^
|
|
38
|
+
"@sb1/ffe-buildtool": "^0.5.2",
|
|
39
|
+
"eslint": "^8.57.0",
|
|
39
40
|
"react": "^16.9.0",
|
|
40
41
|
"react-collapse": "^4.0.3",
|
|
41
42
|
"react-dom": "^16.9.0"
|
|
@@ -46,5 +47,5 @@
|
|
|
46
47
|
"publishConfig": {
|
|
47
48
|
"access": "public"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "c2e7c509b580bc205ca92d91b7e2e2c0503a0087"
|
|
50
51
|
}
|