@sb1/ffe-core-react 5.0.1 → 5.0.3
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/Wave.js +6 -4
- package/lib/Wave.js +6 -4
- package/package.json +3 -3
- package/types/index.d.ts +2 -2
package/es/Wave.js
CHANGED
|
@@ -2,6 +2,8 @@ var _excluded = ["waveHeight", "position", "flip", "color", "darkmodeColor", "ch
|
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
5
7
|
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; }
|
|
6
8
|
|
|
7
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -10,6 +12,8 @@ import React from 'react';
|
|
|
10
12
|
import { string, bool, oneOf, node } from 'prop-types';
|
|
11
13
|
import classNames from 'classnames';
|
|
12
14
|
export default function Wave(props) {
|
|
15
|
+
var _classNames;
|
|
16
|
+
|
|
13
17
|
var waveHeight = props.waveHeight,
|
|
14
18
|
position = props.position,
|
|
15
19
|
flip = props.flip,
|
|
@@ -19,9 +23,7 @@ export default function Wave(props) {
|
|
|
19
23
|
rest = _objectWithoutProperties(props, _excluded);
|
|
20
24
|
|
|
21
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: classNames('ffe-wave', "ffe-wave--".concat(waveHeight), "ffe-wave--bg-".concat(color), "ffe-wave--dm-bg-".concat(darkmodeColor),
|
|
23
|
-
'ffe-wave--flip': flip
|
|
24
|
-
})
|
|
26
|
+
className: classNames('ffe-wave', "ffe-wave--".concat(waveHeight), "ffe-wave--bg-".concat(color), (_classNames = {}, _defineProperty(_classNames, "ffe-wave--dm-bg-".concat(darkmodeColor), darkmodeColor), _defineProperty(_classNames, 'ffe-wave--flip', flip), _classNames))
|
|
25
27
|
}, children ? /*#__PURE__*/React.createElement("div", {
|
|
26
28
|
className: "ffe-wave__content"
|
|
27
29
|
}, children) : null, /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -47,6 +49,6 @@ Wave.propTypes = {
|
|
|
47
49
|
color: oneOf(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']).isRequired,
|
|
48
50
|
|
|
49
51
|
/** Set the background color in darkmode */
|
|
50
|
-
darkmodeColor: oneOf(['svart', 'natt'])
|
|
52
|
+
darkmodeColor: oneOf(['svart', 'natt']),
|
|
51
53
|
children: node
|
|
52
54
|
};
|
package/lib/Wave.js
CHANGED
|
@@ -17,11 +17,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
|
|
18
18
|
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); }
|
|
19
19
|
|
|
20
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
|
|
20
22
|
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; }
|
|
21
23
|
|
|
22
24
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
25
|
|
|
24
26
|
function Wave(props) {
|
|
27
|
+
var _classNames;
|
|
28
|
+
|
|
25
29
|
var waveHeight = props.waveHeight,
|
|
26
30
|
position = props.position,
|
|
27
31
|
flip = props.flip,
|
|
@@ -31,9 +35,7 @@ function Wave(props) {
|
|
|
31
35
|
rest = _objectWithoutProperties(props, _excluded);
|
|
32
36
|
|
|
33
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
className: (0, _classnames.default)('ffe-wave', "ffe-wave--".concat(waveHeight), "ffe-wave--bg-".concat(color), "ffe-wave--dm-bg-".concat(darkmodeColor),
|
|
35
|
-
'ffe-wave--flip': flip
|
|
36
|
-
})
|
|
38
|
+
className: (0, _classnames.default)('ffe-wave', "ffe-wave--".concat(waveHeight), "ffe-wave--bg-".concat(color), (_classNames = {}, _defineProperty(_classNames, "ffe-wave--dm-bg-".concat(darkmodeColor), darkmodeColor), _defineProperty(_classNames, 'ffe-wave--flip', flip), _classNames))
|
|
37
39
|
}, children ? /*#__PURE__*/_react.default.createElement("div", {
|
|
38
40
|
className: "ffe-wave__content"
|
|
39
41
|
}, children) : null, /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
@@ -60,6 +62,6 @@ Wave.propTypes = {
|
|
|
60
62
|
color: (0, _propTypes.oneOf)(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']).isRequired,
|
|
61
63
|
|
|
62
64
|
/** Set the background color in darkmode */
|
|
63
|
-
darkmodeColor: (0, _propTypes.oneOf)(['svart', 'natt'])
|
|
65
|
+
darkmodeColor: (0, _propTypes.oneOf)(['svart', 'natt']),
|
|
64
66
|
children: _propTypes.node
|
|
65
67
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-core-react",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "React components for ffe-core components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prop-types": "^15.7.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@sb1/ffe-buildtool": "^0.4.
|
|
35
|
+
"@sb1/ffe-buildtool": "^0.4.1",
|
|
36
36
|
"eslint": "^5.9.0",
|
|
37
37
|
"react": "^16.9.0",
|
|
38
38
|
"react-dom": "^16.9.0"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "6b569f310458cf252746dc4d67068201eb8267e7"
|
|
48
48
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ export interface WaveProps {
|
|
|
61
61
|
| 'vann'
|
|
62
62
|
| 'vann-30'
|
|
63
63
|
| 'fjell';
|
|
64
|
-
darkmodeColor
|
|
65
|
-
children
|
|
64
|
+
darkmodeColor?: 'svart' | 'natt';
|
|
65
|
+
children?: React.ReactNode;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
declare class DividerLine extends React.Component<DividerLineProps, any> {}
|