@sb1/ffe-core-react 5.0.2 → 6.0.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/es/Wave.js +19 -25
- package/es/typography/DividerLine.js +1 -6
- package/es/typography/EmphasizedText.js +2 -7
- package/es/typography/Heading.js +8 -17
- package/es/typography/LinkText.js +3 -11
- package/es/typography/MicroText.js +2 -7
- package/es/typography/Paragraph.js +8 -24
- package/es/typography/PreformattedText.js +2 -7
- package/es/typography/SmallText.js +2 -9
- package/es/typography/StrongText.js +2 -7
- package/lib/Wave.js +19 -31
- package/lib/index.js +0 -12
- package/lib/typography/DividerLine.js +1 -12
- package/lib/typography/EmphasizedText.js +2 -13
- package/lib/typography/Heading.js +8 -21
- package/lib/typography/LinkText.js +3 -15
- package/lib/typography/MicroText.js +2 -13
- package/lib/typography/Paragraph.js +8 -30
- package/lib/typography/PreformattedText.js +2 -13
- package/lib/typography/SmallText.js +2 -13
- package/lib/typography/StrongText.js +2 -13
- package/package.json +46 -46
- package/types/index.d.ts +13 -3
package/es/Wave.js
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
var _excluded = ["
|
|
2
|
-
|
|
1
|
+
var _excluded = ["position", "flip", "color", "darkmodeColor", "bgColor", "bgDarkmodeColor", "children"];
|
|
3
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); }
|
|
4
|
-
|
|
3
|
+
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; }
|
|
5
4
|
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
|
-
|
|
7
5
|
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; }
|
|
8
|
-
|
|
9
6
|
import React from 'react';
|
|
10
7
|
import { string, bool, oneOf, node } from 'prop-types';
|
|
11
8
|
import classNames from 'classnames';
|
|
12
9
|
export default function Wave(props) {
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
var _classNames, _classNames2;
|
|
11
|
+
var position = props.position,
|
|
12
|
+
flip = props.flip,
|
|
13
|
+
color = props.color,
|
|
14
|
+
darkmodeColor = props.darkmodeColor,
|
|
15
|
+
bgColor = props.bgColor,
|
|
16
|
+
bgDarkmodeColor = props.bgDarkmodeColor,
|
|
17
|
+
children = props.children,
|
|
18
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
21
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: classNames('ffe-wave',
|
|
23
|
-
'ffe-wave--flip': flip
|
|
24
|
-
})
|
|
20
|
+
className: classNames('ffe-wave', (_classNames = {}, _defineProperty(_classNames, "ffe-wave--bg-".concat(bgColor), bgColor), _defineProperty(_classNames, "ffe-wave--dm-bg-".concat(bgDarkmodeColor), bgDarkmodeColor), _classNames))
|
|
25
21
|
}, children ? /*#__PURE__*/React.createElement("div", {
|
|
26
22
|
className: "ffe-wave__content"
|
|
27
23
|
}, children) : null, /*#__PURE__*/React.createElement("div", _extends({
|
|
28
|
-
className:
|
|
24
|
+
className: classNames('ffe-wave__wave', "ffe-wave--bg-".concat(color), (_classNames2 = {}, _defineProperty(_classNames2, "ffe-wave--dm-bg-".concat(darkmodeColor), darkmodeColor), _defineProperty(_classNames2, 'ffe-wave__wave--flip', flip), _classNames2)),
|
|
29
25
|
"aria-hidden": "true",
|
|
30
26
|
style: {
|
|
31
27
|
maskPosition: position,
|
|
@@ -34,19 +30,17 @@ export default function Wave(props) {
|
|
|
34
30
|
}, rest)));
|
|
35
31
|
}
|
|
36
32
|
Wave.propTypes = {
|
|
37
|
-
/** Choose between small, medium and large intensity of the wave */
|
|
38
|
-
waveHeight: oneOf(['small', 'medium', 'large']).isRequired,
|
|
39
|
-
|
|
40
33
|
/** Sets the mask-position property, setting a px/rem value will move the starting position of the wave */
|
|
41
34
|
position: string,
|
|
42
|
-
|
|
43
35
|
/** Rotate the wave 180 degrees :*/
|
|
44
36
|
flip: bool,
|
|
45
|
-
|
|
46
37
|
/** Sets the color of the wave. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
|
|
47
38
|
color: oneOf(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']).isRequired,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
/** Set the background color of the wave container. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
|
|
40
|
+
bgColor: oneOf(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']),
|
|
41
|
+
/** Set the wave color in darkmode */
|
|
42
|
+
darkmodeColor: oneOf(['svart', 'natt']),
|
|
43
|
+
/** Set the background color of wave container in darkmode */
|
|
44
|
+
bgDarkmodeColor: oneOf(['svart', 'natt']),
|
|
51
45
|
children: node
|
|
52
46
|
};
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
var _excluded = ["className"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { string } from 'prop-types';
|
|
11
7
|
import classNames from 'classnames';
|
|
12
8
|
export default function DividerLine(props) {
|
|
13
9
|
var className = props.className,
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
16
11
|
return /*#__PURE__*/React.createElement("hr", _extends({
|
|
17
12
|
className: classNames('ffe-divider-line', className),
|
|
18
13
|
"aria-hidden": "true",
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
var _excluded = ["children", "className"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { node, string } from 'prop-types';
|
|
11
7
|
import classNames from 'classnames';
|
|
12
8
|
export default function EmphasizedText(props) {
|
|
13
9
|
var children = props.children,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
className = props.className,
|
|
11
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
17
12
|
return /*#__PURE__*/React.createElement("em", _extends({
|
|
18
13
|
className: classNames('ffe-em-text', className)
|
|
19
14
|
}, rest), children);
|
package/es/typography/Heading.js
CHANGED
|
@@ -1,36 +1,28 @@
|
|
|
1
1
|
var _excluded = ["children", "className", "error", "inline", "noMargin", "withBorder", "lookLike", "textCenter"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
3
|
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
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
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
|
-
|
|
11
6
|
import React from 'react';
|
|
12
7
|
import classNames from 'classnames';
|
|
13
8
|
import { bool, oneOf, node, string } from 'prop-types';
|
|
14
|
-
|
|
15
9
|
var makeHeading = function makeHeading(level) {
|
|
16
10
|
var Heading = function Heading(props) {
|
|
17
11
|
var children = props.children,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
className = props.className,
|
|
13
|
+
error = props.error,
|
|
14
|
+
inline = props.inline,
|
|
15
|
+
noMargin = props.noMargin,
|
|
16
|
+
withBorder = props.withBorder,
|
|
17
|
+
lookLike = props.lookLike,
|
|
18
|
+
textCenter = props.textCenter,
|
|
19
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
27
20
|
var H = "h".concat(level);
|
|
28
21
|
var headingClass = "ffe-h".concat(lookLike ? lookLike : level);
|
|
29
22
|
return /*#__PURE__*/React.createElement(H, _extends({}, rest, {
|
|
30
23
|
className: classNames(headingClass, _defineProperty({}, "".concat(headingClass, "--error"), error), _defineProperty({}, "".concat(headingClass, "--inline"), inline), _defineProperty({}, "".concat(headingClass, "--no-margin"), noMargin), _defineProperty({}, "".concat(headingClass, "--with-border"), withBorder), _defineProperty({}, "".concat(headingClass, "--text-center"), textCenter), className)
|
|
31
24
|
}), children);
|
|
32
25
|
};
|
|
33
|
-
|
|
34
26
|
Heading.propTypes = {
|
|
35
27
|
children: node.isRequired,
|
|
36
28
|
className: string,
|
|
@@ -43,7 +35,6 @@ var makeHeading = function makeHeading(level) {
|
|
|
43
35
|
};
|
|
44
36
|
return Heading;
|
|
45
37
|
};
|
|
46
|
-
|
|
47
38
|
export var Heading1 = makeHeading(1);
|
|
48
39
|
export var Heading2 = makeHeading(2);
|
|
49
40
|
export var Heading3 = makeHeading(3);
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
var _excluded = ["className", "element", "underline"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { bool, func, node, oneOfType, string, elementType } from 'prop-types';
|
|
11
7
|
import classNames from 'classnames';
|
|
12
|
-
|
|
13
8
|
var LinkText = function LinkText(props) {
|
|
14
9
|
var className = props.className,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
Element = props.element,
|
|
11
|
+
underline = props.underline,
|
|
12
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
19
13
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
20
14
|
className: classNames('ffe-link-text', {
|
|
21
15
|
'ffe-link-text--no-underline': !underline
|
|
22
16
|
}, className)
|
|
23
17
|
}, rest));
|
|
24
18
|
};
|
|
25
|
-
|
|
26
19
|
LinkText.defaultProps = {
|
|
27
20
|
element: 'a',
|
|
28
21
|
underline: true
|
|
@@ -30,7 +23,6 @@ LinkText.defaultProps = {
|
|
|
30
23
|
LinkText.propTypes = {
|
|
31
24
|
children: node.isRequired,
|
|
32
25
|
className: string,
|
|
33
|
-
|
|
34
26
|
/** The rendered element, like a `react-router` `<Link />` */
|
|
35
27
|
element: oneOfType([func, string, elementType]),
|
|
36
28
|
underline: bool
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
var _excluded = ["children", "className"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { node, string } from 'prop-types';
|
|
11
7
|
import classNames from 'classnames';
|
|
12
8
|
export default function MicroText(props) {
|
|
13
9
|
var children = props.children,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
className = props.className,
|
|
11
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
17
12
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
18
13
|
className: classNames('ffe-micro-text', className)
|
|
19
14
|
}, rest), children);
|
|
@@ -1,39 +1,27 @@
|
|
|
1
1
|
var _excluded = ["children", "className", "lead", "subLead", "textCenter", "textLeft"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
|
|
7
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
-
|
|
9
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
|
|
11
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
-
|
|
13
7
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
-
|
|
15
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
|
|
17
9
|
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; }
|
|
18
|
-
|
|
19
10
|
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; }
|
|
20
|
-
|
|
21
11
|
import React from 'react';
|
|
22
12
|
import { bool, node, string } from 'prop-types';
|
|
23
13
|
import classNames from 'classnames';
|
|
24
14
|
export default function Paragraph(props) {
|
|
25
15
|
var children = props.children,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
className = props.className,
|
|
17
|
+
lead = props.lead,
|
|
18
|
+
subLead = props.subLead,
|
|
19
|
+
textCenter = props.textCenter,
|
|
20
|
+
textLeft = props.textLeft,
|
|
21
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
33
22
|
var _filter = [lead && 'ffe-lead-paragraph', subLead && 'ffe-sub-lead-paragraph', 'ffe-body-paragraph'].filter(Boolean),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
_filter2 = _slicedToArray(_filter, 1),
|
|
24
|
+
mainClass = _filter2[0];
|
|
37
25
|
return /*#__PURE__*/React.createElement("p", _extends({
|
|
38
26
|
className: classNames(mainClass, {
|
|
39
27
|
'ffe-body-paragraph--text-center': textCenter
|
|
@@ -45,16 +33,12 @@ export default function Paragraph(props) {
|
|
|
45
33
|
Paragraph.propTypes = {
|
|
46
34
|
children: node.isRequired,
|
|
47
35
|
className: string,
|
|
48
|
-
|
|
49
36
|
/** Makes this paragraph a lead paragraph, typically used directly below a heading. */
|
|
50
37
|
lead: bool,
|
|
51
|
-
|
|
52
38
|
/** Makes this paragraph a sub-lead paragraph, typically used directly below a lead paragraph. */
|
|
53
39
|
subLead: bool,
|
|
54
|
-
|
|
55
40
|
/** Use if text alignment should override that of its container. */
|
|
56
41
|
textCenter: bool,
|
|
57
|
-
|
|
58
42
|
/** Use if text alignment should override that of its container. */
|
|
59
43
|
textLeft: bool
|
|
60
44
|
};
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
var _excluded = ["children", "className"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { node, string } from 'prop-types';
|
|
11
7
|
import classNames from 'classnames';
|
|
12
8
|
export default function PreformattedText(props) {
|
|
13
9
|
var children = props.children,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
className = props.className,
|
|
11
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
17
12
|
return /*#__PURE__*/React.createElement("pre", _extends({
|
|
18
13
|
className: classNames('ffe-pre-text', className)
|
|
19
14
|
}, rest), children);
|
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
var _excluded = ["className", "element"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { oneOfType, string, func, elementType } from 'prop-types';
|
|
11
7
|
import classNames from 'classnames';
|
|
12
|
-
|
|
13
8
|
var SmallText = function SmallText(_ref) {
|
|
14
9
|
var className = _ref.className,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
Element = _ref.element,
|
|
11
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
18
12
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
19
13
|
className: classNames('ffe-small-text', className)
|
|
20
14
|
}, rest));
|
|
21
15
|
};
|
|
22
|
-
|
|
23
16
|
SmallText.defaultProps = {
|
|
24
17
|
element: 'span'
|
|
25
18
|
};
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
var _excluded = ["children", "className"];
|
|
2
|
-
|
|
3
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); }
|
|
4
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { node, string } from 'prop-types';
|
|
11
7
|
import classNames from 'classnames';
|
|
12
8
|
export default function StrongText(props) {
|
|
13
9
|
var children = props.children,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
className = props.className,
|
|
11
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
17
12
|
return /*#__PURE__*/React.createElement("strong", _extends({
|
|
18
13
|
className: classNames('ffe-strong-text', className)
|
|
19
14
|
}, rest), children);
|
package/lib/Wave.js
CHANGED
|
@@ -4,40 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = Wave;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _excluded = ["waveHeight", "position", "flip", "color", "darkmodeColor", "children"];
|
|
15
|
-
|
|
10
|
+
var _excluded = ["position", "flip", "color", "darkmodeColor", "bgColor", "bgDarkmodeColor", "children"];
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
13
|
+
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; }
|
|
20
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; }
|
|
21
|
-
|
|
22
15
|
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
|
-
|
|
24
16
|
function Wave(props) {
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
var _classNames, _classNames2;
|
|
18
|
+
var position = props.position,
|
|
19
|
+
flip = props.flip,
|
|
20
|
+
color = props.color,
|
|
21
|
+
darkmodeColor = props.darkmodeColor,
|
|
22
|
+
bgColor = props.bgColor,
|
|
23
|
+
bgDarkmodeColor = props.bgDarkmodeColor,
|
|
24
|
+
children = props.children,
|
|
25
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
33
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
className: (0, _classnames.default)('ffe-wave',
|
|
35
|
-
'ffe-wave--flip': flip
|
|
36
|
-
})
|
|
27
|
+
className: (0, _classnames.default)('ffe-wave', (_classNames = {}, _defineProperty(_classNames, "ffe-wave--bg-".concat(bgColor), bgColor), _defineProperty(_classNames, "ffe-wave--dm-bg-".concat(bgDarkmodeColor), bgDarkmodeColor), _classNames))
|
|
37
28
|
}, children ? /*#__PURE__*/_react.default.createElement("div", {
|
|
38
29
|
className: "ffe-wave__content"
|
|
39
30
|
}, children) : null, /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
40
|
-
className:
|
|
31
|
+
className: (0, _classnames.default)('ffe-wave__wave', "ffe-wave--bg-".concat(color), (_classNames2 = {}, _defineProperty(_classNames2, "ffe-wave--dm-bg-".concat(darkmodeColor), darkmodeColor), _defineProperty(_classNames2, 'ffe-wave__wave--flip', flip), _classNames2)),
|
|
41
32
|
"aria-hidden": "true",
|
|
42
33
|
style: {
|
|
43
34
|
maskPosition: position,
|
|
@@ -45,21 +36,18 @@ function Wave(props) {
|
|
|
45
36
|
}
|
|
46
37
|
}, rest)));
|
|
47
38
|
}
|
|
48
|
-
|
|
49
39
|
Wave.propTypes = {
|
|
50
|
-
/** Choose between small, medium and large intensity of the wave */
|
|
51
|
-
waveHeight: (0, _propTypes.oneOf)(['small', 'medium', 'large']).isRequired,
|
|
52
|
-
|
|
53
40
|
/** Sets the mask-position property, setting a px/rem value will move the starting position of the wave */
|
|
54
41
|
position: _propTypes.string,
|
|
55
|
-
|
|
56
42
|
/** Rotate the wave 180 degrees :*/
|
|
57
43
|
flip: _propTypes.bool,
|
|
58
|
-
|
|
59
44
|
/** Sets the color of the wave. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
|
|
60
45
|
color: (0, _propTypes.oneOf)(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']).isRequired,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
/** Set the background color of the wave container. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
|
|
47
|
+
bgColor: (0, _propTypes.oneOf)(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']),
|
|
48
|
+
/** Set the wave color in darkmode */
|
|
49
|
+
darkmodeColor: (0, _propTypes.oneOf)(['svart', 'natt']),
|
|
50
|
+
/** Set the background color of wave container in darkmode */
|
|
51
|
+
bgDarkmodeColor: (0, _propTypes.oneOf)(['svart', 'natt']),
|
|
64
52
|
children: _propTypes.node
|
|
65
53
|
};
|
package/lib/index.js
CHANGED
|
@@ -68,13 +68,9 @@ Object.defineProperty(exports, "Wave", {
|
|
|
68
68
|
return _Wave.default;
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
|
|
72
71
|
var _DividerLine = _interopRequireDefault(require("./typography/DividerLine"));
|
|
73
|
-
|
|
74
72
|
var _EmphasizedText = _interopRequireDefault(require("./typography/EmphasizedText"));
|
|
75
|
-
|
|
76
73
|
var _Heading = require("./typography/Heading");
|
|
77
|
-
|
|
78
74
|
Object.keys(_Heading).forEach(function (key) {
|
|
79
75
|
if (key === "default" || key === "__esModule") return;
|
|
80
76
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -86,19 +82,11 @@ Object.keys(_Heading).forEach(function (key) {
|
|
|
86
82
|
}
|
|
87
83
|
});
|
|
88
84
|
});
|
|
89
|
-
|
|
90
85
|
var _LinkText = _interopRequireDefault(require("./typography/LinkText"));
|
|
91
|
-
|
|
92
86
|
var _MicroText = _interopRequireDefault(require("./typography/MicroText"));
|
|
93
|
-
|
|
94
87
|
var _Paragraph = _interopRequireDefault(require("./typography/Paragraph"));
|
|
95
|
-
|
|
96
88
|
var _PreformattedText = _interopRequireDefault(require("./typography/PreformattedText"));
|
|
97
|
-
|
|
98
89
|
var _SmallText = _interopRequireDefault(require("./typography/SmallText"));
|
|
99
|
-
|
|
100
90
|
var _StrongText = _interopRequireDefault(require("./typography/StrongText"));
|
|
101
|
-
|
|
102
91
|
var _Wave = _interopRequireDefault(require("./Wave"));
|
|
103
|
-
|
|
104
92
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,34 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = DividerLine;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["className"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
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
|
-
|
|
24
15
|
function DividerLine(props) {
|
|
25
16
|
var className = props.className,
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
28
18
|
return /*#__PURE__*/_react.default.createElement("hr", _extends({
|
|
29
19
|
className: (0, _classnames.default)('ffe-divider-line', className),
|
|
30
20
|
"aria-hidden": "true",
|
|
31
21
|
role: "presentation"
|
|
32
22
|
}, rest));
|
|
33
23
|
}
|
|
34
|
-
|
|
35
24
|
DividerLine.propTypes = {
|
|
36
25
|
className: _propTypes.string
|
|
37
26
|
};
|
|
@@ -4,33 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = EmphasizedText;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["children", "className"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
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
|
-
|
|
24
15
|
function EmphasizedText(props) {
|
|
25
16
|
var children = props.children,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
className = props.className,
|
|
18
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
29
19
|
return /*#__PURE__*/_react.default.createElement("em", _extends({
|
|
30
20
|
className: (0, _classnames.default)('ffe-em-text', className)
|
|
31
21
|
}, rest), children);
|
|
32
22
|
}
|
|
33
|
-
|
|
34
23
|
EmphasizedText.propTypes = {
|
|
35
24
|
children: _propTypes.node.isRequired,
|
|
36
25
|
className: _propTypes.string
|
|
@@ -4,44 +4,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Heading6 = exports.Heading5 = exports.Heading4 = exports.Heading3 = exports.Heading2 = exports.Heading1 = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = require("prop-types");
|
|
13
|
-
|
|
14
10
|
var _excluded = ["children", "className", "error", "inline", "noMargin", "withBorder", "lookLike", "textCenter"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
13
|
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
|
-
|
|
22
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; }
|
|
23
|
-
|
|
24
15
|
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; }
|
|
25
|
-
|
|
26
16
|
var makeHeading = function makeHeading(level) {
|
|
27
17
|
var Heading = function Heading(props) {
|
|
28
18
|
var children = props.children,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
className = props.className,
|
|
20
|
+
error = props.error,
|
|
21
|
+
inline = props.inline,
|
|
22
|
+
noMargin = props.noMargin,
|
|
23
|
+
withBorder = props.withBorder,
|
|
24
|
+
lookLike = props.lookLike,
|
|
25
|
+
textCenter = props.textCenter,
|
|
26
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
38
27
|
var H = "h".concat(level);
|
|
39
28
|
var headingClass = "ffe-h".concat(lookLike ? lookLike : level);
|
|
40
29
|
return /*#__PURE__*/_react.default.createElement(H, _extends({}, rest, {
|
|
41
30
|
className: (0, _classnames.default)(headingClass, _defineProperty({}, "".concat(headingClass, "--error"), error), _defineProperty({}, "".concat(headingClass, "--inline"), inline), _defineProperty({}, "".concat(headingClass, "--no-margin"), noMargin), _defineProperty({}, "".concat(headingClass, "--with-border"), withBorder), _defineProperty({}, "".concat(headingClass, "--text-center"), textCenter), className)
|
|
42
31
|
}), children);
|
|
43
32
|
};
|
|
44
|
-
|
|
45
33
|
Heading.propTypes = {
|
|
46
34
|
children: _propTypes.node.isRequired,
|
|
47
35
|
className: _propTypes.string,
|
|
@@ -54,7 +42,6 @@ var makeHeading = function makeHeading(level) {
|
|
|
54
42
|
};
|
|
55
43
|
return Heading;
|
|
56
44
|
};
|
|
57
|
-
|
|
58
45
|
var Heading1 = makeHeading(1);
|
|
59
46
|
exports.Heading1 = Heading1;
|
|
60
47
|
var Heading2 = makeHeading(2);
|
|
@@ -4,36 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["className", "element", "underline"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
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
|
-
|
|
24
15
|
var LinkText = function LinkText(props) {
|
|
25
16
|
var className = props.className,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
Element = props.element,
|
|
18
|
+
underline = props.underline,
|
|
19
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
30
20
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
31
21
|
className: (0, _classnames.default)('ffe-link-text', {
|
|
32
22
|
'ffe-link-text--no-underline': !underline
|
|
33
23
|
}, className)
|
|
34
24
|
}, rest));
|
|
35
25
|
};
|
|
36
|
-
|
|
37
26
|
LinkText.defaultProps = {
|
|
38
27
|
element: 'a',
|
|
39
28
|
underline: true
|
|
@@ -41,7 +30,6 @@ LinkText.defaultProps = {
|
|
|
41
30
|
LinkText.propTypes = {
|
|
42
31
|
children: _propTypes.node.isRequired,
|
|
43
32
|
className: _propTypes.string,
|
|
44
|
-
|
|
45
33
|
/** The rendered element, like a `react-router` `<Link />` */
|
|
46
34
|
element: (0, _propTypes.oneOfType)([_propTypes.func, _propTypes.string, _propTypes.elementType]),
|
|
47
35
|
underline: _propTypes.bool
|
|
@@ -4,33 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = MicroText;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["children", "className"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
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
|
-
|
|
24
15
|
function MicroText(props) {
|
|
25
16
|
var children = props.children,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
className = props.className,
|
|
18
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
29
19
|
return /*#__PURE__*/_react.default.createElement("span", _extends({
|
|
30
20
|
className: (0, _classnames.default)('ffe-micro-text', className)
|
|
31
21
|
}, rest), children);
|
|
32
22
|
}
|
|
33
|
-
|
|
34
23
|
MicroText.propTypes = {
|
|
35
24
|
children: _propTypes.node.isRequired,
|
|
36
25
|
className: _propTypes.string
|
|
@@ -4,48 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = Paragraph;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["children", "className", "lead", "subLead", "textCenter", "textLeft"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
-
|
|
22
14
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
-
|
|
24
15
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
-
|
|
26
16
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
27
|
-
|
|
28
17
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
29
|
-
|
|
30
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
-
|
|
32
19
|
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; }
|
|
33
|
-
|
|
34
20
|
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; }
|
|
35
|
-
|
|
36
21
|
function Paragraph(props) {
|
|
37
22
|
var children = props.children,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
23
|
+
className = props.className,
|
|
24
|
+
lead = props.lead,
|
|
25
|
+
subLead = props.subLead,
|
|
26
|
+
textCenter = props.textCenter,
|
|
27
|
+
textLeft = props.textLeft,
|
|
28
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
45
29
|
var _filter = [lead && 'ffe-lead-paragraph', subLead && 'ffe-sub-lead-paragraph', 'ffe-body-paragraph'].filter(Boolean),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
30
|
+
_filter2 = _slicedToArray(_filter, 1),
|
|
31
|
+
mainClass = _filter2[0];
|
|
49
32
|
return /*#__PURE__*/_react.default.createElement("p", _extends({
|
|
50
33
|
className: (0, _classnames.default)(mainClass, {
|
|
51
34
|
'ffe-body-paragraph--text-center': textCenter
|
|
@@ -54,20 +37,15 @@ function Paragraph(props) {
|
|
|
54
37
|
}, className)
|
|
55
38
|
}, rest), children);
|
|
56
39
|
}
|
|
57
|
-
|
|
58
40
|
Paragraph.propTypes = {
|
|
59
41
|
children: _propTypes.node.isRequired,
|
|
60
42
|
className: _propTypes.string,
|
|
61
|
-
|
|
62
43
|
/** Makes this paragraph a lead paragraph, typically used directly below a heading. */
|
|
63
44
|
lead: _propTypes.bool,
|
|
64
|
-
|
|
65
45
|
/** Makes this paragraph a sub-lead paragraph, typically used directly below a lead paragraph. */
|
|
66
46
|
subLead: _propTypes.bool,
|
|
67
|
-
|
|
68
47
|
/** Use if text alignment should override that of its container. */
|
|
69
48
|
textCenter: _propTypes.bool,
|
|
70
|
-
|
|
71
49
|
/** Use if text alignment should override that of its container. */
|
|
72
50
|
textLeft: _propTypes.bool
|
|
73
51
|
};
|
|
@@ -4,33 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = PreformattedText;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["children", "className"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
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
|
-
|
|
24
15
|
function PreformattedText(props) {
|
|
25
16
|
var children = props.children,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
className = props.className,
|
|
18
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
29
19
|
return /*#__PURE__*/_react.default.createElement("pre", _extends({
|
|
30
20
|
className: (0, _classnames.default)('ffe-pre-text', className)
|
|
31
21
|
}, rest), children);
|
|
32
22
|
}
|
|
33
|
-
|
|
34
23
|
PreformattedText.propTypes = {
|
|
35
24
|
children: _propTypes.node.isRequired,
|
|
36
25
|
className: _propTypes.string
|
|
@@ -4,33 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["className", "element"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
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
|
-
|
|
24
15
|
var SmallText = function SmallText(_ref) {
|
|
25
16
|
var className = _ref.className,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
Element = _ref.element,
|
|
18
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
19
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
30
20
|
className: (0, _classnames.default)('ffe-small-text', className)
|
|
31
21
|
}, rest));
|
|
32
22
|
};
|
|
33
|
-
|
|
34
23
|
SmallText.defaultProps = {
|
|
35
24
|
element: 'span'
|
|
36
25
|
};
|
|
@@ -4,33 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = StrongText;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _excluded = ["children", "className"];
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
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
|
-
|
|
24
15
|
function StrongText(props) {
|
|
25
16
|
var children = props.children,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
className = props.className,
|
|
18
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
29
19
|
return /*#__PURE__*/_react.default.createElement("strong", _extends({
|
|
30
20
|
className: (0, _classnames.default)('ffe-strong-text', className)
|
|
31
21
|
}, rest), children);
|
|
32
22
|
}
|
|
33
|
-
|
|
34
23
|
StrongText.propTypes = {
|
|
35
24
|
children: _propTypes.node.isRequired,
|
|
36
25
|
className: _propTypes.string
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
2
|
+
"name": "@sb1/ffe-core-react",
|
|
3
|
+
"version": "6.0.0",
|
|
4
|
+
"description": "React components for ffe-core components",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ffe"
|
|
7
|
+
],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "SpareBank 1",
|
|
10
|
+
"files": [
|
|
11
|
+
"lib",
|
|
12
|
+
"es",
|
|
13
|
+
"types"
|
|
14
|
+
],
|
|
15
|
+
"main": "lib/index.js",
|
|
16
|
+
"module": "es/index.js",
|
|
17
|
+
"types": "types/index.d.ts",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "ffe-buildtool babel",
|
|
25
|
+
"watch": "ffe-buildtool babel-watch",
|
|
26
|
+
"lint": "eslint src",
|
|
27
|
+
"test": "ffe-buildtool jest",
|
|
28
|
+
"test:watch": "ffe-buildtool jest --watch"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"classnames": "^2.3.1",
|
|
32
|
+
"prop-types": "^15.7.2"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@sb1/ffe-buildtool": "^0.4.1",
|
|
36
|
+
"eslint": "^5.9.0",
|
|
37
|
+
"react": "^16.9.0",
|
|
38
|
+
"react-dom": "^16.9.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@sb1/ffe-core": "*",
|
|
42
|
+
"react": ">=16.9.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"gitHead": "98d9ceeaa9bebcd35d5a730227aac61fd28937cf"
|
|
48
48
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -48,7 +48,6 @@ export interface ParagraphProps
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export interface WaveProps {
|
|
51
|
-
waveHeight: 'small' | 'medium' | 'large';
|
|
52
51
|
position?: string;
|
|
53
52
|
flip?: boolean;
|
|
54
53
|
color:
|
|
@@ -61,8 +60,19 @@ export interface WaveProps {
|
|
|
61
60
|
| 'vann'
|
|
62
61
|
| 'vann-30'
|
|
63
62
|
| 'fjell';
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
bgColor?:
|
|
64
|
+
| 'hvit'
|
|
65
|
+
| 'frost-30'
|
|
66
|
+
| 'sand-30'
|
|
67
|
+
| 'sand-70'
|
|
68
|
+
| 'syrin-30'
|
|
69
|
+
| 'syrin-70'
|
|
70
|
+
| 'vann'
|
|
71
|
+
| 'vann-30'
|
|
72
|
+
| 'fjell';
|
|
73
|
+
darkmodeColor?: 'svart' | 'natt';
|
|
74
|
+
bgDarkmodeColor?: 'svart' | 'natt';
|
|
75
|
+
children?: React.ReactNode;
|
|
66
76
|
}
|
|
67
77
|
|
|
68
78
|
declare class DividerLine extends React.Component<DividerLineProps, any> {}
|