@sb1/ffe-core-react 7.2.11 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Wave.js +37 -48
- package/es/index.js +11 -11
- package/es/typography/DividerLine.js +25 -16
- package/es/typography/EmphasizedText.js +25 -16
- package/es/typography/Heading.js +33 -44
- package/es/typography/LinkIcon.js +26 -21
- package/es/typography/LinkText.js +26 -26
- package/es/typography/MicroText.js +25 -16
- package/es/typography/Paragraph.js +30 -41
- package/es/typography/PreformattedText.js +25 -16
- package/es/typography/SmallText.js +26 -19
- package/es/typography/StrongText.js +25 -16
- package/es/typography/types.js +1 -0
- package/lib/Wave.js +45 -56
- package/lib/index.js +29 -99
- package/lib/typography/DividerLine.js +33 -24
- package/lib/typography/EmphasizedText.js +33 -24
- package/lib/typography/Heading.js +39 -51
- package/lib/typography/LinkIcon.js +32 -27
- package/lib/typography/LinkText.js +32 -32
- package/lib/typography/MicroText.js +32 -23
- package/lib/typography/Paragraph.js +37 -48
- package/lib/typography/PreformattedText.js +32 -23
- package/lib/typography/SmallText.js +32 -25
- package/lib/typography/StrongText.js +32 -23
- package/lib/typography/types.js +2 -0
- package/package.json +7 -8
- package/types/Wave.d.ts +22 -0
- package/types/index.d.ts +11 -119
- package/types/typography/DividerLine.d.ts +4 -0
- package/types/typography/EmphasizedText.d.ts +4 -0
- package/types/typography/Heading.d.ts +17 -0
- package/types/typography/LinkIcon.d.ts +6 -0
- package/types/typography/LinkText.d.ts +8 -0
- package/types/typography/MicroText.d.ts +8 -0
- package/types/typography/Paragraph.d.ts +12 -0
- package/types/typography/PreformattedText.d.ts +4 -0
- package/types/typography/SmallText.d.ts +8 -0
- package/types/typography/StrongText.d.ts +4 -0
- package/types/typography/types.d.ts +2 -0
package/es/Wave.js
CHANGED
|
@@ -1,51 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
flip =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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 {
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
9
|
-
|
|
10
|
-
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
|
-
};
|
package/es/typography/Heading.js
CHANGED
|
@@ -1,47 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
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
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
9
|
-
|
|
10
|
-
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
9
|
-
|
|
10
|
-
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
|
-
};
|