@helsenorge/designsystem-react 1.0.0-beta81-ModalTest2 → 1.0.0-beta85
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-3f327b66.js +2 -0
- package/Button-3f327b66.js.map +1 -0
- package/Check-6291ad09.js +2 -0
- package/Check-6291ad09.js.map +1 -0
- package/Checkbox-46666e69.js +2 -0
- package/Checkbox-46666e69.js.map +1 -0
- package/FormGroup-b874ae21.js +2 -0
- package/FormGroup-b874ae21.js.map +1 -0
- package/Loader-cf365332.js +2 -0
- package/Loader-cf365332.js.map +1 -0
- package/Modal-0dd5ce43.js +2 -0
- package/Modal-0dd5ce43.js.map +1 -0
- package/Title-7c829525.js +2 -0
- package/Title-7c829525.js.map +1 -0
- package/Validation-b902407e.js +2 -0
- package/Validation-b902407e.js.map +1 -0
- package/_rollupPluginBabelHelpers-d0752906.js +2 -0
- package/_rollupPluginBabelHelpers-d0752906.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.map +1 -1
- package/components/Button/index.js +1 -1
- package/components/ButtonWithModal/ButtonWithModal.d.ts +1 -1
- package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
- package/components/ButtonWithModal/componentdata.json +18 -6
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/Checkbox.d.ts +31 -0
- package/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/components/Checkbox/componentdata.json +259 -0
- package/components/Checkbox/index.d.ts +3 -0
- package/components/Checkbox/index.d.ts.map +1 -0
- package/components/Checkbox/index.js +2 -0
- package/components/Checkbox/index.js.map +1 -0
- package/components/Checkbox/styles.module.scss +203 -0
- package/components/Checkbox/styles.module.scss.d.ts +26 -0
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/FormExample/FormExample.d.ts +13 -0
- package/components/FormExample/FormExample.d.ts.map +1 -0
- package/components/FormExample/componentdata.json +63 -0
- package/components/FormExample/index.d.ts +3 -0
- package/components/FormExample/index.d.ts.map +1 -0
- package/components/FormExample/index.js +2 -0
- package/components/FormExample/index.js.map +1 -0
- package/components/FormGroup/FormGroup.d.ts +26 -0
- package/components/FormGroup/FormGroup.d.ts.map +1 -0
- package/components/FormGroup/componentdata.json +183 -0
- package/components/FormGroup/index.d.ts +3 -0
- package/components/FormGroup/index.d.ts.map +1 -0
- package/components/FormGroup/index.js +2 -0
- package/components/FormGroup/index.js.map +1 -0
- package/components/FormGroup/styles.module.scss +58 -0
- package/components/FormGroup/styles.module.scss.d.ts +16 -0
- package/components/Icons/AcupunctureBack.d.ts +5 -0
- package/components/Icons/AcupunctureBack.d.ts.map +1 -0
- package/components/Icons/AcupunctureBack.js +2 -0
- package/components/Icons/AcupunctureBack.js.map +1 -0
- package/components/Icons/AdditionalIconInformation.js +6 -0
- package/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/components/Icons/Icon.d.ts +1 -0
- package/components/Icons/Icon.d.ts.map +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/NoEye.d.ts +5 -0
- package/components/Icons/NoEye.d.ts.map +1 -0
- package/components/Icons/NoEye.js +2 -0
- package/components/Icons/NoEye.js.map +1 -0
- package/components/Icons/SectionSign.d.ts +5 -0
- package/components/Icons/SectionSign.d.ts.map +1 -0
- package/components/Icons/SectionSign.js +2 -0
- package/components/Icons/SectionSign.js.map +1 -0
- package/components/Icons/SpeechBubble.d.ts +5 -0
- package/components/Icons/SpeechBubble.d.ts.map +1 -0
- package/components/Icons/SpeechBubble.js +2 -0
- package/components/Icons/SpeechBubble.js.map +1 -0
- package/components/Icons/SupportingPerson.d.ts +5 -0
- package/components/Icons/SupportingPerson.d.ts.map +1 -0
- package/components/Icons/SupportingPerson.js +2 -0
- package/components/Icons/SupportingPerson.js.map +1 -0
- package/components/Icons/Syringe.d.ts +5 -0
- package/components/Icons/Syringe.d.ts.map +1 -0
- package/components/Icons/Syringe.js +2 -0
- package/components/Icons/Syringe.js.map +1 -0
- package/components/Icons/index.js +1 -1
- package/components/LinkList/LinkList.d.ts.map +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/LinkList/styles.module.scss +1 -4
- package/components/LinkList/styles.module.scss.d.ts +0 -1
- package/components/Loader/index.js +1 -1
- package/components/Modal/Modal.d.ts +19 -6
- package/components/Modal/Modal.d.ts.map +1 -1
- package/components/Modal/__mocks__/IntersectionObserver.d.ts +6 -0
- package/components/Modal/__mocks__/IntersectionObserver.d.ts.map +1 -0
- package/components/Modal/componentdata.json +19 -7
- package/components/Modal/index.js +1 -1
- package/components/Modal/styles.module.scss +103 -67
- package/components/Modal/styles.module.scss.d.ts +17 -10
- package/components/NotificationPanel/NotificationPanel.d.ts +2 -0
- package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
- package/components/NotificationPanel/componentdata.json +19 -0
- package/components/NotificationPanel/index.js +1 -1
- package/components/NotificationPanel/styles.module.scss +4 -4
- package/components/Slider/index.js +1 -1
- package/components/Spacer/index.js +1 -1
- package/components/Tile/index.js +1 -1
- package/components/Title/Title.d.ts +6 -1
- package/components/Title/Title.d.ts.map +1 -1
- package/components/Title/componentdata.json +1 -145
- package/components/Title/index.js +1 -1
- package/components/Validation/Validation.d.ts +17 -0
- package/components/Validation/Validation.d.ts.map +1 -0
- package/components/Validation/componentdata.json +111 -0
- package/components/Validation/index.d.ts +3 -0
- package/components/Validation/index.d.ts.map +1 -0
- package/components/Validation/index.js +2 -0
- package/components/Validation/index.js.map +1 -0
- package/components/Validation/styles.module.scss +18 -0
- package/components/Validation/styles.module.scss.d.ts +10 -0
- package/components/__mocks__/index.js +2 -0
- package/components/__mocks__/index.js.map +1 -0
- package/constants-d919236e.js +2 -0
- package/constants-d919236e.js.map +1 -0
- package/hooks/focus-utils.d.ts +7 -0
- package/hooks/focus-utils.d.ts.map +1 -0
- package/hooks/useFocusTrap.d.ts +1 -1
- package/hooks/useFocusTrap.d.ts.map +1 -1
- package/hooks/useVisibility.d.ts +3 -0
- package/hooks/useVisibility.d.ts.map +1 -0
- package/index.js +1 -1
- package/package.json +2 -1
- package/scss/_palette.scss +1 -0
- package/useBreakpoint-324a9b14.js +2 -0
- package/useBreakpoint-324a9b14.js.map +1 -0
- package/useHover-037be19d.js +2 -0
- package/useHover-037be19d.js.map +1 -0
- package/useWindowSize-73b47451.js +2 -0
- package/useWindowSize-73b47451.js.map +1 -0
- package/utils/uuid.d.ts +1 -0
- package/utils/uuid.d.ts.map +1 -1
- package/uuid-8870ab4b.js +2 -0
- package/uuid-8870ab4b.js.map +1 -0
- package/Button-e2087687.js +0 -2
- package/Button-e2087687.js.map +0 -1
- package/Loader-3767cb6e.js +0 -2
- package/Loader-3767cb6e.js.map +0 -1
- package/Modal-459c67d7.js +0 -2
- package/Modal-459c67d7.js.map +0 -1
- package/Title-863af332.js +0 -2
- package/Title-863af332.js.map +0 -1
- package/_rollupPluginBabelHelpers-e1c7fe69.js +0 -2
- package/_rollupPluginBabelHelpers-e1c7fe69.js.map +0 -1
- package/components/Tabs/componentdata.json +0 -3
- package/constants-d1f48e8e.js +0 -2
- package/constants-d1f48e8e.js.map +0 -1
- package/useBreakpoint-a8fa8a61.js +0 -2
- package/useBreakpoint-a8fa8a61.js.map +0 -1
- package/useHover-57ad4df9.js +0 -2
- package/useHover-57ad4df9.js.map +0 -1
- package/useWindowSize-c22d7634.js +0 -2
- package/useWindowSize-c22d7634.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as t,a as e}from"./_rollupPluginBabelHelpers-d0752906.js";import{_ as n}from"./_tslib-51c8a283.js";import o from"react";import{g as r}from"./color-acb834c6.js";import{a as l}from"./constants-d919236e.js";import{L as i}from"./Loader-cf365332.js";import{u as a}from"./useHover-037be19d.js";import{u as s}from"./useWindowSize-73b47451.js";import{b as u}from"./grid-11a70eb7.js";import{c as d}from"./index-9b84fabc.js";import c from"./components/Button/styles.module.scss";var m={primary:"blueberry",warning:"banana",danger:"cherry"};var b=function(t,e){return e&&e<u.md&&t?l.Small:t?l.Medium:l.XSmall},f=o.forwardRef((function(u,f){var v,p,g,_=u.children,h=u.className,w=void 0===h?"":h,j=u.fluid,E=void 0!==j&&j,y=u.intent,N=void 0===y?"primary":y,k=u.inverted,C=void 0!==k&&k,I=u.htmlMarkup,H=void 0===I?"button":I,O=u.onClick,S=u.large,z=void 0!==S&&S,B=u.loading,F=void 0!==B&&B,M=u.variant,x=void 0===M?"fill":M,L=u.disabled,R=void 0!==L&&L,X=u.ellipsis,A=void 0!==X&&X,P=u.testId,W=u.href,q=u.target,D=n(u,["children","className","fluid","intent","inverted","htmlMarkup","onClick","large","loading","variant","disabled","ellipsis","testId","href","target"]),G=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(_)),J=t(G,3),K=J[0],Q=J[1],T=J[2],U=a(f),V=U.hoverRef,Y=U.isHovered,Z=function(t,e,n,o,l){return e?r("neutral",600):t&&!o||!t&&o?"white":r(m[n],l?700:600)}("fill"===x,R,N,C,Y),$=s(),tt="fill"===x,et="outline"===x,nt="borderless"===x,ot="warning"===N,rt="danger"===N,lt=!(!K&&!Q||F),it=Object.assign({},D),at=d(c.button,(e(v={},c["button--fluid"],E),e(v,c["button--large"],z),e(v,c["button--warning"],ot),e(v,c["button--danger"],rt),e(v,c["button--inverted"],C),e(v,c["button--fill"],tt),e(v,c["button--outline"],et),e(v,c["button--borderless"],nt),e(v,c["button--with-icon"],lt),e(v,c["button--ellipsis"],A),v),w),st=d(c.button__content,(e(p={},c["button__content--warning"],ot),e(p,c["button__content--danger"],rt),e(p,c["button__content--fill"],tt),e(p,c["button__content--borderless"],nt),e(p,c["button__content--with-icon"],lt),e(p,c["button__content--large"],z),e(p,c["button__content--ellipsis"],A),e(p,c["button__content--inverted"],C),e(p,c["button__content--fluid"],E),p)),ut=d(c["button__left-fluid-content"],(e(g={},c["button__left-fluid-content--with-icon"],lt),e(g,c["button__left-fluid-content--large"],z),g));function dt(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 ct=function(){return T?o.createElement("span",{className:st},T):null},mt=function(){return o.createElement("span",{className:c["content-wrapper"]},F?o.createElement("div",{className:c["button__left-fluid-content"]},o.createElement(i,{testId:"test-id-loader",color:"fill"!==x||C?m[N]:"white",size:"tiny"})):o.createElement(o.Fragment,null,E?o.createElement("div",{className:ut},dt(K,b(z,$.width),Z,Y),ct()):o.createElement(o.Fragment,null,dt(K,b(z,$.width),Z,Y),ct()),dt(Q,l.XSmall,Z,Y)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({onClick:O,disabled:R,"data-testid":P,className:at,ref:V},it),mt()),"a"===H&&o.createElement("a",Object.assign({onClick:O,"data-testid":P,className:at,href:W,target:q,ref:V},D),mt()))}));export{f as B};
|
|
2
|
+
//# sourceMappingURL=Button-3f327b66.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button-3f327b66.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"react";var t=function(t){var a=t.isExtraSmall,r=t.isHovered,l=e.createElement("path",{d:"M22.504 31.198l-9.59-9.966 1.441-1.387 8.149 8.468 14.455-15.016 1.441 1.386z"}),m=e.createElement("path",{d:"M22.504 31.198l-7.816-8.121 1.441-1.387 6.375 6.623 15.859-16.474 1.44 1.386z"}),n=e.createElement("path",{d:"M22.504 31.578l-9.781-10.162 1.822-1.752 7.959 8.269 14.265-14.819 1.821 1.752z"});return a?r?e.createElement("path",{d:"M22.504 31.578l-7.816-8.124 1.82-1.75 5.996 6.229 16.321-16.956 1.821 1.752z"}):n:r?m:l};export{t as C};
|
|
2
|
+
//# sourceMappingURL=Check-6291ad09.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Check-6291ad09.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,a as r}from"./_rollupPluginBabelHelpers-d0752906.js";import c,{useState as o,useEffect as a}from"react";import{c as l}from"./index-9b84fabc.js";import{u as b}from"./uuid-8870ab4b.js";import{C as i}from"./Check-6291ad09.js";import{I as s}from"./constants-d919236e.js";import{g as n}from"./color-acb834c6.js";import t from"./components/Checkbox/styles.module.scss";var m=c.forwardRef((function(m,d){var p,h,k,x=m.className,u=m.checked,f=void 0!==u&&u,_=m.disabled,v=m.label,w=m.inputid,g=void 0===w?b():w,y=m.mode,N=m.name,j=void 0===N?g:N,E=m.variant,C=m.errorText,I=m.error,z=void 0===I?!!C:I,B=m.value,F=void 0===B?v:B,H=o(f),P=e(H,2),R=P[0],T=P[1],q=z,A="on-dark"===y,D="on-blueberry"===y,G="bigform"===E,J=l(t["checkbox-wrapper"],(r(p={},t["checkbox-wrapper--with-error"],C),r(p,t["checkbox-wrapper--bigform"],G),p)),K=l(t["checkbox-label"],(r(h={},t["checkbox-label--disabled"],_),r(h,t["checkbox-label--on-dark"],A),r(h,t["checkbox-label--on-blueberry"],D),r(h,t["checkbox-label--invalid"],q),r(h,t["checkbox-label--bigform"],G),h)),L=l(t.checkbox,x),M=l(t["checkbox__icon-wrapper"],(r(k={},t["checkbox__icon-wrapper--checked"],R),r(k,t["checkbox__icon-wrapper--disabled"],_),r(k,t["checkbox__icon-wrapper--on-dark"],A),r(k,t["checkbox__icon-wrapper--on-blueberry"],D),r(k,t["checkbox__icon-wrapper--invalid"],q),k)),O=l(t["checkbox-errors"],r({},t["checkbox-errors--bigform"],G)),Q=n("blueberry",500);return _&&(Q=n("neutral",400)),A&&(Q=n("blueberry",200)),q&&(Q=n("cherry",500)),a((function(){T(f)}),[f]),c.createElement("div",{"data-testid":m.testId,className:J},C&&c.createElement("p",{className:O},C),c.createElement("label",{htmlFor:g,className:K},c.createElement("input",{id:g,name:j,className:L,type:"checkbox",checked:R,disabled:_,onChange:function(){T(!R)},value:F,ref:d,"aria-invalid":z}),c.createElement("span",{className:M},R&&c.createElement(s,{color:Q,className:t.checkbox__icon,svgIcon:i,size:38})),v))}));export{m as C};
|
|
2
|
+
//# sourceMappingURL=Checkbox-46666e69.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox-46666e69.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./_rollupPluginBabelHelpers-d0752906.js";import r from"react";import{c as o}from"./index-9b84fabc.js";import a from"./components/FormGroup/styles.module.scss";import{C as t}from"./Checkbox-46666e69.js";import{T as m}from"./Title-7c829525.js";var l=r.forwardRef((function(l,i){var p,n,s,d=l.className,f=l.mode,c=void 0===f?"on-white":f,g=l.variant,u=void 0===g?"normal":g,_=l.error,v="on-dark"===c,w="bigform"===u,b=o(a["form-group-wrapper"],(e(p={},a["form-group-wrapper--on-dark"],v),e(p,a["form-group-wrapper--invalid"],_),p),d),E=o(a["form-group-wrapper__title"],(e(n={},a["form-group-wrapper__title--on-dark"],v&&!_),e(n,a["form-group-wrapper__title--bigform"],w),n)),N=o(a["form-group"],e({},a["form-group--invalid"],_)),h=o(a["form-group-wrapper__errors"],e({},a["form-group-wrapper__errors--bigform"],w)),k=o(a["field-set__legend"],(e(s={},a["field-set__legend--on-dark"],v&&!_),e(s,a["field-set__legend--bigform"],w),s));return r.createElement("div",{"data-testid":l.testId,className:b},l.title&&r.createElement(m,{className:E,htmlMarkup:"h4",appearance:"title4",margin:{marginTop:0,marginBottom:2}},l.title),r.createElement("div",{className:N},_&&r.createElement("p",{className:h},_),r.createElement("fieldset",{name:l.title,className:a["field-set"]},l.legend&&r.createElement("legend",{className:k},l.legend),r.Children.map(l.children,(function(e){return e.type===t?r.cloneElement(e,{mode:c,variant:u,error:!!_}):e})))))}));export{l as F};
|
|
2
|
+
//# sourceMappingURL=FormGroup-b874ae21.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormGroup-b874ae21.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./_rollupPluginBabelHelpers-d0752906.js";import a from"react";import{c as r}from"./index-9b84fabc.js";import{u as l}from"./uuid-8870ab4b.js";import o from"./components/Loader/styles.module.scss";var d=a.forwardRef((function(d,t){var s,m,i,c=d.overlay,n=d.color,_=void 0===n?c?"black":"neutral":n,p=d.size,u=void 0===p?"small":p,b=d.className,v=void 0===b?"":b,f=d.testId,w=void 0===f?"":f,N=d.center,y=d.ariaLabelledById,E=d.ariaLabel,g=void 0===E?"Laster inn":E,h="small"===u,k="medium"===u,L="large"===u,j=r(o["loader-wrapper"],(e(s={},o["loader-wrapper--center"],N),e(s,o["loader-wrapper--overlay"],c),s)),x=r(o.loader,(e(m={},o["loader--small"],h),e(m,o["loader--medium"],k),e(m,o["loader--large"],L),m),v),B=r(o.loader__dot,(e(i={},o["loader__dot--small"],h),e(i,o["loader__dot--medium"],k),e(i,o["loader__dot--large"],L),e(i,o["loader__dot--banana"],"banana"===_),e(i,o["loader__dot--cherry"],"cherry"===_),e(i,o["loader__dot--kiwi"],"kiwi"===_),e(i,o["loader__dot--neutral"],"neutral"===_),e(i,o["loader__dot--plum"],"plum"===_),e(i,o["loader__dot--black"],"black"===_),e(i,o["loader__dot--white"],"white"===_),i)),I="loader".concat(l());return a.createElement("div",{role:"progressbar",className:j},a.createElement("div",{"data-testid":w,"aria-labelledby":y||I,className:x},a.createElement("div",{className:B}),a.createElement("div",{className:B}),a.createElement("div",{className:B}),a.createElement("div",{className:B}),!y&&a.createElement("span",{id:I,className:o["loader__hidden-text"]},g)))}));export{d as L};
|
|
2
|
+
//# sourceMappingURL=Loader-cf365332.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loader-cf365332.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,a as t}from"./_rollupPluginBabelHelpers-d0752906.js";import r,{useRef as a,useEffect as n,useState as o}from"react";import{c as l}from"./index-9b84fabc.js";import{p as c}from"./palette-f206f488.js";import{B as i}from"./Button-3f327b66.js";import{I as s}from"./constants-d919236e.js";import{X as d,A as m,a as u}from"./AlertSignFill-64bfef57.js";import v from"./components/Modal/styles.module.scss";import{T as p}from"./Title-7c829525.js";import{u as f}from"./uuid-8870ab4b.js";function _(){var e,t=a(null);function r(e){var r=t.current,a="Tab"===e.key;if(r&&a){var n=function(e){try{return("string"==typeof e?document.querySelector(e):e).getRootNode().activeElement}catch(t){return console.error("Feil ved å ta tak i active element basert på angitt node: ",e,t),null}}(r),o=r.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select'),l=o[0],c=1===o.length?l:o[o.length-1];e.shiftKey?n===l&&(c.focus(),e.preventDefault()):n===c&&(l.focus(),e.preventDefault())}}function o(e){var r=t.current;if(r){var a=r.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===a.length&&(a[0].focus(),e.preventDefault())}}return null===(e=t.current)||void 0===e||e.focus(),n((function(){var e=t.current;return e.addEventListener("keydown",r),e.addEventListener("click",o),function(){e.removeEventListener("keydown",r),e.removeEventListener("click",o)}}),[]),t}var y,E,b=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=o(!1),l=e(a,2),c=l[0],i=l[1];return n((function(){var e=new IntersectionObserver((function(e){i(e[0].intersectionRatio>=r)}),{threshold:r});return(null==t?void 0:t.current)&&e.observe(t.current),function(){(null==t?void 0:t.current)&&e.unobserve(t.current)}}),[t]),c};!function(e){e.normal="normal",e.warning="warning",e.error="error",e.image="image"}(y||(y={})),function(e){e.large="large",e.medium="medium"}(E||(E={}));var g={variant:y.normal,primaryButtonText:"OK",large:!1,className:"",size:E.large},h=function(e){return r.createElement("button",{className:v.modal__lukkekryss,"aria-label":e.ariaLabel||"Lukk",onClick:e.onClick,role:"button"},r.createElement(s,{svgIcon:d,color:c.blueberry600,size:42}))},k=function(a){var o,d,E,g,k=r.useState(f()),N=e(k,1)[0],w=r.useRef(null),L=r.useRef(null),x=b(w),B=r.useRef(null),C=b(B),W=L.current&&L.current.scrollHeight>L.current.clientHeight;function T(e){"Escape"===e.key&&a.onClose&&(e.stopPropagation(),a.onClose())}function j(e){e.target&&R.current===e.target&&a.onClose&&(e.stopPropagation(),a.onClose())}var S=a.variant===y.image||"img"===(null===(o=a.children)||void 0===o?void 0:o.type),I=null!==(d=a.titleId)&&void 0!==d?d:N,R=r.useRef(null),z=a.secondaryButtonText&&(null===(E=a.secondaryButtonText)||void 0===E?void 0:E.length)>0||a.onSuccess,P=a.ariaLabelledBy?void 0:a.ariaLabel,A=a.ariaLabelledBy?a.ariaLabelledBy:a.ariaLabel?void 0:I;return n((function(){var e=R.current;return document.body.style.overflow="hidden",e&&!z&&(e.addEventListener("keydown",T),e.addEventListener("click",j)),function(){document.body.style.removeProperty("overflow"),e&&!z&&(e.removeEventListener("keydown",T),e.removeEventListener("click",j))}}),[]),r.createElement("div",{"data-testid":"dialog-container"},r.createElement("div",{ref:R,className:v["modal-overlay"],"data-testid":a.testId},r.createElement("div",{className:v.align,ref:_()},r.createElement("div",{className:l(a.className,v.modal,v["modal--".concat(a.variant)],v["modal--".concat(a.size)]),role:"dialog","aria-label":P,"aria-labelledby":A},r.createElement("div",{className:l(v.modal__shadow,v["modal__shadow--top"],t({},v["modal__shadow--show"],!x&&W))}),r.createElement("div",{className:l(v.modal__contentWrapper,t({},v["modal__contentWrapper--image"],S)),ref:L},!a.noCloseButton&&r.createElement("div",{className:v.modal__closeWrapper},r.createElement("div",{className:l(v.modal__closeWrapper__close)},r.createElement(h,{onClick:a.onClose,ariaLabel:a.ariaLabelCloseBtn}))),r.createElement("div",{className:l(v["modal__contentWrapper__scroll--".concat(a.size)],t({},v["modal__contentWrapper__scroll--image"],S))},r.createElement("div",{ref:w}),r.createElement("div",{className:v.modal__contentWrapper__title},a.variant&&function(e){var t;if(e===y.error)t=r.createElement(s,{svgIcon:m,color:c.cherry500,hoverColor:c.cherry500});else{if(e!==y.warning)return null;t=r.createElement(s,{svgIcon:u,color:c.black,hoverColor:c.black})}return r.createElement("div",{className:v.modal__iconWrapper},t)}(a.variant),r.createElement("div",{className:a.variant===y.error?v["modal__title--error"]:""},r.createElement(p,{id:I,htmlMarkup:"h3",appearance:"title3"},a.title))),S&&r.createElement("div",null,r.createElement("div",{className:v.modal__contentWrapper__imageWrapper},a.children),r.createElement("span",{className:v.modal__contentWrapper__imageDescription},a.description)),!S&&a.children&&r.createElement("div",null,a.children),!S&&!a.children&&r.createElement("p",{className:v.modal__description},a.description),r.createElement("div",{ref:B}))),r.createElement("div",{className:l(v.modal__shadow,v["modal__shadow--bottom"],t({},v["modal__shadow--show"],!C&&W))}),z&&r.createElement("div",{className:l(v["modal__call-to-action"],v["modal__call-to-action--".concat(a.size)])},a.onSuccess&&r.createElement(i,{onClick:a.onSuccess},a.primaryButtonText),a.secondaryButtonText&&(null===(g=a.secondaryButtonText)||void 0===g?void 0:g.length)>0&&r.createElement(i,{variant:"borderless",onClick:a.onClose},a.secondaryButtonText))))))};k.defaultProps=g;export{k as M};
|
|
2
|
+
//# sourceMappingURL=Modal-0dd5ce43.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal-0dd5ce43.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./_rollupPluginBabelHelpers-d0752906.js";import e from"react";import{c as r}from"./index-9b84fabc.js";import i from"./components/Title/styles.module.scss";var o=e.forwardRef((function(o,a){var l,m=o.id,n=o.children,c=o.className,p=o.htmlMarkup,s=void 0===p?"h1":p,f=o.appearance,d=void 0===f?"title1":f,g=o.margin,u=void 0===g?0:g,y=r(i.title,(t(l={},i["title--feature"],"titleFeature"===d),t(l,i["title--title1"],"title1"===d),t(l,i["title--title2"],"title2"===d),t(l,i["title--title3"],"title3"===d),t(l,i["title--title4"],"title4"===d),t(l,i["title--title5"],"title5"===d),l),c),T=s,b=function(t){return Object.prototype.hasOwnProperty.call(t,"marginTop")&&Object.prototype.hasOwnProperty.call(t,"marginBottom")}(u)?{marginTop:"".concat(u.marginTop,"rem"),marginBottom:"".concat(u.marginBottom,"rem")}:{marginTop:"".concat(u,"rem"),marginBottom:"".concat(u,"rem")};return e.createElement(T,{id:m,className:y,style:b,ref:a},n)}));export{o as T};
|
|
2
|
+
//# sourceMappingURL=Title-7c829525.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Title-7c829525.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r from"react";import{c as e}from"./index-9b84fabc.js";import{F as a}from"./FormGroup-b874ae21.js";import t from"./components/Validation/styles.module.scss";var o=r.forwardRef((function(o,m){var n=o.errorSummary,s=o.className;o.variant;var i=e(t.validation,s);return r.createElement(r.Fragment,null,r.createElement("div",{"data-testid":o.testId,className:i},r.Children.map(o.children,(function(e){return e.type===a?r.cloneElement(e,{className:n?t["form-group-wrapper--error-sibling"]:""}):e}))),n&&r.createElement("p",{className:t.validation__errors},n))}));export{o as V};
|
|
2
|
+
//# sourceMappingURL=Validation-b902407e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Validation-b902407e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function t(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function n(r,t){for(var n=0;n<t.length;n++){var e=t[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function e(r,t,e){return t&&n(r.prototype,t),e&&n(r,e),r}function o(r,t,n){return t in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function a(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var n=[],e=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(e=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);e=!0);}catch(r){o=!0,a=r}finally{try{e||null==u.return||u.return()}finally{if(o)throw a}}return n}(r,t)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(r);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(r,t)}(r,t)||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 i(r,t){(null==t||t>r.length)&&(t=r.length);for(var n=0,e=new Array(t);n<t;n++)e[n]=r[n];return e}export{a as _,o as a,r as b,e as c,t as d};
|
|
2
|
+
//# sourceMappingURL=_rollupPluginBabelHelpers-d0752906.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers-d0752906.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{I as r,a}from"../../constants-
|
|
1
|
+
import e from"react";import{I as r,a as t}from"../../constants-d919236e.js";import{g as a}from"../../color-acb834c6.js";import{u as o}from"../../useHover-037be19d.js";import l from"./styles.module.scss";import{c as s}from"../../index-9b84fabc.js";import"../../_tslib-51c8a283.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../../_rollupPluginBabelHelpers-d0752906.js";var i=function(r){var t=r.isExtraSmall,a=r.isHovered,o=e.createElement("path",{d:"M33.305 14.659v14.546h-1.3V16.948L15.804 33.149l-.919-.92 16.27-16.27-12.394.001v-1.301z"}),l=e.createElement("path",{d:"M36.52 11.537v14.545h-1.3l-.001-12.347-19.415 19.414-.919-.92 19.393-19.392-12.302.001v-1.301z"}),s=e.createElement("path",{d:"M18.76 14.426v1.768h11.83L14.719 32.065l1.251 1.25 15.801-15.801v11.691h1.768V14.426z"});return t?a?e.createElement("path",{d:"M22.076 11.122v1.769h11.736L14.819 31.884l1.252 1.25 19.015-19.015v11.782h1.769V11.122z"}):s:a?l:o},m=e.forwardRef((function(m,c){var n=m.id,d=m.href,v=m.children,f=m.className,p=m.target,h=void 0===p?"_self":p,b="_blank"===h,u=o(c,void 0,!1),j=u.hoverRef,E=u.isHovered,g=s(l.anchorlink,null!=f?f:"");return e.createElement("a",{id:n,href:d,className:g,target:h,ref:j},v,b&&e.createElement(r,{className:l.anchorlink__icon,svgIcon:i,color:a("blueberry",600),hoverColor:a("blueberry",700),size:t.XSmall,isHovered:E}))}));export default m;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from"react";import{I as e,a as r}from"../../constants-d919236e.js";import{C as t}from"../../Check-6291ad09.js";import{c as s}from"../../index-9b84fabc.js";import o from"./styles.module.scss";import{p as c}from"../../palette-f206f488.js";import"../../_tslib-51c8a283.js";var l=a.forwardRef((function(l,m){var i=l.children,n=l.className,f=void 0===n?"":n,p=l.selected,d=void 0!==p&&p,v=l.variant,b=void 0===v?"normal":v,u=i.charAt(0).toLocaleUpperCase()+i.substring(1,2);return a.createElement("span",{className:s(o.avatar,d&&o["avatar--selected"],"black"===b&&o["avatar--black"],f),ref:m},d?a.createElement(e,{svgIcon:t,size:r.Small,color:"black"===b?c.neutral900:c.blueberry600}):u)}));export default l;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
import{a as e}from"../../_rollupPluginBabelHelpers-d0752906.js";import a from"react";import{c as r}from"../../index-9b84fabc.js";import l from"./styles.module.scss";var b=a.forwardRef((function(b,d){var o,t=b.children,i=b.className,n=void 0===i?"":i,s=b.color,c=void 0===s?"black":s,m=t.toString().length>2,g=r(l.badge,(e(o={},l["badge--oversized"],m),e(o,l["badge--black"],"black"===c),e(o,l["badge--white"],"white"===c),e(o,l["badge--blueberry"],"blueberry"===c),e(o,l["badge--banana"],"banana"===c),e(o,l["badge--cherry"],"cherry"===c),e(o,l["badge--kiwi"],"kiwi"===c),e(o,l["badge--neutral"],"neutral"===c),e(o,l["badge--plum"],"plum"===c),o),n);return a.createElement("span",{className:g,ref:d},t)}));export default b;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAYnE,oBAAY,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7D,oBAAY,mBAAmB,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAC1F,oBAAY,UAAU,GAAG,QAAQ,GAAG,GAAG,CAAC;AACxC,oBAAY,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAE/D,UAAU,aAAa;IACrB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,EAAE,aAI3B,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,eAAe;IACnE,sCAAsC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClE,uDAAuD;IACvD,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAYnE,oBAAY,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7D,oBAAY,mBAAmB,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAC1F,oBAAY,UAAU,GAAG,QAAQ,GAAG,GAAG,CAAC;AACxC,oBAAY,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAE/D,UAAU,aAAa;IACrB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,EAAE,aAI3B,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,eAAe;IACnE,sCAAsC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAClE,uDAAuD;IACvD,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAgCD,QAAA,MAAM,MAAM,2GAuJV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as s}from"../../Button-
|
|
1
|
+
import{B as s}from"../../Button-3f327b66.js";export{B as default}from"../../Button-3f327b66.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"../../_tslib-51c8a283.js";import"react";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../../constants-d919236e.js";import"../../Loader-cf365332.js";import"../../index-9b84fabc.js";import"../../uuid-8870ab4b.js";import"../Loader/styles.module.scss";import"../../useHover-037be19d.js";import"../../useWindowSize-73b47451.js";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,6 +4,6 @@ interface ModalWithButtonProps extends ModalProps {
|
|
|
4
4
|
/** Text of the button */
|
|
5
5
|
buttonText: string;
|
|
6
6
|
}
|
|
7
|
-
declare const ModalWithButton: React.ForwardRefExoticComponent<ModalWithButtonProps & React.RefAttributes<
|
|
7
|
+
declare const ModalWithButton: React.ForwardRefExoticComponent<ModalWithButtonProps & React.RefAttributes<HTMLElement>>;
|
|
8
8
|
export default ModalWithButton;
|
|
9
9
|
//# sourceMappingURL=ButtonWithModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonWithModal.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonWithModal/ButtonWithModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEnD,UAAU,oBAAqB,SAAQ,UAAU;IAC/C,yBAAyB;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"ButtonWithModal.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonWithModal/ButtonWithModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEnD,UAAU,oBAAqB,SAAQ,UAAU;IAC/C,yBAAyB;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,0FASnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"required": false,
|
|
94
94
|
"type": {
|
|
95
95
|
"name": "enum",
|
|
96
|
-
"raw": "
|
|
96
|
+
"raw": "\"normal\" | \"warning\" | \"error\" | \"image\" | undefined",
|
|
97
97
|
"value": [
|
|
98
98
|
{
|
|
99
99
|
"value": "undefined"
|
|
@@ -113,10 +113,10 @@
|
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
"
|
|
116
|
+
"size": {
|
|
117
117
|
"defaultValue": null,
|
|
118
|
-
"description": "
|
|
119
|
-
"name": "
|
|
118
|
+
"description": "Change width of the modal (default: large)",
|
|
119
|
+
"name": "size",
|
|
120
120
|
"parent": {
|
|
121
121
|
"fileName": "designsystem/src/components/Modal/Modal.tsx",
|
|
122
122
|
"name": "ModalProps"
|
|
@@ -129,7 +129,19 @@
|
|
|
129
129
|
],
|
|
130
130
|
"required": false,
|
|
131
131
|
"type": {
|
|
132
|
-
"name": "
|
|
132
|
+
"name": "enum",
|
|
133
|
+
"raw": "\"large\" | \"medium\" | undefined",
|
|
134
|
+
"value": [
|
|
135
|
+
{
|
|
136
|
+
"value": "undefined"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"value": "\"large\""
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"value": "\"medium\""
|
|
143
|
+
}
|
|
144
|
+
]
|
|
133
145
|
}
|
|
134
146
|
},
|
|
135
147
|
"noCloseButton": {
|
|
@@ -281,7 +293,7 @@
|
|
|
281
293
|
],
|
|
282
294
|
"required": false,
|
|
283
295
|
"type": {
|
|
284
|
-
"name": "
|
|
296
|
+
"name": "Element"
|
|
285
297
|
}
|
|
286
298
|
},
|
|
287
299
|
"className": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as t}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
import{_ as t}from"../../_rollupPluginBabelHelpers-d0752906.js";import e,{useState as o}from"react";import{B as r}from"../../Button-3f327b66.js";import{M as s}from"../../Modal-0dd5ce43.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../../constants-d919236e.js";import"../../Loader-cf365332.js";import"../../index-9b84fabc.js";import"../../uuid-8870ab4b.js";import"../Loader/styles.module.scss";import"../../useHover-037be19d.js";import"../../useWindowSize-73b47451.js";import"../Button/styles.module.scss";import"../../AlertSignFill-64bfef57.js";import"../Modal/styles.module.scss";import"../../Title-7c829525.js";import"../Title/styles.module.scss";var i=e.forwardRef((function(i,m){var l=o(!1),n=t(l,2),p=n[0],a=n[1];return e.createElement("div",null,e.createElement(r,{onClick:function(){return a(!0)}},i.buttonText),p&&e.createElement(s,Object.assign({},i,{onClose:function(){return a(!1)}})))}));export default i;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormMode, FormVariant } from '../FormGroup/FormGroup';
|
|
3
|
+
export interface CheckboxProps {
|
|
4
|
+
/** Adds custom classes to the element. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Sets checkbox as checked */
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
/** Disables the checkbox */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** The label text next to the checkbox */
|
|
11
|
+
label: string;
|
|
12
|
+
/** input id of the checkbox */
|
|
13
|
+
inputid?: string;
|
|
14
|
+
/** Changes the visuals of the checkbox */
|
|
15
|
+
mode?: FormMode;
|
|
16
|
+
/** Unique identifyer for the input tag */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Return value for the checkbox */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** Changes the visuals of the checkbox */
|
|
21
|
+
variant?: FormVariant;
|
|
22
|
+
/** Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup */
|
|
23
|
+
error?: boolean;
|
|
24
|
+
/** Error text to show above the component */
|
|
25
|
+
errorText?: string;
|
|
26
|
+
/** Sets the data-testid attribute. */
|
|
27
|
+
testId?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
export default Checkbox;
|
|
31
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,iHAAiH;IACjH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,wFA6EnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
{
|
|
2
|
+
"props": {
|
|
3
|
+
"className": {
|
|
4
|
+
"defaultValue": null,
|
|
5
|
+
"description": "Adds custom classes to the element.",
|
|
6
|
+
"name": "className",
|
|
7
|
+
"parent": {
|
|
8
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
9
|
+
"name": "CheckboxProps"
|
|
10
|
+
},
|
|
11
|
+
"declarations": [
|
|
12
|
+
{
|
|
13
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
14
|
+
"name": "CheckboxProps"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"required": false,
|
|
18
|
+
"type": {
|
|
19
|
+
"name": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"checked": {
|
|
23
|
+
"defaultValue": null,
|
|
24
|
+
"description": "Sets checkbox as checked",
|
|
25
|
+
"name": "checked",
|
|
26
|
+
"parent": {
|
|
27
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
28
|
+
"name": "CheckboxProps"
|
|
29
|
+
},
|
|
30
|
+
"declarations": [
|
|
31
|
+
{
|
|
32
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
33
|
+
"name": "CheckboxProps"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"required": false,
|
|
37
|
+
"type": {
|
|
38
|
+
"name": "boolean"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"disabled": {
|
|
42
|
+
"defaultValue": null,
|
|
43
|
+
"description": "Disables the checkbox",
|
|
44
|
+
"name": "disabled",
|
|
45
|
+
"parent": {
|
|
46
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
47
|
+
"name": "CheckboxProps"
|
|
48
|
+
},
|
|
49
|
+
"declarations": [
|
|
50
|
+
{
|
|
51
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
52
|
+
"name": "CheckboxProps"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"required": false,
|
|
56
|
+
"type": {
|
|
57
|
+
"name": "boolean"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"label": {
|
|
61
|
+
"defaultValue": null,
|
|
62
|
+
"description": "The label text next to the checkbox",
|
|
63
|
+
"name": "label",
|
|
64
|
+
"parent": {
|
|
65
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
66
|
+
"name": "CheckboxProps"
|
|
67
|
+
},
|
|
68
|
+
"declarations": [
|
|
69
|
+
{
|
|
70
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
71
|
+
"name": "CheckboxProps"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"required": true,
|
|
75
|
+
"type": {
|
|
76
|
+
"name": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"inputid": {
|
|
80
|
+
"defaultValue": null,
|
|
81
|
+
"description": "input id of the checkbox",
|
|
82
|
+
"name": "inputid",
|
|
83
|
+
"parent": {
|
|
84
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
85
|
+
"name": "CheckboxProps"
|
|
86
|
+
},
|
|
87
|
+
"declarations": [
|
|
88
|
+
{
|
|
89
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
90
|
+
"name": "CheckboxProps"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"required": false,
|
|
94
|
+
"type": {
|
|
95
|
+
"name": "string"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"mode": {
|
|
99
|
+
"defaultValue": null,
|
|
100
|
+
"description": "Changes the visuals of the checkbox",
|
|
101
|
+
"name": "mode",
|
|
102
|
+
"parent": {
|
|
103
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
104
|
+
"name": "CheckboxProps"
|
|
105
|
+
},
|
|
106
|
+
"declarations": [
|
|
107
|
+
{
|
|
108
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
109
|
+
"name": "CheckboxProps"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"required": false,
|
|
113
|
+
"type": {
|
|
114
|
+
"name": "enum",
|
|
115
|
+
"raw": "\"on-white\" | \"on-blueberry\" | \"on-dark\" | undefined",
|
|
116
|
+
"value": [
|
|
117
|
+
{
|
|
118
|
+
"value": "undefined"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value": "\"on-white\""
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"value": "\"on-blueberry\""
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"value": "\"on-dark\""
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"name": {
|
|
133
|
+
"defaultValue": null,
|
|
134
|
+
"description": "Unique identifyer for the input tag",
|
|
135
|
+
"name": "name",
|
|
136
|
+
"parent": {
|
|
137
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
138
|
+
"name": "CheckboxProps"
|
|
139
|
+
},
|
|
140
|
+
"declarations": [
|
|
141
|
+
{
|
|
142
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
143
|
+
"name": "CheckboxProps"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"required": false,
|
|
147
|
+
"type": {
|
|
148
|
+
"name": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"value": {
|
|
152
|
+
"defaultValue": null,
|
|
153
|
+
"description": "Return value for the checkbox",
|
|
154
|
+
"name": "value",
|
|
155
|
+
"parent": {
|
|
156
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
157
|
+
"name": "CheckboxProps"
|
|
158
|
+
},
|
|
159
|
+
"declarations": [
|
|
160
|
+
{
|
|
161
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
162
|
+
"name": "CheckboxProps"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"required": false,
|
|
166
|
+
"type": {
|
|
167
|
+
"name": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"variant": {
|
|
171
|
+
"defaultValue": null,
|
|
172
|
+
"description": "Changes the visuals of the checkbox",
|
|
173
|
+
"name": "variant",
|
|
174
|
+
"parent": {
|
|
175
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
176
|
+
"name": "CheckboxProps"
|
|
177
|
+
},
|
|
178
|
+
"declarations": [
|
|
179
|
+
{
|
|
180
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
181
|
+
"name": "CheckboxProps"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"required": false,
|
|
185
|
+
"type": {
|
|
186
|
+
"name": "enum",
|
|
187
|
+
"raw": "\"normal\" | \"bigform\" | undefined",
|
|
188
|
+
"value": [
|
|
189
|
+
{
|
|
190
|
+
"value": "undefined"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"value": "\"normal\""
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"value": "\"bigform\""
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"error": {
|
|
202
|
+
"defaultValue": null,
|
|
203
|
+
"description": "Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup",
|
|
204
|
+
"name": "error",
|
|
205
|
+
"parent": {
|
|
206
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
207
|
+
"name": "CheckboxProps"
|
|
208
|
+
},
|
|
209
|
+
"declarations": [
|
|
210
|
+
{
|
|
211
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
212
|
+
"name": "CheckboxProps"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"required": false,
|
|
216
|
+
"type": {
|
|
217
|
+
"name": "boolean"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"errorText": {
|
|
221
|
+
"defaultValue": null,
|
|
222
|
+
"description": "Error text to show above the component",
|
|
223
|
+
"name": "errorText",
|
|
224
|
+
"parent": {
|
|
225
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
226
|
+
"name": "CheckboxProps"
|
|
227
|
+
},
|
|
228
|
+
"declarations": [
|
|
229
|
+
{
|
|
230
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
231
|
+
"name": "CheckboxProps"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"required": false,
|
|
235
|
+
"type": {
|
|
236
|
+
"name": "string"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"testId": {
|
|
240
|
+
"defaultValue": null,
|
|
241
|
+
"description": "Sets the data-testid attribute.",
|
|
242
|
+
"name": "testId",
|
|
243
|
+
"parent": {
|
|
244
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
245
|
+
"name": "CheckboxProps"
|
|
246
|
+
},
|
|
247
|
+
"declarations": [
|
|
248
|
+
{
|
|
249
|
+
"fileName": "src/components/Checkbox/Checkbox.tsx",
|
|
250
|
+
"name": "CheckboxProps"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"required": false,
|
|
254
|
+
"type": {
|
|
255
|
+
"name": "string"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{C as o}from"../../Checkbox-46666e69.js";export{C as default}from"../../Checkbox-46666e69.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"react";import"../../index-9b84fabc.js";import"../../uuid-8870ab4b.js";import"../../Check-6291ad09.js";import"../../constants-d919236e.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"./styles.module.scss";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|