Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fremtind/jkl-alert-message-react

Package Overview
Dependencies
Maintainers
2
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fremtind/jkl-alert-message-react - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

LICENSE

73

build/browser/index.js

@@ -52,58 +52,2 @@ import React from 'react';

function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function createCommonjsModule(fn, module) {

@@ -258,16 +202,6 @@ return module = { exports: {} }, fn(module, module.exports), module.exports;

});
var styles = Object.entries({
maxContentWidth: maxContentWidth,
var styles = {
maxWidth: maxContentWidth,
paddingLeft: paddingLeft
}).reduce(function (styleObject, _ref2) {
var _ref3 = _slicedToArray(_ref2, 2),
style = _ref3[0],
value = _ref3[1];
if (!!value) {
styleObject[style] = value;
}
return styleObject;
}, {});
};
return /*#__PURE__*/React.createElement("div", {

@@ -278,2 +212,3 @@ className: componentClassName,

className: "jkl-alert-message__content",
"data-testid": "alert-message-content",
style: _objectSpread2({}, styles)

@@ -280,0 +215,0 @@ }, /*#__PURE__*/React.createElement("div", {

@@ -1,2 +0,2 @@

import e from"react";function r(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function o(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var c,l=e[Symbol.iterator]();!(n=(c=l.next()).done)&&(t.push(c.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return a(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var c=function(e,r){return e(r={exports:{}},r.exports),r.exports}((function(e){
import e from"react";function r(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function n(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var a=function(e,r){return e(r={exports:{}},r.exports),r.exports}((function(e){
/*!

@@ -7,2 +7,2 @@ Copyright (c) 2017 Jed Watson.

*/
!function(){var r={}.hasOwnProperty;function t(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var c=t.apply(null,o);c&&e.push(c)}else if("object"===a)for(var l in o)r.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()}));c.named;function l(r){switch(r.messageType){case"error":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M11.952 7.328C12.384 7.328 12.688 7.072 12.688 6.624C12.688 6.192 12.384 5.92 11.952 5.92C11.536 5.92 11.248 6.192 11.248 6.624C11.248 7.072 11.536 7.328 11.952 7.328ZM11.504 18H12.512V9.408H11.504V18Z",fill:"currentColor"}));case"success":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return e.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{className:"jkl-icon-exclamation",d:"M11.112 14.624H11.688L11.896 11.36V6H10.904V11.36L11.112 14.624ZM11.4 18.24C11.784 18.24 12.136 17.952 12.136 17.504C12.136 17.072 11.784 16.784 11.4 16.784C11.016 16.784 10.664 17.072 10.664 17.504C10.664 17.952 11.016 18.24 11.4 18.24Z",fill:"currentColor"}));default:return null}}function i(r){return function(t){var a=t.className,i=void 0===a?"":a,s=t.inverted,u=t.maxContentWidth,f=t.paddingLeft,m=t.role,p=void 0===m?"status":m,g=t.children,h=c("jkl-alert-message","jkl-alert-message--"+r,i,{"jkl-alert-message--dark":s}),y=Object.entries({maxContentWidth:u,paddingLeft:f}).reduce((function(e,r){var t=o(r,2),n=t[0],a=t[1];return a&&(e[n]=a),e}),{});return e.createElement("div",{className:h,role:p},e.createElement("div",{className:"jkl-alert-message__content",style:n({},y)},e.createElement("div",{className:"jkl-alert-message__icon"},e.createElement(l,{messageType:r})),e.createElement("p",{className:"jkl-alert-message__message jkl-body"},g)))}}var s=i("info"),u=i("error"),f=i("warning"),m=i("success");export{u as ErrorAlertMessage,s as InfoAlertMessage,m as SuccessAlertMessage,f as WarningAlertMessage};
!function(){var r={}.hasOwnProperty;function t(){for(var e=[],n=0;n<arguments.length;n++){var a=arguments[n];if(a){var c=typeof a;if("string"===c||"number"===c)e.push(a);else if(Array.isArray(a)&&a.length){var l=t.apply(null,a);l&&e.push(l)}else if("object"===c)for(var o in a)r.call(a,o)&&a[o]&&e.push(o)}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()}));a.named;function c(r){switch(r.messageType){case"error":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M11.952 7.328C12.384 7.328 12.688 7.072 12.688 6.624C12.688 6.192 12.384 5.92 11.952 5.92C11.536 5.92 11.248 6.192 11.248 6.624C11.248 7.072 11.536 7.328 11.952 7.328ZM11.504 18H12.512V9.408H11.504V18Z",fill:"currentColor"}));case"success":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return e.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{className:"jkl-icon-exclamation",d:"M11.112 14.624H11.688L11.896 11.36V6H10.904V11.36L11.112 14.624ZM11.4 18.24C11.784 18.24 12.136 17.952 12.136 17.504C12.136 17.072 11.784 16.784 11.4 16.784C11.016 16.784 10.664 17.072 10.664 17.504C10.664 17.952 11.016 18.24 11.4 18.24Z",fill:"currentColor"}));default:return null}}function l(r){return function(t){var l=t.className,o=void 0===l?"":l,s=t.inverted,i=t.maxContentWidth,u=t.paddingLeft,m=t.role,f=void 0===m?"status":m,g=t.children,p=a("jkl-alert-message","jkl-alert-message--"+r,o,{"jkl-alert-message--dark":s}),w={maxWidth:i,paddingLeft:u};return e.createElement("div",{className:p,role:f},e.createElement("div",{className:"jkl-alert-message__content","data-testid":"alert-message-content",style:n({},w)},e.createElement("div",{className:"jkl-alert-message__icon"},e.createElement(c,{messageType:r})),e.createElement("p",{className:"jkl-alert-message__message jkl-body"},g)))}}var o=l("info"),s=l("error"),i=l("warning"),u=l("success");export{s as ErrorAlertMessage,o as InfoAlertMessage,u as SuccessAlertMessage,i as WarningAlertMessage};

@@ -58,58 +58,2 @@ 'use strict';

function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function createCommonjsModule(fn, module) {

@@ -264,16 +208,6 @@ return module = { exports: {} }, fn(module, module.exports), module.exports;

});
var styles = Object.entries({
maxContentWidth: maxContentWidth,
var styles = {
maxWidth: maxContentWidth,
paddingLeft: paddingLeft
}).reduce(function (styleObject, _ref2) {
var _ref3 = _slicedToArray(_ref2, 2),
style = _ref3[0],
value = _ref3[1];
if (!!value) {
styleObject[style] = value;
}
return styleObject;
}, {});
};
return /*#__PURE__*/React.createElement("div", {

@@ -284,2 +218,3 @@ className: componentClassName,

className: "jkl-alert-message__content",
"data-testid": "alert-message-content",
style: _objectSpread2({}, styles)

@@ -286,0 +221,0 @@ }, /*#__PURE__*/React.createElement("div", {

@@ -52,58 +52,2 @@ import React from 'react';

function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function createCommonjsModule(fn, module) {

@@ -258,16 +202,6 @@ return module = { exports: {} }, fn(module, module.exports), module.exports;

});
var styles = Object.entries({
maxContentWidth: maxContentWidth,
var styles = {
maxWidth: maxContentWidth,
paddingLeft: paddingLeft
}).reduce(function (styleObject, _ref2) {
var _ref3 = _slicedToArray(_ref2, 2),
style = _ref3[0],
value = _ref3[1];
if (!!value) {
styleObject[style] = value;
}
return styleObject;
}, {});
};
return /*#__PURE__*/React.createElement("div", {

@@ -278,2 +212,3 @@ className: componentClassName,

className: "jkl-alert-message__content",
"data-testid": "alert-message-content",
style: _objectSpread2({}, styles)

@@ -280,0 +215,0 @@ }, /*#__PURE__*/React.createElement("div", {

@@ -1,2 +0,2 @@

import e from"react";function r(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function o(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,a=void 0;try{for(var c,l=e[Symbol.iterator]();!(n=(c=l.next()).done)&&(t.push(c.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return a(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var c=function(e,r){return e(r={exports:{}},r.exports),r.exports}((function(e){
import e from"react";function r(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function n(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var a=function(e,r){return e(r={exports:{}},r.exports),r.exports}((function(e){
/*!

@@ -7,2 +7,2 @@ Copyright (c) 2017 Jed Watson.

*/
!function(){var r={}.hasOwnProperty;function t(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var c=t.apply(null,o);c&&e.push(c)}else if("object"===a)for(var l in o)r.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()}));c.named;function l(r){switch(r.messageType){case"error":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M11.952 7.328C12.384 7.328 12.688 7.072 12.688 6.624C12.688 6.192 12.384 5.92 11.952 5.92C11.536 5.92 11.248 6.192 11.248 6.624C11.248 7.072 11.536 7.328 11.952 7.328ZM11.504 18H12.512V9.408H11.504V18Z",fill:"currentColor"}));case"success":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return e.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{className:"jkl-icon-exclamation",d:"M11.112 14.624H11.688L11.896 11.36V6H10.904V11.36L11.112 14.624ZM11.4 18.24C11.784 18.24 12.136 17.952 12.136 17.504C12.136 17.072 11.784 16.784 11.4 16.784C11.016 16.784 10.664 17.072 10.664 17.504C10.664 17.952 11.016 18.24 11.4 18.24Z",fill:"currentColor"}));default:return null}}function i(r){return function(t){var a=t.className,i=void 0===a?"":a,s=t.inverted,u=t.maxContentWidth,f=t.paddingLeft,m=t.role,p=void 0===m?"status":m,g=t.children,h=c("jkl-alert-message","jkl-alert-message--"+r,i,{"jkl-alert-message--dark":s}),y=Object.entries({maxContentWidth:u,paddingLeft:f}).reduce((function(e,r){var t=o(r,2),n=t[0],a=t[1];return a&&(e[n]=a),e}),{});return e.createElement("div",{className:h,role:p},e.createElement("div",{className:"jkl-alert-message__content",style:n({},y)},e.createElement("div",{className:"jkl-alert-message__icon"},e.createElement(l,{messageType:r})),e.createElement("p",{className:"jkl-alert-message__message jkl-body"},g)))}}var s=i("info"),u=i("error"),f=i("warning"),m=i("success");export{u as ErrorAlertMessage,s as InfoAlertMessage,m as SuccessAlertMessage,f as WarningAlertMessage};
!function(){var r={}.hasOwnProperty;function t(){for(var e=[],n=0;n<arguments.length;n++){var a=arguments[n];if(a){var c=typeof a;if("string"===c||"number"===c)e.push(a);else if(Array.isArray(a)&&a.length){var l=t.apply(null,a);l&&e.push(l)}else if("object"===c)for(var o in a)r.call(a,o)&&a[o]&&e.push(o)}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()}));a.named;function c(r){switch(r.messageType){case"error":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M11.952 7.328C12.384 7.328 12.688 7.072 12.688 6.624C12.688 6.192 12.384 5.92 11.952 5.92C11.536 5.92 11.248 6.192 11.248 6.624C11.248 7.072 11.536 7.328 11.952 7.328ZM11.504 18H12.512V9.408H11.504V18Z",fill:"currentColor"}));case"success":return e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return e.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),e.createElement("path",{className:"jkl-icon-exclamation",d:"M11.112 14.624H11.688L11.896 11.36V6H10.904V11.36L11.112 14.624ZM11.4 18.24C11.784 18.24 12.136 17.952 12.136 17.504C12.136 17.072 11.784 16.784 11.4 16.784C11.016 16.784 10.664 17.072 10.664 17.504C10.664 17.952 11.016 18.24 11.4 18.24Z",fill:"currentColor"}));default:return null}}function l(r){return function(t){var l=t.className,o=void 0===l?"":l,s=t.inverted,i=t.maxContentWidth,u=t.paddingLeft,m=t.role,f=void 0===m?"status":m,g=t.children,p=a("jkl-alert-message","jkl-alert-message--"+r,o,{"jkl-alert-message--dark":s}),w={maxWidth:i,paddingLeft:u};return e.createElement("div",{className:p,role:f},e.createElement("div",{className:"jkl-alert-message__content","data-testid":"alert-message-content",style:n({},w)},e.createElement("div",{className:"jkl-alert-message__icon"},e.createElement(c,{messageType:r})),e.createElement("p",{className:"jkl-alert-message__message jkl-body"},g)))}}var o=l("info"),s=l("error"),i=l("warning"),u=l("success");export{s as ErrorAlertMessage,o as InfoAlertMessage,u as SuccessAlertMessage,i as WarningAlertMessage};

@@ -6,2 +6,10 @@ # Change Log

## 1.1.1 (2020-05-18)
**Note:** Version bump only for package @fremtind/jkl-alert-message-react
# 1.1.0 (2020-05-15)

@@ -8,0 +16,0 @@

{
"name": "@fremtind/jkl-alert-message-react",
"version": "1.1.0",
"version": "1.1.1",
"publishConfig": {

@@ -37,7 +37,7 @@ "access": "public"

"dependencies": {
"@fremtind/jkl-alert-message": "^1.1.0"
"@fremtind/jkl-alert-message": "^1.1.1"
},
"devDependencies": {
"@fremtind/jkl-core": "^4.2.0",
"@fremtind/jkl-portal-components": "^0.2.5"
"@fremtind/jkl-core": "^4.4.1",
"@fremtind/jkl-portal-components": "^0.2.9"
},

@@ -57,3 +57,3 @@ "peerDependencies": {

},
"gitHead": "25529f650eabe8ab4e21b4d08aeb2caae97feecf"
"gitHead": "666904a487bf82474487600fb4380d4c25eabcac"
}

@@ -33,3 +33,2 @@ # [`@fremtind/jkl-alert-message-react`](https://fremtind.github.io/jokul/komponenter/alert-message)

- `messageType`: **Påkrevd**. Meldingsboks type. `string`
- `children`: **Påkrevd**. Innholdet i meldingsboksen. `ReactNode`

@@ -43,3 +42,3 @@ - `maxContentWidth`: Setter maks bredde på innholdet. Innholdet vil søke mot senter av siden `string`

```jsx
<SystemMessage messageType="info">Filopplasting er for tiden slått av</SystemMessage>
<InfoAlertMessage>Filopplasting er for tiden slått av</InfoAlertMessage>
```

@@ -50,5 +49,5 @@

```jsx
<SystemMessage messageType="error" maxContentWidth="1532px" paddingLeft="1rem">
<ErrorAlertMessage maxContentWidth="1532px" paddingLeft="1rem">
Feilopplastingtjenesten opplever for tiden problemer
</SystemMessage>
</ErrorAlertMessage>
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc