@cargosense/cargo-design-system 1.0.17 → 1.0.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/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 i=Q=>new CA(typeof Q=="string"?Q:Q+"",void 0,m),D=(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 i=Q=>new CA(typeof Q=="string"?Q:Q+"",void 0,m),D=(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)},yA=(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 i(g)})(Q):Q;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:HA,defineProperty:jA,getOwnPropertyDescriptor:bA,getOwnPropertyNames:RA,getOwnPropertySymbols:xA,getPrototypeOf:TA}=Object,R=globalThis,X=R.trustedTypes,OA=X?X.emptyScript:"",LA=R.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)=>!HA(Q,A),Z={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:QA};Symbol.metadata??=Symbol("metadata"),R.litPropertyMetadata??=new WeakMap;let u=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}=bA(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=[...RA(g),...xA(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 yA(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){}};u.elementStyles=[],u.shadowRootOptions={mode:"open"},u[f("elementProperties")]=new Map,u[f("finalized")]=new Map,LA?.({ReactiveElement:u}),(R.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,b=p.trustedTypes,q=b?b.createPolicy("lit-html",{createHTML:Q=>Q}):void 0,eA="$lit$",l=`lit$${Math.random().toFixed(9).slice(2)}$`,EA="?"+l,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,h=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}),
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),AA=/'/g,gA=/"/g,IA=/^(?:script|style|textarea|title)$/i,kA=Q=>(A,...g)=>({_$litType$:Q,strings:A,values:g}),I=kA(1),G=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 t=Q[s];let r,n,w=-1,F=0;for(;F<t.length&&(E.lastIndex=F,n=E.exec(t),n!==null);)F=E.lastIndex,E===v?n[1]==="!--"?E=$:n[1]!==void 0?E=_:n[2]!==void 0?(IA.test(n[2])&&(C=RegExp("</"+n[2],"g")),E=h):n[3]!==void 0&&(E=h):E===h?n[0]===">"?(E=C??v,w=-1):n[1]===void 0?w=-2:(w=E.lastIndex-n[2].length,r=n[1],E=n[3]===void 0?h:n[3]==='"'?gA:AA):E===gA||E===AA?E=h:E===$||E===_?E=v:(E=h,C=void 0);const a=E===h&&Q[s+1].startsWith("/>")?" ":"";e+=E===v?t+mA:w>=0?(B.push(r),t.slice(0,w)+eA+t.slice(w)+l+a):t+l+(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,t=this.parts,[r,n]=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&&t.length<s;){if(C.nodeType===1){if(C.hasAttributes())for(const w of C.getAttributeNames())if(w.endsWith(eA)){const F=n[E++],a=C.getAttribute(w).split(l),H=/([.?@])?(.*)/.exec(F);t.push({type:1,index:e,name:H[2],strings:a,ctor:H[1]==="."?SA:H[1]==="?"?KA:H[1]==="@"?XA:x}),C.removeAttribute(w)}else w.startsWith(l)&&(t.push({type:6,index:e}),C.removeAttribute(w));if(IA.test(C.tagName)){const w=C.textContent.split(l),F=w.length-1;if(F>0){C.textContent=b?b.emptyScript:"";for(let a=0;a<F;a++)C.append(w[a],J()),U.nextNode(),t.push({type:2,index:++e});C.append(w[F],J())}}}else if(C.nodeType===8)if(C.data===EA)t.push({type:2,index:e});else{let w=-1;for(;(w=C.data.indexOf(l,w+1))!==-1;)t.push({type:7,index:e}),w+=l.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===G)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,t=B[0];for(;t!==void 0;){if(E===t.index){let r;t.type===2?r=new y(e,e.nextSibling,this,A):t.type===1?r=new t.ctor(e,t.name,t.strings,this,A):t.type===6&&(r=new ZA(e,this,A)),this._$AV.push(r),t=B[++s]}E!==t?.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 y{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!==G&&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 y(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 x{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!==G,E&&(this._$AH=A);else{const s=A;let t,r;for(A=e[0],t=0;t<e.length-1;t++)r=P(this,s[B+t],g,t),r===G&&(r=this._$AH[t]),E||=!N(r)||r!==this._$AH[t],r===M?A=M:A!==M&&(A+=(r??"")+e[t+1]),this._$AH[t]=r}E&&!C&&this.j(A)}j(A){A===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,A??"")}}class SA extends x{constructor(){super(...arguments),this.type=3}j(A){this.element[this.name]=A===M?void 0:A}}class KA extends x{constructor(){super(...arguments),this.type=4}j(A){this.element.toggleAttribute(this.name,!!A&&A!==M)}}class XA extends x{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)===G)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,y),(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 y(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
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
.none::before {
|
|
68
68
|
content: none;
|
|
69
69
|
}
|
|
70
|
-
`;static properties={status:{type:String,reflect:!0,attribute:"status",defaultValue:"none"}};constructor(){super(),this.status="none"}render(){return
|
|
70
|
+
`;static properties={status:{type:String,reflect:!0,attribute:"status",defaultValue:"none"}};constructor(){super(),this.status="none"}render(){return I`
|
|
71
71
|
<span class="badge ${this.status}">
|
|
72
72
|
<slot></slot>
|
|
73
73
|
</span>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
max-width: 100%;
|
|
115
115
|
max-height: 100%;
|
|
116
116
|
}
|
|
117
|
-
`;static properties={fitContent:{type:Boolean,reflect:!0,attribute:"fit-content"}};constructor(){super(),this.fitContent=!1}render(){return
|
|
117
|
+
`;static properties={fitContent:{type:Boolean,reflect:!0,attribute:"fit-content"}};constructor(){super(),this.fitContent=!1}render(){return I`
|
|
118
118
|
<div class="body${this.fitContent?" fit-content":""}">
|
|
119
119
|
<div class="content">
|
|
120
120
|
<slot><slot>
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
* @license
|
|
125
125
|
* Copyright 2018 Google LLC
|
|
126
126
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
127
|
-
*/const
|
|
127
|
+
*/const Y=Q=>Q??M;class iA extends o{static styles=D`
|
|
128
128
|
@font-face {
|
|
129
129
|
font-family: 'Geist';
|
|
130
130
|
src: url(${i(c)}) format('woff');
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
text-decoration: none;
|
|
164
164
|
color: inherit;
|
|
165
165
|
}
|
|
166
|
-
`;static properties={link:{type:String,reflect:!0}};constructor(){super(),this.variant="",this.link=void 0}render(){return
|
|
167
|
-
<a href="${
|
|
166
|
+
`;static properties={link:{type:String,reflect:!0}};constructor(){super(),this.variant="",this.link=void 0}render(){return I`
|
|
167
|
+
<a href="${Y(this.link)}" class="default ${this.variant}" tabindex="0">
|
|
168
168
|
<slot name="start"></slot>
|
|
169
169
|
<slot></slot>
|
|
170
170
|
<slot name="end"></slot>
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
height: 64px;
|
|
231
231
|
width: 64px;
|
|
232
232
|
}
|
|
233
|
-
`;static properties={name:{type:String,reflect:!0},size:{type:String,reflect:!0,attribute:"size",converter:A=>["xxs","xs","sm","md","lg","xl","xxl"].includes(A)?A:"md"},variant:{type:String,reflect:!0,attribute:"variant",converter:A=>["default","light-slate","dark","flat-teal"].includes(A)?A:"default"},color:{type:String,reflect:!0,attribute:"color"}};loadedIcon="";updated(A){super.updated(A),A.has("name")&&this.loadIcon()}async loadIcon(){try{let A=this.name.toLowerCase(),g=await Cg(Object.assign({"../../icons/add-circle.svg":()=>Promise.resolve().then(()=>require("./add-circle.cjs.js")),"../../icons/air.svg":()=>Promise.resolve().then(()=>require("./air.cjs.js")),"../../icons/api.svg":()=>Promise.resolve().then(()=>require("./api.cjs.js")),"../../icons/arrow.svg":()=>Promise.resolve().then(()=>require("./arrow.cjs.js")),"../../icons/browser-settings.svg":()=>Promise.resolve().then(()=>require("./browser-settings.cjs.js")),"../../icons/caret-down.svg":()=>Promise.resolve().then(()=>require("./caret-down.cjs.js")),"../../icons/caret-end-mini-down.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-down.cjs.js")),"../../icons/caret-end-mini-left.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-left.cjs.js")),"../../icons/caret-end-mini-right.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-right.cjs.js")),"../../icons/caret-end-mini-up.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-up.cjs.js")),"../../icons/caret-mini-down.svg":()=>Promise.resolve().then(()=>require("./caret-mini-down.cjs.js")),"../../icons/caret-mini-left.svg":()=>Promise.resolve().then(()=>require("./caret-mini-left.cjs.js")),"../../icons/caret-mini-right.svg":()=>Promise.resolve().then(()=>require("./caret-mini-right.cjs.js")),"../../icons/caret-mini-up.svg":()=>Promise.resolve().then(()=>require("./caret-mini-up.cjs.js")),"../../icons/check.svg":()=>Promise.resolve().then(()=>require("./check.cjs.js")),"../../icons/configuration.svg":()=>Promise.resolve().then(()=>require("./configuration.cjs.js")),"../../icons/copy.svg":()=>Promise.resolve().then(()=>require("./copy.cjs.js")),"../../icons/cost.svg":()=>Promise.resolve().then(()=>require("./cost.cjs.js")),"../../icons/document.svg":()=>Promise.resolve().then(()=>require("./document.cjs.js")),"../../icons/exception.svg":()=>Promise.resolve().then(()=>require("./exception.cjs.js")),"../../icons/exit.svg":()=>Promise.resolve().then(()=>require("./exit.cjs.js")),"../../icons/external.svg":()=>Promise.resolve().then(()=>require("./external.cjs.js")),"../../icons/gps-device.svg":()=>Promise.resolve().then(()=>require("./gps-device.cjs.js")),"../../icons/hart.svg":()=>Promise.resolve().then(()=>require("./hart.cjs.js")),"../../icons/insights.svg":()=>Promise.resolve().then(()=>require("./insights.cjs.js")),"../../icons/integration.svg":()=>Promise.resolve().then(()=>require("./integration.cjs.js")),"../../icons/inventory.svg":()=>Promise.resolve().then(()=>require("./inventory.cjs.js")),"../../icons/issue.svg":()=>Promise.resolve().then(()=>require("./issue.cjs.js")),"../../icons/it.svg":()=>Promise.resolve().then(()=>require("./it.cjs.js")),"../../icons/logistics-contract.svg":()=>Promise.resolve().then(()=>require("./logistics-contract.cjs.js")),"../../icons/ocean.svg":()=>Promise.resolve().then(()=>require("./ocean.cjs.js")),"../../icons/package-with-qr.svg":()=>Promise.resolve().then(()=>require("./package-with-qr.cjs.js")),"../../icons/package.svg":()=>Promise.resolve().then(()=>require("./package.cjs.js")),"../../icons/phone-with-qr.svg":()=>Promise.resolve().then(()=>require("./phone-with-qr.cjs.js")),"../../icons/ping.svg":()=>Promise.resolve().then(()=>require("./ping.cjs.js")),"../../icons/playbook.svg":()=>Promise.resolve().then(()=>require("./playbook.cjs.js")),"../../icons/plus.svg":()=>Promise.resolve().then(()=>require("./plus.cjs.js")),"../../icons/pm.svg":()=>Promise.resolve().then(()=>require("./pm.cjs.js")),"../../icons/qr-code.svg":()=>Promise.resolve().then(()=>require("./qr-code.cjs.js")),"../../icons/search.svg":()=>Promise.resolve().then(()=>require("./search.cjs.js")),"../../icons/sensors.svg":()=>Promise.resolve().then(()=>require("./sensors.cjs.js")),"../../icons/server.svg":()=>Promise.resolve().then(()=>require("./server.cjs.js")),"../../icons/sustainablity.svg":()=>Promise.resolve().then(()=>require("./sustainablity.cjs.js")),"../../icons/task-list.svg":()=>Promise.resolve().then(()=>require("./task-list.cjs.js")),"../../icons/temperature-device.svg":()=>Promise.resolve().then(()=>require("./temperature-device.cjs.js")),"../../icons/truck.svg":()=>Promise.resolve().then(()=>require("./truck.cjs.js")),"../../icons/users.svg":()=>Promise.resolve().then(()=>require("./users.cjs.js")),"../../icons/warehouse.svg":()=>Promise.resolve().then(()=>require("./warehouse.cjs.js")),"../../icons/water-device.svg":()=>Promise.resolve().then(()=>require("./water-device.cjs.js"))}),`../../icons/${A}.svg`,4);console.log(`Loading icon: ${A}.svg`),this.loadedIcon=g.default||g,this.loadedIcon=this.loadedIcon.replace(/height="[^"]*"/,"").replace(/width="[^"]*"/,""),this.loadedIcon=this.loadedIcon.replace(/stroke="([^"]*)"/g,'stroke="var(--icon-stroke, $1)"'),this.loadedIcon=this.loadedIcon.replace(/stroke-width="4"/g,'stroke-width="var(--icon-stroke-width-primary, 4)"'),this.loadedIcon=this.loadedIcon.replace(/stroke-width="3"/g,'stroke-width="var(--icon-stroke-width-secondary, 3)"'),this.loadedIcon=this.loadedIcon.replace(/fill="white"/g,'fill="var(--icon-background-page, white)"'),this.loadedIcon=this.loadedIcon.replace(/fill="#6DDAC6"/g,'fill="var(--icon-background-primary, #6DDAC6)"'),this.loadedIcon=this.loadedIcon.replace(/fill="#B1E9DF"/g,'fill="var(--icon-background-secondary, #B1E9DF)"'),this.requestUpdate()}catch{console.log(`Icon "${this.name}" not found.`),this.loadedIcon="<!-- Icon not found -->"}}constructor(){super(),this.name="",this.size="md"}render(){return
|
|
233
|
+
`;static properties={name:{type:String,reflect:!0},size:{type:String,reflect:!0,attribute:"size",converter:A=>["xxs","xs","sm","md","lg","xl","xxl"].includes(A)?A:"md"},variant:{type:String,reflect:!0,attribute:"variant",converter:A=>["default","light-slate","dark","flat-teal"].includes(A)?A:"default"},color:{type:String,reflect:!0,attribute:"color"}};loadedIcon="";updated(A){super.updated(A),A.has("name")&&this.loadIcon()}async loadIcon(){try{let A=this.name.toLowerCase(),g=await Cg(Object.assign({"../../icons/add-circle.svg":()=>Promise.resolve().then(()=>require("./add-circle.cjs.js")),"../../icons/air.svg":()=>Promise.resolve().then(()=>require("./air.cjs.js")),"../../icons/api.svg":()=>Promise.resolve().then(()=>require("./api.cjs.js")),"../../icons/arrow.svg":()=>Promise.resolve().then(()=>require("./arrow.cjs.js")),"../../icons/browser-settings.svg":()=>Promise.resolve().then(()=>require("./browser-settings.cjs.js")),"../../icons/caret-down.svg":()=>Promise.resolve().then(()=>require("./caret-down.cjs.js")),"../../icons/caret-end-mini-down.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-down.cjs.js")),"../../icons/caret-end-mini-left.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-left.cjs.js")),"../../icons/caret-end-mini-right.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-right.cjs.js")),"../../icons/caret-end-mini-up.svg":()=>Promise.resolve().then(()=>require("./caret-end-mini-up.cjs.js")),"../../icons/caret-mini-down.svg":()=>Promise.resolve().then(()=>require("./caret-mini-down.cjs.js")),"../../icons/caret-mini-left.svg":()=>Promise.resolve().then(()=>require("./caret-mini-left.cjs.js")),"../../icons/caret-mini-right.svg":()=>Promise.resolve().then(()=>require("./caret-mini-right.cjs.js")),"../../icons/caret-mini-up.svg":()=>Promise.resolve().then(()=>require("./caret-mini-up.cjs.js")),"../../icons/check.svg":()=>Promise.resolve().then(()=>require("./check.cjs.js")),"../../icons/configuration.svg":()=>Promise.resolve().then(()=>require("./configuration.cjs.js")),"../../icons/copy.svg":()=>Promise.resolve().then(()=>require("./copy.cjs.js")),"../../icons/cost.svg":()=>Promise.resolve().then(()=>require("./cost.cjs.js")),"../../icons/document.svg":()=>Promise.resolve().then(()=>require("./document.cjs.js")),"../../icons/exception.svg":()=>Promise.resolve().then(()=>require("./exception.cjs.js")),"../../icons/exit.svg":()=>Promise.resolve().then(()=>require("./exit.cjs.js")),"../../icons/external.svg":()=>Promise.resolve().then(()=>require("./external.cjs.js")),"../../icons/gps-device.svg":()=>Promise.resolve().then(()=>require("./gps-device.cjs.js")),"../../icons/hart.svg":()=>Promise.resolve().then(()=>require("./hart.cjs.js")),"../../icons/insights.svg":()=>Promise.resolve().then(()=>require("./insights.cjs.js")),"../../icons/integration.svg":()=>Promise.resolve().then(()=>require("./integration.cjs.js")),"../../icons/inventory.svg":()=>Promise.resolve().then(()=>require("./inventory.cjs.js")),"../../icons/issue.svg":()=>Promise.resolve().then(()=>require("./issue.cjs.js")),"../../icons/it.svg":()=>Promise.resolve().then(()=>require("./it.cjs.js")),"../../icons/logistics-contract.svg":()=>Promise.resolve().then(()=>require("./logistics-contract.cjs.js")),"../../icons/ocean.svg":()=>Promise.resolve().then(()=>require("./ocean.cjs.js")),"../../icons/package-with-qr.svg":()=>Promise.resolve().then(()=>require("./package-with-qr.cjs.js")),"../../icons/package.svg":()=>Promise.resolve().then(()=>require("./package.cjs.js")),"../../icons/phone-with-qr.svg":()=>Promise.resolve().then(()=>require("./phone-with-qr.cjs.js")),"../../icons/ping.svg":()=>Promise.resolve().then(()=>require("./ping.cjs.js")),"../../icons/playbook.svg":()=>Promise.resolve().then(()=>require("./playbook.cjs.js")),"../../icons/plus.svg":()=>Promise.resolve().then(()=>require("./plus.cjs.js")),"../../icons/pm.svg":()=>Promise.resolve().then(()=>require("./pm.cjs.js")),"../../icons/qr-code.svg":()=>Promise.resolve().then(()=>require("./qr-code.cjs.js")),"../../icons/search.svg":()=>Promise.resolve().then(()=>require("./search.cjs.js")),"../../icons/sensors.svg":()=>Promise.resolve().then(()=>require("./sensors.cjs.js")),"../../icons/server.svg":()=>Promise.resolve().then(()=>require("./server.cjs.js")),"../../icons/sustainablity.svg":()=>Promise.resolve().then(()=>require("./sustainablity.cjs.js")),"../../icons/task-list.svg":()=>Promise.resolve().then(()=>require("./task-list.cjs.js")),"../../icons/temperature-device.svg":()=>Promise.resolve().then(()=>require("./temperature-device.cjs.js")),"../../icons/truck.svg":()=>Promise.resolve().then(()=>require("./truck.cjs.js")),"../../icons/users.svg":()=>Promise.resolve().then(()=>require("./users.cjs.js")),"../../icons/warehouse.svg":()=>Promise.resolve().then(()=>require("./warehouse.cjs.js")),"../../icons/water-device.svg":()=>Promise.resolve().then(()=>require("./water-device.cjs.js"))}),`../../icons/${A}.svg`,4);console.log(`Loading icon: ${A}.svg`),this.loadedIcon=g.default||g,this.loadedIcon=this.loadedIcon.replace(/height="[^"]*"/,"").replace(/width="[^"]*"/,""),this.loadedIcon=this.loadedIcon.replace(/stroke="([^"]*)"/g,'stroke="var(--icon-stroke, $1)"'),this.loadedIcon=this.loadedIcon.replace(/stroke-width="4"/g,'stroke-width="var(--icon-stroke-width-primary, 4)"'),this.loadedIcon=this.loadedIcon.replace(/stroke-width="3"/g,'stroke-width="var(--icon-stroke-width-secondary, 3)"'),this.loadedIcon=this.loadedIcon.replace(/fill="white"/g,'fill="var(--icon-background-page, white)"'),this.loadedIcon=this.loadedIcon.replace(/fill="#6DDAC6"/g,'fill="var(--icon-background-primary, #6DDAC6)"'),this.loadedIcon=this.loadedIcon.replace(/fill="#B1E9DF"/g,'fill="var(--icon-background-secondary, #B1E9DF)"'),this.requestUpdate()}catch{console.log(`Icon "${this.name}" not found.`),this.loadedIcon="<!-- Icon not found -->"}}constructor(){super(),this.name="",this.size="md"}render(){return I`
|
|
234
234
|
<div style="${this.color!=null?"--icon-stroke: "+this.color:""}" class='${this.color!=null?"transparent":""} ${this.size} ${this.variant}' .innerHTML='${this.loadedIcon}'><div>
|
|
235
235
|
`}}function V(){typeof window<"u"&&!customElements.get("cd-icon")&&customElements.define("cd-icon",DA)}class sA extends o{static styles=D`
|
|
236
236
|
@font-face {
|
|
@@ -260,10 +260,10 @@
|
|
|
260
260
|
font-weight: var(--key-value-value-font-weight);
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
`;static properties={key:{type:String,reflect:!0},value:{type:String,reflect:!0}};constructor(){super(),this.key="",this.value=""}render(){return
|
|
263
|
+
`;static properties={key:{type:String,reflect:!0},value:{type:String,reflect:!0}};constructor(){super(),this.key="",this.value=""}render(){return I`
|
|
264
264
|
<div class="key-value">
|
|
265
265
|
<span class="key">${this.key}</span>
|
|
266
|
-
${this.value===""?
|
|
266
|
+
${this.value===""?I`<slot class="value"></slot>`:I`<span class="value">${this.value}</span>`}
|
|
267
267
|
</div>
|
|
268
268
|
`}}function Qg(){typeof window<"u"&&!customElements.get("cd-key-value")&&customElements.define("cd-key-value",sA)}class MA extends o{static styles=D`
|
|
269
269
|
@font-face {
|
|
@@ -293,8 +293,8 @@
|
|
|
293
293
|
width: auto;
|
|
294
294
|
vertical-align: middle;
|
|
295
295
|
}
|
|
296
|
-
`;static properties={src:{type:String,reflect:!0,attribute:"src",defaultValue:""},alt:{type:String,reflect:!0,attribute:"alt",defaultValue:""},name:{type:String,reflect:!0,attribute:"name",defaultValue:""},link:{type:String,reflect:!0,attribute:"link"}};constructor(){super(),this.link=void 0}render(){return
|
|
297
|
-
<a href="${
|
|
296
|
+
`;static properties={src:{type:String,reflect:!0,attribute:"src",defaultValue:""},alt:{type:String,reflect:!0,attribute:"alt",defaultValue:""},name:{type:String,reflect:!0,attribute:"name",defaultValue:""},link:{type:String,reflect:!0,attribute:"link"}};constructor(){super(),this.link=void 0}render(){return I`
|
|
297
|
+
<a href="${Y(this.link)}" class="navImage">
|
|
298
298
|
<img src="${this.src}" alt="${this.alt}" />
|
|
299
299
|
<span>${this.name}</span>
|
|
300
300
|
</a>
|
|
@@ -322,11 +322,11 @@
|
|
|
322
322
|
background-color: var(--notification-counter-important-background-color, #D97E28);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
`;incrementCount(){this.count=Math.min(this.count+1,this.maxCount)}decrementCount(){this.count=Math.max(this.count-1,0)}resetCount(){this.count=0}static properties={count:{type:Number,reflect:!0,attribute:"count"},maxCount:{type:Number,reflect:!0,attribute:"max-count"},important:{type:Boolean,reflect:!0,attribute:"important"}};constructor(){super(),this.count=0,this.maxCount=99,this.important=!1}render(){return
|
|
325
|
+
`;incrementCount(){this.count=Math.min(this.count+1,this.maxCount)}decrementCount(){this.count=Math.max(this.count-1,0)}resetCount(){this.count=0}static properties={count:{type:Number,reflect:!0,attribute:"count"},maxCount:{type:Number,reflect:!0,attribute:"max-count"},important:{type:Boolean,reflect:!0,attribute:"important"}};constructor(){super(),this.count=0,this.maxCount=99,this.important=!1}render(){return I`
|
|
326
326
|
<span class="notification-counter ${this.important?"important":""}">
|
|
327
327
|
${this.count>this.maxCount?`${this.maxCount}+`:this.count}
|
|
328
328
|
</span>
|
|
329
|
-
`}}function Eg(){typeof window<"u"&&!customElements.get("cd-counter")&&customElements.define("cd-counter",cA)}class
|
|
329
|
+
`}}function Eg(){typeof window<"u"&&!customElements.get("cd-counter")&&customElements.define("cd-counter",cA)}class nA extends o{static styles=D`
|
|
330
330
|
@font-face {
|
|
331
331
|
font-family: 'Geist';
|
|
332
332
|
src: url(${i(c)}) format('woff');
|
|
@@ -339,9 +339,9 @@
|
|
|
339
339
|
font-weight: var(--key-value-label-font-weight);
|
|
340
340
|
font-size: var(--key-value-font-size, 14px);
|
|
341
341
|
}
|
|
342
|
-
`;static properties={key:{type:String,reflect:!0}};constructor(){super(),this.key=""}render(){return
|
|
342
|
+
`;static properties={key:{type:String,reflect:!0}};constructor(){super(),this.key=""}render(){return I`
|
|
343
343
|
<span class="key"><slot></slot></span>
|
|
344
|
-
`}}function Ig(){typeof window<"u"&&!customElements.get("cd-key")&&customElements.define("cd-key",
|
|
344
|
+
`}}function Ig(){typeof window<"u"&&!customElements.get("cd-key")&&customElements.define("cd-key",nA)}class YA extends o{static styles=D`
|
|
345
345
|
@font-face {
|
|
346
346
|
font-family: 'Geist';
|
|
347
347
|
src: url(${i("fonts/Geist-Regular.woff")}) format('woff');
|
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
transform: rotate(360deg);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
`;static properties={size:{type:String,reflect:!0,attribute:"size",converter:A=>["sm","md","lg"].includes(A)?A:"md",defaultValue:"md"},color:{type:String,reflect:!0,attribute:"color",converter:A=>["default","classic","secondary"].includes(A)?A:"default",defaultValue:"default"},ariaLabel:{type:String,reflect:!0,attribute:"aria-label",defaultValue:"Loading"}};constructor(){super(),this.size="md",this.color="default"}render(){return
|
|
394
|
+
`;static properties={size:{type:String,reflect:!0,attribute:"size",converter:A=>["sm","md","lg"].includes(A)?A:"md",defaultValue:"md"},color:{type:String,reflect:!0,attribute:"color",converter:A=>["default","classic","secondary"].includes(A)?A:"default",defaultValue:"default"},ariaLabel:{type:String,reflect:!0,attribute:"aria-label",defaultValue:"Loading"}};constructor(){super(),this.size="md",this.color="default"}render(){return I`
|
|
395
395
|
<div class="${this.size} ${this.color}" aria-label=${this.ariaLabel}>
|
|
396
396
|
<svg class="spinner" viewBox="0 0 50 50" width="40" height="40">
|
|
397
397
|
<circle
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
/>
|
|
407
407
|
</svg>
|
|
408
408
|
</div>
|
|
409
|
-
`}}function tg(){typeof window<"u"&&!customElements.get("cd-spinner")&&customElements.define("cd-spinner",
|
|
409
|
+
`}}function tg(){typeof window<"u"&&!customElements.get("cd-spinner")&&customElements.define("cd-spinner",YA)}class FA extends o{static styles=D`
|
|
410
410
|
@font-face {
|
|
411
411
|
font-family: 'Geist';
|
|
412
412
|
src: url(${i(c)}) format('woff');
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
width: 100%;
|
|
421
421
|
height: 100%;
|
|
422
422
|
}
|
|
423
|
-
`;static properties={direction:{type:String,reflect:!0,attribute:"direction",converter:{fromAttribute(A){return A||"column"},toAttribute(A){return A}}},align:{type:String,reflect:!0,attribute:"align",converter:{fromAttribute(A){return A||"stretch"},toAttribute(A){return A}}},gap:{type:String,reflect:!0,attribute:"gap",converter:{fromAttribute(A){return A||"0px"},toAttribute(A){return A}}},justify:{type:String,reflect:!0,attribute:"justify",converter:{fromAttribute(A){return A||"flex-start"},toAttribute(A){return A}}}};constructor(){super()}render(){return
|
|
423
|
+
`;static properties={direction:{type:String,reflect:!0,attribute:"direction",converter:{fromAttribute(A){return A||"column"},toAttribute(A){return A}}},align:{type:String,reflect:!0,attribute:"align",converter:{fromAttribute(A){return A||"stretch"},toAttribute(A){return A}}},gap:{type:String,reflect:!0,attribute:"gap",converter:{fromAttribute(A){return A||"0px"},toAttribute(A){return A}}},justify:{type:String,reflect:!0,attribute:"justify",converter:{fromAttribute(A){return A||"flex-start"},toAttribute(A){return A}}}};constructor(){super()}render(){return I`
|
|
424
424
|
<div class="container" style="flex-direction: ${this.direction}; align-items: ${this.align}; gap: ${this.gap}; justify-content: ${this.justify};">
|
|
425
425
|
<slot></slot>
|
|
426
426
|
</div>
|
|
@@ -576,16 +576,16 @@
|
|
|
576
576
|
outline-offset: 2px;
|
|
577
577
|
border-radius: var(--input-checkbox-border-radius-md, 4px);
|
|
578
578
|
}
|
|
579
|
-
`;static properties={checked:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},description:{type:String,reflect:!0},name:{type:String,reflect:!0},required:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},error:{type:Boolean,reflect:!0}};constructor(){super(),this.checked=!1,this.disabled=!1,this.description=void 0,this.name=void 0,this.required=!1,this.value=void 0,this._internals=this.attachInternals()}render(){return
|
|
579
|
+
`;static properties={checked:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},description:{type:String,reflect:!0},name:{type:String,reflect:!0},required:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},error:{type:Boolean,reflect:!0}};constructor(){super(),this.checked=!1,this.disabled=!1,this.description=void 0,this.name=void 0,this.required=!1,this.value=void 0,this._internals=this.attachInternals()}render(){return I`
|
|
580
580
|
<label ?disabled="${this.disabled}" for='${this.name|"checkbox"}' class='container ${this.disabled?"disabled":""} ${this.error?"error":""}' >
|
|
581
581
|
|
|
582
582
|
<div class='label-text'>
|
|
583
583
|
<slot></slot>
|
|
584
|
-
${this.description?
|
|
584
|
+
${this.description?I`<span class='description'>${this.description}</span>`:""}
|
|
585
585
|
</div>
|
|
586
586
|
|
|
587
587
|
|
|
588
|
-
<input type="checkbox" id='${this.name|"checkbox"}' name='${this.name|"checkbox"}' aria-describedby='${this.description|this.name|"checkbox"}' value='${
|
|
588
|
+
<input type="checkbox" id='${this.name|"checkbox"}' name='${this.name|"checkbox"}' aria-describedby='${this.description|this.name|"checkbox"}' value='${Y(this.value)}' ?checked="${this.checked}" ?disabled="${this.disabled}" ?required='${this.required}' @change="${this._onChange}" tabindex="-1">
|
|
589
589
|
|
|
590
590
|
<div class='checkmark ${this.checked?"active":""} ${this.error?"error":""}' id='check' aria-describedby='${this.description|this.name|"checkbox"}' tabindex="${this.disabled?"-1":"0"}">
|
|
591
591
|
<cd-icon name='check' size='xs' color='white'></cd-icon>
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
color: var(--input-hint-color, var(--text-secondary-color));
|
|
613
613
|
|
|
614
614
|
}
|
|
615
|
-
`;static properties={text:{type:String,reflect:!0},type:{type:String,reflect:!0}};constructor(){super(),this.text="",this.type="info"}render(){return
|
|
615
|
+
`;static properties={text:{type:String,reflect:!0},type:{type:String,reflect:!0}};constructor(){super(),this.text="",this.type="info"}render(){return I`
|
|
616
616
|
<div class="informational ${this.type}">
|
|
617
617
|
${this.text}
|
|
618
618
|
<slot></slot>
|
|
@@ -640,14 +640,14 @@
|
|
|
640
640
|
.required {
|
|
641
641
|
color: var(--input-required-color, #FF5630);
|
|
642
642
|
}
|
|
643
|
-
`;static properties={text:{type:String,reflect:!0},for:{type:String,reflect:!0,attribute:"for"},required:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0}};constructor(){super(),this.text=void 0,this.for=void 0,this.required=!1,this.disabled=!1}render(){return
|
|
643
|
+
`;static properties={text:{type:String,reflect:!0},for:{type:String,reflect:!0,attribute:"for"},required:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0}};constructor(){super(),this.text=void 0,this.for=void 0,this.required=!1,this.disabled=!1}render(){return I`
|
|
644
644
|
<label
|
|
645
645
|
class="${this.disabled?"disabled":""}"
|
|
646
|
-
for="${
|
|
646
|
+
for="${Y(this.for)}"
|
|
647
647
|
>
|
|
648
648
|
${this.text}
|
|
649
649
|
<slot></slot>
|
|
650
|
-
${this.required?
|
|
650
|
+
${this.required?I`<span class="required">*</span>`:""}
|
|
651
651
|
</label>
|
|
652
652
|
`}}function ig(){typeof window<"u"&&!customElements.get("cd-label")&&customElements.define("cd-label",UA)}class dA extends o{static styles=D`
|
|
653
653
|
@font-face {
|
|
@@ -682,10 +682,10 @@
|
|
|
682
682
|
color: var(--input-success-color, green);
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
-
`;static properties={text:{type:String,reflect:!0},type:{type:String,reflect:!0}};constructor(){super(),this.text=void 0,this.type="error"}render(){return
|
|
685
|
+
`;static properties={text:{type:String,reflect:!0},type:{type:String,reflect:!0}};constructor(){super(),this.text=void 0,this.type="error"}render(){return I`
|
|
686
686
|
<div class="error-message ${this.type}">
|
|
687
687
|
<slot name='icon'></slot>
|
|
688
|
-
${this.text?
|
|
688
|
+
${this.text?I`<span class="error-text">${this.text}</span>`:I`<slot></slot>`}
|
|
689
689
|
</div>
|
|
690
690
|
`}}function Dg(){typeof window<"u"&&!customElements.get("cd-error")&&customElements.define("cd-error",dA)}class uA extends o{static styles=D`
|
|
691
691
|
@font-face {
|
|
@@ -764,12 +764,12 @@
|
|
|
764
764
|
min-height: var(--tag-large, 32px);
|
|
765
765
|
gap: var(--tag-gap-lg, 8px);
|
|
766
766
|
}
|
|
767
|
-
`;static properties={label:{type:String,reflect:!0},variant:{type:String,reflect:!0,converter:A=>["primary","secondary","default","link","info","success","warning","danger"].includes(A)?A:"default"},removable:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},size:{type:String,reflect:!0,converter:A=>["sm","md","lg"].includes(A)?A:"md"}};constructor(){super(),this.label="",this.variant="primary",this.removable=!1,this.disabled=!1,this.size="md"}render(){return
|
|
767
|
+
`;static properties={label:{type:String,reflect:!0},variant:{type:String,reflect:!0,converter:A=>["primary","secondary","default","link","info","success","warning","danger"].includes(A)?A:"default"},removable:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},size:{type:String,reflect:!0,converter:A=>["sm","md","lg"].includes(A)?A:"md"}};constructor(){super(),this.label="",this.variant="primary",this.removable=!1,this.disabled=!1,this.size="md"}render(){return I`
|
|
768
768
|
<span class="tag ${this.variant} ${this.size} ${this.disabled?"disabled":""}" @click='${this._handleClick}'>
|
|
769
769
|
<slot name="icon">
|
|
770
770
|
</slot>
|
|
771
771
|
<span class="label">${this.label} <slot></slot></span>
|
|
772
|
-
${this.removable?
|
|
772
|
+
${this.removable?I`<span class="remove-icon" @click="${this._handleRemove}"><cd-icon name='exit' size='xs' color='${this.variant==="secondary"||this.variant==="info"?"black":"white"}'></cd-icon></span>`:""}
|
|
773
773
|
</span>
|
|
774
774
|
`}_handleRemove(){this.disabled||(this.dispatchEvent(new CustomEvent("remove",{detail:{label:this.label},bubbles:!0,composed:!0})),this.remove())}setRemovable(A){this.removable=A}setDisabled(A){this.disabled=A}removeTag(){this.dispatchEvent(new CustomEvent("remove",{detail:{label:this.label},bubbles:!0,composed:!0})),this.remove()}_handleClick(){this.disabled||this.dispatchEvent(new CustomEvent("click",{detail:{label:this.label},bubbles:!0,composed:!0}))}}function sg(){typeof window<"u"&&!customElements.get("cd-tag")&&customElements.define("cd-tag",uA)}hA();class GA extends o{static formAssociated=!0;static styles=D`
|
|
775
775
|
@font-face {
|
|
@@ -881,7 +881,7 @@
|
|
|
881
881
|
cursor: pointer;
|
|
882
882
|
|
|
883
883
|
}
|
|
884
|
-
`;static properties={name:{type:String,reflect:!0},value:{type:String,reflect:!0},checked:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},description:{type:String},error:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},required:{type:Boolean,reflect:!0}};constructor(){super(),this.name=void 0,this.value=void 0,this.checked=!1,this.disabled=!1,this.description=void 0,this.error=!1,this.size="md",this.required=!1,this._internals=this.attachInternals()}render(){return
|
|
884
|
+
`;static properties={name:{type:String,reflect:!0},value:{type:String,reflect:!0},checked:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},description:{type:String},error:{type:Boolean,reflect:!0},size:{type:String,reflect:!0},required:{type:Boolean,reflect:!0}};constructor(){super(),this.name=void 0,this.value=void 0,this.checked=!1,this.disabled=!1,this.description=void 0,this.error=!1,this.size="md",this.required=!1,this._internals=this.attachInternals()}render(){return I`
|
|
885
885
|
<label class="container ${this.size} ${this.disabled?"disabled":""} ${this.error?"input-error":""}" for="${this.name}">
|
|
886
886
|
<input
|
|
887
887
|
type="radio"
|
|
@@ -892,7 +892,7 @@
|
|
|
892
892
|
?disabled="${this.disabled}"
|
|
893
893
|
@change="${this._handleChange}"
|
|
894
894
|
@click="${this._select}"
|
|
895
|
-
?required="${
|
|
895
|
+
?required="${Y(this.required)}"
|
|
896
896
|
tabindex="0"
|
|
897
897
|
>
|
|
898
898
|
<div class='radio-text' @click="${this._handleLabelClick}">
|
|
@@ -996,19 +996,20 @@
|
|
|
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},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
|
|
999
|
+
`;static properties={name:{type:String,reflect:!0},value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},required:{type:Boolean,reflect:!0},items:{type:Array,reflect:!0},selectedItem:{type:String,reflect:!0,attribute:"selected-item"},blank:{type:Boolean,reflect:!0,attribute:"blank"},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.blank=void 0,this._internals=this.attachInternals()}render(){return I`
|
|
1000
1000
|
<div class='container ${this.fullWidth?"full-width":""}'>
|
|
1001
1001
|
<select
|
|
1002
|
-
name="${
|
|
1002
|
+
name="${Y(this.name)}"
|
|
1003
1003
|
?disabled="${this.disabled}"
|
|
1004
1004
|
?required="${this.required}"
|
|
1005
1005
|
?error="${this.error}"
|
|
1006
|
-
.value="${
|
|
1006
|
+
.value="${Y(this.value)}"
|
|
1007
1007
|
class="${this.error?"input-error":""} ${this.size} ${this.fullWidth?"full-width":""}"
|
|
1008
1008
|
@change="${this.handleChange}"
|
|
1009
1009
|
>
|
|
1010
|
-
|
|
1011
|
-
|
|
1010
|
+
${this.placeholder?I`<option value="" disabled selected>${this.placeholder}</option>`:""}
|
|
1011
|
+
${this.blank===!0&&Y(this.blanK)?I`<option value="'false'" selected></option>`:""}
|
|
1012
|
+
${this.items?this.items.map(A=>I`<option .value=${A} ?selected=${this.selectedItem==A}>${A}</option>`):I`<slot></slot>`}
|
|
1012
1013
|
</select>
|
|
1013
1014
|
<cd-icon name="caret-down" class="select-icon" size='xxs'></cd-icon>
|
|
1014
1015
|
</div>
|
|
@@ -1121,11 +1122,11 @@
|
|
|
1121
1122
|
padding-right: calc(var(--textarea-padding) + 20px);
|
|
1122
1123
|
}
|
|
1123
1124
|
|
|
1124
|
-
`;static properties={value:{type:String,reflect:!0},name:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},required:{type:Boolean,reflect:!0},rows:{type:Number,reflect:!0},cols:{type:Number,reflect:!0},error:{type:Boolean,reflect:!0,attribute:"error"},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"},variant:{type:String,reflect:!0},iconRight:{type:String,reflect:!0,attribute:"icon-right"}};constructor(){super(),this.value="",this.name=void 0,this.placeholder="",this.disabled=!1,this.required=!1,this.rows=4,this.cols=50,this.error=!1,this.fullWidth=!1,this.variant="default",this.iconRight=void 0,this._internals=this.attachInternals()}render(){return
|
|
1125
|
+
`;static properties={value:{type:String,reflect:!0},name:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},required:{type:Boolean,reflect:!0},rows:{type:Number,reflect:!0},cols:{type:Number,reflect:!0},error:{type:Boolean,reflect:!0,attribute:"error"},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"},variant:{type:String,reflect:!0},iconRight:{type:String,reflect:!0,attribute:"icon-right"}};constructor(){super(),this.value="",this.name=void 0,this.placeholder="",this.disabled=!1,this.required=!1,this.rows=4,this.cols=50,this.error=!1,this.fullWidth=!1,this.variant="default",this.iconRight=void 0,this._internals=this.attachInternals()}render(){return I`
|
|
1125
1126
|
<div class='container ${this.fullWidth?"full-width":""}'>
|
|
1126
1127
|
<textarea
|
|
1127
|
-
id="${
|
|
1128
|
-
name="${
|
|
1128
|
+
id="${Y(this.name)}"
|
|
1129
|
+
name="${Y(this.name)}"
|
|
1129
1130
|
.value="${this.value}"
|
|
1130
1131
|
placeholder="${this.placeholder}"
|
|
1131
1132
|
?disabled="${this.disabled}"
|
|
@@ -1137,7 +1138,7 @@
|
|
|
1137
1138
|
@focus="${this.handleFocus}"
|
|
1138
1139
|
@blur="${this.handleBlur}">
|
|
1139
1140
|
</textarea>
|
|
1140
|
-
${this.iconRight?
|
|
1141
|
+
${this.iconRight?I`<span class="icon-right-container"><cd-icon size='sm' name='${this.iconRight}' class='icon-right' color='${Y(this.error?"var(--input-error-border-color)":void 0)}'></cd-icon></span>`:""}
|
|
1141
1142
|
</div>
|
|
1142
1143
|
`}handleInput(A){return this.value=A.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value}handleFocus(A){return this.value=A.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("focus",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value}handleBlur(A){return this.value=A.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("blur",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value}setValue(A){if(typeof A>"u"&&(A=""),typeof A!="string")throw new Error("Value must be a string");this.value=A,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}setDisabled(A){if(typeof A>"u"&&(A=!1),typeof A!="boolean")throw new Error("Disabled must be a boolean value");this.disabled=A,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}setError(A){if(typeof A>"u"&&(A=!1),typeof A!="boolean")throw new Error("Error must be a boolean value");this.error=A,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}function rg(){!customElements.get("cd-textarea")&&typeof window<"u"&&customElements.define("cd-textarea",fA)}V();class JA extends o{static styles=D`
|
|
1143
1144
|
@font-face {
|
|
@@ -1168,22 +1169,22 @@
|
|
|
1168
1169
|
border-radius: var(--input-border-radius);
|
|
1169
1170
|
outline: 2px solid var(--input-border-color-focus);
|
|
1170
1171
|
}
|
|
1171
|
-
`;static properties={currentPage:{type:Number,reflect:!0,attribute:"current-page",defaultValue:1},totalPages:{type:Number,reflect:!0,attribute:"total-pages",defaultValue:1},skipToEnd:{type:Boolean,reflect:!0,attribute:"skip-to-end",defaultValue:!1},skipToStart:{type:Boolean,reflect:!0,attribute:"skip-to-start",defaultValue:!1},disabled:{type:Boolean,reflect:!0,attribute:"disabled",defaultValue:!1},disabledPrevious:{type:Boolean,reflect:!0,attribute:"disabled-previous",defaultValue:!1},disabledNext:{type:Boolean,reflect:!0,attribute:"disabled-next",defaultValue:!1},skipToStartClick:{type:Function,reflect:!1,attribute:!1},previousClick:{type:Function,reflect:!1,attribute:!1},nextClick:{type:Function,reflect:!1,attribute:!1},skipToEndClick:{type:Function,reflect:!1,attribute:!1}};constructor(){super(),this.currentPage=1,this.totalPages=1,this.skipToEnd=!1,this.skipToStart=!1}render(){return
|
|
1172
|
+
`;static properties={currentPage:{type:Number,reflect:!0,attribute:"current-page",defaultValue:1},totalPages:{type:Number,reflect:!0,attribute:"total-pages",defaultValue:1},skipToEnd:{type:Boolean,reflect:!0,attribute:"skip-to-end",defaultValue:!1},skipToStart:{type:Boolean,reflect:!0,attribute:"skip-to-start",defaultValue:!1},disabled:{type:Boolean,reflect:!0,attribute:"disabled",defaultValue:!1},disabledPrevious:{type:Boolean,reflect:!0,attribute:"disabled-previous",defaultValue:!1},disabledNext:{type:Boolean,reflect:!0,attribute:"disabled-next",defaultValue:!1},skipToStartClick:{type:Function,reflect:!1,attribute:!1},previousClick:{type:Function,reflect:!1,attribute:!1},nextClick:{type:Function,reflect:!1,attribute:!1},skipToEndClick:{type:Function,reflect:!1,attribute:!1}};constructor(){super(),this.currentPage=1,this.totalPages=1,this.skipToEnd=!1,this.skipToStart=!1}render(){return I`
|
|
1172
1173
|
<div class="pagination">
|
|
1173
1174
|
<slot name="default"></slot>
|
|
1174
1175
|
|
|
1175
|
-
${this.skipToStart?
|
|
1176
|
-
<cd-icon name="caret-end-mini-left" @click="${this.skipToStartClick}" color="${
|
|
1176
|
+
${this.skipToStart?I`
|
|
1177
|
+
<cd-icon name="caret-end-mini-left" @click="${this.skipToStartClick}" color="${Y(this.currentPage===1||this.disabled||this.disabledPrevious?"var(--input-border-color-disabled)":void 0)}" tabindex="${this.currentPage===1?-1:0}"></cd-icon>
|
|
1177
1178
|
`:""}
|
|
1178
1179
|
|
|
1179
|
-
<cd-icon name="caret-mini-left" @click="${this.previousClick}" color="${
|
|
1180
|
+
<cd-icon name="caret-mini-left" @click="${this.previousClick}" color="${Y(this.currentPage===1||this.disabled||this.disabledPrevious?"var(--input-border-color-disabled)":void 0)}" tabindex="${this.currentPage===1?-1:0}"></cd-icon>
|
|
1180
1181
|
|
|
1181
1182
|
<span>Page <span class="page-number">${this.currentPage}</span> of <span class="page-number">${this.totalPages}</span></span>
|
|
1182
1183
|
|
|
1183
|
-
<cd-icon name="caret-mini-right" @click="${this.nextClick}" color="${
|
|
1184
|
+
<cd-icon name="caret-mini-right" @click="${this.nextClick}" color="${Y(this.currentPage===this.totalPages||this.disabled||this.disabledNext?"var(--input-border-color-disabled)":void 0)}" tabindex="${this.currentPage===this.totalPages?-1:0}"></cd-icon>
|
|
1184
1185
|
|
|
1185
|
-
${this.skipToEnd?
|
|
1186
|
-
<cd-icon name="caret-end-mini-right" @click="${this.skipToEndClick}" color="${
|
|
1186
|
+
${this.skipToEnd?I`
|
|
1187
|
+
<cd-icon name="caret-end-mini-right" @click="${this.skipToEndClick}" color="${Y(this.currentPage===this.totalPages||this.disabled||this.disabledNext?"var(--input-border-color-disabled)":void 0)}" tabindex="${this.currentPage===this.totalPages?-1:0}"></cd-icon>
|
|
1187
1188
|
`:""}
|
|
1188
1189
|
|
|
1189
1190
|
<slot name="after"></slot>
|
|
@@ -1229,7 +1230,7 @@
|
|
|
1229
1230
|
font-size: var(--pagination-font-size, 14px);
|
|
1230
1231
|
font-weight: var(--pagination-page-number-font-weight, 600);
|
|
1231
1232
|
}
|
|
1232
|
-
`;static properties={size:{type:Number,reflect:!0,attribute:"size",defaultValue:10},sizes:{type:Array,reflect:!0,attribute:"sizes",defaultValue:[10,20,50,100]},label:{type:String,reflect:!0,attribute:"label",defaultValue:"Page size"},totalItems:{type:Number,reflect:!0,attribute:"total-items",defaultValue:0},range:{type:String,reflect:!0,attribute:"range",defaultValue:"1 - 10"}};constructor(){super(),this.size=10,this.sizes=[10,20,50,100],this.label="Items per page",this.totalItems=0,this.range="1 - "+this.size}render(){return
|
|
1233
|
+
`;static properties={size:{type:Number,reflect:!0,attribute:"size",defaultValue:10},sizes:{type:Array,reflect:!0,attribute:"sizes",defaultValue:[10,20,50,100]},label:{type:String,reflect:!0,attribute:"label",defaultValue:"Page size"},totalItems:{type:Number,reflect:!0,attribute:"total-items",defaultValue:0},range:{type:String,reflect:!0,attribute:"range",defaultValue:"1 - 10"}};constructor(){super(),this.size=10,this.sizes=[10,20,50,100],this.label="Items per page",this.totalItems=0,this.range="1 - "+this.size}render(){return I`
|
|
1233
1234
|
<div class="page-size">
|
|
1234
1235
|
<div class="page-select">
|
|
1235
1236
|
<span class="label">${this.label}</span>
|
|
@@ -1242,5 +1243,5 @@
|
|
|
1242
1243
|
|
|
1243
1244
|
<cd-pagination skip-to-end skip-to-start></cd-pagination>
|
|
1244
1245
|
</div>
|
|
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=iA;exports.ErrorMessage=dA;exports.FlexContainer=FA;exports.Icon=DA;exports.Informational=lA;exports.Key=
|
|
1246
|
+
`}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=iA;exports.ErrorMessage=dA;exports.FlexContainer=FA;exports.Icon=DA;exports.Informational=lA;exports.Key=nA;exports.KeyValue=sA;exports.Label=UA;exports.NavImage=MA;exports.PageSize=zA;exports.Pagination=JA;exports.Radio=GA;exports.Select=PA;exports.Spinner=YA;exports.Tag=uA;exports.Textarea=fA;exports.fontURL=c;exports.fontURL$1=rA;exports.i=o;exports.i$1=D;exports.o=Y;exports.r=i;exports.registerBadge=Ag;exports.registerBody=gg;exports.registerCheckbox=wg;exports.registerCounter=Eg;exports.registerDataObject=Bg;exports.registerErrorMessage=Dg;exports.registerFlexContainer=og;exports.registerIcon=V;exports.registerInformational=hA;exports.registerKey=Ig;exports.registerKeyValue=Qg;exports.registerLabel=ig;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=I;
|
|
1246
1247
|
//# sourceMappingURL=index.cjs.js.map
|