@sb1/ffe-core-react 10.0.0 → 10.0.2
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 +43 -0
- package/es/index.js +1 -0
- package/es/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/Wave.js +49 -0
- package/lib/index.js +3 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/types/Wave.d.ts +25 -0
- package/types/index.d.ts +1 -0
- package/types/tsconfig.types.tsbuildinfo +1 -1
package/es/Wave.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import classNames from 'classnames';
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use the Wave component in `ffe-shapes-react` instead.
|
|
27
|
+
*/
|
|
28
|
+
export function Wave(_a) {
|
|
29
|
+
var _b, _c;
|
|
30
|
+
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"]);
|
|
31
|
+
return (React.createElement("div", { className: classNames('ffe-wave', className, (_b = {},
|
|
32
|
+
_b["ffe-wave--bg-".concat(bgColor)] = bgColor,
|
|
33
|
+
_b["ffe-wave--dm-bg-".concat(bgDarkmodeColor)] = bgDarkmodeColor,
|
|
34
|
+
_b)) },
|
|
35
|
+
children ? (React.createElement("div", { className: "ffe-wave__content" }, children)) : null,
|
|
36
|
+
React.createElement("div", __assign({ className: classNames('ffe-wave__wave', "ffe-wave--bg-".concat(color), (_c = {},
|
|
37
|
+
_c["ffe-wave--dm-bg-".concat(darkmodeColor)] = darkmodeColor,
|
|
38
|
+
_c['ffe-wave__wave--flip'] = flip,
|
|
39
|
+
_c)), "aria-hidden": "true", style: {
|
|
40
|
+
maskPosition: position,
|
|
41
|
+
WebkitMaskPosition: position,
|
|
42
|
+
} }, rest))));
|
|
43
|
+
}
|
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/typography/DividerLine.tsx","../src/typography/EmphasizedText.tsx","../src/typography/Heading.tsx","../src/typography/LinkIcon.tsx","../src/typography/LinkText.tsx","../src/typography/MicroText.tsx","../src/typography/Paragraph.tsx","../src/typography/PreformattedText.tsx","../src/typography/SmallText.tsx","../src/typography/StrongText.tsx","../src/typography/types.ts"],"version":"5.
|
|
1
|
+
{"root":["../src/Wave.tsx","../src/index.ts","../src/typography/DividerLine.tsx","../src/typography/EmphasizedText.tsx","../src/typography/Heading.tsx","../src/typography/LinkIcon.tsx","../src/typography/LinkText.tsx","../src/typography/MicroText.tsx","../src/typography/Paragraph.tsx","../src/typography/PreformattedText.tsx","../src/typography/SmallText.tsx","../src/typography/StrongText.tsx","../src/typography/types.ts"],"version":"5.8.2"}
|
package/lib/Wave.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
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.Wave = Wave;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use the Wave component in `ffe-shapes-react` instead.
|
|
33
|
+
*/
|
|
34
|
+
function Wave(_a) {
|
|
35
|
+
var _b, _c;
|
|
36
|
+
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"]);
|
|
37
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)('ffe-wave', className, (_b = {},
|
|
38
|
+
_b["ffe-wave--bg-".concat(bgColor)] = bgColor,
|
|
39
|
+
_b["ffe-wave--dm-bg-".concat(bgDarkmodeColor)] = bgDarkmodeColor,
|
|
40
|
+
_b)) },
|
|
41
|
+
children ? (react_1.default.createElement("div", { className: "ffe-wave__content" }, children)) : null,
|
|
42
|
+
react_1.default.createElement("div", __assign({ className: (0, classnames_1.default)('ffe-wave__wave', "ffe-wave--bg-".concat(color), (_c = {},
|
|
43
|
+
_c["ffe-wave--dm-bg-".concat(darkmodeColor)] = darkmodeColor,
|
|
44
|
+
_c['ffe-wave__wave--flip'] = flip,
|
|
45
|
+
_c)), "aria-hidden": "true", style: {
|
|
46
|
+
maskPosition: position,
|
|
47
|
+
WebkitMaskPosition: position,
|
|
48
|
+
} }, rest))));
|
|
49
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StrongText = exports.SmallText = exports.PreformattedText = exports.Paragraph = exports.MicroText = exports.LinkIcon = exports.LinkText = exports.Heading6 = exports.Heading5 = exports.Heading4 = exports.Heading3 = exports.Heading2 = exports.Heading1 = exports.EmphasizedText = exports.DividerLine = void 0;
|
|
3
|
+
exports.Wave = exports.StrongText = exports.SmallText = exports.PreformattedText = exports.Paragraph = exports.MicroText = exports.LinkIcon = exports.LinkText = exports.Heading6 = exports.Heading5 = exports.Heading4 = exports.Heading3 = exports.Heading2 = exports.Heading1 = exports.EmphasizedText = exports.DividerLine = void 0;
|
|
4
4
|
var DividerLine_1 = require("./typography/DividerLine");
|
|
5
5
|
Object.defineProperty(exports, "DividerLine", { enumerable: true, get: function () { return DividerLine_1.DividerLine; } });
|
|
6
6
|
var EmphasizedText_1 = require("./typography/EmphasizedText");
|
|
@@ -26,3 +26,5 @@ var SmallText_1 = require("./typography/SmallText");
|
|
|
26
26
|
Object.defineProperty(exports, "SmallText", { enumerable: true, get: function () { return SmallText_1.SmallText; } });
|
|
27
27
|
var StrongText_1 = require("./typography/StrongText");
|
|
28
28
|
Object.defineProperty(exports, "StrongText", { enumerable: true, get: function () { return StrongText_1.StrongText; } });
|
|
29
|
+
var Wave_1 = require("./Wave");
|
|
30
|
+
Object.defineProperty(exports, "Wave", { enumerable: true, get: function () { return Wave_1.Wave; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/typography/DividerLine.tsx","../src/typography/EmphasizedText.tsx","../src/typography/Heading.tsx","../src/typography/LinkIcon.tsx","../src/typography/LinkText.tsx","../src/typography/MicroText.tsx","../src/typography/Paragraph.tsx","../src/typography/PreformattedText.tsx","../src/typography/SmallText.tsx","../src/typography/StrongText.tsx","../src/typography/types.ts"],"version":"5.
|
|
1
|
+
{"root":["../src/Wave.tsx","../src/index.ts","../src/typography/DividerLine.tsx","../src/typography/EmphasizedText.tsx","../src/typography/Heading.tsx","../src/typography/LinkIcon.tsx","../src/typography/LinkText.tsx","../src/typography/MicroText.tsx","../src/typography/Paragraph.tsx","../src/typography/PreformattedText.tsx","../src/typography/SmallText.tsx","../src/typography/StrongText.tsx","../src/typography/types.ts"],"version":"5.8.2"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-core-react",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "React components for ffe-core components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test:watch": "ffe-buildtool jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@sb1/ffe-core": "^31.0.
|
|
32
|
+
"@sb1/ffe-core": "^31.0.2",
|
|
33
33
|
"classnames": "^2.3.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "6178a69a187ee277628318f8ede898d1d6cd3462"
|
|
48
48
|
}
|
package/types/Wave.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
/**
|
|
22
|
+
* @deprecated Use the Wave component in `ffe-shapes-react` instead.
|
|
23
|
+
*/
|
|
24
|
+
export declare function Wave({ position, flip, color, darkmodeColor, bgColor, bgDarkmodeColor, children, className, ...rest }: WaveProps): React.JSX.Element;
|
|
25
|
+
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export { Paragraph, ParagraphProps } from './typography/Paragraph';
|
|
|
8
8
|
export { PreformattedText, PreformattedTextProps, } from './typography/PreformattedText';
|
|
9
9
|
export { SmallText, SmallTextProps } from './typography/SmallText';
|
|
10
10
|
export { StrongText, StrongTextProps } from './typography/StrongText';
|
|
11
|
+
export { Wave, WaveProps } from './Wave';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/typography/DividerLine.tsx","../src/typography/EmphasizedText.tsx","../src/typography/Heading.tsx","../src/typography/LinkIcon.tsx","../src/typography/LinkText.tsx","../src/typography/MicroText.tsx","../src/typography/Paragraph.tsx","../src/typography/PreformattedText.tsx","../src/typography/SmallText.tsx","../src/typography/StrongText.tsx","../src/typography/types.ts"],"version":"5.
|
|
1
|
+
{"root":["../src/Wave.tsx","../src/index.ts","../src/typography/DividerLine.tsx","../src/typography/EmphasizedText.tsx","../src/typography/Heading.tsx","../src/typography/LinkIcon.tsx","../src/typography/LinkText.tsx","../src/typography/MicroText.tsx","../src/typography/Paragraph.tsx","../src/typography/PreformattedText.tsx","../src/typography/SmallText.tsx","../src/typography/StrongText.tsx","../src/typography/types.ts"],"version":"5.8.2"}
|