@warp-ds/elements 2.2.0-next.5 → 2.2.0-next.6
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/custom-elements.json +729 -247
- package/dist/index.d.ts +1 -0
- package/dist/index.js +139 -101
- package/dist/index.js.map +4 -4
- package/dist/packages/button/index.d.ts +3 -0
- package/dist/packages/button/index.js.map +2 -2
- package/dist/packages/button/react.js.map +2 -2
- package/dist/packages/datepicker/datepicker.d.ts +89 -0
- package/dist/packages/datepicker/datepicker.stories.d.ts +11 -0
- package/dist/packages/datepicker/index.d.ts +1 -0
- package/dist/packages/datepicker/index.js +2782 -0
- package/dist/packages/datepicker/index.js.map +7 -0
- package/dist/packages/datepicker/locales/da/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/en/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/fi/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/nb/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/sv/messages.d.mts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +1 -0
- package/dist/packages/datepicker/utils.d.ts +13 -0
- package/dist/packages/pageindicator/index.d.ts +14 -0
- package/dist/packages/pageindicator/index.js +32 -0
- package/dist/packages/pageindicator/index.js.map +7 -0
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +32 -0
- package/dist/packages/pageindicator/react.d.ts +2 -0
- package/dist/packages/pageindicator/react.js +52 -0
- package/dist/packages/pageindicator/react.js.map +7 -0
- package/dist/packages/pageindicator/style.d.ts +1 -0
- package/dist/packages/pagination/index.d.ts +3 -0
- package/dist/packages/pagination/index.js +21 -13
- package/dist/packages/pagination/index.js.map +3 -3
- package/dist/packages/pagination/react.js +21 -13
- package/dist/packages/pagination/react.js.map +3 -3
- package/dist/vscode.html-custom-data.json +66 -19
- package/dist/web-types.json +162 -38
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var We=Object.create;var I=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var er=Object.getOwnPropertyNames;var rr=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var L=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var tr=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of er(r))!or.call(e,a)&&a!==o&&I(e,a,{get:()=>r[a],enumerable:!(t=te(r,a))||t.enumerable});return e};var ae=(e,r,o)=>(o=e!=null?We(rr(e)):{},tr(r||!e||!e.__esModule?I(o,"default",{value:e,enumerable:!0}):o,e));var z=(e,r,o,t)=>{for(var a=t>1?void 0:t?te(r,o):r,i=e.length-1,n;i>=0;i--)(n=e[i])&&(a=(t?n(r,o,a):n(a))||a);return t&&a&&I(r,o,a),a};var ve=L(l=>{"use strict";var H=Symbol.for("react.transitional.element"),ar=Symbol.for("react.portal"),nr=Symbol.for("react.fragment"),ir=Symbol.for("react.strict_mode"),sr=Symbol.for("react.profiler"),cr=Symbol.for("react.consumer"),lr=Symbol.for("react.context"),dr=Symbol.for("react.forward_ref"),ur=Symbol.for("react.suspense"),pr=Symbol.for("react.memo"),de=Symbol.for("react.lazy"),ne=Symbol.iterator;function gr(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ue={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pe=Object.assign,ge={};function E(e,r,o){this.props=e,this.context=r,this.refs=ge,this.updater=o||ue}E.prototype.isReactComponent={};E.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")};E.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function be(){}be.prototype=E.prototype;function U(e,r,o){this.props=e,this.context=r,this.refs=ge,this.updater=o||ue}var B=U.prototype=new be;B.constructor=U;pe(B,E.prototype);B.isPureReactComponent=!0;var ie=Array.isArray,g={H:null,A:null,T:null,S:null,V:null},fe=Object.prototype.hasOwnProperty;function F(e,r,o,t,a,i){return o=i.ref,{$$typeof:H,type:e,key:r,ref:o!==void 0?o:null,props:i}}function br(e,r){return F(e.type,r,void 0,void 0,void 0,e.props)}function J(e){return typeof e=="object"&&e!==null&&e.$$typeof===H}function fr(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return r[o]})}var se=/\/+/g;function Y(e,r){return typeof e=="object"&&e!==null&&e.key!=null?fr(""+e.key):r.toString(36)}function ce(){}function vr(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(ce,ce):(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 _(e,r,o,t,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(i){case"bigint":case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case H:case ar:n=!0;break;case de:return n=e._init,_(n(e._payload),r,o,t,a)}}if(n)return a=a(e),n=t===""?"."+Y(e,0):t,ie(a)?(o="",n!=null&&(o=n.replace(se,"$&/")+"/"),_(a,r,o,"",function(p){return p})):a!=null&&(J(a)&&(a=br(a,o+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(se,"$&/")+"/")+n)),r.push(a)),1;n=0;var c=t===""?".":t+":";if(ie(e))for(var s=0;s<e.length;s++)t=e[s],i=c+Y(t,s),n+=_(t,r,o,i,a);else if(s=gr(e),typeof s=="function")for(e=s.call(e),s=0;!(t=e.next()).done;)t=t.value,i=c+Y(t,s++),n+=_(t,r,o,i,a);else if(i==="object"){if(typeof e.then=="function")return _(vr(e),r,o,t,a);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 n}function O(e,r,o){if(e==null)return e;var t=[],a=0;return _(e,t,"","",function(i){return r.call(o,i,a++)}),t}function mr(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(o){(e._status===0||e._status===-1)&&(e._status=1,e._result=o)},function(o){(e._status===0||e._status===-1)&&(e._status=2,e._result=o)}),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 hr(){}l.Children={map:O,forEach:function(e,r,o){O(e,function(){r.apply(this,arguments)},o)},count:function(e){var r=0;return O(e,function(){r++}),r},toArray:function(e){return O(e,function(r){return r})||[]},only:function(e){if(!J(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};l.Component=E;l.Fragment=nr;l.Profiler=sr;l.PureComponent=U;l.StrictMode=ir;l.Suspense=ur;l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=g;l.__COMPILER_RUNTIME={__proto__:null,c:function(e){return g.H.useMemoCache(e)}};l.cache=function(e){return function(){return e.apply(null,arguments)}};l.cloneElement=function(e,r,o){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var t=pe({},e.props),a=e.key,i=void 0;if(r!=null)for(n in r.ref!==void 0&&(i=void 0),r.key!==void 0&&(a=""+r.key),r)!fe.call(r,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&r.ref===void 0||(t[n]=r[n]);var n=arguments.length-2;if(n===1)t.children=o;else if(1<n){for(var c=Array(n),s=0;s<n;s++)c[s]=arguments[s+2];t.children=c}return F(e.type,a,void 0,void 0,i,t)};l.createContext=function(e){return e={$$typeof:lr,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:cr,_context:e},e};l.createElement=function(e,r,o){var t,a={},i=null;if(r!=null)for(t in r.key!==void 0&&(i=""+r.key),r)fe.call(r,t)&&t!=="key"&&t!=="__self"&&t!=="__source"&&(a[t]=r[t]);var n=arguments.length-2;if(n===1)a.children=o;else if(1<n){for(var c=Array(n),s=0;s<n;s++)c[s]=arguments[s+2];a.children=c}if(e&&e.defaultProps)for(t in n=e.defaultProps,n)a[t]===void 0&&(a[t]=n[t]);return F(e,i,void 0,void 0,null,a)};l.createRef=function(){return{current:null}};l.forwardRef=function(e){return{$$typeof:dr,render:e}};l.isValidElement=J;l.lazy=function(e){return{$$typeof:de,_payload:{_status:-1,_result:e},_init:mr}};l.memo=function(e,r){return{$$typeof:pr,type:e,compare:r===void 0?null:r}};l.startTransition=function(e){var r=g.T,o={};g.T=o;try{var t=e(),a=g.S;a!==null&&a(o,t),typeof t=="object"&&t!==null&&typeof t.then=="function"&&t.then(hr,le)}catch(i){le(i)}finally{g.T=r}};l.unstable_useCacheRefresh=function(){return g.H.useCacheRefresh()};l.use=function(e){return g.H.use(e)};l.useActionState=function(e,r,o){return g.H.useActionState(e,r,o)};l.useCallback=function(e,r){return g.H.useCallback(e,r)};l.useContext=function(e){return g.H.useContext(e)};l.useDebugValue=function(){};l.useDeferredValue=function(e,r){return g.H.useDeferredValue(e,r)};l.useEffect=function(e,r,o){var t=g.H;if(typeof o=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return t.useEffect(e,r)};l.useId=function(){return g.H.useId()};l.useImperativeHandle=function(e,r,o){return g.H.useImperativeHandle(e,r,o)};l.useInsertionEffect=function(e,r){return g.H.useInsertionEffect(e,r)};l.useLayoutEffect=function(e,r){return g.H.useLayoutEffect(e,r)};l.useMemo=function(e,r){return g.H.useMemo(e,r)};l.useOptimistic=function(e,r){return g.H.useOptimistic(e,r)};l.useReducer=function(e,r,o){return g.H.useReducer(e,r,o)};l.useRef=function(e){return g.H.useRef(e)};l.useState=function(e){return g.H.useState(e)};l.useSyncExternalStore=function(e,r,o){return g.H.useSyncExternalStore(e,r,o)};l.useTransition=function(){return g.H.useTransition()};l.version="19.1.1"});var he=L((Oo,me)=>{"use strict";me.exports=ve()});var ke=L(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.errorMessages=k.ErrorType=void 0;var S;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(S=k.ErrorType||(k.ErrorType={}));k.errorMessages=new Map([[S.MalformedUnicode,"malformed Unicode character escape sequence"],[S.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[S.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[S.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[S.EndOfString,"malformed escape sequence at end of string"]])});var Ee=L(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.unraw=w.errorMessages=w.ErrorType=void 0;var v=ke();Object.defineProperty(w,"ErrorType",{enumerable:!0,get:function(){return v.ErrorType}});Object.defineProperty(w,"errorMessages",{enumerable:!0,get:function(){return v.errorMessages}});function xr(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function T(e,r,o){let t=xr(e);if(Number.isNaN(t)||o!==void 0&&o!==e.length)throw new SyntaxError(v.errorMessages.get(r));return t}function kr(e){let r=T(e,v.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function ye(e,r){let o=T(e,v.ErrorType.MalformedUnicode,4);if(r!==void 0){let t=T(r,v.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function yr(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function _r(e){if(!yr(e))throw new SyntaxError(v.errorMessages.get(v.ErrorType.MalformedUnicode));let r=e.slice(1,-1),o=T(r,v.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(v.errorMessages.get(v.ErrorType.CodePointLimit)):t}}function Er(e,r=!1){if(r)throw new SyntaxError(v.errorMessages.get(v.ErrorType.OctalDeprecation));let o=parseInt(e,8);return String.fromCharCode(o)}var Sr=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function
|
|
1
|
+
var ar=Object.create;var Y=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var ir=Object.getPrototypeOf,sr=Object.prototype.hasOwnProperty;var ne=e=>{throw TypeError(e)};var L=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var cr=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of nr(r))!sr.call(e,a)&&a!==o&&Y(e,a,{get:()=>r[a],enumerable:!(t=ae(r,a))||t.enumerable});return e};var ie=(e,r,o)=>(o=e!=null?ar(ir(e)):{},cr(r||!e||!e.__esModule?Y(o,"default",{value:e,enumerable:!0}):o,e));var z=(e,r,o,t)=>{for(var a=t>1?void 0:t?ae(r,o):r,i=e.length-1,n;i>=0;i--)(n=e[i])&&(a=(t?n(r,o,a):n(a))||a);return t&&a&&Y(r,o,a),a};var lr=(e,r,o)=>r.has(e)||ne("Cannot "+o);var se=(e,r,o)=>r.has(e)?ne("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,o);var ce=(e,r,o)=>(lr(e,r,"access private method"),o);var xe=L(l=>{"use strict";var U=Symbol.for("react.transitional.element"),dr=Symbol.for("react.portal"),ur=Symbol.for("react.fragment"),pr=Symbol.for("react.strict_mode"),gr=Symbol.for("react.profiler"),br=Symbol.for("react.consumer"),fr=Symbol.for("react.context"),vr=Symbol.for("react.forward_ref"),mr=Symbol.for("react.suspense"),hr=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),le=Symbol.iterator;function wr(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var fe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ve=Object.assign,me={};function E(e,r,o){this.props=e,this.context=r,this.refs=me,this.updater=o||fe}E.prototype.isReactComponent={};E.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")};E.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function he(){}he.prototype=E.prototype;function B(e,r,o){this.props=e,this.context=r,this.refs=me,this.updater=o||fe}var F=B.prototype=new he;F.constructor=B;ve(F,E.prototype);F.isPureReactComponent=!0;var de=Array.isArray,g={H:null,A:null,T:null,S:null,V:null},we=Object.prototype.hasOwnProperty;function J(e,r,o,t,a,i){return o=i.ref,{$$typeof:U,type:e,key:r,ref:o!==void 0?o:null,props:i}}function xr(e,r){return J(e.type,r,void 0,void 0,void 0,e.props)}function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===U}function kr(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return r[o]})}var ue=/\/+/g;function H(e,r){return typeof e=="object"&&e!==null&&e.key!=null?kr(""+e.key):r.toString(36)}function pe(){}function yr(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 _(e,r,o,t,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(i){case"bigint":case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case U:case dr:n=!0;break;case be:return n=e._init,_(n(e._payload),r,o,t,a)}}if(n)return a=a(e),n=t===""?"."+H(e,0):t,de(a)?(o="",n!=null&&(o=n.replace(ue,"$&/")+"/"),_(a,r,o,"",function(p){return p})):a!=null&&(X(a)&&(a=xr(a,o+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(ue,"$&/")+"/")+n)),r.push(a)),1;n=0;var c=t===""?".":t+":";if(de(e))for(var s=0;s<e.length;s++)t=e[s],i=c+H(t,s),n+=_(t,r,o,i,a);else if(s=wr(e),typeof s=="function")for(e=s.call(e),s=0;!(t=e.next()).done;)t=t.value,i=c+H(t,s++),n+=_(t,r,o,i,a);else if(i==="object"){if(typeof e.then=="function")return _(yr(e),r,o,t,a);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 n}function O(e,r,o){if(e==null)return e;var t=[],a=0;return _(e,t,"","",function(i){return r.call(o,i,a++)}),t}function _r(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(o){(e._status===0||e._status===-1)&&(e._status=1,e._result=o)},function(o){(e._status===0||e._status===-1)&&(e._status=2,e._result=o)}),e._status===-1&&(e._status=0,e._result=r)}if(e._status===1)return e._result.default;throw e._result}var ge=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 Er(){}l.Children={map:O,forEach:function(e,r,o){O(e,function(){r.apply(this,arguments)},o)},count:function(e){var r=0;return O(e,function(){r++}),r},toArray:function(e){return O(e,function(r){return r})||[]},only:function(e){if(!X(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};l.Component=E;l.Fragment=ur;l.Profiler=gr;l.PureComponent=B;l.StrictMode=pr;l.Suspense=mr;l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=g;l.__COMPILER_RUNTIME={__proto__:null,c:function(e){return g.H.useMemoCache(e)}};l.cache=function(e){return function(){return e.apply(null,arguments)}};l.cloneElement=function(e,r,o){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var t=ve({},e.props),a=e.key,i=void 0;if(r!=null)for(n in r.ref!==void 0&&(i=void 0),r.key!==void 0&&(a=""+r.key),r)!we.call(r,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&r.ref===void 0||(t[n]=r[n]);var n=arguments.length-2;if(n===1)t.children=o;else if(1<n){for(var c=Array(n),s=0;s<n;s++)c[s]=arguments[s+2];t.children=c}return J(e.type,a,void 0,void 0,i,t)};l.createContext=function(e){return e={$$typeof:fr,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:br,_context:e},e};l.createElement=function(e,r,o){var t,a={},i=null;if(r!=null)for(t in r.key!==void 0&&(i=""+r.key),r)we.call(r,t)&&t!=="key"&&t!=="__self"&&t!=="__source"&&(a[t]=r[t]);var n=arguments.length-2;if(n===1)a.children=o;else if(1<n){for(var c=Array(n),s=0;s<n;s++)c[s]=arguments[s+2];a.children=c}if(e&&e.defaultProps)for(t in n=e.defaultProps,n)a[t]===void 0&&(a[t]=n[t]);return J(e,i,void 0,void 0,null,a)};l.createRef=function(){return{current:null}};l.forwardRef=function(e){return{$$typeof:vr,render:e}};l.isValidElement=X;l.lazy=function(e){return{$$typeof:be,_payload:{_status:-1,_result:e},_init:_r}};l.memo=function(e,r){return{$$typeof:hr,type:e,compare:r===void 0?null:r}};l.startTransition=function(e){var r=g.T,o={};g.T=o;try{var t=e(),a=g.S;a!==null&&a(o,t),typeof t=="object"&&t!==null&&typeof t.then=="function"&&t.then(Er,ge)}catch(i){ge(i)}finally{g.T=r}};l.unstable_useCacheRefresh=function(){return g.H.useCacheRefresh()};l.use=function(e){return g.H.use(e)};l.useActionState=function(e,r,o){return g.H.useActionState(e,r,o)};l.useCallback=function(e,r){return g.H.useCallback(e,r)};l.useContext=function(e){return g.H.useContext(e)};l.useDebugValue=function(){};l.useDeferredValue=function(e,r){return g.H.useDeferredValue(e,r)};l.useEffect=function(e,r,o){var t=g.H;if(typeof o=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return t.useEffect(e,r)};l.useId=function(){return g.H.useId()};l.useImperativeHandle=function(e,r,o){return g.H.useImperativeHandle(e,r,o)};l.useInsertionEffect=function(e,r){return g.H.useInsertionEffect(e,r)};l.useLayoutEffect=function(e,r){return g.H.useLayoutEffect(e,r)};l.useMemo=function(e,r){return g.H.useMemo(e,r)};l.useOptimistic=function(e,r){return g.H.useOptimistic(e,r)};l.useReducer=function(e,r,o){return g.H.useReducer(e,r,o)};l.useRef=function(e){return g.H.useRef(e)};l.useState=function(e){return g.H.useState(e)};l.useSyncExternalStore=function(e,r,o){return g.H.useSyncExternalStore(e,r,o)};l.useTransition=function(){return g.H.useTransition()};l.version="19.1.1"});var ye=L((Do,ke)=>{"use strict";ke.exports=xe()});var Se=L(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.errorMessages=k.ErrorType=void 0;var S;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(S=k.ErrorType||(k.ErrorType={}));k.errorMessages=new Map([[S.MalformedUnicode,"malformed Unicode character escape sequence"],[S.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[S.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[S.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[S.EndOfString,"malformed escape sequence at end of string"]])});var ze=L(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.unraw=w.errorMessages=w.ErrorType=void 0;var v=Se();Object.defineProperty(w,"ErrorType",{enumerable:!0,get:function(){return v.ErrorType}});Object.defineProperty(w,"errorMessages",{enumerable:!0,get:function(){return v.errorMessages}});function Cr(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function T(e,r,o){let t=Cr(e);if(Number.isNaN(t)||o!==void 0&&o!==e.length)throw new SyntaxError(v.errorMessages.get(r));return t}function Nr(e){let r=T(e,v.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function Ce(e,r){let o=T(e,v.ErrorType.MalformedUnicode,4);if(r!==void 0){let t=T(r,v.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function zr(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function Mr(e){if(!zr(e))throw new SyntaxError(v.errorMessages.get(v.ErrorType.MalformedUnicode));let r=e.slice(1,-1),o=T(r,v.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(v.errorMessages.get(v.ErrorType.CodePointLimit)):t}}function Pr(e,r=!1){if(r)throw new SyntaxError(v.errorMessages.get(v.ErrorType.OctalDeprecation));let o=parseInt(e,8);return String.fromCharCode(o)}var Lr=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Or(e){return Lr.get(e)||e}var Tr=/\\(?:(\\)|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 Ne(e,r=!1){return e.replace(Tr,function(o,t,a,i,n,c,s,p,b){if(t!==void 0)return"\\";if(a!==void 0)return Nr(a);if(i!==void 0)return Mr(i);if(n!==void 0)return Ce(n,c);if(s!==void 0)return Ce(s);if(p==="0")return"\0";if(p!==void 0)return Pr(p,!r);if(b!==void 0)return Or(b);throw new SyntaxError(v.errorMessages.get(v.ErrorType.EndOfString))})}w.unraw=Ne;w.default=Ne});var or=ie(ye(),1);var Sr=new Set(["children","localName","ref","style","className"]),_e=new WeakMap,Ee=(e,r,o,t,a)=>{let i=a==null?void 0:a[r];i===void 0?(e[r]=o,o==null&&r in HTMLElement.prototype&&e.removeAttribute(r)):o!==t&&((n,c,s)=>{let p=_e.get(n);p===void 0&&_e.set(n,p=new Map);let b=p.get(c);s!==void 0?b===void 0?(p.set(c,b={handleEvent:s}),n.addEventListener(c,b)):b.handleEvent=s:b!==void 0&&(p.delete(c),n.removeEventListener(c,b))})(e,i,o)},q=({react:e,tagName:r,elementClass:o,events:t,displayName:a})=>{let i=new Set(Object.keys(t!=null?t:{})),n=e.forwardRef((c,s)=>{let p=e.useRef(new Map),b=e.useRef(null),h={},C={};for(let[d,f]of Object.entries(c))Sr.has(d)?h[d==="className"?"class":d]=f:i.has(d)||d in o.prototype?C[d]=f:h[d]=f;return e.useLayoutEffect(()=>{if(b.current===null)return;let d=new Map;for(let f in C)Ee(b.current,f,c[f],p.current.get(f),t),p.current.delete(f),d.set(f,c[f]);for(let[f,N]of p.current)Ee(b.current,f,void 0,N,t);p.current=d}),e.useLayoutEffect(()=>{var d;(d=b.current)==null||d.removeAttribute("defer-hydration")},[]),h.suppressHydrationWarning=!0,e.createElement(r,{...h,ref:e.useCallback(d=>{b.current=d,typeof s=="function"?s(d):s!==null&&(s.current=d)},[s])})});return n.displayName=a!=null?a:o.name,n};import{html as M,LitElement as $o,nothing as oe}from"lit";var Le=ie(ze(),1);var x=e=>typeof e=="string",Rr=e=>typeof e=="function",Me=new Map,Oe="en";function Q(e){return[...Array.isArray(e)?e:[e],Oe]}function V(e,r,o){let t=Q(e);o||(o="default");let a;if(typeof o=="string")switch(a={day:"numeric",month:"short",year:"numeric"},o){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=o;return R(()=>$("date",t,o),()=>new Intl.DateTimeFormat(t,a)).format(x(r)?new Date(r):r)}function $r(e,r,o){let t;if(o||(o="default"),typeof o=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},o){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=o;return V(e,r,t)}function Z(e,r,o){let t=Q(e);return R(()=>$("number",t,o),()=>new Intl.NumberFormat(t,o)).format(r)}function Pe(e,r,o,{offset:t=0,...a}){var c,s;let i=Q(e),n=r?R(()=>$("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):R(()=>$("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(s=(c=a[o])!=null?c:a[n.select(o-t)])!=null?s:a.other}function R(e,r){let o=e(),t=Me.get(o);return t||(t=r(),Me.set(o,t)),t}function $(e,r,o){let t=r.join("-");return`${e}-${t}-${JSON.stringify(o)}`}var Te=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Re="%__lingui_octothorpe__%",jr=(e,r,o={})=>{let t=r||e,a=n=>typeof n=="object"?n:o[n],i=(n,c)=>{let s=Object.keys(o).length?a("number"):void 0,p=Z(t,n,s);return c.replace(new RegExp(Re,"g"),p)};return{plural:(n,c)=>{let{offset:s=0}=c,p=Pe(t,!1,n,c);return i(n-s,p)},selectordinal:(n,c)=>{let{offset:s=0}=c,p=Pe(t,!0,n,c);return i(n-s,p)},select:Ar,number:(n,c)=>Z(t,n,a(c)||{style:c}),date:(n,c)=>V(t,n,a(c)||c),time:(n,c)=>$r(t,n,a(c)||c)}},Ar=(e,r)=>{var o;return(o=r[e])!=null?o:r.other};function Dr(e,r,o){return(t={},a)=>{let i=jr(r,o,a),n=(s,p=!1)=>Array.isArray(s)?s.reduce((b,h)=>{if(h==="#"&&p)return b+Re;if(x(h))return b+h;let[C,d,f]=h,N={};d==="plural"||d==="selectordinal"||d==="select"?Object.entries(f).forEach(([I,tr])=>{N[I]=n(tr,d==="plural"||d==="selectordinal")}):N=f;let P;if(d){let I=i[d];P=I(t[C],N)}else P=t[C];return P==null?b:b+P},""):s,c=n(e);return x(c)&&Te.test(c)?(0,Le.unraw)(c):x(c)?c:c?String(c):""}}var Ir=Object.defineProperty,Yr=(e,r,o)=>r in e?Ir(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,Hr=(e,r,o)=>(Yr(e,typeof r!="symbol"?r+"":r,o),o),K=class{constructor(){Hr(this,"_events",{})}on(r,o){var a;var t;return(a=(t=this._events)[r])!=null||(t[r]=[]),this._events[r].push(o),()=>this.removeListener(r,o)}removeListener(r,o){let t=this._getListeners(r);if(!t)return;let a=t.indexOf(o);~a&&t.splice(a,1)}emit(r,...o){let t=this._getListeners(r);t&&t.map(a=>a.apply(this,o))}_getListeners(r){let o=this._events[r];return Array.isArray(o)?o:!1}},Ur=Object.defineProperty,Br=(e,r,o)=>r in e?Ur(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,y=(e,r,o)=>(Br(e,typeof r!="symbol"?r+"":r,o),o),G=class extends K{constructor(r){var o;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((o=r.locale)!=null?o:Oe,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,o){let t=this._localeData[r];t?Object.assign(t,o):this._localeData[r]=o}setMessagesCompiler(r){return this._messageCompiler=r,this}loadLocaleData(r,o){typeof r=="string"?this._loadLocaleData(r,o):Object.keys(r).forEach(t=>this._loadLocaleData(t,r[t])),this.emit("change")}_load(r,o){let t=this._messages[r];t?Object.assign(t,o):this._messages[r]=o}load(r,o){typeof r=="string"&&typeof o=="object"?this._load(r,o):Object.entries(r).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:r,locales:o,messages:t}){this._locale=r,this._locales=o||void 0,this._messages[this._locale]=t,this.emit("change")}activate(r,o){this._locale=r,this._locales=o,this.emit("change")}_(r,o,t){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 a=t==null?void 0:t.message;r||(r=""),x(r)||(o=r.values||o,a=r.message,r=r.id);let i=this.messages[r],n=i===void 0,c=this._missing;if(c&&n)return Rr(c)?c(this._locale,r):c;n&&this.emit("missing",{id:r,locale:this._locale});let s=i||a||r;return x(s)&&(this._messageCompiler?s=this._messageCompiler(s):console.warn(`Uncompiled message detected! Message:
|
|
3
3
|
|
|
4
4
|
> ${s}
|
|
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
|
-
`)),x(s)&&
|
|
10
|
+
`)),x(s)&&Te.test(s)?JSON.parse(`"${s}"`):x(s)?s:Dr(s,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(r,o){return V(this._locales||this._locale,r,o)}number(r,o){return Z(this._locales||this._locale,r,o)}};function Fr(e={}){return new G(e)}var u=Fr();import{property as j}from"lit/decorators.js";import{LitElement as Jr}from"lit";import{unsafeStatic as Xr,html as qr}from"lit/static-html.js";var Zr=JSON.parse('{"icon.title.chevron-double-left":["Dobbel pil til venstre"]}'),Kr=JSON.parse('{"icon.title.chevron-double-left":["Double leftward arrow"]}'),Gr=JSON.parse('{"icon.title.chevron-double-left":["Kaksi nuolta vasemmalle"]}'),Qr=JSON.parse('{"icon.title.chevron-double-left":["Dobbelt venstrepil"]}'),Vr=JSON.parse('{"icon.title.chevron-double-left":["Dubbel v\xE4nsterpil"]}'),$e=["en","nb","fi","da","sv"],je="en",Wr=()=>{var e;let r;switch((e=process==null?void 0:process.env)==null?void 0:e.NMP_BRAND){case"FINN":r="nb";break;case"TORI":r="fi";break;case"BLOCKET":r="sv";break;case"DBA":r="da";break;default:r="en"}return r},Ae=()=>{var e;let r=(e=document==null?void 0:document.location)==null?void 0:e.hostname;return r!=null&&r.includes("finn")?"nb":r.includes("tori")?"fi":r.includes("blocket")?"sv":r.includes("dba")?"da":je},W=e=>$e.find(r=>e===r||e.toLowerCase().includes(r))||Ae();function eo(){var e;if(typeof window=="undefined"){let r=Wr();return W(r)}try{let r=(e=document==null?void 0:document.documentElement)==null?void 0:e.lang,o=Ae();return $e.includes(r)?W(r!=null?r:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),W(o))}catch(r){return console.warn("could not detect locale, falling back to source locale",r),je}}var ro=(e,r,o,t,a,i)=>e==="nb"?o:e==="fi"?t:e==="da"?a:e==="sv"?i:r,oo=(e,r,o,t,a)=>{let i=eo(),n=ro(i,e,r,o,t,a);u.load(i,n),u.activate(i)};oo(Kr,Zr,Gr,Qr,Vr);var to=class extends Jr{render(){let e=u.t({message:"Double leftward arrow",id:"icon.title.chevron-double-left",comment:"Title for chevron-double-left icon"});return qr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-double-left-16-part">${Xr(`<title>${e}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 13 2 8l5-5m7 10L9 8l5-5"></path></svg>`}};customElements.get("w-icon-chevron-double-left-16")||customElements.define("w-icon-chevron-double-left-16",to);import{LitElement as ao}from"lit";import{unsafeStatic as no,html as io}from"lit/static-html.js";var so=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),co=JSON.parse('{"icon.title.chevron-left":["Leftward arrow"]}'),lo=JSON.parse('{"icon.title.chevron-left":["Nuoli vasemmalle"]}'),uo=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),po=JSON.parse('{"icon.title.chevron-left":["Pil v\xE4nster"]}'),De=["en","nb","fi","da","sv"],Ie="en",go=()=>{var e;let r;switch((e=process==null?void 0:process.env)==null?void 0:e.NMP_BRAND){case"FINN":r="nb";break;case"TORI":r="fi";break;case"BLOCKET":r="sv";break;case"DBA":r="da";break;default:r="en"}return r},Ye=()=>{var e;let r=(e=document==null?void 0:document.location)==null?void 0:e.hostname;return r!=null&&r.includes("finn")?"nb":r.includes("tori")?"fi":r.includes("blocket")?"sv":r.includes("dba")?"da":Ie},ee=e=>De.find(r=>e===r||e.toLowerCase().includes(r))||Ye();function bo(){var e;if(typeof window=="undefined"){let r=go();return ee(r)}try{let r=(e=document==null?void 0:document.documentElement)==null?void 0:e.lang,o=Ye();return De.includes(r)?ee(r!=null?r:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),ee(o))}catch(r){return console.warn("could not detect locale, falling back to source locale",r),Ie}}var fo=(e,r,o,t,a,i)=>e==="nb"?o:e==="fi"?t:e==="da"?a:e==="sv"?i:r,vo=(e,r,o,t,a)=>{let i=bo(),n=fo(i,e,r,o,t,a);u.load(i,n),u.activate(i)};vo(co,so,lo,uo,po);var mo=class extends ao{render(){let e=u.t({message:"Leftward arrow",id:"icon.title.chevron-left",comment:"Title for chevron-left icon"});return io`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-left-16-part">${no(`<title>${e}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.5 13.75 5 8.25l5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-left-16")||customElements.define("w-icon-chevron-left-16",mo);import{LitElement as ho}from"lit";import{unsafeStatic as wo,html as xo}from"lit/static-html.js";var ko=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8yre"]}'),yo=JSON.parse('{"icon.title.chevron-right":["Rightward arrow"]}'),_o=JSON.parse('{"icon.title.chevron-right":["Nuoli oikealle"]}'),Eo=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8jre"]}'),So=JSON.parse('{"icon.title.chevron-right":["Pil h\xF6ger"]}'),He=["en","nb","fi","da","sv"],Ue="en",Co=()=>{var e;let r;switch((e=process==null?void 0:process.env)==null?void 0:e.NMP_BRAND){case"FINN":r="nb";break;case"TORI":r="fi";break;case"BLOCKET":r="sv";break;case"DBA":r="da";break;default:r="en"}return r},Be=()=>{var e;let r=(e=document==null?void 0:document.location)==null?void 0:e.hostname;return r!=null&&r.includes("finn")?"nb":r.includes("tori")?"fi":r.includes("blocket")?"sv":r.includes("dba")?"da":Ue},re=e=>He.find(r=>e===r||e.toLowerCase().includes(r))||Be();function No(){var e;if(typeof window=="undefined"){let r=Co();return re(r)}try{let r=(e=document==null?void 0:document.documentElement)==null?void 0:e.lang,o=Be();return He.includes(r)?re(r!=null?r:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),re(o))}catch(r){return console.warn("could not detect locale, falling back to source locale",r),Ue}}var zo=(e,r,o,t,a,i)=>e==="nb"?o:e==="fi"?t:e==="da"?a:e==="sv"?i:r,Mo=(e,r,o,t,a)=>{let i=No(),n=zo(i,e,r,o,t,a);u.load(i,n),u.activate(i)};Mo(yo,ko,_o,Eo,So);var Po=class extends ho{render(){let e=u.t({message:"Rightward arrow",id:"icon.title.chevron-right",comment:"Title for chevron-right icon"});return xo`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-right-16-part">${wo(`<title>${e}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m5.5 13.75 5.5-5.5-5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-right-16")||customElements.define("w-icon-chevron-right-16",Po);var Lo=["en","nb","fi","da","sv"],Je="en",Fe=e=>Lo.find(r=>e===r||e.toLowerCase().includes(r))||Je;function Oo(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Fe(e)}try{let e=document.documentElement.lang;return Fe(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Je}}var To=(e,r,o,t,a,i)=>e==="nb"?o:e==="fi"?t:e==="da"?a:e==="sv"?i:r,Xe=(e,r,o,t,a)=>{let i=Oo(),n=To(i,e,r,o,t,a);u.load(i,n),u.activate(i)};import{css as qe}from"lit";var Ze=qe`
|
|
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
|
+
`,gt=qe`*, :before, :after {
|
|
284
284
|
--w-rotate: 0;
|
|
285
285
|
--w-rotate-x: 0;
|
|
286
286
|
--w-rotate-y: 0;
|
|
@@ -2446,43 +2446,51 @@ Please compile your catalog first.
|
|
|
2446
2446
|
display: none
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
|
-
`;var
|
|
2449
|
+
`;var Ke=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE6ste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var Ge=JSON.parse('{"pagination.aria.first-page":["First page"],"pagination.aria.icon-suffix":["icon"],"pagination.aria.next-page":["Next page"],"pagination.aria.page":["Page ",["currentPage"]],"pagination.aria.pagination":["Pages"],"pagination.aria.prev-page":["Previous page"]}');var Qe=JSON.parse('{"pagination.aria.first-page":["Ensimm\xE4inen sivu"],"pagination.aria.icon-suffix":["kuvake"],"pagination.aria.next-page":["Seuraava sivu"],"pagination.aria.page":["Sivu ",["currentPage"]],"pagination.aria.pagination":["Sivut"],"pagination.aria.prev-page":["Edellinen sivu"]}');var Ve=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Neste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var We=JSON.parse('{"pagination.aria.first-page":["F\xF6rsta sidan"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE4sta sida"],"pagination.aria.page":["Sida ",["currentPage"]],"pagination.aria.pagination":["Sidor"],"pagination.aria.prev-page":["F\xF6reg\xE5ende sida"]}');import{css as Ro}from"lit";var er=Ro`*,: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}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.border-0{border-width:0}.rounded-full{border-radius:9999px}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:no-underline:hover,.focus\\:no-underline:focus{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-primary{background-color:var(--w-s-color-background-primary)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-4{padding:.4rem}.p-8{padding:.8rem}.visible{visibility:visible}.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)}@media (min-width:768px){.md\\:block{display:block}}`;var te=u._({id:"pagination.aria.icon-suffix",message:"icon",comment:"Suffix added at the end of icon titles when img semantics are lost on an html element"}),A="hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding",D,rr,m=class extends $o{constructor(){super();se(this,D);this.currentPageNumber=1;this.visiblePages=7;Xe(Ge,Ve,Qe,Ke,We)}get shouldShowShowFirstPageButton(){return this.currentPageNumber-2>0}get shouldShowPreviousPageButton(){return this.currentPageNumber-1>0}get shouldShowNextPageButton(){return this.currentPageNumber<this.pages}get currentPageIndex(){return this.currentPageNumber-1}get visiblePageNumbers(){if(this.pages<=this.visiblePages)return Array.from({length:this.pages},(i,n)=>n+1);let o=Math.floor(this.visiblePages/2),t=Math.max(1,this.currentPageNumber-o),a=Math.min(this.pages,t+this.visiblePages-1);return a-t+1<this.visiblePages&&(t=Math.max(1,a-this.visiblePages+1)),Array.from({length:a-t+1},(i,n)=>t+n)}render(){let o=this.visiblePageNumbers;return M`<nav class="flex items-center justify-center p-8" @click="${ce(this,D,rr)}">
|
|
2450
2450
|
<h1 class="sr-only">
|
|
2451
2451
|
${u._({id:"pagination.aria.pagination",message:"Pages",comment:"Default screenreader message for pagination container in the pagination component"})}
|
|
2452
2452
|
</h1>
|
|
2453
2453
|
<div class="md:block s-text-link">
|
|
2454
2454
|
${this.shouldShowShowFirstPageButton?M`<a
|
|
2455
|
+
data-page-number="1"
|
|
2455
2456
|
href="${this.baseUrl}1"
|
|
2456
2457
|
class="${A+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
|
|
2457
2458
|
<span class="sr-only"
|
|
2458
2459
|
>${u._({id:"pagination.aria.first-page",message:"First page",comment:"Default screenreader message for first page link in the pagination component"})},</span
|
|
2459
2460
|
>
|
|
2460
2461
|
<w-icon-chevron-double-left-16></w-icon-chevron-double-left-16>
|
|
2461
|
-
<span class="sr-only">${
|
|
2462
|
-
</a>`:
|
|
2462
|
+
<span class="sr-only">${te}</span>
|
|
2463
|
+
</a>`:oe}
|
|
2463
2464
|
${this.shouldShowPreviousPageButton?M`<a
|
|
2465
|
+
data-page-number="${this.currentPageNumber-1}"
|
|
2464
2466
|
href="${this.baseUrl}${this.currentPageNumber-1}"
|
|
2465
2467
|
class="${A+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
|
|
2466
2468
|
<span class="sr-only"
|
|
2467
2469
|
>${u._({id:"pagination.aria.prev-page",message:"Previous page",comment:"Default screenreader message for previous page link in the pagination component"})},</span
|
|
2468
2470
|
>
|
|
2469
2471
|
<w-icon-chevron-left-16></w-icon-chevron-left-16>
|
|
2470
|
-
<span class="sr-only">${
|
|
2471
|
-
</a>`:
|
|
2472
|
-
${o.map(t=>{let a=t===this.currentPageNumber,i=`${this.baseUrl}${t}`,n=A;a?n+=" s-bg-primary s-text-inverted":n+=" hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]";let c=u._({id:"pagination.aria.page",message:"Page {currentPage}",values:{currentPage:t},comment:"Default screenreader message for page link in the pagination component"});return M`<a
|
|
2472
|
+
<span class="sr-only">${te}</span>
|
|
2473
|
+
</a>`:oe}
|
|
2474
|
+
${o.map(t=>{let a=t===this.currentPageNumber,i=`${this.baseUrl}${t}`,n=A;a?n+=" s-bg-primary s-text-inverted":n+=" hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]";let c=u._({id:"pagination.aria.page",message:"Page {currentPage}",values:{currentPage:t},comment:"Default screenreader message for page link in the pagination component"});return M`<a
|
|
2475
|
+
data-page-number="${t}"
|
|
2476
|
+
aria-label="${c}"
|
|
2477
|
+
href="${i}"
|
|
2478
|
+
class="${n}"
|
|
2479
|
+
aria-current="${a?"page":""}"
|
|
2473
2480
|
>${t}</a
|
|
2474
2481
|
>`})}
|
|
2475
2482
|
${this.shouldShowNextPageButton?M`<a
|
|
2483
|
+
data-page-number="${this.currentPageNumber+1}"
|
|
2476
2484
|
href="${this.baseUrl}${this.currentPageNumber+1}"
|
|
2477
2485
|
class="${A+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
|
|
2478
2486
|
<span class="sr-only">
|
|
2479
2487
|
${u._({id:"pagination.aria.next-page",message:"Next page",comment:"Default screenreader message for next page link in the pagination component"})},</span
|
|
2480
2488
|
>
|
|
2481
2489
|
<w-icon-chevron-right-16></w-icon-chevron-right-16>
|
|
2482
|
-
<span class="sr-only">${
|
|
2483
|
-
</a>`:
|
|
2490
|
+
<span class="sr-only">${te}</span>
|
|
2491
|
+
</a>`:oe}
|
|
2484
2492
|
</div>
|
|
2485
|
-
</nav>`}};m.styles=[
|
|
2493
|
+
</nav>`}};D=new WeakSet,rr=function(o){let t=o.target.getAttribute("data-page-number");this.dispatchEvent(new CustomEvent("page-click",{detail:{clickedPage:t},bubbles:!0,composed:!0}))},m.styles=[Ze,er],z([j({type:String,reflect:!0,attribute:"base-url"})],m.prototype,"baseUrl",2),z([j({type:Number,reflect:!0})],m.prototype,"pages",2),z([j({type:Number,reflect:!0,attribute:"current-page"})],m.prototype,"currentPageNumber",2),z([j({type:Number,reflect:!0,attribute:"visible-pages"})],m.prototype,"visiblePages",2);customElements.get("w-pagination")||customElements.define("w-pagination",m);var Yt=q({tagName:"w-pagination",elementClass:m,react:or.default});export{Yt as Pagination};
|
|
2486
2494
|
/*! Bundled license information:
|
|
2487
2495
|
|
|
2488
2496
|
react/cjs/react.production.js:
|