@randstad-uca/design-system 1.0.24 → 1.0.25
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/Form.d.ts +2 -1
- package/dist/components/FormGroup.d.ts +11 -0
- package/dist/components/Modal.d.ts +4 -1
- package/dist/components/Select.d.ts +2 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +670 -295
- package/dist/index.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/stories/Form.stories.d.ts +4 -0
- package/package.json +2 -1
- package/dist/assets/icons/arrow_back.svg +0 -10
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=(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)}},
|
|
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=(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)}},g=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:y,defineProperty:v,getOwnPropertyDescriptor:m,getOwnPropertyNames:f,getOwnPropertySymbols:x,getPrototypeOf:w}=Object,k=globalThis,$=k.trustedTypes,S=$?$.emptyScript:"",C=k.reactiveElementPolyfillSupport,E=(t,e)=>t,O={toAttribute(t,e){switch(e){case Boolean:t=t?S: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}},j=(t,e)=>!y(t,e),z={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:j};
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/Symbol.metadata??=Symbol("metadata"),k.litPropertyMetadata??=new WeakMap;class
|
|
17
|
+
*/Symbol.metadata??=Symbol("metadata"),k.litPropertyMetadata??=new WeakMap;class P 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=z){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&&v(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=m(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)??z}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=w(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...f(t),...x(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(g(t))}else void 0!==t&&e.push(g(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 b(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:O).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:O;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??j)(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){}}P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[E("elementProperties")]=new Map,P[E("finalized")]=new Map,C?.({ReactiveElement:P}),(k.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:O,reflect:!1,hasChanged:j},A=(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?A(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 L(t){return
|
|
28
|
+
*/function L(t){return I({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,13 +36,13 @@ const z={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:P},I=(t=z,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function
|
|
39
|
+
function F(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 _=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
|
+
`,R=t`
|
|
46
46
|
font-family: 'Graphik', sans-serif;
|
|
47
47
|
font-weight: 400;
|
|
48
48
|
font-size: 14px;
|
|
@@ -54,13 +54,13 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
54
54
|
font-size: 16px;
|
|
55
55
|
line-height: 25px;
|
|
56
56
|
letter-spacing: 0%;
|
|
57
|
-
`,
|
|
57
|
+
`,B=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
|
+
`,U=t`
|
|
64
64
|
font-family: 'Graphik', sans-serif;
|
|
65
65
|
font-weight: 400;
|
|
66
66
|
font-size: 18px;
|
|
@@ -74,14 +74,98 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
74
74
|
line-height: 30px;
|
|
75
75
|
letter-spacing: -1%;
|
|
76
76
|
vertical-align: middle;
|
|
77
|
-
`,
|
|
77
|
+
`,q=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 D=class extends e{constructor(){super(...arguments),this.
|
|
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
|
+
:host {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
font-family: 'Graphik', sans-serif;
|
|
89
|
+
position: relative;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.header {
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: space-between;
|
|
95
|
+
gap: 16px;
|
|
96
|
+
flex-direction: row;
|
|
97
|
+
align-items: center;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
padding-bottom: 16px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.title {
|
|
103
|
+
${M}
|
|
104
|
+
color: var(--secondary-color);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.icon-wrapper {
|
|
108
|
+
width: 40px;
|
|
109
|
+
height: 40px;
|
|
110
|
+
border-radius: 50%;
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
transition: background-color 0.3s ease;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.icon {
|
|
118
|
+
transition: transform 0.3s;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.content {
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
max-height: 0;
|
|
124
|
+
transition: max-height 0.3s ease, padding-bottom 0.3s ease;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.content.open {
|
|
128
|
+
max-height: 1000px;
|
|
129
|
+
padding-bottom: 16px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host::after {
|
|
133
|
+
content: '';
|
|
134
|
+
display: block;
|
|
135
|
+
height: 1px;
|
|
136
|
+
background-color: var(--secondary-color-20);
|
|
137
|
+
width: 100%;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@media (min-width: 941px) {
|
|
141
|
+
.header {
|
|
142
|
+
align-items: flex-start;
|
|
143
|
+
}
|
|
144
|
+
.header:hover .icon-wrapper {
|
|
145
|
+
background-color: var(--primary-color-5);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
`}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}toggle(){this.isOpen=!this.isOpen}renderIcon(){return this.isOpen?i`<randstad-icon name="arrow_up" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>`:i`<randstad-icon name="arrow_down" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>`}render(){return i`
|
|
149
|
+
<div class="header" @click=${this.toggle}>
|
|
150
|
+
<div class="title">${this.title}</div>
|
|
151
|
+
<div class="icon">
|
|
152
|
+
${this.isDesktop?i`
|
|
153
|
+
<div class="icon-wrapper">
|
|
154
|
+
${this.renderIcon()}
|
|
155
|
+
</div>
|
|
156
|
+
`:this.renderIcon()}
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="content ${this.isOpen?"open":""}">
|
|
160
|
+
<slot></slot>
|
|
161
|
+
</div>
|
|
162
|
+
`}};n([I({type:String}),a("design:type",Object)],D.prototype,"title",void 0),n([L(),a("design:type",Object)],D.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],D.prototype,"isDesktop",void 0),D=n([l("accordion-panel")],D);let N=class extends e{static{this.styles=t`
|
|
163
|
+
:host {
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
gap: 16px;
|
|
167
|
+
}
|
|
168
|
+
`}render(){return i`<slot></slot>`}};N=n([l("accordion-list")],N);let G=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"}static{this.styles=t`
|
|
85
169
|
:host {
|
|
86
170
|
display: inline-block;
|
|
87
171
|
}
|
|
@@ -101,7 +185,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
101
185
|
}
|
|
102
186
|
|
|
103
187
|
.button-lg {
|
|
104
|
-
${
|
|
188
|
+
${B}
|
|
105
189
|
min-height: 62px;
|
|
106
190
|
}
|
|
107
191
|
|
|
@@ -304,7 +388,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
304
388
|
cursor: not-allowed;
|
|
305
389
|
}
|
|
306
390
|
|
|
307
|
-
`}handleClick(t){if(!this.disabled)if("submit"===this.type){const t=this.closest("form");t&&t.requestSubmit()}else this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}render(){const t={button:!0,[`button-${this.size}`]:"button-round"!==this.variant
|
|
391
|
+
`}handleClick(t){if(!this.disabled)if("submit"===this.type){const t=this.closest("form");t&&t.requestSubmit()}else this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}render(){const t={button:!0,[this.variant]:!0,loader:this.loader,[`button-${this.size}`]:"button-round"!==this.variant&&"button-card"!==this.variant},e="button-tertiary"===this.variant?"var(--primary-color)":"white";return i`
|
|
308
392
|
<button
|
|
309
393
|
part="button"
|
|
310
394
|
type=${this.type}
|
|
@@ -326,14 +410,128 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
326
410
|
${this.iconName&&"button-round"!==this.variant&&"right"===this.iconPosition?i`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
|
|
327
411
|
`}
|
|
328
412
|
</button>
|
|
329
|
-
`}};n([
|
|
413
|
+
`}};n([I({type:String}),a("design:type",String)],G.prototype,"variant",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"size",void 0),n([I({type:String}),a("design:type",Object)],G.prototype,"label",void 0),n([I({type:Boolean}),a("design:type",Object)],G.prototype,"loader",void 0),n([I({type:String,attribute:"icon-src"}),a("design:type",String)],G.prototype,"iconSrc",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"iconPosition",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],G.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],G.prototype,"iconName",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"type",void 0),G=n([l("randstad-button")],G);let H=class extends e{constructor(){super(...arguments),this.img="",this.name="",this.title="",this.description="",this.url="#",this.buttonLabel="Contactanos"}static{this.styles=t`
|
|
414
|
+
:host {
|
|
415
|
+
display: inline-block;
|
|
416
|
+
font-family: "Graphik", sans-serif;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.image-container {
|
|
420
|
+
width: 280px;
|
|
421
|
+
height: 390px;
|
|
422
|
+
position: relative;
|
|
423
|
+
border-radius: 8px;
|
|
424
|
+
overflow: hidden;
|
|
425
|
+
background-size: cover;
|
|
426
|
+
background-position: center;
|
|
427
|
+
background-repeat: no-repeat;
|
|
428
|
+
display: flex;
|
|
429
|
+
align-items: flex-end;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.overlay-gradient,
|
|
433
|
+
.overlay-hover {
|
|
434
|
+
position: absolute;
|
|
435
|
+
inset: 0;
|
|
436
|
+
border-radius: 8px;
|
|
437
|
+
transition: opacity 1s ease;
|
|
438
|
+
z-index: 0;
|
|
439
|
+
pointer-events: none;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.overlay-gradient {
|
|
443
|
+
background: linear-gradient(180deg, rgba(15, 25, 65, 0) 0%, rgba(15, 25, 65, 0.279522) 48.01%, rgba(15, 25, 65, 0.6) 80.13%, rgba(15, 25, 65, 0.6) 100%);
|
|
444
|
+
opacity: 1;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.overlay-hover {
|
|
448
|
+
background: #0F1941CC;
|
|
449
|
+
opacity: 0;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.image-container:hover .overlay-hover {
|
|
453
|
+
opacity: 1;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.content-container {
|
|
457
|
+
position: relative;
|
|
458
|
+
z-index: 1;
|
|
459
|
+
color: #FFFFFF;
|
|
460
|
+
padding: 24px;
|
|
461
|
+
box-sizing: border-box;
|
|
462
|
+
width: 100%;
|
|
463
|
+
display: flex;
|
|
464
|
+
flex-direction: column;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.title-wrapper {
|
|
468
|
+
margin-bottom: 0; /* reset, por si acaso */
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.title {
|
|
472
|
+
${B}
|
|
473
|
+
margin: 0;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.details {
|
|
477
|
+
max-height: 0;
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
opacity: 0;
|
|
480
|
+
transform: translateY(40px);
|
|
481
|
+
transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.image-container:hover .details {
|
|
485
|
+
max-height: 240px;
|
|
486
|
+
opacity: 1;
|
|
487
|
+
transform: translateY(0);
|
|
488
|
+
overflow: visible;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.description {
|
|
492
|
+
${R}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
::part(button) {
|
|
496
|
+
color: white;
|
|
497
|
+
border: 1px solid white;
|
|
498
|
+
background: transparent;
|
|
499
|
+
text-align: left;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
::part(button):hover {
|
|
503
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
::part(button):active {
|
|
507
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
508
|
+
}
|
|
509
|
+
`}handleClick(){this.dispatchEvent(new CustomEvent("card-click",{detail:{img:this.img,name:this.name,title:this.title,description:this.description,url:this.url},bubbles:!0,composed:!0}))}render(){return i`
|
|
510
|
+
<div class="image-container" style="background-image: url(${this.img});">
|
|
511
|
+
<div class="overlay-gradient"></div>
|
|
512
|
+
<div class="overlay-hover"></div>
|
|
513
|
+
<div class="content-container">
|
|
514
|
+
<div class="title-wrapper">
|
|
515
|
+
<h3 class="title">${this.name}</h3>
|
|
516
|
+
</div>
|
|
517
|
+
<div class="details">
|
|
518
|
+
<p class="description">${this.description}</p>
|
|
519
|
+
<randstad-button
|
|
520
|
+
variant="button-tertiary"
|
|
521
|
+
.label=${this.buttonLabel}
|
|
522
|
+
@button-click=${this.handleClick}
|
|
523
|
+
></randstad-button>
|
|
524
|
+
</div>
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
`}};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,"url",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"buttonLabel",void 0),H=n([l("carousel-card")],H);let Y=class extends e{constructor(){super(...arguments),this.prefix="Acepto los",this.clause1Text="términos y condiciones",this.connector="y los",this.clause2Text="avisos de privacidad del sitio",this.checked=!1}static{this.styles=t`
|
|
330
528
|
:host {
|
|
331
529
|
display: block;
|
|
332
530
|
max-width: 100%;
|
|
333
531
|
}
|
|
334
532
|
|
|
335
533
|
label {
|
|
336
|
-
${
|
|
534
|
+
${R}
|
|
337
535
|
display: flex;
|
|
338
536
|
align-items: center;
|
|
339
537
|
gap: 8px;
|
|
@@ -380,7 +578,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
380
578
|
text-decoration: none;
|
|
381
579
|
cursor: pointer;
|
|
382
580
|
}
|
|
383
|
-
`}toggleCheck(t){this.checked=t.target.checked,this.dispatchEvent(new
|
|
581
|
+
`}toggleCheck(t){this.checked=t.target.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}renderClause(t,e){return e?i`<a class="terms-link" href="${e}" target="_blank" rel="noopener" @click=${this.stopPropagation}>${t}</a>`:i`${t}`}stopPropagation(t){t.stopPropagation()}render(){return i`
|
|
384
582
|
<label>
|
|
385
583
|
<input
|
|
386
584
|
type="checkbox"
|
|
@@ -396,7 +594,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
396
594
|
${this.renderClause(this.clause2Text,this.clause2Url)}.
|
|
397
595
|
</span>
|
|
398
596
|
</label>
|
|
399
|
-
`}};n([
|
|
597
|
+
`}};n([I({type:String}),a("design:type",Object)],Y.prototype,"prefix",void 0),n([I({type:String}),a("design:type",Object)],Y.prototype,"clause1Text",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"clause1Url",void 0),n([I({type:String}),a("design:type",Object)],Y.prototype,"connector",void 0),n([I({type:String}),a("design:type",Object)],Y.prototype,"clause2Text",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"clause2Url",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Y.prototype,"checked",void 0),Y=n([l("randstad-checkbox")],Y);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`
|
|
400
598
|
:host {
|
|
401
599
|
display: block;
|
|
402
600
|
font-family: 'Graphik', sans-serif;
|
|
@@ -419,6 +617,10 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
419
617
|
|
|
420
618
|
.form-label {
|
|
421
619
|
${M}
|
|
620
|
+
display: flex;
|
|
621
|
+
align-items: baseline;
|
|
622
|
+
flex-direction: row;
|
|
623
|
+
gap: 4px;
|
|
422
624
|
color: var(--label-color, var(--secondary-color-80));
|
|
423
625
|
}
|
|
424
626
|
|
|
@@ -430,7 +632,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
430
632
|
}
|
|
431
633
|
|
|
432
634
|
.form-input {
|
|
433
|
-
${
|
|
635
|
+
${B}
|
|
434
636
|
padding: 16px;
|
|
435
637
|
border: 1px solid var(--secondary-color-10);
|
|
436
638
|
border-radius: 4px;
|
|
@@ -465,7 +667,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
465
667
|
}
|
|
466
668
|
|
|
467
669
|
input::placeholder {
|
|
468
|
-
${
|
|
670
|
+
${B}
|
|
469
671
|
color: var(--secondary-color-40);
|
|
470
672
|
}
|
|
471
673
|
|
|
@@ -503,7 +705,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
503
705
|
}
|
|
504
706
|
|
|
505
707
|
textarea {
|
|
506
|
-
${
|
|
708
|
+
${B}
|
|
507
709
|
resize: none;
|
|
508
710
|
}
|
|
509
711
|
|
|
@@ -617,14 +819,26 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
617
819
|
visibility: visible;
|
|
618
820
|
opacity: 1;
|
|
619
821
|
}
|
|
620
|
-
|
|
822
|
+
|
|
823
|
+
.required {
|
|
824
|
+
color: var(--ui-negative);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.optional {
|
|
828
|
+
color: var(--secondary-color-60);
|
|
829
|
+
${_}
|
|
830
|
+
}
|
|
831
|
+
`}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}))}render(){const t=this.cleanButton&&this.value&&"password"!==this.type&&"textarea"!==this.type;return i`
|
|
621
832
|
<div
|
|
622
833
|
class="form ${this.error?"error":""} ${this.disabled?"disabled":""}"
|
|
623
834
|
style=${this.labelColor?`--label-color: ${this.labelColor}`:o}
|
|
624
835
|
>
|
|
625
836
|
${this.label?i`
|
|
626
837
|
<div class="label-container">
|
|
627
|
-
<label class="form-label"
|
|
838
|
+
<label class="form-label">
|
|
839
|
+
${this.label}
|
|
840
|
+
${this.required?i`<span class="required">*</span>`:this.optional?i`<span class="optional">opcional</span>`:o}
|
|
841
|
+
</label>
|
|
628
842
|
${this.tooltipMessage?.trim()?i`<div class="tooltip-wrapper">
|
|
629
843
|
<randstad-icon class="help-icon" name="ayuda" size="20px"></randstad-icon>
|
|
630
844
|
</div>`:o}
|
|
@@ -642,8 +856,6 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
642
856
|
.value=${this.value}
|
|
643
857
|
?disabled=${this.disabled}
|
|
644
858
|
@input=${this.handleInput}
|
|
645
|
-
@keydown=${this.handleKeyDown}
|
|
646
|
-
maxlength=${this.maxLength??o}
|
|
647
859
|
></textarea>`:i`
|
|
648
860
|
<input
|
|
649
861
|
class="form-input"
|
|
@@ -652,7 +864,6 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
652
864
|
.value=${this.value}
|
|
653
865
|
?disabled=${this.disabled}
|
|
654
866
|
@input=${this.handleInput}
|
|
655
|
-
@keydown=${this.handleKeyDown}
|
|
656
867
|
maxlength=${this.maxLength??o}
|
|
657
868
|
/>
|
|
658
869
|
|
|
@@ -680,7 +891,60 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
680
891
|
|
|
681
892
|
${this.helper?i`<p class="helper-description">${this.helper}</p>`:o}
|
|
682
893
|
</div>
|
|
683
|
-
`}};n([
|
|
894
|
+
`}};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),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`
|
|
895
|
+
:host {
|
|
896
|
+
display: flex;
|
|
897
|
+
flex-direction: column;
|
|
898
|
+
font-family: 'Graphik', sans-serif;
|
|
899
|
+
gap: 8px;
|
|
900
|
+
width: 100%;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.form-label {
|
|
904
|
+
${M}
|
|
905
|
+
display: flex;
|
|
906
|
+
align-items: baseline;
|
|
907
|
+
flex-direction: row;
|
|
908
|
+
gap: 4px;
|
|
909
|
+
color: var(--label-color, var(--secondary-color-80));
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
.fields {
|
|
913
|
+
display: flex;
|
|
914
|
+
flex-direction: column;
|
|
915
|
+
gap: 16px; /* espaciado entre inputs */
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.helper {
|
|
919
|
+
${M}
|
|
920
|
+
color: var(--secondary-color-40);
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
.error {
|
|
924
|
+
${M}
|
|
925
|
+
color: var(--ui-negative);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.required {
|
|
929
|
+
color: var(--ui-negative);
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.optional {
|
|
933
|
+
color: var(--secondary-color-60);
|
|
934
|
+
${_}
|
|
935
|
+
}
|
|
936
|
+
`}render(){return i`
|
|
937
|
+
<label class="form-label">
|
|
938
|
+
${this.label}
|
|
939
|
+
${this.required?i`<span class="required">*</span>`:this.optional?i`<span class="optional">opcional</span>`:o}
|
|
940
|
+
</label>
|
|
941
|
+
|
|
942
|
+
<div class="fields">
|
|
943
|
+
<slot></slot>
|
|
944
|
+
</div>
|
|
945
|
+
|
|
946
|
+
${this.error?i`<p class="error">${this.errorMessage}</p>`:this.helper?i`<p class="helper">${this.helper}</p>`:null}
|
|
947
|
+
`}};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 X extends e{constructor(){super(...arguments),this.name="",this.size="24px"}static{this.styles=t`
|
|
684
948
|
:host {
|
|
685
949
|
display: inline-flex;
|
|
686
950
|
width: var(--icon-size, 24px);
|
|
@@ -694,7 +958,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
694
958
|
height: var(--icon-size, 24px);
|
|
695
959
|
fill: var(--icon-color, currentColor);
|
|
696
960
|
}
|
|
697
|
-
`}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([
|
|
961
|
+
`}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)],X.prototype,"name",void 0),n([I({type:String}),a("design:type",Object)],X.prototype,"size",void 0),customElements.define("randstad-icon",X);let J=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`
|
|
698
962
|
:host {
|
|
699
963
|
display: block;
|
|
700
964
|
font-family: 'Graphik', sans-serif;
|
|
@@ -747,7 +1011,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
747
1011
|
<randstad-icon class="icon" name="${this.icon}" size="24px" style="color: var(--icon-color);"></randstad-icon>
|
|
748
1012
|
<span class="message">${this.message}</span>
|
|
749
1013
|
</div>
|
|
750
|
-
`}};n([
|
|
1014
|
+
`}};n([I({type:String}),a("design:type",String)],J.prototype,"type",void 0),n([I({type:String}),a("design:type",String)],J.prototype,"icon",void 0),n([I({type:String}),a("design:type",String)],J.prototype,"message",void 0),n([I({type:Boolean}),a("design:type",Boolean)],J.prototype,"open",void 0),J=n([l("randstad-notice")],J);let Q=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`
|
|
751
1015
|
:host {
|
|
752
1016
|
font-family: 'Graphik', sans-serif;
|
|
753
1017
|
display: none;
|
|
@@ -762,23 +1026,15 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
762
1026
|
position: fixed;
|
|
763
1027
|
top: 0;
|
|
764
1028
|
left: 0;
|
|
765
|
-
|
|
1029
|
+
right: 0;
|
|
1030
|
+
bottom: 0;
|
|
766
1031
|
background: rgba(0, 0, 0, 0.5);
|
|
767
1032
|
overflow-y: auto;
|
|
768
1033
|
padding: 40px 16px;
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
.overlay.scroll {
|
|
1034
|
+
z-index: 9999;
|
|
772
1035
|
display: flex;
|
|
773
|
-
align-items: center;
|
|
774
1036
|
justify-content: center;
|
|
775
|
-
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
.overlay.no-scroll {
|
|
779
|
-
display: block;
|
|
780
|
-
height: auto;
|
|
781
|
-
min-height: 100vh;
|
|
1037
|
+
align-items: flex-start;
|
|
782
1038
|
}
|
|
783
1039
|
|
|
784
1040
|
.modal {
|
|
@@ -788,7 +1044,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
788
1044
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
789
1045
|
display: flex;
|
|
790
1046
|
flex-direction: column;
|
|
791
|
-
margin: 40px
|
|
1047
|
+
margin-top: 40px;
|
|
792
1048
|
border-radius: 8px;
|
|
793
1049
|
}
|
|
794
1050
|
|
|
@@ -834,7 +1090,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
834
1090
|
}
|
|
835
1091
|
|
|
836
1092
|
.modal-title {
|
|
837
|
-
${
|
|
1093
|
+
${q}
|
|
838
1094
|
margin: 0;
|
|
839
1095
|
color: var(--secondary-color);
|
|
840
1096
|
}
|
|
@@ -885,54 +1141,52 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
885
1141
|
width: 100%;
|
|
886
1142
|
}
|
|
887
1143
|
}
|
|
888
|
-
`}closeModal(){this.dispatchEvent(new CustomEvent("modal-close")),this.
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
1144
|
+
`}closeModal(){this.dispatchEvent(new CustomEvent("modal-close"))}connectedCallback(){super.connectedCallback(),this.setScrollableMode(),window.addEventListener("resize",this.setScrollableMode)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.setScrollableMode)}render(){return i`
|
|
1145
|
+
<div class="overlay" role="dialog" aria-modal="true">
|
|
1146
|
+
<div class="modal ${this.scrollable?"scrollable":""}">
|
|
1147
|
+
<div class="modal-header">
|
|
1148
|
+
<div class="modal-header-content">
|
|
1149
|
+
<div class="titles-container">
|
|
1150
|
+
<div class="modal-title">${this.title}</div>
|
|
1151
|
+
${this.subtitle?i`<div class="modal-subtitle">${this.subtitle}</div>`:o}
|
|
1152
|
+
</div>
|
|
1153
|
+
<button class="modal-close" @click=${this.closeModal} aria-label="Cerrar modal">
|
|
1154
|
+
<randstad-icon name="close" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>
|
|
1155
|
+
</button>
|
|
896
1156
|
</div>
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
1157
|
+
${this.showNotice?i`
|
|
1158
|
+
<randstad-notice
|
|
1159
|
+
.open=${!0}
|
|
1160
|
+
.type=${this.noticeType}
|
|
1161
|
+
.icon=${this.noticeIcon}
|
|
1162
|
+
.message=${this.noticeMessage}
|
|
1163
|
+
></randstad-notice>
|
|
1164
|
+
`:o}
|
|
1165
|
+
</div>
|
|
1166
|
+
<div class="modal-body ${this.scrollable?"scrollable":""}">
|
|
1167
|
+
<slot name="content"></slot>
|
|
1168
|
+
</div>
|
|
1169
|
+
<div class="modal-footer ${this.showPrimaryButton&&this.showSecondaryButton?"two-buttons":"one-button"}">
|
|
1170
|
+
${this.showPrimaryButton?i`
|
|
1171
|
+
<randstad-button
|
|
1172
|
+
variant="button-primary"
|
|
1173
|
+
size="md"
|
|
1174
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("primary-click"))}
|
|
1175
|
+
label=${this.primaryButtonLabel}
|
|
1176
|
+
></randstad-button>
|
|
1177
|
+
`:o}
|
|
1178
|
+
${this.showSecondaryButton?i`
|
|
1179
|
+
<randstad-button
|
|
1180
|
+
variant="button-secondary"
|
|
1181
|
+
size="md"
|
|
1182
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("secondary-click"))}
|
|
1183
|
+
label=${this.secondaryButtonLabel}
|
|
1184
|
+
></randstad-button>
|
|
1185
|
+
`:o}
|
|
900
1186
|
</div>
|
|
901
|
-
${this.showNotice?i`
|
|
902
|
-
<randstad-notice
|
|
903
|
-
.open=${!0}
|
|
904
|
-
.type=${this.noticeType}
|
|
905
|
-
.icon=${this.noticeIcon}
|
|
906
|
-
.message=${this.noticeMessage}
|
|
907
|
-
></randstad-notice>
|
|
908
|
-
`:o}
|
|
909
|
-
</div>
|
|
910
|
-
<div class="modal-body ${this.scrollable?"scrollable":""}">
|
|
911
|
-
<slot name="content"></slot>
|
|
912
|
-
</div>
|
|
913
|
-
<div class="modal-footer ${this.showPrimaryButton&&this.showSecondaryButton?"two-buttons":"one-button"}">
|
|
914
|
-
${this.showPrimaryButton?i`
|
|
915
|
-
<randstad-button
|
|
916
|
-
variant="button-primary"
|
|
917
|
-
size="md"
|
|
918
|
-
@click=${()=>this.dispatchEvent(new CustomEvent("primary-click"))}
|
|
919
|
-
label=${this.primaryButtonLabel}
|
|
920
|
-
>
|
|
921
|
-
</randstad-button>
|
|
922
|
-
`:o}
|
|
923
|
-
${this.showSecondaryButton?i`
|
|
924
|
-
<randstad-button
|
|
925
|
-
variant="button-secondary"
|
|
926
|
-
size="md"
|
|
927
|
-
@click=${()=>this.dispatchEvent(new CustomEvent("secondary-click"))}
|
|
928
|
-
label=${this.secondaryButtonLabel}
|
|
929
|
-
>
|
|
930
|
-
</randstad-button>
|
|
931
|
-
`:o}
|
|
932
1187
|
</div>
|
|
933
1188
|
</div>
|
|
934
|
-
|
|
935
|
-
`}};n([j({type:Boolean,reflect:!0}),a("design:type",Object)],Y.prototype,"open",void 0),n([j({type:String}),a("design:type",Object)],Y.prototype,"title",void 0),n([j({type:String}),a("design:type",String)],Y.prototype,"subtitle",void 0),n([j({type:Boolean}),a("design:type",Object)],Y.prototype,"scrollable",void 0),n([j({type:Boolean}),a("design:type",Object)],Y.prototype,"showNotice",void 0),n([j({type:String}),a("design:type",String)],Y.prototype,"noticeType",void 0),n([j({type:String}),a("design:type",Object)],Y.prototype,"noticeMessage",void 0),n([j({type:String}),a("design:type",Object)],Y.prototype,"noticeIcon",void 0),n([j({type:Boolean}),a("design:type",Object)],Y.prototype,"showPrimaryButton",void 0),n([j({type:String}),a("design:type",Object)],Y.prototype,"primaryButtonLabel",void 0),n([j({type:Boolean}),a("design:type",Object)],Y.prototype,"showSecondaryButton",void 0),n([j({type:String}),a("design:type",Object)],Y.prototype,"secondaryButtonLabel",void 0),Y=n([l("custom-modal")],Y);let W=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"}static{this.styles=t`
|
|
1189
|
+
`}};n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Q.prototype,"open",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"title",void 0),n([I({type:String}),a("design:type",String)],Q.prototype,"subtitle",void 0),n([I({type:Boolean}),a("design:type",Object)],Q.prototype,"showNotice",void 0),n([I({type:String}),a("design:type",String)],Q.prototype,"noticeType",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"noticeMessage",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"noticeIcon",void 0),n([I({type:Boolean}),a("design:type",Object)],Q.prototype,"showPrimaryButton",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"primaryButtonLabel",void 0),n([I({type:Boolean}),a("design:type",Object)],Q.prototype,"showSecondaryButton",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"secondaryButtonLabel",void 0),n([L(),a("design:type",Object)],Q.prototype,"scrollable",void 0),Q=n([l("custom-modal")],Q);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"}static{this.styles=t`
|
|
936
1190
|
:host {
|
|
937
1191
|
display: none;
|
|
938
1192
|
position: fixed;
|
|
@@ -1049,18 +1303,79 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1049
1303
|
`}
|
|
1050
1304
|
</div>
|
|
1051
1305
|
</div>
|
|
1052
|
-
`}};n([
|
|
1306
|
+
`}};n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Z.prototype,"open",void 0),n([I({type:String}),a("design:type",Object)],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),Z=n([l("custom-popup")],Z);let tt=class extends e{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=t`
|
|
1307
|
+
:host {
|
|
1308
|
+
display: inline-block;
|
|
1309
|
+
width: 64px;
|
|
1310
|
+
height: 64px;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
svg {
|
|
1314
|
+
width: 64px;
|
|
1315
|
+
height: 64px;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.circle-text {
|
|
1319
|
+
${_};
|
|
1320
|
+
text-align: center;
|
|
1321
|
+
vertical-align: middle;
|
|
1322
|
+
fill: var(--randstad-dark-blue-40);
|
|
1323
|
+
text-anchor: middle;
|
|
1324
|
+
dominant-baseline: middle;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
circle.bg {
|
|
1328
|
+
stroke: var(--primary-light-blue-20);
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
circle.fg {
|
|
1332
|
+
stroke: var(--primary-light-blue);
|
|
1333
|
+
stroke-linecap: round;
|
|
1334
|
+
}
|
|
1335
|
+
`}render(){const t=2*Math.PI*28,e=Math.max(this.max,1),o=t*(1-Math.min(this.value/e,1));return i`
|
|
1336
|
+
<svg
|
|
1337
|
+
viewBox="0 0 64 64"
|
|
1338
|
+
role="img"
|
|
1339
|
+
aria-label="Progreso: ${this.value} de ${this.max}"
|
|
1340
|
+
>
|
|
1341
|
+
<!-- Fondo -->
|
|
1342
|
+
<circle
|
|
1343
|
+
class="bg"
|
|
1344
|
+
cx="32"
|
|
1345
|
+
cy="32"
|
|
1346
|
+
r="${28}"
|
|
1347
|
+
stroke-width="${6}"
|
|
1348
|
+
fill="none"
|
|
1349
|
+
/>
|
|
1350
|
+
<!-- Progreso -->
|
|
1351
|
+
<circle
|
|
1352
|
+
class="fg"
|
|
1353
|
+
cx="32"
|
|
1354
|
+
cy="32"
|
|
1355
|
+
r="${28}"
|
|
1356
|
+
stroke-width="${6}"
|
|
1357
|
+
fill="none"
|
|
1358
|
+
stroke-dasharray="${t}"
|
|
1359
|
+
stroke-dashoffset="${o}"
|
|
1360
|
+
transform="rotate(-90 32 32)"
|
|
1361
|
+
/>
|
|
1362
|
+
<!-- Texto -->
|
|
1363
|
+
<text x="32" y="34" class="circle-text">
|
|
1364
|
+
${this.value} de ${this.max}
|
|
1365
|
+
</text>
|
|
1366
|
+
</svg>
|
|
1367
|
+
`}};n([I({type:Number}),a("design:type",Object)],tt.prototype,"value",void 0),n([I({type:Number}),a("design:type",Object)],tt.prototype,"max",void 0),tt=n([l("progress-circle")],tt);
|
|
1053
1368
|
/**
|
|
1054
1369
|
* @license
|
|
1055
1370
|
* Copyright 2023 Google LLC
|
|
1056
1371
|
* SPDX-License-Identifier: Apache-2.0
|
|
1057
1372
|
*/
|
|
1058
|
-
const
|
|
1373
|
+
const et=Symbol("attachableController");let it;r||(it=new MutationObserver((t=>{for(const e of t)e.target[et]?.hostConnected()})));class ot{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[et]=this,it?.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}}
|
|
1059
1374
|
/**
|
|
1060
1375
|
* @license
|
|
1061
1376
|
* Copyright 2021 Google LLC
|
|
1062
1377
|
* SPDX-License-Identifier: Apache-2.0
|
|
1063
|
-
*/const
|
|
1378
|
+
*/const rt=["focusin","focusout","pointerdown"];class st extends e{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new ot(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[nt]){switch(t.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[nt]=!0}}onControlChange(t,e){if(!r)for(const i of rt)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})],st.prototype,"visible",void 0),n([I({type:Boolean,reflect:!0})],st.prototype,"inward",void 0);const nt=Symbol("handledByFocusRing"),at=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}}
|
|
1064
1379
|
`
|
|
1065
1380
|
/**
|
|
1066
1381
|
* @license
|
|
@@ -1071,80 +1386,80 @@ const X=Symbol("attachableController");let J;r||(J=new MutationObserver((t=>{for
|
|
|
1071
1386
|
* @license
|
|
1072
1387
|
* Copyright 2024 Google LLC
|
|
1073
1388
|
* SPDX-License-Identifier: Apache-2.0
|
|
1074
|
-
*/let
|
|
1389
|
+
*/let lt=class extends st{};lt.styles=[at],lt=n([l("md-focus-ring")],lt);
|
|
1075
1390
|
/**
|
|
1076
1391
|
* @license
|
|
1077
1392
|
* Copyright 2021 Google LLC
|
|
1078
1393
|
* SPDX-License-Identifier: Apache-2.0
|
|
1079
1394
|
*/
|
|
1080
|
-
const
|
|
1395
|
+
const dt="cubic-bezier(0.2, 0, 0, 1)";
|
|
1081
1396
|
/**
|
|
1082
1397
|
* @license
|
|
1083
1398
|
* Copyright 2022 Google LLC
|
|
1084
1399
|
* SPDX-License-Identifier: Apache-2.0
|
|
1085
|
-
*/var
|
|
1400
|
+
*/var ct;!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"}(ct||(ct={}));const pt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ht=r?null:window.matchMedia("(forced-colors: active)");class ut extends e{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=ct.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new ot(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!==ct.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==ct.HOLDING)return this.state===ct.TOUCH_DELAY?(this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=ct.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=ct.TOUCH_DELAY,await new Promise((t=>{setTimeout(t,150)})),this.state===ct.TOUCH_DELAY&&(this.state=ct.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==ct.WAITING_FOR_CLICK?this.state===ct.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:dt,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=ct.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(!ht?.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 pt)t?.removeEventListener(i,this),e?.addEventListener(i,this)}}n([I({type:Boolean,reflect:!0})],ut.prototype,"disabled",void 0),n([L()],ut.prototype,"hovered",void 0),n([L()],ut.prototype,"pressed",void 0),n([F(".surface")],ut.prototype,"mdRoot",void 0);
|
|
1086
1401
|
/**
|
|
1087
1402
|
* @license
|
|
1088
1403
|
* Copyright 2024 Google LLC
|
|
1089
1404
|
* SPDX-License-Identifier: Apache-2.0
|
|
1090
1405
|
*/
|
|
1091
|
-
const
|
|
1406
|
+
const bt=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}
|
|
1092
1407
|
`
|
|
1093
1408
|
/**
|
|
1094
1409
|
* @license
|
|
1095
1410
|
* Copyright 2022 Google LLC
|
|
1096
1411
|
* SPDX-License-Identifier: Apache-2.0
|
|
1097
|
-
*/;let
|
|
1412
|
+
*/;let gt=class extends ut{};
|
|
1098
1413
|
/**
|
|
1099
1414
|
* @license
|
|
1100
1415
|
* Copyright 2021 Google LLC
|
|
1101
1416
|
* SPDX-License-Identifier: Apache-2.0
|
|
1102
1417
|
*/
|
|
1103
|
-
function
|
|
1418
|
+
function yt(t){return t.currentTarget===t.target&&(t.composedPath()[0]===t.target&&(!t.target.disabled&&!function(t){const e=vt;e&&(t.preventDefault(),t.stopImmediatePropagation());return async function(){vt=!0,await null,vt=!1}
|
|
1104
1419
|
/**
|
|
1105
1420
|
* @license
|
|
1106
1421
|
* Copyright 2023 Google LLC
|
|
1107
1422
|
* SPDX-License-Identifier: Apache-2.0
|
|
1108
|
-
*/(),e}(t)))}
|
|
1423
|
+
*/(),e}(t)))}gt.styles=[bt],gt=n([l("md-ripple")],gt);let vt=!1;const mt=Symbol("internals"),ft=Symbol("privateInternals");
|
|
1109
1424
|
/**
|
|
1110
1425
|
* @license
|
|
1111
1426
|
* Copyright 2023 Google LLC
|
|
1112
1427
|
* SPDX-License-Identifier: Apache-2.0
|
|
1113
1428
|
*/
|
|
1114
|
-
const
|
|
1429
|
+
const xt=Symbol("createValidator"),wt=Symbol("getValidityAnchor"),kt=Symbol("privateValidator"),$t=Symbol("privateSyncValidity"),St=Symbol("privateCustomValidationMessage");
|
|
1115
1430
|
/**
|
|
1116
1431
|
* @license
|
|
1117
1432
|
* Copyright 2023 Google LLC
|
|
1118
1433
|
* SPDX-License-Identifier: Apache-2.0
|
|
1119
1434
|
*/
|
|
1120
|
-
const
|
|
1435
|
+
const Ct=Symbol("isFocusable"),Et=Symbol("privateIsFocusable"),Ot=Symbol("externalTabIndex"),jt=Symbol("isUpdatingTabIndex"),zt=Symbol("updateTabIndex");
|
|
1121
1436
|
/**
|
|
1122
1437
|
* @license
|
|
1123
1438
|
* Copyright 2023 Google LLC
|
|
1124
1439
|
* SPDX-License-Identifier: Apache-2.0
|
|
1125
1440
|
*/
|
|
1126
|
-
const
|
|
1441
|
+
const Pt=Symbol("getFormValue"),Tt=Symbol("getFormState");
|
|
1127
1442
|
/**
|
|
1128
1443
|
* @license
|
|
1129
1444
|
* Copyright 2023 Google LLC
|
|
1130
1445
|
* SPDX-License-Identifier: Apache-2.0
|
|
1131
1446
|
*/
|
|
1132
|
-
class
|
|
1447
|
+
class At{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}}
|
|
1133
1448
|
/**
|
|
1134
1449
|
* @license
|
|
1135
1450
|
* Copyright 2023 Google LLC
|
|
1136
1451
|
* SPDX-License-Identifier: Apache-2.0
|
|
1137
|
-
*/class
|
|
1452
|
+
*/class It extends At{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})))}}
|
|
1138
1453
|
/**
|
|
1139
1454
|
* @license
|
|
1140
1455
|
* Copyright 2022 Google LLC
|
|
1141
1456
|
* SPDX-License-Identifier: Apache-2.0
|
|
1142
|
-
*/class
|
|
1457
|
+
*/class Lt{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}}
|
|
1143
1458
|
/**
|
|
1144
1459
|
* @license
|
|
1145
1460
|
* Copyright 2018 Google LLC
|
|
1146
1461
|
* SPDX-License-Identifier: Apache-2.0
|
|
1147
|
-
*/var
|
|
1462
|
+
*/var Ft;const _t=Symbol("checked");let Rt=0;const Mt=function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=""}get validity(){return this[$t](),this[mt].validity}get validationMessage(){return this[$t](),this[mt].validationMessage}get willValidate(){return this[$t](),this[mt].willValidate}checkValidity(){return this[$t](),this[mt].checkValidity()}reportValidity(){return this[$t](),this[mt].reportValidity()}setCustomValidity(t){this[St]=t,this[$t]()}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[$t]()}firstUpdated(t){super.firstUpdated(t),this[$t]()}[(e=St,$t)](){if(r)return;this[kt]||(this[kt]=this[xt]());const{validity:t,validationMessage:e}=this[kt].getValidity(),i=!!this[St],o=this[St]||e;this[mt].setValidity({...t,customError:i},o,this[wt]()??void 0)}[xt](){throw new Error("Implement [createValidator]")}[wt](){throw new Error("Implement [getValidityAnchor]")}}return i}(function(t){class e extends t{get form(){return this[mt].form}get labels(){return this[mt].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[mt].setFormValue(this[Pt](),this[Tt]())}[Pt](){throw new Error("Implement [getFormValue]")}[Tt](){return this[Pt]()}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}((Bt=function(t){var e,i,o;class r extends t{constructor(){super(...arguments),this[e]=!0,this[i]=null,this[o]=!1}get[Ct](){return this[Et]}set[Ct](t){this[Ct]!==t&&(this[Et]=t,this[zt]())}connectedCallback(){super.connectedCallback(),this[zt]()}attributeChangedCallback(t,e,i){if("tabindex"===t){if(this.requestUpdate("tabIndex",Number(e??-1)),!this[jt])return this.hasAttribute("tabindex")?void(this[Ot]=this.tabIndex):(this[Ot]=null,void this[zt]())}else super.attributeChangedCallback(t,e,i)}[(e=Et,i=Ot,o=jt,zt)](){const t=this[Ct]?0:-1,e=this[Ot]??t;this[jt]=!0,this.tabIndex=e,this[jt]=!1}}return n([I({noAccessor:!0})],r.prototype,"tabIndex",void 0),r}(e),class extends Bt{get[mt](){return this[ft]||(this[ft]=this.attachInternals()),this[ft]}})));var Bt;class Ut extends Mt{get checked(){return this[_t]}set checked(t){const e=this.checked;e!==t&&(this[_t]=t,this.requestUpdate("checked",e),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId="cutout"+ ++Rt,this[Ft]=!1,this.required=!1,this.value="on",this.selectionController=new Lt(this),this.addController(this.selectionController),r||(this[mt].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this)))}render(){const t={checked:this.checked};return i`
|
|
1148
1463
|
<div class="container ${s(t)}" aria-hidden="true">
|
|
1149
1464
|
<md-ripple
|
|
1150
1465
|
part="ripple"
|
|
@@ -1167,19 +1482,19 @@ class Ot{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{}
|
|
|
1167
1482
|
|
|
1168
1483
|
<div class="touch-target"></div>
|
|
1169
1484
|
</div>
|
|
1170
|
-
`}updated(){this[
|
|
1485
|
+
`}updated(){this[mt].ariaChecked=String(this.checked)}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(yt(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()}[(Ft=_t,Pt)](){return this.checked?this.value:null}[Tt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(t){this.checked="true"===t}[xt](){return new It((()=>this.selectionController?this.selectionController.controls:[this]))}[wt](){return this.container}}n([I({type:Boolean})],Ut.prototype,"checked",null),n([I({type:Boolean})],Ut.prototype,"required",void 0),n([I()],Ut.prototype,"value",void 0),n([F(".container")],Ut.prototype,"container",void 0);
|
|
1171
1486
|
/**
|
|
1172
1487
|
* @license
|
|
1173
1488
|
* Copyright 2024 Google LLC
|
|
1174
1489
|
* SPDX-License-Identifier: Apache-2.0
|
|
1175
1490
|
*/
|
|
1176
|
-
const
|
|
1491
|
+
const Vt=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}}}
|
|
1177
1492
|
`
|
|
1178
1493
|
/**
|
|
1179
1494
|
* @license
|
|
1180
1495
|
* Copyright 2022 Google LLC
|
|
1181
1496
|
* SPDX-License-Identifier: Apache-2.0
|
|
1182
|
-
*/;let
|
|
1497
|
+
*/;let qt=class extends Ut{};qt.styles=[Vt],qt=n([l("md-radio")],qt);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`
|
|
1183
1498
|
:host {
|
|
1184
1499
|
font-family: "Graphik", sans-serif;
|
|
1185
1500
|
}
|
|
@@ -1238,7 +1553,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1238
1553
|
></md-radio>
|
|
1239
1554
|
<span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
|
|
1240
1555
|
</label>
|
|
1241
|
-
`}};n([
|
|
1556
|
+
`}};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);let Nt=class extends e{static{this.styles=t`
|
|
1242
1557
|
:host {
|
|
1243
1558
|
display: block;
|
|
1244
1559
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1281,7 +1596,11 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1281
1596
|
}
|
|
1282
1597
|
|
|
1283
1598
|
.form-label {
|
|
1284
|
-
${M}
|
|
1599
|
+
${M}
|
|
1600
|
+
display: flex;
|
|
1601
|
+
align-items: baseline;
|
|
1602
|
+
flex-direction: row;
|
|
1603
|
+
gap: 4px;
|
|
1285
1604
|
color: var(--label-color, var(--secondary-color-80));
|
|
1286
1605
|
}
|
|
1287
1606
|
|
|
@@ -1348,7 +1667,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1348
1667
|
}
|
|
1349
1668
|
|
|
1350
1669
|
.filter-input {
|
|
1351
|
-
${
|
|
1670
|
+
${B};
|
|
1352
1671
|
padding: 16px;
|
|
1353
1672
|
padding-right: 40px;
|
|
1354
1673
|
border: none;
|
|
@@ -1368,7 +1687,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1368
1687
|
}
|
|
1369
1688
|
|
|
1370
1689
|
.filter-input::placeholder {
|
|
1371
|
-
${
|
|
1690
|
+
${B};
|
|
1372
1691
|
color: var(--secondary-color-40);
|
|
1373
1692
|
}
|
|
1374
1693
|
|
|
@@ -1413,16 +1732,12 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1413
1732
|
}
|
|
1414
1733
|
|
|
1415
1734
|
.options-list li {
|
|
1416
|
-
${
|
|
1735
|
+
${B};
|
|
1417
1736
|
padding: 8px 16px 8px 16px;
|
|
1418
1737
|
cursor: pointer;
|
|
1419
1738
|
color: var(--secondary-color-80);
|
|
1420
1739
|
}
|
|
1421
1740
|
|
|
1422
|
-
.options-list li.highlighted {
|
|
1423
|
-
background-color: var(--primary-color-10);
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
1741
|
.mobile-modal {
|
|
1427
1742
|
position: fixed;
|
|
1428
1743
|
bottom: 0;
|
|
@@ -1482,7 +1797,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1482
1797
|
}
|
|
1483
1798
|
|
|
1484
1799
|
.filter-fake {
|
|
1485
|
-
${
|
|
1800
|
+
${B};
|
|
1486
1801
|
padding: 15px;
|
|
1487
1802
|
padding-right: 40px;
|
|
1488
1803
|
width: 100%;
|
|
@@ -1520,11 +1835,23 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1520
1835
|
.options-list::-webkit-scrollbar-button {
|
|
1521
1836
|
display: none;
|
|
1522
1837
|
}
|
|
1523
|
-
|
|
1838
|
+
|
|
1839
|
+
.required {
|
|
1840
|
+
color: var(--ui-negative);
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
.optional {
|
|
1844
|
+
color: var(--secondary-color-60);
|
|
1845
|
+
${_}
|
|
1846
|
+
}
|
|
1847
|
+
`}constructor(){if(super(),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.label="",this.value="",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.debounceTimeout=null,this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this),this.defaultValue){const t=this.options.find((t=>"string"==typeof t?t===this.defaultValue:t.value===this.defaultValue));t&&(this.filterValue="string"==typeof t?t:t.label)}}willUpdate(t){if(t.has("options")&&(this.filteredOptions=[...this.options]),t.has("defaultValue")||t.has("options")){const t=this.options.find((t=>"string"==typeof t?t===this.defaultValue:t.value===this.defaultValue));t&&(this.filterValue="string"==typeof t?t:t.label)}if(t.has("value")){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));t&&(this.filterValue="string"==typeof t?t:t.label)}}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;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.filterValue=i,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){const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.mobileFilterValue=i,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.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.filterValue="",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()))}render(){const t=this.isMobile;return i`
|
|
1524
1848
|
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
1525
1849
|
${this.label?i`
|
|
1526
1850
|
<div class="label-container">
|
|
1527
|
-
<label class="form-label"
|
|
1851
|
+
<label class="form-label">
|
|
1852
|
+
${this.label}
|
|
1853
|
+
${this.required?i`<span class="required">*</span>`:this.optional?i`<span class="optional">opcional</span>`:o}
|
|
1854
|
+
</label>
|
|
1528
1855
|
</div>
|
|
1529
1856
|
`:""}
|
|
1530
1857
|
|
|
@@ -1532,17 +1859,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1532
1859
|
|
|
1533
1860
|
<div class="input-wrapper">
|
|
1534
1861
|
${t?i`
|
|
1535
|
-
<div
|
|
1536
|
-
class="filter-fake"
|
|
1537
|
-
@click="${this.handleInputClick}"
|
|
1538
|
-
@keydown="${this.handleKeyDown}"
|
|
1539
|
-
tabindex="0"
|
|
1540
|
-
role="combobox"
|
|
1541
|
-
aria-expanded="${this.isOpen}"
|
|
1542
|
-
aria-controls="options-list"
|
|
1543
|
-
aria-haspopup="listbox"
|
|
1544
|
-
aria-activedescendant=""
|
|
1545
|
-
">
|
|
1862
|
+
<div class="filter-fake" @click="${this.handleInputClick}">
|
|
1546
1863
|
${this.filterValue||this.placeholder}
|
|
1547
1864
|
</div>
|
|
1548
1865
|
`:i`
|
|
@@ -1550,7 +1867,6 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1550
1867
|
class="filter-input"
|
|
1551
1868
|
.value="${this.filterValue||""}"
|
|
1552
1869
|
@click="${this.handleInputClick}"
|
|
1553
|
-
@keydown="${this.handleKeyDown}"
|
|
1554
1870
|
@input=${this.handleInput}
|
|
1555
1871
|
placeholder="${this.filterValue?"":this.placeholder}"
|
|
1556
1872
|
?disabled="${this.disabled}"
|
|
@@ -1583,14 +1899,12 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1583
1899
|
</button>
|
|
1584
1900
|
</div>
|
|
1585
1901
|
<ul class="options-list">
|
|
1586
|
-
${this.filteredOptions.map((
|
|
1902
|
+
${this.filteredOptions.map((t=>{const e="string"==typeof t?t:t.label,o="object"==typeof t&&t.disabled;return i`
|
|
1587
1903
|
<li
|
|
1588
|
-
class="${
|
|
1589
|
-
|
|
1590
|
-
aria-selected="${e===this.highlightedIndex}"
|
|
1591
|
-
@click="${()=>{r||this.handleSelect(t)}}"
|
|
1904
|
+
class="${o?"disabled":""}"
|
|
1905
|
+
@click="${()=>{o||this.handleSelect(t)}}"
|
|
1592
1906
|
>
|
|
1593
|
-
${
|
|
1907
|
+
${e}
|
|
1594
1908
|
</li>
|
|
1595
1909
|
`}))}
|
|
1596
1910
|
</ul>
|
|
@@ -1598,121 +1912,19 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1598
1912
|
</div>
|
|
1599
1913
|
`:!t&&this.isOpen&&this.filteredOptions.length>0?i`
|
|
1600
1914
|
<ul class="options-list">
|
|
1601
|
-
${this.filteredOptions.map((
|
|
1915
|
+
${this.filteredOptions.map((t=>{const e="string"==typeof t?t:t.label,o="object"==typeof t&&t.disabled;return i`
|
|
1602
1916
|
<li
|
|
1603
|
-
class="${
|
|
1604
|
-
|
|
1605
|
-
aria-selected="${e===this.highlightedIndex}"
|
|
1606
|
-
@click="${()=>{r||this.handleSelect(t)}}"
|
|
1917
|
+
class="${o?"disabled":""}"
|
|
1918
|
+
@click="${()=>{o||this.handleSelect(t)}}"
|
|
1607
1919
|
>
|
|
1608
|
-
${
|
|
1920
|
+
${e}
|
|
1609
1921
|
</li>
|
|
1610
1922
|
`}))}
|
|
1611
1923
|
</ul>
|
|
1612
1924
|
`:""}
|
|
1613
1925
|
</div>
|
|
1614
1926
|
</div>
|
|
1615
|
-
`}};n([
|
|
1616
|
-
.stepper {
|
|
1617
|
-
display: flex;
|
|
1618
|
-
gap: 20px;
|
|
1619
|
-
align-items: center;
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
.step {
|
|
1623
|
-
width: 20px;
|
|
1624
|
-
height: 20px;
|
|
1625
|
-
border-radius: 50%;
|
|
1626
|
-
background-color: var(--white);
|
|
1627
|
-
border: 1px solid var(--secondary-color-20);
|
|
1628
|
-
position: relative;
|
|
1629
|
-
box-sizing: content-box;
|
|
1630
|
-
display: flex;
|
|
1631
|
-
align-items: center;
|
|
1632
|
-
justify-content: center;
|
|
1633
|
-
font-size: 12px;
|
|
1634
|
-
color: var(--secondary-color-20);
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
.step .inner-circle {
|
|
1638
|
-
width: 4px;
|
|
1639
|
-
height: 4px;
|
|
1640
|
-
border-radius: 50%;
|
|
1641
|
-
background-color: var(--white);
|
|
1642
|
-
position: absolute;
|
|
1643
|
-
top: 50%;
|
|
1644
|
-
left: 50%;
|
|
1645
|
-
transform: translate(-50%, -50%);
|
|
1646
|
-
image-rendering: -webkit-optimize-contrast;
|
|
1647
|
-
image-rendering: crisp-edges;
|
|
1648
|
-
backface-visibility: hidden;
|
|
1649
|
-
transform-style: preserve-3d;
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.step.completed {
|
|
1653
|
-
background-color: var(--primary-color);
|
|
1654
|
-
border: 1px solid var(--primary-color);
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
.step.completed randstad-icon {
|
|
1658
|
-
color: white;
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
.step.active {
|
|
1662
|
-
background-color: var(--white);
|
|
1663
|
-
border: 1px solid var(--primary-color);
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
.step.active .inner-circle {
|
|
1667
|
-
background-color: var(--primary-color);
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
.step.active .pulse-circle {
|
|
1671
|
-
width: 12px;
|
|
1672
|
-
height: 12px;
|
|
1673
|
-
border-radius: 50%;
|
|
1674
|
-
background-color: var(--primary-color);
|
|
1675
|
-
opacity: 0.25;
|
|
1676
|
-
position: absolute;
|
|
1677
|
-
top: 50%;
|
|
1678
|
-
left: 50%;
|
|
1679
|
-
transform: translate(-50%, -50%) scale(0.6);
|
|
1680
|
-
animation: pulse 2000ms ease-in-out infinite;
|
|
1681
|
-
image-rendering: -webkit-optimize-contrast;
|
|
1682
|
-
image-rendering: crisp-edges;
|
|
1683
|
-
backface-visibility: hidden;
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
@keyframes pulse {
|
|
1687
|
-
0% {
|
|
1688
|
-
transform: translate(-50%, -50%) scale(0.6);
|
|
1689
|
-
}
|
|
1690
|
-
80%, 100% {
|
|
1691
|
-
transform: translate(-50%, -50%) scale(1.2);
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
.step,
|
|
1696
|
-
.inner-circle,
|
|
1697
|
-
.pulse-circle {
|
|
1698
|
-
will-change: transform;
|
|
1699
|
-
-webkit-font-smoothing: antialiased;
|
|
1700
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1701
|
-
}
|
|
1702
|
-
`}render(){return i`
|
|
1703
|
-
<div class="stepper">
|
|
1704
|
-
${Array.from({length:this.totalSteps},((t,e)=>i`
|
|
1705
|
-
<div
|
|
1706
|
-
class="step ${e<this.currentStep?"completed":e===this.currentStep?"active":""}"
|
|
1707
|
-
>
|
|
1708
|
-
${e<this.currentStep?i`<randstad-icon name="tick-circle" size="16px"></randstad-icon>`:e===this.currentStep?i`
|
|
1709
|
-
<span class="pulse-circle"></span>
|
|
1710
|
-
<span class="inner-circle"></span>
|
|
1711
|
-
`:i`<span class="inner-circle"></span>`}
|
|
1712
|
-
</div>
|
|
1713
|
-
`))}
|
|
1714
|
-
</div>
|
|
1715
|
-
`}};n([j({type:Number}),a("design:type",Object)],Bt.prototype,"totalSteps",void 0),n([j({type:Number}),a("design:type",Object)],Bt.prototype,"currentStep",void 0),Bt=n([l("custom-stepper")],Bt);const Vt=new CSSStyleSheet;Vt.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 Nt extends e{static{this.styles=[Vt,t`
|
|
1927
|
+
`}};n([I({type:Array}),a("design:type",Array)],Nt.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],Nt.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],Nt.prototype,"value",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"filterable",void 0),n([I({type:Number}),a("design:type",Number)],Nt.prototype,"maxLength",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],Nt.prototype,"error",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"optional",void 0),n([L(),a("design:type",Boolean)],Nt.prototype,"isMobile",void 0),n([L(),a("design:type",Array)],Nt.prototype,"filteredOptions",void 0),n([L(),a("design:type",Object)],Nt.prototype,"filterValue",void 0),n([L(),a("design:type",Object)],Nt.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],Nt.prototype,"mobileFilterValue",void 0),Nt=n([l("filterable-select"),a("design:paramtypes",[])],Nt);const Gt=new CSSStyleSheet;Gt.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 Ht extends e{static{this.styles=[Gt,t`
|
|
1716
1928
|
:host {
|
|
1717
1929
|
display: flex;
|
|
1718
1930
|
position: fixed;
|
|
@@ -1782,7 +1994,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1782
1994
|
}
|
|
1783
1995
|
|
|
1784
1996
|
.container {
|
|
1785
|
-
${
|
|
1997
|
+
${R};
|
|
1786
1998
|
display: flex;
|
|
1787
1999
|
align-items: center;
|
|
1788
2000
|
box-sizing: border-box;
|
|
@@ -1848,7 +2060,107 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1848
2060
|
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
1849
2061
|
<span class="message">${this.message}</span>
|
|
1850
2062
|
</div>
|
|
1851
|
-
`}}customElements.define("randstad-snackbar",
|
|
2063
|
+
`}}customElements.define("randstad-snackbar",Ht);let Yt=class extends e{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=t`
|
|
2064
|
+
.stepper {
|
|
2065
|
+
display: flex;
|
|
2066
|
+
gap: 20px;
|
|
2067
|
+
align-items: center;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
.step {
|
|
2071
|
+
width: 20px;
|
|
2072
|
+
height: 20px;
|
|
2073
|
+
border-radius: 50%;
|
|
2074
|
+
background-color: var(--white);
|
|
2075
|
+
border: 1px solid var(--secondary-color-20);
|
|
2076
|
+
position: relative;
|
|
2077
|
+
box-sizing: content-box;
|
|
2078
|
+
display: flex;
|
|
2079
|
+
align-items: center;
|
|
2080
|
+
justify-content: center;
|
|
2081
|
+
font-size: 12px;
|
|
2082
|
+
color: var(--secondary-color-20);
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
.step .inner-circle {
|
|
2086
|
+
width: 4px;
|
|
2087
|
+
height: 4px;
|
|
2088
|
+
border-radius: 50%;
|
|
2089
|
+
background-color: var(--white);
|
|
2090
|
+
position: absolute;
|
|
2091
|
+
top: 50%;
|
|
2092
|
+
left: 50%;
|
|
2093
|
+
transform: translate(-50%, -50%);
|
|
2094
|
+
image-rendering: -webkit-optimize-contrast;
|
|
2095
|
+
image-rendering: crisp-edges;
|
|
2096
|
+
backface-visibility: hidden;
|
|
2097
|
+
transform-style: preserve-3d;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
.step.completed {
|
|
2101
|
+
background-color: var(--primary-color);
|
|
2102
|
+
border: 1px solid var(--primary-color);
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
.step.completed randstad-icon {
|
|
2106
|
+
color: white;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
.step.active {
|
|
2110
|
+
background-color: var(--white);
|
|
2111
|
+
border: 1px solid var(--primary-color);
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
.step.active .inner-circle {
|
|
2115
|
+
background-color: var(--primary-color);
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
.step.active .pulse-circle {
|
|
2119
|
+
width: 12px;
|
|
2120
|
+
height: 12px;
|
|
2121
|
+
border-radius: 50%;
|
|
2122
|
+
background-color: var(--primary-color);
|
|
2123
|
+
opacity: 0.25;
|
|
2124
|
+
position: absolute;
|
|
2125
|
+
top: 50%;
|
|
2126
|
+
left: 50%;
|
|
2127
|
+
transform: translate(-50%, -50%) scale(0.6);
|
|
2128
|
+
animation: pulse 2000ms ease-in-out infinite;
|
|
2129
|
+
image-rendering: -webkit-optimize-contrast;
|
|
2130
|
+
image-rendering: crisp-edges;
|
|
2131
|
+
backface-visibility: hidden;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
@keyframes pulse {
|
|
2135
|
+
0% {
|
|
2136
|
+
transform: translate(-50%, -50%) scale(0.6);
|
|
2137
|
+
}
|
|
2138
|
+
80%, 100% {
|
|
2139
|
+
transform: translate(-50%, -50%) scale(1.2);
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
.step,
|
|
2144
|
+
.inner-circle,
|
|
2145
|
+
.pulse-circle {
|
|
2146
|
+
will-change: transform;
|
|
2147
|
+
-webkit-font-smoothing: antialiased;
|
|
2148
|
+
-moz-osx-font-smoothing: grayscale;
|
|
2149
|
+
}
|
|
2150
|
+
`}render(){return i`
|
|
2151
|
+
<div class="stepper">
|
|
2152
|
+
${Array.from({length:this.totalSteps},((t,e)=>i`
|
|
2153
|
+
<div
|
|
2154
|
+
class="step ${e<this.currentStep?"completed":e===this.currentStep?"active":""}"
|
|
2155
|
+
>
|
|
2156
|
+
${e<this.currentStep?i`<randstad-icon name="tick-circle" size="16px"></randstad-icon>`:e===this.currentStep?i`
|
|
2157
|
+
<span class="pulse-circle"></span>
|
|
2158
|
+
<span class="inner-circle"></span>
|
|
2159
|
+
`:i`<span class="inner-circle"></span>`}
|
|
2160
|
+
</div>
|
|
2161
|
+
`))}
|
|
2162
|
+
</div>
|
|
2163
|
+
`}};n([I({type:Number}),a("design:type",Object)],Yt.prototype,"totalSteps",void 0),n([I({type:Number}),a("design:type",Object)],Yt.prototype,"currentStep",void 0),Yt=n([l("custom-stepper")],Yt);let Wt=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`
|
|
1852
2164
|
:host {
|
|
1853
2165
|
display: block;
|
|
1854
2166
|
border-bottom: 1px solid #E7E8EC;
|
|
@@ -1861,7 +2173,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1861
2173
|
}
|
|
1862
2174
|
|
|
1863
2175
|
.tab {
|
|
1864
|
-
${
|
|
2176
|
+
${U};
|
|
1865
2177
|
display: flex;
|
|
1866
2178
|
gap: 8px;
|
|
1867
2179
|
flex-direction: row;
|
|
@@ -1963,7 +2275,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1963
2275
|
padding: 16px;
|
|
1964
2276
|
}
|
|
1965
2277
|
}
|
|
1966
|
-
`}firstUpdated(){this.handleScroll()}updated(t){t.has("selected")&&(this.internalSelected=this.selected)}selectTab(t){this.internalSelected=t
|
|
2278
|
+
`}firstUpdated(){this.handleScroll()}updated(t){t.has("selected")&&(this.internalSelected=this.selected)}selectTab(t){this.internalSelected=t;const e=this.tabs.find((e=>e.value===t));e&&this.dispatchEvent(new CustomEvent("tab-change",{detail:e,bubbles:!0,composed:!0}))}scrollTabsLeft(){const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const e=t.scrollLeft,i=Array.from(t.querySelectorAll(".tab"));for(let o=i.length-1;o>=0;o--){const r=i[o].offsetLeft;if(r<e+this.SCROLL_OFFSET-1){const e=r-this.SCROLL_OFFSET;t.scrollTo({left:e,behavior:"smooth"});break}}setTimeout((()=>this.handleScroll()),300)}scrollTabsRight(){const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const e=t.scrollLeft,i=Array.from(t.querySelectorAll(".tab"));for(const o of i)if(o.offsetLeft>e+this.SCROLL_OFFSET){const e=o.offsetLeft-this.SCROLL_OFFSET;t.scrollTo({left:e,behavior:"smooth"});break}setTimeout((()=>this.handleScroll()),300)}render(){return i`
|
|
1967
2279
|
<div class="scroll-container">
|
|
1968
2280
|
${this.showPrev?i`
|
|
1969
2281
|
<button class="scroll-button prev" @click=${this.scrollTabsLeft}>
|
|
@@ -1987,66 +2299,129 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1987
2299
|
</button>
|
|
1988
2300
|
`:null}
|
|
1989
2301
|
</div>
|
|
1990
|
-
`}};n([
|
|
2302
|
+
`}};n([I({type:Array}),a("design:type",Array)],Wt.prototype,"tabs",void 0),n([I({type:String}),a("design:type",String)],Wt.prototype,"selected",void 0),n([L(),a("design:type",String)],Wt.prototype,"internalSelected",void 0),n([L(),a("design:type",Object)],Wt.prototype,"showPrev",void 0),n([L(),a("design:type",Object)],Wt.prototype,"showNext",void 0),Wt=n([l("tabs-bar")],Wt);let Kt=class extends e{constructor(){super(...arguments),this.files=[],this.loading=!1,this.progress=0,this.isDragging=!1,this.disabled=!1}static{this.styles=t`
|
|
2303
|
+
|
|
1991
2304
|
:host {
|
|
1992
|
-
|
|
1993
|
-
width: 64px;
|
|
1994
|
-
height: 64px;
|
|
2305
|
+
font-family: 'Graphik', sans-serif;
|
|
1995
2306
|
}
|
|
1996
2307
|
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2308
|
+
.container {
|
|
2309
|
+
display: flex;
|
|
2310
|
+
gap: 16px;
|
|
2311
|
+
flex-direction: column;
|
|
2312
|
+
border: 1px solid var(--secondary-color-10);
|
|
2313
|
+
border-radius: 4px;
|
|
2314
|
+
padding: 16px;
|
|
2315
|
+
align-items: center;
|
|
2316
|
+
background-color: var(--white);
|
|
2317
|
+
transition: border 0.2s ease, outline 0.2s ease;
|
|
2000
2318
|
}
|
|
2001
2319
|
|
|
2002
|
-
.
|
|
2320
|
+
.container.dragging {
|
|
2321
|
+
border: 1px dashed var(--secondary-color-40);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
.icon {
|
|
2325
|
+
width: 40px;
|
|
2326
|
+
height: 40px
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
.text-container {
|
|
2330
|
+
display: flex;
|
|
2331
|
+
flex-direction: column;
|
|
2332
|
+
align-items: center;
|
|
2333
|
+
gap: 8px;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
.text-main {
|
|
2003
2337
|
${R};
|
|
2004
2338
|
text-align: center;
|
|
2005
2339
|
vertical-align: middle;
|
|
2006
|
-
|
|
2007
|
-
text-anchor: middle;
|
|
2008
|
-
dominant-baseline: middle;
|
|
2340
|
+
color: var(--secondary-color-80);
|
|
2009
2341
|
}
|
|
2010
2342
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2343
|
+
.text-secondary {
|
|
2344
|
+
${_};
|
|
2345
|
+
text-align: center;
|
|
2346
|
+
vertical-align: middle;
|
|
2347
|
+
color: var(--secondary-color-60);
|
|
2013
2348
|
}
|
|
2014
2349
|
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2350
|
+
.text-tertiary {
|
|
2351
|
+
${_};
|
|
2352
|
+
text-align: center;
|
|
2353
|
+
vertical-align: middle;
|
|
2354
|
+
color: var(--secondary-color-40);
|
|
2018
2355
|
}
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2356
|
+
|
|
2357
|
+
.button {
|
|
2358
|
+
${_};
|
|
2359
|
+
background-color: var(--primary-color);
|
|
2360
|
+
border: none;
|
|
2361
|
+
padding: 4px 16px;
|
|
2362
|
+
cursor: pointer;
|
|
2363
|
+
border-radius: 4px;
|
|
2364
|
+
color: var(--white);
|
|
2365
|
+
text-align: center;
|
|
2366
|
+
vertical-align: middle;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
:host([disabled]) .button {
|
|
2370
|
+
background-color: var(--secondary-color-20);
|
|
2371
|
+
color: var(--secondary-color-80);
|
|
2372
|
+
cursor: not-allowed;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
input[type="file"] {
|
|
2376
|
+
display: none;
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
.progress-bar-container {
|
|
2380
|
+
min-height: 23px;
|
|
2381
|
+
display: flex;
|
|
2382
|
+
align-items: center;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
.progress-bar {
|
|
2386
|
+
min-width: 80px;
|
|
2387
|
+
height: 8px;
|
|
2388
|
+
background-color: var(--secondary-color-20);
|
|
2389
|
+
border-radius: 999px;
|
|
2390
|
+
overflow: hidden;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
.progress-bar-fill {
|
|
2394
|
+
height: 100%;
|
|
2395
|
+
background-color: var(--primary-color);
|
|
2396
|
+
transition: width 0.1s ease;
|
|
2397
|
+
}
|
|
2398
|
+
`}handleFiles(t){if(!t||this.loading)return;const e=Array.from(t).slice(0,3-this.files.length);this.loading=!0,this.progress=0;const i=setInterval((()=>{this.progress+=5,this.progress>=100&&(clearInterval(i),this.files=[...this.files,...e],this.loading=!1,this.progress=0,this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})))}),100)}onFileInputChange(t){const e=t.target;this.handleFiles(e.files)}onDrop(t){t.preventDefault(),this.disabled||(this.isDragging=!1,this.handleFiles(t.dataTransfer?.files||null))}onDragOver(t){t.preventDefault(),this.disabled||(this.isDragging=!0)}onDragLeave(t){t.preventDefault(),this.disabled||(this.isDragging=!1)}render(){return i`
|
|
2399
|
+
<div class="container ${this.isDragging?"dragging":""}"
|
|
2400
|
+
@drop="${this.onDrop}"
|
|
2401
|
+
@dragover="${this.onDragOver}"
|
|
2402
|
+
@dragleave="${this.onDragLeave}">
|
|
2403
|
+
<img class="icon"
|
|
2404
|
+
src=${this.disabled?"/assets/img/image-upload-disabled.svg":"/assets/img/image-upload-circle.svg"}
|
|
2405
|
+
alt="Subir imagen" />
|
|
2406
|
+
<div class="text-container">
|
|
2407
|
+
<div class="text-main">subí hasta 3 imágenes</div>
|
|
2408
|
+
<div class="text-secondary">
|
|
2409
|
+
Podés agregar un archivo o arrastrar y soltar acá
|
|
2410
|
+
</div>
|
|
2411
|
+
<div class="text-tertiary">.jpg, .jpeg, .png</div>
|
|
2412
|
+
</div>
|
|
2413
|
+
${this.loading?i`
|
|
2414
|
+
<div class="progress-bar-container">
|
|
2415
|
+
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
2416
|
+
<div class="progress-bar-fill" style="width: ${this.progress}%;"></div>
|
|
2417
|
+
</div>
|
|
2418
|
+
</div>
|
|
2419
|
+
`:i`
|
|
2420
|
+
<label class="button">
|
|
2421
|
+
agregar archivo
|
|
2422
|
+
<input type="file" accept=".jpg,.jpeg,.png" multiple @change="${this.onFileInputChange}" />
|
|
2423
|
+
</label>
|
|
2424
|
+
`}
|
|
2425
|
+
</div>
|
|
2426
|
+
`}};n([I({type:Array}),a("design:type",Array)],Kt.prototype,"files",void 0),n([L(),a("design:type",Object)],Kt.prototype,"loading",void 0),n([L(),a("design:type",Object)],Kt.prototype,"progress",void 0),n([L(),a("design:type",Object)],Kt.prototype,"isDragging",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Kt.prototype,"disabled",void 0),Kt=n([l("upload-image")],Kt);export{N as AccordionList,D as AccordionPanel,H as CarouselCard,Y as Checkbox,Q as CustomModal,Z as CustomPopup,Dt as CustomRadio,Yt as CustomStepper,Nt as FilterableSelect,K as FormGroup,X as IconComponent,tt as ProgressCircle,G as RandstadButton,W as RandstadForm,J as RandstadNotice,Wt as TabsBar,Kt as UploadImage};
|
|
2052
2427
|
//# sourceMappingURL=index.js.map
|