@warp-ds/elements 2.2.0-next.16 → 2.2.0-next.18
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 +2 -2
- package/dist/packages/datepicker/datepicker.stories.d.ts +1 -0
- package/dist/packages/datepicker/datepicker.stories.js +1 -0
- package/dist/packages/pagination/index.js +11 -11
- package/dist/packages/pagination/index.js.map +3 -3
- package/dist/packages/pagination/styles.js +1 -1
- package/dist/packages/select/index.js +1 -1
- package/dist/packages/select/index.js.map +2 -2
- package/dist/packages/slider/index.js +6 -6
- package/dist/packages/slider/index.js.map +2 -2
- package/dist/packages/slider/slider-thumb.js +2 -2
- package/dist/packages/slider/slider-thumb.js.map +2 -2
- package/dist/packages/textfield/index.js +1 -1
- package/dist/packages/textfield/index.js.map +2 -2
- package/dist/web-types.json +1 -1
- package/package.json +5 -3
|
@@ -3794,7 +3794,7 @@
|
|
|
3794
3794
|
"type": {
|
|
3795
3795
|
"text": "object"
|
|
3796
3796
|
},
|
|
3797
|
-
"default": "{ base: 'block text-m mb-0 py-12 pr-32 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] appearance-none cursor-pointer caret-current', default: 's-text s-bg pl-8 border-1 s-border hover:s-border-hover active:s-border-active', disabled: 's-text-disabled s-bg-disabled-subtle pl-8 border-1 s-border-disabled hover:s-border-disabled active:s-border-disabled pointer-events-none', invalid: 's-text s-bg pl-8 border-1 s-border-negative hover:s-border-negative-hover active:s-border-active outline-[--w-s-color-border-negative]!', readOnly: 's-text bg-transparent pl-0 border-0 pointer-events-none before:hidden', wrapper: 'relative', selectWrapper: `relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none `, chevron: 'block absolute top-[30%] right-0 bottom-0 w-32 h-full s-icon pointer-events-none cursor-pointer', chevronDisabled: 'opacity-25', }"
|
|
3797
|
+
"default": "{ base: 'block text-m mb-0 py-12 pr-32 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] appearance-none cursor-pointer caret-current', default: 's-text s-bg pl-8 border-1 s-border-strong hover:s-border-strong-hover active:s-border-active', disabled: 's-text-disabled s-bg-disabled-subtle pl-8 border-1 s-border-disabled hover:s-border-disabled active:s-border-disabled pointer-events-none', invalid: 's-text s-bg pl-8 border-1 s-border-negative hover:s-border-negative-hover active:s-border-active outline-[--w-s-color-border-negative]!', readOnly: 's-text bg-transparent pl-0 border-0 pointer-events-none before:hidden', wrapper: 'relative', selectWrapper: `relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none `, chevron: 'block absolute top-[30%] right-0 bottom-0 w-32 h-full s-icon pointer-events-none cursor-pointer', chevronDisabled: 'opacity-25', }"
|
|
3798
3798
|
},
|
|
3799
3799
|
{
|
|
3800
3800
|
"kind": "variable",
|
|
@@ -4123,7 +4123,7 @@
|
|
|
4123
4123
|
"type": {
|
|
4124
4124
|
"text": "object"
|
|
4125
4125
|
},
|
|
4126
|
-
"default": "{ // input classes base: 'block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current', // true default: 'border-1 s-text s-bg s-border hover:s-border-hover active:s-border-selected', // !isInvalid && !isDisabled && !isReadOnly disabled: 'border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none', // !isInvalid && isDisabled && !isReadOnly invalid: 'border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!', // isInvalid && !isDisabled && !isReadOnly readOnly: 'pl-0 bg-transparent pointer-events-none', // !isInvalid && !isDisabled && isReadOnly placeholder: 'placeholder:s-text-placeholder', suffix: 'pr-40', prefix: 'pl-[var(--w-prefix-width,_40px)]', // textarea classes textArea: 'min-h-[42] sm:min-h-[45]', }"
|
|
4126
|
+
"default": "{ // input classes base: 'block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current', // true default: 'border-1 s-text s-bg s-border-strong hover:s-border-strong-hover active:s-border-selected', // !isInvalid && !isDisabled && !isReadOnly disabled: 'border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none', // !isInvalid && isDisabled && !isReadOnly invalid: 'border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!', // isInvalid && !isDisabled && !isReadOnly readOnly: 'pl-0 bg-transparent pointer-events-none', // !isInvalid && !isDisabled && isReadOnly placeholder: 'placeholder:s-text-placeholder', suffix: 'pr-40', prefix: 'pl-[var(--w-prefix-width,_40px)]', // textarea classes textArea: 'min-h-[42] sm:min-h-[45]', }"
|
|
4127
4127
|
},
|
|
4128
4128
|
{
|
|
4129
4129
|
"kind": "variable",
|
|
@@ -2,6 +2,7 @@ import { html } from 'lit';
|
|
|
2
2
|
import { spread } from '@open-wc/lit-helpers';
|
|
3
3
|
import { getStorybookHelpers } from '@wc-toolkit/storybook-helpers';
|
|
4
4
|
import { prespread } from '../../.storybook/utilities.js';
|
|
5
|
+
import '../button/index.js';
|
|
5
6
|
import './index.js';
|
|
6
7
|
const { events, args, argTypes } = getStorybookHelpers('w-datepicker');
|
|
7
8
|
const meta = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var Le=Object.create;var C=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ee=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var H=r=>{throw TypeError(r)};var Z=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ce=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Pe(e))!Oe.call(r,a)&&a!==o&&C(r,a,{get:()=>e[a],enumerable:!(t=X(e,a))||t.enumerable});return r};var $e=(r,e,o)=>(o=r!=null?Le(Ee(r)):{},Ce(e||!r||!r.__esModule?C(o,"default",{value:r,enumerable:!0}):o,r));var x=(r,e,o,t)=>{for(var a=t>1?void 0:t?X(e,o):e,
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ye(r){return Ae.get(r)||r}var Ue=/\\(?:(\\)|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 Q(r,e=!1){return r.replace(Ue,function(o,t,a,i,
|
|
1
|
+
var Le=Object.create;var C=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ee=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var H=r=>{throw TypeError(r)};var Z=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ce=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Pe(e))!Oe.call(r,a)&&a!==o&&C(r,a,{get:()=>e[a],enumerable:!(t=X(e,a))||t.enumerable});return r};var $e=(r,e,o)=>(o=r!=null?Le(Ee(r)):{},Ce(e||!r||!r.__esModule?C(o,"default",{value:r,enumerable:!0}):o,r));var x=(r,e,o,t)=>{for(var a=t>1?void 0:t?X(e,o):e,n=r.length-1,i;n>=0;n--)(i=r[n])&&(a=(t?i(e,o,a):i(a))||a);return t&&a&&C(e,o,a),a};var De=(r,e,o)=>e.has(r)||H("Cannot "+o);var q=(r,e,o)=>e.has(r)?H("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,o);var K=(r,e,o)=>(De(r,e,"access private method"),o);var G=Z(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.errorMessages=m.ErrorType=void 0;var w;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(w=m.ErrorType||(m.ErrorType={}));m.errorMessages=new Map([[w.MalformedUnicode,"malformed Unicode character escape sequence"],[w.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[w.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[w.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[w.EndOfString,"malformed escape sequence at end of string"]])});var W=Z(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.unraw=g.errorMessages=g.ErrorType=void 0;var d=G();Object.defineProperty(g,"ErrorType",{enumerable:!0,get:function(){return d.ErrorType}});Object.defineProperty(g,"errorMessages",{enumerable:!0,get:function(){return d.errorMessages}});function Fe(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function z(r,e,o){let t=Fe(r);if(Number.isNaN(t)||o!==void 0&&o!==r.length)throw new SyntaxError(d.errorMessages.get(e));return t}function je(r){let e=z(r,d.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function V(r,e){let o=z(r,d.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=z(e,d.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function Ie(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function Te(r){if(!Ie(r))throw new SyntaxError(d.errorMessages.get(d.ErrorType.MalformedUnicode));let e=r.slice(1,-1),o=z(e,d.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(d.errorMessages.get(d.ErrorType.CodePointLimit)):t}}function Be(r,e=!1){if(e)throw new SyntaxError(d.errorMessages.get(d.ErrorType.OctalDeprecation));let o=parseInt(r,8);return String.fromCharCode(o)}var Ae=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ye(r){return Ae.get(r)||r}var Ue=/\\(?:(\\)|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 Q(r,e=!1){return r.replace(Ue,function(o,t,a,n,i,s,l,p,h){if(t!==void 0)return"\\";if(a!==void 0)return je(a);if(n!==void 0)return Te(n);if(i!==void 0)return V(i,s);if(l!==void 0)return V(l);if(p==="0")return"\0";if(p!==void 0)return Be(p,!e);if(h!==void 0)return Ye(h);throw new SyntaxError(d.errorMessages.get(d.ErrorType.EndOfString))})}g.unraw=Q;g.default=Q});import{html as k,LitElement as Jr,nothing as Y}from"lit";var oe=$e(W(),1);var u=r=>typeof r=="string",Je=r=>typeof r=="function",ee=new Map,te="en";function j(r){return[...Array.isArray(r)?r:[r],te]}function I(r,e,o){let t=j(r);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 N(()=>S("date",t,o),()=>new Intl.DateTimeFormat(t,a)).format(u(e)?new Date(e):e)}function Re(r,e,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 I(r,e,t)}function $(r,e,o){let t=j(r);return N(()=>S("number",t,o),()=>new Intl.NumberFormat(t,o)).format(e)}function re(r,e,o,{offset:t=0,...a}){var s,l;let n=j(r),i=e?N(()=>S("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):N(()=>S("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(l=(s=a[o])!=null?s:a[i.select(o-t)])!=null?l:a.other}function N(r,e){let o=r(),t=ee.get(o);return t||(t=e(),ee.set(o,t)),t}function S(r,e,o){let t=e.join("-");return`${r}-${t}-${JSON.stringify(o)}`}var ae=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ne="%__lingui_octothorpe__%",Xe=(r,e,o={})=>{let t=e||r,a=i=>typeof i=="object"?i:o[i],n=(i,s)=>{let l=Object.keys(o).length?a("number"):void 0,p=$(t,i,l);return s.replace(new RegExp(ne,"g"),p)};return{plural:(i,s)=>{let{offset:l=0}=s,p=re(t,!1,i,s);return n(i-l,p)},selectordinal:(i,s)=>{let{offset:l=0}=s,p=re(t,!0,i,s);return n(i-l,p)},select:He,number:(i,s)=>$(t,i,a(s)||{style:s}),date:(i,s)=>I(t,i,a(s)||s),time:(i,s)=>Re(t,i,a(s)||s)}},He=(r,e)=>{var o;return(o=e[r])!=null?o:e.other};function Ze(r,e,o){return(t={},a)=>{let n=Xe(e,o,a),i=(l,p=!1)=>Array.isArray(l)?l.reduce((h,y)=>{if(y==="#"&&p)return h+ne;if(u(y))return h+y;let[J,v,R]=y,E={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(R).forEach(([O,Me])=>{E[O]=i(Me,v==="plural"||v==="selectordinal")}):E=R;let _;if(v){let O=n[v];_=O(t[J],E)}else _=t[J];return _==null?h:h+_},""):l,s=i(r);return u(s)&&ae.test(s)?(0,oe.unraw)(s):u(s)?s:s?String(s):""}}var qe=Object.defineProperty,Ke=(r,e,o)=>e in r?qe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,Ge=(r,e,o)=>(Ke(r,typeof e!="symbol"?e+"":e,o),o),D=class{constructor(){Ge(this,"_events",{})}on(e,o){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(o),()=>this.removeListener(e,o)}removeListener(e,o){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(o);~a&&t.splice(a,1)}emit(e,...o){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,o))}_getListeners(e){let o=this._events[e];return Array.isArray(o)?o:!1}},Ve=Object.defineProperty,Qe=(r,e,o)=>e in r?Ve(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,f=(r,e,o)=>(Qe(r,typeof e!="symbol"?e+"":e,o),o),F=class extends D{constructor(e){var o;super(),f(this,"_locale",""),f(this,"_locales"),f(this,"_localeData",{}),f(this,"_messages",{}),f(this,"_missing"),f(this,"_messageCompiler"),f(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((o=e.locale)!=null?o:te,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,o){let t=this._localeData[e];t?Object.assign(t,o):this._localeData[e]=o}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,o){typeof e=="string"?this._loadLocaleData(e,o):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,o){let t=this._messages[e];t?Object.assign(t,o):this._messages[e]=o}load(e,o){typeof e=="string"&&typeof o=="object"?this._load(e,o):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:o,messages:t}){this._locale=e,this._locales=o||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,o){this._locale=e,this._locales=o,this.emit("change")}_(e,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;e||(e=""),u(e)||(o=e.values||o,a=e.message,e=e.id);let n=this.messages[e],i=n===void 0,s=this._missing;if(s&&i)return Je(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let l=n||a||e;return u(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
|
-
`)),u(l)&&ae.test(l)?JSON.parse(`"${l}"`):u(l)?l:Ze(l,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return I(this._locales||this._locale,e,o)}number(e,o){return $(this._locales||this._locale,e,o)}};function We(r={}){return new F(r)}var c=We();import{property as M}from"lit/decorators.js";import{LitElement as er}from"lit";import{unsafeStatic as rr,html as or}from"lit/static-html.js";var tr=JSON.parse('{"icon.title.chevron-double-left":["Dobbel pil til venstre"]}'),ar=JSON.parse('{"icon.title.chevron-double-left":["Double leftward arrow"]}'),
|
|
10
|
+
`)),u(l)&&ae.test(l)?JSON.parse(`"${l}"`):u(l)?l:Ze(l,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return I(this._locales||this._locale,e,o)}number(e,o){return $(this._locales||this._locale,e,o)}};function We(r={}){return new F(r)}var c=We();import{property as M}from"lit/decorators.js";import{LitElement as er}from"lit";import{unsafeStatic as rr,html as or}from"lit/static-html.js";var tr=JSON.parse('{"icon.title.chevron-double-left":["Dobbel pil til venstre"]}'),ar=JSON.parse('{"icon.title.chevron-double-left":["Double leftward arrow"]}'),nr=JSON.parse('{"icon.title.chevron-double-left":["Kaksi nuolta vasemmalle"]}'),ir=JSON.parse('{"icon.title.chevron-double-left":["Dobbelt venstrepil"]}'),sr=JSON.parse('{"icon.title.chevron-double-left":["Dubbel v\xE4nsterpil"]}'),ie=["en","nb","fi","da","sv"],se="en",lr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},le=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":se},T=r=>ie.find(e=>r===e||r.toLowerCase().includes(e))||le();function cr(){var r;if(typeof window=="undefined"){let e=lr();return T(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=le();return ie.includes(e)?T(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),T(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),se}}var dr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,pr=(r,e,o,t,a)=>{let n=cr(),i=dr(n,r,e,o,t,a);c.load(n,i),c.activate(n)};pr(ar,tr,nr,ir,sr);var gr=class extends er{render(){let r=c.t({message:"Double leftward arrow",id:"icon.title.chevron-double-left",comment:"Title for chevron-double-left icon"});return or`<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">${rr(`<title>${r}</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",gr);import{LitElement as ur}from"lit";import{unsafeStatic as br,html as hr}from"lit/static-html.js";var vr=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),mr=JSON.parse('{"icon.title.chevron-left":["Leftward arrow"]}'),fr=JSON.parse('{"icon.title.chevron-left":["Nuoli vasemmalle"]}'),wr=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),xr=JSON.parse('{"icon.title.chevron-left":["Pil v\xE4nster"]}'),ce=["en","nb","fi","da","sv"],de="en",kr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},pe=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":de},B=r=>ce.find(e=>r===e||r.toLowerCase().includes(e))||pe();function yr(){var r;if(typeof window=="undefined"){let e=kr();return B(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=pe();return ce.includes(e)?B(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),B(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),de}}var _r=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,zr=(r,e,o,t,a)=>{let n=yr(),i=_r(n,r,e,o,t,a);c.load(n,i),c.activate(n)};zr(mr,vr,fr,wr,xr);var Nr=class extends ur{render(){let r=c.t({message:"Leftward arrow",id:"icon.title.chevron-left",comment:"Title for chevron-left icon"});return hr`<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">${br(`<title>${r}</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",Nr);import{LitElement as Sr}from"lit";import{unsafeStatic as Mr,html as Lr}from"lit/static-html.js";var Pr=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8yre"]}'),Er=JSON.parse('{"icon.title.chevron-right":["Rightward arrow"]}'),Or=JSON.parse('{"icon.title.chevron-right":["Nuoli oikealle"]}'),Cr=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8jre"]}'),$r=JSON.parse('{"icon.title.chevron-right":["Pil h\xF6ger"]}'),ge=["en","nb","fi","da","sv"],ue="en",Dr=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},be=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ue},A=r=>ge.find(e=>r===e||r.toLowerCase().includes(e))||be();function Fr(){var r;if(typeof window=="undefined"){let e=Dr();return A(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=be();return ge.includes(e)?A(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),A(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ue}}var jr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,Ir=(r,e,o,t,a)=>{let n=Fr(),i=jr(n,r,e,o,t,a);c.load(n,i),c.activate(n)};Ir(Er,Pr,Or,Cr,$r);var Tr=class extends Sr{render(){let r=c.t({message:"Rightward arrow",id:"icon.title.chevron-right",comment:"Title for chevron-right icon"});return Lr`<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">${Mr(`<title>${r}</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",Tr);var Br=["en","nb","fi","da","sv"],ve="en",he=r=>Br.find(e=>r===e||r.toLowerCase().includes(e))||ve;function Ar(){if(typeof window=="undefined"){let r=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return he(r)}try{let r=document.documentElement.lang;return he(r)}catch(r){return console.warn("could not detect locale, falling back to source locale",r),ve}}var Yr=(r,e,o,t,a,n)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?n:e,me=(r,e,o,t,a)=>{let n=Ar(),i=Yr(n,r,e,o,t,a);c.load(n,i),c.activate(n)};import{css as fe}from"lit";var we=fe`
|
|
11
11
|
*,
|
|
12
12
|
:before,
|
|
13
13
|
:after {
|
|
@@ -2446,11 +2446,11 @@ Please compile your catalog first.
|
|
|
2446
2446
|
display: none
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
|
-
`;var xe=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 ke=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 ye=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 _e=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 ze=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 Ur}from"lit";var Ne=Ur`*,: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)}
|
|
2449
|
+
`;var xe=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 ke=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 ye=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 _e=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 ze=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 Ur}from"lit";var Ne=Ur`*,: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}.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)}`;var U=c._({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"}),L="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",P,Se,b=class extends Jr{constructor(){super();q(this,P);this.currentPageNumber=1;this.visiblePages=7;me(ke,_e,ye,xe,ze)}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},(n,i)=>i+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},(n,i)=>t+i)}render(){let o=this.visiblePageNumbers;return k`<nav class="flex items-center justify-center p-8" @click="${K(this,P,Se)}">
|
|
2450
2450
|
<h1 class="sr-only">
|
|
2451
2451
|
${c._({id:"pagination.aria.pagination",message:"Pages",comment:"Default screenreader message for pagination container in the pagination component"})}
|
|
2452
2452
|
</h1>
|
|
2453
|
-
<div class="
|
|
2453
|
+
<div class="flex items-center s-text-link">
|
|
2454
2454
|
${this.shouldShowShowFirstPageButton?k`<a
|
|
2455
2455
|
data-page-number="1"
|
|
2456
2456
|
href="${this.baseUrl}1"
|
|
@@ -2458,7 +2458,7 @@ Please compile your catalog first.
|
|
|
2458
2458
|
<span class="sr-only"
|
|
2459
2459
|
>${c._({id:"pagination.aria.first-page",message:"First page",comment:"Default screenreader message for first page link in the pagination component"})},</span
|
|
2460
2460
|
>
|
|
2461
|
-
<w-icon-chevron-double-left-16></w-icon-chevron-double-left-16>
|
|
2461
|
+
<w-icon-chevron-double-left-16 class="pointer-events-none flex items-center"></w-icon-chevron-double-left-16>
|
|
2462
2462
|
<span class="sr-only">${U}</span>
|
|
2463
2463
|
</a>`:Y}
|
|
2464
2464
|
${this.shouldShowPreviousPageButton?k`<a
|
|
@@ -2468,14 +2468,14 @@ Please compile your catalog first.
|
|
|
2468
2468
|
<span class="sr-only"
|
|
2469
2469
|
>${c._({id:"pagination.aria.prev-page",message:"Previous page",comment:"Default screenreader message for previous page link in the pagination component"})},</span
|
|
2470
2470
|
>
|
|
2471
|
-
<w-icon-chevron-left-16></w-icon-chevron-left-16>
|
|
2471
|
+
<w-icon-chevron-left-16 class="pointer-events-none flex items-center"></w-icon-chevron-left-16>
|
|
2472
2472
|
<span class="sr-only">${U}</span>
|
|
2473
2473
|
</a>`:Y}
|
|
2474
|
-
${o.map(t=>{let a=t===this.currentPageNumber,
|
|
2474
|
+
${o.map(t=>{let a=t===this.currentPageNumber,n=`${this.baseUrl}${t}`,i=L;a?i+=" s-bg-primary s-text-inverted":i+=" hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]";let s=c._({id:"pagination.aria.page",message:"Page {currentPage}",values:{currentPage:t},comment:"Default screenreader message for page link in the pagination component"});return k`<a
|
|
2475
2475
|
data-page-number="${t}"
|
|
2476
2476
|
aria-label="${s}"
|
|
2477
|
-
href="${
|
|
2478
|
-
class="${
|
|
2477
|
+
href="${n}"
|
|
2478
|
+
class="${i}"
|
|
2479
2479
|
aria-current="${a?"page":""}"
|
|
2480
2480
|
>${t}</a
|
|
2481
2481
|
>`})}
|
|
@@ -2486,7 +2486,7 @@ Please compile your catalog first.
|
|
|
2486
2486
|
<span class="sr-only">
|
|
2487
2487
|
${c._({id:"pagination.aria.next-page",message:"Next page",comment:"Default screenreader message for next page link in the pagination component"})},</span
|
|
2488
2488
|
>
|
|
2489
|
-
<w-icon-chevron-right-16></w-icon-chevron-right-16>
|
|
2489
|
+
<w-icon-chevron-right-16 class="pointer-events-none flex items-center"></w-icon-chevron-right-16>
|
|
2490
2490
|
<span class="sr-only">${U}</span>
|
|
2491
2491
|
</a>`:Y}
|
|
2492
2492
|
</div>
|