@cargosense/cargo-design-system 1.0.14 → 1.0.15
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/assets/index.cjs.js +9 -10
- package/dist/assets/index.cjs.js.map +1 -1
- package/dist/assets/index.es.js +28 -20
- package/dist/assets/index.es.js.map +1 -1
- package/package.json +4 -9
- package/LICENSE.md +0 -9
- package/README.md +0 -93
package/dist/assets/index.cjs.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const j=globalThis,L=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,m=Symbol(),S=new WeakMap;let CA=class{constructor(A,g,B){if(this._$cssResult$=!0,B!==m)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=A,this.t=g}get styleSheet(){let A=this.o;const g=this.t;if(L&&A===void 0){const B=g!==void 0&&g.length===1;B&&(A=S.get(g)),A===void 0&&((this.o=A=new CSSStyleSheet).replaceSync(this.cssText),B&&S.set(g,A))}return A}toString(){return this.cssText}};const D=Q=>new CA(typeof Q=="string"?Q:Q+"",void 0,m),i=(Q,...A)=>{const g=Q.length===1?Q[0]:A.reduce((B,C,E)=>B+(e=>{if(e._$cssResult$===!0)return e.cssText;if(typeof e=="number")return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(C)+Q[E+1],Q[0]);return new CA(g,Q,m)},
|
|
5
|
+
*/const j=globalThis,L=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,m=Symbol(),S=new WeakMap;let CA=class{constructor(A,g,B){if(this._$cssResult$=!0,B!==m)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=A,this.t=g}get styleSheet(){let A=this.o;const g=this.t;if(L&&A===void 0){const B=g!==void 0&&g.length===1;B&&(A=S.get(g)),A===void 0&&((this.o=A=new CSSStyleSheet).replaceSync(this.cssText),B&&S.set(g,A))}return A}toString(){return this.cssText}};const D=Q=>new CA(typeof Q=="string"?Q:Q+"",void 0,m),i=(Q,...A)=>{const g=Q.length===1?Q[0]:A.reduce((B,C,E)=>B+(e=>{if(e._$cssResult$===!0)return e.cssText;if(typeof e=="number")return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(C)+Q[E+1],Q[0]);return new CA(g,Q,m)},HA=(Q,A)=>{if(L)Q.adoptedStyleSheets=A.map(g=>g instanceof CSSStyleSheet?g:g.styleSheet);else for(const g of A){const B=document.createElement("style"),C=j.litNonce;C!==void 0&&B.setAttribute("nonce",C),B.textContent=g.cssText,Q.appendChild(B)}},K=L?Q=>Q:Q=>Q instanceof CSSStyleSheet?(A=>{let g="";for(const B of A.cssRules)g+=B.cssText;return D(g)})(Q):Q;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:yA,defineProperty:jA,getOwnPropertyDescriptor:RA,getOwnPropertyNames:xA,getOwnPropertySymbols:bA,getPrototypeOf:TA}=Object,x=globalThis,X=x.trustedTypes,OA=X?X.emptyScript:"",LA=x.reactiveElementPolyfillSupport,f=(Q,A)=>Q,O={toAttribute(Q,A){switch(A){case Boolean:Q=Q?OA:null;break;case Object:case Array:Q=Q==null?Q:JSON.stringify(Q)}return Q},fromAttribute(Q,A){let g=Q;switch(A){case Boolean:g=Q!==null;break;case Number:g=Q===null?null:Number(Q);break;case Object:case Array:try{g=JSON.parse(Q)}catch{g=null}}return g}},QA=(Q,A)=>!yA(Q,A),Z={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:QA};Symbol.metadata??=Symbol("metadata"),x.litPropertyMetadata??=new WeakMap;let G=class extends HTMLElement{static addInitializer(A){this._$Ei(),(this.l??=[]).push(A)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(A,g=Z){if(g.state&&(g.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(A)&&((g=Object.create(g)).wrapped=!0),this.elementProperties.set(A,g),!g.noAccessor){const B=Symbol(),C=this.getPropertyDescriptor(A,B,g);C!==void 0&&jA(this.prototype,A,C)}}static getPropertyDescriptor(A,g,B){const{get:C,set:E}=RA(this.prototype,A)??{get(){return this[g]},set(e){this[g]=e}};return{get:C,set(e){const s=C?.call(this);E?.call(this,e),this.requestUpdate(A,s,B)},configurable:!0,enumerable:!0}}static getPropertyOptions(A){return this.elementProperties.get(A)??Z}static _$Ei(){if(this.hasOwnProperty(f("elementProperties")))return;const A=TA(this);A.finalize(),A.l!==void 0&&(this.l=[...A.l]),this.elementProperties=new Map(A.elementProperties)}static finalize(){if(this.hasOwnProperty(f("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(f("properties"))){const g=this.properties,B=[...xA(g),...bA(g)];for(const C of B)this.createProperty(C,g[C])}const A=this[Symbol.metadata];if(A!==null){const g=litPropertyMetadata.get(A);if(g!==void 0)for(const[B,C]of g)this.elementProperties.set(B,C)}this._$Eh=new Map;for(const[g,B]of this.elementProperties){const C=this._$Eu(g,B);C!==void 0&&this._$Eh.set(C,g)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(A){const g=[];if(Array.isArray(A)){const B=new Set(A.flat(1/0).reverse());for(const C of B)g.unshift(K(C))}else A!==void 0&&g.push(K(A));return g}static _$Eu(A,g){const B=g.attribute;return B===!1?void 0:typeof B=="string"?B:typeof A=="string"?A.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(A=>this.enableUpdating=A),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(A=>A(this))}addController(A){(this._$EO??=new Set).add(A),this.renderRoot!==void 0&&this.isConnected&&A.hostConnected?.()}removeController(A){this._$EO?.delete(A)}_$E_(){const A=new Map,g=this.constructor.elementProperties;for(const B of g.keys())this.hasOwnProperty(B)&&(A.set(B,this[B]),delete this[B]);A.size>0&&(this._$Ep=A)}createRenderRoot(){const A=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return
|
|
9
|
+
*/const{is:yA,defineProperty:jA,getOwnPropertyDescriptor:RA,getOwnPropertyNames:xA,getOwnPropertySymbols:bA,getPrototypeOf:TA}=Object,x=globalThis,X=x.trustedTypes,OA=X?X.emptyScript:"",LA=x.reactiveElementPolyfillSupport,f=(Q,A)=>Q,O={toAttribute(Q,A){switch(A){case Boolean:Q=Q?OA:null;break;case Object:case Array:Q=Q==null?Q:JSON.stringify(Q)}return Q},fromAttribute(Q,A){let g=Q;switch(A){case Boolean:g=Q!==null;break;case Number:g=Q===null?null:Number(Q);break;case Object:case Array:try{g=JSON.parse(Q)}catch{g=null}}return g}},QA=(Q,A)=>!yA(Q,A),Z={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:QA};Symbol.metadata??=Symbol("metadata"),x.litPropertyMetadata??=new WeakMap;let G=class extends HTMLElement{static addInitializer(A){this._$Ei(),(this.l??=[]).push(A)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(A,g=Z){if(g.state&&(g.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(A)&&((g=Object.create(g)).wrapped=!0),this.elementProperties.set(A,g),!g.noAccessor){const B=Symbol(),C=this.getPropertyDescriptor(A,B,g);C!==void 0&&jA(this.prototype,A,C)}}static getPropertyDescriptor(A,g,B){const{get:C,set:E}=RA(this.prototype,A)??{get(){return this[g]},set(e){this[g]=e}};return{get:C,set(e){const s=C?.call(this);E?.call(this,e),this.requestUpdate(A,s,B)},configurable:!0,enumerable:!0}}static getPropertyOptions(A){return this.elementProperties.get(A)??Z}static _$Ei(){if(this.hasOwnProperty(f("elementProperties")))return;const A=TA(this);A.finalize(),A.l!==void 0&&(this.l=[...A.l]),this.elementProperties=new Map(A.elementProperties)}static finalize(){if(this.hasOwnProperty(f("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(f("properties"))){const g=this.properties,B=[...xA(g),...bA(g)];for(const C of B)this.createProperty(C,g[C])}const A=this[Symbol.metadata];if(A!==null){const g=litPropertyMetadata.get(A);if(g!==void 0)for(const[B,C]of g)this.elementProperties.set(B,C)}this._$Eh=new Map;for(const[g,B]of this.elementProperties){const C=this._$Eu(g,B);C!==void 0&&this._$Eh.set(C,g)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(A){const g=[];if(Array.isArray(A)){const B=new Set(A.flat(1/0).reverse());for(const C of B)g.unshift(K(C))}else A!==void 0&&g.push(K(A));return g}static _$Eu(A,g){const B=g.attribute;return B===!1?void 0:typeof B=="string"?B:typeof A=="string"?A.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(A=>this.enableUpdating=A),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(A=>A(this))}addController(A){(this._$EO??=new Set).add(A),this.renderRoot!==void 0&&this.isConnected&&A.hostConnected?.()}removeController(A){this._$EO?.delete(A)}_$E_(){const A=new Map,g=this.constructor.elementProperties;for(const B of g.keys())this.hasOwnProperty(B)&&(A.set(B,this[B]),delete this[B]);A.size>0&&(this._$Ep=A)}createRenderRoot(){const A=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return HA(A,this.constructor.elementStyles),A}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(A=>A.hostConnected?.())}enableUpdating(A){}disconnectedCallback(){this._$EO?.forEach(A=>A.hostDisconnected?.())}attributeChangedCallback(A,g,B){this._$AK(A,B)}_$ET(A,g){const B=this.constructor.elementProperties.get(A),C=this.constructor._$Eu(A,B);if(C!==void 0&&B.reflect===!0){const E=(B.converter?.toAttribute!==void 0?B.converter:O).toAttribute(g,B.type);this._$Em=A,E==null?this.removeAttribute(C):this.setAttribute(C,E),this._$Em=null}}_$AK(A,g){const B=this.constructor,C=B._$Eh.get(A);if(C!==void 0&&this._$Em!==C){const E=B.getPropertyOptions(C),e=typeof E.converter=="function"?{fromAttribute:E.converter}:E.converter?.fromAttribute!==void 0?E.converter:O;this._$Em=C;const s=e.fromAttribute(g,E.type);this[C]=s??this._$Ej?.get(C)??s,this._$Em=null}}requestUpdate(A,g,B){if(A!==void 0){const C=this.constructor,E=this[A];if(B??=C.getPropertyOptions(A),!((B.hasChanged??QA)(E,g)||B.useDefault&&B.reflect&&E===this._$Ej?.get(A)&&!this.hasAttribute(C._$Eu(A,B))))return;this.C(A,g,B)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(A,g,{useDefault:B,reflect:C,wrapped:E},e){B&&!(this._$Ej??=new Map).has(A)&&(this._$Ej.set(A,e??g??this[A]),E!==!0||e!==void 0)||(this._$AL.has(A)||(this.hasUpdated||B||(g=void 0),this._$AL.set(A,g)),C===!0&&this._$Em!==A&&(this._$Eq??=new Set).add(A))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(g){Promise.reject(g)}const A=this.scheduleUpdate();return A!=null&&await A,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[C,E]of this._$Ep)this[C]=E;this._$Ep=void 0}const B=this.constructor.elementProperties;if(B.size>0)for(const[C,E]of B){const{wrapped:e}=E,s=this[C];e!==!0||this._$AL.has(C)||s===void 0||this.C(C,void 0,E,s)}}let A=!1;const g=this._$AL;try{A=this.shouldUpdate(g),A?(this.willUpdate(g),this._$EO?.forEach(B=>B.hostUpdate?.()),this.update(g)):this._$EM()}catch(B){throw A=!1,this._$EM(),B}A&&this._$AE(g)}willUpdate(A){}_$AE(A){this._$EO?.forEach(g=>g.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(A)),this.updated(A)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(A){return!0}update(A){this._$Eq&&=this._$Eq.forEach(g=>this._$ET(g,this[g])),this._$EM()}updated(A){}firstUpdated(A){}};G.elementStyles=[],G.shadowRootOptions={mode:"open"},G[f("elementProperties")]=new Map,G[f("finalized")]=new Map,LA?.({ReactiveElement:G}),(x.reactiveElementVersions??=[]).push("2.1.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const p=globalThis,R=p.trustedTypes,q=R?R.createPolicy("lit-html",{createHTML:Q=>Q}):void 0,EA="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,eA="?"+h,mA=`<${eA}>`,d=document,J=()=>d.createComment(""),N=Q=>Q===null||typeof Q!="object"&&typeof Q!="function",k=Array.isArray,pA=Q=>k(Q)||typeof Q?.[Symbol.iterator]=="function",T=`[
|
|
14
14
|
\f\r]`,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,_=/>/g,l=RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),AA=/'/g,gA=/"/g,IA=/^(?:script|style|textarea|title)$/i,kA=Q=>(A,...g)=>({_$litType$:Q,strings:A,values:g}),t=kA(1),u=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),BA=new WeakMap,U=d.createTreeWalker(d,129);function tA(Q,A){if(!k(Q)||!Q.hasOwnProperty("raw"))throw Error("invalid template strings array");return q!==void 0?q.createHTML(A):A}const WA=(Q,A)=>{const g=Q.length-1,B=[];let C,E=A===2?"<svg>":A===3?"<math>":"",e=v;for(let s=0;s<g;s++){const I=Q[s];let r,Y,w=-1,F=0;for(;F<I.length&&(e.lastIndex=F,Y=e.exec(I),Y!==null);)F=e.lastIndex,e===v?Y[1]==="!--"?e=$:Y[1]!==void 0?e=_:Y[2]!==void 0?(IA.test(Y[2])&&(C=RegExp("</"+Y[2],"g")),e=l):Y[3]!==void 0&&(e=l):e===l?Y[0]===">"?(e=C??v,w=-1):Y[1]===void 0?w=-2:(w=e.lastIndex-Y[2].length,r=Y[1],e=Y[3]===void 0?l:Y[3]==='"'?gA:AA):e===gA||e===AA?e=l:e===$||e===_?e=v:(e=l,C=void 0);const a=e===l&&Q[s+1].startsWith("/>")?" ":"";E+=e===v?I+mA:w>=0?(B.push(r),I.slice(0,w)+EA+I.slice(w)+h+a):I+h+(w===-2?s:a)}return[tA(Q,E+(Q[g]||"<?>")+(A===2?"</svg>":A===3?"</math>":"")),B]};class
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),AA=/'/g,gA=/"/g,IA=/^(?:script|style|textarea|title)$/i,kA=Q=>(A,...g)=>({_$litType$:Q,strings:A,values:g}),t=kA(1),u=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),BA=new WeakMap,U=d.createTreeWalker(d,129);function tA(Q,A){if(!k(Q)||!Q.hasOwnProperty("raw"))throw Error("invalid template strings array");return q!==void 0?q.createHTML(A):A}const WA=(Q,A)=>{const g=Q.length-1,B=[];let C,E=A===2?"<svg>":A===3?"<math>":"",e=v;for(let s=0;s<g;s++){const I=Q[s];let r,Y,w=-1,F=0;for(;F<I.length&&(e.lastIndex=F,Y=e.exec(I),Y!==null);)F=e.lastIndex,e===v?Y[1]==="!--"?e=$:Y[1]!==void 0?e=_:Y[2]!==void 0?(IA.test(Y[2])&&(C=RegExp("</"+Y[2],"g")),e=l):Y[3]!==void 0&&(e=l):e===l?Y[0]===">"?(e=C??v,w=-1):Y[1]===void 0?w=-2:(w=e.lastIndex-Y[2].length,r=Y[1],e=Y[3]===void 0?l:Y[3]==='"'?gA:AA):e===gA||e===AA?e=l:e===$||e===_?e=v:(e=l,C=void 0);const a=e===l&&Q[s+1].startsWith("/>")?" ":"";E+=e===v?I+mA:w>=0?(B.push(r),I.slice(0,w)+EA+I.slice(w)+h+a):I+h+(w===-2?s:a)}return[tA(Q,E+(Q[g]||"<?>")+(A===2?"</svg>":A===3?"</math>":"")),B]};class z{constructor({strings:A,_$litType$:g},B){let C;this.parts=[];let E=0,e=0;const s=A.length-1,I=this.parts,[r,Y]=WA(A,g);if(this.el=z.createElement(r,B),U.currentNode=this.el.content,g===2||g===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(C=U.nextNode())!==null&&I.length<s;){if(C.nodeType===1){if(C.hasAttributes())for(const w of C.getAttributeNames())if(w.endsWith(EA)){const F=Y[e++],a=C.getAttribute(w).split(h),y=/([.?@])?(.*)/.exec(F);I.push({type:1,index:E,name:y[2],strings:a,ctor:y[1]==="."?SA:y[1]==="?"?KA:y[1]==="@"?XA:b}),C.removeAttribute(w)}else w.startsWith(h)&&(I.push({type:6,index:E}),C.removeAttribute(w));if(IA.test(C.tagName)){const w=C.textContent.split(h),F=w.length-1;if(F>0){C.textContent=R?R.emptyScript:"";for(let a=0;a<F;a++)C.append(w[a],J()),U.nextNode(),I.push({type:2,index:++E});C.append(w[F],J())}}}else if(C.nodeType===8)if(C.data===eA)I.push({type:2,index:E});else{let w=-1;for(;(w=C.data.indexOf(h,w+1))!==-1;)I.push({type:7,index:E}),w+=h.length-1}E++}}static createElement(A,g){const B=d.createElement("template");return B.innerHTML=A,B}}function P(Q,A,g=Q,B){if(A===u)return A;let C=B!==void 0?g._$Co?.[B]:g._$Cl;const E=N(A)?void 0:A._$litDirective$;return C?.constructor!==E&&(C?._$AO?.(!1),E===void 0?C=void 0:(C=new E(Q),C._$AT(Q,g,B)),B!==void 0?(g._$Co??=[])[B]=C:g._$Cl=C),C!==void 0&&(A=P(Q,C._$AS(Q,A.values),C,B)),A}class VA{constructor(A,g){this._$AV=[],this._$AN=void 0,this._$AD=A,this._$AM=g}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(A){const{el:{content:g},parts:B}=this._$AD,C=(A?.creationScope??d).importNode(g,!0);U.currentNode=C;let E=U.nextNode(),e=0,s=0,I=B[0];for(;I!==void 0;){if(e===I.index){let r;I.type===2?r=new H(E,E.nextSibling,this,A):I.type===1?r=new I.ctor(E,I.name,I.strings,this,A):I.type===6&&(r=new ZA(E,this,A)),this._$AV.push(r),I=B[++s]}e!==I?.index&&(E=U.nextNode(),e++)}return U.currentNode=d,C}p(A){let g=0;for(const B of this._$AV)B!==void 0&&(B.strings!==void 0?(B._$AI(A,B,g),g+=B.strings.length-2):B._$AI(A[g])),g++}}class H{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(A,g,B,C){this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=A,this._$AB=g,this._$AM=B,this.options=C,this._$Cv=C?.isConnected??!0}get parentNode(){let A=this._$AA.parentNode;const g=this._$AM;return g!==void 0&&A?.nodeType===11&&(A=g.parentNode),A}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(A,g=this){A=P(this,A,g),N(A)?A===M||A==null||A===""?(this._$AH!==M&&this._$AR(),this._$AH=M):A!==this._$AH&&A!==u&&this._(A):A._$litType$!==void 0?this.$(A):A.nodeType!==void 0?this.T(A):pA(A)?this.k(A):this._(A)}O(A){return this._$AA.parentNode.insertBefore(A,this._$AB)}T(A){this._$AH!==A&&(this._$AR(),this._$AH=this.O(A))}_(A){this._$AH!==M&&N(this._$AH)?this._$AA.nextSibling.data=A:this.T(d.createTextNode(A)),this._$AH=A}$(A){const{values:g,_$litType$:B}=A,C=typeof B=="number"?this._$AC(A):(B.el===void 0&&(B.el=z.createElement(tA(B.h,B.h[0]),this.options)),B);if(this._$AH?._$AD===C)this._$AH.p(g);else{const E=new VA(C,this),e=E.u(this.options);E.p(g),this.T(e),this._$AH=E}}_$AC(A){let g=BA.get(A.strings);return g===void 0&&BA.set(A.strings,g=new z(A)),g}k(A){k(this._$AH)||(this._$AH=[],this._$AR());const g=this._$AH;let B,C=0;for(const E of A)C===g.length?g.push(B=new H(this.O(J()),this.O(J()),this,this.options)):B=g[C],B._$AI(E),C++;C<g.length&&(this._$AR(B&&B._$AB.nextSibling,C),g.length=C)}_$AR(A=this._$AA.nextSibling,g){for(this._$AP?.(!1,!0,g);A!==this._$AB;){const B=A.nextSibling;A.remove(),A=B}}setConnected(A){this._$AM===void 0&&(this._$Cv=A,this._$AP?.(A))}}class b{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(A,g,B,C,E){this.type=1,this._$AH=M,this._$AN=void 0,this.element=A,this.name=g,this._$AM=C,this.options=E,B.length>2||B[0]!==""||B[1]!==""?(this._$AH=Array(B.length-1).fill(new String),this.strings=B):this._$AH=M}_$AI(A,g=this,B,C){const E=this.strings;let e=!1;if(E===void 0)A=P(this,A,g,0),e=!N(A)||A!==this._$AH&&A!==u,e&&(this._$AH=A);else{const s=A;let I,r;for(A=E[0],I=0;I<E.length-1;I++)r=P(this,s[B+I],g,I),r===u&&(r=this._$AH[I]),e||=!N(r)||r!==this._$AH[I],r===M?A=M:A!==M&&(A+=(r??"")+E[I+1]),this._$AH[I]=r}e&&!C&&this.j(A)}j(A){A===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,A??"")}}class SA extends b{constructor(){super(...arguments),this.type=3}j(A){this.element[this.name]=A===M?void 0:A}}class KA extends b{constructor(){super(...arguments),this.type=4}j(A){this.element.toggleAttribute(this.name,!!A&&A!==M)}}class XA extends b{constructor(A,g,B,C,E){super(A,g,B,C,E),this.type=5}_$AI(A,g=this){if((A=P(this,A,g,0)??M)===u)return;const B=this._$AH,C=A===M&&B!==M||A.capture!==B.capture||A.once!==B.once||A.passive!==B.passive,E=A!==M&&(B===M||C);C&&this.element.removeEventListener(this.name,this,B),E&&this.element.addEventListener(this.name,this,A),this._$AH=A}handleEvent(A){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,A):this._$AH.handleEvent(A)}}class ZA{constructor(A,g,B){this.element=A,this.type=6,this._$AN=void 0,this._$AM=g,this.options=B}get _$AU(){return this._$AM._$AU}_$AI(A){P(this,A)}}const qA=p.litHtmlPolyfillSupport;qA?.(z,H),(p.litHtmlVersions??=[]).push("3.3.1");const $A=(Q,A,g)=>{const B=g?.renderBefore??A;let C=B._$litPart$;if(C===void 0){const E=g?.renderBefore??null;B._$litPart$=C=new H(A.insertBefore(J(),E),E,void 0,g??{})}return C._$AI(Q),C};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -996,7 +996,7 @@
|
|
|
996
996
|
height: 36px;
|
|
997
997
|
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
998
998
|
}
|
|
999
|
-
`;static properties={name:{type:String},value:{type:String},disabled:{type:Boolean,reflect:!0},required:{type:Boolean,reflect:!0},error:{type:Boolean,reflect:!0},placeholder:{type:String},fullWidth:{type:Boolean,attribute:"full-width",reflect:!0},size:{type:String,reflect:!0,attribute:"size",converter:A=>["sm","md","lg"].includes(A)?A:"md"},_internals:{type:Object,attribute:!1}};constructor(){super(),this.name=void 0,this.value=void 0,this.disabled=!1,this.required=!1,this.error=!1,this.placeholder=void 0,this.fullWidth=!1,this._internals=this.attachInternals()}render(){return t`
|
|
999
|
+
`;static properties={name:{type:String},value:{type:String},disabled:{type:Boolean,reflect:!0},required:{type:Boolean,reflect:!0},items:{type:Array,reflect:!0},selectedItem:{type:String,reflect:!0,attribute:"selected-item"},error:{type:Boolean,reflect:!0},placeholder:{type:String},fullWidth:{type:Boolean,attribute:"full-width",reflect:!0},size:{type:String,reflect:!0,attribute:"size",converter:A=>["sm","md","lg"].includes(A)?A:"md"},_internals:{type:Object,attribute:!1}};constructor(){super(),this.name=void 0,this.value=void 0,this.disabled=!1,this.required=!1,this.error=!1,this.placeholder=void 0,this.fullWidth=!1,this.items=[],this.selectedItem=void 0,this._internals=this.attachInternals()}render(){return t`
|
|
1000
1000
|
<div class='container ${this.fullWidth?"full-width":""}'>
|
|
1001
1001
|
<select
|
|
1002
1002
|
name="${n(this.name)}"
|
|
@@ -1008,7 +1008,7 @@
|
|
|
1008
1008
|
@change="${this.handleChange}"
|
|
1009
1009
|
>
|
|
1010
1010
|
${this.placeholder?t`<option value="" disabled selected>${this.placeholder}</option>`:""}
|
|
1011
|
-
|
|
1011
|
+
${this.items?this.items.map(A=>t`<option .value=${A} ?selected=${this.selectedItem==A}>${A}</option>`):t`<slot></slot>`}
|
|
1012
1012
|
</select>
|
|
1013
1013
|
<cd-icon name="caret-down" class="select-icon" size='xxs'></cd-icon>
|
|
1014
1014
|
</div>
|
|
@@ -1190,7 +1190,7 @@
|
|
|
1190
1190
|
|
|
1191
1191
|
</div>
|
|
1192
1192
|
|
|
1193
|
-
`}firstUpdated(){this.shadowRoot.querySelectorAll("cd-icon").forEach(A=>{A.addEventListener("keydown",g=>{g.key==="Enter"&&(A.click(),g.preventDefault())})})}goToPage(A){A<1||A>this.totalPages||(this.currentPage=A,this.dispatchEvent(new CustomEvent("page-changed",{detail:{page:this.currentPage},bubbles:!0,composed:!0})))}nextPage(){this.currentPage<this.totalPages&&this.goToPage(this.currentPage+1),this.dispatchEvent(new CustomEvent("page-changed",{detail:{page:this.currentPage},bubbles:!0,composed:!0}))}previousPage(){this.currentPage>1&&this.goToPage(this.currentPage-1),this.dispatchEvent(new CustomEvent("page-changed",{detail:{page:this.currentPage},bubbles:!0,composed:!0}))}}function NA(){typeof window<"u"&&!customElements.get("cd-pagination")&&customElements.define("cd-pagination",JA)}NA();vA();class
|
|
1193
|
+
`}firstUpdated(){this.shadowRoot.querySelectorAll("cd-icon").forEach(A=>{A.addEventListener("keydown",g=>{g.key==="Enter"&&(A.click(),g.preventDefault())})})}goToPage(A){A<1||A>this.totalPages||(this.currentPage=A,this.dispatchEvent(new CustomEvent("page-changed",{detail:{page:this.currentPage},bubbles:!0,composed:!0})))}nextPage(){this.currentPage<this.totalPages&&this.goToPage(this.currentPage+1),this.dispatchEvent(new CustomEvent("page-changed",{detail:{page:this.currentPage},bubbles:!0,composed:!0}))}previousPage(){this.currentPage>1&&this.goToPage(this.currentPage-1),this.dispatchEvent(new CustomEvent("page-changed",{detail:{page:this.currentPage},bubbles:!0,composed:!0}))}}function NA(){typeof window<"u"&&!customElements.get("cd-pagination")&&customElements.define("cd-pagination",JA)}NA();vA();class zA extends o{static styles=i`
|
|
1194
1194
|
@font-face {
|
|
1195
1195
|
font-family: 'Geist';
|
|
1196
1196
|
src: url(${D(c)}) format('woff');
|
|
@@ -1233,15 +1233,14 @@
|
|
|
1233
1233
|
<div class="page-size">
|
|
1234
1234
|
<div class="page-select">
|
|
1235
1235
|
<span class="label">${this.label}</span>
|
|
1236
|
+
<cd-select full-width style="--input-width: 100%;" .items=${this.sizes} selected-item="${this.size}">
|
|
1236
1237
|
|
|
1237
|
-
<cd-select full-width style="--input-width: 100%;">
|
|
1238
|
-
${this.sizes.map(A=>t`<option value="${A}" ?selected="${this.size===A}">${A}</option>`)}
|
|
1239
1238
|
</cd-select>
|
|
1240
1239
|
|
|
1241
1240
|
</div>
|
|
1242
|
-
<span class="total-items"><span class="page-number"> ${this.range} </span> of <span class="page-number">${this.totalItems}</span> items</span>
|
|
1241
|
+
<span class="total-items"><span class="page-number page-range"> ${this.range} </span> of <span class="page-number">${this.totalItems}</span> items</span>
|
|
1243
1242
|
|
|
1244
1243
|
<cd-pagination skip-to-end skip-to-start></cd-pagination>
|
|
1245
1244
|
</div>
|
|
1246
|
-
`}firstUpdated(){this.shadowRoot.querySelector("cd-pagination").totalPages=this.totalItems>0?Math.ceil(this.totalItems/this.size):0,this.shadowRoot.querySelector("cd-select").addEventListener("change",A=>{this.size=Number(A.target.value),this.range=`${(this.shadowRoot.querySelector("cd-pagination").currentPage-1)*this.size+1} - ${Math.min(this.shadowRoot.querySelector("cd-pagination").currentPage*this.size,this.totalItems)}`,(this.shadowRoot.querySelector("cd-pagination").currentPage-1)*this.size+1>this.totalItems&&(this.range=`${(Math.ceil(this.totalItems/this.size)-1)*this.size+1} - ${this.totalItems}`),this.shadowRoot.querySelector("cd-pagination").totalPages=this.totalItems>0?Math.ceil(this.totalItems/this.size):0,this.shadowRoot.querySelector("cd-pagination").currentPage>this.shadowRoot.querySelector("cd-pagination").totalPages&&(this.shadowRoot.querySelector("cd-pagination").currentPage=this.shadowRoot.querySelector("cd-pagination").totalPages),this.dispatchEvent(new CustomEvent("size-changed",{detail:{size:this.size},bubbles:!0,composed:!0}))}),this.shadowRoot.querySelector("cd-pagination").addEventListener("page-changed",A=>{console.log("Page changed to:",A.detail.page),this.range=`${(A.detail.page-1)*this.size+1} - ${Math.min(A.detail.page*this.size,this.totalItems)}`,console.log(this.range)})}setSize(A){this.sizes.includes(A)?(this.size=A,this.shadowRoot.querySelector("cd-select").value=A,this.shadowRoot.querySelector("cd-select").dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("size-changed",{detail:{size:this.size},bubbles:!0,composed:!0}))):console.warn(`Size ${A} is not in the available sizes.`)}}function cg(){typeof window<"u"&&!customElements.get("cd-page-size")&&customElements.define("cd-page-size",
|
|
1245
|
+
`}firstUpdated(){console.log(this.sizes),this.sizes.includes(this.size)||(this.sizes=[...new Set([...this.sizes,this.size])].sort((A,g)=>A-g),this.range=`1 - ${this.size}`),this.shadowRoot.querySelector("cd-pagination").totalPages=this.totalItems>0?Math.ceil(this.totalItems/this.size):0,this.shadowRoot.querySelector("cd-select").addEventListener("change",A=>{this.size=Number(A.target.value),this.range=`${(this.shadowRoot.querySelector("cd-pagination").currentPage-1)*this.size+1} - ${Math.min(this.shadowRoot.querySelector("cd-pagination").currentPage*this.size,this.totalItems)}`,(this.shadowRoot.querySelector("cd-pagination").currentPage-1)*this.size+1>this.totalItems&&(this.range=`${(Math.ceil(this.totalItems/this.size)-1)*this.size+1} - ${this.totalItems}`),this.shadowRoot.querySelector("cd-pagination").totalPages=this.totalItems>0?Math.ceil(this.totalItems/this.size):0,this.shadowRoot.querySelector("cd-pagination").currentPage>this.shadowRoot.querySelector("cd-pagination").totalPages&&(this.shadowRoot.querySelector("cd-pagination").currentPage=this.shadowRoot.querySelector("cd-pagination").totalPages),this.dispatchEvent(new CustomEvent("size-changed",{detail:{size:this.size},bubbles:!0,composed:!0}))}),this.shadowRoot.querySelector("cd-pagination").addEventListener("page-changed",A=>{console.log("Page changed to:",A.detail.page),this.range=`${(A.detail.page-1)*this.size+1} - ${Math.min(A.detail.page*this.size,this.totalItems)}`,console.log(this.range)})}setSize(A){this.sizes.includes(A)?(this.size=A,this.shadowRoot.querySelector("cd-select").value=A,this.shadowRoot.querySelector("cd-select").dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("size-changed",{detail:{size:this.size},bubbles:!0,composed:!0}))):console.warn(`Size ${A} is not in the available sizes.`)}}function cg(){typeof window<"u"&&!customElements.get("cd-page-size")&&customElements.define("cd-page-size",zA)}exports.Badge=oA;exports.Body=wA;exports.Checkbox=aA;exports.Counter=cA;exports.DataObject=DA;exports.ErrorMessage=dA;exports.FlexContainer=FA;exports.Icon=iA;exports.Informational=hA;exports.Key=YA;exports.KeyValue=sA;exports.Label=UA;exports.NavImage=MA;exports.PageSize=zA;exports.Pagination=JA;exports.Radio=uA;exports.Select=PA;exports.Spinner=nA;exports.Tag=GA;exports.Textarea=fA;exports.fontURL=c;exports.fontURL$1=rA;exports.i=o;exports.i$1=i;exports.o=n;exports.r=D;exports.registerBadge=Ag;exports.registerBody=gg;exports.registerCheckbox=wg;exports.registerCounter=eg;exports.registerDataObject=Bg;exports.registerErrorMessage=ig;exports.registerFlexContainer=og;exports.registerIcon=V;exports.registerInformational=lA;exports.registerKey=Ig;exports.registerKeyValue=Qg;exports.registerLabel=Dg;exports.registerNavImage=Eg;exports.registerPageSize=cg;exports.registerPagination=NA;exports.registerRadio=Mg;exports.registerSelect=vA;exports.registerSpinner=tg;exports.registerTag=sg;exports.registerTextarea=rg;exports.x=t;
|
|
1247
1246
|
//# sourceMappingURL=index.cjs.js.map
|