@helsenorge/designsystem-react 1.0.0-beta102 → 1.0.0-beta106
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/Button-397ff5a8.js +2 -0
- package/Button-397ff5a8.js.map +1 -0
- package/Checkbox-acd12b0c.js +2 -0
- package/Checkbox-acd12b0c.js.map +1 -0
- package/{Close-a45973d6.js → Close-060173de.js} +2 -2
- package/Close-060173de.js.map +1 -0
- package/FormGroup-b2b6efe0.js +2 -0
- package/FormGroup-b2b6efe0.js.map +1 -0
- package/{Icon-89da8de4.js → Icon-537c6b21.js} +2 -2
- package/Icon-537c6b21.js.map +1 -0
- package/{Input-44307d29.js → Input-59ca2467.js} +2 -2
- package/Input-59ca2467.js.map +1 -0
- package/{Loader-fa16a352.js → Loader-bc13d060.js} +2 -2
- package/Loader-bc13d060.js.map +1 -0
- package/{Modal-a50151e1.js → Modal-3c7f9f93.js} +2 -2
- package/Modal-3c7f9f93.js.map +1 -0
- package/{RadioButton-fe4bbd36.js → RadioButton-c173d440.js} +2 -2
- package/RadioButton-c173d440.js.map +1 -0
- package/{Textarea-e1d1144c.js → Textarea-78e20c9a.js} +2 -2
- package/Textarea-78e20c9a.js.map +1 -0
- package/{Title-af53f589.js → Title-9df559dd.js} +2 -2
- package/Title-9df559dd.js.map +1 -0
- package/Validation-16a8bdcd.js +2 -0
- package/Validation-16a8bdcd.js.map +1 -0
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/Badge/index.js +1 -1
- package/components/Button/Button.d.ts +2 -0
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/componentdata.json +19 -0
- package/components/Button/index.js +1 -1
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Close/index.js +1 -1
- package/components/Expander/Expander.d.ts.map +1 -1
- package/components/Expander/index.js +1 -1
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/ExpanderList/styles.module.scss +5 -0
- package/components/ExpanderList/styles.module.scss.d.ts +1 -0
- package/components/FormExample/index.js +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/HighlightBox/HighlightBox.d.ts +3 -0
- package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
- package/components/HighlightBox/componentdata.json +19 -0
- package/components/HighlightBox/index.js +1 -1
- package/components/HighlightBox/styles.module.scss +118 -33
- package/components/Icons/AcupunctureBack.js +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/NoEye.js +1 -1
- package/components/Icons/SectionSign.js +1 -1
- package/components/Icons/SpeechBubble.js +1 -1
- package/components/Icons/SupportingPerson.js +1 -1
- package/components/Icons/Syringe.js +1 -1
- package/components/Icons/index.js +1 -1
- package/components/Input/index.js +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/List/index.js +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Logo/index.js +1 -1
- package/components/Modal/index.js +1 -1
- package/components/NotificationPanel/NotificationPanel.d.ts +1 -1
- package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
- package/components/NotificationPanel/componentdata.json +1 -1
- package/components/NotificationPanel/index.js +1 -1
- package/components/NotificationPanel/styles.module.scss +66 -51
- package/components/NotificationPanel/styles.module.scss.d.ts +9 -10
- package/components/Portal/index.js +1 -1
- package/components/RadioButton/index.js +1 -1
- package/components/Slider/index.js +1 -1
- package/components/Spacer/index.js +1 -1
- package/components/Textarea/index.js +1 -1
- package/components/Tile/index.js +1 -1
- package/components/Title/index.js +1 -1
- package/components/Validation/index.js +1 -1
- package/constants-eb74321e.js +2 -0
- package/constants-eb74321e.js.map +1 -0
- package/constants.d.ts +1 -0
- package/constants.d.ts.map +1 -1
- package/hooks/useSize.d.ts +9 -0
- package/hooks/useSize.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +2 -6
- package/scss/_input.scss +1 -0
- package/useBreakpoint-552af2b9.js +2 -0
- package/useBreakpoint-552af2b9.js.map +1 -0
- package/useSticky-d61d1f0b.js +2 -0
- package/useSticky-d61d1f0b.js.map +1 -0
- package/Button-d5147e38.js +0 -2
- package/Button-d5147e38.js.map +0 -1
- package/Checkbox-798282e4.js +0 -2
- package/Checkbox-798282e4.js.map +0 -1
- package/Close-a45973d6.js.map +0 -1
- package/FormGroup-43f9c2cb.js +0 -2
- package/FormGroup-43f9c2cb.js.map +0 -1
- package/Icon-89da8de4.js.map +0 -1
- package/Input-44307d29.js.map +0 -1
- package/Loader-fa16a352.js.map +0 -1
- package/Modal-a50151e1.js.map +0 -1
- package/RadioButton-fe4bbd36.js.map +0 -1
- package/Textarea-e1d1144c.js.map +0 -1
- package/Title-af53f589.js.map +0 -1
- package/Validation-2eb5aa55.js +0 -2
- package/Validation-2eb5aa55.js.map +0 -1
- package/constants-ad6c82db.js +0 -2
- package/constants-ad6c82db.js.map +0 -1
- package/useBreakpoint-a7989506.js +0 -2
- package/useBreakpoint-a7989506.js.map +0 -1
- package/useSticky-194f2b78.js +0 -2
- package/useSticky-194f2b78.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as t}from"../../_tslib-51c8a283.js";import r from"react";import{c as a}from"../../index-9b84fabc.js";import{I as l}from"../../Icon-
|
|
1
|
+
import{b as e}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as t}from"../../_tslib-51c8a283.js";import r from"react";import{c as a}from"../../index-9b84fabc.js";import{I as l}from"../../Icon-537c6b21.js";import{A as i,I as o}from"../../constants-eb74321e.js";import{u as s,B as n}from"../../useBreakpoint-552af2b9.js";import{u as m}from"../../useHover-9710204a.js";import c from"./styles.module.scss";import"../../grid-11a70eb7.js";var d=function(e){var t=e.isExtraSmall,a=e.isHovered,l=r.createElement("path",{d:"M19.171 32.951l1.409 1.42L31.031 24 20.58 13.63l-1.409 1.42 9.02 8.95z"}),i=r.createElement("path",{d:"M24.479 11.63L36.93 23.999 24.479 36.37l-1.409-1.419L33.083 25H13v-2h20.085L23.07 13.049z"}),o=r.createElement("path",{d:"M17.885 32.577l1.779 1.793 10.451-10.371L19.664 13.63l-1.779 1.793 8.644 8.576z"});return t?a?r.createElement("path",{d:"M25.98 11.103l12.977 12.896L25.98 36.897l-1.78-1.794 9.899-9.841-20.204.001v-2.526l20.204-.001-9.899-9.839z"}):o:a?i:l},p=r.forwardRef((function(p,v){var f,u=p.children,h=p.className,_=void 0===h?"":h,k=p.color,b=void 0===k?"neutral":k,E=p.icon,L=p.size,z=void 0===L?"medium":L,g=p.chevron,j=void 0!==g&&g,N=p.testId,H=p.target,I=t(p,["children","className","color","icon","size","chevron","testId","target"]),x=m(),y=x.hoverRef,B=x.isHovered,M=s(),S="small"!==z&&!(!j&&!E);return r.createElement("li",{ref:v,"data-testid":N,"data-analyticsid":i.Link},r.createElement("a",Object.assign({className:a(c["link-list__anchor"],c["link-list__anchor--"+b],(f={},e(f,c["link-list__anchor--small"],"small"===z),e(f,c["link-list__anchor--medium"],"medium"===z),e(f,c["link-list__anchor--large"],"large"===z),f),_),ref:y,rel:"_blank"===H?"noopener noreferrer":void 0,target:H},I),S&&E&&r.createElement("span",{className:c["link-list__icon"]},r.cloneElement(E,{size:M===n.xs?o.XSmall:o.Small,isHovered:B})),r.createElement("span",{className:c["link-list__content"]},u),S&&j&&r.createElement("span",{className:c["link-list__chevron"]},r.createElement(l,{svgIcon:d,isHovered:B,size:o.XSmall}))))})),v=r.forwardRef((function(t,l){var o,s=t.children,n=t.className,m=void 0===n?"":n,d=t.chevron,v=void 0!==d&&d,f=t.size,u=void 0===f?"medium":f,h=t.color,_=t.topBorder,k=void 0===_||_,b=t.bottomBorder,E=void 0===b||b,L=t.testId;return r.createElement("ul",{ref:l,className:a(c["link-list"],(o={},e(o,c["link-list--hastopborder"],k),e(o,c["link-list--nobottomborder"],!E),o),m||""),"data-testid":L,"data-analyticsid":i.LinkList},r.Children.map(s,(function(e){if(e.type===p)return r.cloneElement(e,{color:h,size:u,chevron:v})})))}));v.Link=p,p.displayName="LinkList.Link";export default v;export{v as LinkList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/components/List/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import{c as e}from"../../index-9b84fabc.js";import
|
|
1
|
+
import t from"react";import{c as e}from"../../index-9b84fabc.js";import s from"./styles.module.scss";import{A as a}from"../../constants-eb74321e.js";export default function(r){var i=r.children,m=r.className,c=r.testId;return t.createElement("ul",{className:e(s.list,m),"data-testid":c,"data-analyticsid":a.List},i.map((function(e,a){return t.createElement("li",{className:s.list__item,key:a},e)})))}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as s}from"../../Loader-
|
|
1
|
+
import{L as s}from"../../Loader-bc13d060.js";export{O as Overlay,L as default}from"../../Loader-bc13d060.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"../../uuid-fe7442b7.js";import"./styles.module.scss";import"../../constants-eb74321e.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/components/Logo/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_tslib-51c8a283.js";import t from"react";import{A as c}from"../../constants-
|
|
1
|
+
import{_ as e}from"../../_tslib-51c8a283.js";import t from"react";import{A as c}from"../../constants-eb74321e.js";import{g as l}from"../../color-a10c7892.js";import"../../index-0e78dfa0.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";var a=function(e){var a=e.size,s=void 0===a?300:a,v=e.color,h=void 0===v?"black":v,i=e.className,o=void 0===i?"":i,r=e.testId;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,role:"img","aria-labelledby":"logo-title",viewBox:"0 0 502 220",className:o,"data-testid":r,"data-analyticsid":c.Logo},t.createElement("title",{id:"logo-title"},"Helsenorge"),t.createElement("g",{fill:l(h,500)},t.createElement("path",{d:"M39.8 2.5v26.9H17V2.5H1v69.9h16V43.6h22.8v28.8h16.1V2.5zM250.3 58.6V2.5h-16v69.9h43.5V58.6zM142.9 122.5c-16.1 0-27.4 13.6-27.4 33.1s11.2 33.1 27.4 33.1 27.4-13.6 27.4-33.1-11.3-33.1-27.4-33.1zm19 33.1c0 11.9-5 25.9-19 25.9s-19-13.9-19-25.9c0-11.9 5-25.9 19-25.9s19 14 19 25.9zM501 40c0-19.1-11.1-32.4-27-32.4-16.4 0-27.4 13.3-27.4 33.1 0 19.5 11.5 33.1 28 33.1 12.2 0 21.4-6 24.7-16.2l.5-1.6h-8.3l-.3.7c-2.8 6.2-8.8 9.8-16.6 9.8-12.9 0-18.5-11.5-19.5-22.7H501V40zm-8.3-3.2h-37.6c1-10.8 6.5-21.9 18.9-21.9 13.2 0 18.3 12.6 18.7 21.9zM30.4 122.4c-10.8 0-16.6 6.7-19.5 11.8v-9.9H3.3v62.6h8.1v-31.4c0-8.4 4.4-25.7 18.1-25.7 14 0 15.9 12 15.9 25v32.1h8.1v-32.1c.1-16.1-2.7-32.4-23.1-32.4zM134.3 59V43H157V30h-22.7V15.9H165V2.5h-46.4v69.9h47.3V59zM466.7 173.4v-16h22.7v-13h-22.7v-14.1h30.7v-13.4H451v69.9h47.3v-13.4zM246.7 140.5v-16.3h-7.6v62.6h8.1v-37.6l27.3-19.6v-9zM393.5 120.6l-14.7 10.5c-4.4-5.6-11.2-8.7-18.8-8.7-13.6 0-23.6 9.8-23.6 23.3 0 10.6 6.2 19.1 16 22.2l-16 17.5c-4 4.6-5.7 8.3-5.7 12.7 0 12.6 11.1 20.7 28.2 20.7 16.9 0 28.3-8.3 28.3-20.7 0-12.5-11.1-20.6-28.3-20.6-1.7 0-3.9.2-5.6.5l8-9c12.9-.7 22.2-10.4 22.2-23.3 0-2.8-.4-5.5-1.2-7.8 0-.1-.1-.2-.1-.3l11.2-8.1v-8.9zm-34.4 64.2c12.1 0 20 5.2 20 13.4s-7.8 13.5-20 13.5c-12.1 0-19.9-5.3-19.9-13.5 0-7.8 8.3-13.4 19.9-13.4zm.9-23c-8.8 0-15.2-6.8-15.2-16 0-9.3 6.4-16 15.2-16s15.2 6.7 15.2 16c0 9.2-6.4 16-15.2 16zM366.7 30.3c-6.6-2.3-13.5-4.7-13.5-9.2 0-4.8 4.2-7 9.3-7 5.4 0 9 4.5 9 8.5v.8h16.2v-.6c0-13-10.2-21.7-25.4-21.7-15.3 0-24.9 7.8-24.9 20.4 0 14.7 13.1 18.4 22.9 21.9 6.5 2.4 13.6 4.3 13.6 8.7 0 4.6-3.4 8-10.6 8-6.5 0-10.9-3.8-10.9-9.4v-.8h-16.7v.8c0 14.5 10.3 23.1 27.5 23.1 16.5 0 26-7.6 26-21.5 0-14.4-12.5-18.5-22.5-22z"})))},s=function(e){var c=e.size,a=void 0===c?300:c,s=e.color,v=void 0===s?"black":s,h=e.className,i=void 0===h?"":h,o=e.testId;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,role:"img","aria-labelledby":"logo-title",viewBox:"0 0 87 12",className:i,"data-testid":o},t.createElement("title",{id:"logo-title"},"Helsenorge"),t.createElement("g",{fill:l(v,500)},t.createElement("path",{d:"M5 .8v2.8H2.6V.8H1V8h1.6V5.1H5V8h1.6V.8zM20.9 6.6V.8h-1.6V8h4.5V6.6zM57.9 1.4c-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.8 3.4 2.8-1.4 2.8-3.4-1.1-3.4-2.8-3.4zm2 3.4c0 1.2-.5 2.7-2 2.7-1.4 0-2-1.4-2-2.7s.5-2.7 2-2.7 2 1.5 2 2.7zM86 4.7c0-2-1.1-3.3-2.8-3.3-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.9 3.4c1.2 0 2.2-.6 2.5-1.7l.1-.2H85v.1c-.3.6-.9 1-1.7 1-1.3 0-1.9-1.2-2-2.3H86v-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2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as s}from"../../Modal-
|
|
1
|
+
import{M as s}from"../../Modal-3c7f9f93.js";export{b as ModalSize,a as ModalVariants,M as default}from"../../Modal-3c7f9f93.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"../../palette-f206f488.js";import"../../Button-397ff5a8.js";import"../../_tslib-51c8a283.js";import"../../constants-eb74321e.js";import"../../color-a10c7892.js";import"../../index-0e78dfa0.js";import"../../grid-11a70eb7.js";import"../../Icon-537c6b21.js";import"../../Loader-bc13d060.js";import"../../uuid-fe7442b7.js";import"../Loader/styles.module.scss";import"../../useHover-9710204a.js";import"../../useWindowSize-750f9b68.js";import"../Button/styles.module.scss";import"./styles.module.scss";import"../../AlertSignFill-e607ff43.js";import"../../useIsVisible-a1f67a11.js";import"../../Title-9df559dd.js";import"../Title/styles.module.scss";import"../../Close-060173de.js";import"../Close/styles.module.scss";import"../../useBreakpoint-552af2b9.js";import"react-dom";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -14,7 +14,7 @@ interface NotificationPanelProps {
|
|
|
14
14
|
size?: NotificationPanelSizes;
|
|
15
15
|
/** Used in combination with dismissiable property to close the notification panel. */
|
|
16
16
|
onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
17
|
-
/** Toggles the close button in the top right corner. */
|
|
17
|
+
/** Toggles the close button in the top right corner. Will only show if there are children. */
|
|
18
18
|
dismissable?: boolean;
|
|
19
19
|
/** Enables a fluid outer container that spans the entire width of parent. */
|
|
20
20
|
fluid?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPanel.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationPanel/NotificationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,oBAAY,yBAAyB,GAAG,MAAM,GAAG,M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IAAI,CAAC;IAClE,8FAA8F;IAC9F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAUF,QAAA,MAAM,iBAAiB,+FA6ErB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
},
|
|
150
150
|
"dismissable": {
|
|
151
151
|
"defaultValue": null,
|
|
152
|
-
"description": "Toggles the close button in the top right corner.",
|
|
152
|
+
"description": "Toggles the close button in the top right corner. Will only show if there are children.",
|
|
153
153
|
"name": "dismissable",
|
|
154
154
|
"parent": {
|
|
155
155
|
"fileName": "src/components/NotificationPanel/NotificationPanel.tsx",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as e}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import a from"react";import{c as t}from"../../index-9b84fabc.js";import{p as o}from"../../palette-f206f488.js";import{I as r}from"../../Icon-537c6b21.js";import{A as i}from"../../constants-eb74321e.js";import{a as n,A as l}from"../../AlertSignFill-e607ff43.js";import c from"./styles.module.scss";import{C as s}from"../../Close-060173de.js";import"../../_tslib-51c8a283.js";import"../Close/styles.module.scss";import"../../useBreakpoint-552af2b9.js";import"../../grid-11a70eb7.js";var m={info:{color:"kiwi",depth:50},warn:{color:"banana",depth:50},alert:{color:"cherry",depth:100},crisis:{color:"black",depth:0}},p={info:a.createElement(r,{svgIcon:function(e){var t=e.isExtraSmall,o=e.isHovered,r=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 10.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),i=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 8.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),n=a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 10.61a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"});return t?o?a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 8.084a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"}):n:o?i:r},color:o.kiwi900,hoverColor:o.kiwi900}),warn:a.createElement(r,{svgIcon:n,color:"black",hoverColor:"black"}),alert:a.createElement(r,{svgIcon:l,color:o.cherry500,hoverColor:o.cherry500}),alertLabel:a.createElement(r,{svgIcon:n,color:o.cherry500,hoverColor:o.cherry500}),crisis:a.createElement(r,{svgIcon:l,color:o.banana200,hoverColor:o.banana200})},f=a.forwardRef((function(o,r){var n,l,m=o.children,f=o.variant,v=void 0===f?"info":f,d=o.shadow,h=void 0!==d&&d,b=o.dismissable,u=void 0!==b&&b,E=o.onClick,C=o.label,_=o.fluid,w=void 0!==_&&_,y=o.size,g=o.className,j=o.testId;var k,I=!!C&&!m;return k=a.createElement("div",{ref:r,"data-testid":j,"data-analyticsid":i.NotificationPanel,className:t(c["notification-panel"],y&&c["notification-panel--"+y],c["notification-panel--"+v],(n={},e(n,c["notification-panel--shadow"],!w&&h),e(n,c["notification-panel--has-children"],!I),e(n,c["notification-panel--label-only"],I),e(n,c["notification-panel--dismissable"],!I&&u),n),g)},a.createElement("span",{className:c["notification-panel__icon"]},p["alert"===v&&C&&!m?"alertLabel":v]),a.createElement("section",{"aria-label":function(){if(m){var e="";return a.Children.map(m,(function(a){"string"==typeof a&&(e+=a)})),e}return""}(),className:t(c["notification-panel__content"],(l={},e(l,c["notification-panel__content--crisis"],"crisis"===v),e(l,c["notification-panel__content--alert"],"alert"===v),l))},C&&a.createElement("h1",{className:c["notification-panel__label"],dangerouslySetInnerHTML:{__html:C}}),m),!I&&u&&a.createElement("span",{className:c["notification-panel__close"]},a.createElement(s,{ariaLabel:o.ariaLabelCloseBtn,onClick:E}))),w?a.createElement("div",{className:t(c["fluid-wrapper"],c["fluid-wrapper--"+v],e({},c["fluid-wrapper--shadow"],h))},k):k}));export default f;export{m as variantToColorMap};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,16 +5,46 @@
|
|
|
5
5
|
@import '../AnchorLink/styles.module.scss';
|
|
6
6
|
|
|
7
7
|
.notification-panel {
|
|
8
|
-
|
|
8
|
+
$panel: &;
|
|
9
|
+
display: flex;
|
|
9
10
|
width: inherit;
|
|
10
|
-
padding: $spacer;
|
|
11
|
-
grid-template-areas: 'icon' 'content';
|
|
12
|
-
grid-template-columns: 48px auto;
|
|
13
|
-
grid-template-rows: 1fr;
|
|
14
11
|
|
|
12
|
+
&--has-children {
|
|
13
|
+
padding: getSpacer(2xs) getSpacer(s) getSpacer(m) getSpacer(2xs);
|
|
14
|
+
#{$panel}__icon {
|
|
15
|
+
margin-top: getSpacer(2xs);
|
|
16
|
+
margin-right: getSpacer(2xs);
|
|
17
|
+
}
|
|
18
|
+
#{$panel}__content {
|
|
19
|
+
margin-top: getSpacer(s);
|
|
20
|
+
}
|
|
21
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
22
|
+
padding-left: getSpacer(s);
|
|
23
|
+
padding-right: getSpacer(m);
|
|
24
|
+
#{$panel}__icon {
|
|
25
|
+
margin-right: getSpacer(m);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
&--label-only {
|
|
30
|
+
align-items: center;
|
|
31
|
+
padding: getSpacer(m) getSpacer(s) getSpacer(m) getSpacer(2xs);
|
|
32
|
+
#{$panel}__icon {
|
|
33
|
+
display: flex;
|
|
34
|
+
margin-right: getSpacer(2xs);
|
|
35
|
+
}
|
|
36
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
37
|
+
padding: getSpacer(l) getSpacer(m) getSpacer(l) getSpacer(s);
|
|
38
|
+
#{$panel}__icon {
|
|
39
|
+
margin-right: getSpacer(s);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
15
43
|
&--dismissable {
|
|
16
|
-
|
|
17
|
-
|
|
44
|
+
padding: getSpacer(2xs) getSpacer(2xs) getSpacer(m) getSpacer(2xs);
|
|
45
|
+
}
|
|
46
|
+
&--dismissable#{&}--has-children {
|
|
47
|
+
padding-left: getSpacer(s);
|
|
18
48
|
}
|
|
19
49
|
&--small {
|
|
20
50
|
max-width: map-get($grid-breakpoints, sm);
|
|
@@ -34,46 +64,23 @@
|
|
|
34
64
|
&--alert {
|
|
35
65
|
background-color: $cherry100;
|
|
36
66
|
}
|
|
67
|
+
&--alert#{&}--label-only {
|
|
68
|
+
color: $cherry500;
|
|
69
|
+
}
|
|
37
70
|
&--crisis {
|
|
38
71
|
background-color: $black;
|
|
39
72
|
}
|
|
40
73
|
&--shadow {
|
|
41
74
|
box-shadow: 0 0.3rem getSpacer(2xs) -0.1rem rgba(0, 0, 0, 0.15);
|
|
42
75
|
}
|
|
43
|
-
&--haslabel {
|
|
44
|
-
padding: getSpacer(l) $spacer;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&__fluidwrapper {
|
|
48
|
-
display: flex;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
width: 100%;
|
|
51
|
-
|
|
52
|
-
&--info {
|
|
53
|
-
background-color: $kiwi50;
|
|
54
|
-
}
|
|
55
|
-
&--warn {
|
|
56
|
-
background-color: $banana50;
|
|
57
|
-
}
|
|
58
|
-
&--alert {
|
|
59
|
-
background-color: $cherry100;
|
|
60
|
-
}
|
|
61
|
-
&--crisis {
|
|
62
|
-
background-color: $black;
|
|
63
|
-
}
|
|
64
|
-
&--shadow {
|
|
65
|
-
box-shadow: 0 0.3rem getSpacer(2xs) -0.1rem rgba(0, 0, 0, 0.15);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
76
|
|
|
69
|
-
&
|
|
70
|
-
|
|
77
|
+
&__close {
|
|
78
|
+
margin-left: auto;
|
|
79
|
+
padding-left: getSpacer(2xs);
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
&__content {
|
|
74
|
-
|
|
75
|
-
margin: getSpacer(2xs) getSpacer(m);
|
|
76
|
-
|
|
83
|
+
max-width: 772px;
|
|
77
84
|
p {
|
|
78
85
|
margin: 0;
|
|
79
86
|
}
|
|
@@ -103,27 +110,17 @@
|
|
|
103
110
|
|
|
104
111
|
&:focus {
|
|
105
112
|
&:after {
|
|
106
|
-
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'
|
|
113
|
+
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='38px' height='38px' viewBox='0 0 48 48'><polygon points='33.305,14.659,33.305,29.205,32.005,29.205,32.005,16.948,15.804,33.149,14.885,32.229,31.155,15.959,18.761,15.96,18.761,14.659' /></svg>");
|
|
107
114
|
}
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
118
|
}
|
|
112
|
-
|
|
113
|
-
&--isred {
|
|
114
|
-
color: $cherry500;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&--haslabel {
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
margin: 0 1rem;
|
|
121
|
-
}
|
|
122
119
|
}
|
|
123
120
|
|
|
124
121
|
&__label {
|
|
125
122
|
font-size: $font-size-sm;
|
|
126
|
-
line-height:
|
|
123
|
+
line-height: $lineheight-size-xs;
|
|
127
124
|
font-weight: 600;
|
|
128
125
|
margin: 0;
|
|
129
126
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
@@ -131,8 +128,26 @@
|
|
|
131
128
|
line-height: $lineheight-size-md;
|
|
132
129
|
}
|
|
133
130
|
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.fluid-wrapper {
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
width: 100%;
|
|
134
137
|
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
&--info {
|
|
139
|
+
background-color: $kiwi50;
|
|
140
|
+
}
|
|
141
|
+
&--warn {
|
|
142
|
+
background-color: $banana50;
|
|
143
|
+
}
|
|
144
|
+
&--alert {
|
|
145
|
+
background-color: $cherry100;
|
|
146
|
+
}
|
|
147
|
+
&--crisis {
|
|
148
|
+
background-color: $black;
|
|
149
|
+
}
|
|
150
|
+
&--shadow {
|
|
151
|
+
box-shadow: 0 0.3rem getSpacer(2xs) -0.1rem rgba(0, 0, 0, 0.15);
|
|
137
152
|
}
|
|
138
153
|
}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
anchorlink: string;
|
|
3
3
|
anchorlink__icon: string;
|
|
4
|
+
'fluid-wrapper': string;
|
|
5
|
+
'fluid-wrapper--alert': string;
|
|
6
|
+
'fluid-wrapper--crisis': string;
|
|
7
|
+
'fluid-wrapper--info': string;
|
|
8
|
+
'fluid-wrapper--shadow': string;
|
|
9
|
+
'fluid-wrapper--warn': string;
|
|
4
10
|
'notification-panel': string;
|
|
5
|
-
'notification-
|
|
11
|
+
'notification-panel__close': string;
|
|
6
12
|
'notification-panel__content': string;
|
|
7
13
|
'notification-panel__content--crisis': string;
|
|
8
|
-
'notification-panel__content--haslabel': string;
|
|
9
|
-
'notification-panel__content--isred': string;
|
|
10
|
-
'notification-panel__fluidwrapper': string;
|
|
11
|
-
'notification-panel__fluidwrapper--alert': string;
|
|
12
|
-
'notification-panel__fluidwrapper--crisis': string;
|
|
13
|
-
'notification-panel__fluidwrapper--info': string;
|
|
14
|
-
'notification-panel__fluidwrapper--shadow': string;
|
|
15
|
-
'notification-panel__fluidwrapper--warn': string;
|
|
16
14
|
'notification-panel__icon': string;
|
|
17
15
|
'notification-panel__label': string;
|
|
18
16
|
'notification-panel--alert': string;
|
|
19
17
|
'notification-panel--crisis': string;
|
|
20
18
|
'notification-panel--dismissable': string;
|
|
21
|
-
'notification-panel--
|
|
19
|
+
'notification-panel--has-children': string;
|
|
22
20
|
'notification-panel--info': string;
|
|
21
|
+
'notification-panel--label-only': string;
|
|
23
22
|
'notification-panel--large': string;
|
|
24
23
|
'notification-panel--medium': string;
|
|
25
24
|
'notification-panel--shadow': string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import{createPortal as e}from"react-dom";import{A as r}from"../../constants-
|
|
1
|
+
import t from"react";import{createPortal as e}from"react-dom";import{A as r}from"../../constants-eb74321e.js";export default function(n){var a=n.children,o=n.parent,i=n.className,c=n.testId,d=t.useMemo((function(){return document.createElement("div")}),[]);return d.setAttribute("data-analyticsid",r.Portal),c&&d.setAttribute("data-testid",c),t.useEffect((function(){var t=o&&o.appendChild?o:document.body,e=["portal-container"];return i&&i.split(" ").forEach((function(t){return e.push(t)})),e.forEach((function(t){return d.classList.add(t)})),t.appendChild(d),function(){t.removeChild(d)}}),[d,o,i]),e(a,d)}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R as o}from"../../RadioButton-
|
|
1
|
+
import{R as o}from"../../RadioButton-c173d440.js";export{R as RadioButton,R as default}from"../../RadioButton-c173d440.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"../../uuid-fe7442b7.js";import"./styles.module.scss";import"../../constants-eb74321e.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import t,{useState as n,useRef as r,useEffect as a}from"react";import{c as o}from"../../index-9b84fabc.js";import{T as i}from"../../Title-
|
|
1
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import t,{useState as n,useRef as r,useEffect as a}from"react";import{c as o}from"../../index-9b84fabc.js";import{T as i}from"../../Title-9df559dd.js";import c from"./styles.module.scss";import{A as u}from"../../constants-eb74321e.js";import"../Title/styles.module.scss";var s=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1},l=function(e){return m(e)?e.touches[0].pageX:e.pageX},d=function(e){var t=e?e.getBoundingClientRect():void 0;return t?t.right-t.left:0},m=function(e){return("touchcancel"===e.type||"touchend"===e.type||"touchenter"===e.type||"touchleave"===e.type||"touchmove"===e.type||"touchstart"===e.type)&&!(0===e.touches.length)},f=function(e,t,n){var r=e-e%t,a=Math.floor(n/t)*t;e>a&&(e>a+(n-a)/2&&(r=n));return Math.round(r)},v=t.forwardRef((function(m,v){var p=m.title,h=m.labelLeft,_=m.labelRight,g=m.disabled,E=void 0!==g&&g,y=m.step,b=void 0===y?1:y,w=m.onChange,k=m.testId,L=n(50),x=e(L,2),N=x[0],A=x[1],D=n(!1),M=e(D,2),R=M[0],j=M[1],T=n(0),B=e(T,2),C=B[0],P=B[1],I=n(0),S=e(I,2),X=S[0],H=S[1],K=n(0),U=e(K,2),q=U[0],z=U[1],F=n(0),G=e(F,2),J=G[0],O=G[1],Q=v||r(null),V=r(null),W=function(e){ne(e)},Y=function(e){te(e)},Z=function(e){ne(e)},$=function(e){te(e)};a((function(){var e=d(Q.current),t=d(V.current);z(function(e,t,n,r,a){return(t-n)/(a-r)*e}(N,e,t,0,100)),P(e),H(t)}),[]),a((function(){R&&(function(e,t){document.addEventListener("mousemove",e,!1),document.addEventListener("mouseup",t,!1)}(W,Y),function(e,t){document.addEventListener("touchmove",e,!1),document.addEventListener("touchend",t,!1)}(Z,$))}),[R]),a((function(){!E&&w&&w(N)}),[N]);var ee=function(e){var t;if(!E){var n=d(Q.current),r=d(V.current),a=l(e);!function(e,t,n,r){var a=t?t.getBoundingClientRect():void 0,o=a?a.left:0;r(o?e-(o+n/2):0)}(a,V.current,r,re),j(!0),O(a),P(n),H(r),null===(t=V.current)||void 0===t||t.focus(),s(e)}},te=function(e){E||(j(!1),function(e,t){document.removeEventListener("mousemove",e,!1),document.removeEventListener("mouseup",t,!1)}(W,Y),function(e,t){document.removeEventListener("touchmove",e,!1),document.removeEventListener("touchend",t,!1)}(Z,$),s(e))},ne=function(e){if(!E&&R){var t=l(e);re(t-J),s(e)}},re=function(e){if(0!==e){var t=function(e,t,n,r){var a=r+e;return a<0&&(a=0),a>t-n&&(a=t-n),a}(e,C,X,q);z(t),O(t+e),A(function(e,t,n,r,a,o){var i=(t-n)/(o-a),c=Math.round(e/i);return f(c,r,o)}(t,C,X,b,0,100))}};return t.createElement("div",{className:c.slider,"data-testid":k,"data-analyticsid":u.Slider},p&&t.createElement(i,{htmlMarkup:"h3",margin:1.5,appearance:"title3"},p),t.createElement("div",{ref:Q,className:o(c["slider__track-wrapper"],E?c["slider__track-wrapper--disabled"]:""),onMouseDown:ee,onTouchStart:ee,"data-testid":"tracker"},t.createElement("div",{className:o(c.slider__track,E?c["slider__track--disabled"]:"")}),t.createElement("div",{ref:V,className:o(c.slider__trigger,E?c["slider__trigger--disabled"]:""),style:{left:"".concat(q,"px")},onKeyDown:function(e){if(!E){var t=(C-X)/100;"ArrowRight"!==e.key&&"ArrowDown"!==e.key||re(b*t),"ArrowLeft"!==e.key&&"ArrowUp"!==e.key||re(-b*t)}},role:"slider","aria-valuenow":N,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"".concat(p?p+" ":"").concat(h?h+" ":"").concat(_?_+" ":""),tabIndex:E?-1:0},t.createElement("div",{className:o(c["slider__trigger-inner"],E?c["slider__trigger-inner--disabled"]:"")}))),(h||_)&&t.createElement("span",{className:c.slider__options},t.createElement("p",{className:c.slider__text,"aria-hidden":!0},h),t.createElement("p",{className:c.slider__text,"aria-hidden":!0},_)))}));export default v;export{v as Slider};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import
|
|
1
|
+
import{b as s}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import e from"react";import{c as a}from"../../index-9b84fabc.js";import r from"./styles.module.scss";import{A as l}from"../../constants-eb74321e.js";var c=e.forwardRef((function(c,p){var t,x=c.size,o=void 0===x?"s":x,m=c.className,i=c.testId,d=a(r.spacer,(s(t={},r["spacer--4xs"],"4xs"===o),s(t,r["spacer--3xs"],"3xs"===o),s(t,r["spacer--2xs"],"2xs"===o),s(t,r["spacer--xs"],"xs"===o),s(t,r["spacer--s"],"s"===o),s(t,r["spacer--m"],"m"===o),s(t,r["spacer--l"],"l"===o),s(t,r["spacer--xl"],"xl"===o),s(t,r["spacer--2xl"],"2xl"===o),s(t,r["spacer--3xl"],"3xl"===o),s(t,r["spacer--4xl"],"4xl"===o),s(t,r["spacer--5xl"],"5xl"===o),s(t,r["spacer--6xl"],"6xl"===o),t),m);return e.createElement("span",{className:d,ref:p,"data-testid":i,"data-analyticsid":l.Spacer})}));export default c;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as
|
|
1
|
+
import{T as e}from"../../Textarea-78e20c9a.js";export{T as default}from"../../Textarea-78e20c9a.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"../../_tslib-51c8a283.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-eb74321e.js";import"../../uuid-fe7442b7.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/components/Tile/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,b as t}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as
|
|
1
|
+
import{_ as e,b as t}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as l}from"react";import{c as a}from"../../index-9b84fabc.js";import{A as o,I as n}from"../../constants-eb74321e.js";import"../../Icon-537c6b21.js";import s from"./styles.module.scss";var c=r.forwardRef((function(e,i){var l,o=e.children,n=e.className,c=e.htmlMarkup,m=void 0===c?"span":c,d=e.highlighted,p=e.compact,f=a(s.tile__title,(t(l={},s["tile__title--highlighted"],d),t(l,s["tile__title--compact"],p),l),n),u=m;return r.createElement(u,{className:f,ref:i},o)})),m=r.forwardRef((function(c,m){var d,p=c.icon,f=c.title,u=c.className,h=void 0===u?"":u,g=c.description,_=c.fixed,b=void 0!==_&&_,v=c.highlighted,E=void 0!==v&&v,N=c.testId,j=i(c,["icon","title","className","description","fixed","highlighted","testId"]),x=l(!1),w=e(x,2),I=w[0],M=w[1],k=!g,y=a(s.tile,(t(d={},s["tile--fixed"],b),t(d,s["tile--compact"],k),t(d,s["tile--highlighted"],E),d),h),B=a(s["title-wrapper"],t({},s["title-wrapper--compact"],k));return r.createElement("a",Object.assign({ref:m,className:y,onMouseEnter:function(){return M(!0)},onMouseLeave:function(){return M(!1)},onFocus:function(){return M(!0)},onBlur:function(){return M(!1)},"data-testid":N,"data-analyticsid":o.Tile,rel:"_blank"===c.target?"noopener noreferrer":c.rel},j),r.createElement("div",{className:B},r.cloneElement(p,{size:n.Medium,isHovered:I,color:E?"white":"black"}),r.cloneElement(f,{highlighted:E,compact:k})),g?r.createElement("p",{className:s.tile__description},g):null)}));m.Title=c;export default m;export{m as Tile};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as s}from"../../Title-
|
|
1
|
+
import{T as s}from"../../Title-9df559dd.js";export{T as default,i as instanceOfTitleMargin}from"../../Title-9df559dd.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-eb74321e.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V as s}from"../../Validation-
|
|
1
|
+
import{V as s}from"../../Validation-16a8bdcd.js";export{V as Validation,V as default}from"../../Validation-16a8bdcd.js";import"react";import"../../index-9b84fabc.js";import"../../FormGroup-b2b6efe0.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"../FormGroup/styles.module.scss";import"../../Checkbox-acd12b0c.js";import"../../uuid-fe7442b7.js";import"../../Check-6291ad09.js";import"../../Icon-537c6b21.js";import"../../_tslib-51c8a283.js";import"../../constants-eb74321e.js";import"../../color-a10c7892.js";import"../../index-0e78dfa0.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../Checkbox/styles.module.scss";import"../../RadioButton-c173d440.js";import"../RadioButton/styles.module.scss";import"../../Input-59ca2467.js";import"../../useBreakpoint-552af2b9.js";import"../Input/styles.module.scss";import"../../Title-9df559dd.js";import"../Title/styles.module.scss";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a,o,n,e,i;!function(a){a[a.XSmall=38]="XSmall",a[a.Small=48]="Small",a[a.Medium=64]="Medium",a[a.Large=80]="Large",a[a.XLarge=130]="XLarge"}(a||(a={})),function(a){a[a.Modal=13e5]="Modal",a[a.ExpanderTrigger=1e4]="ExpanderTrigger"}(o||(o={})),function(a){a.onwhite="onwhite",a.ongrey="ongrey",a.onblueberry="onblueberry",a.ondark="ondark",a.oninvalid="oninvalid"}(n||(n={})),function(a){a.normal="normal",a.bigform="bigform"}(e||(e={})),function(a){a.AnchorLink="anchor-link",a.Avatar="avatar",a.Badge="badge",a.Button="button",a.Checkbox="checkbox",a.Close="close",a.Expander="expander",a.ExpanderList="expander-list",a.ExpanderListExpander="expander-list-expander",a.FormGroup="form-group",a.HighlightBox="highlight-box",a.Icon="icon",a.Input="input",a.Link="link",a.LinkList="link-list",a.List="list",a.Loader="loader",a.Logo="logo",a.Modal="modal",a.NotificationPanel="notification-panel",a.Portal="portal",a.RadioButton="radio-button",a.Slider="slider",a.Spacer="spacer",a.Textarea="textarea",a.Tile="tile",a.Title="title",a.Validation="validation"}(i||(i={}));export{i as A,n as F,a as I,o as Z,e as a};
|
|
2
|
+
//# sourceMappingURL=constants-eb74321e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-eb74321e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/constants.d.ts
CHANGED
package/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc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ED,oBAAY,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAEjF,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,oBAAoB,2BAA2B;IAC/C,SAAS,eAAe;IACxB,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,iBAAiB,uBAAuB;IACxC,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Lytt på endringer i størrelse på et element
|
|
4
|
+
*
|
|
5
|
+
* @param ref Element som skal observeres.
|
|
6
|
+
* @returns Object med høyde, bredde, x og y til elementet
|
|
7
|
+
*/
|
|
8
|
+
export declare const useSize: (ref?: import("react").RefObject<HTMLElement> | undefined) => DOMRect | undefined;
|
|
9
|
+
//# sourceMappingURL=useSize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useSize.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,mFAanB,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export { useIsVisible } from './hooks/useIsVisible';
|
|
|
8
8
|
export { useLayoutEvent } from './hooks/useLayoutEvent';
|
|
9
9
|
export { useSticky } from './hooks/useSticky';
|
|
10
10
|
export { useWindowSize } from './hooks/useWindowSize';
|
|
11
|
+
export { useSize } from './hooks/useSize';
|
|
11
12
|
export * from './constants';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,cAAc,aAAa,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{t as theme}from"./index-0e78dfa0.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-
|
|
1
|
+
export{t as theme}from"./index-0e78dfa0.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-552af2b9.js";import{_ as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useState as n,useEffect as o}from"react";export{u as useFocusTrap,a as useIntersectionObserver,b as useIsVisible}from"./useIsVisible-a1f67a11.js";export{u as useHover}from"./useHover-9710204a.js";export{u as useLayoutEvent,a as useSticky}from"./useSticky-d61d1f0b.js";export{u as useWindowSize}from"./useWindowSize-750f9b68.js";export{A as AnalyticsId,F as FormMode,a as FormVariant,I as IconSize,Z as ZIndex}from"./constants-eb74321e.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";var r=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'].join(","),i=function(t,a){var i=n(),s=e(i,2),d=s[0],u=s[1];return o((function(){var e=function(){var e,n=null===(e=t.current)||void 0===e?void 0:e.querySelectorAll(r);u(n)},n=new MutationObserver(e);return(null==t?void 0:t.current)&&n.observe(t.current,{subtree:!0,childList:!0}),e(),function(){n.disconnect()}}),[t]),o((function(){a?null==d||d.forEach((function(t){var e=t.getAttribute("data-tabindex");e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")})):null==d||d.forEach((function(t){t.hasAttribute("tabindex")&&t.setAttribute("data-tabindex","".concat(t.tabIndex)),t.tabIndex=-1}))}),[a,d]),d},s=function(t){var a=n(),r=e(a,2),i=r[0],s=r[1];return o((function(){var e=new ResizeObserver((function(t){s(t[0].target.getBoundingClientRect())}));return(null==t?void 0:t.current)&&e.observe(null==t?void 0:t.current),e.disconnect}),[t]),i};export{i as useFocusToggle,s as useSize};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helsenorge/designsystem-react",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.0-
|
|
4
|
+
"version": "1.0.0-beta106",
|
|
5
5
|
"description": "The official design system for Helsenorge built with React.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "tfs",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"bootstrap": "4.6.1",
|
|
25
25
|
"normalize.css": "8.0.1",
|
|
26
26
|
"react": ">= 16.12.0",
|
|
27
|
-
"react-dom": ">= 16.12.0"
|
|
28
|
-
"styled-components": "^5.0.0"
|
|
27
|
+
"react-dom": ">= 16.12.0"
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
31
30
|
"bootstrap": "4.6.1"
|
|
@@ -55,7 +54,6 @@
|
|
|
55
54
|
"@types/jest": "^25.2.3",
|
|
56
55
|
"@types/prettier": "1.19.0",
|
|
57
56
|
"@types/react-dom": "16.9.8",
|
|
58
|
-
"@types/styled-components": "5.0.1",
|
|
59
57
|
"@types/testing-library__react": "^10.0.5",
|
|
60
58
|
"async": "^3.1.0",
|
|
61
59
|
"babel-loader": "^8.0.6",
|
|
@@ -65,7 +63,6 @@
|
|
|
65
63
|
"file-loader": "^4.2.0",
|
|
66
64
|
"identity-obj-proxy": "^3.0.0",
|
|
67
65
|
"jest": "^26.0.1",
|
|
68
|
-
"jest-styled-components": "^7.0.0",
|
|
69
66
|
"jest-watch-typeahead": "^0.4.2",
|
|
70
67
|
"node-sass": "^4.13.0",
|
|
71
68
|
"normalize.css": "8.0.1",
|
|
@@ -91,7 +88,6 @@
|
|
|
91
88
|
"rollup-plugin-typescript2": "^0.29.0",
|
|
92
89
|
"sass-loader": "^8.0.0",
|
|
93
90
|
"style-loader": "^1.0.0",
|
|
94
|
-
"styled-components": "5.0.1",
|
|
95
91
|
"svg-parser": "^2.0.2",
|
|
96
92
|
"svgo": "^1.3.2",
|
|
97
93
|
"ts-loader": "^6.2.1",
|
package/scss/_input.scss
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useState as r,useEffect as n}from"react";import{b as t,s as a}from"./grid-11a70eb7.js";var i;!function(e){e[e.xs=t.xs]="xs",e[e.sm=t.sm]="sm",e[e.md=t.md]="md",e[e.lg=t.lg]="lg",e[e.xl=t.xl]="xl"}(i||(i={}));var s=function(){var t=r(),s=e(t,2),m=s[0],o=s[1];return n((function(){var r,n,t=function(e){switch(e.media){case a.xl:return void o(e.matches?i.xl:i.lg);case a.lg:return void o(e.matches?i.lg:i.md);case a.md:return void o(e.matches?i.md:i.sm);case a.sm:return void o(e.matches?i.sm:i.xs);default:return void o(i.xs)}},s=Object.entries(a).reverse().map((function(r){var n=e(r,2),t=n[0],a=n[1];return{breakpoint:i[t],mediaQuery:window.matchMedia(a)}}));s.forEach((function(e){return e.mediaQuery.addEventListener("change",t)}));var m=null!==(n=null===(r=s.find((function(e){return e.mediaQuery.matches})))||void 0===r?void 0:r.breakpoint)&&void 0!==n?n:i.xs;return o(m),function(){s.forEach((function(e){return e.mediaQuery.removeEventListener("change",t)}))}}),[]),m};export{i as B,s as u};
|
|
2
|
+
//# sourceMappingURL=useBreakpoint-552af2b9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint-552af2b9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as n}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useEffect as t,useState as i}from"react";function e(n,t,i){var e;return function(){var o=this,r=arguments,u=function(){e=null,i||n.apply(o,r)},a=i&&!e;e&&clearTimeout(e),e=setTimeout(u,t),a&&n.apply(o,r)}}var o=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["layoutchange","resize","orientationchange"],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;t((function(){var t=e(n,o);return i.forEach((function(n){return window.addEventListener(n,t)})),t(),function(){i.forEach((function(n){return window.removeEventListener(n,t)}))}}),[])},r=function(t,e){var r=i(!1),u=n(r,2),a=u[0],d=u[1],l=i(!1),c=n(l,2),v=c[0],f=c[1],s=i(),g=n(s,2),h=g[0],p=g[1],m=i(),w=n(m,2),E=w[0],b=w[1];return o((function(){var n,i,o,r=(null===(n=t.current)||void 0===n?void 0:n.getBoundingClientRect())||{},u=r.top,a=void 0===u?0:u,l=r.width,c=void 0===l?0:l,v=r.bottom,s=void 0===v?0:v,g=null!==(o=null===(i=e.current)||void 0===i?void 0:i.getBoundingClientRect().height)&&void 0!==o?o:0;d(a<=0),f(s<=g),b(c),p(g)}),["resize","scroll"]),{isOutsideWindow:a,isLeavingWindow:v,offsetHeight:h,contentWidth:E}};export{r as a,o as u};
|
|
2
|
+
//# sourceMappingURL=useSticky-d61d1f0b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSticky-d61d1f0b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Button-d5147e38.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as t,b as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as n}from"./_tslib-51c8a283.js";import o from"react";import{A as r,I as l}from"./constants-ad6c82db.js";import{g as i}from"./color-a10c7892.js";import"./Icon-89da8de4.js";import{L as a}from"./Loader-fa16a352.js";import{u as s}from"./useHover-9710204a.js";import{u as d}from"./useWindowSize-750f9b68.js";import{b as u}from"./grid-11a70eb7.js";import{c}from"./index-9b84fabc.js";import m from"./components/Button/styles.module.scss";var b={primary:"blueberry",warning:"banana",danger:"cherry"},f=function(t,e){return e&&e<u.md&&t?l.Small:t?l.Medium:l.XSmall},p=o.forwardRef((function(u,p){var v,_,g,h=u.children,j=u.className,w=void 0===j?"":j,E=u.fluid,y=void 0!==E&&E,k=u.intent,N=void 0===k?"primary":k,I=u.inverted,B=void 0!==I&&I,C=u.htmlMarkup,H=void 0===C?"button":C,O=u.onClick,S=u.large,z=void 0!==S&&S,F=u.loading,M=void 0!==F&&F,x=u.variant,A=void 0===x?"fill":x,L=u.disabled,R=void 0!==L&&L,X=u.ellipsis,P=void 0!==X&&X,W=u.testId,q=u.href,D=u.target,G=n(u,["children","className","fluid","intent","inverted","htmlMarkup","onClick","large","loading","variant","disabled","ellipsis","testId","href","target"]),J=function(t){var e,n,o,r,l=null,i=null;void 0!==(null===(n=null===(e=t[0])||void 0===e?void 0:e.props)||void 0===n?void 0:n.svgIcon)&&(l=t.shift()),void 0!==(null===(r=null===(o=t[t.length-1])||void 0===o?void 0:o.props)||void 0===r?void 0:r.svgIcon)&&(i=t.pop());var a=t.filter((function(t){return t}));return[l,i,a.length>0?a:null]}(o.Children.toArray(h)),K=t(J,3),Q=K[0],T=K[1],U=K[2],V=s(p),Y=V.hoverRef,Z=V.isHovered,$=function(t,e,n,o,r){return e?i("neutral",600):t&&!o||!t&&o?"white":i(b[n],r?700:600)}("fill"===A,R,N,B,Z),tt=d(),et="fill"===A,nt="outline"===A,ot="borderless"===A,rt="warning"===N,lt="danger"===N,it=!(!Q&&!T||M),at=Object.assign({},G),st=c(m.button,(e(v={},m["button--fluid"],y),e(v,m["button--large"],z),e(v,m["button--warning"],rt),e(v,m["button--danger"],lt),e(v,m["button--inverted"],B),e(v,m["button--fill"],et),e(v,m["button--outline"],nt),e(v,m["button--borderless"],ot),e(v,m["button--with-icon"],it),e(v,m["button--ellipsis"],P),v),w),dt=c(m.button__content,(e(_={},m["button__content--warning"],rt),e(_,m["button__content--danger"],lt),e(_,m["button__content--fill"],et),e(_,m["button__content--borderless"],ot),e(_,m["button__content--with-icon"],it),e(_,m["button__content--large"],z),e(_,m["button__content--ellipsis"],P),e(_,m["button__content--inverted"],B),e(_,m["button__content--fluid"],y),_)),ut=c(m["button__left-fluid-content"],(e(g={},m["button__left-fluid-content--with-icon"],it),e(g,m["button__left-fluid-content--large"],z),g));function ct(t,e,n,r){var l=t&&t.props&&t.props.color?t.props.color:n;return t&&Object.keys(t).length>0?o.cloneElement(t,{size:e,color:l,isHovered:r}):null}var mt=function(){return U?o.createElement("span",{className:dt},U):null},bt=function(){return o.createElement("span",{className:m["content-wrapper"]},M?o.createElement("div",{className:m["button__left-fluid-content"]},o.createElement(a,{testId:"test-id-loader",color:"fill"!==A||B?b[N]:"white",size:"tiny"})):o.createElement(o.Fragment,null,y?o.createElement("div",{className:ut},ct(Q,f(z,tt.width),$,Z),mt()):o.createElement(o.Fragment,null,ct(Q,f(z,tt.width),$,Z),mt()),ct(T,l.XSmall,$,Z)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({onClick:O,disabled:R,"data-testid":W,"data-analyticsid":r.Button,className:st,ref:Y},at),bt()),"a"===H&&o.createElement("a",Object.assign({onClick:O,"data-testid":W,"data-analyticsid":r.Button,className:st,href:q,target:D,rel:"_blank"===D?"noopener noreferrer":u.rel,ref:Y},G),bt()))}));export{p as B,b as i};
|
|
2
|
-
//# sourceMappingURL=Button-d5147e38.js.map
|
package/Button-d5147e38.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-d5147e38.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Checkbox-798282e4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,b as r}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import a,{useState as o,useEffect as c}from"react";import{c as l}from"./index-9b84fabc.js";import{u as b}from"./uuid-fe7442b7.js";import{C as i}from"./Check-6291ad09.js";import{I as s}from"./Icon-89da8de4.js";import{F as n,a as t,A as d}from"./constants-ad6c82db.js";import{g as m}from"./color-a10c7892.js";import p from"./components/Checkbox/styles.module.scss";var h=a.forwardRef((function(h,k){var x,f,u,v=h.className,_=h.checked,w=void 0!==_&&_,y=h.disabled,g=h.label,j=h.inputId,N=void 0===j?b():j,C=h.mode,E=h.name,I=void 0===E?N:E,F=h.variant,z=h.errorText,A=h.error,B=void 0===A?!!z:A,H=h.value,P=void 0===H?g:H,R=o(w),T=e(R,2),q=T[0],D=T[1],G=B||C===n.oninvalid,J=C===n.ondark,K=C===n.onblueberry,L=F===t.bigform,M=l(p["checkbox-wrapper"],(r(x={},p["checkbox-wrapper--with-error"],z),r(x,p["checkbox-wrapper--bigform"],L),x)),O=l(p["checkbox-label"],(r(f={},p["checkbox-label--disabled"],y),r(f,p["checkbox-label--on-dark"],J),r(f,p["checkbox-label--on-blueberry"],K),r(f,p["checkbox-label--invalid"],G),r(f,p["checkbox-label--bigform"],L),f)),Q=l(p.checkbox,v),S=l(p["checkbox__icon-wrapper"],(r(u={},p["checkbox__icon-wrapper--checked"],q),r(u,p["checkbox__icon-wrapper--disabled"],y),r(u,p["checkbox__icon-wrapper--on-dark"],J),r(u,p["checkbox__icon-wrapper--on-blueberry"],K),r(u,p["checkbox__icon-wrapper--invalid"],G),u)),U=l(p["checkbox-errors"],r({},p["checkbox-errors--bigform"],L)),V=m("blueberry",500);return y&&(V=m("neutral",400)),J&&(V=m("blueberry",200)),G&&(V=m("cherry",500)),c((function(){D(w)}),[w]),a.createElement("div",{"data-testid":h.testId,"data-analyticsid":d.Checkbox,className:M},z&&a.createElement("p",{className:U},z),a.createElement("label",{htmlFor:N,className:O},a.createElement("input",{id:N,name:I,className:Q,type:"checkbox",checked:q,disabled:y,onChange:function(){D(!q)},value:P,ref:k,"aria-invalid":B}),a.createElement("span",{className:S},q&&a.createElement(s,{color:V,className:p.checkbox__icon,svgIcon:i,size:38})),g))}));export{h as C};
|
|
2
|
-
//# sourceMappingURL=Checkbox-798282e4.js.map
|
package/Checkbox-798282e4.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox-798282e4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Close-a45973d6.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Close-a45973d6.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|