@warp-ds/elements 2.2.0-next.7 → 2.2.0-next.9
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/dist/api.js +1 -1
- package/dist/api.js.map +4 -4
- package/dist/custom-elements.json +1826 -1424
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1256 -137
- package/dist/index.js.map +4 -4
- package/dist/packages/alert/index.js.map +1 -1
- package/dist/packages/alert/react.js.map +1 -1
- package/dist/packages/attention/attention.stories.d.ts +5 -0
- package/dist/packages/attention/attention.test.d.ts +1 -0
- package/dist/packages/attention/index.d.ts +48 -89
- package/dist/packages/attention/index.js +3354 -16
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/attention/layout-styles.d.ts +1 -0
- package/dist/packages/attention/react.d.ts +1 -0
- package/dist/packages/attention/react.js +3405 -0
- package/dist/packages/attention/react.js.map +7 -0
- package/dist/packages/attention/styles.d.ts +1 -0
- package/dist/packages/button/index.d.ts +1 -0
- package/dist/packages/button/index.js +214 -9
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/button/react.js +213 -8
- package/dist/packages/button/react.js.map +4 -4
- package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
- package/dist/packages/datepicker/datepicker.d.ts +9 -0
- package/dist/packages/datepicker/index.js +87 -83
- package/dist/packages/datepicker/index.js.map +3 -3
- package/dist/packages/datepicker/react.d.ts +2 -0
- package/dist/packages/datepicker/react.js +2805 -0
- package/dist/packages/datepicker/react.js.map +7 -0
- package/dist/packages/link/index.d.ts +39 -0
- package/dist/packages/link/index.js +2646 -0
- package/dist/packages/link/index.js.map +7 -0
- package/dist/packages/link/link.stories.d.ts +20 -0
- package/dist/packages/link/link.test.d.ts +1 -0
- package/dist/packages/link/react.d.ts +2 -0
- package/dist/packages/link/react.js +2666 -0
- package/dist/packages/link/react.js.map +7 -0
- package/dist/packages/link/styles.d.ts +1 -0
- package/dist/packages/steps/index.d.ts +43 -0
- package/dist/packages/steps/index.js +2465 -0
- package/dist/packages/steps/index.js.map +7 -0
- package/dist/packages/steps/locales/da/messages.d.mts +1 -0
- package/dist/packages/steps/locales/en/messages.d.mts +1 -0
- package/dist/packages/steps/locales/fi/messages.d.mts +1 -0
- package/dist/packages/steps/locales/nb/messages.d.mts +1 -0
- package/dist/packages/steps/locales/sv/messages.d.mts +1 -0
- package/dist/packages/steps/react.d.ts +3 -0
- package/dist/packages/steps/react.js +2485 -0
- package/dist/packages/steps/react.js.map +7 -0
- package/dist/packages/steps/steps.stories.d.ts +12 -0
- package/dist/packages/steps/styles.d.ts +1 -0
- package/dist/packages/textfield/index.js +1 -1
- package/dist/packages/textfield/index.js.map +2 -2
- package/dist/packages/textfield/react.js +1 -1
- package/dist/packages/textfield/react.js.map +2 -2
- package/dist/packages/toast/api.d.ts +4 -45
- package/dist/packages/toast/index.d.ts +3 -3
- package/dist/packages/toast/index.js +2461 -22
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/styles.d.ts +1 -0
- package/dist/packages/toast/toast-container.d.ts +12 -78
- package/dist/packages/toast/toast.d.ts +16 -29
- package/dist/packages/toast/types.d.ts +15 -0
- package/dist/vscode.html-custom-data.json +86 -34
- package/dist/web-types.json +199 -99
- package/package.json +11 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var gr=Object.create;var le=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var br=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty;var K=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var hr=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of pr(r))!mr.call(e,i)&&i!==t&&le(e,i,{get:()=>r[i],enumerable:!(o=$e(r,i))||o.enumerable});return e};var _e=(e,r,t)=>(t=e!=null?gr(br(e)):{},hr(r||!e||!e.__esModule?le(t,"default",{value:e,enumerable:!0}):t,e));var L=(e,r,t,o)=>{for(var i=o>1?void 0:o?$e(r,t):r,n=e.length-1,a;n>=0;n--)(a=e[n])&&(i=(o?a(r,t,i):a(i))||i);return o&&i&&le(r,t,i),i};var Ae=K(p=>{"use strict";var de=Symbol.for("react.transitional.element"),vr=Symbol.for("react.portal"),fr=Symbol.for("react.fragment"),wr=Symbol.for("react.strict_mode"),yr=Symbol.for("react.profiler"),xr=Symbol.for("react.consumer"),kr=Symbol.for("react.context"),$r=Symbol.for("react.forward_ref"),_r=Symbol.for("react.suspense"),Cr=Symbol.for("react.memo"),ze=Symbol.for("react.lazy"),Ce=Symbol.iterator;function Er(e){return e===null||typeof e!="object"?null:(e=Ce&&e[Ce]||e["@@iterator"],typeof e=="function"?e:null)}var Te={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pe=Object.assign,Oe={};function H(e,r,t){this.props=e,this.context=r,this.refs=Oe,this.updater=t||Te}H.prototype.isReactComponent={};H.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")};H.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Re(){}Re.prototype=H.prototype;function ue(e,r,t){this.props=e,this.context=r,this.refs=Oe,this.updater=t||Te}var ge=ue.prototype=new Re;ge.constructor=ue;Pe(ge,H.prototype);ge.isPureReactComponent=!0;var Ee=Array.isArray,x={H:null,A:null,T:null,S:null,V:null},De=Object.prototype.hasOwnProperty;function pe(e,r,t,o,i,n){return t=n.ref,{$$typeof:de,type:e,key:r,ref:t!==void 0?t:null,props:n}}function Sr(e,r){return pe(e.type,r,void 0,void 0,void 0,e.props)}function be(e){return typeof e=="object"&&e!==null&&e.$$typeof===de}function Mr(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(t){return r[t]})}var Se=/\/+/g;function ce(e,r){return typeof e=="object"&&e!==null&&e.key!=null?Mr(""+e.key):r.toString(36)}function Me(){}function Lr(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Me,Me):(e.status="pending",e.then(function(r){e.status==="pending"&&(e.status="fulfilled",e.value=r)},function(r){e.status==="pending"&&(e.status="rejected",e.reason=r)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function V(e,r,t,o,i){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(n){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case de:case vr:a=!0;break;case ze:return a=e._init,V(a(e._payload),r,t,o,i)}}if(a)return i=i(e),a=o===""?"."+ce(e,0):o,Ee(i)?(t="",a!=null&&(t=a.replace(Se,"$&/")+"/"),V(i,r,t,"",function(h){return h})):i!=null&&(be(i)&&(i=Sr(i,t+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Se,"$&/")+"/")+a)),r.push(i)),1;a=0;var s=o===""?".":o+":";if(Ee(e))for(var l=0;l<e.length;l++)o=e[l],n=s+ce(o,l),a+=V(o,r,t,n,i);else if(l=Er(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,n=s+ce(o,l++),a+=V(o,r,t,n,i);else if(n==="object"){if(typeof e.then=="function")return V(Lr(e),r,t,o,i);throw r=String(e),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return a}function ee(e,r,t){if(e==null)return e;var o=[],i=0;return V(e,o,"","",function(n){return r.call(t,n,i++)}),o}function zr(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=r)}if(e._status===1)return e._result.default;throw e._result}var Le=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Tr(){}p.Children={map:ee,forEach:function(e,r,t){ee(e,function(){r.apply(this,arguments)},t)},count:function(e){var r=0;return ee(e,function(){r++}),r},toArray:function(e){return ee(e,function(r){return r})||[]},only:function(e){if(!be(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};p.Component=H;p.Fragment=fr;p.Profiler=yr;p.PureComponent=ue;p.StrictMode=wr;p.Suspense=_r;p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x;p.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}};p.cache=function(e){return function(){return e.apply(null,arguments)}};p.cloneElement=function(e,r,t){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Pe({},e.props),i=e.key,n=void 0;if(r!=null)for(a in r.ref!==void 0&&(n=void 0),r.key!==void 0&&(i=""+r.key),r)!De.call(r,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&r.ref===void 0||(o[a]=r[a]);var a=arguments.length-2;if(a===1)o.children=t;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];o.children=s}return pe(e.type,i,void 0,void 0,n,o)};p.createContext=function(e){return e={$$typeof:kr,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:xr,_context:e},e};p.createElement=function(e,r,t){var o,i={},n=null;if(r!=null)for(o in r.key!==void 0&&(n=""+r.key),r)De.call(r,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=r[o]);var a=arguments.length-2;if(a===1)i.children=t;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];i.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)i[o]===void 0&&(i[o]=a[o]);return pe(e,n,void 0,void 0,null,i)};p.createRef=function(){return{current:null}};p.forwardRef=function(e){return{$$typeof:$r,render:e}};p.isValidElement=be;p.lazy=function(e){return{$$typeof:ze,_payload:{_status:-1,_result:e},_init:zr}};p.memo=function(e,r){return{$$typeof:Cr,type:e,compare:r===void 0?null:r}};p.startTransition=function(e){var r=x.T,t={};x.T=t;try{var o=e(),i=x.S;i!==null&&i(t,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Tr,Le)}catch(n){Le(n)}finally{x.T=r}};p.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()};p.use=function(e){return x.H.use(e)};p.useActionState=function(e,r,t){return x.H.useActionState(e,r,t)};p.useCallback=function(e,r){return x.H.useCallback(e,r)};p.useContext=function(e){return x.H.useContext(e)};p.useDebugValue=function(){};p.useDeferredValue=function(e,r){return x.H.useDeferredValue(e,r)};p.useEffect=function(e,r,t){var o=x.H;if(typeof t=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return o.useEffect(e,r)};p.useId=function(){return x.H.useId()};p.useImperativeHandle=function(e,r,t){return x.H.useImperativeHandle(e,r,t)};p.useInsertionEffect=function(e,r){return x.H.useInsertionEffect(e,r)};p.useLayoutEffect=function(e,r){return x.H.useLayoutEffect(e,r)};p.useMemo=function(e,r){return x.H.useMemo(e,r)};p.useOptimistic=function(e,r){return x.H.useOptimistic(e,r)};p.useReducer=function(e,r,t){return x.H.useReducer(e,r,t)};p.useRef=function(e){return x.H.useRef(e)};p.useState=function(e){return x.H.useState(e)};p.useSyncExternalStore=function(e,r,t){return x.H.useSyncExternalStore(e,r,t)};p.useTransition=function(){return x.H.useTransition()};p.version="19.1.1"});var Ne=K((st,je)=>{"use strict";je.exports=Ae()});var Fe=K(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.errorMessages=F.ErrorType=void 0;var I;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(I=F.ErrorType||(F.ErrorType={}));F.errorMessages=new Map([[I.MalformedUnicode,"malformed Unicode character escape sequence"],[I.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[I.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[I.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[I.EndOfString,"malformed escape sequence at end of string"]])});var Ve=K(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.unraw=j.errorMessages=j.ErrorType=void 0;var M=Fe();Object.defineProperty(j,"ErrorType",{enumerable:!0,get:function(){return M.ErrorType}});Object.defineProperty(j,"errorMessages",{enumerable:!0,get:function(){return M.errorMessages}});function Or(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function re(e,r,t){let o=Or(e);if(Number.isNaN(o)||t!==void 0&&t!==e.length)throw new SyntaxError(M.errorMessages.get(r));return o}function Rr(e){let r=re(e,M.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function Ye(e,r){let t=re(e,M.ErrorType.MalformedUnicode,4);if(r!==void 0){let o=re(r,M.ErrorType.MalformedUnicode,4);return String.fromCharCode(t,o)}return String.fromCharCode(t)}function Dr(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function Ar(e){if(!Dr(e))throw new SyntaxError(M.errorMessages.get(M.ErrorType.MalformedUnicode));let r=e.slice(1,-1),t=re(r,M.ErrorType.MalformedUnicode);try{return String.fromCodePoint(t)}catch(o){throw o instanceof RangeError?new SyntaxError(M.errorMessages.get(M.ErrorType.CodePointLimit)):o}}function jr(e,r=!1){if(r)throw new SyntaxError(M.errorMessages.get(M.ErrorType.OctalDeprecation));let t=parseInt(e,8);return String.fromCharCode(t)}var Nr=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function
|
|
1
|
+
var vr=Object.create;var be=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var mr=Object.getOwnPropertyNames;var fr=Object.getPrototypeOf,wr=Object.prototype.hasOwnProperty;var re=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var yr=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of mr(r))!wr.call(e,i)&&i!==t&&be(e,i,{get:()=>r[i],enumerable:!(o=Se(r,i))||o.enumerable});return e};var ze=(e,r,t)=>(t=e!=null?vr(fr(e)):{},yr(r||!e||!e.__esModule?be(t,"default",{value:e,enumerable:!0}):t,e));var y=(e,r,t,o)=>{for(var i=o>1?void 0:o?Se(r,t):r,n=e.length-1,a;n>=0;n--)(a=e[n])&&(i=(o?a(r,t,i):a(i))||i);return o&&i&&be(r,t,i),i};var Ne=re(g=>{"use strict";var pe=Symbol.for("react.transitional.element"),xr=Symbol.for("react.portal"),kr=Symbol.for("react.fragment"),_r=Symbol.for("react.strict_mode"),$r=Symbol.for("react.profiler"),Cr=Symbol.for("react.consumer"),Er=Symbol.for("react.context"),Sr=Symbol.for("react.forward_ref"),zr=Symbol.for("react.suspense"),Mr=Symbol.for("react.memo"),Re=Symbol.for("react.lazy"),Me=Symbol.iterator;function Tr(e){return e===null||typeof e!="object"?null:(e=Me&&e[Me]||e["@@iterator"],typeof e=="function"?e:null)}var qe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},De=Object.assign,Ae={};function X(e,r,t){this.props=e,this.context=r,this.refs=Ae,this.updater=t||qe}X.prototype.isReactComponent={};X.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")};X.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qe(){}Qe.prototype=X.prototype;function he(e,r,t){this.props=e,this.context=r,this.refs=Ae,this.updater=t||qe}var ve=he.prototype=new Qe;ve.constructor=he;De(ve,X.prototype);ve.isPureReactComponent=!0;var Te=Array.isArray,k={H:null,A:null,T:null,S:null,V:null},je=Object.prototype.hasOwnProperty;function me(e,r,t,o,i,n){return t=n.ref,{$$typeof:pe,type:e,key:r,ref:t!==void 0?t:null,props:n}}function Lr(e,r){return me(e.type,r,void 0,void 0,void 0,e.props)}function fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===pe}function Pr(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(t){return r[t]})}var Le=/\/+/g;function ge(e,r){return typeof e=="object"&&e!==null&&e.key!=null?Pr(""+e.key):r.toString(36)}function Pe(){}function Or(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Pe,Pe):(e.status="pending",e.then(function(r){e.status==="pending"&&(e.status="fulfilled",e.value=r)},function(r){e.status==="pending"&&(e.status="rejected",e.reason=r)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function I(e,r,t,o,i){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(n){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case pe:case xr:a=!0;break;case Re:return a=e._init,I(a(e._payload),r,t,o,i)}}if(a)return i=i(e),a=o===""?"."+ge(e,0):o,Te(i)?(t="",a!=null&&(t=a.replace(Le,"$&/")+"/"),I(i,r,t,"",function(v){return v})):i!=null&&(fe(i)&&(i=Lr(i,t+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Le,"$&/")+"/")+a)),r.push(i)),1;a=0;var s=o===""?".":o+":";if(Te(e))for(var l=0;l<e.length;l++)o=e[l],n=s+ge(o,l),a+=I(o,r,t,n,i);else if(l=Tr(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,n=s+ge(o,l++),a+=I(o,r,t,n,i);else if(n==="object"){if(typeof e.then=="function")return I(Or(e),r,t,o,i);throw r=String(e),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return a}function te(e,r,t){if(e==null)return e;var o=[],i=0;return I(e,o,"","",function(n){return r.call(t,n,i++)}),o}function Rr(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=r)}if(e._status===1)return e._result.default;throw e._result}var Oe=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function qr(){}g.Children={map:te,forEach:function(e,r,t){te(e,function(){r.apply(this,arguments)},t)},count:function(e){var r=0;return te(e,function(){r++}),r},toArray:function(e){return te(e,function(r){return r})||[]},only:function(e){if(!fe(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};g.Component=X;g.Fragment=kr;g.Profiler=$r;g.PureComponent=he;g.StrictMode=_r;g.Suspense=zr;g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k;g.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.H.useMemoCache(e)}};g.cache=function(e){return function(){return e.apply(null,arguments)}};g.cloneElement=function(e,r,t){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=De({},e.props),i=e.key,n=void 0;if(r!=null)for(a in r.ref!==void 0&&(n=void 0),r.key!==void 0&&(i=""+r.key),r)!je.call(r,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&r.ref===void 0||(o[a]=r[a]);var a=arguments.length-2;if(a===1)o.children=t;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];o.children=s}return me(e.type,i,void 0,void 0,n,o)};g.createContext=function(e){return e={$$typeof:Er,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Cr,_context:e},e};g.createElement=function(e,r,t){var o,i={},n=null;if(r!=null)for(o in r.key!==void 0&&(n=""+r.key),r)je.call(r,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=r[o]);var a=arguments.length-2;if(a===1)i.children=t;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];i.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)i[o]===void 0&&(i[o]=a[o]);return me(e,n,void 0,void 0,null,i)};g.createRef=function(){return{current:null}};g.forwardRef=function(e){return{$$typeof:Sr,render:e}};g.isValidElement=fe;g.lazy=function(e){return{$$typeof:Re,_payload:{_status:-1,_result:e},_init:Rr}};g.memo=function(e,r){return{$$typeof:Mr,type:e,compare:r===void 0?null:r}};g.startTransition=function(e){var r=k.T,t={};k.T=t;try{var o=e(),i=k.S;i!==null&&i(t,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(qr,Oe)}catch(n){Oe(n)}finally{k.T=r}};g.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()};g.use=function(e){return k.H.use(e)};g.useActionState=function(e,r,t){return k.H.useActionState(e,r,t)};g.useCallback=function(e,r){return k.H.useCallback(e,r)};g.useContext=function(e){return k.H.useContext(e)};g.useDebugValue=function(){};g.useDeferredValue=function(e,r){return k.H.useDeferredValue(e,r)};g.useEffect=function(e,r,t){var o=k.H;if(typeof t=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return o.useEffect(e,r)};g.useId=function(){return k.H.useId()};g.useImperativeHandle=function(e,r,t){return k.H.useImperativeHandle(e,r,t)};g.useInsertionEffect=function(e,r){return k.H.useInsertionEffect(e,r)};g.useLayoutEffect=function(e,r){return k.H.useLayoutEffect(e,r)};g.useMemo=function(e,r){return k.H.useMemo(e,r)};g.useOptimistic=function(e,r){return k.H.useOptimistic(e,r)};g.useReducer=function(e,r,t){return k.H.useReducer(e,r,t)};g.useRef=function(e){return k.H.useRef(e)};g.useState=function(e){return k.H.useState(e)};g.useSyncExternalStore=function(e,r,t){return k.H.useSyncExternalStore(e,r,t)};g.useTransition=function(){return k.H.useTransition()};g.version="19.1.1"});var Ve=re((vt,Fe)=>{"use strict";Fe.exports=Ne()});var He=re(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.errorMessages=U.ErrorType=void 0;var Z;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(Z=U.ErrorType||(U.ErrorType={}));U.errorMessages=new Map([[Z.MalformedUnicode,"malformed Unicode character escape sequence"],[Z.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[Z.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[Z.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[Z.EndOfString,"malformed escape sequence at end of string"]])});var Ze=re(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.unraw=j.errorMessages=j.ErrorType=void 0;var T=He();Object.defineProperty(j,"ErrorType",{enumerable:!0,get:function(){return T.ErrorType}});Object.defineProperty(j,"errorMessages",{enumerable:!0,get:function(){return T.errorMessages}});function Ar(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function oe(e,r,t){let o=Ar(e);if(Number.isNaN(o)||t!==void 0&&t!==e.length)throw new SyntaxError(T.errorMessages.get(r));return o}function Qr(e){let r=oe(e,T.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function Ie(e,r){let t=oe(e,T.ErrorType.MalformedUnicode,4);if(r!==void 0){let o=oe(r,T.ErrorType.MalformedUnicode,4);return String.fromCharCode(t,o)}return String.fromCharCode(t)}function jr(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function Nr(e){if(!jr(e))throw new SyntaxError(T.errorMessages.get(T.ErrorType.MalformedUnicode));let r=e.slice(1,-1),t=oe(r,T.ErrorType.MalformedUnicode);try{return String.fromCodePoint(t)}catch(o){throw o instanceof RangeError?new SyntaxError(T.errorMessages.get(T.ErrorType.CodePointLimit)):o}}function Fr(e,r=!1){if(r)throw new SyntaxError(T.errorMessages.get(T.ErrorType.OctalDeprecation));let t=parseInt(e,8);return String.fromCharCode(t)}var Vr=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ur(e){return Vr.get(e)||e}var Yr=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function Xe(e,r=!1){return e.replace(Yr,function(t,o,i,n,a,s,l,v,x){if(o!==void 0)return"\\";if(i!==void 0)return Qr(i);if(n!==void 0)return Nr(n);if(a!==void 0)return Ie(a,s);if(l!==void 0)return Ie(l);if(v==="0")return"\0";if(v!==void 0)return Fr(v,!r);if(x!==void 0)return Ur(x);throw new SyntaxError(T.errorMessages.get(T.ErrorType.EndOfString))})}j.unraw=Xe;j.default=Xe});var pr=ze(Ve(),1);var Dr=new Set(["children","localName","ref","style","className"]),Ue=new WeakMap,Ye=(e,r,t,o,i)=>{let n=i==null?void 0:i[r];n===void 0?(e[r]=t,t==null&&r in HTMLElement.prototype&&e.removeAttribute(r)):t!==o&&((a,s,l)=>{let v=Ue.get(a);v===void 0&&Ue.set(a,v=new Map);let x=v.get(s);l!==void 0?x===void 0?(v.set(s,x={handleEvent:l}),a.addEventListener(s,x)):x.handleEvent=l:x!==void 0&&(v.delete(s),a.removeEventListener(s,x))})(e,n,t)},we=({react:e,tagName:r,elementClass:t,events:o,displayName:i})=>{let n=new Set(Object.keys(o!=null?o:{})),a=e.forwardRef((s,l)=>{let v=e.useRef(new Map),x=e.useRef(null),L={},A={};for(let[m,$]of Object.entries(s))Dr.has(m)?L[m==="className"?"class":m]=$:n.has(m)||m in t.prototype?A[m]=$:L[m]=$;return e.useLayoutEffect(()=>{if(x.current===null)return;let m=new Map;for(let $ in A)Ye(x.current,$,s[$],v.current.get($),o),v.current.delete($),m.set($,s[$]);for(let[$,D]of v.current)Ye(x.current,$,void 0,D,o);v.current=m}),e.useLayoutEffect(()=>{var m;(m=x.current)==null||m.removeAttribute("defer-hydration")},[]),L.suppressHydrationWarning=!0,e.createElement(r,{...L,ref:e.useCallback(m=>{x.current=m,typeof l=="function"?l(m):l!==null&&(l.current=m)},[l])})});return a.displayName=i!=null?i:t.name,a};import{html as le,LitElement as ut}from"lit";var ye=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return e.reduce(function(t,o){return t.concat(typeof o=="string"?o:Array.isArray(o)?ye.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(i){return o[i]?i:""}):"")},[]).join(" ")};var Je=ze(Ze(),1);var N=e=>typeof e=="string",Hr=e=>typeof e=="function",Be=new Map,Ke="en";function $e(e){return[...Array.isArray(e)?e:[e],Ke]}function Ce(e,r,t){let o=$e(e);t||(t="default");let i;if(typeof t=="string")switch(i={day:"numeric",month:"short",year:"numeric"},t){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=t;return ie(()=>ae("date",o,t),()=>new Intl.DateTimeFormat(o,i)).format(N(r)?new Date(r):r)}function Ir(e,r,t){let o;if(t||(t="default"),typeof t=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},t){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=t;return Ce(e,r,o)}function xe(e,r,t){let o=$e(e);return ie(()=>ae("number",o,t),()=>new Intl.NumberFormat(o,t)).format(r)}function Ge(e,r,t,{offset:o=0,...i}){var s,l;let n=$e(e),a=r?ie(()=>ae("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):ie(()=>ae("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(l=(s=i[t])!=null?s:i[a.select(t-o)])!=null?l:i.other}function ie(e,r){let t=e(),o=Be.get(t);return o||(o=r(),Be.set(t,o)),o}function ae(e,r,t){let o=r.join("-");return`${e}-${o}-${JSON.stringify(t)}`}var We=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,er="%__lingui_octothorpe__%",Xr=(e,r,t={})=>{let o=r||e,i=a=>typeof a=="object"?a:t[a],n=(a,s)=>{let l=Object.keys(t).length?i("number"):void 0,v=xe(o,a,l);return s.replace(new RegExp(er,"g"),v)};return{plural:(a,s)=>{let{offset:l=0}=s,v=Ge(o,!1,a,s);return n(a-l,v)},selectordinal:(a,s)=>{let{offset:l=0}=s,v=Ge(o,!0,a,s);return n(a-l,v)},select:Zr,number:(a,s)=>xe(o,a,i(s)||{style:s}),date:(a,s)=>Ce(o,a,i(s)||s),time:(a,s)=>Ir(o,a,i(s)||s)}},Zr=(e,r)=>{var t;return(t=r[e])!=null?t:r.other};function Br(e,r,t){return(o={},i)=>{let n=Xr(r,t,i),a=(l,v=!1)=>Array.isArray(l)?l.reduce((x,L)=>{if(L==="#"&&v)return x+er;if(N(L))return x+L;let[A,m,$]=L,D={};m==="plural"||m==="selectordinal"||m==="select"?Object.entries($).forEach(([V,B])=>{D[V]=a(B,m==="plural"||m==="selectordinal")}):D=$;let P;if(m){let V=n[m];P=V(o[A],D)}else P=o[A];return P==null?x:x+P},""):l,s=a(e);return N(s)&&We.test(s)?(0,Je.unraw)(s):N(s)?s:s?String(s):""}}var Gr=Object.defineProperty,Jr=(e,r,t)=>r in e?Gr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Kr=(e,r,t)=>(Jr(e,typeof r!="symbol"?r+"":r,t),t),ke=class{constructor(){Kr(this,"_events",{})}on(r,t){var i;var o;return(i=(o=this._events)[r])!=null||(o[r]=[]),this._events[r].push(t),()=>this.removeListener(r,t)}removeListener(r,t){let o=this._getListeners(r);if(!o)return;let i=o.indexOf(t);~i&&o.splice(i,1)}emit(r,...t){let o=this._getListeners(r);o&&o.map(i=>i.apply(this,t))}_getListeners(r){let t=this._events[r];return Array.isArray(t)?t:!1}},Wr=Object.defineProperty,et=(e,r,t)=>r in e?Wr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Y=(e,r,t)=>(et(e,typeof r!="symbol"?r+"":r,t),t),_e=class extends ke{constructor(r){var t;super(),Y(this,"_locale",""),Y(this,"_locales"),Y(this,"_localeData",{}),Y(this,"_messages",{}),Y(this,"_missing"),Y(this,"_messageCompiler"),Y(this,"t",this._.bind(this)),r.missing!=null&&(this._missing=r.missing),r.messages!=null&&this.load(r.messages),r.localeData!=null&&this.loadLocaleData(r.localeData),(typeof r.locale=="string"||r.locales)&&this.activate((t=r.locale)!=null?t:Ke,r.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var r;return(r=this._messages[this._locale])!=null?r:{}}get localeData(){var r;return(r=this._localeData[this._locale])!=null?r:{}}_loadLocaleData(r,t){let o=this._localeData[r];o?Object.assign(o,t):this._localeData[r]=t}setMessagesCompiler(r){return this._messageCompiler=r,this}loadLocaleData(r,t){typeof r=="string"?this._loadLocaleData(r,t):Object.keys(r).forEach(o=>this._loadLocaleData(o,r[o])),this.emit("change")}_load(r,t){let o=this._messages[r];o?Object.assign(o,t):this._messages[r]=t}load(r,t){typeof r=="string"&&typeof t=="object"?this._load(r,t):Object.entries(r).forEach(([o,i])=>this._load(o,i)),this.emit("change")}loadAndActivate({locale:r,locales:t,messages:o}){this._locale=r,this._locales=t||void 0,this._messages[this._locale]=o,this.emit("change")}activate(r,t){this._locale=r,this._locales=t,this.emit("change")}_(r,t,o){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let i=o==null?void 0:o.message;r||(r=""),N(r)||(t=r.values||t,i=r.message,r=r.id);let n=this.messages[r],a=n===void 0,s=this._missing;if(s&&a)return Hr(s)?s(this._locale,r):s;a&&this.emit("missing",{id:r,locale:this._locale});let l=n||i||r;return N(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
|
|
3
3
|
|
|
4
4
|
> ${l}
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
7
7
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
8
8
|
|
|
9
9
|
Please compile your catalog first.
|
|
10
|
-
`)),N(l)&&We.test(l)?JSON.parse(`"${l}"`):N(l)?l:
|
|
10
|
+
`)),N(l)&&We.test(l)?JSON.parse(`"${l}"`):N(l)?l:Br(l,this._locale,this._locales)(t,o==null?void 0:o.formats)}date(r,t){return Ce(this._locales||this._locale,r,t)}number(r,t){return xe(this._locales||this._locale,r,t)}};function rt(e={}){return new _e(e)}var ee=rt();var w=function(e,r,t,o){if(t==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?e!==r||!o:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?o:t==="a"?o.call(e):o?o.value:r.get(e)},S=function(e,r,t,o,i){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?e!==r||!i:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?i.call(e,t):i?i.value=t:r.set(e,t),t};function ne(e){var r,t,o,i,n,a,s,l,v,x,L,A,m,$,D,P,V,B,ce;class hr extends e{constructor(...p){var f,E,z;super(...p),r.add(this),this.internals=this.attachInternals(),t.set(this,!1),o.set(this,!1),i.set(this,!1),n.set(this,void 0),a.set(this,void 0),s.set(this,!0),v.set(this,""),x.set(this,()=>{S(this,i,!0,"f"),S(this,t,!0,"f"),w(this,r,"m",P).call(this)}),L.set(this,()=>{S(this,t,!1,"f"),w(this,r,"m",V).call(this,this.shouldFormValueUpdate()?w(this,v,"f"):""),!this.validity.valid&&w(this,i,"f")&&S(this,o,!0,"f");let Q=w(this,r,"m",P).call(this);this.validationMessageCallback&&this.validationMessageCallback(Q?this.internals.validationMessage:"")}),A.set(this,()=>{var Q;w(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),S(this,s,!1,"f")),S(this,i,!0,"f"),S(this,o,!0,"f"),w(this,r,"m",P).call(this),(Q=this===null||this===void 0?void 0:this.validationMessageCallback)===null||Q===void 0||Q.call(this,this.showError?this.internals.validationMessage:"")}),m.set(this,void 0),$.set(this,!1),D.set(this,Promise.resolve()),(f=this.addEventListener)===null||f===void 0||f.call(this,"focus",w(this,x,"f")),(E=this.addEventListener)===null||E===void 0||E.call(this,"blur",w(this,L,"f")),(z=this.addEventListener)===null||z===void 0||z.call(this,"invalid",w(this,A,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let p=this.validators.map(z=>z.attribute).flat(),f=super.observedAttributes||[];return[...new Set([...f,...p])]}static getValidator(p){return this.validators.find(f=>f.attribute===p)||null}static getValidators(p){return this.validators.filter(f=>{var E;if(f.attribute===p||!((E=f.attribute)===null||E===void 0)&&E.includes(p))return!0})}get form(){return this.internals.form}get showError(){return w(this,r,"m",P).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(p,f,E){var z;(z=super.attributeChangedCallback)===null||z===void 0||z.call(this,p,f,E);let J=this.constructor.getValidators(p);J!=null&&J.length&&this.validationTarget&&this.setValue(w(this,v,"f"))}setValue(p){var f;S(this,o,!1,"f"),(f=this.validationMessageCallback)===null||f===void 0||f.call(this,""),S(this,v,p,"f");let z=this.shouldFormValueUpdate()?p:null;this.internals.setFormValue(z),w(this,r,"m",V).call(this,z),this.valueChangedCallback&&this.valueChangedCallback(z),w(this,r,"m",P).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(p=>p(w(this,D,"f")))}formResetCallback(){var p,f;S(this,i,!1,"f"),S(this,o,!1,"f"),w(this,r,"m",P).call(this),(p=this.resetFormControl)===null||p===void 0||p.call(this),(f=this.validationMessageCallback)===null||f===void 0||f.call(this,w(this,r,"m",P).call(this)?this.validationMessage:"")}}return t=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap,v=new WeakMap,x=new WeakMap,L=new WeakMap,A=new WeakMap,m=new WeakMap,$=new WeakMap,D=new WeakMap,r=new WeakSet,l=function(){let p=this.getRootNode(),f=`${this.localName}[name="${this.getAttribute("name")}"]`;return p.querySelectorAll(f)},P=function(){if(this.hasAttribute("disabled"))return!1;let p=w(this,o,"f")||w(this,i,"f")&&!this.validity.valid&&!w(this,t,"f");return p&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),p},V=function(p){let f=this.constructor,E={},z=f.validators,Q=[],J=z.some(R=>R.isValid instanceof Promise);w(this,$,"f")||(S(this,D,new Promise(R=>{S(this,m,R,"f")}),"f"),S(this,$,!0,"f")),w(this,n,"f")&&(w(this,n,"f").abort(),S(this,a,w(this,n,"f"),"f"));let K=new AbortController;S(this,n,K,"f");let W,Ee=!1;z.length&&(z.forEach(R=>{let de=R.key||"customError",H=R.isValid(this,p,K.signal);H instanceof Promise?(Q.push(H),H.then(ue=>{ue!=null&&(E[de]=!ue,W=w(this,r,"m",ce).call(this,R,p),w(this,r,"m",B).call(this,E,W))})):(E[de]=!H,this.validity[de]!==!H&&(Ee=!0),!H&&!W&&(W=w(this,r,"m",ce).call(this,R,p)))}),Promise.allSettled(Q).then(()=>{var R;K!=null&&K.signal.aborted||(S(this,$,!1,"f"),(R=w(this,m,"f"))===null||R===void 0||R.call(this))}),(Ee||!J)&&w(this,r,"m",B).call(this,E,W))},B=function(p,f){if(this.validationTarget)this.internals.setValidity(p,f,this.validationTarget),S(this,s,!1,"f");else{if(this.internals.setValidity(p,f),this.internals.validity.valid)return;S(this,s,!0,"f")}},ce=function(p,f){if(this.validityCallback){let E=this.validityCallback(p.key||"customError");if(E)return E}return p.message instanceof Function?p.message(this,f):p.message},hr}import bt from"@warp-ds/elements-core";import{property as O}from"lit/decorators.js";var tt=["en","nb","fi","da","sv"],tr="en",rr=e=>tt.find(r=>e===r||e.toLowerCase().includes(r))||tr;function ot(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return rr(e)}try{let e=document.documentElement.lang;return rr(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),tr}}var it=(e,r,t,o,i,n)=>e==="nb"?t:e==="fi"?o:e==="da"?i:e==="sv"?n:r,or=(e,r,t,o,i)=>{let n=ot(),a=it(n,e,r,t,o,i);ee.load(n,a),ee.activate(n)};import{html as nt,LitElement as st}from"lit";import lt from"@warp-ds/elements-core";import{property as q}from"lit/decorators.js";import{classMap as ct}from"lit/directives/class-map.js";import{css as ir}from"lit";var se=ir`
|
|
11
11
|
*,
|
|
12
12
|
:before,
|
|
13
13
|
:after {
|
|
@@ -280,7 +280,7 @@ Please compile your catalog first.
|
|
|
280
280
|
svg {
|
|
281
281
|
pointer-events: none;
|
|
282
282
|
}
|
|
283
|
-
`,
|
|
283
|
+
`,Mt=ir`*, :before, :after {
|
|
284
284
|
--w-rotate: 0;
|
|
285
285
|
--w-rotate-x: 0;
|
|
286
286
|
--w-rotate-y: 0;
|
|
@@ -2446,17 +2446,222 @@ Please compile your catalog first.
|
|
|
2446
2446
|
display: none
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
|
-
`;var or=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var ir=JSON.parse('{"button.aria.loading":["Loading..."]}');var ar=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var nr=JSON.parse('{"button.aria.loading":["Laster..."]}');var sr=JSON.parse('{"button.aria.loading":["Laddar ..."]}');import{css as rt}from"lit";var lr=rt`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.animate-inprogress{background-size:30px 30px;animation:3s linear infinite animate-inprogress;background-image:linear-gradient(135deg,#0000000d 25%,#0000 0 50%,#0000000d 0 75%,#0000 0,#0000)!important}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.inline-block{display:inline-block}.inline{display:inline}.inline-flex{display:inline-flex}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover,.focus\\:no-underline:focus,.active\\:no-underline:active{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.min-h-32{min-height:3.2rem}.min-w-32{min-width:3.2rem}.w-full{width:100%}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-0{padding:0}.p-4{padding:.4rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.cursor-default{cursor:default}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var cr=["primary","secondary","negative","utility","pill","link"],Q="font-bold focusable justify-center transition-colors ease-in-out",k={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},m={primary:`border-0 rounded-8 ${Q}`,secondary:`border-2 rounded-8 ${Q}`,utility:`border rounded-4 ${Q}`,negative:`border-0 rounded-8 ${Q}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Q}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${k.link}`},d={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},u={medium:"text-m leading-[24]",xsmall:"text-xs"},c={inProgress:`border-transparent animate-inprogress pointer-events-none ${k.loading}`,quiet:`border-0 rounded-8 ${Q}`,utilityQuiet:`border-0 rounded-4 ${Q}`,negativeQuiet:`border-0 rounded-8 ${Q}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${k.disabled}`},g={secondary:`${d.medium} ${u.medium} ${m.secondary} ${k.secondary}`,secondaryHref:`${d.medium} ${u.medium} ${m.secondary} ${k.secondary}`,secondaryDisabled:`${d.medium} ${u.medium} ${m.secondary} ${c.isDisabled}`,secondarySmall:`${u.xsmall} ${d.xsmall} ${m.secondary} ${k.secondary}`,secondarySmallDisabled:`${u.xsmall} ${d.xsmall} ${m.secondary} ${c.isDisabled}`,secondaryQuiet:`${d.medium} ${u.medium} ${c.quiet} ${k.quiet}`,secondaryQuietDisabled:`${d.medium} ${u.medium} ${c.quiet} ${c.isDisabled}`,secondarySmallQuiet:`${u.xsmall} ${d.xsmall} ${c.quiet} ${k.quiet}`,secondarySmallQuietDisabled:`${u.xsmall} ${d.xsmall} ${c.quiet} ${c.isDisabled}`,secondaryLoading:`${d.medium} ${u.medium} ${m.secondary} ${c.inProgress}`,secondarySmallLoading:`${u.xsmall} ${d.xsmall} ${m.secondary} ${c.inProgress}`,secondarySmallQuietLoading:`${u.xsmall} ${d.xsmall} ${c.quiet} ${c.inProgress}`,secondaryQuietLoading:`${d.medium} ${u.medium} ${c.quiet} ${c.inProgress}`,primary:`${d.large} ${u.medium} ${m.primary} ${k.primary}`,primaryDisabled:`${d.large} ${u.medium} ${c.isDisabled} ${m.primary}`,primarySmall:`${d.small} ${u.xsmall} ${m.primary} ${k.primary}`,primarySmallDisabled:`${d.small} ${u.xsmall} ${c.isDisabled} ${m.primary} `,primaryQuiet:`${d.large} ${u.medium} ${c.quiet} ${k.quiet}`,primaryQuietDisabled:`${d.large} ${u.medium} ${c.quiet} ${c.isDisabled}`,primarySmallQuiet:`${d.small} ${u.xsmall} ${c.quiet} ${k.quiet}`,primarySmallQuietDisabled:`${d.small} ${u.xsmall} ${c.quiet} ${c.isDisabled}`,primaryLoading:`${d.large} ${u.medium} ${c.inProgress} ${m.primary}`,primarySmallLoading:`${d.small} ${u.xsmall} ${c.inProgress} ${m.primary}`,primarySmallQuietLoading:`${d.small} ${u.xsmall} ${c.quiet} ${c.inProgress} ${m.primary}`,primaryQuietLoading:`${d.large} ${u.medium} ${c.quiet} ${c.inProgress}`,utility:`${d.utility} ${u.medium} ${m.utility} ${k.utility}`,utilityDisabled:`${d.utility} ${u.medium} ${m.utility} ${c.isDisabled}`,utilityQuiet:`${d.large} ${u.medium} ${c.utilityQuiet} ${k.utilityQuiet}`,utilityQuietDisabled:`${d.large} ${u.medium} ${c.utilityQuiet} ${c.isDisabled}`,utilitySmall:`${d.smallUtility} ${u.xsmall} ${m.utility} ${k.utility}`,utilitySmallDisabled:`${d.smallUtility} ${u.xsmall} ${m.utility} ${c.isDisabled}`,utilitySmallQuiet:`${d.smallUtility} ${u.xsmall} ${c.utilityQuiet} ${k.utilityQuiet}`,utilitySmallQuietDisabled:`${d.smallUtility} ${u.xsmall} ${c.utilityQuiet} ${c.isDisabled}`,utilityLoading:`${d.large} ${u.medium} ${m.utility} ${c.inProgress}`,utilitySmallLoading:`${d.smallUtility} ${u.xsmall} ${m.utility} ${c.inProgress}`,utilityQuietLoading:`${d.large} ${u.medium} ${c.inProgress} ${c.utilityQuiet}`,utilitySmallQuietLoading:`${d.smallUtility} ${u.xsmall} ${c.inProgress} ${c.utilityQuiet}`,negative:`${d.large} ${u.medium} ${m.negative} ${k.destructive}`,negativeDisabled:`${d.large} ${u.medium} ${m.negative} ${c.isDisabled}`,negativeQuiet:`${d.large} ${u.medium} ${c.negativeQuiet} ${k.negativeQuiet}`,negativeQuietDisabled:`${d.large} ${u.medium} ${c.negativeQuiet}${c.isDisabled}`,negativeSmall:`${d.small} ${u.xsmall} ${m.negative} ${k.destructive}`,negativeSmallDisabled:`${d.small} ${u.xsmall} ${m.negative} ${c.isDisabled}`,negativeSmallQuiet:`${d.small} ${u.xsmall} ${c.negativeQuiet} ${k.negativeQuiet}`,negativeSmallQuietDisabled:`${d.small} ${u.xsmall} ${c.negativeQuiet} ${c.isDisabled}`,negativeLoading:`${d.large} ${u.medium} ${m.negative} ${c.inProgress}`,negativeSmallLoading:`${d.small} ${u.xsmall} ${c.inProgress} ${m.negative}`,negativeQuietLoading:`${d.large} ${u.medium} ${c.negativeQuiet} ${m.negative} ${c.inProgress}`,negativeSmallQuietLoading:`${d.small} ${u.xsmall} ${c.negativeQuiet} ${c.inProgress}`,pill:`${d.pill} ${u.medium} ${m.pill} ${k.pill}`,pillSmall:`${d.pillSmall} ${u.xsmall} ${m.pill} ${k.pill}`,pillLoading:`${d.pill} ${u.medium} ${m.pill} ${c.inProgress}`,pillSmallLoading:`${d.pillSmall} ${u.xsmall} ${m.pill} ${c.inProgress}`,link:`${d.link} ${u.medium} ${m.link}`,linkSmall:`${d.link} ${u.xsmall} ${m.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"},_=class extends Je(tt){constructor(){super();this.type="button";er(ir,nr,ar,or,sr),this.variant="secondary",this.ariaValueTextLoading=B._({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(t){t.has("value")&&this.setValue(this.value)}connectedCallback(){if(super.connectedCallback(),!cr.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
2450
|
-
|
|
2449
|
+
`;import{css as at}from"lit";var ar=at`.w-button,
|
|
2450
|
+
.w-button--secondary {
|
|
2451
|
+
/* Local scoped variables, given the default button (the secondary variant) as a default */
|
|
2452
|
+
--_background: var(--background, var(--w-s-color-background));
|
|
2453
|
+
--_background-hover: var(--background-hover, var(--w-s-color-background-hover));
|
|
2454
|
+
--_background-active: var(--background-active, var(--w-s-color-background-active));
|
|
2455
|
+
--_text-color: var(--color, var(--w-s-color-text-link));
|
|
2456
|
+
--_border-width: var(--border-width, 2px);
|
|
2457
|
+
--_border: var(--border, var(--w-s-color-border));
|
|
2458
|
+
--_border-hover: var(--border-hover, var(--w-s-color-border-hover));
|
|
2459
|
+
--_border-active: var(--border-active, var(--w-s-color-border-active));
|
|
2460
|
+
--_border-radius: var(--border-radius, 8px);
|
|
2461
|
+
--_font-size: var(--font-size, var(--w-font-size-m));
|
|
2462
|
+
--_line-height: var(--line-height, var(--w-line-height-m));
|
|
2463
|
+
--_font-weight: var(--font-weight, bold);
|
|
2464
|
+
--_padding-x: var(--padding-x, 16px);
|
|
2465
|
+
--_padding-y: var(--padding-y, 13px);
|
|
2466
|
+
|
|
2467
|
+
/* Base setup for all buttons */
|
|
2468
|
+
display: inline-flex;
|
|
2469
|
+
justify-content: center;
|
|
2470
|
+
align-items: center;
|
|
2471
|
+
text-align: center;
|
|
2472
|
+
cursor: pointer;
|
|
2473
|
+
transition:
|
|
2474
|
+
color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
2475
|
+
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
2476
|
+
border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
2477
|
+
fill 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
2478
|
+
stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
2479
|
+
|
|
2480
|
+
/* Hook the local vars up to the button stuff */
|
|
2481
|
+
background-color: var(--_background);
|
|
2482
|
+
color: var(--_text-color);
|
|
2483
|
+
border: var(--_border-width) solid var(--_border);
|
|
2484
|
+
border-radius: var(--_border-radius);
|
|
2485
|
+
padding: calc(var(--_padding-y) - var(--_border-width)) calc(var(--_padding-x) - var(--_border-width));
|
|
2486
|
+
font-size: var(--_font-size);
|
|
2487
|
+
line-height: var(--_line-height);
|
|
2488
|
+
font-weight: var(--_font-weight);
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
.w-button:hover {
|
|
2492
|
+
background-color: var(--_background-hover);
|
|
2493
|
+
border-color: var(--_border-hover);
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
.w-button:active {
|
|
2497
|
+
background-color: var(--_background-active);
|
|
2498
|
+
border-color: var(--_border-active);
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
.w-button:focus-visible {
|
|
2502
|
+
outline: 2px solid var(--w-s-color-border-focus);
|
|
2503
|
+
outline-offset: var(--w-outline-offset, 1px);
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
/* Variants config */
|
|
2507
|
+
.w-button--primary {
|
|
2508
|
+
--background: var(--w-s-color-background-primary);
|
|
2509
|
+
--background-hover: var(--w-s-color-background-primary-hover);
|
|
2510
|
+
--background-active: var(--w-s-color-background-primary-active);
|
|
2511
|
+
--color: var(--w-s-color-text-inverted);
|
|
2512
|
+
--border-width: 0px;
|
|
2513
|
+
}
|
|
2514
|
+
.w-button--negative {
|
|
2515
|
+
--background: var(--w-s-color-background-negative);
|
|
2516
|
+
--background-hover: var(--w-s-color-background-negative-hover);
|
|
2517
|
+
--background-active: var(--w-s-color-background-negative-active);
|
|
2518
|
+
--color: var(--w-s-color-text-inverted);
|
|
2519
|
+
--border-width: 0px;
|
|
2520
|
+
}
|
|
2521
|
+
.w-button--negative-quiet {
|
|
2522
|
+
--background: transparent;
|
|
2523
|
+
--background-hover: var(--w-s-color-background-negative-subtle-hover);
|
|
2524
|
+
--background-active: var(--w-s-color-background-negative-subtle-active);
|
|
2525
|
+
--color: var(--w-s-color-text-negative);
|
|
2526
|
+
--border-width: 0px;
|
|
2527
|
+
}
|
|
2528
|
+
.w-button--utility {
|
|
2529
|
+
--background: var(--w-s-color-background);
|
|
2530
|
+
--background-hover: var(--w-s-color-background-hover);
|
|
2531
|
+
--background-active: var(--w-s-color-background-active);
|
|
2532
|
+
--color: var(--w-s-color-text);
|
|
2533
|
+
--border-radius: 4px;
|
|
2534
|
+
--border-width: 1px;
|
|
2535
|
+
}
|
|
2536
|
+
.w-button--utility-quiet {
|
|
2537
|
+
--background: transparent;
|
|
2538
|
+
--color: var(--w-s-color-text);
|
|
2539
|
+
--border-width: 0px;
|
|
2540
|
+
}
|
|
2541
|
+
.w-button--overlay {
|
|
2542
|
+
--background: var(--w-color-background);
|
|
2543
|
+
--background-hover: var(--w-color-background-hover);
|
|
2544
|
+
--background-active: var(--w-color-background-active);
|
|
2545
|
+
--color: var(--w-s-color-text);
|
|
2546
|
+
--border-radius: 9999px;
|
|
2547
|
+
--border-width: 0px;
|
|
2548
|
+
}
|
|
2549
|
+
.w-button--overlay-quiet {
|
|
2550
|
+
--background: transparent;
|
|
2551
|
+
--background-hover: var(--w-s-color-background-hover);
|
|
2552
|
+
--background-active: var(--w-s-color-background-active);
|
|
2553
|
+
--color: var(--w-s-color-text);
|
|
2554
|
+
--border-radius: 9999px;
|
|
2555
|
+
--border-width: 0px;
|
|
2556
|
+
}
|
|
2557
|
+
.w-button--overlay-inverted {
|
|
2558
|
+
--background: var(--w-s-color-background-inverted);
|
|
2559
|
+
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
2560
|
+
--background-active: var(--w-s-color-background-inverted-active);
|
|
2561
|
+
--color: var(--w-s-color-text-inverted);
|
|
2562
|
+
--border-radius: 9999px;
|
|
2563
|
+
--border-width: 0px;
|
|
2564
|
+
}
|
|
2565
|
+
.w-button--overlay-inverted-quiet {
|
|
2566
|
+
--background: transparent;
|
|
2567
|
+
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
2568
|
+
--background-active: var(--w-s-color-background-inverted-active);
|
|
2569
|
+
--color: var(--w-s-color-text-inverted);
|
|
2570
|
+
--border-radius: 9999px;
|
|
2571
|
+
--border-width: 0px;
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
.w-button--link {
|
|
2575
|
+
--background: none;
|
|
2576
|
+
--background-hover: none;
|
|
2577
|
+
--background-active: none;
|
|
2578
|
+
--border-width: 0;
|
|
2579
|
+
--font-weight: normal;
|
|
2580
|
+
display: inline;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
/* States config, selects --loading as well since loading is always supposed to be disabled */
|
|
2584
|
+
.w-button:disabled,
|
|
2585
|
+
.w-button--disabled,
|
|
2586
|
+
.w-button--loading {
|
|
2587
|
+
--background: var(--w-s-color-background-disabled);
|
|
2588
|
+
--background-hover: var(--w-s-color-background-disabled);
|
|
2589
|
+
--background-active: var(--w-s-color-background-disabled);
|
|
2590
|
+
--color: var(--w-s-color-text-inverted);
|
|
2591
|
+
--border-width: 0px;
|
|
2592
|
+
pointer-events: none;
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
.w-button--link:hover {
|
|
2596
|
+
text-decoration: underline;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
/* Sizes config */
|
|
2600
|
+
.w-button--small {
|
|
2601
|
+
--padding-x: 12px;
|
|
2602
|
+
--padding-y: 8px;
|
|
2603
|
+
--font-size: var(--w-font-size-xs);
|
|
2604
|
+
--line-height: var(--w-line-height-xs);
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
/* Width config */
|
|
2608
|
+
.w-button--full-width {
|
|
2609
|
+
width: 100%;
|
|
2610
|
+
max-width: 100%;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
.w-button--has-icon-only {
|
|
2614
|
+
width: auto;
|
|
2615
|
+
max-width: none;
|
|
2616
|
+
--_padding-x: var(--_padding-y);
|
|
2617
|
+
aspect-ratio: 1 / 1;
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
a.w-button {
|
|
2621
|
+
text-decoration: none !important;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
/* Copy of loading animation from warp */
|
|
2625
|
+
.w-button--loading {
|
|
2626
|
+
background-image: linear-gradient(
|
|
2627
|
+
135deg,
|
|
2628
|
+
rgba(0, 0, 0, 0.05) 25%,
|
|
2629
|
+
transparent 25%,
|
|
2630
|
+
transparent 50%,
|
|
2631
|
+
rgba(0, 0, 0, 0.05) 50%,
|
|
2632
|
+
rgba(0, 0, 0, 0.05) 75%,
|
|
2633
|
+
transparent 75%,
|
|
2634
|
+
transparent
|
|
2635
|
+
);
|
|
2636
|
+
background-size: 30px 30px;
|
|
2637
|
+
animation: animate-inprogress 3s linear infinite;
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
@keyframes animate-inprogress {
|
|
2641
|
+
0% {
|
|
2642
|
+
background-position: 0 0;
|
|
2643
|
+
}
|
|
2644
|
+
100% {
|
|
2645
|
+
background-position: 60px 0;
|
|
2646
|
+
}
|
|
2647
|
+
}`;var nr=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","pill","link"],M=class extends ne(st){constructor(){super(),this.variant="secondary"}connectedCallback(){if(super.connectedCallback(),!nr.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
2648
|
+
${nr.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}render(){let r={"w-button":this.variant!=="link","w-button--primary":this.variant==="primary","w-button--secondary":this.variant==="secondary","w-button--negative":this.variant==="negative","w-button--utility":this.variant==="utility","w-button--quiet":this.variant==="quiet","w-button--negative-quiet":this.variant==="negativeQuiet","w-button--utility-quiet":this.variant==="utilityQuiet","w-button--small":this.small,"w-button--full-width":this.fullWidth,"w-button--disabled":this.disabled};return nt`<a
|
|
2649
|
+
href=${this.href}
|
|
2650
|
+
target=${this.target}
|
|
2651
|
+
rel=${this.target==="_blank"?this.rel||"noopener":void 0}
|
|
2652
|
+
class=${ct(r)}>
|
|
2653
|
+
<slot></slot>
|
|
2654
|
+
</a>`}};M.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},M.styles=[se,ar],y([q({type:Boolean,reflect:!0})],M.prototype,"autofocus",2),y([q({reflect:!0})],M.prototype,"variant",2),y([q({type:Boolean,reflect:!0})],M.prototype,"quiet",2),y([q({type:Boolean,reflect:!0})],M.prototype,"small",2),y([q({reflect:!0})],M.prototype,"href",2),y([q({type:Boolean,reflect:!0})],M.prototype,"disabled",2),y([q({reflect:!0})],M.prototype,"target",2),y([q({reflect:!0})],M.prototype,"rel",2),y([q({attribute:"full-width",type:Boolean,reflect:!0})],M.prototype,"fullWidth",2),y([q({attribute:"button-class",reflect:!0})],M.prototype,"buttonClass",2),y([q({reflect:!0})],M.prototype,"name",2);customElements.get("w-link")||customElements.define("w-link",M);var sr=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var lr=JSON.parse('{"button.aria.loading":["Loading..."]}');var cr=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var dr=JSON.parse('{"button.aria.loading":["Laster..."]}');var ur=JSON.parse('{"button.aria.loading":["Laddar ..."]}');import{css as dt}from"lit";var br=dt`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.animate-inprogress{background-size:30px 30px;animation:3s linear infinite animate-inprogress;background-image:linear-gradient(135deg,#0000000d 25%,#0000 0 50%,#0000000d 0 75%,#0000 0,#0000)!important}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.inline-block{display:inline-block}.inline{display:inline}.inline-flex{display:inline-flex}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover,.focus\\:no-underline:focus,.active\\:no-underline:active{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.min-h-32{min-height:3.2rem}.min-w-32{min-width:3.2rem}.w-full{width:100%}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-0{padding:0}.p-4{padding:.4rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.cursor-default{cursor:default}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var gr=["primary","secondary","negative","utility","pill","link"],F="font-bold focusable justify-center transition-colors ease-in-out",_={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},h={primary:`border-0 rounded-8 ${F}`,secondary:`border-2 rounded-8 ${F}`,utility:`border rounded-4 ${F}`,negative:`border-0 rounded-8 ${F}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${F}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${_.link}`},d={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},u={medium:"text-m leading-[24]",xsmall:"text-xs"},c={inProgress:`border-transparent animate-inprogress pointer-events-none ${_.loading}`,quiet:`border-0 rounded-8 ${F}`,utilityQuiet:`border-0 rounded-4 ${F}`,negativeQuiet:`border-0 rounded-8 ${F}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${_.disabled}`},b={secondary:`${d.medium} ${u.medium} ${h.secondary} ${_.secondary}`,secondaryHref:`${d.medium} ${u.medium} ${h.secondary} ${_.secondary}`,secondaryDisabled:`${d.medium} ${u.medium} ${h.secondary} ${c.isDisabled}`,secondarySmall:`${u.xsmall} ${d.xsmall} ${h.secondary} ${_.secondary}`,secondarySmallDisabled:`${u.xsmall} ${d.xsmall} ${h.secondary} ${c.isDisabled}`,secondaryQuiet:`${d.medium} ${u.medium} ${c.quiet} ${_.quiet}`,secondaryQuietDisabled:`${d.medium} ${u.medium} ${c.quiet} ${c.isDisabled}`,secondarySmallQuiet:`${u.xsmall} ${d.xsmall} ${c.quiet} ${_.quiet}`,secondarySmallQuietDisabled:`${u.xsmall} ${d.xsmall} ${c.quiet} ${c.isDisabled}`,secondaryLoading:`${d.medium} ${u.medium} ${h.secondary} ${c.inProgress}`,secondarySmallLoading:`${u.xsmall} ${d.xsmall} ${h.secondary} ${c.inProgress}`,secondarySmallQuietLoading:`${u.xsmall} ${d.xsmall} ${c.quiet} ${c.inProgress}`,secondaryQuietLoading:`${d.medium} ${u.medium} ${c.quiet} ${c.inProgress}`,primary:`${d.large} ${u.medium} ${h.primary} ${_.primary}`,primaryDisabled:`${d.large} ${u.medium} ${c.isDisabled} ${h.primary}`,primarySmall:`${d.small} ${u.xsmall} ${h.primary} ${_.primary}`,primarySmallDisabled:`${d.small} ${u.xsmall} ${c.isDisabled} ${h.primary} `,primaryQuiet:`${d.large} ${u.medium} ${c.quiet} ${_.quiet}`,primaryQuietDisabled:`${d.large} ${u.medium} ${c.quiet} ${c.isDisabled}`,primarySmallQuiet:`${d.small} ${u.xsmall} ${c.quiet} ${_.quiet}`,primarySmallQuietDisabled:`${d.small} ${u.xsmall} ${c.quiet} ${c.isDisabled}`,primaryLoading:`${d.large} ${u.medium} ${c.inProgress} ${h.primary}`,primarySmallLoading:`${d.small} ${u.xsmall} ${c.inProgress} ${h.primary}`,primarySmallQuietLoading:`${d.small} ${u.xsmall} ${c.quiet} ${c.inProgress} ${h.primary}`,primaryQuietLoading:`${d.large} ${u.medium} ${c.quiet} ${c.inProgress}`,utility:`${d.utility} ${u.medium} ${h.utility} ${_.utility}`,utilityDisabled:`${d.utility} ${u.medium} ${h.utility} ${c.isDisabled}`,utilityQuiet:`${d.large} ${u.medium} ${c.utilityQuiet} ${_.utilityQuiet}`,utilityQuietDisabled:`${d.large} ${u.medium} ${c.utilityQuiet} ${c.isDisabled}`,utilitySmall:`${d.smallUtility} ${u.xsmall} ${h.utility} ${_.utility}`,utilitySmallDisabled:`${d.smallUtility} ${u.xsmall} ${h.utility} ${c.isDisabled}`,utilitySmallQuiet:`${d.smallUtility} ${u.xsmall} ${c.utilityQuiet} ${_.utilityQuiet}`,utilitySmallQuietDisabled:`${d.smallUtility} ${u.xsmall} ${c.utilityQuiet} ${c.isDisabled}`,utilityLoading:`${d.large} ${u.medium} ${h.utility} ${c.inProgress}`,utilitySmallLoading:`${d.smallUtility} ${u.xsmall} ${h.utility} ${c.inProgress}`,utilityQuietLoading:`${d.large} ${u.medium} ${c.inProgress} ${c.utilityQuiet}`,utilitySmallQuietLoading:`${d.smallUtility} ${u.xsmall} ${c.inProgress} ${c.utilityQuiet}`,negative:`${d.large} ${u.medium} ${h.negative} ${_.destructive}`,negativeDisabled:`${d.large} ${u.medium} ${h.negative} ${c.isDisabled}`,negativeQuiet:`${d.large} ${u.medium} ${c.negativeQuiet} ${_.negativeQuiet}`,negativeQuietDisabled:`${d.large} ${u.medium} ${c.negativeQuiet}${c.isDisabled}`,negativeSmall:`${d.small} ${u.xsmall} ${h.negative} ${_.destructive}`,negativeSmallDisabled:`${d.small} ${u.xsmall} ${h.negative} ${c.isDisabled}`,negativeSmallQuiet:`${d.small} ${u.xsmall} ${c.negativeQuiet} ${_.negativeQuiet}`,negativeSmallQuietDisabled:`${d.small} ${u.xsmall} ${c.negativeQuiet} ${c.isDisabled}`,negativeLoading:`${d.large} ${u.medium} ${h.negative} ${c.inProgress}`,negativeSmallLoading:`${d.small} ${u.xsmall} ${c.inProgress} ${h.negative}`,negativeQuietLoading:`${d.large} ${u.medium} ${c.negativeQuiet} ${h.negative} ${c.inProgress}`,negativeSmallQuietLoading:`${d.small} ${u.xsmall} ${c.negativeQuiet} ${c.inProgress}`,pill:`${d.pill} ${u.medium} ${h.pill} ${_.pill}`,pillSmall:`${d.pillSmall} ${u.xsmall} ${h.pill} ${_.pill}`,pillLoading:`${d.pill} ${u.medium} ${h.pill} ${c.inProgress}`,pillSmallLoading:`${d.pillSmall} ${u.xsmall} ${h.pill} ${c.inProgress}`,link:`${d.link} ${u.medium} ${h.link}`,linkSmall:`${d.link} ${u.xsmall} ${h.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"},C=class extends ne(ut){constructor(){super();this.type="button";or(lr,dr,cr,sr,ur),this.variant="secondary",this.ariaValueTextLoading=ee._({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(t){t.has("value")&&this.setValue(this.value)}connectedCallback(){if(super.connectedCallback(),!gr.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
2655
|
+
${gr.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}get _primaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&b.primary,this.small&&!this.quiet&&!this.loading&&b.primarySmall,this.small&&this.quiet&&!this.loading&&b.primarySmallQuiet,this.small&&this.loading&&(this.quiet?b.primarySmallQuietLoading:b.primarySmallLoading),!this.small&&this.quiet&&!this.loading&&b.primaryQuiet,!this.small&&this.loading&&(this.quiet?b.primaryQuietLoading:b.primaryLoading)]}get _secondaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&b.secondary,this.small&&!this.quiet&&!this.loading&&b.secondarySmall,this.small&&this.loading&&(this.quiet?b.secondarySmallQuietLoading:b.secondarySmallLoading),this.small&&this.quiet&&!this.loading&&b.secondarySmallQuiet,!this.small&&this.quiet&&!this.loading&&b.secondaryQuiet,!this.small&&this.loading&&(this.quiet?b.secondaryQuietLoading:b.secondaryLoading)]}get _utilityClasses(){return[!this.small&&!this.quiet&&!this.loading&&b.utility,this.small&&!this.quiet&&!this.loading&&b.utilitySmall,this.small&&this.quiet&&!this.loading&&b.utilitySmallQuiet,this.small&&this.loading&&(this.quiet?b.utilitySmallQuietLoading:b.utilitySmallLoading),!this.small&&this.quiet&&!this.loading&&b.utilityQuiet,!this.small&&this.loading&&(this.quiet?b.utilityQuietLoading:b.utilityLoading)]}get _negativeClasses(){return[!this.small&&!this.quiet&&!this.loading&&b.negative,this.small&&!this.quiet&&!this.loading&&b.negativeSmall,this.small&&this.quiet&&!this.loading&&b.negativeSmallQuiet,this.small&&this.loading&&(this.quiet?b.negativeSmallQuietLoading:b.negativeSmallLoading),!this.small&&this.quiet&&!this.loading&&b.negativeQuiet,!this.small&&this.loading&&(this.quiet?b.negativeQuietLoading:b.negativeLoading)]}get _pillClasses(){return[!this.loading&&(this.small?b.pillSmall:b.pill),this.loading&&(this.small?b.pillSmallLoading:b.pillLoading)]}get _linkClasses(){return[this.small?b.linkSmall:b.link]}get _classes(){return ye(this.buttonClass,[this.variant==="primary"&&this._primaryClasses,this.variant==="secondary"&&this._secondaryClasses,this.variant==="utility"&&this._utilityClasses,this.variant==="negative"&&this._negativeClasses,this.variant==="pill"&&this._pillClasses,this.variant==="link"&&this._linkClasses,this.href&&b.linkAsButton,this.fullWidth?b.fullWidth:b.contentWidth])}_handleButtonClick(){this.type==="submit"?this.internals.form.requestSubmit():this.type==="reset"&&this.internals.form.reset()}render(){return le` ${this.href?le`<w-link
|
|
2451
2656
|
href=${this.href}
|
|
2452
2657
|
target=${this.target}
|
|
2453
2658
|
rel=${this.target==="_blank"?this.rel||"noopener":void 0}
|
|
2454
2659
|
class=${this._classes}>
|
|
2455
2660
|
<slot></slot>
|
|
2456
|
-
</
|
|
2661
|
+
</w-link>`:le`<button type=${this.type||"button"} class=${this._classes} @click="${this._handleButtonClick}">
|
|
2457
2662
|
<slot></slot>
|
|
2458
2663
|
</button>`}
|
|
2459
|
-
${this.loading?
|
|
2664
|
+
${this.loading?le`<span class="sr-only" role="progressbar" aria-valuenow="{0}" aria-valuetext=${this.ariaValueTextLoading}></span>`:null}`}};C.shadowRootOptions={...bt.shadowRootOptions,delegatesFocus:!0},C.styles=[se,br],y([O({reflect:!0})],C.prototype,"type",2),y([O({type:Boolean,reflect:!0})],C.prototype,"autofocus",2),y([O({reflect:!0})],C.prototype,"variant",2),y([O({type:Boolean,reflect:!0})],C.prototype,"quiet",2),y([O({type:Boolean,reflect:!0})],C.prototype,"small",2),y([O({type:Boolean,reflect:!0})],C.prototype,"loading",2),y([O({reflect:!0})],C.prototype,"href",2),y([O({reflect:!0})],C.prototype,"target",2),y([O({reflect:!0})],C.prototype,"rel",2),y([O({attribute:"full-width",type:Boolean,reflect:!0})],C.prototype,"fullWidth",2),y([O({attribute:"button-class",reflect:!0})],C.prototype,"buttonClass",2),y([O({reflect:!0})],C.prototype,"name",2),y([O({reflect:!0})],C.prototype,"value",2);customElements.get("w-button")||customElements.define("w-button",C);var vo=we({tagName:"w-button",elementClass:C,react:pr.default});export{vo as Button};
|
|
2460
2665
|
/*! Bundled license information:
|
|
2461
2666
|
|
|
2462
2667
|
react/cjs/react.production.js:
|