@sb1/ffe-core-react 7.2.10 → 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.
- 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
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
var LinkIcon = function LinkIcon(props) {
|
|
16
|
-
var className = props.className,
|
|
17
|
-
_props$element = props.element,
|
|
18
|
-
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
19
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
21
|
-
className: (0, _classnames.default)('ffe-link-icon', className)
|
|
22
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
23
12
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
29
23
|
};
|
|
30
|
-
var
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.LinkIcon = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
function LinkIcon(props) {
|
|
32
|
+
var _a = props.as, Comp = _a === void 0 ? 'a' : _a, className = props.className, rest = __rest(props, ["as", "className"]);
|
|
33
|
+
return (react_1.default.createElement(Comp, __assign({ className: (0, classnames_1.default)('ffe-link-icon', className) }, rest)));
|
|
34
|
+
}
|
|
35
|
+
exports.LinkIcon = LinkIcon;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
var LinkText = function LinkText(props) {
|
|
16
|
-
var className = props.className,
|
|
17
|
-
_props$element = props.element,
|
|
18
|
-
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
19
|
-
_props$underline = props.underline,
|
|
20
|
-
underline = _props$underline === void 0 ? true : _props$underline,
|
|
21
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
23
|
-
className: (0, _classnames.default)('ffe-link-text', {
|
|
24
|
-
'ffe-link-text--no-underline': !underline
|
|
25
|
-
}, className)
|
|
26
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
27
12
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
34
23
|
};
|
|
35
|
-
var
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.LinkText = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
function LinkText(props) {
|
|
32
|
+
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"]);
|
|
33
|
+
return (react_1.default.createElement(Comp, __assign({ className: (0, classnames_1.default)('ffe-link-text', { 'ffe-link-text--no-underline': !underline }, className) }, rest)));
|
|
34
|
+
}
|
|
35
|
+
exports.LinkText = LinkText;
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.MicroText = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
15
31
|
function MicroText(props) {
|
|
16
|
-
|
|
17
|
-
className
|
|
18
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement("span", _extends({
|
|
20
|
-
className: (0, _classnames.default)('ffe-micro-text', className)
|
|
21
|
-
}, rest), children);
|
|
32
|
+
var _a = props.as, Comp = _a === void 0 ? 'span' : _a, className = props.className, rest = __rest(props, ["as", "className"]);
|
|
33
|
+
return (react_1.default.createElement(Comp, __assign({ className: (0, classnames_1.default)('ffe-micro-text', className) }, rest)));
|
|
22
34
|
}
|
|
23
|
-
MicroText
|
|
24
|
-
children: _propTypes.node.isRequired,
|
|
25
|
-
className: _propTypes.string
|
|
26
|
-
};
|
|
35
|
+
exports.MicroText = MicroText;
|
|
@@ -1,51 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Paragraph = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
21
31
|
function Paragraph(props) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _filter = [lead && 'ffe-lead-paragraph', subLead && 'ffe-sub-lead-paragraph', 'ffe-body-paragraph'].filter(Boolean),
|
|
30
|
-
_filter2 = _slicedToArray(_filter, 1),
|
|
31
|
-
mainClass = _filter2[0];
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement("p", _extends({
|
|
33
|
-
className: (0, _classnames.default)(mainClass, {
|
|
34
|
-
'ffe-body-paragraph--text-center': textCenter
|
|
35
|
-
}, {
|
|
36
|
-
'ffe-body-paragraph--text-left': textLeft
|
|
37
|
-
}, className)
|
|
38
|
-
}, rest), children);
|
|
32
|
+
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"]);
|
|
33
|
+
var mainClass = [
|
|
34
|
+
lead && 'ffe-lead-paragraph',
|
|
35
|
+
subLead && 'ffe-sub-lead-paragraph',
|
|
36
|
+
'ffe-body-paragraph',
|
|
37
|
+
].filter(Boolean)[0];
|
|
38
|
+
return (react_1.default.createElement("p", __assign({ className: (0, classnames_1.default)(mainClass, { 'ffe-body-paragraph--text-center': textCenter }, { 'ffe-body-paragraph--text-left': textLeft }, className) }, rest), children));
|
|
39
39
|
}
|
|
40
|
-
Paragraph
|
|
41
|
-
children: _propTypes.node.isRequired,
|
|
42
|
-
className: _propTypes.string,
|
|
43
|
-
/** Makes this paragraph a lead paragraph, typically used directly below a heading. */
|
|
44
|
-
lead: _propTypes.bool,
|
|
45
|
-
/** Makes this paragraph a sub-lead paragraph, typically used directly below a lead paragraph. */
|
|
46
|
-
subLead: _propTypes.bool,
|
|
47
|
-
/** Use if text alignment should override that of its container. */
|
|
48
|
-
textCenter: _propTypes.bool,
|
|
49
|
-
/** Use if text alignment should override that of its container. */
|
|
50
|
-
textLeft: _propTypes.bool
|
|
51
|
-
};
|
|
40
|
+
exports.Paragraph = Paragraph;
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.PreformattedText = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
15
31
|
function PreformattedText(props) {
|
|
16
|
-
|
|
17
|
-
className
|
|
18
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement("pre", _extends({
|
|
20
|
-
className: (0, _classnames.default)('ffe-pre-text', className)
|
|
21
|
-
}, rest), children);
|
|
32
|
+
var children = props.children, className = props.className, rest = __rest(props, ["children", "className"]);
|
|
33
|
+
return (react_1.default.createElement("pre", __assign({ className: (0, classnames_1.default)('ffe-pre-text', className) }, rest), children));
|
|
22
34
|
}
|
|
23
|
-
PreformattedText
|
|
24
|
-
children: _propTypes.node.isRequired,
|
|
25
|
-
className: _propTypes.string
|
|
26
|
-
};
|
|
35
|
+
exports.PreformattedText = PreformattedText;
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
var SmallText = function SmallText(_ref) {
|
|
16
|
-
var className = _ref.className,
|
|
17
|
-
_ref$element = _ref.element,
|
|
18
|
-
Element = _ref$element === void 0 ? 'span' : _ref$element,
|
|
19
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
21
|
-
className: (0, _classnames.default)('ffe-small-text', className)
|
|
22
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
23
12
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
27
23
|
};
|
|
28
|
-
var
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.SmallText = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
function SmallText(props) {
|
|
32
|
+
var _a = props.as, Comp = _a === void 0 ? 'span' : _a, className = props.className, rest = __rest(props, ["as", "className"]);
|
|
33
|
+
return (react_1.default.createElement(Comp, __assign({ className: (0, classnames_1.default)('ffe-small-text', className) }, rest)));
|
|
34
|
+
}
|
|
35
|
+
exports.SmallText = SmallText;
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.StrongText = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
15
31
|
function StrongText(props) {
|
|
16
|
-
|
|
17
|
-
className
|
|
18
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement("strong", _extends({
|
|
20
|
-
className: (0, _classnames.default)('ffe-strong-text', className)
|
|
21
|
-
}, rest), children);
|
|
32
|
+
var className = props.className, rest = __rest(props, ["className"]);
|
|
33
|
+
return (react_1.default.createElement("strong", __assign({ className: (0, classnames_1.default)('ffe-strong-text', className) }, rest)));
|
|
22
34
|
}
|
|
23
|
-
StrongText
|
|
24
|
-
children: _propTypes.node.isRequired,
|
|
25
|
-
className: _propTypes.string
|
|
26
|
-
};
|
|
35
|
+
exports.StrongText = StrongText;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-core-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "React components for ffe-core components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -21,20 +21,19 @@
|
|
|
21
21
|
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "ffe-buildtool
|
|
25
|
-
"watch": "ffe-buildtool
|
|
24
|
+
"build": "ffe-buildtool tsc",
|
|
25
|
+
"watch": "ffe-buildtool tsc-watch",
|
|
26
26
|
"lint": "eslint src",
|
|
27
27
|
"lint:fix": "eslint src --fix",
|
|
28
28
|
"test": "ffe-buildtool jest",
|
|
29
29
|
"test:watch": "ffe-buildtool jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@sb1/ffe-core": "^27.3.
|
|
33
|
-
"classnames": "^2.3.1"
|
|
34
|
-
"prop-types": "^15.7.2"
|
|
32
|
+
"@sb1/ffe-core": "^27.3.10",
|
|
33
|
+
"classnames": "^2.3.1"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@sb1/ffe-buildtool": "^0.
|
|
36
|
+
"@sb1/ffe-buildtool": "^0.6.0",
|
|
38
37
|
"eslint": "^8.57.0",
|
|
39
38
|
"react": "^16.9.0",
|
|
40
39
|
"react-dom": "^16.9.0"
|
|
@@ -45,5 +44,5 @@
|
|
|
45
44
|
"publishConfig": {
|
|
46
45
|
"access": "public"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "9ad9c4e14ec0db89189e0daaebace3028bf667d9"
|
|
49
48
|
}
|
package/types/Wave.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Color = 'hvit' | 'frost-30' | 'sand-30' | 'sand-70' | 'syrin-30' | 'syrin-70' | 'vann' | 'vann-30' | 'fjell';
|
|
3
|
+
type ColorDarkMode = 'svart' | 'natt';
|
|
4
|
+
export interface WaveProps {
|
|
5
|
+
/** Adds additional class */
|
|
6
|
+
className: string;
|
|
7
|
+
/** Sets the mask-position property, setting a px/rem value will move the starting position of the wave */
|
|
8
|
+
position?: string;
|
|
9
|
+
/** Rotate the wave 180 degrees :*/
|
|
10
|
+
flip?: boolean;
|
|
11
|
+
/** Sets the color of the wave. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
|
|
12
|
+
color: Color;
|
|
13
|
+
/** Set the background color of the wave container. Accepts ffe-color variables without the "ffe-farge-" bit of the name. */
|
|
14
|
+
bgColor?: Color;
|
|
15
|
+
/** Set the wave color in darkmode */
|
|
16
|
+
darkmodeColor?: ColorDarkMode;
|
|
17
|
+
/** Set the background color of wave container in darkmode */
|
|
18
|
+
bgDarkmodeColor?: ColorDarkMode;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function Wave({ position, flip, color, darkmodeColor, bgColor, bgDarkmodeColor, children, className, ...rest }: WaveProps): React.JSX.Element;
|
|
22
|
+
export {};
|