@randstad-uca/design-system 1.0.35 → 1.0.36
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 +5 -2
- package/dist/index.js +187 -107
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/stories/Select.stories.d.ts +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,23 +9,23 @@ const l=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)}
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/let u=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=h.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&h.set(e,t))}return t}toString(){return this.cssText}};const b=
|
|
12
|
+
*/let u=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=h.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&h.set(e,t))}return t}toString(){return this.cssText}};const b=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,p))(e)})(t):t,{is:g,defineProperty:y,getOwnPropertyDescriptor:v,getOwnPropertyNames:m,getOwnPropertySymbols:f,getPrototypeOf:x}=Object,w=globalThis,$=w.trustedTypes,k=$?$.emptyScript:"",S=w.reactiveElementPolyfillSupport,C=(t,e)=>t,E={toAttribute(t,e){switch(e){case Boolean:t=t?k:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},A=(t,e)=>!g(t,e),_={attribute:!0,type:String,converter:E,reflect:!1,useDefault:!1,hasChanged:A};
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/Symbol.metadata??=Symbol("metadata"),
|
|
17
|
+
*/Symbol.metadata??=Symbol("metadata"),w.litPropertyMetadata??=new WeakMap;class O extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&y(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=v(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=o?.call(this);r?.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_}static _$Ei(){if(this.hasOwnProperty(C("elementProperties")))return;const t=x(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(C("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(C("properties"))){const t=this.properties,e=[...m(t),...f(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(b(t))}else void 0!==t&&e.push(b(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.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((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(c)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=d.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:E).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:E;this._$Em=o,this[o]=r.fromAttribute(e,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const o=this.constructor,r=this[t];if(i??=o.getPropertyOptions(t),!((i.hasChanged??A)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:r},s){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==r||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}O.elementStyles=[],O.shadowRootOptions={mode:"open"},O[C("elementProperties")]=new Map,O[C("finalized")]=new Map,S?.({ReactiveElement:O}),(w.reactiveElementVersions??=[]).push("2.1.0");
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
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 I(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 z(t){return I({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,52 +36,52 @@ const P={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:A},I=(t=P,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function
|
|
39
|
+
function P(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}const L=t`
|
|
40
40
|
font-family: 'Graphik', sans-serif;
|
|
41
41
|
font-weight: 400;
|
|
42
42
|
font-size: 12px;
|
|
43
43
|
line-height: 15px;
|
|
44
44
|
letter-spacing: 0%;
|
|
45
|
-
`,
|
|
45
|
+
`,M=t`
|
|
46
46
|
font-family: 'Graphik', sans-serif;
|
|
47
47
|
font-weight: 400;
|
|
48
48
|
font-size: 14px;
|
|
49
49
|
line-height: 25px;
|
|
50
50
|
letter-spacing: 0%;
|
|
51
|
-
`,
|
|
51
|
+
`,F=t`
|
|
52
52
|
font-family: 'Graphik', sans-serif;
|
|
53
53
|
font-weight: 400;
|
|
54
54
|
font-size: 16px;
|
|
55
55
|
line-height: 25px;
|
|
56
56
|
letter-spacing: 0%;
|
|
57
|
-
`,
|
|
57
|
+
`,R=t`
|
|
58
58
|
font-family: 'Graphik', sans-serif;
|
|
59
59
|
font-weight: 400;
|
|
60
60
|
font-size: 18px;
|
|
61
61
|
line-height: 30px;
|
|
62
62
|
letter-spacing: 0%;
|
|
63
|
-
`,
|
|
63
|
+
`,B=t`
|
|
64
64
|
font-family: 'Graphik', sans-serif;
|
|
65
65
|
font-weight: 400;
|
|
66
66
|
font-size: 18px;
|
|
67
67
|
line-height: 30px;
|
|
68
68
|
letter-spacing: 0%;
|
|
69
69
|
vertical-align: middle;
|
|
70
|
-
`,
|
|
70
|
+
`,N=t`
|
|
71
71
|
font-family: 'Graphik', sans-serif;
|
|
72
72
|
font-weight: 400;
|
|
73
73
|
font-size: 20px;
|
|
74
74
|
line-height: 30px;
|
|
75
75
|
letter-spacing: -1%;
|
|
76
76
|
vertical-align: middle;
|
|
77
|
-
`,
|
|
77
|
+
`,U=t`
|
|
78
78
|
font-family: 'Graphik', sans-serif;
|
|
79
79
|
font-weight: 400;
|
|
80
80
|
font-size: 26px;
|
|
81
81
|
line-height: 30px;
|
|
82
82
|
letter-spacing: -1%;
|
|
83
83
|
vertical-align: middle;
|
|
84
|
-
`;let
|
|
84
|
+
`;let D=class extends e{constructor(){super(...arguments),this.title="",this.isOpen=!1,this.isDesktop=window.innerWidth>940,this.handleResize=()=>{this.isDesktop=window.innerWidth>940}}static{this.styles=t`
|
|
85
85
|
:host {
|
|
86
86
|
display: flex;
|
|
87
87
|
flex-direction: column;
|
|
@@ -100,7 +100,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.title {
|
|
103
|
-
${
|
|
103
|
+
${F}
|
|
104
104
|
color: var(--secondary-color);
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -159,13 +159,13 @@ function F(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([I({type:String}),a("design:type",Object)],D.prototype,"title",void 0),n([z(),a("design:type",Object)],D.prototype,"isOpen",void 0),n([z(),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;
|
|
166
166
|
gap: 16px;
|
|
167
167
|
}
|
|
168
|
-
`}render(){return i`<slot></slot>`}};
|
|
168
|
+
`}render(){return i`<slot></slot>`}};V=n([l("accordion-list")],V);let q=class extends e{constructor(){super(...arguments),this.variant="button-primary",this.size="md",this.label="",this.loader=!1,this.iconPosition="left",this.disabled=!1,this.iconName=null,this.type="button",this.idevent=""}static{this.styles=t`
|
|
169
169
|
:host {
|
|
170
170
|
display: inline-block;
|
|
171
171
|
}
|
|
@@ -185,12 +185,12 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
.button-lg {
|
|
188
|
-
${
|
|
188
|
+
${R}
|
|
189
189
|
min-height: 62px;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.button-md {
|
|
193
|
-
${
|
|
193
|
+
${F}
|
|
194
194
|
min-height: 57px;
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -410,7 +410,7 @@ function F(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([I({type:String}),a("design:type",String)],q.prototype,"variant",void 0),n([I({type:String}),a("design:type",String)],q.prototype,"size",void 0),n([I({type:String}),a("design:type",Object)],q.prototype,"label",void 0),n([I({type:Boolean}),a("design:type",Object)],q.prototype,"loader",void 0),n([I({type:String,attribute:"icon-src"}),a("design:type",String)],q.prototype,"iconSrc",void 0),n([I({type:String}),a("design:type",String)],q.prototype,"iconPosition",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],q.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],q.prototype,"iconName",void 0),n([I({type:String}),a("design:type",String)],q.prototype,"type",void 0),n([I({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;
|
|
@@ -469,7 +469,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
.title {
|
|
472
|
-
${
|
|
472
|
+
${R}
|
|
473
473
|
margin: 0;
|
|
474
474
|
}
|
|
475
475
|
|
|
@@ -489,7 +489,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
.description {
|
|
492
|
-
${
|
|
492
|
+
${M}
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
::part(button) {
|
|
@@ -527,14 +527,14 @@ function F(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([I({type:String}),a("design:type",Object)],H.prototype,"img",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"name",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"title",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"description",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"buttonLabel",void 0),n([I({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%;
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
label {
|
|
537
|
-
${
|
|
537
|
+
${M}
|
|
538
538
|
display: flex;
|
|
539
539
|
align-items: center;
|
|
540
540
|
gap: 8px;
|
|
@@ -642,7 +642,7 @@ function F(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([I({type:Boolean,reflect:!0}),a("design:type",Object)],G.prototype,"checked",void 0),n([I({type:Boolean}),a("design:type",Object)],G.prototype,"error",void 0),n([I({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;
|
|
@@ -664,7 +664,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
664
664
|
}
|
|
665
665
|
|
|
666
666
|
.form-label {
|
|
667
|
-
${
|
|
667
|
+
${F}
|
|
668
668
|
display: flex;
|
|
669
669
|
align-items: baseline;
|
|
670
670
|
flex-direction: row;
|
|
@@ -680,7 +680,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
680
680
|
}
|
|
681
681
|
|
|
682
682
|
.form-input {
|
|
683
|
-
${
|
|
683
|
+
${R}
|
|
684
684
|
padding: 16px;
|
|
685
685
|
border: 1px solid var(--secondary-color-10);
|
|
686
686
|
border-radius: 4px;
|
|
@@ -715,7 +715,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
715
715
|
}
|
|
716
716
|
|
|
717
717
|
input::placeholder {
|
|
718
|
-
${
|
|
718
|
+
${R}
|
|
719
719
|
color: var(--secondary-color-40);
|
|
720
720
|
}
|
|
721
721
|
|
|
@@ -756,7 +756,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
textarea {
|
|
759
|
-
${
|
|
759
|
+
${R}
|
|
760
760
|
resize: none;
|
|
761
761
|
}
|
|
762
762
|
|
|
@@ -771,19 +771,19 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
771
771
|
}
|
|
772
772
|
|
|
773
773
|
.helper-description {
|
|
774
|
-
${
|
|
774
|
+
${F}
|
|
775
775
|
color: var(--secondary-color-40);
|
|
776
776
|
margin: 0px;
|
|
777
777
|
}
|
|
778
778
|
|
|
779
779
|
.error-message {
|
|
780
|
-
${
|
|
780
|
+
${F}
|
|
781
781
|
color: var(--ui-negative);
|
|
782
782
|
margin: 0px;
|
|
783
783
|
}
|
|
784
784
|
|
|
785
785
|
.link-text {
|
|
786
|
-
${
|
|
786
|
+
${F}
|
|
787
787
|
color: var(--primary-color);
|
|
788
788
|
cursor: pointer;
|
|
789
789
|
text-align: end;
|
|
@@ -873,7 +873,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
873
873
|
|
|
874
874
|
.optional {
|
|
875
875
|
color: var(--secondary-color-60);
|
|
876
|
-
${
|
|
876
|
+
${L}
|
|
877
877
|
}
|
|
878
878
|
`}togglePassword(t){this.isPasswordVisible=!this.isPasswordVisible;const e=t.currentTarget.parentElement?.querySelector("input");e&&(e.type=this.isPasswordVisible?"text":"password"),this.requestUpdate()}handleInput(t){const e=t.target.value;void 0!==this.maxLength&&"textarea"!==this.type?this.value=e.slice(0,this.maxLength):this.value=e,this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleClear(){this.value="",this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleLinkClick(t){t.preventDefault(),this.linkRoute&&this.dispatchEvent(new CustomEvent("linkClicked",{detail:this.linkRoute,bubbles:!0,composed:!0}))}handleKeyDown(t){if("Enter"===t.key){const t=new Event("submit",{bubbles:!0,composed:!0,cancelable:!0}),e=this.closest("form");e&&e.dispatchEvent(t)}}render(){const t=this.cleanButton&&this.value&&"password"!==this.type&&"textarea"!==this.type;return i`
|
|
879
879
|
<div
|
|
@@ -946,7 +946,7 @@ function F(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([I({type:String}),a("design:type",String)],W.prototype,"placeholder",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"labelColor",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"value",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"size",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"icon",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"helper",void 0),n([I({type:Boolean}),a("design:type",Boolean)],W.prototype,"error",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"errorMessage",void 0),n([I({type:Boolean}),a("design:type",Boolean)],W.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Boolean)],W.prototype,"typing",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"type",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"tooltipMessage",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"linkText",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"linkRoute",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],W.prototype,"isPasswordVisible",void 0),n([I({type:Boolean}),a("design:type",Boolean)],W.prototype,"cleanButton",void 0),n([I({type:Number}),a("design:type",Number)],W.prototype,"maxLength",void 0),n([I({type:Boolean}),a("design:type",Object)],W.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],W.prototype,"optional",void 0),n([I({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;
|
|
@@ -956,7 +956,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
956
956
|
}
|
|
957
957
|
|
|
958
958
|
.form-label {
|
|
959
|
-
${
|
|
959
|
+
${F}
|
|
960
960
|
display: flex;
|
|
961
961
|
align-items: baseline;
|
|
962
962
|
flex-direction: row;
|
|
@@ -971,12 +971,12 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
971
971
|
}
|
|
972
972
|
|
|
973
973
|
.helper {
|
|
974
|
-
${
|
|
974
|
+
${F}
|
|
975
975
|
color: var(--secondary-color-40);
|
|
976
976
|
}
|
|
977
977
|
|
|
978
978
|
.error {
|
|
979
|
-
${
|
|
979
|
+
${F}
|
|
980
980
|
color: var(--ui-negative);
|
|
981
981
|
}
|
|
982
982
|
|
|
@@ -986,7 +986,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
986
986
|
|
|
987
987
|
.optional {
|
|
988
988
|
color: var(--secondary-color-60);
|
|
989
|
-
${
|
|
989
|
+
${L}
|
|
990
990
|
}
|
|
991
991
|
`}render(){return i`
|
|
992
992
|
<label class="form-label">
|
|
@@ -999,7 +999,7 @@ function F(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([I({type:String}),a("design:type",Object)],K.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],K.prototype,"helper",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"error",void 0),n([I({type:String}),a("design:type",Object)],K.prototype,"errorMessage",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"required",void 0),n([I({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,14 +1013,14 @@ function F(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([I({type:String}),a("design:type",Object)],Y.prototype,"name",void 0),n([I({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;
|
|
1020
1020
|
}
|
|
1021
1021
|
|
|
1022
1022
|
.container {
|
|
1023
|
-
${
|
|
1023
|
+
${F}
|
|
1024
1024
|
display: flex;
|
|
1025
1025
|
align-items: flex-start;
|
|
1026
1026
|
gap: 8px;
|
|
@@ -1066,7 +1066,7 @@ function F(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([I({type:String}),a("design:type",String)],X.prototype,"type",void 0),n([I({type:String}),a("design:type",String)],X.prototype,"icon",void 0),n([I({type:String}),a("design:type",String)],X.prototype,"message",void 0),n([I({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;
|
|
@@ -1145,13 +1145,13 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
1147
|
.modal-title {
|
|
1148
|
-
${
|
|
1148
|
+
${U}
|
|
1149
1149
|
margin: 0;
|
|
1150
1150
|
color: var(--secondary-color);
|
|
1151
1151
|
}
|
|
1152
1152
|
|
|
1153
1153
|
.modal-subtitle {
|
|
1154
|
-
${
|
|
1154
|
+
${F}
|
|
1155
1155
|
margin: 0;
|
|
1156
1156
|
color: var(--secondary-color-60);
|
|
1157
1157
|
}
|
|
@@ -1241,7 +1241,7 @@ function F(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([I({type:Boolean,reflect:!0}),a("design:type",Object)],J.prototype,"open",void 0),n([I({type:String}),a("design:type",Object)],J.prototype,"title",void 0),n([I({type:String}),a("design:type",String)],J.prototype,"subtitle",void 0),n([I({type:Boolean}),a("design:type",Object)],J.prototype,"showNotice",void 0),n([I({type:String}),a("design:type",String)],J.prototype,"noticeType",void 0),n([I({type:String}),a("design:type",Object)],J.prototype,"noticeMessage",void 0),n([I({type:String}),a("design:type",Object)],J.prototype,"noticeIcon",void 0),n([I({type:Boolean}),a("design:type",Object)],J.prototype,"showPrimaryButton",void 0),n([I({type:String}),a("design:type",Object)],J.prototype,"primaryButtonLabel",void 0),n([I({type:Boolean}),a("design:type",Object)],J.prototype,"showSecondaryButton",void 0),n([I({type:String}),a("design:type",Object)],J.prototype,"secondaryButtonLabel",void 0),n([z(),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;
|
|
@@ -1303,13 +1303,13 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1303
1303
|
}
|
|
1304
1304
|
|
|
1305
1305
|
.popup-title {
|
|
1306
|
-
${
|
|
1306
|
+
${N}
|
|
1307
1307
|
margin: 0;
|
|
1308
1308
|
color: var(--secondary-color-80);
|
|
1309
1309
|
}
|
|
1310
1310
|
|
|
1311
1311
|
.popup-description {
|
|
1312
|
-
${
|
|
1312
|
+
${F}
|
|
1313
1313
|
margin: 0;
|
|
1314
1314
|
color: var(--secondary-color-60);
|
|
1315
1315
|
}
|
|
@@ -1337,7 +1337,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1337
1337
|
}
|
|
1338
1338
|
|
|
1339
1339
|
.action-item {
|
|
1340
|
-
${
|
|
1340
|
+
${B};
|
|
1341
1341
|
display: flex;
|
|
1342
1342
|
align-items: center;
|
|
1343
1343
|
gap: 16px;
|
|
@@ -1425,7 +1425,7 @@ function F(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([I({type:Boolean,reflect:!0}),a("design:type",Object)],Z.prototype,"open",void 0),n([I({type:String}),a("design:type",String)],Z.prototype,"type",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"icon",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"title",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"description",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"width",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"buttonText",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"confirmText",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"cancelText",void 0),n([I({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;
|
|
@@ -1438,7 +1438,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1438
1438
|
}
|
|
1439
1439
|
|
|
1440
1440
|
.circle-text {
|
|
1441
|
-
${
|
|
1441
|
+
${L};
|
|
1442
1442
|
text-align: center;
|
|
1443
1443
|
vertical-align: middle;
|
|
1444
1444
|
fill: var(--randstad-dark-blue-40);
|
|
@@ -1486,18 +1486,18 @@ function F(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([I({type:Number}),a("design:type",Object)],Q.prototype,"value",void 0),n([I({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
|
|
1493
1493
|
* SPDX-License-Identifier: Apache-2.0
|
|
1494
1494
|
*/
|
|
1495
|
-
const
|
|
1495
|
+
const tt=Symbol("attachableController");let et;r||(et=new MutationObserver((t=>{for(const e of t)e.target[tt]?.hostConnected()})));class it{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(t){null===t?this.host.removeAttribute("for"):this.host.setAttribute("for",t)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(t){t?this.attach(t):this.detach()}constructor(t,e){this.host=t,this.onControlChange=e,this.currentControl=null,t.addController(this),t[tt]=this,et?.observe(t,{attributeFilter:["for"]})}attach(t){t!==this.currentControl&&(this.setCurrentControl(t),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(t){this.onControlChange(this.currentControl,t),this.currentControl=t}}
|
|
1496
1496
|
/**
|
|
1497
1497
|
* @license
|
|
1498
1498
|
* Copyright 2021 Google LLC
|
|
1499
1499
|
* SPDX-License-Identifier: Apache-2.0
|
|
1500
|
-
*/const
|
|
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([I({type:Boolean,reflect:!0})],rt.prototype,"visible",void 0),n([I({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
|
|
@@ -1508,80 +1508,80 @@ const et=Symbol("attachableController");let it;r||(it=new MutationObserver((t=>{
|
|
|
1508
1508
|
* @license
|
|
1509
1509
|
* Copyright 2024 Google LLC
|
|
1510
1510
|
* SPDX-License-Identifier: Apache-2.0
|
|
1511
|
-
*/let
|
|
1511
|
+
*/let at=class extends rt{};at.styles=[nt],at=n([l("md-focus-ring")],at);
|
|
1512
1512
|
/**
|
|
1513
1513
|
* @license
|
|
1514
1514
|
* Copyright 2021 Google LLC
|
|
1515
1515
|
* SPDX-License-Identifier: Apache-2.0
|
|
1516
1516
|
*/
|
|
1517
|
-
const
|
|
1517
|
+
const lt="cubic-bezier(0.2, 0, 0, 1)";
|
|
1518
1518
|
/**
|
|
1519
1519
|
* @license
|
|
1520
1520
|
* Copyright 2022 Google LLC
|
|
1521
1521
|
* SPDX-License-Identifier: Apache-2.0
|
|
1522
|
-
*/var
|
|
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([I({type:Boolean,reflect:!0})],ht.prototype,"disabled",void 0),n([z()],ht.prototype,"hovered",void 0),n([z()],ht.prototype,"pressed",void 0),n([P(".surface")],ht.prototype,"mdRoot",void 0);
|
|
1523
1523
|
/**
|
|
1524
1524
|
* @license
|
|
1525
1525
|
* Copyright 2024 Google LLC
|
|
1526
1526
|
* SPDX-License-Identifier: Apache-2.0
|
|
1527
1527
|
*/
|
|
1528
|
-
const
|
|
1528
|
+
const ut=t`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
|
|
1529
1529
|
`
|
|
1530
1530
|
/**
|
|
1531
1531
|
* @license
|
|
1532
1532
|
* Copyright 2022 Google LLC
|
|
1533
1533
|
* SPDX-License-Identifier: Apache-2.0
|
|
1534
|
-
*/;let
|
|
1534
|
+
*/;let bt=class extends ht{};
|
|
1535
1535
|
/**
|
|
1536
1536
|
* @license
|
|
1537
1537
|
* Copyright 2021 Google LLC
|
|
1538
1538
|
* SPDX-License-Identifier: Apache-2.0
|
|
1539
1539
|
*/
|
|
1540
|
-
function
|
|
1540
|
+
function gt(t){return t.currentTarget===t.target&&(t.composedPath()[0]===t.target&&(!t.target.disabled&&!function(t){const e=yt;e&&(t.preventDefault(),t.stopImmediatePropagation());return async function(){yt=!0,await null,yt=!1}
|
|
1541
1541
|
/**
|
|
1542
1542
|
* @license
|
|
1543
1543
|
* Copyright 2023 Google LLC
|
|
1544
1544
|
* SPDX-License-Identifier: Apache-2.0
|
|
1545
|
-
*/(),e}(t)))}
|
|
1545
|
+
*/(),e}(t)))}bt.styles=[ut],bt=n([l("md-ripple")],bt);let yt=!1;const vt=Symbol("internals"),mt=Symbol("privateInternals");
|
|
1546
1546
|
/**
|
|
1547
1547
|
* @license
|
|
1548
1548
|
* Copyright 2023 Google LLC
|
|
1549
1549
|
* SPDX-License-Identifier: Apache-2.0
|
|
1550
1550
|
*/
|
|
1551
|
-
const
|
|
1551
|
+
const ft=Symbol("createValidator"),xt=Symbol("getValidityAnchor"),wt=Symbol("privateValidator"),$t=Symbol("privateSyncValidity"),kt=Symbol("privateCustomValidationMessage");
|
|
1552
1552
|
/**
|
|
1553
1553
|
* @license
|
|
1554
1554
|
* Copyright 2023 Google LLC
|
|
1555
1555
|
* SPDX-License-Identifier: Apache-2.0
|
|
1556
1556
|
*/
|
|
1557
|
-
const
|
|
1557
|
+
const St=Symbol("isFocusable"),Ct=Symbol("privateIsFocusable"),Et=Symbol("externalTabIndex"),At=Symbol("isUpdatingTabIndex"),_t=Symbol("updateTabIndex");
|
|
1558
1558
|
/**
|
|
1559
1559
|
* @license
|
|
1560
1560
|
* Copyright 2023 Google LLC
|
|
1561
1561
|
* SPDX-License-Identifier: Apache-2.0
|
|
1562
1562
|
*/
|
|
1563
|
-
const
|
|
1563
|
+
const Ot=Symbol("getFormValue"),Tt=Symbol("getFormState");
|
|
1564
1564
|
/**
|
|
1565
1565
|
* @license
|
|
1566
1566
|
* Copyright 2023 Google LLC
|
|
1567
1567
|
* SPDX-License-Identifier: Apache-2.0
|
|
1568
1568
|
*/
|
|
1569
|
-
class
|
|
1569
|
+
class jt{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const t=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,t)))return this.currentValidity;const{validity:e,validationMessage:i}=this.computeValidity(t);return this.prevState=this.copy(t),this.currentValidity={validationMessage:i,validity:{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing}},this.currentValidity}}
|
|
1570
1570
|
/**
|
|
1571
1571
|
* @license
|
|
1572
1572
|
* Copyright 2023 Google LLC
|
|
1573
1573
|
* SPDX-License-Identifier: Apache-2.0
|
|
1574
|
-
*/class
|
|
1574
|
+
*/class It 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 zt{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
|
|
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([I({noAccessor:!0})],e.prototype,"name",null),n([I({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([I({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 zt(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,19 +1604,19 @@ class It{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{}
|
|
|
1604
1604
|
|
|
1605
1605
|
<div class="touch-target"></div>
|
|
1606
1606
|
</div>
|
|
1607
|
-
`}updated(){this[
|
|
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 It((()=>this.selectionController?this.selectionController.controls:[this]))}[xt](){return this.container}}n([I({type:Boolean})],Bt.prototype,"checked",null),n([I({type:Boolean})],Bt.prototype,"required",void 0),n([I()],Bt.prototype,"value",void 0),n([P(".container")],Bt.prototype,"container",void 0);
|
|
1608
1608
|
/**
|
|
1609
1609
|
* @license
|
|
1610
1610
|
* Copyright 2024 Google LLC
|
|
1611
1611
|
* SPDX-License-Identifier: Apache-2.0
|
|
1612
1612
|
*/
|
|
1613
|
-
const
|
|
1613
|
+
const Nt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}}
|
|
1614
1614
|
`
|
|
1615
1615
|
/**
|
|
1616
1616
|
* @license
|
|
1617
1617
|
* Copyright 2022 Google LLC
|
|
1618
1618
|
* SPDX-License-Identifier: Apache-2.0
|
|
1619
|
-
*/;let
|
|
1619
|
+
*/;let Ut=class extends Bt{};Ut.styles=[Nt],Ut=n([l("md-radio")],Ut);let Dt=class extends e{constructor(){super(...arguments),this.name="radio-group",this.checked=!1,this.disabled=!1,this.error=!1}static{this.styles=t`
|
|
1620
1620
|
:host {
|
|
1621
1621
|
font-family: "Graphik", sans-serif;
|
|
1622
1622
|
}
|
|
@@ -1675,7 +1675,30 @@ const Ut=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([I({type:String}),a("design:type",Object)],Dt.prototype,"name",void 0),n([I({type:Boolean}),a("design:type",Object)],Dt.prototype,"checked",void 0),n([I({type:Boolean}),a("design:type",Object)],Dt.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Object)],Dt.prototype,"error",void 0),Dt=n([l("custom-radio")],Dt);
|
|
1679
|
+
/**
|
|
1680
|
+
* @license
|
|
1681
|
+
* Copyright 2017 Google LLC
|
|
1682
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1683
|
+
*/
|
|
1684
|
+
const Vt=2;let qt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
1685
|
+
/**
|
|
1686
|
+
* @license
|
|
1687
|
+
* Copyright 2017 Google LLC
|
|
1688
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1689
|
+
*/const Ht=globalThis,Gt=Ht.trustedTypes,Wt=Gt?Gt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Kt="$lit$",Yt=`lit$${Math.random().toFixed(9).slice(2)}$`,Xt="?"+Yt,Jt=`<${Xt}>`,Zt=document,Qt=()=>Zt.createComment(""),te=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ee=Array.isArray,ie="[ \t\n\f\r]",oe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,re=/-->/g,se=/>/g,ne=RegExp(`>|${ie}(?:([^\\s"'>=/]+)(${ie}*=${ie}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ae=/'/g,le=/"/g,de=/^(?:script|style|textarea|title)$/i,ce=Symbol.for("lit-noChange"),pe=Symbol.for("lit-nothing"),he=new WeakMap,ue=Zt.createTreeWalker(Zt,129);function be(t,e){if(!ee(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Wt?Wt.createHTML(e):e}const ge=(t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":3===e?"<math>":"",n=oe;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===oe?"!--"===l[1]?n=re:void 0!==l[1]?n=se:void 0!==l[2]?(de.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=ne):void 0!==l[3]&&(n=ne):n===ne?">"===l[0]?(n=r??oe,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?ne:'"'===l[3]?le:ae):n===le||n===ae?n=ne:n===re||n===se?n=oe:(n=ne,r=void 0);const p=n===ne&&t[e+1].startsWith("/>")?" ":"";s+=n===oe?i+Jt:d>=0?(o.push(a),i.slice(0,d)+Kt+i.slice(d)+Yt+p):i+Yt+(-2===d?e:p)}return[be(t,s+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]};class ye{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[l,d]=ge(t,e);if(this.el=ye.createElement(l,i),ue.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=ue.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(Kt)){const e=d[s++],i=o.getAttribute(t).split(Yt),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:i,ctor:"."===n[1]?we:"?"===n[1]?$e:"@"===n[1]?ke:xe}),o.removeAttribute(t)}else t.startsWith(Yt)&&(a.push({type:6,index:r}),o.removeAttribute(t));if(de.test(o.tagName)){const t=o.textContent.split(Yt),e=t.length-1;if(e>0){o.textContent=Gt?Gt.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],Qt()),ue.nextNode(),a.push({type:2,index:++r});o.append(t[e],Qt())}}}else if(8===o.nodeType)if(o.data===Xt)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(Yt,t+1));)a.push({type:7,index:r}),t+=Yt.length-1}r++}}static createElement(t,e){const i=Zt.createElement("template");return i.innerHTML=t,i}}function ve(t,e,i=t,o){if(e===ce)return e;let r=void 0!==o?i._$Co?.[o]:i._$Cl;const s=te(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(t),r._$AT(t,i,o)),void 0!==o?(i._$Co??=[])[o]=r:i._$Cl=r),void 0!==r&&(e=ve(t,r._$AS(t,e.values),r,o)),e}class me{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??Zt).importNode(e,!0);ue.currentNode=o;let r=ue.nextNode(),s=0,n=0,a=i[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new fe(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new Se(r,this,t)),this._$AV.push(e),a=i[++n]}s!==a?.index&&(r=ue.nextNode(),s++)}return ue.currentNode=Zt,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class fe{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=pe,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ve(this,t,e),te(t)?t===pe||null==t||""===t?(this._$AH!==pe&&this._$AR(),this._$AH=pe):t!==this._$AH&&t!==ce&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>ee(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==pe&&te(this._$AH)?this._$AA.nextSibling.data=t:this.T(Zt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=ye.createElement(be(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new me(o,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=he.get(t.strings);return void 0===e&&he.set(t.strings,e=new ye(t)),e}k(t){ee(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new fe(this.O(Qt()),this.O(Qt()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class xe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,r){this.type=1,this._$AH=pe,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=pe}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=ve(this,t,e,0),s=!te(t)||t!==this._$AH&&t!==ce,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=ve(this,o[i+n],e,n),a===ce&&(a=this._$AH[n]),s||=!te(a)||a!==this._$AH[n],a===pe?t=pe:t!==pe&&(t+=(a??"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===pe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class we extends xe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===pe?void 0:t}}class $e extends xe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==pe)}}class ke extends xe{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){if((t=ve(this,t,e,0)??pe)===ce)return;const i=this._$AH,o=t===pe&&i!==pe||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==pe&&(i===pe||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Se{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ve(this,t)}}const Ce=Ht.litHtmlPolyfillSupport;Ce?.(ye,fe),(Ht.litHtmlVersions??=[]).push("3.3.1");
|
|
1690
|
+
/**
|
|
1691
|
+
* @license
|
|
1692
|
+
* Copyright 2017 Google LLC
|
|
1693
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1694
|
+
*/
|
|
1695
|
+
class Ee extends qt{constructor(t){if(super(t),this.it=pe,t.type!==Vt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===pe||null==t)return this._t=void 0,this.it=t;if(t===ce)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Ee.directiveName="unsafeHTML",Ee.resultType=1;
|
|
1696
|
+
/**
|
|
1697
|
+
* @license
|
|
1698
|
+
* Copyright 2017 Google LLC
|
|
1699
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1700
|
+
*/
|
|
1701
|
+
class Ae extends Ee{}Ae.directiveName="unsafeSVG",Ae.resultType=2;const _e=(t=>(...e)=>({_$litDirective$:t,values:e}))(Ae);let Oe=class extends e{constructor(){super(...arguments),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.value="",this.label="",this.labelColor="",this.filterable=!0,this.error=!1,this.required=!1,this.optional=!1,this.isMobile=!1,this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.highlightedIndex=-1,this._isCleared=!1,this.debounceTimeout=null,this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this)}static{this.styles=t`
|
|
1679
1702
|
:host {
|
|
1680
1703
|
display: block;
|
|
1681
1704
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1718,7 +1741,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1718
1741
|
}
|
|
1719
1742
|
|
|
1720
1743
|
.form-label {
|
|
1721
|
-
${
|
|
1744
|
+
${F}
|
|
1722
1745
|
display: flex;
|
|
1723
1746
|
align-items: baseline;
|
|
1724
1747
|
flex-direction: row;
|
|
@@ -1782,6 +1805,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1782
1805
|
align-items: center;
|
|
1783
1806
|
width: 100%;
|
|
1784
1807
|
transition: box-shadow 0.2s ease-in-out;
|
|
1808
|
+
background-color: white;
|
|
1785
1809
|
}
|
|
1786
1810
|
|
|
1787
1811
|
.mobile-modal .filter-input {
|
|
@@ -1789,7 +1813,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1789
1813
|
}
|
|
1790
1814
|
|
|
1791
1815
|
.filter-input {
|
|
1792
|
-
${
|
|
1816
|
+
${R};
|
|
1793
1817
|
padding: 16px;
|
|
1794
1818
|
padding-right: 40px;
|
|
1795
1819
|
border: none;
|
|
@@ -1799,6 +1823,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1799
1823
|
background: white;
|
|
1800
1824
|
cursor: pointer;
|
|
1801
1825
|
color: var(--secondary-color);
|
|
1826
|
+
flex-grow: 1;
|
|
1802
1827
|
}
|
|
1803
1828
|
|
|
1804
1829
|
.filter-input,
|
|
@@ -1809,7 +1834,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1809
1834
|
}
|
|
1810
1835
|
|
|
1811
1836
|
.filter-input::placeholder {
|
|
1812
|
-
${
|
|
1837
|
+
${R};
|
|
1813
1838
|
color: var(--secondary-color-40);
|
|
1814
1839
|
}
|
|
1815
1840
|
|
|
@@ -1854,10 +1879,12 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1854
1879
|
}
|
|
1855
1880
|
|
|
1856
1881
|
.options-list li {
|
|
1857
|
-
${
|
|
1882
|
+
${R};
|
|
1858
1883
|
padding: 8px 16px 8px 16px;
|
|
1859
1884
|
cursor: pointer;
|
|
1860
1885
|
color: var(--secondary-color-80);
|
|
1886
|
+
display: flex;
|
|
1887
|
+
align-items: center;
|
|
1861
1888
|
}
|
|
1862
1889
|
|
|
1863
1890
|
.options-list li.highlighted {
|
|
@@ -1923,7 +1950,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1923
1950
|
}
|
|
1924
1951
|
|
|
1925
1952
|
.filter-fake {
|
|
1926
|
-
${
|
|
1953
|
+
${R};
|
|
1927
1954
|
padding: 15px;
|
|
1928
1955
|
padding-right: 40px;
|
|
1929
1956
|
width: 100%;
|
|
@@ -1934,6 +1961,8 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1934
1961
|
white-space: nowrap;
|
|
1935
1962
|
overflow: hidden;
|
|
1936
1963
|
text-overflow: ellipsis;
|
|
1964
|
+
display: flex;
|
|
1965
|
+
align-items: center;
|
|
1937
1966
|
}
|
|
1938
1967
|
|
|
1939
1968
|
@keyframes slideUp {
|
|
@@ -1968,9 +1997,56 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1968
1997
|
|
|
1969
1998
|
.optional {
|
|
1970
1999
|
color: var(--secondary-color-60);
|
|
1971
|
-
${
|
|
2000
|
+
${L}
|
|
1972
2001
|
}
|
|
1973
|
-
|
|
2002
|
+
|
|
2003
|
+
/* Estilos por defecto del icon para mobile */
|
|
2004
|
+
.icon-selected {
|
|
2005
|
+
width: 24px;
|
|
2006
|
+
height: auto;
|
|
2007
|
+
margin-left: 4px;
|
|
2008
|
+
padding-right: 12px;
|
|
2009
|
+
border-right: 1px solid var(--secondary-color-20);
|
|
2010
|
+
display: flex;
|
|
2011
|
+
align-items: center;
|
|
2012
|
+
justify-content: center;
|
|
2013
|
+
flex-shrink: 0;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
.value-text {
|
|
2017
|
+
margin-left: 8px; /* Aumentamos el margen para separar el texto en mobile */
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
/*
|
|
2021
|
+
* Media query para aplicar estilos de escritorio (a partir de 941px)
|
|
2022
|
+
*/
|
|
2023
|
+
@media (min-width: 941px) {
|
|
2024
|
+
.icon-selected {
|
|
2025
|
+
/* Estilos de escritorio para el icono, se anulan los de mobile */
|
|
2026
|
+
margin-left: 16px;
|
|
2027
|
+
padding-right: 18px;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
.value-text {
|
|
2031
|
+
/* En escritorio no necesitamos este margen, lo reseteamos */
|
|
2032
|
+
margin-left: 0;
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
.icon-selected svg,
|
|
2037
|
+
.icon-list svg {
|
|
2038
|
+
display: block;
|
|
2039
|
+
width: 100%;
|
|
2040
|
+
height: auto;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.icon-list {
|
|
2044
|
+
width: 24px;
|
|
2045
|
+
height: auto;
|
|
2046
|
+
margin-right: 8px;
|
|
2047
|
+
flex-shrink: 0;
|
|
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?i`<span class="icon-selected">${_e(t.icon)}</span>`:o}render(){const t=this.isMobile;return i`
|
|
1974
2050
|
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
1975
2051
|
${this.label?i`
|
|
1976
2052
|
<div class="label-container">
|
|
@@ -1995,20 +2071,21 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1995
2071
|
aria-controls="options-list"
|
|
1996
2072
|
aria-haspopup="listbox"
|
|
1997
2073
|
aria-activedescendant=""
|
|
1998
|
-
|
|
1999
|
-
${this.
|
|
2074
|
+
>
|
|
2075
|
+
${this.renderSelectedIcon()}
|
|
2076
|
+
<span class="value-text">${this.filterValue||this.placeholder}</span>
|
|
2000
2077
|
</div>
|
|
2001
2078
|
`:i`
|
|
2002
|
-
<input
|
|
2079
|
+
${this.renderSelectedIcon()} <input
|
|
2003
2080
|
class="filter-input"
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2081
|
+
.value="${this.filterValue||""}"
|
|
2082
|
+
@click="${this.handleInputClick}"
|
|
2083
|
+
@keydown="${this.handleKeyDown}"
|
|
2084
|
+
@input=${this.handleInput}
|
|
2085
|
+
placeholder="${this.filterValue?"":this.placeholder}"
|
|
2086
|
+
?disabled="${this.disabled}"
|
|
2087
|
+
?readonly="${!this.filterable}"
|
|
2088
|
+
maxlength="${this.maxLength??""}"
|
|
2012
2089
|
/>
|
|
2013
2090
|
`}
|
|
2014
2091
|
<button
|
|
@@ -2036,14 +2113,15 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2036
2113
|
</button>
|
|
2037
2114
|
</div>
|
|
2038
2115
|
<ul class="options-list">
|
|
2039
|
-
${this.filteredOptions.map(((t,e)=>{const
|
|
2116
|
+
${this.filteredOptions.map(((t,e)=>{const r="string"==typeof t?t:t.label,s="object"==typeof t&&t.disabled,n="object"==typeof t?t.icon:void 0;return i`
|
|
2040
2117
|
<li
|
|
2041
|
-
class="${
|
|
2118
|
+
class="${s?"disabled":""} ${e===this.highlightedIndex?"highlighted":""}"
|
|
2042
2119
|
role="option"
|
|
2043
2120
|
aria-selected="${e===this.highlightedIndex}"
|
|
2044
|
-
@click="${()=>{
|
|
2121
|
+
@click="${()=>{s||this.handleSelect(t)}}"
|
|
2045
2122
|
>
|
|
2046
|
-
${o}
|
|
2123
|
+
${n?i`<span class="icon-list">${_e(n)}</span>`:o}
|
|
2124
|
+
${r}
|
|
2047
2125
|
</li>
|
|
2048
2126
|
`}))}
|
|
2049
2127
|
</ul>
|
|
@@ -2051,21 +2129,23 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2051
2129
|
</div>
|
|
2052
2130
|
`:!t&&this.isOpen&&this.filteredOptions.length>0?i`
|
|
2053
2131
|
<ul class="options-list">
|
|
2054
|
-
${this.filteredOptions.map(((t,e)=>{const
|
|
2132
|
+
${this.filteredOptions.map(((t,e)=>{const r="string"==typeof t?t:t.label,s="object"==typeof t&&t.disabled,n="object"==typeof t?t.icon:void 0;return i`
|
|
2055
2133
|
<li
|
|
2056
|
-
class="${
|
|
2134
|
+
class="${s?"disabled":""} ${e===this.highlightedIndex?"highlighted":""}"
|
|
2057
2135
|
role="option"
|
|
2058
2136
|
aria-selected="${e===this.highlightedIndex}"
|
|
2059
|
-
@click="${()=>{
|
|
2137
|
+
@click="${()=>{s||this.handleSelect(t)}}"
|
|
2060
2138
|
>
|
|
2061
|
-
${o}
|
|
2139
|
+
${n?i`<span class="icon-list">${_e(n)}</span>`:o}
|
|
2140
|
+
${r}
|
|
2062
2141
|
</li>
|
|
2142
|
+
</li>
|
|
2063
2143
|
`}))}
|
|
2064
2144
|
</ul>
|
|
2065
2145
|
`:""}
|
|
2066
2146
|
</div>
|
|
2067
2147
|
</div>
|
|
2068
|
-
`}};n([
|
|
2148
|
+
`}};n([I({type:Array}),a("design:type",Array)],Oe.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],Oe.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],Oe.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],Oe.prototype,"disabled",void 0),n([I({type:Object}),a("design:type",Object)],Oe.prototype,"value",void 0),n([I({type:String}),a("design:type",Object)],Oe.prototype,"label",void 0),n([I({type:String}),a("design:type",Object)],Oe.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],Oe.prototype,"filterable",void 0),n([I({type:Number}),a("design:type",Number)],Oe.prototype,"maxLength",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],Oe.prototype,"error",void 0),n([I({type:Boolean}),a("design:type",Object)],Oe.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],Oe.prototype,"optional",void 0),n([z(),a("design:type",Boolean)],Oe.prototype,"isMobile",void 0),n([z(),a("design:type",Array)],Oe.prototype,"filteredOptions",void 0),n([z(),a("design:type",Object)],Oe.prototype,"filterValue",void 0),n([z(),a("design:type",Object)],Oe.prototype,"isOpen",void 0),n([z(),a("design:type",Object)],Oe.prototype,"mobileFilterValue",void 0),n([z(),a("design:type",Object)],Oe.prototype,"highlightedIndex",void 0),n([z(),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`
|
|
2069
2149
|
:host {
|
|
2070
2150
|
display: flex;
|
|
2071
2151
|
position: fixed;
|
|
@@ -2135,7 +2215,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2135
2215
|
}
|
|
2136
2216
|
|
|
2137
2217
|
.container {
|
|
2138
|
-
${
|
|
2218
|
+
${M};
|
|
2139
2219
|
display: flex;
|
|
2140
2220
|
align-items: center;
|
|
2141
2221
|
box-sizing: border-box;
|
|
@@ -2201,7 +2281,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2201
2281
|
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
2202
2282
|
<span class="message">${this.message}</span>
|
|
2203
2283
|
</div>
|
|
2204
|
-
`}}customElements.define("randstad-snackbar",
|
|
2284
|
+
`}}customElements.define("randstad-snackbar",je);let Ie=class extends e{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=t`
|
|
2205
2285
|
.stepper {
|
|
2206
2286
|
display: flex;
|
|
2207
2287
|
gap: 20px;
|
|
@@ -2301,7 +2381,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2301
2381
|
</div>
|
|
2302
2382
|
`))}
|
|
2303
2383
|
</div>
|
|
2304
|
-
`}};n([
|
|
2384
|
+
`}};n([I({type:Number}),a("design:type",Object)],Ie.prototype,"totalSteps",void 0),n([I({type:Number}),a("design:type",Object)],Ie.prototype,"currentStep",void 0),Ie=n([l("custom-stepper")],Ie);let ze=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`
|
|
2305
2385
|
:host {
|
|
2306
2386
|
display: block;
|
|
2307
2387
|
border-bottom: 1px solid #E7E8EC;
|
|
@@ -2314,7 +2394,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2314
2394
|
}
|
|
2315
2395
|
|
|
2316
2396
|
.tab {
|
|
2317
|
-
${
|
|
2397
|
+
${B};
|
|
2318
2398
|
display: flex;
|
|
2319
2399
|
gap: 8px;
|
|
2320
2400
|
flex-direction: row;
|
|
@@ -2412,7 +2492,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2412
2492
|
|
|
2413
2493
|
@media (max-width: 940px) {
|
|
2414
2494
|
.tab {
|
|
2415
|
-
${
|
|
2495
|
+
${F};
|
|
2416
2496
|
padding: 16px;
|
|
2417
2497
|
}
|
|
2418
2498
|
}
|
|
@@ -2440,7 +2520,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2440
2520
|
</button>
|
|
2441
2521
|
`:null}
|
|
2442
2522
|
</div>
|
|
2443
|
-
`}};n([
|
|
2523
|
+
`}};n([I({type:Array}),a("design:type",Array)],ze.prototype,"tabs",void 0),n([I({type:String}),a("design:type",String)],ze.prototype,"selected",void 0),n([z(),a("design:type",String)],ze.prototype,"internalSelected",void 0),n([z(),a("design:type",Object)],ze.prototype,"showPrev",void 0),n([z(),a("design:type",Object)],ze.prototype,"showNext",void 0),ze=n([l("tabs-bar")],ze);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`
|
|
2444
2524
|
|
|
2445
2525
|
:host {
|
|
2446
2526
|
font-family: 'Graphik', sans-serif;
|
|
@@ -2475,28 +2555,28 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2475
2555
|
}
|
|
2476
2556
|
|
|
2477
2557
|
.text-main {
|
|
2478
|
-
${
|
|
2558
|
+
${M};
|
|
2479
2559
|
text-align: center;
|
|
2480
2560
|
vertical-align: middle;
|
|
2481
2561
|
color: var(--secondary-color-80);
|
|
2482
2562
|
}
|
|
2483
2563
|
|
|
2484
2564
|
.text-secondary {
|
|
2485
|
-
${
|
|
2565
|
+
${L};
|
|
2486
2566
|
text-align: center;
|
|
2487
2567
|
vertical-align: middle;
|
|
2488
2568
|
color: var(--secondary-color-60);
|
|
2489
2569
|
}
|
|
2490
2570
|
|
|
2491
2571
|
.text-tertiary {
|
|
2492
|
-
${
|
|
2572
|
+
${L};
|
|
2493
2573
|
text-align: center;
|
|
2494
2574
|
vertical-align: middle;
|
|
2495
2575
|
color: var(--secondary-color-40);
|
|
2496
2576
|
}
|
|
2497
2577
|
|
|
2498
2578
|
.button {
|
|
2499
|
-
${
|
|
2579
|
+
${L};
|
|
2500
2580
|
background-color: var(--primary-color);
|
|
2501
2581
|
border: none;
|
|
2502
2582
|
padding: 4px 16px;
|
|
@@ -2564,5 +2644,5 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2564
2644
|
</label>
|
|
2565
2645
|
`}
|
|
2566
2646
|
</div>
|
|
2567
|
-
`}};n([
|
|
2647
|
+
`}};n([I({type:Array}),a("design:type",Array)],Pe.prototype,"files",void 0),n([z(),a("design:type",Object)],Pe.prototype,"loading",void 0),n([z(),a("design:type",Object)],Pe.prototype,"progress",void 0),n([z(),a("design:type",Object)],Pe.prototype,"isDragging",void 0),n([I({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,Ie as CustomStepper,Oe as FilterableSelect,K as FormGroup,Y as IconComponent,Q as ProgressCircle,q as RandstadButton,W as RandstadForm,X as RandstadNotice,ze as TabsBar,Pe as UploadImage};
|
|
2568
2648
|
//# sourceMappingURL=index.js.map
|