@sb1/ffe-core-react 7.2.11 → 8.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.
Files changed (40) hide show
  1. package/es/Wave.js +37 -48
  2. package/es/index.js +11 -11
  3. package/es/typography/DividerLine.js +25 -16
  4. package/es/typography/EmphasizedText.js +25 -16
  5. package/es/typography/Heading.js +33 -44
  6. package/es/typography/LinkIcon.js +26 -21
  7. package/es/typography/LinkText.js +26 -26
  8. package/es/typography/MicroText.js +25 -16
  9. package/es/typography/Paragraph.js +30 -41
  10. package/es/typography/PreformattedText.js +25 -16
  11. package/es/typography/SmallText.js +26 -19
  12. package/es/typography/StrongText.js +25 -16
  13. package/es/typography/types.js +1 -0
  14. package/lib/Wave.js +45 -56
  15. package/lib/index.js +29 -99
  16. package/lib/typography/DividerLine.js +33 -24
  17. package/lib/typography/EmphasizedText.js +33 -24
  18. package/lib/typography/Heading.js +39 -51
  19. package/lib/typography/LinkIcon.js +32 -27
  20. package/lib/typography/LinkText.js +32 -32
  21. package/lib/typography/MicroText.js +32 -23
  22. package/lib/typography/Paragraph.js +37 -48
  23. package/lib/typography/PreformattedText.js +32 -23
  24. package/lib/typography/SmallText.js +32 -25
  25. package/lib/typography/StrongText.js +32 -23
  26. package/lib/typography/types.js +2 -0
  27. package/package.json +7 -8
  28. package/types/Wave.d.ts +22 -0
  29. package/types/index.d.ts +11 -119
  30. package/types/typography/DividerLine.d.ts +4 -0
  31. package/types/typography/EmphasizedText.d.ts +4 -0
  32. package/types/typography/Heading.d.ts +17 -0
  33. package/types/typography/LinkIcon.d.ts +6 -0
  34. package/types/typography/LinkText.d.ts +8 -0
  35. package/types/typography/MicroText.d.ts +8 -0
  36. package/types/typography/Paragraph.d.ts +12 -0
  37. package/types/typography/PreformattedText.d.ts +4 -0
  38. package/types/typography/SmallText.d.ts +8 -0
  39. package/types/typography/StrongText.d.ts +4 -0
  40. package/types/typography/types.d.ts +2 -0
package/es/Wave.js CHANGED
@@ -1,51 +1,40 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["position", "flip", "color", "darkmodeColor", "bgColor", "bgDarkmodeColor", "children", "className"];
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
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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; }
8
- 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; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
9
23
  import React from 'react';
10
- import { string, bool, oneOf, node } from 'prop-types';
11
24
  import classNames from 'classnames';
