@sb1/ffe-system-message-react 100.12.4 → 101.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/SystemErrorMessage.js +3 -26
- package/es/SystemInfoMessage.js +3 -26
- package/es/SystemMessage.js +7 -28
- package/es/SystemNewsMessage.js +3 -26
- package/es/SystemSuccessMessage.js +3 -26
- package/es/texts.js +4 -4
- package/lib/SystemErrorMessage.js +7 -30
- package/lib/SystemInfoMessage.js +7 -30
- package/lib/SystemMessage.js +12 -33
- package/lib/SystemNewsMessage.js +7 -30
- package/lib/SystemSuccessMessage.js +7 -30
- package/lib/texts.js +4 -4
- package/package.json +8 -8
package/es/SystemErrorMessage.js
CHANGED
|
@@ -1,31 +1,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
|
-
};
|
|
23
1
|
import React from 'react';
|
|
24
2
|
import { Icon } from '@sb1/ffe-icons-react';
|
|
25
3
|
import { texts } from './texts';
|
|
26
4
|
import { SystemMessage } from './SystemMessage';
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (React.createElement(SystemMessage, __assign({ modifier: "error", "aria-label": texts[locale].error.ariaLabel, locale: locale, icon: React.createElement(Icon, { fileUrl: priorityHighIconSmall, size: "sm" }), role: alert ? 'alert' : 'group' }, rest)));
|
|
5
|
+
export const SystemErrorMessage = ({ locale = 'nb', alert, ...rest }) => {
|
|
6
|
+
const priorityHighIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTE4Ny4wOHEtMjEuNTM3IDAtMzYuNjYyLTE1LjMzN3QtMTUuMTI1LTM2Ljg3NHEwLTIxLjUzNyAxNS4zMzctMzYuNjYyIDE1LjMzNy0xNS4xMjQgMzYuODc0LTE1LjEyNCAyMS41MzcgMCAzNi42NjIgMTUuMzM3dDE1LjEyNSAzNi44NzRxMCAyMS41MzctMTUuMzM3IDM2LjY2MS0xNS4zMzcgMTUuMTI1LTM2Ljg3NCAxNS4xMjVabS0uMDYyLTE5Ni4xNTFxLTE5LjM0MSAwLTMyLjg0LTEzLjcwOS0xMy41LTEzLjcwOS0xMy41LTMyLjk2di0zMTYuNjg1cTAtMTkuMjUxIDEzLjc3NC0zMi43OTQgMTMuNzczLTEzLjU0MiAzMy4xMTQtMTMuNTQyIDE5LjM0MSAwIDMyLjg0IDEzLjcwOSAxMy41IDEzLjcwOSAxMy41IDMyLjk2djMxNi42ODVxMCAxOS4yNTEtMTMuNzc0IDMyLjc5NC0xMy43NzMgMTMuNTQyLTMzLjExNCAxMy41NDJaIi8+PC9zdmc+';
|
|
7
|
+
return (React.createElement(SystemMessage, { modifier: "error", "aria-label": texts[locale].error.ariaLabel, locale: locale, icon: React.createElement(Icon, { fileUrl: priorityHighIconSmall, size: "sm" }), role: alert ? 'alert' : 'group', ...rest }));
|
|
31
8
|
};
|
package/es/SystemInfoMessage.js
CHANGED
|
@@ -1,31 +1,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
|
-
};
|
|
23
1
|
import React from 'react';
|
|
24
2
|
import { Icon } from '@sb1/ffe-icons-react';
|
|
25
3
|
import { texts } from './texts';
|
|
26
4
|
import { SystemMessage } from './SystemMessage';
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (React.createElement(SystemMessage, __assign({ modifier: "info", "aria-label": texts[locale].info.ariaLabel, locale: locale, icon: React.createElement(Icon, { size: "sm", fileUrl: infoIconSmall }) }, rest)));
|
|
5
|
+
export const SystemInfoMessage = ({ locale = 'nb', ...rest }) => {
|
|
6
|
+
const infoIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTY3MnEtMjUuOTQyIDAtNDMuODY0LTE4LjEzNS0xNy45MjMtMTguMTM2LTE3LjkyMy00NC4wNzd0MTguMTM1LTQzLjg2NHExOC4xMzUtMTcuOTIzIDQ0LjA3Ni0xNy45MjMgMjUuOTQyIDAgNDMuODY0IDE4LjEzNiAxNy45MjMgMTguMTM1IDE3LjkyMyA0NC4wNzZ0LTE4LjEzNSA0My44NjRRNTA1LjcyOS02NzIgNDc5Ljc4OC02NzJabS4yNTcgNTA3Ljk5OXEtMjAuODE0IDAtMzUuNDI5LTE0LjU4NC0xNC42MTUtMTQuNTgzLTE0LjYxNS0zNS40MTZ2LTI5Ni42MTRxMC0yMC44MzMgMTQuNTctMzUuNDE2IDE0LjU3LTE0LjU4MyAzNS4zODQtMTQuNTgzdDM1LjQyOSAxNC41ODNxMTQuNjE1IDE0LjU4MyAxNC42MTUgMzUuNDE2djI5Ni42MTRxMCAyMC44MzMtMTQuNTcgMzUuNDE2LTE0LjU3IDE0LjU4NC0zNS4zODQgMTQuNTg0WiIvPjwvc3ZnPg==';
|
|
7
|
+
return (React.createElement(SystemMessage, { modifier: "info", "aria-label": texts[locale].info.ariaLabel, locale: locale, icon: React.createElement(Icon, { size: "sm", fileUrl: infoIconSmall }), ...rest }));
|
|
31
8
|
};
|
package/es/SystemMessage.js
CHANGED
|
@@ -1,39 +1,18 @@
|
|
|
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
1
|
import React, { useState } from 'react';
|
|
24
2
|
import classNames from 'classnames';
|
|
25
3
|
import { Icon } from '@sb1/ffe-icons-react';
|
|
26
4
|
import { texts } from './texts';
|
|
27
5
|
import { Collapse } from '@sb1/ffe-collapse-react';
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
var _c = useState(true), isOpen = _c[0], setIsOpen = _c[1];
|
|
6
|
+
export const SystemMessage = ({ children, className, icon, locale = 'nb', modifier, onColoredBg, onClick, onCloseRest, ...rest }) => {
|
|
7
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
31
8
|
return (React.createElement(Collapse, { isOpen: isOpen, onRest: onCloseRest },
|
|
32
|
-
React.createElement("div",
|
|
9
|
+
React.createElement("div", { className: classNames('ffe-system-message-wrapper', `ffe-system-message-wrapper--${modifier}`, { 'ffe-system-message-wrapper--coloredbg': onColoredBg }, className), role: "group", ...rest },
|
|
33
10
|
React.createElement("div", { className: "ffe-system-message" },
|
|
34
11
|
React.createElement("span", { className: "ffe-system-message__icon" }, React.isValidElement(icon) &&
|
|
35
|
-
React.cloneElement(icon,
|
|
12
|
+
React.cloneElement(icon, {
|
|
13
|
+
...icon.props,
|
|
14
|
+
})),
|
|
36
15
|
React.createElement("p", { className: "ffe-system-message__content" }, children),
|
|
37
|
-
React.createElement("button", { "aria-label": texts[locale].close, className: "ffe-system-message__close", onClick:
|
|
16
|
+
React.createElement("button", { "aria-label": texts[locale].close, className: "ffe-system-message__close", onClick: event => setIsOpen(false), type: "button" },
|
|
38
17
|
React.createElement(Icon, { fileUrl: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00ODAtNDQyLjg0NyAzMDkuMDc2LTI3MS45MjRxLTguMzA3IDguMzA4LTE3Ljg4NCA4LTkuNTc2LS4zMDctMTguMjY4LTktOC42OTMtOC42OTItOC42OTMtMTguNTc2dDguNjkzLTE4LjU3Nkw0NDIuODQ3LTQ4MCAyNzEuOTI0LTY1MC45MjRxLTguMzA4LTguMzA3LTgtMTguMzg0LjMwNy0xMC4wNzYgOS0xOC43NjggOC42OTItOC42OTMgMTguNTc2LTguNjkzdDE4LjU3NiA4LjY5M0w0ODAtNTE3LjE1M2wxNzAuOTI0LTE3MC45MjNxOC4zMDctOC4zMDggMTguMzg0LTguNSAxMC4wNzYtLjE5MyAxOC43NjggOC41IDguNjkzIDguNjkyIDguNjkzIDE4LjU3NnQtOC42OTMgMTguNTc2TDUxNy4xNTMtNDgwbDE3MC45MjMgMTcwLjkyNHE4LjMwOCA4LjMwNyA4LjUgMTcuODg0LjE5MyA5LjU3Ni04LjUgMTguMjY4LTguNjkyIDguNjkzLTE4LjU3NiA4LjY5M3QtMTguNTc2LTguNjkzTDQ4MC00NDIuODQ3WiIvPjwvc3ZnPg==", size: "sm" }))))));
|
|
39
18
|
};
|
package/es/SystemNewsMessage.js
CHANGED
|
@@ -1,31 +1,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
|
-
};
|
|
23
1
|
import React from 'react';
|
|
24
2
|
import { Icon } from '@sb1/ffe-icons-react';
|
|
25
3
|
import { texts } from './texts';
|
|
26
4
|
import { SystemMessage } from './SystemMessage';
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (React.createElement(SystemMessage, __assign({ modifier: "news", "aria-label": texts[locale].news.ariaLabel, locale: locale, icon: React.createElement(Icon, { size: "sm", fileUrl: infoIconSmall }) }, rest)));
|
|
5
|
+
export const SystemNewsMessage = ({ locale = 'nb', ...rest }) => {
|
|
6
|
+
const infoIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTY3MnEtMjUuOTQyIDAtNDMuODY0LTE4LjEzNS0xNy45MjMtMTguMTM2LTE3LjkyMy00NC4wNzd0MTguMTM1LTQzLjg2NHExOC4xMzUtMTcuOTIzIDQ0LjA3Ni0xNy45MjMgMjUuOTQyIDAgNDMuODY0IDE4LjEzNiAxNy45MjMgMTguMTM1IDE3LjkyMyA0NC4wNzZ0LTE4LjEzNSA0My44NjRRNTA1LjcyOS02NzIgNDc5Ljc4OC02NzJabS4yNTcgNTA3Ljk5OXEtMjAuODE0IDAtMzUuNDI5LTE0LjU4NC0xNC42MTUtMTQuNTgzLTE0LjYxNS0zNS40MTZ2LTI5Ni42MTRxMC0yMC44MzMgMTQuNTctMzUuNDE2IDE0LjU3LTE0LjU4MyAzNS4zODQtMTQuNTgzdDM1LjQyOSAxNC41ODNxMTQuNjE1IDE0LjU4MyAxNC42MTUgMzUuNDE2djI5Ni42MTRxMCAyMC44MzMtMTQuNTcgMzUuNDE2LTE0LjU3IDE0LjU4NC0zNS4zODQgMTQuNTg0WiIvPjwvc3ZnPg==';
|
|
7
|
+
return (React.createElement(SystemMessage, { modifier: "news", "aria-label": texts[locale].news.ariaLabel, locale: locale, icon: React.createElement(Icon, { size: "sm", fileUrl: infoIconSmall }), ...rest }));
|
|
31
8
|
};
|
|
@@ -1,31 +1,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
|
-
};
|
|
23
1
|
import React from 'react';
|
|
24
2
|
import { Icon } from '@sb1/ffe-icons-react';
|
|
25
3
|
import { texts } from './texts';
|
|
26
4
|
import { SystemMessage } from './SystemMessage';
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (React.createElement(SystemMessage, __assign({ modifier: "success", "aria-label": texts[locale].success.ariaLabel, locale: locale, icon: React.createElement(Icon, { size: "sm", fileUrl: checkIconSmall }) }, rest)));
|
|
5
|
+
export const SystemSuccessMessage = ({ locale = 'nb', ...rest }) => {
|
|
6
|
+
const checkIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Im0zOTUtMzcyLjM4NCAyNzAuNTM5LTI2OS41MzhxNy45MjMtNy45MjMgMTcuNjkyLTcuNjE2IDkuNzY5LjMwOCAxOC4wNzYgOC42MTYgOC4zMDggOC4zMDcgOC4zMDggMTcuODg0IDAgOS41NzYtOC4zMDggMTcuODg0bC0yODMgMjgyLjk5OXEtOS44NDYgOS44NDYtMjIuODA3IDkuODQ2LTEyLjk2MSAwLTIyLjgwNy05Ljg0NmwtMTE0LTExMy45OTlxLTcuOTIzLTcuOTIzLTguMzA4LTE3LjY5Mi0uMzg0LTkuNzY5IDcuOTIzLTE4LjA3NiA4LjMwOC04LjMwOCAxNy44ODQtOC4zMDggOS41NzcgMCAxNy44ODQgOC4zMDhMMzk1LTM3Mi4zODRaIi8+PC9zdmc+';
|
|
7
|
+
return (React.createElement(SystemMessage, { modifier: "success", "aria-label": texts[locale].success.ariaLabel, locale: locale, icon: React.createElement(Icon, { size: "sm", fileUrl: checkIconSmall }), ...rest }));
|
|
31
8
|
};
|
package/es/texts.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const nb = {
|
|
2
2
|
close: 'Lukk',
|
|
3
3
|
error: {
|
|
4
4
|
ariaLabel: 'Feilmelding',
|
|
@@ -13,7 +13,7 @@ var nb = {
|
|
|
13
13
|
ariaLabel: 'Nyhetsmelding',
|
|
14
14
|
},
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
const nn = {
|
|
17
17
|
close: 'Lukk',
|
|
18
18
|
error: {
|
|
19
19
|
ariaLabel: 'Feilmelding',
|
|
@@ -28,7 +28,7 @@ var nn = {
|
|
|
28
28
|
ariaLabel: 'Nyheitsmelding',
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
const en = {
|
|
32
32
|
close: 'Close',
|
|
33
33
|
error: {
|
|
34
34
|
ariaLabel: 'Error message',
|
|
@@ -43,4 +43,4 @@ var en = {
|
|
|
43
43
|
ariaLabel: 'News message',
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export const texts = { nb, nn, en };
|
|
@@ -1,38 +1,15 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
4
|
};
|
|
27
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
6
|
exports.SystemErrorMessage = void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return (react_1.default.createElement(SystemMessage_1.SystemMessage, __assign({ modifier: "error", "aria-label": texts_1.texts[locale].error.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { fileUrl: priorityHighIconSmall, size: "sm" }), role: alert ? 'alert' : 'group' }, rest)));
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ffe_icons_react_1 = require("@sb1/ffe-icons-react");
|
|
9
|
+
const texts_1 = require("./texts");
|
|
10
|
+
const SystemMessage_1 = require("./SystemMessage");
|
|
11
|
+
const SystemErrorMessage = ({ locale = 'nb', alert, ...rest }) => {
|
|
12
|
+
const priorityHighIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTE4Ny4wOHEtMjEuNTM3IDAtMzYuNjYyLTE1LjMzN3QtMTUuMTI1LTM2Ljg3NHEwLTIxLjUzNyAxNS4zMzctMzYuNjYyIDE1LjMzNy0xNS4xMjQgMzYuODc0LTE1LjEyNCAyMS41MzcgMCAzNi42NjIgMTUuMzM3dDE1LjEyNSAzNi44NzRxMCAyMS41MzctMTUuMzM3IDM2LjY2MS0xNS4zMzcgMTUuMTI1LTM2Ljg3NCAxNS4xMjVabS0uMDYyLTE5Ni4xNTFxLTE5LjM0MSAwLTMyLjg0LTEzLjcwOS0xMy41LTEzLjcwOS0xMy41LTMyLjk2di0zMTYuNjg1cTAtMTkuMjUxIDEzLjc3NC0zMi43OTQgMTMuNzczLTEzLjU0MiAzMy4xMTQtMTMuNTQyIDE5LjM0MSAwIDMyLjg0IDEzLjcwOSAxMy41IDEzLjcwOSAxMy41IDMyLjk2djMxNi42ODVxMCAxOS4yNTEtMTMuNzc0IDMyLjc5NC0xMy43NzMgMTMuNTQyLTMzLjExNCAxMy41NDJaIi8+PC9zdmc+';
|
|
13
|
+
return (react_1.default.createElement(SystemMessage_1.SystemMessage, { modifier: "error", "aria-label": texts_1.texts[locale].error.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { fileUrl: priorityHighIconSmall, size: "sm" }), role: alert ? 'alert' : 'group', ...rest }));
|
|
37
14
|
};
|
|
38
15
|
exports.SystemErrorMessage = SystemErrorMessage;
|
package/lib/SystemInfoMessage.js
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
4
|
};
|
|
27
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
6
|
exports.SystemInfoMessage = void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return (react_1.default.createElement(SystemMessage_1.SystemMessage, __assign({ modifier: "info", "aria-label": texts_1.texts[locale].info.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { size: "sm", fileUrl: infoIconSmall }) }, rest)));
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ffe_icons_react_1 = require("@sb1/ffe-icons-react");
|
|
9
|
+
const texts_1 = require("./texts");
|
|
10
|
+
const SystemMessage_1 = require("./SystemMessage");
|
|
11
|
+
const SystemInfoMessage = ({ locale = 'nb', ...rest }) => {
|
|
12
|
+
const infoIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTY3MnEtMjUuOTQyIDAtNDMuODY0LTE4LjEzNS0xNy45MjMtMTguMTM2LTE3LjkyMy00NC4wNzd0MTguMTM1LTQzLjg2NHExOC4xMzUtMTcuOTIzIDQ0LjA3Ni0xNy45MjMgMjUuOTQyIDAgNDMuODY0IDE4LjEzNiAxNy45MjMgMTguMTM1IDE3LjkyMyA0NC4wNzZ0LTE4LjEzNSA0My44NjRRNTA1LjcyOS02NzIgNDc5Ljc4OC02NzJabS4yNTcgNTA3Ljk5OXEtMjAuODE0IDAtMzUuNDI5LTE0LjU4NC0xNC42MTUtMTQuNTgzLTE0LjYxNS0zNS40MTZ2LTI5Ni42MTRxMC0yMC44MzMgMTQuNTctMzUuNDE2IDE0LjU3LTE0LjU4MyAzNS4zODQtMTQuNTgzdDM1LjQyOSAxNC41ODNxMTQuNjE1IDE0LjU4MyAxNC42MTUgMzUuNDE2djI5Ni42MTRxMCAyMC44MzMtMTQuNTcgMzUuNDE2LTE0LjU3IDE0LjU4NC0zNS4zODQgMTQuNTg0WiIvPjwvc3ZnPg==';
|
|
13
|
+
return (react_1.default.createElement(SystemMessage_1.SystemMessage, { modifier: "info", "aria-label": texts_1.texts[locale].info.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { size: "sm", fileUrl: infoIconSmall }), ...rest }));
|
|
37
14
|
};
|
|
38
15
|
exports.SystemInfoMessage = SystemInfoMessage;
|
package/lib/SystemMessage.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
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
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -43,37 +32,27 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
43
32
|
return result;
|
|
44
33
|
};
|
|
45
34
|
})();
|
|
46
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
-
var t = {};
|
|
48
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
-
t[p] = s[p];
|
|
50
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
-
t[p[i]] = s[p[i]];
|
|
54
|
-
}
|
|
55
|
-
return t;
|
|
56
|
-
};
|
|
57
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
58
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
59
37
|
};
|
|
60
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
39
|
exports.SystemMessage = void 0;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
var _c = (0, react_1.useState)(true), isOpen = _c[0], setIsOpen = _c[1];
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
41
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
42
|
+
const ffe_icons_react_1 = require("@sb1/ffe-icons-react");
|
|
43
|
+
const texts_1 = require("./texts");
|
|
44
|
+
const ffe_collapse_react_1 = require("@sb1/ffe-collapse-react");
|
|
45
|
+
const SystemMessage = ({ children, className, icon, locale = 'nb', modifier, onColoredBg, onClick, onCloseRest, ...rest }) => {
|
|
46
|
+
const [isOpen, setIsOpen] = (0, react_1.useState)(true);
|
|
70
47
|
return (react_1.default.createElement(ffe_collapse_react_1.Collapse, { isOpen: isOpen, onRest: onCloseRest },
|
|
71
|
-
react_1.default.createElement("div",
|
|
48
|
+
react_1.default.createElement("div", { className: (0, classnames_1.default)('ffe-system-message-wrapper', `ffe-system-message-wrapper--${modifier}`, { 'ffe-system-message-wrapper--coloredbg': onColoredBg }, className), role: "group", ...rest },
|
|
72
49
|
react_1.default.createElement("div", { className: "ffe-system-message" },
|
|
73
50
|
react_1.default.createElement("span", { className: "ffe-system-message__icon" }, react_1.default.isValidElement(icon) &&
|
|
74
|
-
react_1.default.cloneElement(icon,
|
|
51
|
+
react_1.default.cloneElement(icon, {
|
|
52
|
+
...icon.props,
|
|
53
|
+
})),
|
|
75
54
|
react_1.default.createElement("p", { className: "ffe-system-message__content" }, children),
|
|
76
|
-
react_1.default.createElement("button", { "aria-label": texts_1.texts[locale].close, className: "ffe-system-message__close", onClick:
|
|
55
|
+
react_1.default.createElement("button", { "aria-label": texts_1.texts[locale].close, className: "ffe-system-message__close", onClick: event => setIsOpen(false), type: "button" },
|
|
77
56
|
react_1.default.createElement(ffe_icons_react_1.Icon, { fileUrl: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00ODAtNDQyLjg0NyAzMDkuMDc2LTI3MS45MjRxLTguMzA3IDguMzA4LTE3Ljg4NCA4LTkuNTc2LS4zMDctMTguMjY4LTktOC42OTMtOC42OTItOC42OTMtMTguNTc2dDguNjkzLTE4LjU3Nkw0NDIuODQ3LTQ4MCAyNzEuOTI0LTY1MC45MjRxLTguMzA4LTguMzA3LTgtMTguMzg0LjMwNy0xMC4wNzYgOS0xOC43NjggOC42OTItOC42OTMgMTguNTc2LTguNjkzdDE4LjU3NiA4LjY5M0w0ODAtNTE3LjE1M2wxNzAuOTI0LTE3MC45MjNxOC4zMDctOC4zMDggMTguMzg0LTguNSAxMC4wNzYtLjE5MyAxOC43NjggOC41IDguNjkzIDguNjkyIDguNjkzIDE4LjU3NnQtOC42OTMgMTguNTc2TDUxNy4xNTMtNDgwbDE3MC45MjMgMTcwLjkyNHE4LjMwOCA4LjMwNyA4LjUgMTcuODg0LjE5MyA5LjU3Ni04LjUgMTguMjY4LTguNjkyIDguNjkzLTE4LjU3NiA4LjY5M3QtMTguNTc2LTguNjkzTDQ4MC00NDIuODQ3WiIvPjwvc3ZnPg==", size: "sm" }))))));
|
|
78
57
|
};
|
|
79
58
|
exports.SystemMessage = SystemMessage;
|
package/lib/SystemNewsMessage.js
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
4
|
};
|
|
27
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
6
|
exports.SystemNewsMessage = void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return (react_1.default.createElement(SystemMessage_1.SystemMessage, __assign({ modifier: "news", "aria-label": texts_1.texts[locale].news.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { size: "sm", fileUrl: infoIconSmall }) }, rest)));
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ffe_icons_react_1 = require("@sb1/ffe-icons-react");
|
|
9
|
+
const texts_1 = require("./texts");
|
|
10
|
+
const SystemMessage_1 = require("./SystemMessage");
|
|
11
|
+
const SystemNewsMessage = ({ locale = 'nb', ...rest }) => {
|
|
12
|
+
const infoIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Ik00NzkuNzg4LTY3MnEtMjUuOTQyIDAtNDMuODY0LTE4LjEzNS0xNy45MjMtMTguMTM2LTE3LjkyMy00NC4wNzd0MTguMTM1LTQzLjg2NHExOC4xMzUtMTcuOTIzIDQ0LjA3Ni0xNy45MjMgMjUuOTQyIDAgNDMuODY0IDE4LjEzNiAxNy45MjMgMTguMTM1IDE3LjkyMyA0NC4wNzZ0LTE4LjEzNSA0My44NjRRNTA1LjcyOS02NzIgNDc5Ljc4OC02NzJabS4yNTcgNTA3Ljk5OXEtMjAuODE0IDAtMzUuNDI5LTE0LjU4NC0xNC42MTUtMTQuNTgzLTE0LjYxNS0zNS40MTZ2LTI5Ni42MTRxMC0yMC44MzMgMTQuNTctMzUuNDE2IDE0LjU3LTE0LjU4MyAzNS4zODQtMTQuNTgzdDM1LjQyOSAxNC41ODNxMTQuNjE1IDE0LjU4MyAxNC42MTUgMzUuNDE2djI5Ni42MTRxMCAyMC44MzMtMTQuNTcgMzUuNDE2LTE0LjU3IDE0LjU4NC0zNS4zODQgMTQuNTg0WiIvPjwvc3ZnPg==';
|
|
13
|
+
return (react_1.default.createElement(SystemMessage_1.SystemMessage, { modifier: "news", "aria-label": texts_1.texts[locale].news.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { size: "sm", fileUrl: infoIconSmall }), ...rest }));
|
|
37
14
|
};
|
|
38
15
|
exports.SystemNewsMessage = SystemNewsMessage;
|
|
@@ -1,38 +1,15 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
4
|
};
|
|
27
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
6
|
exports.SystemSuccessMessage = void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return (react_1.default.createElement(SystemMessage_1.SystemMessage, __assign({ modifier: "success", "aria-label": texts_1.texts[locale].success.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { size: "sm", fileUrl: checkIconSmall }) }, rest)));
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ffe_icons_react_1 = require("@sb1/ffe-icons-react");
|
|
9
|
+
const texts_1 = require("./texts");
|
|
10
|
+
const SystemMessage_1 = require("./SystemMessage");
|
|
11
|
+
const SystemSuccessMessage = ({ locale = 'nb', ...rest }) => {
|
|
12
|
+
const checkIconSmall = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjAiPjxwYXRoIGQ9Im0zOTUtMzcyLjM4NCAyNzAuNTM5LTI2OS41MzhxNy45MjMtNy45MjMgMTcuNjkyLTcuNjE2IDkuNzY5LjMwOCAxOC4wNzYgOC42MTYgOC4zMDggOC4zMDcgOC4zMDggMTcuODg0IDAgOS41NzYtOC4zMDggMTcuODg0bC0yODMgMjgyLjk5OXEtOS44NDYgOS44NDYtMjIuODA3IDkuODQ2LTEyLjk2MSAwLTIyLjgwNy05Ljg0NmwtMTE0LTExMy45OTlxLTcuOTIzLTcuOTIzLTguMzA4LTE3LjY5Mi0uMzg0LTkuNzY5IDcuOTIzLTE4LjA3NiA4LjMwOC04LjMwOCAxNy44ODQtOC4zMDggOS41NzcgMCAxNy44ODQgOC4zMDhMMzk1LTM3Mi4zODRaIi8+PC9zdmc+';
|
|
13
|
+
return (react_1.default.createElement(SystemMessage_1.SystemMessage, { modifier: "success", "aria-label": texts_1.texts[locale].success.ariaLabel, locale: locale, icon: react_1.default.createElement(ffe_icons_react_1.Icon, { size: "sm", fileUrl: checkIconSmall }), ...rest }));
|
|
37
14
|
};
|
|
38
15
|
exports.SystemSuccessMessage = SystemSuccessMessage;
|
package/lib/texts.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.texts = void 0;
|
|
4
|
-
|
|
4
|
+
const nb = {
|
|
5
5
|
close: 'Lukk',
|
|
6
6
|
error: {
|
|
7
7
|
ariaLabel: 'Feilmelding',
|
|
@@ -16,7 +16,7 @@ var nb = {
|
|
|
16
16
|
ariaLabel: 'Nyhetsmelding',
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
const nn = {
|
|
20
20
|
close: 'Lukk',
|
|
21
21
|
error: {
|
|
22
22
|
ariaLabel: 'Feilmelding',
|
|
@@ -31,7 +31,7 @@ var nn = {
|
|
|
31
31
|
ariaLabel: 'Nyheitsmelding',
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
const en = {
|
|
35
35
|
close: 'Close',
|
|
36
36
|
error: {
|
|
37
37
|
ariaLabel: 'Error message',
|
|
@@ -46,4 +46,4 @@ var en = {
|
|
|
46
46
|
ariaLabel: 'News message',
|
|
47
47
|
},
|
|
48
48
|
};
|
|
49
|
-
exports.texts = { nb
|
|
49
|
+
exports.texts = { nb, nn, en };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-system-message-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "101.0.0",
|
|
4
4
|
"description": "SpareBank 1 System Message komponent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"test:watch": "ffe-buildtool jest --watch"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@sb1/ffe-collapse-react": "^
|
|
28
|
-
"@sb1/ffe-grid-react": "^
|
|
29
|
-
"@sb1/ffe-icons-react": "^
|
|
30
|
-
"@sb1/ffe-system-message": "^
|
|
31
|
-
"classnames": "^2.
|
|
27
|
+
"@sb1/ffe-collapse-react": "^101.0.0",
|
|
28
|
+
"@sb1/ffe-grid-react": "^101.0.0",
|
|
29
|
+
"@sb1/ffe-icons-react": "^101.0.0",
|
|
30
|
+
"@sb1/ffe-system-message": "^101.0.0",
|
|
31
|
+
"classnames": "^2.5.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@sb1/ffe-buildtool": "^
|
|
34
|
+
"@sb1/ffe-buildtool": "^101.0.0",
|
|
35
35
|
"react": "^18.2.0",
|
|
36
36
|
"react-dom": "^18.2.0"
|
|
37
37
|
},
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "7714019dbb9001551cb5d1c262c58afd609d4fb0"
|
|
45
45
|
}
|