@randstad-uca/design-system 1.0.37 → 1.0.39
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/components/Select.d.ts +1 -0
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -40,6 +40,7 @@ export declare class FilterableSelect extends LitElement {
|
|
|
40
40
|
handleClickOutside(e: Event): void;
|
|
41
41
|
handleKeyDown(e: KeyboardEvent): void;
|
|
42
42
|
private renderSelectedIcon;
|
|
43
|
+
private getSanitizeSvg;
|
|
43
44
|
render(): import("lit-html").TemplateResult<1>;
|
|
44
45
|
}
|
|
45
46
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@ const l=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)}
|
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const T={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:A},j=(t=T,e,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function
|
|
23
|
+
const T={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:A},j=(t=T,e,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function z(t){return(e,i)=>"object"==typeof i?j(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/function
|
|
28
|
+
*/function I(t){return z({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -159,7 +159,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
159
159
|
<div class="content ${this.isOpen?"open":""}">
|
|
160
160
|
<slot></slot>
|
|
161
161
|
</div>
|
|
162
|
-
`}};n([
|
|
162
|
+
`}};n([z({type:String}),a("design:type",Object)],D.prototype,"title",void 0),n([I(),a("design:type",Object)],D.prototype,"isOpen",void 0),n([I(),a("design:type",Object)],D.prototype,"isDesktop",void 0),D=n([l("accordion-panel")],D);let V=class extends e{static{this.styles=t`
|
|
163
163
|
:host {
|
|
164
164
|
display: flex;
|
|
165
165
|
flex-direction: column;
|
|
@@ -410,7 +410,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
410
410
|
${this.iconName&&"button-round"!==this.variant&&"right"===this.iconPosition?i`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
|
|
411
411
|
`}
|
|
412
412
|
</button>
|
|
413
|
-
`}};n([
|
|
413
|
+
`}};n([z({type:String}),a("design:type",String)],q.prototype,"variant",void 0),n([z({type:String}),a("design:type",String)],q.prototype,"size",void 0),n([z({type:String}),a("design:type",Object)],q.prototype,"label",void 0),n([z({type:Boolean}),a("design:type",Object)],q.prototype,"loader",void 0),n([z({type:String,attribute:"icon-src"}),a("design:type",String)],q.prototype,"iconSrc",void 0),n([z({type:String}),a("design:type",String)],q.prototype,"iconPosition",void 0),n([z({type:Boolean,reflect:!0}),a("design:type",Boolean)],q.prototype,"disabled",void 0),n([z({type:String}),a("design:type",Object)],q.prototype,"iconName",void 0),n([z({type:String}),a("design:type",String)],q.prototype,"type",void 0),n([z({type:String}),a("design:type",Object)],q.prototype,"idevent",void 0),q=n([l("randstad-button")],q);let H=class extends e{constructor(){super(...arguments),this.img="",this.name="",this.title="",this.description="",this.buttonLabel="Contactanos",this.cardId=""}static{this.styles=t`
|
|
414
414
|
:host {
|
|
415
415
|
display: inline-block;
|
|
416
416
|
font-family: "Graphik", sans-serif;
|
|
@@ -527,7 +527,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
527
527
|
</div>
|
|
528
528
|
</div>
|
|
529
529
|
</div>
|
|
530
|
-
`}};n([
|
|
530
|
+
`}};n([z({type:String}),a("design:type",Object)],H.prototype,"img",void 0),n([z({type:String}),a("design:type",Object)],H.prototype,"name",void 0),n([z({type:String}),a("design:type",Object)],H.prototype,"title",void 0),n([z({type:String}),a("design:type",Object)],H.prototype,"description",void 0),n([z({type:String}),a("design:type",Object)],H.prototype,"buttonLabel",void 0),n([z({type:String}),a("design:type",Object)],H.prototype,"cardId",void 0),H=n([l("carousel-card")],H);let G=class extends e{constructor(){super(...arguments),this.checked=!1,this.error=!1,this.disabled=!1}static{this.styles=t`
|
|
531
531
|
:host {
|
|
532
532
|
display: block;
|
|
533
533
|
max-width: 100%;
|
|
@@ -642,7 +642,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
642
642
|
<slot></slot>
|
|
643
643
|
</span>
|
|
644
644
|
</label>
|
|
645
|
-
`}};n([
|
|
645
|
+
`}};n([z({type:Boolean,reflect:!0}),a("design:type",Object)],G.prototype,"checked",void 0),n([z({type:Boolean}),a("design:type",Object)],G.prototype,"error",void 0),n([z({type:Boolean}),a("design:type",Object)],G.prototype,"disabled",void 0),G=n([l("randstad-checkbox")],G);let W=class extends e{constructor(){super(...arguments),this.value="",this.size="md",this.icon=null,this.helper=null,this.error=!1,this.errorMessage="",this.disabled=!1,this.typing=!1,this.type="text",this.isPasswordVisible=!1,this.cleanButton=!1,this.required=!1,this.optional=!1}static{this.styles=t`
|
|
646
646
|
:host {
|
|
647
647
|
display: block;
|
|
648
648
|
font-family: 'Graphik', sans-serif;
|
|
@@ -946,7 +946,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
946
946
|
|
|
947
947
|
${this.helper?i`<p class="helper-description">${this.helper}</p>`:o}
|
|
948
948
|
</div>
|
|
949
|
-
`}};n([
|
|
949
|
+
`}};n([z({type:String}),a("design:type",String)],W.prototype,"placeholder",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"label",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"labelColor",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"value",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"size",void 0),n([z({type:String}),a("design:type",Object)],W.prototype,"icon",void 0),n([z({type:String}),a("design:type",Object)],W.prototype,"helper",void 0),n([z({type:Boolean}),a("design:type",Boolean)],W.prototype,"error",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"errorMessage",void 0),n([z({type:Boolean}),a("design:type",Boolean)],W.prototype,"disabled",void 0),n([z({type:Boolean}),a("design:type",Boolean)],W.prototype,"typing",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"type",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"tooltipMessage",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"linkText",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"linkRoute",void 0),n([z({type:Boolean,reflect:!0}),a("design:type",Object)],W.prototype,"isPasswordVisible",void 0),n([z({type:Boolean}),a("design:type",Boolean)],W.prototype,"cleanButton",void 0),n([z({type:Number}),a("design:type",Number)],W.prototype,"maxLength",void 0),n([z({type:Boolean}),a("design:type",Object)],W.prototype,"required",void 0),n([z({type:Boolean}),a("design:type",Object)],W.prototype,"optional",void 0),n([z({type:String}),a("design:type",String)],W.prototype,"helpLink",void 0),W=n([l("randstad-form")],W);let K=class extends e{constructor(){super(...arguments),this.label="",this.error=!1,this.errorMessage="",this.required=!1,this.optional=!1}static{this.styles=t`
|
|
950
950
|
:host {
|
|
951
951
|
display: flex;
|
|
952
952
|
flex-direction: column;
|
|
@@ -999,7 +999,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
999
999
|
</div>
|
|
1000
1000
|
|
|
1001
1001
|
${this.error?i`<span class="error">${this.errorMessage}</span>`:this.helper?i`<span class="helper">${this.helper}</span>`:null}
|
|
1002
|
-
`}};n([
|
|
1002
|
+
`}};n([z({type:String}),a("design:type",Object)],K.prototype,"label",void 0),n([z({type:String}),a("design:type",String)],K.prototype,"helper",void 0),n([z({type:Boolean}),a("design:type",Object)],K.prototype,"error",void 0),n([z({type:String}),a("design:type",Object)],K.prototype,"errorMessage",void 0),n([z({type:Boolean}),a("design:type",Object)],K.prototype,"required",void 0),n([z({type:Boolean}),a("design:type",Object)],K.prototype,"optional",void 0),K=n([l("randstad-form-group")],K);class Y extends e{constructor(){super(...arguments),this.name="",this.size="24px"}static{this.styles=t`
|
|
1003
1003
|
:host {
|
|
1004
1004
|
display: inline-flex;
|
|
1005
1005
|
width: var(--icon-size, 24px);
|
|
@@ -1013,7 +1013,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1013
1013
|
height: var(--icon-size, 24px);
|
|
1014
1014
|
fill: var(--icon-color, currentColor);
|
|
1015
1015
|
}
|
|
1016
|
-
`}connectedCallback(){super.connectedCallback(),this.style.setProperty("--icon-size",this.size)}updated(t){t.has("size")&&this.style.setProperty("--icon-size",this.size)}async loadIcon(){try{const t=await fetch(`/assets/icons/${this.name}.svg`);if(!t.ok)throw new Error("Icon not found");const e=await t.text(),i=new DOMParser,o=i.parseFromString(e,"image/svg+xml").querySelector("svg");if(!o)throw new Error("No se encontró un elemento SVG válido");o.removeAttribute("fill"),o.setAttribute("width",this.size),o.setAttribute("height",this.size),o.querySelectorAll("[fill]").forEach((t=>t.removeAttribute("fill"))),o.setAttribute("fill","currentColor"),"innerHTML"in this.renderRoot&&(this.renderRoot.innerHTML=""),this.renderRoot.appendChild(o)}catch(t){console.error(`❌ Error cargando icono ${this.name}:`,t),"innerHTML"in this.renderRoot&&(this.renderRoot.innerHTML="<span>⚠️</span>")}}render(){return this.loadIcon(),null}}n([
|
|
1016
|
+
`}connectedCallback(){super.connectedCallback(),this.style.setProperty("--icon-size",this.size)}updated(t){t.has("size")&&this.style.setProperty("--icon-size",this.size)}async loadIcon(){try{const t=await fetch(`/assets/icons/${this.name}.svg`);if(!t.ok)throw new Error("Icon not found");const e=await t.text(),i=new DOMParser,o=i.parseFromString(e,"image/svg+xml").querySelector("svg");if(!o)throw new Error("No se encontró un elemento SVG válido");o.removeAttribute("fill"),o.setAttribute("width",this.size),o.setAttribute("height",this.size),o.querySelectorAll("[fill]").forEach((t=>t.removeAttribute("fill"))),o.setAttribute("fill","currentColor"),"innerHTML"in this.renderRoot&&(this.renderRoot.innerHTML=""),this.renderRoot.appendChild(o)}catch(t){console.error(`❌ Error cargando icono ${this.name}:`,t),"innerHTML"in this.renderRoot&&(this.renderRoot.innerHTML="<span>⚠️</span>")}}render(){return this.loadIcon(),null}}n([z({type:String}),a("design:type",Object)],Y.prototype,"name",void 0),n([z({type:String}),a("design:type",Object)],Y.prototype,"size",void 0),customElements.define("randstad-icon",Y);let X=class extends e{constructor(){super(...arguments),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1}static{this.styles=t`
|
|
1017
1017
|
:host {
|
|
1018
1018
|
display: block;
|
|
1019
1019
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1066,7 +1066,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1066
1066
|
<randstad-icon class="icon" name="${this.icon}" size="24px" style="color: var(--icon-color);"></randstad-icon>
|
|
1067
1067
|
<span class="message">${this.message}</span>
|
|
1068
1068
|
</div>
|
|
1069
|
-
`}};n([
|
|
1069
|
+
`}};n([z({type:String}),a("design:type",String)],X.prototype,"type",void 0),n([z({type:String}),a("design:type",String)],X.prototype,"icon",void 0),n([z({type:String}),a("design:type",String)],X.prototype,"message",void 0),n([z({type:Boolean}),a("design:type",Boolean)],X.prototype,"open",void 0),X=n([l("randstad-notice")],X);let J=class extends e{constructor(){super(...arguments),this.open=!1,this.title="Título del modal",this.showNotice=!1,this.noticeType="informative",this.noticeMessage="",this.noticeIcon="info",this.showPrimaryButton=!1,this.primaryButtonLabel="Aceptar",this.showSecondaryButton=!1,this.secondaryButtonLabel="Cancelar",this.scrollable=!1,this.setScrollableMode=()=>{this.scrollable=window.innerWidth>940}}static{this.styles=t`
|
|
1070
1070
|
:host {
|
|
1071
1071
|
font-family: 'Graphik', sans-serif;
|
|
1072
1072
|
display: none;
|
|
@@ -1241,7 +1241,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1241
1241
|
</div>
|
|
1242
1242
|
</div>
|
|
1243
1243
|
</div>
|
|
1244
|
-
`}};n([
|
|
1244
|
+
`}};n([z({type:Boolean,reflect:!0}),a("design:type",Object)],J.prototype,"open",void 0),n([z({type:String}),a("design:type",Object)],J.prototype,"title",void 0),n([z({type:String}),a("design:type",String)],J.prototype,"subtitle",void 0),n([z({type:Boolean}),a("design:type",Object)],J.prototype,"showNotice",void 0),n([z({type:String}),a("design:type",String)],J.prototype,"noticeType",void 0),n([z({type:String}),a("design:type",Object)],J.prototype,"noticeMessage",void 0),n([z({type:String}),a("design:type",Object)],J.prototype,"noticeIcon",void 0),n([z({type:Boolean}),a("design:type",Object)],J.prototype,"showPrimaryButton",void 0),n([z({type:String}),a("design:type",Object)],J.prototype,"primaryButtonLabel",void 0),n([z({type:Boolean}),a("design:type",Object)],J.prototype,"showSecondaryButton",void 0),n([z({type:String}),a("design:type",Object)],J.prototype,"secondaryButtonLabel",void 0),n([I(),a("design:type",Object)],J.prototype,"scrollable",void 0),J=n([l("custom-modal")],J);let Z=class extends e{constructor(){super(...arguments),this.open=!1,this.type="default",this.icon="warning",this.title="Título del Popup",this.description="Descripción del popup",this.width="400px",this.buttonText="Aceptar",this.confirmText="Sí",this.cancelText="No",this.stackedActions=[],this._onBackgroundClick=t=>{const e=t.composedPath(),i=this.renderRoot.querySelector(".popup");i&&!e.includes(i)&&(this.dispatchEvent(new CustomEvent("popup-close",{detail:null})),this.open=!1)}}static{this.styles=t`
|
|
1245
1245
|
:host {
|
|
1246
1246
|
display: none;
|
|
1247
1247
|
position: fixed;
|
|
@@ -1425,7 +1425,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1425
1425
|
`}
|
|
1426
1426
|
</div>
|
|
1427
1427
|
</div>
|
|
1428
|
-
`}};n([
|
|
1428
|
+
`}};n([z({type:Boolean,reflect:!0}),a("design:type",Object)],Z.prototype,"open",void 0),n([z({type:String}),a("design:type",String)],Z.prototype,"type",void 0),n([z({type:String}),a("design:type",Object)],Z.prototype,"icon",void 0),n([z({type:String}),a("design:type",Object)],Z.prototype,"title",void 0),n([z({type:String}),a("design:type",Object)],Z.prototype,"description",void 0),n([z({type:String}),a("design:type",Object)],Z.prototype,"width",void 0),n([z({type:String}),a("design:type",Object)],Z.prototype,"buttonText",void 0),n([z({type:String}),a("design:type",Object)],Z.prototype,"confirmText",void 0),n([z({type:String}),a("design:type",Object)],Z.prototype,"cancelText",void 0),n([z({type:Array}),a("design:type",Array)],Z.prototype,"stackedActions",void 0),Z=n([l("custom-popup")],Z);let Q=class extends e{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=t`
|
|
1429
1429
|
:host {
|
|
1430
1430
|
display: inline-block;
|
|
1431
1431
|
width: 64px;
|
|
@@ -1486,7 +1486,7 @@ function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1486
1486
|
${this.value} de ${this.max}
|
|
1487
1487
|
</text>
|
|
1488
1488
|
</svg>
|
|
1489
|
-
`}};n([
|
|
1489
|
+
`}};n([z({type:Number}),a("design:type",Object)],Q.prototype,"value",void 0),n([z({type:Number}),a("design:type",Object)],Q.prototype,"max",void 0),Q=n([l("progress-circle")],Q);
|
|
1490
1490
|
/**
|
|
1491
1491
|
* @license
|
|
1492
1492
|
* Copyright 2023 Google LLC
|
|
@@ -1497,7 +1497,7 @@ const tt=Symbol("attachableController");let et;r||(et=new MutationObserver((t=>{
|
|
|
1497
1497
|
* @license
|
|
1498
1498
|
* Copyright 2021 Google LLC
|
|
1499
1499
|
* SPDX-License-Identifier: Apache-2.0
|
|
1500
|
-
*/const ot=["focusin","focusout","pointerdown"];class rt extends e{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new it(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(t){if(!t[st]){switch(t.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[st]=!0}}onControlChange(t,e){if(!r)for(const i of ot)t?.removeEventListener(i,this),e?.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}n([
|
|
1500
|
+
*/const ot=["focusin","focusout","pointerdown"];class rt extends e{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new it(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(t){if(!t[st]){switch(t.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[st]=!0}}onControlChange(t,e){if(!r)for(const i of ot)t?.removeEventListener(i,this),e?.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}n([z({type:Boolean,reflect:!0})],rt.prototype,"visible",void 0),n([z({type:Boolean,reflect:!0})],rt.prototype,"inward",void 0);const st=Symbol("handledByFocusRing"),nt=t`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
1501
1501
|
`
|
|
1502
1502
|
/**
|
|
1503
1503
|
* @license
|
|
@@ -1519,7 +1519,7 @@ const lt="cubic-bezier(0.2, 0, 0, 1)";
|
|
|
1519
1519
|
* @license
|
|
1520
1520
|
* Copyright 2022 Google LLC
|
|
1521
1521
|
* SPDX-License-Identifier: Apache-2.0
|
|
1522
|
-
*/var dt;!function(t){t[t.INACTIVE=0]="INACTIVE",t[t.TOUCH_DELAY=1]="TOUCH_DELAY",t[t.HOLDING=2]="HOLDING",t[t.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(dt||(dt={}));const ct=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],pt=r?null:window.matchMedia("(forced-colors: active)");class ht extends e{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=dt.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new it(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return i`<div class="surface ${s(t)}"></div>`}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==dt.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==dt.HOLDING)return this.state===dt.TOUCH_DELAY?(this.state=dt.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=dt.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=dt.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=dt.TOUCH_DELAY,await new Promise((t=>{setTimeout(t,150)})),this.state===dt.TOUCH_DELAY&&(this.state=dt.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==dt.WAITING_FOR_CLICK?this.state===dt.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:e}=this.getBoundingClientRect(),i=Math.max(t,e),o=Math.max(.35*i,75),r=Math.floor(.2*i),s=Math.sqrt(e**2+t**2)+10;this.initialSize=r,this.rippleScale=""+(s+o)/r,this.rippleSize=`${r}px`}getNormalizedPointerEventCoords(t){const{scrollX:e,scrollY:i}=window,{left:o,top:r}=this.getBoundingClientRect(),s=e+o,n=i+r,{pageX:a,pageY:l}=t;return{x:a-s,y:l-n}}getTranslationCoordinates(t){const{height:e,width:i}=this.getBoundingClientRect(),o={x:(i-this.initialSize)/2,y:(e-this.initialSize)/2};let r;return r=t instanceof PointerEvent?this.getNormalizedPointerEventCoords(t):{x:i/2,y:e/2},r={x:r.x-this.initialSize/2,y:r.y-this.initialSize/2},{startPoint:r,endPoint:o}}startPressAnimation(t){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:e,endPoint:i}=this.getTranslationCoordinates(t),o=`${e.x}px, ${e.y}px`,r=`${i.x}px, ${i.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${o}) scale(1)`,`translate(${r}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:lt,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=dt.INACTIVE;const t=this.growAnimation;let e=1/0;"number"==typeof t?.currentTime?e=t.currentTime:t?.currentTime&&(e=t.currentTime.to("ms").value),e>=225?this.pressed=!1:(await new Promise((t=>{setTimeout(t,225-e)})),this.growAnimation===t&&(this.pressed=!1))}shouldReactToEvent(t){if(this.disabled||!t.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if("pointerenter"===t.type||"pointerleave"===t.type)return!this.isTouch(t);const e=1===t.buttons;return this.isTouch(t)||e}inBounds({x:t,y:e}){const{top:i,left:o,bottom:r,right:s}=this.getBoundingClientRect();return t>=o&&t<=s&&e>=i&&e<=r}isTouch({pointerType:t}){return"touch"===t}async handleEvent(t){if(!pt?.matches)switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t)}}onControlChange(t,e){if(!r)for(const i of ct)t?.removeEventListener(i,this),e?.addEventListener(i,this)}}n([
|
|
1522
|
+
*/var dt;!function(t){t[t.INACTIVE=0]="INACTIVE",t[t.TOUCH_DELAY=1]="TOUCH_DELAY",t[t.HOLDING=2]="HOLDING",t[t.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(dt||(dt={}));const ct=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],pt=r?null:window.matchMedia("(forced-colors: active)");class ht extends e{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=dt.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new it(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return i`<div class="surface ${s(t)}"></div>`}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==dt.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==dt.HOLDING)return this.state===dt.TOUCH_DELAY?(this.state=dt.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=dt.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=dt.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=dt.TOUCH_DELAY,await new Promise((t=>{setTimeout(t,150)})),this.state===dt.TOUCH_DELAY&&(this.state=dt.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==dt.WAITING_FOR_CLICK?this.state===dt.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:e}=this.getBoundingClientRect(),i=Math.max(t,e),o=Math.max(.35*i,75),r=Math.floor(.2*i),s=Math.sqrt(e**2+t**2)+10;this.initialSize=r,this.rippleScale=""+(s+o)/r,this.rippleSize=`${r}px`}getNormalizedPointerEventCoords(t){const{scrollX:e,scrollY:i}=window,{left:o,top:r}=this.getBoundingClientRect(),s=e+o,n=i+r,{pageX:a,pageY:l}=t;return{x:a-s,y:l-n}}getTranslationCoordinates(t){const{height:e,width:i}=this.getBoundingClientRect(),o={x:(i-this.initialSize)/2,y:(e-this.initialSize)/2};let r;return r=t instanceof PointerEvent?this.getNormalizedPointerEventCoords(t):{x:i/2,y:e/2},r={x:r.x-this.initialSize/2,y:r.y-this.initialSize/2},{startPoint:r,endPoint:o}}startPressAnimation(t){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:e,endPoint:i}=this.getTranslationCoordinates(t),o=`${e.x}px, ${e.y}px`,r=`${i.x}px, ${i.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${o}) scale(1)`,`translate(${r}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:lt,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=dt.INACTIVE;const t=this.growAnimation;let e=1/0;"number"==typeof t?.currentTime?e=t.currentTime:t?.currentTime&&(e=t.currentTime.to("ms").value),e>=225?this.pressed=!1:(await new Promise((t=>{setTimeout(t,225-e)})),this.growAnimation===t&&(this.pressed=!1))}shouldReactToEvent(t){if(this.disabled||!t.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if("pointerenter"===t.type||"pointerleave"===t.type)return!this.isTouch(t);const e=1===t.buttons;return this.isTouch(t)||e}inBounds({x:t,y:e}){const{top:i,left:o,bottom:r,right:s}=this.getBoundingClientRect();return t>=o&&t<=s&&e>=i&&e<=r}isTouch({pointerType:t}){return"touch"===t}async handleEvent(t){if(!pt?.matches)switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t)}}onControlChange(t,e){if(!r)for(const i of ct)t?.removeEventListener(i,this),e?.addEventListener(i,this)}}n([z({type:Boolean,reflect:!0})],ht.prototype,"disabled",void 0),n([I()],ht.prototype,"hovered",void 0),n([I()],ht.prototype,"pressed",void 0),n([P(".surface")],ht.prototype,"mdRoot",void 0);
|
|
1523
1523
|
/**
|
|
1524
1524
|
* @license
|
|
1525
1525
|
* Copyright 2024 Google LLC
|
|
@@ -1571,17 +1571,17 @@ class jt{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{}
|
|
|
1571
1571
|
* @license
|
|
1572
1572
|
* Copyright 2023 Google LLC
|
|
1573
1573
|
* SPDX-License-Identifier: Apache-2.0
|
|
1574
|
-
*/class
|
|
1574
|
+
*/class zt extends jt{computeValidity(t){this.radioElement||(this.radioElement=document.createElement("input"),this.radioElement.type="radio",this.radioElement.name="group");let e=!1,i=!1;for(const{checked:o,required:r}of t)r&&(e=!0),o&&(i=!0);return this.radioElement.checked=i,this.radioElement.required=e,{validity:{valueMissing:e&&!i},validationMessage:this.radioElement.validationMessage}}equals(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++){const o=t[i],r=e[i];if(o.checked!==r.checked||o.required!==r.required)return!1}return!0}copy(t){return t.map((({checked:t,required:e})=>({checked:t,required:e})))}}
|
|
1575
1575
|
/**
|
|
1576
1576
|
* @license
|
|
1577
1577
|
* Copyright 2022 Google LLC
|
|
1578
1578
|
* SPDX-License-Identifier: Apache-2.0
|
|
1579
|
-
*/class
|
|
1579
|
+
*/class It{get controls(){const t=this.host.getAttribute("name");return t&&this.root&&this.host.isConnected?Array.from(this.root.querySelectorAll(`[name="${t}"]`)):[this.host]}constructor(t){this.host=t,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=t=>{const e="ArrowDown"===t.key,i="ArrowUp"===t.key,o="ArrowLeft"===t.key,r="ArrowRight"===t.key;if(!(o||r||e||i))return;const s=this.controls;if(!s.length)return;t.preventDefault();const n="rtl"===getComputedStyle(this.host).direction?o||e:r||e,a=s.indexOf(this.host);let l=n?a+1:a-1;for(;l!==a;){l>=s.length?l=0:l<0&&(l=s.length-1);const t=s[l];if(!t.hasAttribute("disabled")){for(const e of s)e!==t&&(e.checked=!1,e.tabIndex=-1,e.blur());t.checked=!0,t.tabIndex=0,t.focus(),t.dispatchEvent(new Event("change",{bubbles:!0}));break}n?l++:l--}}}hostConnected(){this.root=this.host.getRootNode(),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("focusin",this.handleFocusIn),this.host.addEventListener("focusout",this.handleFocusOut),this.host.checked&&this.uncheckSiblings(),this.updateTabIndices()}hostDisconnected(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("focusin",this.handleFocusIn),this.host.removeEventListener("focusout",this.handleFocusOut),this.updateTabIndices(),this.root=null}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(const t of this.controls)t!==this.host&&(t.checked=!1)}updateTabIndices(){const t=this.controls,e=t.find((t=>t.checked));if(e||this.focused){const i=e||this.host;i.tabIndex=0;for(const e of t)e!==i&&(e.tabIndex=-1)}else for(const e of t)e.tabIndex=0}}
|
|
1580
1580
|
/**
|
|
1581
1581
|
* @license
|
|
1582
1582
|
* Copyright 2018 Google LLC
|
|
1583
1583
|
* SPDX-License-Identifier: Apache-2.0
|
|
1584
|
-
*/var Pt;const Lt=Symbol("checked");let Mt=0;const Ft=function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=""}get validity(){return this[$t](),this[vt].validity}get validationMessage(){return this[$t](),this[vt].validationMessage}get willValidate(){return this[$t](),this[vt].willValidate}checkValidity(){return this[$t](),this[vt].checkValidity()}reportValidity(){return this[$t](),this[vt].reportValidity()}setCustomValidity(t){this[kt]=t,this[$t]()}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[$t]()}firstUpdated(t){super.firstUpdated(t),this[$t]()}[(e=kt,$t)](){if(r)return;this[wt]||(this[wt]=this[ft]());const{validity:t,validationMessage:e}=this[wt].getValidity(),i=!!this[kt],o=this[kt]||e;this[vt].setValidity({...t,customError:i},o,this[xt]()??void 0)}[ft](){throw new Error("Implement [createValidator]")}[xt](){throw new Error("Implement [getValidityAnchor]")}}return i}(function(t){class e extends t{get form(){return this[vt].form}get labels(){return this[vt].labels}get name(){return this.getAttribute("name")??""}set name(t){this.setAttribute("name",t)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",t)}attributeChangedCallback(t,e,i){if("name"!==t&&"disabled"!==t)super.attributeChangedCallback(t,e,i);else{const i="disabled"===t?null!==e:e;this.requestUpdate(t,i)}}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[vt].setFormValue(this[Ot](),this[Tt]())}[Ot](){throw new Error("Implement [getFormValue]")}[Tt](){return this[Ot]()}formDisabledCallback(t){this.disabled=t}}return e.formAssociated=!0,n([
|
|
1584
|
+
*/var Pt;const Lt=Symbol("checked");let Mt=0;const Ft=function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=""}get validity(){return this[$t](),this[vt].validity}get validationMessage(){return this[$t](),this[vt].validationMessage}get willValidate(){return this[$t](),this[vt].willValidate}checkValidity(){return this[$t](),this[vt].checkValidity()}reportValidity(){return this[$t](),this[vt].reportValidity()}setCustomValidity(t){this[kt]=t,this[$t]()}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[$t]()}firstUpdated(t){super.firstUpdated(t),this[$t]()}[(e=kt,$t)](){if(r)return;this[wt]||(this[wt]=this[ft]());const{validity:t,validationMessage:e}=this[wt].getValidity(),i=!!this[kt],o=this[kt]||e;this[vt].setValidity({...t,customError:i},o,this[xt]()??void 0)}[ft](){throw new Error("Implement [createValidator]")}[xt](){throw new Error("Implement [getValidityAnchor]")}}return i}(function(t){class e extends t{get form(){return this[vt].form}get labels(){return this[vt].labels}get name(){return this.getAttribute("name")??""}set name(t){this.setAttribute("name",t)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",t)}attributeChangedCallback(t,e,i){if("name"!==t&&"disabled"!==t)super.attributeChangedCallback(t,e,i);else{const i="disabled"===t?null!==e:e;this.requestUpdate(t,i)}}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[vt].setFormValue(this[Ot](),this[Tt]())}[Ot](){throw new Error("Implement [getFormValue]")}[Tt](){return this[Ot]()}formDisabledCallback(t){this.disabled=t}}return e.formAssociated=!0,n([z({noAccessor:!0})],e.prototype,"name",null),n([z({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}((Rt=function(t){var e,i,o;class r extends t{constructor(){super(...arguments),this[e]=!0,this[i]=null,this[o]=!1}get[St](){return this[Ct]}set[St](t){this[St]!==t&&(this[Ct]=t,this[_t]())}connectedCallback(){super.connectedCallback(),this[_t]()}attributeChangedCallback(t,e,i){if("tabindex"===t){if(this.requestUpdate("tabIndex",Number(e??-1)),!this[At])return this.hasAttribute("tabindex")?void(this[Et]=this.tabIndex):(this[Et]=null,void this[_t]())}else super.attributeChangedCallback(t,e,i)}[(e=Ct,i=Et,o=At,_t)](){const t=this[St]?0:-1,e=this[Et]??t;this[At]=!0,this.tabIndex=e,this[At]=!1}}return n([z({noAccessor:!0})],r.prototype,"tabIndex",void 0),r}(e),class extends Rt{get[vt](){return this[mt]||(this[mt]=this.attachInternals()),this[mt]}})));var Rt;class Bt extends Ft{get checked(){return this[Lt]}set checked(t){const e=this.checked;e!==t&&(this[Lt]=t,this.requestUpdate("checked",e),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId="cutout"+ ++Mt,this[Pt]=!1,this.required=!1,this.value="on",this.selectionController=new It(this),this.addController(this.selectionController),r||(this[vt].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this)))}render(){const t={checked:this.checked};return i`
|
|
1585
1585
|
<div class="container ${s(t)}" aria-hidden="true">
|
|
1586
1586
|
<md-ripple
|
|
1587
1587
|
part="ripple"
|
|
@@ -1604,7 +1604,7 @@ class jt{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{}
|
|
|
1604
1604
|
|
|
1605
1605
|
<div class="touch-target"></div>
|
|
1606
1606
|
</div>
|
|
1607
|
-
`}updated(){this[vt].ariaChecked=String(this.checked)}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(gt(t)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(t){await 0," "!==t.key||t.defaultPrevented||this.click()}[(Pt=Lt,Ot)](){return this.checked?this.value:null}[Tt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(t){this.checked="true"===t}[ft](){return new
|
|
1607
|
+
`}updated(){this[vt].ariaChecked=String(this.checked)}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(gt(t)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(t){await 0," "!==t.key||t.defaultPrevented||this.click()}[(Pt=Lt,Ot)](){return this.checked?this.value:null}[Tt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(t){this.checked="true"===t}[ft](){return new zt((()=>this.selectionController?this.selectionController.controls:[this]))}[xt](){return this.container}}n([z({type:Boolean})],Bt.prototype,"checked",null),n([z({type:Boolean})],Bt.prototype,"required",void 0),n([z()],Bt.prototype,"value",void 0),n([P(".container")],Bt.prototype,"container",void 0);
|
|
1608
1608
|
/**
|
|
1609
1609
|
* @license
|
|
1610
1610
|
* Copyright 2024 Google LLC
|
|
@@ -1675,7 +1675,7 @@ const Nt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1675
1675
|
></md-radio>
|
|
1676
1676
|
<span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
|
|
1677
1677
|
</label>
|
|
1678
|
-
`}};n([
|
|
1678
|
+
`}};n([z({type:String}),a("design:type",Object)],Dt.prototype,"name",void 0),n([z({type:Boolean}),a("design:type",Object)],Dt.prototype,"checked",void 0),n([z({type:Boolean}),a("design:type",Object)],Dt.prototype,"disabled",void 0),n([z({type:Boolean}),a("design:type",Object)],Dt.prototype,"error",void 0),Dt=n([l("custom-radio")],Dt);
|
|
1679
1679
|
/**
|
|
1680
1680
|
* @license
|
|
1681
1681
|
* Copyright 2017 Google LLC
|
|
@@ -2046,7 +2046,7 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2046
2046
|
margin-right: 8px;
|
|
2047
2047
|
flex-shrink: 0;
|
|
2048
2048
|
}
|
|
2049
|
-
`}update(t){if(t.has("options")&&(this.filteredOptions=[...this.options]),t.has("defaultValue")||t.has("options")||t.has("value")){if(this._isCleared)return void super.update(t);const e=this.value||this.defaultValue,i=this.options.find((t=>"string"==typeof t?t===e:t.value===e));i?(this.filterValue="string"==typeof i?i:i.label,this.value="string"==typeof i?i:i.value):(this.filterValue="",this.value="")}super.update(t)}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.isMobile&&(this.mobileFilterValue=""),this.disabled||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){if(!this.filterable)return;this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.filterValue=i,this.value="",this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(this.filterValue.toLowerCase()))),this.isOpen=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.mobileFilterValue=i,this.value="",this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(i))),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0}))}),300)}handleSelect(t){this._isCleared=!1,this.value="string"==typeof t?t:t.value;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.isOpen=!1,this.requestUpdate()}handleIconClick(){this.disabled||(this.filterable&&this.filterValue?(this._isCleared=!0,this.filterValue="",this.value="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1):this.isOpen=!this.isOpen,this.requestUpdate())}handleClickOutside(t){const e=t.target;e instanceof Node&&(this.contains(e)||(this.isOpen=!1,this.requestUpdate()))}handleKeyDown(t){const{key:e}=t;if(!this.isOpen&&("Enter"===e||" "===e))return t.preventDefault(),void(this.isOpen=!0);if(this.isOpen)if("ArrowDown"===e)t.preventDefault(),this.highlightedIndex=Math.min(this.highlightedIndex+1,this.filteredOptions.length-1),this.requestUpdate();else if("ArrowUp"===e)t.preventDefault(),this.highlightedIndex=Math.max(this.highlightedIndex-1,0),this.requestUpdate();else if("Enter"===e){t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];e&&this.handleSelect(e)}else"Escape"===e&&(t.preventDefault(),this.isOpen=!1)}renderSelectedIcon(){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));return t&&"string"!=typeof t&&t.icon&&"string"==typeof t.icon?i`<span class="icon-selected">${
|
|
2049
|
+
`}update(t){if(t.has("options")&&(this.filteredOptions=[...this.options]),t.has("defaultValue")||t.has("options")||t.has("value")){if(this._isCleared)return void super.update(t);const e=this.value||this.defaultValue,i=this.options.find((t=>"string"==typeof t?t===e:t.value===e));i?(this.filterValue="string"==typeof i?i:i.label,this.value="string"==typeof i?i:i.value):(this.filterValue="",this.value="")}super.update(t)}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.isMobile&&(this.mobileFilterValue=""),this.disabled||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){if(!this.filterable)return;this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.filterValue=i,this.value="",this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(this.filterValue.toLowerCase()))),this.isOpen=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.mobileFilterValue=i,this.value="",this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(i))),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0}))}),300)}handleSelect(t){this._isCleared=!1,this.value="string"==typeof t?t:t.value;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.isOpen=!1,this.requestUpdate()}handleIconClick(){this.disabled||(this.filterable&&this.filterValue?(this._isCleared=!0,this.filterValue="",this.value="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1):this.isOpen=!this.isOpen,this.requestUpdate())}handleClickOutside(t){const e=t.target;e instanceof Node&&(this.contains(e)||(this.isOpen=!1,this.requestUpdate()))}handleKeyDown(t){const{key:e}=t;if(!this.isOpen&&("Enter"===e||" "===e))return t.preventDefault(),void(this.isOpen=!0);if(this.isOpen)if("ArrowDown"===e)t.preventDefault(),this.highlightedIndex=Math.min(this.highlightedIndex+1,this.filteredOptions.length-1),this.requestUpdate();else if("ArrowUp"===e)t.preventDefault(),this.highlightedIndex=Math.max(this.highlightedIndex-1,0),this.requestUpdate();else if("Enter"===e){t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];e&&this.handleSelect(e)}else"Escape"===e&&(t.preventDefault(),this.isOpen=!1)}renderSelectedIcon(){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));return t&&"string"!=typeof t&&t.icon&&"string"==typeof t.icon?i`<span class="icon-selected">${this.getSanitizeSvg(t.icon??"")}</span>`:o}getSanitizeSvg(t){return _e(t)}render(){const t=this.isMobile;return i`
|
|
2050
2050
|
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
2051
2051
|
${this.label?i`
|
|
2052
2052
|
<div class="label-container">
|
|
@@ -2119,7 +2119,7 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2119
2119
|
aria-selected="${e===this.highlightedIndex}"
|
|
2120
2120
|
@click="${()=>{s||this.handleSelect(t)}}"
|
|
2121
2121
|
>
|
|
2122
|
-
${n?i`<span class="icon-list">${
|
|
2122
|
+
${n&&"string"==typeof n?i`<span class="icon-list">${this.getSanitizeSvg(n??"")}</span>`:o}
|
|
2123
2123
|
${r}
|
|
2124
2124
|
</li>
|
|
2125
2125
|
`}))}
|
|
@@ -2135,7 +2135,7 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2135
2135
|
aria-selected="${e===this.highlightedIndex}"
|
|
2136
2136
|
@click="${()=>{s||this.handleSelect(t)}}"
|
|
2137
2137
|
>
|
|
2138
|
-
${n?i`<span class="icon-list">${
|
|
2138
|
+
${n&&"string"==typeof n?i`<span class="icon-list">${this.getSanitizeSvg(n??"")}</span>`:o}
|
|
2139
2139
|
${r}
|
|
2140
2140
|
</li>
|
|
2141
2141
|
</li>
|
|
@@ -2144,7 +2144,7 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2144
2144
|
`:""}
|
|
2145
2145
|
</div>
|
|
2146
2146
|
</div>
|
|
2147
|
-
`}};n([
|
|
2147
|
+
`}};n([z({type:Array}),a("design:type",Array)],Oe.prototype,"options",void 0),n([z({type:String}),a("design:type",Object)],Oe.prototype,"placeholder",void 0),n([z({type:String,attribute:"default-value"}),a("design:type",Object)],Oe.prototype,"defaultValue",void 0),n([z({type:Boolean}),a("design:type",Object)],Oe.prototype,"disabled",void 0),n([z({type:Object}),a("design:type",Object)],Oe.prototype,"value",void 0),n([z({type:String}),a("design:type",Object)],Oe.prototype,"label",void 0),n([z({type:String}),a("design:type",Object)],Oe.prototype,"labelColor",void 0),n([z({type:Boolean}),a("design:type",Object)],Oe.prototype,"filterable",void 0),n([z({type:Number}),a("design:type",Number)],Oe.prototype,"maxLength",void 0),n([z({type:Boolean,reflect:!0}),a("design:type",Boolean)],Oe.prototype,"error",void 0),n([z({type:Boolean}),a("design:type",Object)],Oe.prototype,"required",void 0),n([z({type:Boolean}),a("design:type",Object)],Oe.prototype,"optional",void 0),n([I(),a("design:type",Boolean)],Oe.prototype,"isMobile",void 0),n([I(),a("design:type",Array)],Oe.prototype,"filteredOptions",void 0),n([I(),a("design:type",Object)],Oe.prototype,"filterValue",void 0),n([I(),a("design:type",Object)],Oe.prototype,"isOpen",void 0),n([I(),a("design:type",Object)],Oe.prototype,"mobileFilterValue",void 0),n([I(),a("design:type",Object)],Oe.prototype,"highlightedIndex",void 0),n([I(),a("design:type",Boolean)],Oe.prototype,"_isCleared",void 0),Oe=n([l("filterable-select")],Oe);const Te=new CSSStyleSheet;Te.replaceSync("\n @font-face {\n font-family: 'Graphik';\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n .body-s {\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n letter-spacing: 0%;\n color: green;\n }\n");class je extends e{static{this.styles=[Te,t`
|
|
2148
2148
|
:host {
|
|
2149
2149
|
display: flex;
|
|
2150
2150
|
position: fixed;
|
|
@@ -2280,7 +2280,7 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2280
2280
|
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
2281
2281
|
<span class="message">${this.message}</span>
|
|
2282
2282
|
</div>
|
|
2283
|
-
`}}customElements.define("randstad-snackbar",je);let
|
|
2283
|
+
`}}customElements.define("randstad-snackbar",je);let ze=class extends e{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=t`
|
|
2284
2284
|
.stepper {
|
|
2285
2285
|
display: flex;
|
|
2286
2286
|
gap: 20px;
|
|
@@ -2380,7 +2380,7 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2380
2380
|
</div>
|
|
2381
2381
|
`))}
|
|
2382
2382
|
</div>
|
|
2383
|
-
`}};n([
|
|
2383
|
+
`}};n([z({type:Number}),a("design:type",Object)],ze.prototype,"totalSteps",void 0),n([z({type:Number}),a("design:type",Object)],ze.prototype,"currentStep",void 0),ze=n([l("custom-stepper")],ze);let Ie=class extends e{constructor(){super(...arguments),this.tabs=[],this.selected="",this.internalSelected="",this.showPrev=!1,this.showNext=!1,this.SCROLL_OFFSET=56,this.handleScroll=()=>{const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const{scrollLeft:e,scrollWidth:i,clientWidth:o}=t;this.showPrev=e>0,this.showNext=e+o<i-1}}static{this.styles=t`
|
|
2384
2384
|
:host {
|
|
2385
2385
|
display: block;
|
|
2386
2386
|
border-bottom: 1px solid #E7E8EC;
|
|
@@ -2519,7 +2519,7 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2519
2519
|
</button>
|
|
2520
2520
|
`:null}
|
|
2521
2521
|
</div>
|
|
2522
|
-
`}};n([
|
|
2522
|
+
`}};n([z({type:Array}),a("design:type",Array)],Ie.prototype,"tabs",void 0),n([z({type:String}),a("design:type",String)],Ie.prototype,"selected",void 0),n([I(),a("design:type",String)],Ie.prototype,"internalSelected",void 0),n([I(),a("design:type",Object)],Ie.prototype,"showPrev",void 0),n([I(),a("design:type",Object)],Ie.prototype,"showNext",void 0),Ie=n([l("tabs-bar")],Ie);let Pe=class extends e{constructor(){super(...arguments),this.files=[],this.loading=!1,this.progress=0,this.isDragging=!1,this.disabled=!1}static{this.styles=t`
|
|
2523
2523
|
|
|
2524
2524
|
:host {
|
|
2525
2525
|
font-family: 'Graphik', sans-serif;
|
|
@@ -2643,5 +2643,5 @@ class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(
|
|
|
2643
2643
|
</label>
|
|
2644
2644
|
`}
|
|
2645
2645
|
</div>
|
|
2646
|
-
`}};n([
|
|
2646
|
+
`}};n([z({type:Array}),a("design:type",Array)],Pe.prototype,"files",void 0),n([I(),a("design:type",Object)],Pe.prototype,"loading",void 0),n([I(),a("design:type",Object)],Pe.prototype,"progress",void 0),n([I(),a("design:type",Object)],Pe.prototype,"isDragging",void 0),n([z({type:Boolean,reflect:!0}),a("design:type",Object)],Pe.prototype,"disabled",void 0),Pe=n([l("upload-image")],Pe);export{V as AccordionList,D as AccordionPanel,H as CarouselCard,G as Checkbox,J as CustomModal,Z as CustomPopup,Dt as CustomRadio,ze as CustomStepper,Oe as FilterableSelect,K as FormGroup,Y as IconComponent,Q as ProgressCircle,q as RandstadButton,W as RandstadForm,X as RandstadNotice,Ie as TabsBar,Pe as UploadImage};
|
|
2647
2647
|
//# sourceMappingURL=index.js.map
|