12
- export default function Wave(props) {
13
- var position = props.position,
14
- flip = props.flip,
15
- color = props.color,
16
- darkmodeColor = props.darkmodeColor,
17
- bgColor = props.bgColor,
18
- bgDarkmodeColor = props.bgDarkmodeColor,
19
- children = props.children,
20
- className = props.className,
21
- rest = _objectWithoutProperties(props, _excluded);
22
- return /*#__PURE__*/React.createElement("div", {
23
- className: classNames('ffe-wave', className, _defineProperty(_defineProperty({}, "ffe-wave--bg-".concat(bgColor), bgColor), "ffe-wave--dm-bg-".concat(bgDarkmodeColor), bgDarkmodeColor))
24
- }, children ? /*#__PURE__*/React.createElement("div", {
25
- className: "ffe-wave__content"
26
- }, children) : null, /*#__PURE__*/React.createElement("div", _extends({
27
- className: classNames('ffe-wave__wave', "ffe-wave--bg-".concat(color), _defineProperty(_defineProperty({}, "ffe-wave--dm-bg-".concat(darkmodeColor), darkmodeColor), 'ffe-wave__wave--flip', flip)),
28
- "aria-hidden": "true",
29
- style: {
30
- maskPosition: position,
31
- WebkitMaskPosition: position
32
- }
33
- }, rest)));
25
+ export function Wave(_a) {
26
+ var _b, _c;
27
+ var position = _a.position, flip = _a.flip, color = _a.color, darkmodeColor = _a.darkmodeColor, bgColor = _a.bgColor, bgDarkmodeColor = _a.bgDarkmodeColor, children = _a.children, className = _a.className, rest = __rest(_a, ["position", "flip", "color", "darkmodeColor", "bgColor", "bgDarkmodeColor", "children", "className"]);
28
+ return (React.createElement("div", { className: classNames('ffe-wave', className, (_b = {},
29
+ _b["ffe-wave--bg-".concat(bgColor)] = bgColor,
30
+ _b["ffe-wave--dm-bg-".concat(bgDarkmodeColor)] = bgDarkmodeColor,
31
+ _b)) },
32
+ children ? (React.createElement("div", { className: "ffe-wave__content" }, children)) : null,
33
+ React.createElement("div", __assign({ className: classNames('ffe-wave__wave', "ffe-wave--bg-".concat(color), (_c = {},
34
+ _c["ffe-wave--dm-bg-".concat(darkmodeColor)] = darkmodeColor,
35
+ _c['ffe-wave__wave--flip'] = flip,
36
+ _c)), "aria-hidden": "true", style: {
37
+ maskPosition: position,
38
+ WebkitMaskPosition: position,
39
+ } }, rest))));
34
40
  }
35
- Wave.propTypes = {
36
- /** Adds additional class */
37
- className: string,
38
- /** Sets the mask-position property, setting a px/rem value will move the starting position of the wave */
39
- position: string,
40
- /** Rotate the wave 180 degrees :*/
41
- flip: bool,
42
- /** Sets the color of the wave. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
43
- color: oneOf(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']).isRequired,
44
- /** Set the background color of the wave container. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
45
- bgColor: oneOf(['hvit', 'frost-30', 'sand-30', 'sand-70', 'syrin-30', 'syrin-70', 'vann', 'vann-30', 'fjell']),
46
- /** Set the wave color in darkmode */
47
- darkmodeColor: oneOf(['svart', 'natt']),
48
- /** Set the background color of wave container in darkmode */
49
- bgDarkmodeColor: oneOf(['svart', 'natt']),
50
- children: node
51
- };
package/es/index.js CHANGED
@@ -1,11 +1,11 @@
1
- export { default as DividerLine } from './typography/DividerLine';
2
- export { default as EmphasizedText } from './typography/EmphasizedText';
3
- export * from './typography/Heading';
4
- export { default as LinkText } from './typography/LinkText';
5
- export { default as LinkIcon } from './typography/LinkIcon';
6
- export { default as MicroText } from './typography/MicroText';
7
- export { default as Paragraph } from './typography/Paragraph';
8
- export { default as PreformattedText } from './typography/PreformattedText';
9
- export { default as SmallText } from './typography/SmallText';
10
- export { default as StrongText } from './typography/StrongText';
11
- export { default as Wave } from './Wave';
1
+ export { DividerLine } from './typography/DividerLine';
2
+ export { EmphasizedText, } from './typography/EmphasizedText';
3
+ export { Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, } from './typography/Heading';
4
+ export { LinkText } from './typography/LinkText';
5
+ export { LinkIcon } from './typography/LinkIcon';
6
+ export { MicroText } from './typography/MicroText';
7
+ export { Paragraph } from './typography/Paragraph';
8
+ export { PreformattedText, } from './typography/PreformattedText';
9
+ export { SmallText } from './typography/SmallText';
10
+ export { StrongText } from './typography/StrongText';
11
+ export { Wave } from './Wave';
@@ -1,19 +1,28 @@
1
- var _excluded = ["className"];
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
- 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 = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- export default function DividerLine(props) {
9
- var className = props.className,
10
- rest = _objectWithoutProperties(props, _excluded);
11
- return /*#__PURE__*/React.createElement("hr", _extends({
12
- className: classNames('ffe-divider-line', className),
13
- "aria-hidden": "true",
14
- role: "presentation"
15
- }, rest));
25
+ export function DividerLine(_a) {
26
+ var className = _a.className, rest = __rest(_a, ["className"]);
27
+ return (React.createElement("hr", __assign({ className: classNames('ffe-divider-line', className), "aria-hidden": "true", role: "presentation" }, rest)));
16
28
  }
17
- DividerLine.propTypes = {
18
- className: string
19
- };
@@ -1,19 +1,28 @@
1
- var _excluded = ["children", "className"];
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
- 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 = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- export default function EmphasizedText(props) {
9
- var children = props.children,
10
- className = props.className,
11
- rest = _objectWithoutProperties(props, _excluded);
12
- return /*#__PURE__*/React.createElement("em", _extends({
13
- className: classNames('ffe-em-text', className)
14
- }, rest), children);
25
+ export function EmphasizedText(_a) {
26
+ var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
27
+ return (React.createElement("em", __assign({ className: classNames('ffe-em-text', className) }, rest), children));
15
28
  }
16
- EmphasizedText.propTypes = {
17
- children: node.isRequired,
18
- className: string
19
- };
@@ -1,47 +1,36 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "className", "error", "inline", "noMargin", "withBorder", "lookLike", "textCenter"];
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
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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; }
8
- 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; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
9
23
  import React from 'react';
10
24
  import classNames from 'classnames';
11
- import { bool, oneOf, node, string } from 'prop-types';
12
- var makeHeading = function makeHeading(level) {
13
- var Heading = /*#__PURE__*/React.forwardRef(function (props, ref) {
14
- var children = props.children,
15
- className = props.className,
16
- error = props.error,
17
- inline = props.inline,
18
- noMargin = props.noMargin,
19
- withBorder = props.withBorder,
20
- lookLike = props.lookLike,
21
- textCenter = props.textCenter,
22
- rest = _objectWithoutProperties(props, _excluded);
23
- var H = "h".concat(level);
25
+ var Heading = React.forwardRef(function (_a, ref) {
26
+ var _b, _c, _d, _e, _f;
27
+ var children = _a.children, className = _a.className, error = _a.error, inline = _a.inline, noMargin = _a.noMargin, withBorder = _a.withBorder, lookLike = _a.lookLike, textCenter = _a.textCenter, level = _a.level, rest = __rest(_a, ["children", "className", "error", "inline", "noMargin", "withBorder", "lookLike", "textCenter", "level"]);
24
28
  var headingClass = "ffe-h".concat(lookLike ? lookLike : level);
25
- return /*#__PURE__*/React.createElement(H, _extends({}, rest, {
26
- ref: ref,
27
- 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)
28
- }), children);
29
- });
30
- Heading.propTypes = {
31
- children: node.isRequired,
32
- className: string,
33
- error: bool,
34
- inline: bool,
35
- lookLike: oneOf([1, 2, 3, 4, 5, 6]),
36
- noMargin: bool,
37
- withBorder: bool,
38
- textCenter: bool
39
- };
40
- return Heading;
41
- };
42
- export var Heading1 = makeHeading(1);
43
- export var Heading2 = makeHeading(2);
44
- export var Heading3 = makeHeading(3);
45
- export var Heading4 = makeHeading(4);
46
- export var Heading5 = makeHeading(5);
47
- export var Heading6 = makeHeading(6);
29
+ return React.createElement("h".concat(level), __assign(__assign({}, rest), { ref: ref, className: classNames(headingClass, (_b = {}, _b["".concat(headingClass, "--error")] = error, _b), (_c = {}, _c["".concat(headingClass, "--inline")] = inline, _c), (_d = {}, _d["".concat(headingClass, "--no-margin")] = noMargin, _d), (_e = {}, _e["".concat(headingClass, "--with-border")] = withBorder, _e), (_f = {}, _f["".concat(headingClass, "--text-center")] = textCenter, _f), className) }), children);
30
+ });
31
+ export var Heading1 = React.forwardRef(function (props, ref) { return React.createElement(Heading, __assign({}, props, { ref: ref, level: 1 })); });
32
+ export var Heading2 = React.forwardRef(function (props, ref) { return React.createElement(Heading, __assign({}, props, { ref: ref, level: 2 })); });
33
+ export var Heading3 = React.forwardRef(function (props, ref) { return React.createElement(Heading, __assign({}, props, { ref: ref, level: 3 })); });
34
+ export var Heading4 = React.forwardRef(function (props, ref) { return React.createElement(Heading, __assign({}, props, { ref: ref, level: 4 })); });
35
+ export var Heading5 = React.forwardRef(function (props, ref) { return React.createElement(Heading, __assign({}, props, { ref: ref, level: 5 })); });
36
+ export var Heading6 = React.forwardRef(function (props, ref) { return React.createElement(Heading, __assign({}, props, { ref: ref, level: 6 })); });
@@ -1,23 +1,28 @@
1
- var _excluded = ["className", "element"];
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
- 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 = {}; 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
- import React from 'react';
6
- import { func, node, oneOfType, string, elementType } from 'prop-types';
7
- import classNames from 'classnames';
8
- var LinkIcon = function LinkIcon(props) {
9
- var className = props.className,
10
- _props$element = props.element,
11
- Element = _props$element === void 0 ? 'a' : _props$element,
12
- rest = _objectWithoutProperties(props, _excluded);
13
- return /*#__PURE__*/React.createElement(Element, _extends({
14
- className: classNames('ffe-link-icon', className)
15
- }, rest));
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
16
11
  };
