@fremtind/jkl-alert-message-react
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -124,3 +124,3 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
messageType: messageType | ||
})), /*#__PURE__*/React.createElement("p", { | ||
})), /*#__PURE__*/React.createElement("span", { | ||
className: "jkl-alert-message__message jkl-body" | ||
@@ -127,0 +127,0 @@ }, children), (dismissAction === null || dismissAction === void 0 ? void 0 : dismissAction.handleDismiss) && /*#__PURE__*/React.createElement(IconButton, { |
@@ -1,1 +0,1 @@ | ||
import e from"@babel/runtime/helpers/defineProperty";import t from"react";import r from"classnames";import{IconButton as n}from"@fremtind/jkl-icon-button-react";function s(e){switch(e.messageType){case"error":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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 t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return t.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(e){return function(l){var a=l.className,o=void 0===a?"":a,i=l.inverted,m=l.maxContentWidth,d=l.paddingLeft,u=l.role,g=void 0===u?"status":u,p=l.dismissed,f=l.dismissAction,h=l.children,w=r("jkl-alert-message","jkl-alert-message--"+e,o,{"jkl-alert-message--dark":i,"jkl-alert-message--dismissed":p}),v={maxWidth:m,paddingLeft:d};return t.createElement("div",{className:w,role:g},t.createElement("div",{className:"jkl-alert-message__content","data-testid":"alert-message-content",style:c({},v)},t.createElement("div",{"aria-hidden":!0,className:"jkl-alert-message__icon"},t.createElement(s,{messageType:e})),t.createElement("p",{className:"jkl-alert-message__message jkl-body"},h),(null==f?void 0:f.handleDismiss)&&t.createElement(n,{className:"jkl-alert-message__dismiss-button",iconType:"clear",buttonTitle:f.buttonTitle||"Lukk",onClick:f.handleDismiss})))}}var o=a("info"),i=a("error"),m=a("warning"),d=a("success");export{i as ErrorAlertMessage,o as InfoAlertMessage,d as SuccessAlertMessage,m as WarningAlertMessage}; | ||
import e from"@babel/runtime/helpers/defineProperty";import t from"react";import r from"classnames";import{IconButton as n}from"@fremtind/jkl-icon-button-react";function s(e){switch(e.messageType){case"error":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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 t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return t.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(e){return function(l){var a=l.className,o=void 0===a?"":a,i=l.inverted,m=l.maxContentWidth,d=l.paddingLeft,u=l.role,g=void 0===u?"status":u,p=l.dismissed,f=l.dismissAction,h=l.children,w=r("jkl-alert-message","jkl-alert-message--"+e,o,{"jkl-alert-message--dark":i,"jkl-alert-message--dismissed":p}),v={maxWidth:m,paddingLeft:d};return t.createElement("div",{className:w,role:g},t.createElement("div",{className:"jkl-alert-message__content","data-testid":"alert-message-content",style:c({},v)},t.createElement("div",{"aria-hidden":!0,className:"jkl-alert-message__icon"},t.createElement(s,{messageType:e})),t.createElement("span",{className:"jkl-alert-message__message jkl-body"},h),(null==f?void 0:f.handleDismiss)&&t.createElement(n,{className:"jkl-alert-message__dismiss-button",iconType:"clear",buttonTitle:f.buttonTitle||"Lukk",onClick:f.handleDismiss})))}}var o=a("info"),i=a("error"),m=a("warning"),d=a("success");export{i as ErrorAlertMessage,o as InfoAlertMessage,d as SuccessAlertMessage,m as WarningAlertMessage}; |
@@ -134,3 +134,3 @@ 'use strict'; | ||
messageType: messageType | ||
})), /*#__PURE__*/React__default['default'].createElement("p", { | ||
})), /*#__PURE__*/React__default['default'].createElement("span", { | ||
className: "jkl-alert-message__message jkl-body" | ||
@@ -137,0 +137,0 @@ }, children), (dismissAction === null || dismissAction === void 0 ? void 0 : dismissAction.handleDismiss) && /*#__PURE__*/React__default['default'].createElement(jklIconButtonReact.IconButton, { |
@@ -124,3 +124,3 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
messageType: messageType | ||
})), /*#__PURE__*/React.createElement("p", { | ||
})), /*#__PURE__*/React.createElement("span", { | ||
className: "jkl-alert-message__message jkl-body" | ||
@@ -127,0 +127,0 @@ }, children), (dismissAction === null || dismissAction === void 0 ? void 0 : dismissAction.handleDismiss) && /*#__PURE__*/React.createElement(IconButton, { |
@@ -1,1 +0,1 @@ | ||
import e from"@babel/runtime/helpers/defineProperty";import t from"react";import r from"classnames";import{IconButton as n}from"@fremtind/jkl-icon-button-react";function s(e){switch(e.messageType){case"error":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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 t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return t.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(e){return function(l){var a=l.className,o=void 0===a?"":a,i=l.inverted,m=l.maxContentWidth,d=l.paddingLeft,u=l.role,g=void 0===u?"status":u,p=l.dismissed,f=l.dismissAction,h=l.children,w=r("jkl-alert-message","jkl-alert-message--"+e,o,{"jkl-alert-message--dark":i,"jkl-alert-message--dismissed":p}),v={maxWidth:m,paddingLeft:d};return t.createElement("div",{className:w,role:g},t.createElement("div",{className:"jkl-alert-message__content","data-testid":"alert-message-content",style:c({},v)},t.createElement("div",{"aria-hidden":!0,className:"jkl-alert-message__icon"},t.createElement(s,{messageType:e})),t.createElement("p",{className:"jkl-alert-message__message jkl-body"},h),(null==f?void 0:f.handleDismiss)&&t.createElement(n,{className:"jkl-alert-message__dismiss-button",iconType:"clear",buttonTitle:f.buttonTitle||"Lukk",onClick:f.handleDismiss})))}}var o=a("info"),i=a("error"),m=a("warning"),d=a("success");export{i as ErrorAlertMessage,o as InfoAlertMessage,d as SuccessAlertMessage,m as WarningAlertMessage}; | ||
import e from"@babel/runtime/helpers/defineProperty";import t from"react";import r from"classnames";import{IconButton as n}from"@fremtind/jkl-icon-button-react";function s(e){switch(e.messageType){case"error":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("rect",{x:"4",y:"4.22168",width:"1",height:"22",transform:"rotate(-45 4 4.22168)",fill:"currentColor"}));case"info":return t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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 t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.createElement("path",{d:"M7 13.5L10 16.5L19.5 7",stroke:"currentColor"}));case"warning":return t.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("circle",{cx:"12",cy:"12",r:"11.5",stroke:"currentColor"}),t.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(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(e){return function(l){var a=l.className,o=void 0===a?"":a,i=l.inverted,m=l.maxContentWidth,d=l.paddingLeft,u=l.role,g=void 0===u?"status":u,p=l.dismissed,f=l.dismissAction,h=l.children,w=r("jkl-alert-message","jkl-alert-message--"+e,o,{"jkl-alert-message--dark":i,"jkl-alert-message--dismissed":p}),v={maxWidth:m,paddingLeft:d};return t.createElement("div",{className:w,role:g},t.createElement("div",{className:"jkl-alert-message__content","data-testid":"alert-message-content",style:c({},v)},t.createElement("div",{"aria-hidden":!0,className:"jkl-alert-message__icon"},t.createElement(s,{messageType:e})),t.createElement("span",{className:"jkl-alert-message__message jkl-body"},h),(null==f?void 0:f.handleDismiss)&&t.createElement(n,{className:"jkl-alert-message__dismiss-button",iconType:"clear",buttonTitle:f.buttonTitle||"Lukk",onClick:f.handleDismiss})))}}var o=a("info"),i=a("error"),m=a("warning"),d=a("success");export{i as ErrorAlertMessage,o as InfoAlertMessage,d as SuccessAlertMessage,m as WarningAlertMessage}; |
@@ -6,2 +6,8 @@ # Change Log | ||
## 1.6.1 (2021-03-25) | ||
### Bug Fixes | ||
- <div> cannot appear as a descendant of <p> ([eda1926](https://github.com/fremtind/jokul/commit/eda192667077e06f1273fe0c32ea7414aa04acc4)) | ||
## 1.6.0 (2021-03-05) | ||
@@ -8,0 +14,0 @@ |
{ | ||
"name": "@fremtind/jkl-alert-message-react", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"publishConfig": { | ||
@@ -59,3 +59,3 @@ "access": "public" | ||
}, | ||
"gitHead": "49714fb5cad8d8bc34d4b8153440049c6d7fe7f5" | ||
"gitHead": "e427b256b211e5cafffe5604acdde1f80ce216f8" | ||
} |
32925
456