17
- LinkIcon.propTypes = {
18
- children: node.isRequired,
19
- className: string,
20
- /** The rendered element, like a `react-router` `<Link />` */
21
- element: oneOfType([func, string, elementType])
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
22
  };
23
- export default LinkIcon;
23
+ import React from 'react';
24
+ import classNames from 'classnames';
25
+ export function LinkIcon(props) {
26
+ var _a = props.as, Comp = _a === void 0 ? 'a' : _a, className = props.className, rest = __rest(props, ["as", "className"]);
27
+ return (React.createElement(Comp, __assign({ className: classNames('ffe-link-icon', className) }, rest)));
28
+ }
@@ -1,28 +1,28 @@
1
- var _excluded = ["className", "element", "underline"];
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
- 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 = {}; 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
- import React from 'react';
6
- import { bool, func, node, oneOfType, string, elementType } from 'prop-types';
7
- import classNames from 'classnames';
8
- var LinkText = function LinkText(props) {
9
- var className = props.className,
10
- _props$element = props.element,
11
- Element = _props$element === void 0 ? 'a' : _props$element,
12
- _props$underline = props.underline,
13
- underline = _props$underline === void 0 ? true : _props$underline,
14
- rest = _objectWithoutProperties(props, _excluded);
15
- return /*#__PURE__*/React.createElement(Element, _extends({
16
- className: classNames('ffe-link-text', {
17
- 'ffe-link-text--no-underline': !underline
18
- }, className)
19
- }, rest));
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
20
11
  };
21
- LinkText.propTypes = {
22
- children: node.isRequired,
23
- className: string,
24
- /** The rendered element, like a `react-router` `<Link />` */
25
- element: oneOfType([func, string, elementType]),
26
- underline: bool
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
27
22
  };
28
- export default LinkText;
23
+ import React from 'react';
24
+ import classNames from 'classnames';
25
+ export function LinkText(props) {
26
+ var _a = props.as, Comp = _a === void 0 ? 'a' : _a, className = props.className, _b = props.underline, underline = _b === void 0 ? true : _b, rest = __rest(props, ["as", "className", "underline"]);
27
+ return (React.createElement(Comp, __assign({ className: classNames('ffe-link-text', { 'ffe-link-text--no-underline': !underline }, className) }, rest)));
28
+ }
@@ -1,19 +1,28 @@
1
- var _excluded = ["children", "className"];
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
- 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 = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- export default function MicroText(props) {
9
- var children = props.children,
10
- className = props.className,
11
- rest = _objectWithoutProperties(props, _excluded);
12
- return /*#__PURE__*/React.createElement("span", _extends({
13
- className: classNames('ffe-micro-text', className)
14
- }, rest), children);
25
+ export function MicroText(props) {
26
+ var _a = props.as, Comp = _a === void 0 ? 'span' : _a, className = props.className, rest = __rest(props, ["as", "className"]);
27
+ return (React.createElement(Comp, __assign({ className: classNames('ffe-micro-text', className) }, rest)));
15
28
  }
16
- MicroText.propTypes = {
17
- children: node.isRequired,
18
- className: string
19
- };
@@ -1,44 +1,33 @@
1
- var _excluded = ["children", "className", "lead", "subLead", "textCenter", "textLeft"];
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
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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."); }
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); }
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; }
7
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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; }
10
- 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; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
11
23
  import React from 'react';
12
- import { bool, node, string } from 'prop-types';
13
24
  import classNames from 'classnames';
14
- export default function Paragraph(props) {
15
- var children = props.children,
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);
22
- var _filter = [lead && 'ffe-lead-paragraph', subLead && 'ffe-sub-lead-paragraph', 'ffe-body-paragraph'].filter(Boolean),
23
- _filter2 = _slicedToArray(_filter, 1),
24
- mainClass = _filter2[0];
25
- return /*#__PURE__*/React.createElement("p", _extends({
26
- className: classNames(mainClass, {
27
- 'ffe-body-paragraph--text-center': textCenter
28
- }, {
29
- 'ffe-body-paragraph--text-left': textLeft
30
- }, className)
31
- }, rest), children);
25
+ export function Paragraph(props) {
26
+ var children = props.children, className = props.className, lead = props.lead, subLead = props.subLead, textCenter = props.textCenter, textLeft = props.textLeft, rest = __rest(props, ["children", "className", "lead", "subLead", "textCenter", "textLeft"]);
27
+ var mainClass = [
28
+ lead && 'ffe-lead-paragraph',
29
+ subLead && 'ffe-sub-lead-paragraph',
30
+ 'ffe-body-paragraph',
31
+ ].filter(Boolean)[0];
32
+ return (React.createElement("p", __assign({ className: classNames(mainClass, { 'ffe-body-paragraph--text-center': textCenter }, { 'ffe-body-paragraph--text-left': textLeft }, className) }, rest), children));
32
33
  }
33
- Paragraph.propTypes = {
34
- children: node.isRequired,
35
- className: string,
36
- /** Makes this paragraph a lead paragraph, typically used directly below a heading. */
37
- lead: bool,
38
- /** Makes this paragraph a sub-lead paragraph, typically used directly below a lead paragraph. */
39
- subLead: bool,
40
- /** Use if text alignment should override that of its container. */
41
- textCenter: bool,
42
- /** Use if text alignment should override that of its container. */
43
- textLeft: bool
44
- };
@@ -1,19 +1,28 @@
1
- var _excluded = ["children", "className"];
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
- 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 = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- export default function PreformattedText(props) {
9
- var children = props.children,
10
- className = props.className,
11
- rest = _objectWithoutProperties(props, _excluded);
12
- return /*#__PURE__*/React.createElement("pre", _extends({
13
- className: classNames('ffe-pre-text', className)
14
- }, rest), children);
25
+ export function PreformattedText(props) {
26
+ var children = props.children, className = props.className, rest = __rest(props, ["children", "className"]);
27
+ return (React.createElement("pre", __assign({ className: classNames('ffe-pre-text', className) }, rest), children));
15
28
  }
16
- PreformattedText.propTypes = {
17
- children: node.isRequired,
18
- className: string
19
- };