@randstad-uca/design-system 1.0.59 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/img/image-upload-error.svg +15 -0
- package/dist/components/Accordion.d.ts +2 -3
- package/dist/components/CalendarOverlay.d.ts +3 -3
- package/dist/components/Carousel.d.ts +18 -0
- package/dist/components/CarouselCards.d.ts +4 -0
- package/dist/components/DatePicker.d.ts +15 -14
- package/dist/components/File.d.ts +7 -41
- package/dist/components/Form.d.ts +3 -2
- package/dist/components/Icon.d.ts +3 -2
- package/dist/components/Modal.d.ts +1 -1
- package/dist/components/Select.d.ts +3 -2
- package/dist/components/Upload.d.ts +15 -8
- package/dist/helpers/BaseUpload.d.ts +81 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1396 -1188
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/randstad-design-system.css +1 -1
- package/dist/stories/Accordion.stories.d.ts +1 -1
- package/dist/stories/Carousel.stories.d.ts +8 -0
- package/dist/styles/colors.css +48 -49
- package/dist/styles/error.d.ts +2 -1
- package/dist/styles/error.ts +4 -4
- package/dist/styles/fontStyles.d.ts +8 -7
- package/dist/styles/fontStyles.ts +8 -8
- package/dist/styles/globalStyles.ts +3 -3
- package/dist/styles/mix.d.ts +2 -1
- package/dist/styles/mix.ts +9 -9
- package/dist/styles/progress-bar-upload.d.ts +2 -1
- package/dist/styles/progress-bar-upload.ts +4 -4
- package/dist/styles/scrollbar.d.ts +1 -0
- package/dist/styles/scrollbar.ts +25 -0
- package/dist/styles/tooltip.d.ts +2 -1
- package/dist/styles/tooltip.ts +4 -4
- package/dist/utils/file-format.d.ts +3 -0
- package/package.json +1 -1
- package/dist/styles/notice.css +0 -0
- package/dist/styles/select.css +0 -12
- package/dist/styles/snackbar.css +0 -0
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import{LitElement as t,html as e,nothing as i,css as
|
|
1
|
+
import{LitElement as t,html as e,nothing as i,css as r,isServer as o}from"lit";import{classMap as s}from"lit/directives/class-map.js";function n(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const
|
|
7
|
+
const l=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},d=globalThis,c=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h=Symbol(),p=new WeakMap;
|
|
8
8
|
/**
|
|
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!==
|
|
12
|
+
*/let u=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==h)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=p.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&p.set(e,t))}return t}toString(){return this.cssText}};const b=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,h))(e)})(t):t,{is:g,defineProperty:m,getOwnPropertyDescriptor:y,getOwnPropertyNames:v,getOwnPropertySymbols:f,getPrototypeOf:x}=Object,w=globalThis,k=w.trustedTypes,$=k?k.emptyScript:"",S=w.reactiveElementPolyfillSupport,C=(t,e)=>t,E={toAttribute(t,e){switch(e){case Boolean:t=t?$: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}},D=(t,e)=>!g(t,e),M={attribute:!0,type:String,converter:E,reflect:!1,useDefault:!1,hasChanged:D};
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/Symbol.metadata??=Symbol("metadata"),
|
|
17
|
+
*/Symbol.metadata??=Symbol("metadata"),w.litPropertyMetadata??=new WeakMap;class A 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=M){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(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&m(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:o}=y(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const s=r?.call(this);o?.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??M}static _$Ei(){if(this.hasOwnProperty(C("elementProperties")))return;const t=x(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(C("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(C("properties"))){const t=this.properties,e=[...v(t),...f(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(b(t))}else void 0!==t&&e.push(b(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(c)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=d.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:E).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:E;this._$Em=r,this[r]=o.fromAttribute(e,t.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const r=this.constructor,o=this[t];if(i??=r.getPropertyOptions(t),!((i.hasChanged??D)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:r,wrapped:o},s){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==o||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===r&&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,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,i,r)}}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){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[C("elementProperties")]=new Map,A[C("finalized")]=new Map,S?.({ReactiveElement:A}),(w.reactiveElementVersions??=[]).push("2.1.0");
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const O={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:D},F=(t=O,e,i)=>{const{kind:r,metadata:o}=i;let s=globalThis.litPropertyMetadata.get(o);if(void 0===s&&globalThis.litPropertyMetadata.set(o,s=new Map),"setter"===r&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===r){const{name:r}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(r,o,t)},init(e){return void 0!==e&&this.C(r,void 0,t,e),e}}}if("setter"===r){const{name:r}=i;return function(i){const o=this[r];e.call(this,i),this.requestUpdate(r,o,t)}}throw Error("Unsupported decorator location: "+r)};function _(t){return(e,i)=>"object"==typeof i?F(t,e,i):((t,e,i)=>{const r=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),r?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 T(t){return
|
|
28
|
+
*/function T(t){return _({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,7 +36,7 @@ const P={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:O},j=(t=P,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function
|
|
39
|
+
function j(t,e){return(e,i,r)=>((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)}})}let P=class extends t{constructor(){super(...arguments),this.label="",this.placeholder="",this.labelColor="",this.value="",this.required=!1,this.optional=!1,this.disabled=!1,this.error=!1,this.errorMessage=null,this.helper=null,this.helperAlign="left"}renderLabelContainer(){return e`
|
|
40
40
|
${this.label?e`
|
|
41
41
|
<div class="label-container">
|
|
42
42
|
${this.renderLabel()}
|
|
@@ -79,52 +79,52 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
79
79
|
${this.helper}
|
|
80
80
|
</p>
|
|
81
81
|
`:i}
|
|
82
|
-
`}};
|
|
82
|
+
`}};n([_({type:String}),a("design:type",Object)],P.prototype,"label",void 0),n([_({type:String}),a("design:type",Object)],P.prototype,"placeholder",void 0),n([_({type:String}),a("design:type",Object)],P.prototype,"labelColor",void 0),n([_(),a("design:type",Object)],P.prototype,"value",void 0),n([_({type:Boolean}),a("design:type",Object)],P.prototype,"required",void 0),n([_({type:Boolean}),a("design:type",Object)],P.prototype,"optional",void 0),n([_({type:Boolean}),a("design:type",Object)],P.prototype,"disabled",void 0),n([_({type:Boolean,reflect:!0}),a("design:type",Object)],P.prototype,"error",void 0),n([_({type:String}),a("design:type",Object)],P.prototype,"errorMessage",void 0),n([_({type:String}),a("design:type",Object)],P.prototype,"helper",void 0),n([_({type:String}),a("design:type",String)],P.prototype,"helperAlign",void 0),n([_({type:String}),a("design:type",String)],P.prototype,"help",void 0),n([_({type:String}),a("design:type",String)],P.prototype,"helpLink",void 0),n([_({type:String}),a("design:type",String)],P.prototype,"helpLinkTooltipMessage",void 0),P=n([l("base-control")],P);const L=r`
|
|
83
83
|
font-family: 'Graphik', sans-serif;
|
|
84
84
|
font-weight: 400;
|
|
85
85
|
font-size: 12px;
|
|
86
86
|
line-height: 15px;
|
|
87
87
|
letter-spacing: 0%;
|
|
88
|
-
`,
|
|
88
|
+
`,z=r`
|
|
89
89
|
font-family: 'Graphik', sans-serif;
|
|
90
90
|
font-weight: 400;
|
|
91
91
|
font-size: 14px;
|
|
92
92
|
line-height: 25px;
|
|
93
93
|
letter-spacing: 0%;
|
|
94
|
-
`,
|
|
94
|
+
`,I=r`
|
|
95
95
|
font-family: 'Graphik', sans-serif;
|
|
96
96
|
font-weight: 400;
|
|
97
97
|
font-size: 16px;
|
|
98
98
|
line-height: 25px;
|
|
99
99
|
letter-spacing: 0%;
|
|
100
|
-
`,N=
|
|
100
|
+
`,N=r`
|
|
101
101
|
font-family: 'Graphik', sans-serif;
|
|
102
102
|
font-weight: 400;
|
|
103
103
|
font-size: 18px;
|
|
104
104
|
line-height: 30px;
|
|
105
105
|
letter-spacing: 0%;
|
|
106
|
-
`,
|
|
106
|
+
`,B=r`
|
|
107
107
|
font-family: 'Graphik', sans-serif;
|
|
108
108
|
font-weight: 400;
|
|
109
109
|
font-size: 18px;
|
|
110
110
|
line-height: 30px;
|
|
111
111
|
letter-spacing: 0%;
|
|
112
112
|
vertical-align: middle;
|
|
113
|
-
`,
|
|
113
|
+
`,R=r`
|
|
114
114
|
font-family: 'Graphik', sans-serif;
|
|
115
115
|
font-weight: 400;
|
|
116
116
|
font-size: 20px;
|
|
117
117
|
line-height: 30px;
|
|
118
118
|
letter-spacing: -1%;
|
|
119
119
|
vertical-align: middle;
|
|
120
|
-
`,
|
|
120
|
+
`,V=r`
|
|
121
121
|
font-family: 'Graphik', sans-serif;
|
|
122
122
|
font-weight: 400;
|
|
123
123
|
font-size: 26px;
|
|
124
124
|
line-height: 30px;
|
|
125
125
|
letter-spacing: -1%;
|
|
126
126
|
vertical-align: middle;
|
|
127
|
-
`;let
|
|
127
|
+
`;let U=class extends t{constructor(){super(...arguments),this.title="",this.isOpen=!1,this.isDesktop=window.innerWidth>940,this.handleResize=()=>{this.isDesktop=window.innerWidth>940}}static{this.styles=r`
|
|
128
128
|
:host {
|
|
129
129
|
display: flex;
|
|
130
130
|
flex-direction: column;
|
|
@@ -143,8 +143,8 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.title {
|
|
146
|
-
${
|
|
147
|
-
color: var(--secondary-color);
|
|
146
|
+
${I}
|
|
147
|
+
color: var( --secondary-color );
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.icon-wrapper {
|
|
@@ -154,29 +154,36 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
154
154
|
display: flex;
|
|
155
155
|
align-items: center;
|
|
156
156
|
justify-content: center;
|
|
157
|
-
transition: background-color
|
|
157
|
+
transition: background-color .5s ease-in-out;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.icon {
|
|
161
|
-
transition: transform
|
|
161
|
+
transition: transform .5s ease-in-out;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.content {
|
|
165
165
|
overflow: hidden;
|
|
166
|
+
height: 0;
|
|
166
167
|
max-height: 0;
|
|
167
|
-
|
|
168
|
+
opacity: 0;
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
.content.open {
|
|
171
172
|
max-height: 1000px;
|
|
172
173
|
padding-bottom: 16px;
|
|
174
|
+
height: auto;
|
|
175
|
+
opacity: 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.content, .content.open {
|
|
179
|
+
transition: height .5s ease-in-out, opacity .5s ease-in-out, padding-bottom .3s ease-in-out;
|
|
173
180
|
}
|
|
174
181
|
|
|
175
182
|
:host::after {
|
|
176
183
|
content: '';
|
|
177
184
|
display: block;
|
|
178
185
|
height: 1px;
|
|
179
|
-
background-color: var(--secondary-color-20);
|
|
186
|
+
background-color: var( --secondary-color-20 );
|
|
180
187
|
width: 100%;
|
|
181
188
|
}
|
|
182
189
|
|
|
@@ -184,33 +191,40 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
184
191
|
.header {
|
|
185
192
|
align-items: flex-start;
|
|
186
193
|
}
|
|
194
|
+
|
|
187
195
|
.header:hover .icon-wrapper {
|
|
188
|
-
background-color: var(--primary-color-5);
|
|
196
|
+
background-color: var( --primary-color-5 );
|
|
189
197
|
}
|
|
190
198
|
}
|
|
191
|
-
`}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}toggle(){this.isOpen=!this.isOpen}
|
|
199
|
+
`}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}toggle(){this.isOpen=!this.isOpen}render(){const t=e`
|
|
200
|
+
<randstad-icon
|
|
201
|
+
name="${this.isOpen?"arrow_up":"arrow_down"}"
|
|
202
|
+
size="24"
|
|
203
|
+
.color=${"var( --primary-color )"}
|
|
204
|
+
>
|
|
205
|
+
</randstad-icon>
|
|
206
|
+
`;return e`
|
|
192
207
|
<div class="header" @click=${this.toggle}>
|
|
193
208
|
<div class="title">${this.title}</div>
|
|
209
|
+
|
|
194
210
|
<div class="icon">
|
|
195
|
-
${this.isDesktop?e
|
|
196
|
-
<div class="icon-wrapper">
|
|
197
|
-
${this.renderIcon()}
|
|
198
|
-
</div>
|
|
199
|
-
`:this.renderIcon()}
|
|
211
|
+
${this.isDesktop?e`<div class="icon-wrapper">${t}</div>`:t}
|
|
200
212
|
</div>
|
|
201
213
|
</div>
|
|
214
|
+
|
|
202
215
|
<div class="content ${this.isOpen?"open":""}">
|
|
203
216
|
<slot></slot>
|
|
204
217
|
</div>
|
|
205
|
-
`}};
|
|
218
|
+
`}};n([_({type:String}),a("design:type",Object)],U.prototype,"title",void 0),n([T(),a("design:type",Object)],U.prototype,"isOpen",void 0),n([T(),a("design:type",Object)],U.prototype,"isDesktop",void 0),U=n([l("accordion-panel")],U);let H=class extends t{static{this.styles=r`
|
|
206
219
|
:host {
|
|
207
220
|
display: flex;
|
|
208
221
|
flex-direction: column;
|
|
209
222
|
gap: 16px;
|
|
210
223
|
}
|
|
211
|
-
`}render(){return e`<slot></slot>`}};
|
|
224
|
+
`}render(){return e`<slot></slot>`}};H=n([l("accordion-list")],H);let q=class extends t{constructor(){super(...arguments),this.type="button",this.variant="button-primary",this.size="md",this.label="",this.loader=!1,this.iconPosition="left",this.iconName=null,this.disabled=!1,this.idevent=""}static{this.styles=r`
|
|
212
225
|
:host {
|
|
213
226
|
display: inline-block;
|
|
227
|
+
--content-padding: 16px;
|
|
214
228
|
}
|
|
215
229
|
|
|
216
230
|
.button {
|
|
@@ -235,7 +249,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
235
249
|
justify-content: center;
|
|
236
250
|
gap: 4px;
|
|
237
251
|
width: 100%;
|
|
238
|
-
padding:
|
|
252
|
+
padding: var( --content-padding );
|
|
239
253
|
height: 100%;
|
|
240
254
|
}
|
|
241
255
|
|
|
@@ -252,7 +266,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
252
266
|
}
|
|
253
267
|
|
|
254
268
|
.button-md {
|
|
255
|
-
${
|
|
269
|
+
${I}
|
|
256
270
|
min-height: 57px;
|
|
257
271
|
}
|
|
258
272
|
|
|
@@ -504,12 +518,11 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
504
518
|
color: #6F758D;
|
|
505
519
|
cursor: default;
|
|
506
520
|
}
|
|
507
|
-
|
|
508
521
|
`}handleClick(t){if(!this.disabled)if("submit"===this.type){const t=this.closest("form");t&&t.requestSubmit()}else if("reset"===this.type){const t=this.closest("form");t&&t.reset()}else this.idevent&&this.dispatchEvent(new CustomEvent("randstad-button-click",{detail:this.idevent,composed:!0,bubbles:!0,cancelable:!1}))}render(){const t={button:!0,[this.variant]:!0,loader:this.loader,[`button-${this.size}`]:["button-primary","button-secondary","button-tertiary"].includes(this.variant)},i="button-tertiary"===this.variant?"var(--primary-color)":"white";return e`
|
|
509
522
|
<button
|
|
510
523
|
part="button"
|
|
511
524
|
type=${this.type}
|
|
512
|
-
class=${
|
|
525
|
+
class=${s(t)}
|
|
513
526
|
?disabled=${this.disabled||this.loader}
|
|
514
527
|
?aria-busy=${this.loader}
|
|
515
528
|
@click=${this.handleClick}
|
|
@@ -534,10 +547,12 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
534
547
|
</div>
|
|
535
548
|
`}
|
|
536
549
|
</button>
|
|
537
|
-
`}};
|
|
550
|
+
`}};n([_({type:String}),a("design:type",String)],q.prototype,"type",void 0),n([_({type:String}),a("design:type",String)],q.prototype,"variant",void 0),n([_({type:String}),a("design:type",String)],q.prototype,"size",void 0),n([_({type:String}),a("design:type",Object)],q.prototype,"label",void 0),n([_({type:Boolean}),a("design:type",Object)],q.prototype,"loader",void 0),n([_({type:String,attribute:"icon-src"}),a("design:type",String)],q.prototype,"iconSrc",void 0),n([_({type:String}),a("design:type",String)],q.prototype,"iconPosition",void 0),n([_({type:String}),a("design:type",Object)],q.prototype,"iconName",void 0),n([_({type:Boolean,reflect:!0}),a("design:type",Boolean)],q.prototype,"disabled",void 0),n([_({type:String}),a("design:type",Object)],q.prototype,"idevent",void 0),q=n([l("randstad-button")],q);let W=class extends t{constructor(){super(...arguments),this.img="",this.name="",this.title="",this.description="",this.buttonLabel="",this.cardId=""}static{this.styles=r`
|
|
538
551
|
:host {
|
|
539
552
|
display: inline-block;
|
|
540
553
|
font-family: "Graphik", sans-serif;
|
|
554
|
+
user-drag: none; /* Añade esta línea para deshabilitar el arrastre */
|
|
555
|
+
-webkit-user-drag: none; /* Para navegadores Webkit */
|
|
541
556
|
}
|
|
542
557
|
|
|
543
558
|
.image-container {
|
|
@@ -586,6 +601,11 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
586
601
|
width: 100%;
|
|
587
602
|
display: flex;
|
|
588
603
|
flex-direction: column;
|
|
604
|
+
padding: 24px;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.image-container:hover .content-container {
|
|
608
|
+
gap: 24px;
|
|
589
609
|
}
|
|
590
610
|
|
|
591
611
|
.title-wrapper {
|
|
@@ -603,6 +623,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
603
623
|
opacity: 0;
|
|
604
624
|
transform: translateY(40px);
|
|
605
625
|
transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
|
|
626
|
+
transition-duration: .5s;
|
|
606
627
|
}
|
|
607
628
|
|
|
608
629
|
.image-container:hover .details {
|
|
@@ -610,10 +631,12 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
610
631
|
opacity: 1;
|
|
611
632
|
transform: translateY(0);
|
|
612
633
|
overflow: visible;
|
|
634
|
+
transition-duration: .8s;
|
|
613
635
|
}
|
|
614
636
|
|
|
615
637
|
.description {
|
|
616
|
-
${
|
|
638
|
+
${z}
|
|
639
|
+
margin: 0;
|
|
617
640
|
}
|
|
618
641
|
|
|
619
642
|
::part(button) {
|
|
@@ -621,6 +644,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
621
644
|
border: 1px solid white;
|
|
622
645
|
background: transparent;
|
|
623
646
|
text-align: left;
|
|
647
|
+
margin-top: 24px;
|
|
624
648
|
}
|
|
625
649
|
|
|
626
650
|
::part(button):hover {
|
|
@@ -630,35 +654,46 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
630
654
|
::part(button):active {
|
|
631
655
|
background-color: rgba(255, 255, 255, 0.2);
|
|
632
656
|
}
|
|
633
|
-
`}render(){return e`
|
|
634
|
-
<div class="image-container" style="background-image: url(${this.img});">
|
|
657
|
+
`}handleButtonClick(t){t.stopPropagation(),this.onClick?this.onClick(t):this.dispatchEvent(new CustomEvent("card-button-click",{detail:t.detail,bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener("randstad-button-click",this.handleButtonClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("randstad-button-click",this.handleButtonClick)}render(){return e`
|
|
658
|
+
<div class="image-container" style="background-image: url( ${this.img} );">
|
|
635
659
|
<div class="overlay-gradient"></div>
|
|
660
|
+
|
|
636
661
|
<div class="overlay-hover"></div>
|
|
662
|
+
|
|
637
663
|
<div class="content-container">
|
|
638
664
|
<div class="title-wrapper">
|
|
639
665
|
<h3 class="title">${this.name}</h3>
|
|
640
666
|
</div>
|
|
667
|
+
|
|
641
668
|
<div class="details">
|
|
642
669
|
<p class="description">${this.description}</p>
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
670
|
+
|
|
671
|
+
${this.cardId?e`
|
|
672
|
+
<randstad-button
|
|
673
|
+
variant="button-tertiary"
|
|
674
|
+
.label=${this.buttonLabel}
|
|
675
|
+
idevent=${this.cardId}
|
|
676
|
+
@randstad-button-click=${this.handleButtonClick}
|
|
677
|
+
>
|
|
678
|
+
</randstad-button>`:e`
|
|
679
|
+
<randstad-button
|
|
680
|
+
variant="button-tertiary"
|
|
681
|
+
.label=${this.buttonLabel}
|
|
682
|
+
@randstad-button-click=${this.handleButtonClick}
|
|
683
|
+
>
|
|
684
|
+
</randstad-button>
|
|
685
|
+
`}
|
|
651
686
|
</div>
|
|
652
687
|
</div>
|
|
653
688
|
</div>
|
|
654
|
-
`}};
|
|
689
|
+
`}};n([_({type:String}),a("design:type",Object)],W.prototype,"img",void 0),n([_({type:String}),a("design:type",Object)],W.prototype,"name",void 0),n([_({type:String}),a("design:type",Object)],W.prototype,"title",void 0),n([_({type:String}),a("design:type",Object)],W.prototype,"description",void 0),n([_({type:String}),a("design:type",Object)],W.prototype,"buttonLabel",void 0),n([_({type:String}),a("design:type",Object)],W.prototype,"cardId",void 0),n([_({type:Object}),a("design:type",Object)],W.prototype,"onClick",void 0),W=n([l("carousel-card")],W);let Y=class extends t{constructor(){super(...arguments),this.checked=!1,this.error=!1,this.disabled=!1}static{this.styles=r`
|
|
655
690
|
:host {
|
|
656
691
|
display: block;
|
|
657
692
|
max-width: 100%;
|
|
658
693
|
}
|
|
659
694
|
|
|
660
695
|
label {
|
|
661
|
-
${
|
|
696
|
+
${z}
|
|
662
697
|
display: flex;
|
|
663
698
|
align-items: center;
|
|
664
699
|
gap: 8px;
|
|
@@ -770,7 +805,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
770
805
|
<slot></slot>
|
|
771
806
|
</span>
|
|
772
807
|
</label>
|
|
773
|
-
`}};
|
|
808
|
+
`}};n([_({type:Boolean,reflect:!0}),a("design:type",Object)],Y.prototype,"checked",void 0),n([_({type:Boolean}),a("design:type",Object)],Y.prototype,"error",void 0),n([_({type:Boolean}),a("design:type",Object)],Y.prototype,"disabled",void 0),Y=n([l("randstad-checkbox")],Y);const G=r`
|
|
774
809
|
.label-container {
|
|
775
810
|
display: flex;
|
|
776
811
|
align-items: center;
|
|
@@ -789,7 +824,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
789
824
|
top: 160%;
|
|
790
825
|
right: 0;
|
|
791
826
|
|
|
792
|
-
background-color: var(--tooltip-background, #0F1941);
|
|
827
|
+
background-color: var( --tooltip-background, #0F1941 );
|
|
793
828
|
color: var(--tooltip-color, #fff);
|
|
794
829
|
|
|
795
830
|
padding: 8px 12px;
|
|
@@ -816,28 +851,28 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
816
851
|
height: 0;
|
|
817
852
|
border-style: solid;
|
|
818
853
|
border-width: 0 6px 6px 6px;
|
|
819
|
-
border-color: transparent transparent var(--tooltip-background, #0F1941) transparent;
|
|
854
|
+
border-color: transparent transparent var( --tooltip-background, #0F1941 ) transparent;
|
|
820
855
|
}
|
|
821
856
|
|
|
822
857
|
.tooltip-wrapper:hover .tooltip {
|
|
823
858
|
visibility: visible;
|
|
824
859
|
opacity: 1;
|
|
825
860
|
}
|
|
826
|
-
`,X=
|
|
861
|
+
`,X=r`
|
|
827
862
|
:host {
|
|
828
863
|
display: block;
|
|
829
864
|
font-family: "Graphik", sans-serif;
|
|
830
|
-
color: var(--secondary-randstad-dark-blue, #0f1941);
|
|
865
|
+
color: var( --secondary-randstad-dark-blue, #0f1941 );
|
|
831
866
|
width: 100%;
|
|
832
867
|
}
|
|
833
868
|
|
|
834
869
|
.form-label {
|
|
835
|
-
${
|
|
870
|
+
${I}
|
|
836
871
|
display: flex;
|
|
837
872
|
align-items: baseline;
|
|
838
873
|
flex-direction: row;
|
|
839
874
|
gap: 4px;
|
|
840
|
-
color: var(--label-color, var(--secondary-color-80));
|
|
875
|
+
color: var( --label-color, var( --secondary-color-80 ) );
|
|
841
876
|
}
|
|
842
877
|
|
|
843
878
|
.input-container {
|
|
@@ -848,30 +883,30 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
848
883
|
|
|
849
884
|
input::placeholder {
|
|
850
885
|
${N}
|
|
851
|
-
color: var(--secondary-color-40);
|
|
886
|
+
color: var( --secondary-color-40 );
|
|
852
887
|
}
|
|
853
888
|
|
|
854
889
|
.helper-description {
|
|
855
|
-
${
|
|
856
|
-
color: var(--secondary-color-40);
|
|
890
|
+
${I}
|
|
891
|
+
color: var( --secondary-color-40 );
|
|
857
892
|
margin: 0;
|
|
858
893
|
}
|
|
859
894
|
|
|
860
895
|
.required {
|
|
861
|
-
color: var(--ui-negative);
|
|
896
|
+
color: var( --ui-negative );
|
|
862
897
|
}
|
|
863
898
|
|
|
864
899
|
.optional {
|
|
865
|
-
color: var(--secondary-color-60);
|
|
866
|
-
${
|
|
900
|
+
color: var( --secondary-color-60 );
|
|
901
|
+
${L}
|
|
867
902
|
}
|
|
868
903
|
|
|
869
904
|
randstad-icon {
|
|
870
|
-
color: var(--primary-color);
|
|
905
|
+
color: var( --primary-color );
|
|
871
906
|
}
|
|
872
|
-
`,
|
|
907
|
+
`,K=r`
|
|
873
908
|
:host([error]) .input-wrapper, .form.error .form-input {
|
|
874
|
-
border: 1px solid var(--ui-negative, red) !important;
|
|
909
|
+
border: 1px solid var( --ui-negative, red ) !important;
|
|
875
910
|
}
|
|
876
911
|
|
|
877
912
|
:host([error]) .input-wrapper:hover, .form.error:hover .form-input:hover {
|
|
@@ -879,161 +914,185 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
879
914
|
}
|
|
880
915
|
|
|
881
916
|
:host([error]) .input-wrapper.active, .form.error.active .form-input.active {
|
|
882
|
-
border: 1px solid var(--ui-negative, red) !important;
|
|
917
|
+
border: 1px solid var( --ui-negative, red ) !important;
|
|
883
918
|
box-shadow: none !important;
|
|
884
919
|
}
|
|
885
920
|
|
|
886
921
|
.error-message {
|
|
887
|
-
${
|
|
922
|
+
${I}
|
|
888
923
|
color: var(--ui-negative, #E00F0F);
|
|
889
924
|
margin-top: 4px;
|
|
890
925
|
}
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
926
|
+
`,Q=new CSSStyleSheet;Q.replaceSync(r`
|
|
927
|
+
::-webkit-scrollbar {
|
|
928
|
+
width: 8px;
|
|
929
|
+
height: 8px;
|
|
930
|
+
}
|
|
895
931
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
gap: 8px;
|
|
900
|
-
width: 100%;
|
|
901
|
-
}
|
|
932
|
+
::-webkit-scrollbar-track {
|
|
933
|
+
background: #E8E8E8;
|
|
934
|
+
}
|
|
902
935
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
border-radius: 4px;
|
|
908
|
-
outline: none;
|
|
909
|
-
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
910
|
-
width: 100%;
|
|
911
|
-
color: var(--secondary-color);
|
|
912
|
-
}
|
|
936
|
+
::-webkit-scrollbar-thumb {
|
|
937
|
+
background-color: #7A7A7A;
|
|
938
|
+
border-radius: 100px;
|
|
939
|
+
}
|
|
913
940
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
}
|
|
941
|
+
::-webkit-scrollbar-button {
|
|
942
|
+
display: none;
|
|
943
|
+
}
|
|
944
|
+
`.cssText);let J=class extends P{constructor(){super(...arguments),this.keydown=void 0,this.size="md",this.icon=null,this.typing=!1,this.type="text",this.isPasswordVisible=!1,this.cleanButton=!1}static{this.styles=[Q,r`
|
|
945
|
+
${X}
|
|
946
|
+
${K}
|
|
947
|
+
${G}
|
|
918
948
|
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
949
|
+
.form {
|
|
950
|
+
display: flex;
|
|
951
|
+
flex-direction: column;
|
|
952
|
+
gap: 8px;
|
|
953
|
+
width: 100%;
|
|
954
|
+
}
|
|
923
955
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
956
|
+
.form-input {
|
|
957
|
+
${N}
|
|
958
|
+
padding: 16px;
|
|
959
|
+
border: 1px solid var(--secondary-color-10);
|
|
960
|
+
border-radius: 4px;
|
|
961
|
+
outline: none;
|
|
962
|
+
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
963
|
+
width: 100%;
|
|
964
|
+
color: var(--secondary-color);
|
|
965
|
+
}
|
|
927
966
|
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
color: #9FA3B3;
|
|
933
|
-
cursor: default;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
.form.disabled .toggle-password,
|
|
937
|
-
.form.disabled .clean-button {
|
|
938
|
-
cursor: default;
|
|
939
|
-
}
|
|
967
|
+
/* Hover normal (sin error ni foco) */
|
|
968
|
+
.form:not(.error):not(:focus-within) .form-input:hover {
|
|
969
|
+
box-shadow: 0px 0px 0px 4px var(--form-hover-shadow);
|
|
970
|
+
}
|
|
940
971
|
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
position: relative;
|
|
946
|
-
}
|
|
972
|
+
/* Hover con error (sin foco) */
|
|
973
|
+
.form.error:not(:focus-within) .form-input:hover {
|
|
974
|
+
box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);
|
|
975
|
+
}
|
|
947
976
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
977
|
+
.form-input:focus {
|
|
978
|
+
border: 2px solid var(--primary-color)
|
|
979
|
+
}
|
|
951
980
|
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
981
|
+
.form.disabled .form-input,
|
|
982
|
+
.form.disabled .toggle-password randstad-icon,
|
|
983
|
+
.form.disabled .clean-button randstad-icon {
|
|
984
|
+
background-color: var( --secondary-color-10 );
|
|
985
|
+
color: #9FA3B3;
|
|
986
|
+
cursor: default;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.form.disabled .toggle-password,
|
|
990
|
+
.form.disabled .clean-button {
|
|
991
|
+
cursor: default;
|
|
992
|
+
}
|
|
955
993
|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
border: none;
|
|
963
|
-
cursor: pointer;
|
|
964
|
-
display: flex;
|
|
965
|
-
align-items: center;
|
|
966
|
-
justify-content: center;
|
|
967
|
-
width: 40px;
|
|
968
|
-
height: 40px;
|
|
969
|
-
}
|
|
994
|
+
.input-with-button {
|
|
995
|
+
display: flex;
|
|
996
|
+
align-items: center;
|
|
997
|
+
width: 100%;
|
|
998
|
+
position: relative;
|
|
999
|
+
}
|
|
970
1000
|
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
max-width: 32px;
|
|
975
|
-
max-height: 32px;
|
|
976
|
-
}
|
|
1001
|
+
.input-with-button input {
|
|
1002
|
+
width: 100%;
|
|
1003
|
+
}
|
|
977
1004
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
}
|
|
1005
|
+
.input-with-button input[type="password"]{
|
|
1006
|
+
padding-right: 40px;
|
|
1007
|
+
}
|
|
982
1008
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
1009
|
+
.input-with-button button {
|
|
1010
|
+
position: absolute;
|
|
1011
|
+
right: 10px;
|
|
1012
|
+
top: 50%;
|
|
1013
|
+
transform: translateY(-50%);
|
|
1014
|
+
background: transparent;
|
|
1015
|
+
border: none;
|
|
1016
|
+
cursor: pointer;
|
|
1017
|
+
display: flex;
|
|
1018
|
+
align-items: center;
|
|
1019
|
+
justify-content: center;
|
|
1020
|
+
width: 40px;
|
|
1021
|
+
height: 40px;
|
|
1022
|
+
}
|
|
987
1023
|
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
.link-text {
|
|
995
|
-
${B}
|
|
996
|
-
color: var(--primary-color);
|
|
997
|
-
cursor: pointer;
|
|
998
|
-
text-align: end;
|
|
999
|
-
text-decoration: none;
|
|
1000
|
-
vertical-align: middle;
|
|
1001
|
-
display: inline;
|
|
1002
|
-
padding: 0;
|
|
1003
|
-
margin: 0;
|
|
1004
|
-
line-height: normal;
|
|
1005
|
-
}
|
|
1024
|
+
.toggle-password randstad-icon {
|
|
1025
|
+
width: 100%;
|
|
1026
|
+
height: 100%;
|
|
1027
|
+
max-width: 32px;
|
|
1028
|
+
max-height: 32px;
|
|
1029
|
+
}
|
|
1006
1030
|
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1031
|
+
textarea {
|
|
1032
|
+
${N}
|
|
1033
|
+
resize: none;
|
|
1034
|
+
}
|
|
1010
1035
|
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
transform: translateY(-50%);
|
|
1016
|
-
background: transparent;
|
|
1017
|
-
border: none;
|
|
1018
|
-
cursor: pointer;
|
|
1019
|
-
display: flex;
|
|
1020
|
-
align-items: center;
|
|
1021
|
-
justify-content: center;
|
|
1022
|
-
width: 40px;
|
|
1023
|
-
height: 40px;
|
|
1024
|
-
}
|
|
1036
|
+
textarea.form-input {
|
|
1037
|
+
min-height: 30px;
|
|
1038
|
+
width: 100%;
|
|
1039
|
+
}
|
|
1025
1040
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1041
|
+
.form.disabled textarea.form-input {
|
|
1042
|
+
background-color: var(--secondary-color-10);
|
|
1043
|
+
color: #9FA3B3;
|
|
1044
|
+
cursor: default;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.link-text {
|
|
1048
|
+
${I}
|
|
1049
|
+
color: var(--primary-color);
|
|
1050
|
+
cursor: pointer;
|
|
1051
|
+
text-align: end;
|
|
1052
|
+
text-decoration: none;
|
|
1053
|
+
vertical-align: middle;
|
|
1054
|
+
display: inline;
|
|
1055
|
+
padding: 0;
|
|
1056
|
+
margin: 0;
|
|
1057
|
+
line-height: normal;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.link-text:hover {
|
|
1061
|
+
color: var(--secondary-color);
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.clean-button {
|
|
1065
|
+
position: absolute;
|
|
1066
|
+
right: 10px;
|
|
1067
|
+
top: 50%;
|
|
1068
|
+
transform: translateY(-50%);
|
|
1069
|
+
background: transparent;
|
|
1070
|
+
border: none;
|
|
1071
|
+
cursor: pointer;
|
|
1072
|
+
display: flex;
|
|
1073
|
+
align-items: center;
|
|
1074
|
+
justify-content: center;
|
|
1075
|
+
width: 40px;
|
|
1076
|
+
height: 40px;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.clean-button randstad-icon {
|
|
1080
|
+
width: 24px;
|
|
1081
|
+
height: 24px;
|
|
1082
|
+
color: var( --primary-color );
|
|
1083
|
+
}
|
|
1084
|
+
`]}togglePassword(t){this.isPasswordVisible=!this.isPasswordVisible;const e=t.currentTarget.parentElement?.querySelector("input");e&&(e.type=this.isPasswordVisible?"text":"password"),this.requestUpdate()}handleInput(t){this.handleInputCustom(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}))}handleInputCustom(t){"number"===this.keydown?this.onlyNumeric(t):"text"===this.keydown&&this.onlyText(t)}onlyNumeric(t){const e=t.target,i=e.value.replace(/[^0-9]/g,"");e.value=i}onlyText(t){const e=t.target,i=e.value.replace(/[^a-zA-Z\sáéíóúñÁÉÍÓÚÑ]/g,"");e.value=i}handleKeyDown(t){if("Enter"!==t.key)return;const e=new Event("submit",{bubbles:!0,composed:!0,cancelable:!0}),i=this.closest("form");i&&i.dispatchEvent(e)}render(){const t=this.cleanButton&&this.value&&"password"!==this.type&&"textarea"!==this.type,r="textarea"===this.type?`height: ${this.heightTextArea??"30px"}; max-height: ${this.maxHeightTextArea??"30px"}; overflow-y: auto;`:"",o=e`
|
|
1032
1085
|
${this.labelColor?`--label-color: ${this.labelColor};`:""}
|
|
1086
|
+
`,s=e`
|
|
1087
|
+
<randstad-icon
|
|
1088
|
+
name="${this.isPasswordVisible?"eye_crossed":"eye"}"
|
|
1089
|
+
size="24px"
|
|
1090
|
+
>
|
|
1091
|
+
</randstad-icon>
|
|
1033
1092
|
`;return e`
|
|
1034
1093
|
<div
|
|
1035
1094
|
class="form ${this.error?"error":""} ${this.disabled?"disabled":""}"
|
|
1036
|
-
style="${
|
|
1095
|
+
style="${o}"
|
|
1037
1096
|
>
|
|
1038
1097
|
${this.renderLabelContainer()}
|
|
1039
1098
|
|
|
@@ -1050,7 +1109,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1050
1109
|
@input=${this.handleInput}
|
|
1051
1110
|
@keydown=${this.handleKeyDown}
|
|
1052
1111
|
maxlength=${this.maxLength??i}
|
|
1053
|
-
style="${
|
|
1112
|
+
style="${r}"
|
|
1054
1113
|
>
|
|
1055
1114
|
</textarea>
|
|
1056
1115
|
`:e`
|
|
@@ -1072,18 +1131,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1072
1131
|
@click=${this.togglePassword}
|
|
1073
1132
|
?disabled=${this.disabled}
|
|
1074
1133
|
>
|
|
1075
|
-
${
|
|
1076
|
-
<randstad-icon
|
|
1077
|
-
name="eye_crossed"
|
|
1078
|
-
size="24px"
|
|
1079
|
-
>
|
|
1080
|
-
</randstad-icon>
|
|
1081
|
-
`:e`
|
|
1082
|
-
<randstad-icon
|
|
1083
|
-
name="eye"
|
|
1084
|
-
size="24px"
|
|
1085
|
-
>
|
|
1086
|
-
</randstad-icon>`}
|
|
1134
|
+
${s}
|
|
1087
1135
|
</button>`:i}
|
|
1088
1136
|
|
|
1089
1137
|
${t?e`
|
|
@@ -1117,10 +1165,10 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1117
1165
|
|
|
1118
1166
|
${this.renderHelper()}
|
|
1119
1167
|
</div>
|
|
1120
|
-
`}};
|
|
1168
|
+
`}};n([_({type:String}),a("design:type",Object)],J.prototype,"keydown",void 0),n([_({type:String}),a("design:type",String)],J.prototype,"size",void 0),n([_({type:String}),a("design:type",Object)],J.prototype,"icon",void 0),n([_({type:Boolean}),a("design:type",Boolean)],J.prototype,"typing",void 0),n([_({type:String}),a("design:type",String)],J.prototype,"type",void 0),n([_({type:String}),a("design:type",String)],J.prototype,"linkText",void 0),n([_({type:String}),a("design:type",String)],J.prototype,"linkRoute",void 0),n([_({type:Boolean,reflect:!0}),a("design:type",Object)],J.prototype,"isPasswordVisible",void 0),n([_({type:Boolean}),a("design:type",Boolean)],J.prototype,"cleanButton",void 0),n([_({type:Number}),a("design:type",Number)],J.prototype,"maxLength",void 0),n([_({type:String}),a("design:type",String)],J.prototype,"heightTextArea",void 0),n([_({type:String}),a("design:type",String)],J.prototype,"maxHeightTextArea",void 0),J=n([l("randstad-form")],J);let Z=class extends P{constructor(){super(...arguments),this.rows=""}static{this.styles=r`
|
|
1121
1169
|
${X}
|
|
1122
|
-
${Q}
|
|
1123
1170
|
${K}
|
|
1171
|
+
${G}
|
|
1124
1172
|
|
|
1125
1173
|
:host {
|
|
1126
1174
|
display: flex;
|
|
@@ -1152,28 +1200,63 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1152
1200
|
|
|
1153
1201
|
${this.renderHelper()}
|
|
1154
1202
|
</div>
|
|
1155
|
-
`}};
|
|
1203
|
+
`}};n([_({type:String}),a("design:type",String)],Z.prototype,"rows",void 0),Z=n([l("randstad-form-group")],Z);
|
|
1204
|
+
/**
|
|
1205
|
+
* @license
|
|
1206
|
+
* Copyright 2017 Google LLC
|
|
1207
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1208
|
+
*/
|
|
1209
|
+
const tt=2;let et=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
1210
|
+
/**
|
|
1211
|
+
* @license
|
|
1212
|
+
* Copyright 2017 Google LLC
|
|
1213
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1214
|
+
*/const it=globalThis,rt=it.trustedTypes,ot=rt?rt.createPolicy("lit-html",{createHTML:t=>t}):void 0,st="$lit$",nt=`lit$${Math.random().toFixed(9).slice(2)}$`,at="?"+nt,lt=`<${at}>`,dt=document,ct=()=>dt.createComment(""),ht=t=>null===t||"object"!=typeof t&&"function"!=typeof t,pt=Array.isArray,ut="[ \t\n\f\r]",bt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gt=/-->/g,mt=/>/g,yt=RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),vt=/'/g,ft=/"/g,xt=/^(?:script|style|textarea|title)$/i,wt=Symbol.for("lit-noChange"),kt=Symbol.for("lit-nothing"),$t=new WeakMap,St=dt.createTreeWalker(dt,129);function Ct(t,e){if(!pt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ot?ot.createHTML(e):e}const Et=(t,e)=>{const i=t.length-1,r=[];let o,s=2===e?"<svg>":3===e?"<math>":"",n=bt;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===bt?"!--"===l[1]?n=gt:void 0!==l[1]?n=mt:void 0!==l[2]?(xt.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=yt):void 0!==l[3]&&(n=yt):n===yt?">"===l[0]?(n=o??bt,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?yt:'"'===l[3]?ft:vt):n===ft||n===vt?n=yt:n===gt||n===mt?n=bt:(n=yt,o=void 0);const h=n===yt&&t[e+1].startsWith("/>")?" ":"";s+=n===bt?i+lt:d>=0?(r.push(a),i.slice(0,d)+st+i.slice(d)+nt+h):i+nt+(-2===d?e:h)}return[Ct(t,s+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class Dt{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,s=0;const n=t.length-1,a=this.parts,[l,d]=Et(t,e);if(this.el=Dt.createElement(l,i),St.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=St.nextNode())&&a.length<n;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(st)){const e=d[s++],i=r.getAttribute(t).split(nt),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?_t:"?"===n[1]?Tt:"@"===n[1]?jt:Ft}),r.removeAttribute(t)}else t.startsWith(nt)&&(a.push({type:6,index:o}),r.removeAttribute(t));if(xt.test(r.tagName)){const t=r.textContent.split(nt),e=t.length-1;if(e>0){r.textContent=rt?rt.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],ct()),St.nextNode(),a.push({type:2,index:++o});r.append(t[e],ct())}}}else if(8===r.nodeType)if(r.data===at)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(nt,t+1));)a.push({type:7,index:o}),t+=nt.length-1}o++}}static createElement(t,e){const i=dt.createElement("template");return i.innerHTML=t,i}}function Mt(t,e,i=t,r){if(e===wt)return e;let o=void 0!==r?i._$Co?.[r]:i._$Cl;const s=ht(e)?void 0:e._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),void 0===s?o=void 0:(o=new s(t),o._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=o:i._$Cl=o),void 0!==o&&(e=Mt(t,o._$AS(t,e.values),o,r)),e}class At{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??dt).importNode(e,!0);St.currentNode=r;let o=St.nextNode(),s=0,n=0,a=i[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new Ot(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new Pt(o,this,t)),this._$AV.push(e),a=i[++n]}s!==a?.index&&(o=St.nextNode(),s++)}return St.currentNode=dt,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Ot{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=kt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Mt(this,t,e),ht(t)?t===kt||null==t||""===t?(this._$AH!==kt&&this._$AR(),this._$AH=kt):t!==this._$AH&&t!==wt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>pt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==kt&&ht(this._$AH)?this._$AA.nextSibling.data=t:this.T(dt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Dt.createElement(Ct(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new At(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=$t.get(t.strings);return void 0===e&&$t.set(t.strings,e=new Dt(t)),e}k(t){pt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new Ot(this.O(ct()),this.O(ct()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Ft{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,o){this.type=1,this._$AH=kt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=kt}_$AI(t,e=this,i,r){const o=this.strings;let s=!1;if(void 0===o)t=Mt(this,t,e,0),s=!ht(t)||t!==this._$AH&&t!==wt,s&&(this._$AH=t);else{const r=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=Mt(this,r[i+n],e,n),a===wt&&(a=this._$AH[n]),s||=!ht(a)||a!==this._$AH[n],a===kt?t=kt:t!==kt&&(t+=(a??"")+o[n+1]),this._$AH[n]=a}s&&!r&&this.j(t)}j(t){t===kt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class _t extends Ft{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===kt?void 0:t}}class Tt extends Ft{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==kt)}}class jt extends Ft{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){if((t=Mt(this,t,e,0)??kt)===wt)return;const i=this._$AH,r=t===kt&&i!==kt||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==kt&&(i===kt||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Pt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Mt(this,t)}}const Lt=it.litHtmlPolyfillSupport;Lt?.(Dt,Ot),(it.litHtmlVersions??=[]).push("3.3.1");
|
|
1215
|
+
/**
|
|
1216
|
+
* @license
|
|
1217
|
+
* Copyright 2017 Google LLC
|
|
1218
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1219
|
+
*/
|
|
1220
|
+
class zt extends et{constructor(t){if(super(t),this.it=kt,t.type!==tt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===kt||null==t)return this._t=void 0,this.it=t;if(t===wt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}zt.directiveName="unsafeHTML",zt.resultType=1;
|
|
1221
|
+
/**
|
|
1222
|
+
* @license
|
|
1223
|
+
* Copyright 2017 Google LLC
|
|
1224
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1225
|
+
*/
|
|
1226
|
+
class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(...e)=>({_$litDirective$:t,values:e}))(It);class Bt extends t{constructor(){super(...arguments),this.name="",this.size="24px",this.color="",this.svgContent=null}static{this.styles=r`
|
|
1156
1227
|
:host {
|
|
1157
1228
|
display: inline-flex;
|
|
1158
|
-
width: var(--icon-size, 24px);
|
|
1159
|
-
height: var(--icon-size, 24px);
|
|
1229
|
+
width: var( --icon-size, 24px );
|
|
1230
|
+
height: var( --icon-size, 24px );
|
|
1160
1231
|
align-items: center;
|
|
1161
1232
|
justify-content: center;
|
|
1162
1233
|
}
|
|
1163
1234
|
|
|
1164
1235
|
svg {
|
|
1165
|
-
width: var(--icon-size, 24px);
|
|
1166
|
-
height: var(--icon-size, 24px);
|
|
1167
|
-
fill: var(--icon-color, currentColor);
|
|
1236
|
+
width: var( --icon-size, 24px );
|
|
1237
|
+
height: var( --icon-size, 24px );
|
|
1238
|
+
fill: var( --icon-color, currentColor );
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
.custom-icon {
|
|
1242
|
+
display: flex;
|
|
1243
|
+
justify-content: center;
|
|
1244
|
+
align-items: center;
|
|
1245
|
+
width: 100%;
|
|
1246
|
+
height: 100%;
|
|
1168
1247
|
}
|
|
1169
|
-
`}
|
|
1248
|
+
`}updated(t){super.updated(t),t.has("size")&&this.style.setProperty("--icon-size",this.size),t.has("color")&&this.style.setProperty("--icon-color",this.color),t.has("name")&&this.name&&this.loadIcon()}async loadIcon(){try{const t=await fetch(`/assets/icons/${this.name}.svg`);if(!t.ok)throw new Error("Icon not found");let e=await t.text();e=e.replace(/fill="[^"]*"/g,""),e=e.replace(/fill='[^']*'/g,""),this.svgContent=e}catch(t){console.error(`❌ Error cargando icono ${this.name}:`,t),this.innerHTML=" <span>⚠️</span> "}}render(){return this.svgContent?e`
|
|
1249
|
+
<div class="custom-icon" style="color: ${this.color};">
|
|
1250
|
+
${Nt(this.svgContent)}
|
|
1251
|
+
</div>
|
|
1252
|
+
`:e``}}n([_({type:String}),a("design:type",Object)],Bt.prototype,"name",void 0),n([_({type:String}),a("design:type",Object)],Bt.prototype,"size",void 0),n([_({type:String}),a("design:type",Object)],Bt.prototype,"color",void 0),n([T(),a("design:type",Object)],Bt.prototype,"svgContent",void 0),customElements.define("randstad-icon",Bt);let Rt=class extends t{constructor(){super(...arguments),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1}static{this.styles=r`
|
|
1170
1253
|
:host {
|
|
1171
1254
|
display: block;
|
|
1172
1255
|
font-family: 'Graphik', sans-serif;
|
|
1173
1256
|
}
|
|
1174
1257
|
|
|
1175
1258
|
.container {
|
|
1176
|
-
${
|
|
1259
|
+
${I}
|
|
1177
1260
|
display: flex;
|
|
1178
1261
|
align-items: flex-start;
|
|
1179
1262
|
gap: 8px;
|
|
@@ -1216,154 +1299,151 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1216
1299
|
}
|
|
1217
1300
|
`}render(){return e`
|
|
1218
1301
|
<div class="container ${this.open?"":"hidden"} ${this.type}">
|
|
1219
|
-
<randstad-icon
|
|
1302
|
+
<randstad-icon
|
|
1303
|
+
name="${this.icon}"
|
|
1304
|
+
>
|
|
1305
|
+
</randstad-icon>
|
|
1306
|
+
|
|
1220
1307
|
<span class="message">${this.message}</span>
|
|
1221
1308
|
</div>
|
|
1222
|
-
`}};
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
:host([open]) {
|
|
1229
|
-
display: block;
|
|
1230
|
-
z-index: 9999;
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
.overlay {
|
|
1234
|
-
position: fixed;
|
|
1235
|
-
top: 0;
|
|
1236
|
-
left: 0;
|
|
1237
|
-
right: 0;
|
|
1238
|
-
bottom: 0;
|
|
1239
|
-
z-index: 9999;
|
|
1240
|
-
display: flex;
|
|
1241
|
-
background: rgba(15, 25, 65, 0.4);
|
|
1242
|
-
justify-content: center;
|
|
1243
|
-
align-items: center;
|
|
1244
|
-
overflow-y: auto;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
.modal {
|
|
1248
|
-
width: 100%;
|
|
1249
|
-
background: var(--brand-off-white);
|
|
1250
|
-
max-width: var(--modal-width);
|
|
1251
|
-
max-height: 80vh;
|
|
1252
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1253
|
-
display: flex;
|
|
1254
|
-
flex-direction: column;
|
|
1255
|
-
border-radius: 8px;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
.modal-body {
|
|
1259
|
-
overflow-y: auto;
|
|
1260
|
-
flex: 1;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
.modal-footer {
|
|
1264
|
-
justify-content: flex-end;
|
|
1265
|
-
}
|
|
1309
|
+
`}};n([_({type:String}),a("design:type",String)],Rt.prototype,"type",void 0),n([_({type:String}),a("design:type",String)],Rt.prototype,"icon",void 0),n([_({type:String}),a("design:type",String)],Rt.prototype,"message",void 0),n([_({type:Boolean}),a("design:type",Boolean)],Rt.prototype,"open",void 0),Rt=n([l("randstad-notice")],Rt);let Vt=class extends t{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.isFooterCustom=!1,this.isPrimaryLoader=!1,this.isPrimaryDisabled=!1,this.modalWidth="500px",this.scrollable=!1,this.setScrollableMode=()=>{this.scrollable=window.innerWidth>940}}static{this.styles=[Q,r`
|
|
1310
|
+
:host {
|
|
1311
|
+
font-family: 'Graphik', sans-serif;
|
|
1312
|
+
display: none;
|
|
1313
|
+
}
|
|
1266
1314
|
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1315
|
+
:host([open]) {
|
|
1316
|
+
display: block;
|
|
1317
|
+
z-index: 9999;
|
|
1318
|
+
}
|
|
1270
1319
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1320
|
+
.overlay {
|
|
1321
|
+
position: fixed;
|
|
1322
|
+
top: 0;
|
|
1323
|
+
left: 0;
|
|
1324
|
+
right: 0;
|
|
1325
|
+
bottom: 0;
|
|
1326
|
+
z-index: 9999;
|
|
1327
|
+
display: flex;
|
|
1328
|
+
background: rgba(15, 25, 65, 0.4);
|
|
1329
|
+
justify-content: center;
|
|
1330
|
+
align-items: center;
|
|
1331
|
+
overflow-y: auto;
|
|
1332
|
+
}
|
|
1274
1333
|
|
|
1275
|
-
/* Estilos para dispositivos pequeños (<= 940px) */
|
|
1276
|
-
@media (max-width: 940px) {
|
|
1277
1334
|
.modal {
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
height:
|
|
1281
|
-
|
|
1282
|
-
max-
|
|
1283
|
-
|
|
1335
|
+
width: 100%;
|
|
1336
|
+
height: 80dvh;
|
|
1337
|
+
max-height: 80dvh;
|
|
1338
|
+
background: var(--brand-off-white);
|
|
1339
|
+
max-width: var(--modal-width);
|
|
1340
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1341
|
+
display: flex;
|
|
1342
|
+
flex-direction: column;
|
|
1343
|
+
border-radius: 8px;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.modal-body {
|
|
1347
|
+
overflow-y: auto;
|
|
1348
|
+
flex: 1;
|
|
1284
1349
|
}
|
|
1285
1350
|
|
|
1286
|
-
.modal-header,
|
|
1287
|
-
.modal-body,
|
|
1288
1351
|
.modal-footer {
|
|
1289
|
-
|
|
1352
|
+
justify-content: flex-end;
|
|
1290
1353
|
}
|
|
1291
1354
|
|
|
1292
|
-
.modal-
|
|
1293
|
-
|
|
1355
|
+
.modal-footer.one-button randstad-button {
|
|
1356
|
+
width: 100%;
|
|
1294
1357
|
}
|
|
1295
|
-
|
|
1296
|
-
.modal-footer {
|
|
1297
|
-
|
|
1358
|
+
|
|
1359
|
+
.modal-footer.two-buttons randstad-button {
|
|
1360
|
+
width: 50%;
|
|
1298
1361
|
}
|
|
1299
|
-
}
|
|
1300
1362
|
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1363
|
+
/* Estilos para dispositivos pequeños (<= 940px) */
|
|
1364
|
+
@media (max-width: 940px) {
|
|
1365
|
+
.modal {
|
|
1366
|
+
/* Se estira para ocupar casi toda la pantalla */
|
|
1367
|
+
width: 96dvw;
|
|
1368
|
+
height: 96dvh;
|
|
1369
|
+
max-width: none;
|
|
1370
|
+
max-height: none;
|
|
1371
|
+
margin: 0;
|
|
1372
|
+
}
|
|
1311
1373
|
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
}
|
|
1374
|
+
.modal-header,
|
|
1375
|
+
.modal-body,
|
|
1376
|
+
.modal-footer {
|
|
1377
|
+
padding: 0;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1319
1380
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1381
|
+
/* Estilos comunes a ambos tamaños de pantalla */
|
|
1382
|
+
.modal-header {
|
|
1383
|
+
display: flex;
|
|
1384
|
+
flex-direction: column;
|
|
1385
|
+
gap: 8px;
|
|
1386
|
+
justify-content: space-between;
|
|
1387
|
+
align-items: center;
|
|
1388
|
+
padding: 24px;
|
|
1389
|
+
border-bottom: 1px solid var(--secondary-color-20);
|
|
1390
|
+
}
|
|
1326
1391
|
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1392
|
+
.modal-header-content {
|
|
1393
|
+
display: flex;
|
|
1394
|
+
gap: 32px;
|
|
1395
|
+
width: 100%;
|
|
1396
|
+
justify-content: space-between;
|
|
1397
|
+
align-items: center;
|
|
1398
|
+
}
|
|
1332
1399
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1400
|
+
.titles-container {
|
|
1401
|
+
display: flex;
|
|
1402
|
+
flex-direction: column;
|
|
1403
|
+
gap: 8px;
|
|
1404
|
+
flex-grow: 1;
|
|
1405
|
+
}
|
|
1338
1406
|
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1407
|
+
.modal-title {
|
|
1408
|
+
${V}
|
|
1409
|
+
margin: 0;
|
|
1410
|
+
color: var(--secondary-color);
|
|
1411
|
+
}
|
|
1342
1412
|
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
align-items: center;
|
|
1349
|
-
justify-content: center;
|
|
1350
|
-
padding: 0;
|
|
1351
|
-
}
|
|
1413
|
+
.modal-subtitle {
|
|
1414
|
+
${I}
|
|
1415
|
+
margin: 0;
|
|
1416
|
+
color: var(--secondary-color-60);
|
|
1417
|
+
}
|
|
1352
1418
|
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
padding: 24px;
|
|
1357
|
-
gap: 16px;
|
|
1358
|
-
}
|
|
1419
|
+
.modal-header randstad-notice {
|
|
1420
|
+
width: 100%;
|
|
1421
|
+
}
|
|
1359
1422
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1423
|
+
.modal-close {
|
|
1424
|
+
background: none;
|
|
1425
|
+
border: none;
|
|
1426
|
+
cursor: pointer;
|
|
1427
|
+
display: flex;
|
|
1428
|
+
align-items: center;
|
|
1429
|
+
justify-content: center;
|
|
1430
|
+
padding: 0;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
.modal-body {
|
|
1434
|
+
display: flex;
|
|
1435
|
+
flex-direction: column;
|
|
1436
|
+
padding: 24px;
|
|
1437
|
+
gap: 16px;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.modal-footer {
|
|
1441
|
+
display: flex;
|
|
1442
|
+
padding: 24px;
|
|
1443
|
+
gap: 16px;
|
|
1444
|
+
border-top: 1px solid var(--secondary-color-20);
|
|
1445
|
+
}
|
|
1446
|
+
`]}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)}getFooterClass(){return!this.isFooterCustom||this.showPrimaryButton||this.showSecondaryButton?this.showPrimaryButton&&this.showSecondaryButton?"two-buttons":"one-button":"footer-custom"}render(){return e`
|
|
1367
1447
|
<div class="overlay" role="dialog" aria-modal="true">
|
|
1368
1448
|
<div class="modal" style="--modal-width: ${this.modalWidth};">
|
|
1369
1449
|
<div class="modal-header">
|
|
@@ -1375,18 +1455,23 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1375
1455
|
</div>
|
|
1376
1456
|
|
|
1377
1457
|
<button class="modal-close" @click=${this.closeModal} aria-label="Cerrar modal">
|
|
1378
|
-
<randstad-icon
|
|
1458
|
+
<randstad-icon
|
|
1459
|
+
name="close"
|
|
1460
|
+
size="24"
|
|
1461
|
+
.color=${"var( --primary-color )"}
|
|
1462
|
+
>
|
|
1463
|
+
</randstad-icon>
|
|
1379
1464
|
</button>
|
|
1380
1465
|
</div>
|
|
1381
1466
|
|
|
1382
1467
|
${this.showNotice?e`
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1468
|
+
<randstad-notice
|
|
1469
|
+
.open=${!0}
|
|
1470
|
+
.type=${this.noticeType}
|
|
1471
|
+
.icon=${this.noticeIcon}
|
|
1472
|
+
.message=${this.noticeMessage}
|
|
1473
|
+
>
|
|
1474
|
+
</randstad-notice>
|
|
1390
1475
|
`:i}
|
|
1391
1476
|
</div>
|
|
1392
1477
|
|
|
@@ -1420,7 +1505,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1420
1505
|
</div>
|
|
1421
1506
|
</div>
|
|
1422
1507
|
</div>
|
|
1423
|
-
`}};
|
|
1508
|
+
`}};n([_({type:Boolean,reflect:!0}),a("design:type",Object)],Vt.prototype,"open",void 0),n([_({type:String}),a("design:type",Object)],Vt.prototype,"title",void 0),n([_({type:String}),a("design:type",String)],Vt.prototype,"subtitle",void 0),n([_({type:Boolean}),a("design:type",Object)],Vt.prototype,"showNotice",void 0),n([_({type:String}),a("design:type",String)],Vt.prototype,"noticeType",void 0),n([_({type:String}),a("design:type",Object)],Vt.prototype,"noticeMessage",void 0),n([_({type:String}),a("design:type",Object)],Vt.prototype,"noticeIcon",void 0),n([_({type:Boolean}),a("design:type",Object)],Vt.prototype,"showPrimaryButton",void 0),n([_({type:String}),a("design:type",Object)],Vt.prototype,"primaryButtonLabel",void 0),n([_({type:Boolean}),a("design:type",Object)],Vt.prototype,"showSecondaryButton",void 0),n([_({type:String}),a("design:type",Object)],Vt.prototype,"secondaryButtonLabel",void 0),n([_({type:Boolean}),a("design:type",Object)],Vt.prototype,"isFooterCustom",void 0),n([_({type:Boolean}),a("design:type",Object)],Vt.prototype,"isPrimaryLoader",void 0),n([_({type:Boolean}),a("design:type",Object)],Vt.prototype,"isPrimaryDisabled",void 0),n([_({type:String}),a("design:type",Object)],Vt.prototype,"modalWidth",void 0),n([T(),a("design:type",Object)],Vt.prototype,"scrollable",void 0),Vt=n([l("custom-modal")],Vt);let Ut=class extends t{constructor(){super(...arguments),this.open=!1,this.type="default",this.icon="warning",this.title="Título del Popup",this.description="Descripción del popup",this.width="400px",this.buttonText="Aceptar",this.confirmText="Sí",this.cancelText="No",this.stackedActions=[],this._onBackgroundClick=t=>{const e=t.composedPath(),i=this.renderRoot.querySelector(".popup");i&&!e.includes(i)&&(this.dispatchEvent(new CustomEvent("popup-close",{detail:null})),this.open=!1)}}static{this.styles=r`
|
|
1424
1509
|
:host {
|
|
1425
1510
|
display: none;
|
|
1426
1511
|
position: fixed;
|
|
@@ -1482,13 +1567,13 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1482
1567
|
}
|
|
1483
1568
|
|
|
1484
1569
|
.popup-title {
|
|
1485
|
-
${
|
|
1570
|
+
${R}
|
|
1486
1571
|
margin: 0;
|
|
1487
1572
|
color: var(--secondary-color-80);
|
|
1488
1573
|
}
|
|
1489
1574
|
|
|
1490
1575
|
.popup-description {
|
|
1491
|
-
${
|
|
1576
|
+
${I}
|
|
1492
1577
|
margin: 0;
|
|
1493
1578
|
color: var(--secondary-color-60);
|
|
1494
1579
|
}
|
|
@@ -1516,7 +1601,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1516
1601
|
}
|
|
1517
1602
|
|
|
1518
1603
|
.action-item {
|
|
1519
|
-
${
|
|
1604
|
+
${B};
|
|
1520
1605
|
display: flex;
|
|
1521
1606
|
align-items: center;
|
|
1522
1607
|
gap: 16px;
|
|
@@ -1578,8 +1663,9 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1578
1663
|
<randstad-icon
|
|
1579
1664
|
name=${t.icon}
|
|
1580
1665
|
size="24px"
|
|
1581
|
-
|
|
1582
|
-
|
|
1666
|
+
.color=${"var( --primary-color )"}
|
|
1667
|
+
>
|
|
1668
|
+
</randstad-icon>
|
|
1583
1669
|
</div>
|
|
1584
1670
|
<span>${t.label}</span>
|
|
1585
1671
|
</div>
|
|
@@ -1611,7 +1697,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1611
1697
|
`}
|
|
1612
1698
|
</div>
|
|
1613
1699
|
</div>
|
|
1614
|
-
`}};
|
|
1700
|
+
`}};n([_({type:Boolean,reflect:!0}),a("design:type",Object)],Ut.prototype,"open",void 0),n([_({type:String}),a("design:type",String)],Ut.prototype,"type",void 0),n([_({type:String}),a("design:type",Object)],Ut.prototype,"icon",void 0),n([_({type:String}),a("design:type",Object)],Ut.prototype,"title",void 0),n([_({type:String}),a("design:type",Object)],Ut.prototype,"description",void 0),n([_({type:String}),a("design:type",Object)],Ut.prototype,"width",void 0),n([_({type:String}),a("design:type",Object)],Ut.prototype,"buttonText",void 0),n([_({type:String}),a("design:type",Object)],Ut.prototype,"confirmText",void 0),n([_({type:String}),a("design:type",Object)],Ut.prototype,"cancelText",void 0),n([_({type:Array}),a("design:type",Array)],Ut.prototype,"stackedActions",void 0),Ut=n([l("custom-popup")],Ut);let Ht=class extends t{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=r`
|
|
1615
1701
|
:host {
|
|
1616
1702
|
display: inline-block;
|
|
1617
1703
|
width: 64px;
|
|
@@ -1624,7 +1710,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1624
1710
|
}
|
|
1625
1711
|
|
|
1626
1712
|
.circle-text {
|
|
1627
|
-
${
|
|
1713
|
+
${L};
|
|
1628
1714
|
text-align: center;
|
|
1629
1715
|
vertical-align: middle;
|
|
1630
1716
|
fill: var(--randstad-dark-blue-40);
|
|
@@ -1640,7 +1726,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1640
1726
|
stroke: var(--primary-light-blue);
|
|
1641
1727
|
stroke-linecap: round;
|
|
1642
1728
|
}
|
|
1643
|
-
`}render(){const t=2*Math.PI*28,i=Math.max(this.max,1),
|
|
1729
|
+
`}render(){const t=2*Math.PI*28,i=Math.max(this.max,1),r=t*(1-Math.min(this.value/i,1));return e`
|
|
1644
1730
|
<svg
|
|
1645
1731
|
viewBox="0 0 64 64"
|
|
1646
1732
|
role="img"
|
|
@@ -1664,7 +1750,7 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1664
1750
|
stroke-width="${6}"
|
|
1665
1751
|
fill="none"
|
|
1666
1752
|
stroke-dasharray="${t}"
|
|
1667
|
-
stroke-dashoffset="${
|
|
1753
|
+
stroke-dashoffset="${r}"
|
|
1668
1754
|
transform="rotate(-90 32 32)"
|
|
1669
1755
|
/>
|
|
1670
1756
|
<!-- Texto -->
|
|
@@ -1672,18 +1758,18 @@ function z(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1672
1758
|
${this.value} de ${this.max}
|
|
1673
1759
|
</text>
|
|
1674
1760
|
</svg>
|
|
1675
|
-
`}};
|
|
1761
|
+
`}};n([_({type:Number}),a("design:type",Object)],Ht.prototype,"value",void 0),n([_({type:Number}),a("design:type",Object)],Ht.prototype,"max",void 0),Ht=n([l("progress-circle")],Ht);
|
|
1676
1762
|
/**
|
|
1677
1763
|
* @license
|
|
1678
1764
|
* Copyright 2023 Google LLC
|
|
1679
1765
|
* SPDX-License-Identifier: Apache-2.0
|
|
1680
1766
|
*/
|
|
1681
|
-
const
|
|
1767
|
+
const qt=Symbol("attachableController");let Wt;o||(Wt=new MutationObserver((t=>{for(const e of t)e.target[qt]?.hostConnected()})));class Yt{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[qt]=this,Wt?.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}}
|
|
1682
1768
|
/**
|
|
1683
1769
|
* @license
|
|
1684
1770
|
* Copyright 2021 Google LLC
|
|
1685
1771
|
* SPDX-License-Identifier: Apache-2.0
|
|
1686
|
-
*/const
|
|
1772
|
+
*/const Gt=["focusin","focusout","pointerdown"];class Xt extends t{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new Yt(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[Kt]){switch(t.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[Kt]=!0}}onControlChange(t,e){if(!o)for(const i of Gt)t?.removeEventListener(i,this),e?.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}n([_({type:Boolean,reflect:!0})],Xt.prototype,"visible",void 0),n([_({type:Boolean,reflect:!0})],Xt.prototype,"inward",void 0);const Kt=Symbol("handledByFocusRing"),Qt=r`: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}}
|
|
1687
1773
|
`
|
|
1688
1774
|
/**
|
|
1689
1775
|
* @license
|
|
@@ -1694,81 +1780,81 @@ const nt=Symbol("attachableController");let at;r||(at=new MutationObserver((t=>{
|
|
|
1694
1780
|
* @license
|
|
1695
1781
|
* Copyright 2024 Google LLC
|
|
1696
1782
|
* SPDX-License-Identifier: Apache-2.0
|
|
1697
|
-
*/let
|
|
1783
|
+
*/let Jt=class extends Xt{};Jt.styles=[Qt],Jt=n([l("md-focus-ring")],Jt);
|
|
1698
1784
|
/**
|
|
1699
1785
|
* @license
|
|
1700
1786
|
* Copyright 2021 Google LLC
|
|
1701
1787
|
* SPDX-License-Identifier: Apache-2.0
|
|
1702
1788
|
*/
|
|
1703
|
-
const
|
|
1789
|
+
const Zt="cubic-bezier(0.2, 0, 0, 1)";
|
|
1704
1790
|
/**
|
|
1705
1791
|
* @license
|
|
1706
1792
|
* Copyright 2022 Google LLC
|
|
1707
1793
|
* SPDX-License-Identifier: Apache-2.0
|
|
1708
|
-
*/var
|
|
1794
|
+
*/var te;!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"}(te||(te={}));const ee=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ie=o?null:window.matchMedia("(forced-colors: active)");class re extends t{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=te.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new Yt(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 e`<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!==te.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==te.HOLDING)return this.state===te.TOUCH_DELAY?(this.state=te.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=te.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=te.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=te.TOUCH_DELAY,await new Promise((t=>{setTimeout(t,150)})),this.state===te.TOUCH_DELAY&&(this.state=te.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==te.WAITING_FOR_CLICK?this.state===te.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),r=Math.max(.35*i,75),o=Math.floor(.2*i),s=Math.sqrt(e**2+t**2)+10;this.initialSize=o,this.rippleScale=""+(s+r)/o,this.rippleSize=`${o}px`}getNormalizedPointerEventCoords(t){const{scrollX:e,scrollY:i}=window,{left:r,top:o}=this.getBoundingClientRect(),s=e+r,n=i+o,{pageX:a,pageY:l}=t;return{x:a-s,y:l-n}}getTranslationCoordinates(t){const{height:e,width:i}=this.getBoundingClientRect(),r={x:(i-this.initialSize)/2,y:(e-this.initialSize)/2};let o;return o=t instanceof PointerEvent?this.getNormalizedPointerEventCoords(t):{x:i/2,y:e/2},o={x:o.x-this.initialSize/2,y:o.y-this.initialSize/2},{startPoint:o,endPoint:r}}startPressAnimation(t){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:e,endPoint:i}=this.getTranslationCoordinates(t),r=`${e.x}px, ${e.y}px`,o=`${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(${r}) scale(1)`,`translate(${o}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:Zt,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=te.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:r,bottom:o,right:s}=this.getBoundingClientRect();return t>=r&&t<=s&&e>=i&&e<=o}isTouch({pointerType:t}){return"touch"===t}async handleEvent(t){if(!ie?.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(!o)for(const i of ee)t?.removeEventListener(i,this),e?.addEventListener(i,this)}}n([_({type:Boolean,reflect:!0})],re.prototype,"disabled",void 0),n([T()],re.prototype,"hovered",void 0),n([T()],re.prototype,"pressed",void 0),n([j(".surface")],re.prototype,"mdRoot",void 0);
|
|
1709
1795
|
/**
|
|
1710
1796
|
* @license
|
|
1711
1797
|
* Copyright 2024 Google LLC
|
|
1712
1798
|
* SPDX-License-Identifier: Apache-2.0
|
|
1713
1799
|
*/
|
|
1714
|
-
const
|
|
1800
|
+
const oe=r`: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}
|
|
1715
1801
|
`
|
|
1716
1802
|
/**
|
|
1717
1803
|
* @license
|
|
1718
1804
|
* Copyright 2022 Google LLC
|
|
1719
1805
|
* SPDX-License-Identifier: Apache-2.0
|
|
1720
|
-
*/;let
|
|
1806
|
+
*/;let se=class extends re{};
|
|
1721
1807
|
/**
|
|
1722
1808
|
* @license
|
|
1723
1809
|
* Copyright 2021 Google LLC
|
|
1724
1810
|
* SPDX-License-Identifier: Apache-2.0
|
|
1725
1811
|
*/
|
|
1726
|
-
function
|
|
1812
|
+
function ne(t){return t.currentTarget===t.target&&(t.composedPath()[0]===t.target&&(!t.target.disabled&&!function(t){const e=ae;e&&(t.preventDefault(),t.stopImmediatePropagation());return async function(){ae=!0,await null,ae=!1}
|
|
1727
1813
|
/**
|
|
1728
1814
|
* @license
|
|
1729
1815
|
* Copyright 2023 Google LLC
|
|
1730
1816
|
* SPDX-License-Identifier: Apache-2.0
|
|
1731
|
-
*/(),e}(t)))}
|
|
1817
|
+
*/(),e}(t)))}se.styles=[oe],se=n([l("md-ripple")],se);let ae=!1;const le=Symbol("internals"),de=Symbol("privateInternals");
|
|
1732
1818
|
/**
|
|
1733
1819
|
* @license
|
|
1734
1820
|
* Copyright 2023 Google LLC
|
|
1735
1821
|
* SPDX-License-Identifier: Apache-2.0
|
|
1736
1822
|
*/
|
|
1737
|
-
const
|
|
1823
|
+
const ce=Symbol("createValidator"),he=Symbol("getValidityAnchor"),pe=Symbol("privateValidator"),ue=Symbol("privateSyncValidity"),be=Symbol("privateCustomValidationMessage");
|
|
1738
1824
|
/**
|
|
1739
1825
|
* @license
|
|
1740
1826
|
* Copyright 2023 Google LLC
|
|
1741
1827
|
* SPDX-License-Identifier: Apache-2.0
|
|
1742
1828
|
*/
|
|
1743
|
-
const
|
|
1829
|
+
const ge=Symbol("isFocusable"),me=Symbol("privateIsFocusable"),ye=Symbol("externalTabIndex"),ve=Symbol("isUpdatingTabIndex"),fe=Symbol("updateTabIndex");
|
|
1744
1830
|
/**
|
|
1745
1831
|
* @license
|
|
1746
1832
|
* Copyright 2023 Google LLC
|
|
1747
1833
|
* SPDX-License-Identifier: Apache-2.0
|
|
1748
1834
|
*/
|
|
1749
|
-
const
|
|
1835
|
+
const xe=Symbol("getFormValue"),we=Symbol("getFormState");
|
|
1750
1836
|
/**
|
|
1751
1837
|
* @license
|
|
1752
1838
|
* Copyright 2023 Google LLC
|
|
1753
1839
|
* SPDX-License-Identifier: Apache-2.0
|
|
1754
1840
|
*/
|
|
1755
|
-
class
|
|
1841
|
+
class ke{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}}
|
|
1756
1842
|
/**
|
|
1757
1843
|
* @license
|
|
1758
1844
|
* Copyright 2023 Google LLC
|
|
1759
1845
|
* SPDX-License-Identifier: Apache-2.0
|
|
1760
|
-
*/class
|
|
1846
|
+
*/class $e extends ke{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:r,required:o}of t)o&&(e=!0),r&&(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 r=t[i],o=e[i];if(r.checked!==o.checked||r.required!==o.required)return!1}return!0}copy(t){return t.map((({checked:t,required:e})=>({checked:t,required:e})))}}
|
|
1761
1847
|
/**
|
|
1762
1848
|
* @license
|
|
1763
1849
|
* Copyright 2022 Google LLC
|
|
1764
1850
|
* SPDX-License-Identifier: Apache-2.0
|
|
1765
|
-
*/class
|
|
1851
|
+
*/class Se{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,r="ArrowLeft"===t.key,o="ArrowRight"===t.key;if(!(r||o||e||i))return;const s=this.controls;if(!s.length)return;t.preventDefault();const n="rtl"===getComputedStyle(this.host).direction?r||e:o||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}}
|
|
1766
1852
|
/**
|
|
1767
1853
|
* @license
|
|
1768
1854
|
* Copyright 2018 Google LLC
|
|
1769
1855
|
* SPDX-License-Identifier: Apache-2.0
|
|
1770
|
-
*/var
|
|
1771
|
-
<div class="container ${
|
|
1856
|
+
*/var Ce;const Ee=Symbol("checked");let De=0;const Me=function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=""}get validity(){return this[ue](),this[le].validity}get validationMessage(){return this[ue](),this[le].validationMessage}get willValidate(){return this[ue](),this[le].willValidate}checkValidity(){return this[ue](),this[le].checkValidity()}reportValidity(){return this[ue](),this[le].reportValidity()}setCustomValidity(t){this[be]=t,this[ue]()}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[ue]()}firstUpdated(t){super.firstUpdated(t),this[ue]()}[(e=be,ue)](){if(o)return;this[pe]||(this[pe]=this[ce]());const{validity:t,validationMessage:e}=this[pe].getValidity(),i=!!this[be],r=this[be]||e;this[le].setValidity({...t,customError:i},r,this[he]()??void 0)}[ce](){throw new Error("Implement [createValidator]")}[he](){throw new Error("Implement [getValidityAnchor]")}}return i}(function(t){class e extends t{get form(){return this[le].form}get labels(){return this[le].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[le].setFormValue(this[xe](),this[we]())}[xe](){throw new Error("Implement [getFormValue]")}[we](){return this[xe]()}formDisabledCallback(t){this.disabled=t}}return e.formAssociated=!0,n([_({noAccessor:!0})],e.prototype,"name",null),n([_({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}((Ae=function(t){var e,i,r;class o extends t{constructor(){super(...arguments),this[e]=!0,this[i]=null,this[r]=!1}get[ge](){return this[me]}set[ge](t){this[ge]!==t&&(this[me]=t,this[fe]())}connectedCallback(){super.connectedCallback(),this[fe]()}attributeChangedCallback(t,e,i){if("tabindex"===t){if(this.requestUpdate("tabIndex",Number(e??-1)),!this[ve])return this.hasAttribute("tabindex")?void(this[ye]=this.tabIndex):(this[ye]=null,void this[fe]())}else super.attributeChangedCallback(t,e,i)}[(e=me,i=ye,r=ve,fe)](){const t=this[ge]?0:-1,e=this[ye]??t;this[ve]=!0,this.tabIndex=e,this[ve]=!1}}return n([_({noAccessor:!0})],o.prototype,"tabIndex",void 0),o}(t),class extends Ae{get[le](){return this[de]||(this[de]=this.attachInternals()),this[de]}})));var Ae;class Oe extends Me{get checked(){return this[Ee]}set checked(t){const e=this.checked;e!==t&&(this[Ee]=t,this.requestUpdate("checked",e),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId="cutout"+ ++De,this[Ce]=!1,this.required=!1,this.value="on",this.selectionController=new Se(this),this.addController(this.selectionController),o||(this[le].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this)))}render(){const t={checked:this.checked};return e`
|
|
1857
|
+
<div class="container ${s(t)}" aria-hidden="true">
|
|
1772
1858
|
<md-ripple
|
|
1773
1859
|
part="ripple"
|
|
1774
1860
|
.control=${this}
|
|
@@ -1790,19 +1876,19 @@ class Lt{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{}
|
|
|
1790
1876
|
|
|
1791
1877
|
<div class="touch-target"></div>
|
|
1792
1878
|
</div>
|
|
1793
|
-
`}updated(){this[
|
|
1879
|
+
`}updated(){this[le].ariaChecked=String(this.checked)}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(ne(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()}[(Ce=Ee,xe)](){return this.checked?this.value:null}[we](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(t){this.checked="true"===t}[ce](){return new $e((()=>this.selectionController?this.selectionController.controls:[this]))}[he](){return this.container}}n([_({type:Boolean})],Oe.prototype,"checked",null),n([_({type:Boolean})],Oe.prototype,"required",void 0),n([_()],Oe.prototype,"value",void 0),n([j(".container")],Oe.prototype,"container",void 0);
|
|
1794
1880
|
/**
|
|
1795
1881
|
* @license
|
|
1796
1882
|
* Copyright 2024 Google LLC
|
|
1797
1883
|
* SPDX-License-Identifier: Apache-2.0
|
|
1798
1884
|
*/
|
|
1799
|
-
const
|
|
1885
|
+
const Fe=r`@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}}}
|
|
1800
1886
|
`
|
|
1801
1887
|
/**
|
|
1802
1888
|
* @license
|
|
1803
1889
|
* Copyright 2022 Google LLC
|
|
1804
1890
|
* SPDX-License-Identifier: Apache-2.0
|
|
1805
|
-
*/;let
|
|
1891
|
+
*/;let _e=class extends Oe{};_e.styles=[Fe],_e=n([l("md-radio")],_e);let Te=class extends t{constructor(){super(...arguments),this.name="radio-group",this.checked=!1,this.disabled=!1,this.error=!1}static{this.styles=r`
|
|
1806
1892
|
:host {
|
|
1807
1893
|
font-family: "Graphik", sans-serif;
|
|
1808
1894
|
}
|
|
@@ -1868,343 +1954,332 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1868
1954
|
|
|
1869
1955
|
<span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
|
|
1870
1956
|
</label>
|
|
1871
|
-
`}};
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1957
|
+
`}};n([_({type:String}),a("design:type",Object)],Te.prototype,"name",void 0),n([_({type:Boolean}),a("design:type",Object)],Te.prototype,"checked",void 0),n([_({type:Boolean}),a("design:type",Object)],Te.prototype,"disabled",void 0),n([_({type:Boolean}),a("design:type",Object)],Te.prototype,"error",void 0),Te=n([l("custom-radio")],Te);let je=class extends P{constructor(){super(...arguments),this.value="",this.defaultValue="",this.options=[],this.filterable=!0,this.isMobile=!1,this.highlightedIndex=-1,this._isCleared=!1,this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.debounceTimeout=null,this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this)}static{this.styles=[Q,r`
|
|
1958
|
+
${X}
|
|
1959
|
+
${K}
|
|
1960
|
+
${G}
|
|
1961
|
+
|
|
1962
|
+
/* --- Own Error Styles --- */
|
|
1963
|
+
:host([error]) .input-container:not(.open) .input-wrapper:hover {
|
|
1964
|
+
box-shadow: 0px 0px 0px 4px #E00F0F1A !important;
|
|
1965
|
+
}
|
|
1875
1966
|
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1967
|
+
:host([error]) .input-container.open:not(.mobile) .input-wrapper {
|
|
1968
|
+
border-bottom-left-radius: 0;
|
|
1969
|
+
border-bottom-right-radius: 0;
|
|
1970
|
+
border: 1px solid var(--ui-negative, red) !important;
|
|
1971
|
+
border-bottom: 1px solid transparent !important;
|
|
1972
|
+
}
|
|
1880
1973
|
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
}
|
|
1974
|
+
:host([error]) .input-container:not(.mobile) .options-list {
|
|
1975
|
+
border: 1px solid var(--ui-negative, red) !important;
|
|
1976
|
+
border-top: none !important;
|
|
1977
|
+
border-radius: 0 0 4px 4px;
|
|
1978
|
+
}
|
|
1887
1979
|
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1980
|
+
/* Estilos para el estado disabled */
|
|
1981
|
+
.input-wrapper.disabled .filter-input, .input-wrapper.disabled .filter-input, .input-wrapper.disabled .filter-fake {
|
|
1982
|
+
background-color: var(--secondary-color-10);
|
|
1983
|
+
color: #9FA3B3;
|
|
1984
|
+
cursor: default;
|
|
1985
|
+
}
|
|
1893
1986
|
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1987
|
+
.input-wrapper.disabled .icon-button,
|
|
1988
|
+
.input-wrapper.disabled .icon-button randstad-icon,
|
|
1989
|
+
.input-wrapper.disabled .icon-button .close-icon {
|
|
1990
|
+
color: #9FA3B3;
|
|
1991
|
+
cursor: default;
|
|
1992
|
+
}
|
|
1900
1993
|
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
cursor: default;
|
|
1906
|
-
}
|
|
1994
|
+
/* Y si tienes un icono seleccionado que también debe cambiar de color */
|
|
1995
|
+
.input-wrapper.disabled .icon-selected svg {
|
|
1996
|
+
fill: #9FA3B3;
|
|
1997
|
+
}
|
|
1907
1998
|
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
}
|
|
1999
|
+
.input-wrapper .icon-button .close-icon {
|
|
2000
|
+
color: var(--primary-color);
|
|
2001
|
+
}
|
|
1912
2002
|
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
2003
|
+
.select-container {
|
|
2004
|
+
display: flex;
|
|
2005
|
+
flex-direction: column;
|
|
2006
|
+
gap: 8px;
|
|
2007
|
+
width: 100%;
|
|
2008
|
+
}
|
|
1916
2009
|
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
2010
|
+
.input-container.focused:not(.open):not(.mobile) .input-wrapper {
|
|
2011
|
+
border: 1px solid var(--primary-color);
|
|
2012
|
+
border-radius: 4px;
|
|
2013
|
+
box-shadow: none;
|
|
2014
|
+
z-index: 11;
|
|
2015
|
+
}
|
|
1923
2016
|
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
box-shadow: none;
|
|
1928
|
-
z-index: 11;
|
|
1929
|
-
}
|
|
2017
|
+
.input-container.focused:not(.open):not(.mobile) .input-wrapper:hover {
|
|
2018
|
+
box-shadow: none;
|
|
2019
|
+
}
|
|
1930
2020
|
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
2021
|
+
:host(:not([error])) .input-container.open:not(.mobile) {
|
|
2022
|
+
border-radius: 4px;
|
|
2023
|
+
border-bottom-left-radius: 0;
|
|
2024
|
+
border-bottom-right-radius: 0;
|
|
2025
|
+
}
|
|
1934
2026
|
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2027
|
+
:host(:not([error])) .input-container.open:not(.mobile) .input-wrapper {
|
|
2028
|
+
border: 1px solid var(--primary-color);
|
|
2029
|
+
border-top-left-radius: 4px;
|
|
2030
|
+
border-top-right-radius: 4px;
|
|
2031
|
+
border-bottom-left-radius: 0;
|
|
2032
|
+
border-bottom-right-radius: 0;
|
|
2033
|
+
border-bottom: 1px solid transparent;
|
|
2034
|
+
box-shadow: none;
|
|
2035
|
+
z-index: 11;
|
|
2036
|
+
}
|
|
1940
2037
|
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
border-top-right-radius: 4px;
|
|
1945
|
-
border-bottom-left-radius: 0;
|
|
1946
|
-
border-bottom-right-radius: 0;
|
|
1947
|
-
border-bottom: 1px solid transparent;
|
|
1948
|
-
box-shadow: none;
|
|
1949
|
-
z-index: 11;
|
|
1950
|
-
}
|
|
2038
|
+
:host(:not([error])) .input-wrapper:hover {
|
|
2039
|
+
box-shadow: 0px 0px 0px 4px #0F19411A;
|
|
2040
|
+
}
|
|
1951
2041
|
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
2042
|
+
:host .input-container.open:not(.mobile)::after {
|
|
2043
|
+
content: '';
|
|
2044
|
+
position: absolute;
|
|
2045
|
+
top: calc(100% - 1px);
|
|
2046
|
+
left: 20px;
|
|
2047
|
+
right: 20px;
|
|
2048
|
+
height: 1px;
|
|
2049
|
+
background-color: var(--gray-20);
|
|
2050
|
+
z-index: 10;
|
|
2051
|
+
}
|
|
1955
2052
|
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
2053
|
+
.input-wrapper {
|
|
2054
|
+
border: 1px solid var(--secondary-color-10);
|
|
2055
|
+
border-radius: 4px;
|
|
2056
|
+
overflow: hidden;
|
|
2057
|
+
display: flex;
|
|
2058
|
+
align-items: center;
|
|
2059
|
+
width: 100%;
|
|
2060
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
2061
|
+
background-color: white;
|
|
2062
|
+
}
|
|
1966
2063
|
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
overflow: hidden;
|
|
1971
|
-
display: flex;
|
|
1972
|
-
align-items: center;
|
|
1973
|
-
width: 100%;
|
|
1974
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
1975
|
-
background-color: white;
|
|
1976
|
-
}
|
|
2064
|
+
.mobile-modal .filter-input {
|
|
2065
|
+
border-bottom: 1px solid var(--gray-20);
|
|
2066
|
+
}
|
|
1977
2067
|
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2068
|
+
.filter-input {
|
|
2069
|
+
${N};
|
|
2070
|
+
padding: 16px;
|
|
2071
|
+
padding-right: 40px;
|
|
2072
|
+
border: none;
|
|
2073
|
+
outline: none;
|
|
2074
|
+
width: 100%;
|
|
2075
|
+
box-sizing: border-box;
|
|
2076
|
+
background: white;
|
|
2077
|
+
cursor: pointer;
|
|
2078
|
+
color: var(--secondary-color);
|
|
2079
|
+
flex-grow: 1;
|
|
2080
|
+
}
|
|
1981
2081
|
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
width: 100%;
|
|
1989
|
-
box-sizing: border-box;
|
|
1990
|
-
background: white;
|
|
1991
|
-
cursor: pointer;
|
|
1992
|
-
color: var(--secondary-color);
|
|
1993
|
-
flex-grow: 1;
|
|
1994
|
-
}
|
|
2082
|
+
.filter-input,
|
|
2083
|
+
.filter-fake,
|
|
2084
|
+
.input-wrapper,
|
|
2085
|
+
.mobile-modal {
|
|
2086
|
+
-webkit-tap-highlight-color: transparent !important;
|
|
2087
|
+
}
|
|
1995
2088
|
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
-webkit-tap-highlight-color: transparent !important;
|
|
2001
|
-
}
|
|
2089
|
+
.filter-input::placeholder {
|
|
2090
|
+
${N};
|
|
2091
|
+
color: var(--secondary-color-40);
|
|
2092
|
+
}
|
|
2002
2093
|
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2094
|
+
.icon-button {
|
|
2095
|
+
position: absolute;
|
|
2096
|
+
right: 10px;
|
|
2097
|
+
top: 50%;
|
|
2098
|
+
transform: translateY(-50%);
|
|
2099
|
+
background: transparent;
|
|
2100
|
+
border: none;
|
|
2101
|
+
cursor: pointer;
|
|
2102
|
+
display: flex;
|
|
2103
|
+
align-items: center;
|
|
2104
|
+
justify-content: center;
|
|
2105
|
+
width: 24px;
|
|
2106
|
+
height: 24px;
|
|
2107
|
+
padding: 0;
|
|
2108
|
+
}
|
|
2007
2109
|
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
background: transparent;
|
|
2014
|
-
border: none;
|
|
2015
|
-
cursor: pointer;
|
|
2016
|
-
display: flex;
|
|
2017
|
-
align-items: center;
|
|
2018
|
-
justify-content: center;
|
|
2019
|
-
width: 24px;
|
|
2020
|
-
height: 24px;
|
|
2021
|
-
padding: 0;
|
|
2022
|
-
}
|
|
2110
|
+
randstad-icon {
|
|
2111
|
+
width: 24px;
|
|
2112
|
+
height: 24px;
|
|
2113
|
+
color: var(--primary-color);
|
|
2114
|
+
}
|
|
2023
2115
|
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2116
|
+
.options-list {
|
|
2117
|
+
width: 100%;
|
|
2118
|
+
position: absolute;
|
|
2119
|
+
top: 99%;
|
|
2120
|
+
left: 0;
|
|
2121
|
+
right: 0;
|
|
2122
|
+
max-height: 200px;
|
|
2123
|
+
overflow-y: auto;
|
|
2124
|
+
border: 1px solid var(--primary-color);
|
|
2125
|
+
border-top: none;
|
|
2126
|
+
border-radius: 0 0 4px 4px;
|
|
2127
|
+
background: white;
|
|
2128
|
+
list-style: none;
|
|
2129
|
+
margin: 0;
|
|
2130
|
+
padding: 0;
|
|
2131
|
+
z-index: 10;
|
|
2132
|
+
}
|
|
2029
2133
|
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
border: 1px solid var(--primary-color);
|
|
2039
|
-
border-top: none;
|
|
2040
|
-
border-radius: 0 0 4px 4px;
|
|
2041
|
-
background: white;
|
|
2042
|
-
list-style: none;
|
|
2043
|
-
margin: 0;
|
|
2044
|
-
padding: 0;
|
|
2045
|
-
z-index: 10;
|
|
2046
|
-
}
|
|
2134
|
+
.options-list li {
|
|
2135
|
+
${N};
|
|
2136
|
+
padding: 8px 16px 8px 16px;
|
|
2137
|
+
cursor: pointer;
|
|
2138
|
+
color: var(--secondary-color-80);
|
|
2139
|
+
display: flex;
|
|
2140
|
+
align-items: center;
|
|
2141
|
+
}
|
|
2047
2142
|
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
cursor: pointer;
|
|
2052
|
-
color: var(--secondary-color-80);
|
|
2053
|
-
display: flex;
|
|
2054
|
-
align-items: center;
|
|
2055
|
-
}
|
|
2143
|
+
.options-list li.highlighted {
|
|
2144
|
+
background-color: var(--primary-color-10);
|
|
2145
|
+
}
|
|
2056
2146
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2147
|
+
.mobile-modal {
|
|
2148
|
+
position: fixed;
|
|
2149
|
+
bottom: 0;
|
|
2150
|
+
left: 0;
|
|
2151
|
+
right: 0;
|
|
2152
|
+
background-color: white;
|
|
2153
|
+
z-index: 1000;
|
|
2154
|
+
border-radius: 12px 12px 0 0;
|
|
2155
|
+
box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
|
|
2156
|
+
display: flex;
|
|
2157
|
+
flex-direction: column;
|
|
2158
|
+
padding: 0px;
|
|
2159
|
+
animation: slideUp 0.5s ease-out;
|
|
2160
|
+
max-height: 80dvh;
|
|
2161
|
+
overflow-y: auto;
|
|
2162
|
+
}
|
|
2060
2163
|
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
z-index: 1000;
|
|
2068
|
-
border-radius: 12px 12px 0 0;
|
|
2069
|
-
box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
|
|
2070
|
-
display: flex;
|
|
2071
|
-
flex-direction: column;
|
|
2072
|
-
padding: 0px;
|
|
2073
|
-
gap: 12px;
|
|
2074
|
-
animation: slideUp 0.5s ease-out;
|
|
2075
|
-
max-height: 80vh;
|
|
2076
|
-
overflow-y: auto;
|
|
2077
|
-
}
|
|
2164
|
+
.mobile-modal .options-list {
|
|
2165
|
+
position: static;
|
|
2166
|
+
max-height: none;
|
|
2167
|
+
border: none;
|
|
2168
|
+
box-shadow: none;
|
|
2169
|
+
}
|
|
2078
2170
|
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
border: none;
|
|
2083
|
-
box-shadow: none;
|
|
2084
|
-
}
|
|
2171
|
+
.mobile-modal .modal-input-container {
|
|
2172
|
+
position: relative;
|
|
2173
|
+
}
|
|
2085
2174
|
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2175
|
+
.mobile-modal .modal-close-button {
|
|
2176
|
+
position: absolute;
|
|
2177
|
+
top: 50%;
|
|
2178
|
+
right: 12px;
|
|
2179
|
+
transform: translateY(-50%);
|
|
2180
|
+
background: transparent;
|
|
2181
|
+
border: none;
|
|
2182
|
+
cursor: pointer;
|
|
2183
|
+
padding: 4px;
|
|
2184
|
+
display: flex;
|
|
2185
|
+
align-items: center;
|
|
2186
|
+
justify-content: center;
|
|
2187
|
+
}
|
|
2089
2188
|
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
background: transparent;
|
|
2096
|
-
border: none;
|
|
2097
|
-
cursor: pointer;
|
|
2098
|
-
padding: 4px;
|
|
2099
|
-
display: flex;
|
|
2100
|
-
align-items: center;
|
|
2101
|
-
justify-content: center;
|
|
2102
|
-
}
|
|
2189
|
+
.mobile-modal .modal-close-button randstad-icon {
|
|
2190
|
+
width: 20px;
|
|
2191
|
+
height: 20px;
|
|
2192
|
+
color: var(--secondary-color-60);
|
|
2193
|
+
}
|
|
2103
2194
|
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
position: fixed;
|
|
2112
|
-
inset: 0;
|
|
2113
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
2114
|
-
z-index: 999;
|
|
2115
|
-
display: flex;
|
|
2116
|
-
align-items: flex-end;
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
.filter-fake {
|
|
2120
|
-
${N};
|
|
2121
|
-
padding: 15px;
|
|
2122
|
-
padding-right: 40px;
|
|
2123
|
-
width: 100%;
|
|
2124
|
-
background: white;
|
|
2125
|
-
box-sizing: border-box;
|
|
2126
|
-
cursor: pointer;
|
|
2127
|
-
color: var(--secondary-color-80);
|
|
2128
|
-
white-space: nowrap;
|
|
2129
|
-
overflow: hidden;
|
|
2130
|
-
text-overflow: ellipsis;
|
|
2131
|
-
display: flex;
|
|
2132
|
-
align-items: center;
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
@keyframes slideUp {
|
|
2136
|
-
from {
|
|
2137
|
-
transform: translateY(100%);
|
|
2138
|
-
}
|
|
2139
|
-
to {
|
|
2140
|
-
transform: translateY(0);
|
|
2195
|
+
.mobile-backdrop {
|
|
2196
|
+
position: fixed;
|
|
2197
|
+
inset: 0;
|
|
2198
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
2199
|
+
z-index: 999;
|
|
2200
|
+
display: flex;
|
|
2201
|
+
align-items: flex-end;
|
|
2141
2202
|
}
|
|
2142
|
-
}
|
|
2143
2203
|
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
/* Estilos por defecto del icon para mobile */
|
|
2162
|
-
.icon-selected {
|
|
2163
|
-
width: 24px;
|
|
2164
|
-
height: auto;
|
|
2165
|
-
margin-left: 4px;
|
|
2166
|
-
padding-right: 12px;
|
|
2167
|
-
border-right: 1px solid var(--secondary-color-20);
|
|
2168
|
-
display: flex;
|
|
2169
|
-
align-items: center;
|
|
2170
|
-
justify-content: center;
|
|
2171
|
-
flex-shrink: 0;
|
|
2172
|
-
}
|
|
2204
|
+
.filter-fake {
|
|
2205
|
+
${N};
|
|
2206
|
+
padding: 15px;
|
|
2207
|
+
padding-right: 40px;
|
|
2208
|
+
width: 100%;
|
|
2209
|
+
background: white;
|
|
2210
|
+
box-sizing: border-box;
|
|
2211
|
+
cursor: pointer;
|
|
2212
|
+
color: var(--secondary-color-80);
|
|
2213
|
+
white-space: nowrap;
|
|
2214
|
+
overflow: hidden;
|
|
2215
|
+
text-overflow: ellipsis;
|
|
2216
|
+
display: flex;
|
|
2217
|
+
align-items: center;
|
|
2218
|
+
}
|
|
2173
2219
|
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2220
|
+
@keyframes slideUp {
|
|
2221
|
+
from {
|
|
2222
|
+
transform: translateY(100%);
|
|
2223
|
+
}
|
|
2224
|
+
to {
|
|
2225
|
+
transform: translateY(0);
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2177
2228
|
|
|
2178
|
-
|
|
2179
|
-
* Media query para aplicar estilos de escritorio (a partir de 941px)
|
|
2180
|
-
*/
|
|
2181
|
-
@media (min-width: 941px) {
|
|
2229
|
+
/* Estilos por defecto del icon para mobile */
|
|
2182
2230
|
.icon-selected {
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2231
|
+
width: 24px;
|
|
2232
|
+
height: auto;
|
|
2233
|
+
margin-left: 4px;
|
|
2234
|
+
padding-right: 12px;
|
|
2235
|
+
border-right: 1px solid var(--secondary-color-20);
|
|
2236
|
+
display: flex;
|
|
2237
|
+
align-items: center;
|
|
2238
|
+
justify-content: center;
|
|
2239
|
+
flex-shrink: 0;
|
|
2186
2240
|
}
|
|
2187
|
-
|
|
2241
|
+
|
|
2188
2242
|
.value-text {
|
|
2189
|
-
|
|
2190
|
-
margin-left: 0;
|
|
2243
|
+
margin-left: 8px; /* Aumentamos el margen para separar el texto en mobile */
|
|
2191
2244
|
}
|
|
2192
|
-
}
|
|
2193
2245
|
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
width:
|
|
2198
|
-
|
|
2199
|
-
|
|
2246
|
+
/*
|
|
2247
|
+
* Media query para aplicar estilos de escritorio (a partir de 941px)
|
|
2248
|
+
*/
|
|
2249
|
+
@media (min-width: 941px) {
|
|
2250
|
+
.icon-selected {
|
|
2251
|
+
/* Estilos de escritorio para el icono, se anulan los de mobile */
|
|
2252
|
+
margin-left: 16px;
|
|
2253
|
+
padding-right: 18px;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
.value-text {
|
|
2257
|
+
/* En escritorio no necesitamos este margen, lo reseteamos */
|
|
2258
|
+
margin-left: 0;
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2200
2261
|
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2262
|
+
.icon-selected svg,
|
|
2263
|
+
.icon-list svg {
|
|
2264
|
+
display: block;
|
|
2265
|
+
width: 100%;
|
|
2266
|
+
height: auto;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
.icon-list {
|
|
2270
|
+
width: 24px;
|
|
2271
|
+
height: auto;
|
|
2272
|
+
margin-right: 8px;
|
|
2273
|
+
flex-shrink: 0;
|
|
2274
|
+
}
|
|
2275
|
+
`]}update(t){if(t.has("options")&&(this.filteredOptions=[...this.options]),t.has("defaultValue")||t.has("options")||t.has("value")){if(this._isCleared)return void super.update(t);const e=this.value||this.defaultValue,i=this.options.find((t=>"string"==typeof t?t===e:t.value===e));i?(this.filterValue="string"==typeof i?i:i.label,this.value="string"==typeof i?i:i.value):(this.filterValue="",this.value="")}super.update(t)}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.isMobile&&(this.mobileFilterValue=""),this.disabled||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){if(!this.filterable)return;this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.filterValue=i,this.value="",this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(this.filterValue.toLowerCase()))),this.isOpen=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.mobileFilterValue=i,this.value="",this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(i))),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0}))}),300)}handleSelect(t){this._isCleared=!1;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.value=e,this.isOpen=!1,this.requestUpdate()}handleIconClick(){this.disabled||(this.filterable&&this.filterValue?(this._isCleared=!0,this.filterValue="",this.value="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1):this.isOpen=!this.isOpen,this.requestUpdate())}handleClickOutside(t){const e=t.target;e instanceof Node&&(this.contains(e)||(this.isOpen=!1,this.requestUpdate()))}handleKeyDown(t){const{key:e}=t;if(!this.isOpen&&("Enter"===e||" "===e))return t.preventDefault(),void(this.isOpen=!0);if(this.isOpen)if("ArrowDown"===e)t.preventDefault(),this.highlightedIndex=Math.min(this.highlightedIndex+1,this.filteredOptions.length-1),this.requestUpdate();else if("ArrowUp"===e)t.preventDefault(),this.highlightedIndex=Math.max(this.highlightedIndex-1,0),this.requestUpdate();else if("Enter"===e){t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];e&&this.handleSelect(e)}else"Escape"===e&&(t.preventDefault(),this.isOpen=!1)}renderSelectedIcon(){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));return t&&"string"!=typeof t&&t.icon&&"string"==typeof t.icon?e`<span class="icon-selected" .innerHTML="${t.icon}"></span>`:i}renderOptionIcon(t){return t&&"string"==typeof t?e`<span class="icon-list" .innerHTML="${t}"></span>`:i}render(){const t=this.isMobile,r=e`
|
|
2276
|
+
<randstad-icon
|
|
2277
|
+
name="${this.isOpen&&this.filteredOptions.length>0?"arrow_up":"arrow_down"}"
|
|
2278
|
+
size="24px"
|
|
2279
|
+
.color=${"var( --primary-color )"}
|
|
2280
|
+
>
|
|
2281
|
+
</randstad-icon>
|
|
2282
|
+
`;return e`
|
|
2208
2283
|
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
2209
2284
|
${this.renderLabelContainer()}
|
|
2210
2285
|
|
|
@@ -2247,21 +2322,21 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2247
2322
|
@click="${this.handleIconClick}"
|
|
2248
2323
|
?disabled="${this.disabled}"
|
|
2249
2324
|
>
|
|
2250
|
-
${this.filterable&&this.filterValue?e`<randstad-icon name="close" size="24px"></randstad-icon>`:
|
|
2325
|
+
${this.filterable&&this.filterValue?e`<randstad-icon name="close" size="24px"></randstad-icon>`:r}
|
|
2251
2326
|
</button>
|
|
2252
2327
|
</div>
|
|
2253
2328
|
|
|
2254
2329
|
${!t&&this.isOpen&&this.filteredOptions.length>0?e`
|
|
2255
2330
|
<ul class="options-list">
|
|
2256
|
-
${this.filteredOptions.map(((t,i)=>{const
|
|
2331
|
+
${this.filteredOptions.map(((t,i)=>{const r="string"==typeof t?t:t.label,o="object"==typeof t&&t.disabled,s="object"==typeof t?t.icon:void 0;return e`
|
|
2257
2332
|
<li
|
|
2258
|
-
class="${
|
|
2333
|
+
class="${o?"disabled":""} ${i===this.highlightedIndex?"highlighted":""}"
|
|
2259
2334
|
role="option"
|
|
2260
2335
|
aria-selected="${i===this.highlightedIndex}"
|
|
2261
|
-
@click="${()=>{
|
|
2336
|
+
@click="${()=>{o||this.handleSelect(t)}}"
|
|
2262
2337
|
>
|
|
2263
|
-
${this.renderOptionIcon(
|
|
2264
|
-
${
|
|
2338
|
+
${this.renderOptionIcon(s)}
|
|
2339
|
+
${r}
|
|
2265
2340
|
</li>
|
|
2266
2341
|
`}))}
|
|
2267
2342
|
</ul>
|
|
@@ -2291,27 +2366,27 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2291
2366
|
</div>
|
|
2292
2367
|
|
|
2293
2368
|
<ul class="options-list">
|
|
2294
|
-
${this.filteredOptions.map(((t,i)=>{const
|
|
2369
|
+
${this.filteredOptions.map(((t,i)=>{const r="string"==typeof t?t:t.label,o="object"==typeof t&&t.disabled,s="object"==typeof t?t.icon:void 0;return e`
|
|
2295
2370
|
<li
|
|
2296
|
-
class="${
|
|
2371
|
+
class="${o?"disabled":""} ${i===this.highlightedIndex?"highlighted":""}"
|
|
2297
2372
|
role="option"
|
|
2298
2373
|
aria-selected="${i===this.highlightedIndex}"
|
|
2299
|
-
@click="${()=>{
|
|
2374
|
+
@click="${()=>{o||this.handleSelect(t)}}"
|
|
2300
2375
|
>
|
|
2301
|
-
${this.renderOptionIcon(
|
|
2302
|
-
${
|
|
2376
|
+
${this.renderOptionIcon(s)}
|
|
2377
|
+
${r}
|
|
2303
2378
|
</li>
|
|
2304
2379
|
`}))}
|
|
2305
2380
|
</ul>
|
|
2306
2381
|
</div>
|
|
2307
2382
|
</div>
|
|
2308
2383
|
`:i}
|
|
2309
|
-
`}};
|
|
2384
|
+
`}};n([_({type:Object}),a("design:type",Object)],je.prototype,"value",void 0),n([_({type:String,attribute:"default-value"}),a("design:type",Object)],je.prototype,"defaultValue",void 0),n([_({type:Array}),a("design:type",Array)],je.prototype,"options",void 0),n([_({type:Boolean}),a("design:type",Object)],je.prototype,"filterable",void 0),n([_({type:Number}),a("design:type",Number)],je.prototype,"maxLength",void 0),n([T(),a("design:type",Boolean)],je.prototype,"isMobile",void 0),n([T(),a("design:type",Object)],je.prototype,"highlightedIndex",void 0),n([T(),a("design:type",Boolean)],je.prototype,"_isCleared",void 0),n([T(),a("design:type",Array)],je.prototype,"filteredOptions",void 0),n([T(),a("design:type",Object)],je.prototype,"filterValue",void 0),n([T(),a("design:type",Object)],je.prototype,"isOpen",void 0),n([T(),a("design:type",Object)],je.prototype,"mobileFilterValue",void 0),je=n([l("filterable-select")],je);const Pe=new CSSStyleSheet;Pe.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\n .body-l {\n font-family: Graphik;\n font-size: 18px;\n font-style: normal;\n font-weight: 400;\n line-height: 30px;\n }\n");class Le extends t{static{this.styles=[Pe,r`
|
|
2310
2385
|
:host {
|
|
2311
2386
|
display: flex;
|
|
2312
2387
|
position: fixed;
|
|
2313
2388
|
align-items: center;
|
|
2314
|
-
max-width:
|
|
2389
|
+
max-width: 100dvw;
|
|
2315
2390
|
height: auto;
|
|
2316
2391
|
z-index: 9999;
|
|
2317
2392
|
}
|
|
@@ -2372,11 +2447,11 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2372
2447
|
}
|
|
2373
2448
|
|
|
2374
2449
|
:host(.mobile) .container {
|
|
2375
|
-
width:
|
|
2450
|
+
width: 90dvw !important;
|
|
2376
2451
|
}
|
|
2377
2452
|
|
|
2378
2453
|
.container {
|
|
2379
|
-
${
|
|
2454
|
+
${z};
|
|
2380
2455
|
display: flex;
|
|
2381
2456
|
align-items: center;
|
|
2382
2457
|
box-sizing: border-box;
|
|
@@ -2442,7 +2517,7 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2442
2517
|
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
2443
2518
|
<span class="message">${this.message}</span>
|
|
2444
2519
|
</div>
|
|
2445
|
-
`}}customElements.define("randstad-snackbar",
|
|
2520
|
+
`}}customElements.define("randstad-snackbar",Le);let ze=class extends t{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=r`
|
|
2446
2521
|
.stepper {
|
|
2447
2522
|
display: flex;
|
|
2448
2523
|
gap: 20px;
|
|
@@ -2542,7 +2617,7 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2542
2617
|
</div>
|
|
2543
2618
|
`))}
|
|
2544
2619
|
</div>
|
|
2545
|
-
`}};
|
|
2620
|
+
`}};n([_({type:Number}),a("design:type",Object)],ze.prototype,"totalSteps",void 0),n([_({type:Number}),a("design:type",Object)],ze.prototype,"currentStep",void 0),ze=n([l("custom-stepper")],ze);let Ie=class extends t{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:r}=t;this.showPrev=e>0,this.showNext=e+r<i-1}}static{this.styles=r`
|
|
2546
2621
|
:host {
|
|
2547
2622
|
display: block;
|
|
2548
2623
|
border-bottom: 1px solid #E7E8EC;
|
|
@@ -2555,7 +2630,7 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2555
2630
|
}
|
|
2556
2631
|
|
|
2557
2632
|
.tab {
|
|
2558
|
-
${
|
|
2633
|
+
${B};
|
|
2559
2634
|
display: flex;
|
|
2560
2635
|
gap: 8px;
|
|
2561
2636
|
flex-direction: row;
|
|
@@ -2653,11 +2728,11 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2653
2728
|
|
|
2654
2729
|
@media (max-width: 940px) {
|
|
2655
2730
|
.tab {
|
|
2656
|
-
${
|
|
2731
|
+
${I};
|
|
2657
2732
|
padding: 16px;
|
|
2658
2733
|
}
|
|
2659
2734
|
}
|
|
2660
|
-
`}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
|
|
2735
|
+
`}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 r=i.length-1;r>=0;r--){const o=i[r].offsetLeft;if(o<e+this.SCROLL_OFFSET-1){const e=o-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 r of i)if(r.offsetLeft>e+this.SCROLL_OFFSET){const e=r.offsetLeft-this.SCROLL_OFFSET;t.scrollTo({left:e,behavior:"smooth"});break}setTimeout((()=>this.handleScroll()),300)}render(){return e`
|
|
2661
2736
|
<div class="scroll-container">
|
|
2662
2737
|
${this.showPrev?e`
|
|
2663
2738
|
<button class="scroll-button prev" @click=${this.scrollTabsLeft}>
|
|
@@ -2681,7 +2756,17 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2681
2756
|
</button>
|
|
2682
2757
|
`:null}
|
|
2683
2758
|
</div>
|
|
2684
|
-
`}};
|
|
2759
|
+
`}};n([_({type:Array}),a("design:type",Array)],Ie.prototype,"tabs",void 0),n([_({type:String}),a("design:type",String)],Ie.prototype,"selected",void 0),n([T(),a("design:type",String)],Ie.prototype,"internalSelected",void 0),n([T(),a("design:type",Object)],Ie.prototype,"showPrev",void 0),n([T(),a("design:type",Object)],Ie.prototype,"showNext",void 0),Ie=n([l("tabs-bar")],Ie);let Ne=class extends P{constructor(){super(...arguments),this.files=[],this.simulatedDelay=0,this.loading=!1,this.progress=0,this.errorTextMessage=null}baseGetTextMaxFileSize(t){return t/1048576}getReadableFileTypes(t,e){const i=t.map((t=>e[t]||t));if(i.length<=1)return i.join("");const r=i.pop();return`${i.join(", ")} y ${r}`}validateFiles(t,e,i,r,o,s){for(const n of t){if(i.length>0&&!i.includes(n.type))return this.setError(s,r),!1;if(n.size>e)return this.setError(s,o),!1}return!0}async baseHandleFiles(t,e){const{baseMaxFiles:i,maxFileSize:r,acceptedFileTypes:o,errorMessageType:s,errorMessageSize:n,typeError:a}=e;if(this.setError(a,null),!t||this.disabled||this.loading)return;const l=Array.isArray(this.files)?this.files:[],d=Number.isFinite(i)&&i>0?i:1,c=d-l.length;if(c<=0){const t=`se ha alcanzado el número máximo de archivos (${d}).`;return void this.setError(a,t)}const h=Array.from(t).slice(0,c);if(0===h.length)return;if(!this.validateFiles(h,r,o,s,n,a))return;const p=this.simulatedDelay??0;if(p<=0)return this.files=[...l,...h],void this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files}));this.loading=!0,this.progress=0,await this.updateComplete;const u=Date.now(),b=setInterval((()=>{const t=Date.now()-u,e=Math.min(Math.round(t/p*100),100);this.progress=e,this.progress>=100&&(clearInterval(b),this.files=[...l,...h],this.loading=!1,this.progress=0,this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})))}),10);this.fileInput&&(this.fileInput.value="")}baseOnFileInputChange(t,e){const i=t.target;this.baseHandleFiles(i.files,e),this.fileInput&&(this.fileInput.value="")}removeFile(t,e){this.files=this.files.filter(((e,i)=>i!==t)),this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})),0===this.files.length&&this.setError(e,null)}setError(t="file",e){"file"===t&&(this.error=!!e,this.errorMessage=e),"image"===t&&(this.errorTextMessage=e)}renderLoadingContainer(t){return e`
|
|
2760
|
+
${this.loading?e`
|
|
2761
|
+
<div class="progress-bar-container">
|
|
2762
|
+
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
2763
|
+
<div class="progress-bar-fill" style="width: ${this.progress}%;"></div>
|
|
2764
|
+
</div>
|
|
2765
|
+
</div>
|
|
2766
|
+
`:e`
|
|
2767
|
+
${t}
|
|
2768
|
+
`}
|
|
2769
|
+
`}};n([_({type:Array}),a("design:type",Array)],Ne.prototype,"files",void 0),n([_({type:Number}),a("design:type",Object)],Ne.prototype,"simulatedDelay",void 0),n([T(),a("design:type",Object)],Ne.prototype,"loading",void 0),n([T(),a("design:type",Object)],Ne.prototype,"progress",void 0),n([T(),a("design:type",Object)],Ne.prototype,"errorTextMessage",void 0),n([j('input[ type="file" ]'),a("design:type",HTMLInputElement)],Ne.prototype,"fileInput",void 0),Ne=n([l("base-upload")],Ne);const Be=r`
|
|
2685
2770
|
.progress-bar-container {
|
|
2686
2771
|
min-height: 23px;
|
|
2687
2772
|
display: flex;
|
|
@@ -2691,39 +2776,45 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2691
2776
|
.progress-bar {
|
|
2692
2777
|
min-width: 80px;
|
|
2693
2778
|
height: 8px;
|
|
2694
|
-
background-color: var(--secondary-color-20);
|
|
2779
|
+
background-color: var( --secondary-color-20 );
|
|
2695
2780
|
border-radius: 999px;
|
|
2696
2781
|
overflow: hidden;
|
|
2697
2782
|
}
|
|
2698
2783
|
|
|
2699
2784
|
.progress-bar-fill {
|
|
2700
2785
|
height: 100%;
|
|
2701
|
-
background-color: var(--primary-color);
|
|
2786
|
+
background-color: var( --primary-color );
|
|
2702
2787
|
transition: width 0.1s ease;
|
|
2703
2788
|
}
|
|
2704
|
-
|
|
2705
|
-
${
|
|
2789
|
+
`,Re={"image/jpg":".jpg","image/jpeg":".jpeg","image/png":".png"},Ve={"application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx",...Re,"text/plain":".txt"};let Ue=class extends Ne{constructor(){super(...arguments),this.acceptedFileTypes=["image/jpeg","image/png","image/jpg"],this.maxFiles=3,this.maxFileSize=2097152,this.isDragging=!1,this.imageUrls=[],this.isMaxFilesReached=!1}static{this.styles=r`
|
|
2790
|
+
${Be}
|
|
2706
2791
|
|
|
2707
2792
|
:host {
|
|
2708
2793
|
font-family: 'Graphik', sans-serif;
|
|
2709
2794
|
}
|
|
2710
2795
|
|
|
2796
|
+
.upload-component-wrapper {
|
|
2797
|
+
display: flex;
|
|
2798
|
+
flex-direction: column;
|
|
2799
|
+
gap: 8px;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2711
2802
|
.container {
|
|
2712
2803
|
display: flex;
|
|
2713
2804
|
gap: 16px;
|
|
2714
2805
|
flex-direction: column;
|
|
2715
|
-
border: 1px solid var(--secondary-color-10);
|
|
2806
|
+
border: 1px solid var( --secondary-color-10 );
|
|
2716
2807
|
border-radius: 4px;
|
|
2717
2808
|
padding: 16px;
|
|
2718
2809
|
align-items: center;
|
|
2719
|
-
background-color: var(--white);
|
|
2810
|
+
background-color: var( --white );
|
|
2720
2811
|
transition: border 0.2s ease, outline 0.2s ease;
|
|
2721
2812
|
}
|
|
2722
2813
|
|
|
2723
2814
|
.container.dragging {
|
|
2724
|
-
border: 1px dashed var(--secondary-color-40);
|
|
2815
|
+
border: 1px dashed var( --secondary-color-40 );
|
|
2725
2816
|
}
|
|
2726
|
-
|
|
2817
|
+
|
|
2727
2818
|
.icon {
|
|
2728
2819
|
width: 40px;
|
|
2729
2820
|
height: 40px
|
|
@@ -2737,29 +2828,29 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2737
2828
|
}
|
|
2738
2829
|
|
|
2739
2830
|
.text-main {
|
|
2740
|
-
${
|
|
2831
|
+
${z};
|
|
2741
2832
|
text-align: center;
|
|
2742
2833
|
vertical-align: middle;
|
|
2743
|
-
color: var(--secondary-color-80);
|
|
2834
|
+
color: var( --secondary-color-80 );
|
|
2744
2835
|
}
|
|
2745
2836
|
|
|
2746
2837
|
.text-secondary {
|
|
2747
|
-
${
|
|
2838
|
+
${L};
|
|
2748
2839
|
text-align: center;
|
|
2749
2840
|
vertical-align: middle;
|
|
2750
|
-
color: var(--secondary-color-60);
|
|
2841
|
+
color: var( --secondary-color-60 );
|
|
2751
2842
|
}
|
|
2752
2843
|
|
|
2753
2844
|
.text-tertiary {
|
|
2754
|
-
${
|
|
2845
|
+
${L};
|
|
2755
2846
|
text-align: center;
|
|
2756
2847
|
vertical-align: middle;
|
|
2757
|
-
color: var(--secondary-color-40);
|
|
2848
|
+
color: var( --secondary-color-40 );
|
|
2758
2849
|
}
|
|
2759
2850
|
|
|
2760
2851
|
.button {
|
|
2761
|
-
${
|
|
2762
|
-
background-color: var(--primary-color);
|
|
2852
|
+
${L};
|
|
2853
|
+
background-color: var( --primary-color );
|
|
2763
2854
|
border: none;
|
|
2764
2855
|
padding: 4px 16px;
|
|
2765
2856
|
cursor: pointer;
|
|
@@ -2769,521 +2860,590 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2769
2860
|
vertical-align: middle;
|
|
2770
2861
|
}
|
|
2771
2862
|
|
|
2772
|
-
:host([disabled]) .button {
|
|
2773
|
-
background-color: var(--secondary-color-20);
|
|
2774
|
-
color: var(--secondary-color-80);
|
|
2863
|
+
:host([disabled]) .button, .container[disabled] .button {
|
|
2864
|
+
background-color: var( --secondary-color-20 );
|
|
2865
|
+
color: var( --secondary-color-80 );
|
|
2775
2866
|
cursor: default;
|
|
2776
2867
|
}
|
|
2777
2868
|
|
|
2778
2869
|
input[type="file"] {
|
|
2779
2870
|
display: none;
|
|
2780
2871
|
}
|
|
2781
|
-
`}async handleFiles(t){if(this.loading||this.disabled)return;const e=Array.isArray(this.files)?this.files:[],i=Array.from(t||[]).slice(0,3-e.length),o=this.simulatedDelay??0;if(o<=0)return this.files=[...e,...i],void this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files}));this.loading=!0,this.progress=0,await this.updateComplete;const r=Date.now(),n=setInterval((()=>{const t=Date.now()-r,a=Math.min(Math.round(t/o*100),100);this.progress=a,this.progress>=100&&(clearInterval(n),this.files=[...e,...i],this.loading=!1,this.progress=0,this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})))}),10)}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 e`
|
|
2782
|
-
<div class="container ${this.isDragging?"dragging":""}"
|
|
2783
|
-
@drop="${this.onDrop}"
|
|
2784
|
-
@dragover="${this.onDragOver}"
|
|
2785
|
-
@dragleave="${this.onDragLeave}"
|
|
2786
|
-
>
|
|
2787
|
-
<img class="icon"
|
|
2788
|
-
src=${this.disabled?"/assets/img/image-upload-disabled.svg":"/assets/img/image-upload-circle.svg"}
|
|
2789
|
-
alt="Subir imagen"
|
|
2790
|
-
/>
|
|
2791
|
-
|
|
2792
|
-
<div class="text-container">
|
|
2793
|
-
<div class="text-main">subí hasta 3 imágenes</div>
|
|
2794
|
-
|
|
2795
|
-
<div class="text-secondary">
|
|
2796
|
-
Podés agregar un archivo o arrastrar y soltar acá
|
|
2797
|
-
</div>
|
|
2798
|
-
|
|
2799
|
-
<div class="text-tertiary">.jpg, .jpeg, .png</div>
|
|
2800
|
-
</div>
|
|
2801
|
-
|
|
2802
|
-
${this.loading?e`
|
|
2803
|
-
<div class="progress-bar-container">
|
|
2804
|
-
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
2805
|
-
<div class="progress-bar-fill" style="width: ${this.progress}%;"></div>
|
|
2806
|
-
</div>
|
|
2807
|
-
</div>
|
|
2808
|
-
`:e`
|
|
2809
|
-
<label class="button">
|
|
2810
|
-
agregar archivo
|
|
2811
|
-
<input type="file" accept=".jpg,.jpeg,.png" multiple @change="${this.onFileInputChange}" />
|
|
2812
|
-
</label>
|
|
2813
|
-
`}
|
|
2814
|
-
</div>
|
|
2815
|
-
`}};a([A({type:Array}),s("design:type",Array)],te.prototype,"files",void 0),a([A({type:Boolean,reflect:!0}),s("design:type",Object)],te.prototype,"disabled",void 0),a([A({type:Number}),s("design:type",Object)],te.prototype,"simulatedDelay",void 0),a([T(),s("design:type",Object)],te.prototype,"loading",void 0),a([T(),s("design:type",Object)],te.prototype,"progress",void 0),a([T(),s("design:type",Object)],te.prototype,"isDragging",void 0),te=a([d("upload-image")],te);const ee=6048e5,ie=Symbol.for("constructDateFrom");function oe(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&ie in t?t[ie](e):t instanceof Date?new t.constructor(e):new Date(e)}function re(t,e){return oe(e||t,t)}function ne(t,e,i){const o=re(t,i?.in);if(isNaN(e))return oe(t,NaN);if(!e)return o;const r=o.getDate(),n=oe(t,o.getTime());n.setMonth(o.getMonth()+e+1,0);return r>=n.getDate()?n:(o.setFullYear(n.getFullYear(),n.getMonth(),r),o)}let ae={};function se(){return ae}function de(t,e){const i=se(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=re(t,e?.in),n=r.getDay(),a=(n<o?7:0)+n-o;return r.setDate(r.getDate()-a),r.setHours(0,0,0,0),r}function le(t,e){return de(t,{...e,weekStartsOn:1})}function ce(t,e){const i=re(t,e?.in),o=i.getFullYear(),r=oe(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const n=le(r),a=oe(i,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);const s=le(a);return i.getTime()>=n.getTime()?o+1:i.getTime()>=s.getTime()?o:o-1}function pe(t){const e=re(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function he(t,...e){const i=oe.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function ue(t,e){const i=re(t,e?.in);return i.setHours(0,0,0,0),i}function be(t,e,i){return ne(t,12*e,i)}function me(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+re(t)));var e}function ge(t,e){const i=re(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const ye={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function fe(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const ve={date:fe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:fe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:fe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},xe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function we(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=i?.width?String(i.width):e;o=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=i?.width?String(i.width):t.defaultWidth;o=t.values[r]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function ke(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],n=e.match(r);if(!n)return null;const a=n[0],s=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(s,(t=>t.test(a))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(s,(t=>t.test(a)));let l;l=t.valueCallback?t.valueCallback(d):d,l=i.valueCallback?i.valueCallback(l):l;return{value:l,rest:e.slice(a.length)}}}var $e;const Se={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=ye[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:ve,formatRelative:(t,e,i,o)=>xe[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:we({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:we({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:we({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:we({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:we({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:($e={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match($e.matchPattern);if(!i)return null;const o=i[0],r=t.match($e.parsePattern);if(!r)return null;let n=$e.valueCallback?$e.valueCallback(r[0]):r[0];return n=e.valueCallback?e.valueCallback(n):n,{value:n,rest:t.slice(o.length)}}),era:ke({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ke({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:ke({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ke({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ke({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ce(t,e){const i=re(t,e?.in),o=function(t,e){const[i,o]=he(0,t,e),r=ue(i),n=ue(o),a=+r-pe(r),s=+n-pe(n);return Math.round((a-s)/864e5)}(i,function(t,e){const i=re(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function Ee(t,e){const i=re(t,e?.in),o=+le(i)-+function(t,e){const i=ce(t,e),o=oe(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),le(o)}(i);return Math.round(o/ee)+1}function De(t,e){const i=re(t,e?.in),o=i.getFullYear(),r=se(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=oe(e?.in||t,0);a.setFullYear(o+1,0,n),a.setHours(0,0,0,0);const s=de(a,e),d=oe(e?.in||t,0);d.setFullYear(o,0,n),d.setHours(0,0,0,0);const l=de(d,e);return+i>=+s?o+1:+i>=+l?o:o-1}function Oe(t,e){const i=re(t,e?.in),o=+de(i,e)-+function(t,e){const i=se(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=De(t,e),n=oe(e?.in||t,0);return n.setFullYear(r,0,o),n.setHours(0,0,0,0),de(n,e)}(i,e);return Math.round(o/ee)+1}function Me(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Fe={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Me("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Me(i+1,2)},d:(t,e)=>Me(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>Me(t.getHours()%12||12,e.length),H:(t,e)=>Me(t.getHours(),e.length),m:(t,e)=>Me(t.getMinutes(),e.length),s:(t,e)=>Me(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Me(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Pe="midnight",je="noon",Ae="morning",Te="afternoon",ze="evening",Le="night",Ie={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return Fe.y(t,e)},Y:function(t,e,i,o){const r=De(t,o),n=r>0?r:1-r;if("YY"===e){return Me(n%100,2)}return"Yo"===e?i.ordinalNumber(n,{unit:"year"}):Me(n,e.length)},R:function(t,e){return Me(ce(t),e.length)},u:function(t,e){return Me(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Me(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Me(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return Fe.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return Me(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const r=Oe(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Me(r,e.length)},I:function(t,e,i){const o=Ee(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Me(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Fe.d(t,e)},D:function(t,e,i){const o=Ce(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Me(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const r=t.getDay(),n=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(n);case"ee":return Me(n,2);case"eo":return i.ordinalNumber(n,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const r=t.getDay(),n=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(n);case"cc":return Me(n,e.length);case"co":return i.ordinalNumber(n,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Me(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let r;switch(r=12===o?je:0===o?Pe:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let r;switch(r=o>=17?ze:o>=12?Te:o>=4?Ae:Le,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return Fe.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Fe.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Me(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Me(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Fe.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Fe.s(t,e)},S:function(t,e){return Fe.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return Be(o);case"XXXX":case"XX":return Ne(o);default:return Ne(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return Be(o);case"xxxx":case"xx":return Ne(o);default:return Ne(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+_e(o,":");default:return"GMT"+Ne(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+_e(o,":");default:return"GMT"+Ne(o,":")}},t:function(t,e,i){return Me(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Me(+t,e.length)}};function _e(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),n=o%60;return 0===n?i+String(r):i+String(r)+e+Me(n,2)}function Be(t,e){if(t%60==0){return(t>0?"-":"+")+Me(Math.abs(t)/60,2)}return Ne(t,e)}function Ne(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Me(Math.trunc(o/60),2)+e+Me(o%60,2)}const Re=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ve=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},qe={p:Ve,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return Re(t,e);let n;switch(o){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",Re(o,e)).replace("{{time}}",Ve(r,e))}},We=/^D+$/,Ye=/^Y+$/,Ue=["D","DD","YY","YYYY"];const He=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ke=/^'([^]*?)'?$/,Xe=/''/g,Qe=/[a-zA-Z]/;function Je(t,e,i){const o=se(),r=o.locale??Se,n=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=re(t,i?.in);if(!me(s))throw new RangeError("Invalid time value");let d=e.match(Ge).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,qe[e])(t,r.formatLong)}return t})).join("").match(He).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Ze(t)};if(Ie[e])return{isToken:!0,value:t};if(e.match(Qe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(d=r.localize.preprocessor(s,d));const l={firstWeekContainsDate:n,weekStartsOn:a,locale:r};return d.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return Ye.test(t)}(o)||function(t){return We.test(t)}(o))&&function(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),Ue.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,Ie[o[0]])(s,o,r.localize,l)})).join("")}function Ze(t){const e=t.match(Ke);return e?e[1].replace(Xe,"'"):t}function ti(t,e){return re(t,e?.in).getDate()}function ei(t,e){const i=re(t,e?.in),o=i.getFullYear(),r=i.getMonth(),n=oe(i,0);return n.setFullYear(o,r+1,0),n.setHours(0,0,0,0),n.getDate()}function ii(t,e){return+re(t)>+re(e)}function oi(t,e){return+re(t)<+re(e)}function ri(t,e,i){const[o,r]=he(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function ni(t,e,i){const[o,r]=he(0,t,e);return o.getFullYear()===r.getFullYear()}function ai(t,e){return function(t,e){const[i,o]=he(0,t,e);return+ue(i)===+ue(o)}(oe(t,t),function(t){return oe(t,Date.now())}(t))}let si=class extends t{constructor(){super(...arguments),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static{this.styles=o`
|
|
2816
|
-
/* Estilos generales del contenedor del calendario (escritorio) */
|
|
2817
|
-
.calendar-container {
|
|
2818
|
-
position: absolute;
|
|
2819
|
-
top: 100%;
|
|
2820
|
-
left: 0;
|
|
2821
|
-
z-index: 10;
|
|
2822
|
-
border: var(--border-weight-default, 1px) solid var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
2823
|
-
background: var(--secondary-white, #fff);
|
|
2824
|
-
border-radius: 4px;
|
|
2825
|
-
margin-top: 8px;
|
|
2826
|
-
padding: 16px;
|
|
2827
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
2828
|
-
font-family: Graphik;
|
|
2829
|
-
display: flex;
|
|
2830
|
-
flex-direction: column;
|
|
2831
|
-
box-sizing: border-box;
|
|
2832
|
-
min-width: 360px;
|
|
2833
|
-
}
|
|
2834
2872
|
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
/* El separador no tiene margin-top para no dejar espacio con el header */
|
|
2841
|
-
.weekdays-separator {
|
|
2873
|
+
.image-gallery {
|
|
2874
|
+
display: flex;
|
|
2875
|
+
flex-wrap: wrap;
|
|
2876
|
+
gap: 16px;
|
|
2842
2877
|
width: 100%;
|
|
2843
|
-
height: 1px;
|
|
2844
|
-
background-color: var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
2845
|
-
margin-top: 0;
|
|
2846
|
-
margin-bottom: 16px;
|
|
2847
2878
|
}
|
|
2848
2879
|
|
|
2849
|
-
|
|
2850
|
-
|
|
2880
|
+
.image-item {
|
|
2881
|
+
position: relative;
|
|
2882
|
+
width: 100px;
|
|
2883
|
+
height: 99px;
|
|
2884
|
+
border: 1px solid transparent;
|
|
2885
|
+
border-radius: 4px;
|
|
2886
|
+
overflow: hidden;
|
|
2851
2887
|
display: flex;
|
|
2852
|
-
justify-content:
|
|
2888
|
+
justify-content: center;
|
|
2853
2889
|
align-items: center;
|
|
2854
2890
|
}
|
|
2855
2891
|
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
padding: 8px;
|
|
2862
|
-
color: var(--primary-randstad-blue-70, #2175d9);
|
|
2863
|
-
border-radius: 50%;
|
|
2864
|
-
transition: background-color 0.2s;
|
|
2865
|
-
gap: 8px;
|
|
2892
|
+
.image-item img {
|
|
2893
|
+
width: 100%;
|
|
2894
|
+
height: 100%;
|
|
2895
|
+
object-fit: cover;
|
|
2896
|
+
opacity: 0.2;
|
|
2866
2897
|
}
|
|
2867
2898
|
|
|
2868
|
-
.
|
|
2869
|
-
|
|
2899
|
+
/* Solución definitiva para el posicionamiento y el padding del botón. */
|
|
2900
|
+
.image-item randstad-button {
|
|
2901
|
+
position: absolute;
|
|
2902
|
+
top: 0;
|
|
2903
|
+
right: 0;
|
|
2904
|
+
z-index: 10;
|
|
2905
|
+
--content-padding: 8px;
|
|
2870
2906
|
}
|
|
2871
2907
|
|
|
2872
|
-
.
|
|
2873
|
-
|
|
2874
|
-
display: flex;
|
|
2875
|
-
align-items: center;
|
|
2876
|
-
gap: 4px;
|
|
2908
|
+
.text-main.error {
|
|
2909
|
+
color: var(--ui-negative, #E00F0F);
|
|
2877
2910
|
}
|
|
2911
|
+
`}getFileConfig(){const t="tu archivo no es válido";return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:t,errorMessageSize:t,typeError:"image"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,Re)}getTextMaxFileSize(){return this.baseGetTextMaxFileSize(this.maxFileSize)}updated(t){t.has("files")&&this.files&&(this.imageUrls.forEach((t=>URL.revokeObjectURL(t))),this.imageUrls=this.files.map((t=>URL.createObjectURL(t))))}disconnectedCallback(){super.disconnectedCallback(),this.imageUrls.forEach((t=>URL.revokeObjectURL(t)))}async handleFiles(t){await this.baseHandleFiles(t,this.getFileConfig())}onFileInputChange(t){this.baseOnFileInputChange(t,this.getFileConfig())}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)}willUpdate(t){t.has("files")&&(this.isMaxFilesReached=(this.files||[]).length>=3)}render(){const t=this.disabled||this.isMaxFilesReached,i=this.disabled,r=this.errorTextMessage||`subí hasta ${this.maxFiles} imágenes`,o=this.errorTextMessage?"assets/img/image-upload-error.svg":t?"assets/img/image-upload-disabled.svg":"assets/img/image-upload-circle.svg",s=`container ${this.isDragging?"dragging":""} ${this.errorTextMessage?"error":""}`,n=e`
|
|
2912
|
+
<label class="button">
|
|
2913
|
+
agregar archivo
|
|
2878
2914
|
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2915
|
+
<input
|
|
2916
|
+
type="file"
|
|
2917
|
+
accept=${this.acceptedFileTypes.join(",")}
|
|
2918
|
+
?multiple=${this.maxFiles>1}
|
|
2919
|
+
@change="${this.onFileInputChange}"
|
|
2920
|
+
?disabled="${t}"
|
|
2921
|
+
/>
|
|
2922
|
+
</label>
|
|
2923
|
+
`;return e`
|
|
2924
|
+
<div class="upload-component-wrapper">
|
|
2925
|
+
${this.imageUrls.length>0?e`
|
|
2926
|
+
<div class="image-gallery">
|
|
2927
|
+
${this.imageUrls.map(((t,r)=>e`
|
|
2928
|
+
<div class="image-item">
|
|
2929
|
+
<img src="${t}" loading="lazy" alt="Uploaded image" />
|
|
2930
|
+
|
|
2931
|
+
<randstad-button
|
|
2932
|
+
.variant=${"button-icon"}
|
|
2933
|
+
.iconName=${"trash"}
|
|
2934
|
+
@click=${()=>this.removeFile(r,"image")}
|
|
2935
|
+
?disabled=${i}
|
|
2936
|
+
>
|
|
2937
|
+
</randstad-button>
|
|
2938
|
+
</div>
|
|
2939
|
+
`))}
|
|
2940
|
+
</div>
|
|
2941
|
+
`:""}
|
|
2895
2942
|
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2943
|
+
<div
|
|
2944
|
+
class="${s}"
|
|
2945
|
+
?disabled="${t}"
|
|
2946
|
+
@drop="${this.onDrop}"
|
|
2947
|
+
@dragover="${this.onDragOver}"
|
|
2948
|
+
@dragleave="${this.onDragLeave}"
|
|
2949
|
+
>
|
|
2950
|
+
<img
|
|
2951
|
+
class="icon"
|
|
2952
|
+
src=${o}
|
|
2953
|
+
alt="Subir imagen"
|
|
2954
|
+
/>
|
|
2899
2955
|
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
}
|
|
2956
|
+
<div class="text-container">
|
|
2957
|
+
<div class="text-main ${this.errorTextMessage?"error":""}">${r}</div>
|
|
2903
2958
|
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
place-items: center;
|
|
2908
|
-
grid-template-columns: repeat(7, 1fr);
|
|
2909
|
-
text-align: center;
|
|
2910
|
-
color: var(--secondary-randstad-dark-blue-60, #6c7387);
|
|
2911
|
-
opacity: 1;
|
|
2912
|
-
margin-bottom: 8px; /* Gap de 8px entre nombres y días */
|
|
2913
|
-
font-size: 16px;
|
|
2914
|
-
font-style: normal;
|
|
2915
|
-
font-weight: 500;
|
|
2916
|
-
margin-top: 0;
|
|
2917
|
-
}
|
|
2918
|
-
|
|
2919
|
-
/* Cuadrícula para los días del mes */
|
|
2920
|
-
.days-grid {
|
|
2921
|
-
display: grid;
|
|
2922
|
-
place-items: center;
|
|
2923
|
-
grid-template-columns: repeat(7, 1fr);
|
|
2924
|
-
gap: 8px;
|
|
2925
|
-
}
|
|
2959
|
+
<div class="text-secondary">
|
|
2960
|
+
Podés agregar un archivo o arrastrar y soltar acá
|
|
2961
|
+
</div>
|
|
2926
2962
|
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
${B}
|
|
2930
|
-
display: flex;
|
|
2931
|
-
align-items: center;
|
|
2932
|
-
justify-content: center;
|
|
2933
|
-
width: 40px;
|
|
2934
|
-
height: 40px;
|
|
2935
|
-
border-radius: 50%;
|
|
2936
|
-
cursor: pointer;
|
|
2937
|
-
background-color: transparent;
|
|
2938
|
-
border: none;
|
|
2939
|
-
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
2940
|
-
padding: 0;
|
|
2941
|
-
position: relative;
|
|
2942
|
-
}
|
|
2963
|
+
<div class="text-tertiary">${this.getTextAcceptedFileTypes()} / max. ${this.getTextMaxFileSize()}MB</div>
|
|
2964
|
+
</div>
|
|
2943
2965
|
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2966
|
+
${this.renderLoadingContainer(n)}
|
|
2967
|
+
</div>
|
|
2968
|
+
</div>
|
|
2969
|
+
`}};n([_({type:Array}),a("design:type",Array)],Ue.prototype,"acceptedFileTypes",void 0),n([_({type:Number}),a("design:type",Object)],Ue.prototype,"maxFiles",void 0),n([_({type:Number}),a("design:type",Object)],Ue.prototype,"maxFileSize",void 0),n([T(),a("design:type",Object)],Ue.prototype,"isDragging",void 0),n([T(),a("design:type",Array)],Ue.prototype,"imageUrls",void 0),n([T(),a("design:type",Boolean)],Ue.prototype,"isMaxFilesReached",void 0),Ue=n([l("upload-image")],Ue);const He=6048e5,qe=Symbol.for("constructDateFrom");function We(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&qe in t?t[qe](e):t instanceof Date?new t.constructor(e):new Date(e)}function Ye(t,e){return We(e||t,t)}function Ge(t,e,i){const r=Ye(t,i?.in);if(isNaN(e))return We(t,NaN);if(!e)return r;const o=r.getDate(),s=We(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);return o>=s.getDate()?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let Xe={};function Ke(){return Xe}function Qe(t,e){const i=Ke(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=Ye(t,e?.in),s=o.getDay(),n=(s<r?7:0)+s-r;return o.setDate(o.getDate()-n),o.setHours(0,0,0,0),o}function Je(t,e){return Qe(t,{...e,weekStartsOn:1})}function Ze(t,e){const i=Ye(t,e?.in),r=i.getFullYear(),o=We(i,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Je(o),n=We(i,0);n.setFullYear(r,0,4),n.setHours(0,0,0,0);const a=Je(n);return i.getTime()>=s.getTime()?r+1:i.getTime()>=a.getTime()?r:r-1}function ti(t){const e=Ye(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function ei(t,...e){const i=We.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function ii(t,e){const i=Ye(t,e?.in);return i.setHours(0,0,0,0),i}function ri(t,e,i){return Ge(t,12*e,i)}function oi(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+Ye(t)));var e}function si(t,e){const i=Ye(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const ni={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ai(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const li={date:ai({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ai({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ai({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},di={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ci(t){return(e,i)=>{let r;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,o=i?.width?String(i.width):e;r=t.formattingValues[o]||t.formattingValues[e]}else{const e=t.defaultWidth,o=i?.width?String(i.width):t.defaultWidth;r=t.values[o]||t.values[e]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function hi(t){return(e,i={})=>{const r=i.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(o);if(!s)return null;const n=s[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(a,(t=>t.test(n))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(a,(t=>t.test(n)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(n.length)}}}var pi;const ui={code:"en-US",formatDistance:(t,e,i)=>{let r;const o=ni[t];return r="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r},formatLong:li,formatRelative:(t,e,i,r)=>di[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:ci({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ci({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:ci({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ci({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ci({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(pi={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(pi.matchPattern);if(!i)return null;const r=i[0],o=t.match(pi.parsePattern);if(!o)return null;let s=pi.valueCallback?pi.valueCallback(o[0]):o[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(r.length)}}),era:hi({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hi({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:hi({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hi({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hi({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function bi(t,e){const i=Ye(t,e?.in),r=function(t,e){const[i,r]=ei(0,t,e),o=ii(i),s=ii(r),n=+o-ti(o),a=+s-ti(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=Ye(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return r+1}function gi(t,e){const i=Ye(t,e?.in),r=+Je(i)-+function(t,e){const i=Ze(t,e),r=We(t,0);return r.setFullYear(i,0,4),r.setHours(0,0,0,0),Je(r)}(i);return Math.round(r/He)+1}function mi(t,e){const i=Ye(t,e?.in),r=i.getFullYear(),o=Ke(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=We(e?.in||t,0);n.setFullYear(r+1,0,s),n.setHours(0,0,0,0);const a=Qe(n,e),l=We(e?.in||t,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const d=Qe(l,e);return+i>=+a?r+1:+i>=+d?r:r-1}function yi(t,e){const i=Ye(t,e?.in),r=+Qe(i,e)-+function(t,e){const i=Ke(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=mi(t,e),s=We(e?.in||t,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Qe(s,e)}(i,e);return Math.round(r/He)+1}function vi(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const fi={y(t,e){const i=t.getFullYear(),r=i>0?i:1-i;return vi("yy"===e?r%100:r,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):vi(i+1,2)},d:(t,e)=>vi(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>vi(t.getHours()%12||12,e.length),H:(t,e)=>vi(t.getHours(),e.length),m:(t,e)=>vi(t.getMinutes(),e.length),s:(t,e)=>vi(t.getSeconds(),e.length),S(t,e){const i=e.length,r=t.getMilliseconds();return vi(Math.trunc(r*Math.pow(10,i-3)),e.length)}},xi="midnight",wi="noon",ki="morning",$i="afternoon",Si="evening",Ci="night",Ei={G:function(t,e,i){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),r=e>0?e:1-e;return i.ordinalNumber(r,{unit:"year"})}return fi.y(t,e)},Y:function(t,e,i,r){const o=mi(t,r),s=o>0?o:1-o;if("YY"===e){return vi(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):vi(s,e.length)},R:function(t,e){return vi(Ze(t),e.length)},u:function(t,e){return vi(t.getFullYear(),e.length)},Q:function(t,e,i){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return vi(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return vi(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){const r=t.getMonth();switch(e){case"M":case"MM":return fi.M(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return vi(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){const o=yi(t,r);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):vi(o,e.length)},I:function(t,e,i){const r=gi(t);return"Io"===e?i.ordinalNumber(r,{unit:"week"}):vi(r,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):fi.d(t,e)},D:function(t,e,i){const r=bi(t);return"Do"===e?i.ordinalNumber(r,{unit:"dayOfYear"}):vi(r,e.length)},E:function(t,e,i){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){const o=t.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return vi(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){const o=t.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return vi(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){const r=t.getDay(),o=0===r?7:r;switch(e){case"i":return String(o);case"ii":return vi(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,i){const r=t.getHours();let o;switch(o=12===r?wi:0===r?xi:r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){const r=t.getHours();let o;switch(o=r>=17?Si:r>=12?$i:r>=4?ki:Ci,e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return fi.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):fi.H(t,e)},K:function(t,e,i){const r=t.getHours()%12;return"Ko"===e?i.ordinalNumber(r,{unit:"hour"}):vi(r,e.length)},k:function(t,e,i){let r=t.getHours();return 0===r&&(r=24),"ko"===e?i.ordinalNumber(r,{unit:"hour"}):vi(r,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):fi.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):fi.s(t,e)},S:function(t,e){return fi.S(t,e)},X:function(t,e,i){const r=t.getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Mi(r);case"XXXX":case"XX":return Ai(r);default:return Ai(r,":")}},x:function(t,e,i){const r=t.getTimezoneOffset();switch(e){case"x":return Mi(r);case"xxxx":case"xx":return Ai(r);default:return Ai(r,":")}},O:function(t,e,i){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Di(r,":");default:return"GMT"+Ai(r,":")}},z:function(t,e,i){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Di(r,":");default:return"GMT"+Ai(r,":")}},t:function(t,e,i){return vi(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return vi(+t,e.length)}};function Di(t,e=""){const i=t>0?"-":"+",r=Math.abs(t),o=Math.trunc(r/60),s=r%60;return 0===s?i+String(o):i+String(o)+e+vi(s,2)}function Mi(t,e){if(t%60==0){return(t>0?"-":"+")+vi(Math.abs(t)/60,2)}return Ai(t,e)}function Ai(t,e=""){const i=t>0?"-":"+",r=Math.abs(t);return i+vi(Math.trunc(r/60),2)+e+vi(r%60,2)}const Oi=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Fi=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},_i={p:Fi,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return Oi(t,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",Oi(r,e)).replace("{{time}}",Fi(o,e))}},Ti=/^D+$/,ji=/^Y+$/,Pi=["D","DD","YY","YYYY"];const Li=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ii=/^'([^]*?)'?$/,Ni=/''/g,Bi=/[a-zA-Z]/;function Ri(t,e,i){const r=Ke(),o=r.locale??ui,s=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ye(t,i?.in);if(!oi(a))throw new RangeError("Invalid time value");let l=e.match(zi).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,_i[e])(t,o.formatLong)}return t})).join("").match(Li).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Vi(t)};if(Ei[e])return{isToken:!0,value:t};if(e.match(Bi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const d={firstWeekContainsDate:s,weekStartsOn:n,locale:o};return l.map((i=>{if(!i.isToken)return i.value;const r=i.value;(function(t){return ji.test(t)}(r)||function(t){return Ti.test(t)}(r))&&function(t,e,i){const r=function(t,e,i){const r="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(r),Pi.includes(t))throw new RangeError(r)}(r,e,String(t));return(0,Ei[r[0]])(a,r,o.localize,d)})).join("")}function Vi(t){const e=t.match(Ii);return e?e[1].replace(Ni,"'"):t}function Ui(t,e){return Ye(t,e?.in).getDate()}function Hi(t,e){const i=Ye(t,e?.in),r=i.getFullYear(),o=i.getMonth(),s=We(i,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function qi(t,e){return+Ye(t)>+Ye(e)}function Wi(t,e){return+Ye(t)<+Ye(e)}function Yi(t,e,i){const[r,o]=ei(0,t,e);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Gi(t,e,i){const[r,o]=ei(0,t,e);return r.getFullYear()===o.getFullYear()}function Xi(t,e){return function(t,e){const[i,r]=ei(0,t,e);return+ii(i)===+ii(r)}(We(t,t),function(t){return We(t,Date.now())}(t))}let Ki=class extends t{constructor(){super(...arguments),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static{this.styles=[Q,r`
|
|
2970
|
+
/* Estilos generales del contenedor del calendario (escritorio) */
|
|
2971
|
+
.calendar-container {
|
|
2972
|
+
position: absolute;
|
|
2973
|
+
top: 100%;
|
|
2974
|
+
left: 0;
|
|
2975
|
+
z-index: 10;
|
|
2976
|
+
border: var(--border-weight-default, 1px) solid var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
2977
|
+
background: var(--secondary-white, #fff);
|
|
2978
|
+
border-radius: 4px;
|
|
2979
|
+
margin-top: 8px;
|
|
2980
|
+
padding: 16px;
|
|
2981
|
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
2982
|
+
font-family: Graphik;
|
|
2983
|
+
display: flex;
|
|
2984
|
+
flex-direction: column;
|
|
2985
|
+
box-sizing: border-box;
|
|
2986
|
+
min-width: 360px;
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
/* El header no tiene margin-bottom */
|
|
2990
|
+
.header {
|
|
2991
|
+
margin-bottom: 0;
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
/* El separador no tiene margin-top para no dejar espacio con el header */
|
|
2995
|
+
.weekdays-separator {
|
|
2996
|
+
width: 100%;
|
|
2997
|
+
height: 1px;
|
|
2998
|
+
background-color: var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
2999
|
+
margin-top: 0;
|
|
3000
|
+
margin-bottom: 16px;
|
|
3001
|
+
}
|
|
2947
3002
|
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
3003
|
+
/* Estilos del encabezado de navegación (botones y título) */
|
|
3004
|
+
.header {
|
|
3005
|
+
display: flex;
|
|
3006
|
+
justify-content: space-between;
|
|
3007
|
+
align-items: center;
|
|
3008
|
+
}
|
|
2953
3009
|
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
3010
|
+
/* Estilos generales para los botones de navegación */
|
|
3011
|
+
.nav-button {
|
|
3012
|
+
background: none;
|
|
3013
|
+
border: none;
|
|
3014
|
+
cursor: pointer;
|
|
3015
|
+
padding: 8px;
|
|
3016
|
+
color: var(--primary-randstad-blue-70, #2175d9);
|
|
3017
|
+
border-radius: 50%;
|
|
3018
|
+
transition: background-color 0.2s;
|
|
3019
|
+
gap: 8px;
|
|
3020
|
+
}
|
|
2965
3021
|
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
color: var(--secondary-white, #fff);
|
|
2970
|
-
font-weight: 500;
|
|
2971
|
-
}
|
|
3022
|
+
.nav-button:hover {
|
|
3023
|
+
background-color: var(--secondary-randstad-light-blue-10, #e8f1fb);
|
|
3024
|
+
}
|
|
2972
3025
|
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
}
|
|
3026
|
+
.header-left,
|
|
3027
|
+
.header-right {
|
|
3028
|
+
display: flex;
|
|
3029
|
+
align-items: center;
|
|
3030
|
+
gap: 4px;
|
|
3031
|
+
}
|
|
2980
3032
|
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
3033
|
+
.month-year-button {
|
|
3034
|
+
${z}
|
|
3035
|
+
display: flex;
|
|
3036
|
+
align-items: center;
|
|
3037
|
+
justify-content: center;
|
|
3038
|
+
gap: 8px;
|
|
3039
|
+
background: none;
|
|
3040
|
+
border: none;
|
|
3041
|
+
cursor: pointer;
|
|
3042
|
+
transition: background-color 0.2s;
|
|
3043
|
+
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3044
|
+
border-radius: 16px;
|
|
3045
|
+
width: auto;
|
|
3046
|
+
height: 41px;
|
|
3047
|
+
padding: 8px;
|
|
3048
|
+
}
|
|
2988
3049
|
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
${B}
|
|
2993
|
-
background: var(--secondary-white, #fff);
|
|
2994
|
-
border: 1px solid transparent;
|
|
2995
|
-
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
2996
|
-
cursor: pointer;
|
|
2997
|
-
transition: background-color 0.2s, border-color 0.2s;
|
|
2998
|
-
border-radius: 9999px;
|
|
2999
|
-
padding: 4px 16px;
|
|
3000
|
-
text-align: center;
|
|
3001
|
-
display: flex;
|
|
3002
|
-
justify-content: center;
|
|
3003
|
-
align-items: center;
|
|
3004
|
-
height: 38px;
|
|
3005
|
-
}
|
|
3050
|
+
.month-year-button:hover {
|
|
3051
|
+
background-color: var(--secondary-randstad-light-blue-10, #e8f1fb);
|
|
3052
|
+
}
|
|
3006
3053
|
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
}
|
|
3054
|
+
.month-year-button randstad-icon {
|
|
3055
|
+
color: var(--primary-randstad-blue-70, #2175d9);
|
|
3056
|
+
}
|
|
3011
3057
|
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3058
|
+
/* Contenedor de los nombres de los días de la semana */
|
|
3059
|
+
.weekdays {
|
|
3060
|
+
display: grid;
|
|
3061
|
+
place-items: center;
|
|
3062
|
+
grid-template-columns: repeat(7, 1fr);
|
|
3063
|
+
text-align: center;
|
|
3064
|
+
color: var(--secondary-randstad-dark-blue-60, #6c7387);
|
|
3065
|
+
opacity: 1;
|
|
3066
|
+
margin-bottom: 8px; /* Gap de 8px entre nombres y días */
|
|
3067
|
+
font-size: 16px;
|
|
3068
|
+
font-style: normal;
|
|
3069
|
+
font-weight: 500;
|
|
3070
|
+
margin-top: 0;
|
|
3071
|
+
}
|
|
3019
3072
|
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3073
|
+
/* Cuadrícula para los días del mes */
|
|
3074
|
+
.days-grid {
|
|
3075
|
+
display: grid;
|
|
3076
|
+
place-items: center;
|
|
3077
|
+
grid-template-columns: repeat(7, 1fr);
|
|
3078
|
+
gap: 8px;
|
|
3079
|
+
}
|
|
3027
3080
|
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3081
|
+
/* Estilos para cada botón de día */
|
|
3082
|
+
.day {
|
|
3083
|
+
${I}
|
|
3084
|
+
display: flex;
|
|
3085
|
+
align-items: center;
|
|
3086
|
+
justify-content: center;
|
|
3087
|
+
width: 40px;
|
|
3088
|
+
height: 40px;
|
|
3089
|
+
border-radius: 50%;
|
|
3090
|
+
cursor: pointer;
|
|
3091
|
+
background-color: transparent;
|
|
3092
|
+
border: none;
|
|
3093
|
+
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3094
|
+
padding: 0;
|
|
3095
|
+
position: relative;
|
|
3096
|
+
}
|
|
3033
3097
|
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
position: absolute;
|
|
3038
|
-
bottom: 0;
|
|
3039
|
-
width: 100%;
|
|
3040
|
-
height: 2px;
|
|
3041
|
-
border-radius: 2px;
|
|
3042
|
-
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3043
|
-
}
|
|
3098
|
+
.day:hover {
|
|
3099
|
+
background-color: var(--secondary-randstad-light-blue-10, #e8f1fb);
|
|
3100
|
+
}
|
|
3044
3101
|
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3102
|
+
/* Estilos para el día, mes y año de hoy */
|
|
3103
|
+
.day.today {
|
|
3104
|
+
color: var(--primary-randstad-blue-70, #2175d9);
|
|
3105
|
+
font-weight: 500;
|
|
3106
|
+
}
|
|
3050
3107
|
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3108
|
+
.day.today::after {
|
|
3109
|
+
content: '';
|
|
3110
|
+
position: absolute;
|
|
3111
|
+
bottom: 0;
|
|
3112
|
+
left: 0;
|
|
3113
|
+
right: 0;
|
|
3114
|
+
width: 100%;
|
|
3115
|
+
height: 2px;
|
|
3116
|
+
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3117
|
+
border-radius: 2px;
|
|
3118
|
+
}
|
|
3054
3119
|
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
.day[disabled]:hover {
|
|
3063
|
-
background-color: transparent;
|
|
3064
|
-
}
|
|
3120
|
+
/* Estilos para el día seleccionado */
|
|
3121
|
+
.day.selected {
|
|
3122
|
+
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3123
|
+
color: var(--secondary-white, #fff);
|
|
3124
|
+
font-weight: 500;
|
|
3125
|
+
}
|
|
3065
3126
|
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
.year-button[disabled]:hover,
|
|
3075
|
-
.month-button[disabled]:hover {
|
|
3076
|
-
background-color: transparent;
|
|
3077
|
-
}
|
|
3127
|
+
/* Estilos para el día seleccionado cuando se muestra en un mes o año diferente */
|
|
3128
|
+
.day.secondary-selected {
|
|
3129
|
+
background-color: var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
3130
|
+
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3131
|
+
font-weight: 500;
|
|
3132
|
+
border: 1px solid var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
3133
|
+
}
|
|
3078
3134
|
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
}
|
|
3135
|
+
/* Grillas para selección de año y mes */
|
|
3136
|
+
.year-grid,
|
|
3137
|
+
.month-grid {
|
|
3138
|
+
display: grid;
|
|
3139
|
+
grid-template-columns: repeat(3, 1fr);
|
|
3140
|
+
gap: 8px;
|
|
3141
|
+
}
|
|
3087
3142
|
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3143
|
+
/* Botones de año y mes en la grilla */
|
|
3144
|
+
.year-button,
|
|
3145
|
+
.month-button {
|
|
3146
|
+
${I}
|
|
3147
|
+
background: var(--secondary-white, #fff);
|
|
3148
|
+
border: 1px solid transparent;
|
|
3149
|
+
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3150
|
+
cursor: pointer;
|
|
3151
|
+
transition: background-color 0.2s, border-color 0.2s;
|
|
3152
|
+
border-radius: 9999px;
|
|
3153
|
+
padding: 4px 16px;
|
|
3154
|
+
text-align: center;
|
|
3155
|
+
display: flex;
|
|
3156
|
+
justify-content: center;
|
|
3157
|
+
align-items: center;
|
|
3158
|
+
height: 38px;
|
|
3159
|
+
}
|
|
3105
3160
|
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3161
|
+
.year-button:hover,
|
|
3162
|
+
.month-button:hover {
|
|
3163
|
+
background-color: var(--secondary-randstad-light-blue-10, #e8f1fb);
|
|
3109
3164
|
}
|
|
3110
|
-
|
|
3111
|
-
|
|
3165
|
+
|
|
3166
|
+
/* Estilos para el año o mes seleccionado */
|
|
3167
|
+
.year-button.selected,
|
|
3168
|
+
.month-button.selected {
|
|
3169
|
+
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3170
|
+
color: var(--secondary-white, #fff);
|
|
3171
|
+
border: 1px solid var(--primary-randstad-blue-70, #2175d9);
|
|
3112
3172
|
}
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
|
-
.mobile-modal .header {
|
|
3116
|
-
margin-bottom: 0;
|
|
3117
|
-
position: sticky;
|
|
3118
|
-
top: 0;
|
|
3119
|
-
background: white;
|
|
3120
|
-
z-index: 10;
|
|
3121
|
-
}
|
|
3122
|
-
|
|
3123
|
-
.mobile-modal .weekdays-separator {
|
|
3124
|
-
margin: 0;
|
|
3125
|
-
}
|
|
3126
3173
|
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
gap: 8px;
|
|
3135
|
-
grid-template-columns: repeat(7, 1fr);
|
|
3136
|
-
place-items: center;
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
|
-
.mobile-modal .month-grid,
|
|
3140
|
-
.mobile-modal .year-grid {
|
|
3141
|
-
gap: 16px;
|
|
3142
|
-
margin-top: 16px;
|
|
3143
|
-
}
|
|
3174
|
+
/* Estilos para el mes seleccionado en otro año (estilo secundario) */
|
|
3175
|
+
.month-button.secondary-selected {
|
|
3176
|
+
background-color: var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
3177
|
+
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3178
|
+
font-weight: 500;
|
|
3179
|
+
border: 1px solid var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
3180
|
+
}
|
|
3144
3181
|
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
justify-content: center;
|
|
3151
|
-
width: 40px;
|
|
3152
|
-
height: 40px;
|
|
3153
|
-
border-radius: 50%;
|
|
3154
|
-
cursor: pointer;
|
|
3155
|
-
background-color: transparent;
|
|
3156
|
-
border: none;
|
|
3157
|
-
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3158
|
-
position: relative;
|
|
3159
|
-
}
|
|
3182
|
+
/* Estilos para el año y mes current */
|
|
3183
|
+
.year-button.current,
|
|
3184
|
+
.month-button.current {
|
|
3185
|
+
position: relative;
|
|
3186
|
+
}
|
|
3160
3187
|
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3188
|
+
.year-button.current::after,
|
|
3189
|
+
.month-button.current::after {
|
|
3190
|
+
content: '';
|
|
3191
|
+
position: absolute;
|
|
3192
|
+
bottom: 0;
|
|
3193
|
+
width: 100%;
|
|
3194
|
+
height: 2px;
|
|
3195
|
+
border-radius: 2px;
|
|
3196
|
+
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3197
|
+
}
|
|
3167
3198
|
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3199
|
+
/* Estilos para el botón de navegación deshabilitado */
|
|
3200
|
+
.nav-button[disabled] {
|
|
3201
|
+
color: var(--secondary-randstad-dark-blue-30, #b1b5c4);
|
|
3202
|
+
pointer-events: none;
|
|
3203
|
+
}
|
|
3172
3204
|
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
bottom: 0;
|
|
3177
|
-
width: 40px;
|
|
3178
|
-
left: 50%;
|
|
3179
|
-
transform: translateX(-50%);
|
|
3180
|
-
height: 2px;
|
|
3181
|
-
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3182
|
-
border-radius: 2px;
|
|
3183
|
-
}
|
|
3205
|
+
.nav-button[disabled]:hover {
|
|
3206
|
+
background-color: transparent;
|
|
3207
|
+
}
|
|
3184
3208
|
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3209
|
+
/* Estilos para el botón de día deshabilitado */
|
|
3210
|
+
.day[disabled] {
|
|
3211
|
+
color: var(--secondary-randstad-dark-blue-30, #b1b5c4);
|
|
3212
|
+
pointer-events: none;
|
|
3213
|
+
background-color: transparent;
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
.day[disabled]:hover {
|
|
3217
|
+
background-color: transparent;
|
|
3218
|
+
}
|
|
3190
3219
|
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3220
|
+
/* Estilos para los botones de año y mes deshabilitados */
|
|
3221
|
+
.year-button[disabled],
|
|
3222
|
+
.month-button[disabled] {
|
|
3223
|
+
color: var(--secondary-randstad-dark-blue-30, #b1b5c4);
|
|
3224
|
+
pointer-events: none;
|
|
3225
|
+
background-color: transparent;
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
.year-button[disabled]:hover,
|
|
3229
|
+
.month-button[disabled]:hover {
|
|
3230
|
+
background-color: transparent;
|
|
3231
|
+
}
|
|
3199
3232
|
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3233
|
+
/* --- Estilos para móvil --- */
|
|
3234
|
+
.mobile-backdrop {
|
|
3235
|
+
position: fixed;
|
|
3236
|
+
inset: 0;
|
|
3237
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
3238
|
+
z-index: 999;
|
|
3239
|
+
font-family: Graphik;
|
|
3240
|
+
}
|
|
3207
3241
|
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3242
|
+
.mobile-modal {
|
|
3243
|
+
position: fixed;
|
|
3244
|
+
bottom: 0;
|
|
3245
|
+
left: 0;
|
|
3246
|
+
right: 0;
|
|
3247
|
+
background-color: white;
|
|
3248
|
+
z-index: 1000;
|
|
3249
|
+
border-radius: 12px 12px 0 0;
|
|
3250
|
+
box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
|
|
3251
|
+
display: flex;
|
|
3252
|
+
flex-direction: column;
|
|
3253
|
+
padding: 24px 16px;
|
|
3254
|
+
animation: slideUp 0.5s ease-out;
|
|
3255
|
+
max-height: 80dvh;
|
|
3256
|
+
overflow-y: auto;
|
|
3257
|
+
font-family: Graphik;
|
|
3258
|
+
}
|
|
3216
3259
|
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3260
|
+
@keyframes slideUp {
|
|
3261
|
+
from {
|
|
3262
|
+
transform: translateY(100%);
|
|
3263
|
+
}
|
|
3264
|
+
to {
|
|
3265
|
+
transform: translateY(0);
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
.mobile-modal .header {
|
|
3270
|
+
margin-bottom: 0;
|
|
3271
|
+
position: sticky;
|
|
3272
|
+
top: 0;
|
|
3273
|
+
background: white;
|
|
3274
|
+
z-index: 10;
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3277
|
+
.mobile-modal .weekdays-separator {
|
|
3278
|
+
margin: 0;
|
|
3279
|
+
}
|
|
3222
3280
|
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3281
|
+
.mobile-modal .weekdays {
|
|
3282
|
+
place-items: center;
|
|
3283
|
+
margin-top: 16px;
|
|
3284
|
+
margin-bottom: 8px;
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
.mobile-modal .days-grid {
|
|
3288
|
+
gap: 8px;
|
|
3289
|
+
grid-template-columns: repeat(7, 1fr);
|
|
3290
|
+
place-items: center;
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
.mobile-modal .month-grid,
|
|
3294
|
+
.mobile-modal .year-grid {
|
|
3295
|
+
gap: 16px;
|
|
3296
|
+
margin-top: 16px;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
.mobile-modal .day {
|
|
3300
|
+
${N}
|
|
3301
|
+
font-weight: 500;
|
|
3302
|
+
display: flex;
|
|
3303
|
+
align-items: center;
|
|
3304
|
+
justify-content: center;
|
|
3305
|
+
width: 40px;
|
|
3306
|
+
height: 40px;
|
|
3307
|
+
border-radius: 50%;
|
|
3308
|
+
cursor: pointer;
|
|
3309
|
+
background-color: transparent;
|
|
3310
|
+
border: none;
|
|
3311
|
+
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3312
|
+
position: relative;
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
.mobile-modal .day.selected {
|
|
3316
|
+
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3317
|
+
color: var(--secondary-white, #fff);
|
|
3318
|
+
font-weight: 500;
|
|
3319
|
+
border-radius: 50%;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
.mobile-modal .day.today {
|
|
3323
|
+
color: var(--primary-randstad-blue-70, #2175d9);
|
|
3324
|
+
font-weight: 500;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
.mobile-modal .day.today::after {
|
|
3328
|
+
content: '';
|
|
3329
|
+
position: absolute;
|
|
3330
|
+
bottom: 0;
|
|
3331
|
+
width: 40px;
|
|
3332
|
+
left: 50%;
|
|
3333
|
+
transform: translateX(-50%);
|
|
3334
|
+
height: 2px;
|
|
3335
|
+
background-color: var(--primary-randstad-blue-70, #2175d9);
|
|
3336
|
+
border-radius: 2px;
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
.mobile-modal .year-grid,
|
|
3340
|
+
.mobile-modal .month-grid {
|
|
3341
|
+
grid-template-columns: repeat(3, 1fr);
|
|
3342
|
+
gap: 8px;
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
.mobile-modal .year-button,
|
|
3346
|
+
.mobile-modal .month-button {
|
|
3347
|
+
width: 100%;
|
|
3348
|
+
height: 48px;
|
|
3349
|
+
border-radius: 9999px;
|
|
3350
|
+
flex: 1 1 33.3333%;
|
|
3351
|
+
padding: 0;
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
.mobile-modal .day.secondary-selected,
|
|
3355
|
+
.mobile-modal .month-button.secondary-selected {
|
|
3356
|
+
background-color: var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
3357
|
+
color: var(--secondary-randstad-dark-blue-80, #3c4257);
|
|
3358
|
+
font-weight: 500;
|
|
3359
|
+
border: 1px solid var(--secondary-randstad-dark-blue-10, #e7e8ec);
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
/* Estilos para elementos deshabilitados dentro del modal de móviles. */
|
|
3363
|
+
.mobile-modal .day[disabled],
|
|
3364
|
+
.mobile-modal .month-button[disabled],
|
|
3365
|
+
.mobile-modal .year-button[disabled] {
|
|
3366
|
+
color: var(--secondary-randstad-dark-blue-30, #b1b5c4);
|
|
3367
|
+
pointer-events: none;
|
|
3368
|
+
background-color: transparent;
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
.mobile-modal .nav-button[disabled] {
|
|
3372
|
+
color: var(--secondary-randstad-dark-blue-30, #b1b5c4);
|
|
3373
|
+
pointer-events: none;
|
|
3374
|
+
background-color: transparent;
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
/* Evitamos que el estilo 'today' o 'current' se aplique si el elemento está deshabilitado */
|
|
3378
|
+
.mobile-modal .day.today[disabled]::after,
|
|
3379
|
+
.mobile-modal .nav-button[disabled] randstad-icon {
|
|
3380
|
+
color: var(--secondary-randstad-dark-blue-30, #b1b5c4);
|
|
3381
|
+
}
|
|
3382
|
+
/* */
|
|
3383
|
+
`]}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}handleHeaderClick(){"days"===this.currentView?this.currentView="years":this.currentView="days"}_updateView(t,e=null){this.viewDate=t,e&&(this.currentView=e),this.dispatchEvent(new CustomEvent("view-date-change",{detail:{date:this.viewDate}}))}handleNavClick(t){let e=this.viewDate;e="days"===this.currentView?Ge(this.viewDate,t):"months"===this.currentView?ri(this.viewDate,t):ri(this.viewDate,21*t),this._updateView(e)}handleYearSelect(t){const e=function(t,e,i){const r=Ye(t,i?.in);return isNaN(+r)?We(t,NaN):(r.setFullYear(e),r)}(this.viewDate,t);this._updateView(e,"months")}handleMonthSelect(t){const e=function(t,e,i){const r=Ye(t,i?.in),o=r.getFullYear(),s=r.getDate(),n=We(t,0);n.setFullYear(o,e,15),n.setHours(0,0,0,0);const a=Hi(n);return r.setMonth(e,Math.min(s,a)),r}(this.viewDate,t);this._updateView(e,"days")}handleDayClick(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}getFullMonthNames(){return["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]}getShortMonthNames(){return this.getFullMonthNames().map((t=>t.substring(0,3)))}getShortWeekdays(){return["lu","ma","mi","ju","vi","sa","do"]}renderHeader(){const t=this.getFullMonthNames();let i="",r=!1,o=!1;if("years"===this.currentView){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,e=t+20;i=`${t} - ${e}`;r=t<=(this.minDate?this.minDate.getFullYear():-1/0),o=e>=(this.maxDate?this.maxDate.getFullYear():1/0)}else if("months"===this.currentView){i=`${this.viewDate.getFullYear()}`;const t=this.viewDate.getFullYear();r=t<=(this.minDate?this.minDate.getFullYear():-1/0),o=t>=(this.maxDate?this.maxDate.getFullYear():1/0)}else{i=`${t[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`,this.minDate&&(r=Yi(si(this.viewDate),si(this.minDate))||Wi(this.viewDate,this.minDate)),this.maxDate&&(o=Yi(si(this.viewDate),si(this.maxDate))||qi(this.viewDate,this.maxDate))}const s=e`
|
|
3384
|
+
<randstad-icon
|
|
3385
|
+
name="${"days"===this.currentView?"arrow_drop_down":"arrow_drop_up"}"
|
|
3386
|
+
class="select-icon"
|
|
3387
|
+
>
|
|
3388
|
+
</randstad-icon>
|
|
3389
|
+
`;return e`
|
|
3230
3390
|
<div class="header">
|
|
3231
3391
|
<div class="header-left">
|
|
3232
3392
|
<button class="month-year-button" @click=${this.handleHeaderClick}>
|
|
3233
3393
|
<span>${i}</span>
|
|
3234
3394
|
|
|
3235
|
-
${
|
|
3395
|
+
${s}
|
|
3236
3396
|
</button>
|
|
3237
3397
|
</div>
|
|
3238
3398
|
|
|
3239
3399
|
<div class="header-right">
|
|
3240
|
-
<button class="nav-button" @click=${()=>this.handleNavClick(-1)} ?disabled=${
|
|
3400
|
+
<button class="nav-button" @click=${()=>this.handleNavClick(-1)} ?disabled=${r}>
|
|
3241
3401
|
<randstad-icon name="arrow_left"></randstad-icon>
|
|
3242
3402
|
</button>
|
|
3243
3403
|
|
|
3244
|
-
<button class="nav-button" @click=${()=>this.handleNavClick(1)} ?disabled=${
|
|
3404
|
+
<button class="nav-button" @click=${()=>this.handleNavClick(1)} ?disabled=${o}>
|
|
3245
3405
|
<randstad-icon name="arrow_right"></randstad-icon>
|
|
3246
3406
|
</button>
|
|
3247
3407
|
</div>
|
|
3248
3408
|
</div>
|
|
3249
|
-
`}renderYearsView(){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,i=Array.from({length:21},((e,i)=>t+i)),
|
|
3409
|
+
`}renderYearsView(){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,i=Array.from({length:21},((e,i)=>t+i)),r=this.selectedDate?this.selectedDate.getFullYear():null,o=(new Date).getFullYear(),s=this.minDate?this.minDate.getFullYear():-1/0,n=this.maxDate?this.maxDate.getFullYear():1/0;return e`
|
|
3250
3410
|
<div class="year-grid">
|
|
3251
3411
|
${i.map((t=>e`
|
|
3252
3412
|
<button
|
|
3253
|
-
class="${"year-button "+(t===
|
|
3413
|
+
class="${"year-button "+(t===r?"selected":t===o?"current":"")}"
|
|
3254
3414
|
@click=${()=>this.handleYearSelect(t)}
|
|
3255
|
-
?disabled=${t<
|
|
3415
|
+
?disabled=${t<s||t>n}
|
|
3256
3416
|
>
|
|
3257
3417
|
${t}
|
|
3258
3418
|
</button>
|
|
3259
3419
|
`))}
|
|
3260
3420
|
</div>
|
|
3261
|
-
`}renderMonthsView(){const t=this.getShortMonthNames(),i=this.selectedDate?.getMonth(),
|
|
3421
|
+
`}renderMonthsView(){const t=this.getShortMonthNames(),i=this.selectedDate?.getMonth(),r=(new Date).getMonth(),o=this.viewDate.getFullYear();return e`
|
|
3262
3422
|
<div class="month-grid">
|
|
3263
|
-
${t.map(((t,
|
|
3423
|
+
${t.map(((t,s)=>{const n=s===r,a=s===i&&this.selectedDate&&Gi(this.viewDate,this.selectedDate),l=s===i&&this.selectedDate&&!Gi(this.viewDate,this.selectedDate);let d=!1;this.minDate&&o===this.minDate.getFullYear()&&(d=s<this.minDate.getMonth()),this.maxDate&&o===this.maxDate.getFullYear()&&(d=d||s>this.maxDate.getMonth());return e`
|
|
3264
3424
|
<button
|
|
3265
|
-
class="${"month-button "+(
|
|
3266
|
-
?disabled=${
|
|
3267
|
-
@click=${()=>this.handleMonthSelect(
|
|
3425
|
+
class="${"month-button "+(a?"selected":l?"secondary-selected":n?"current":"")}"
|
|
3426
|
+
?disabled=${d}
|
|
3427
|
+
@click=${()=>this.handleMonthSelect(s)}
|
|
3268
3428
|
>
|
|
3269
3429
|
${t}
|
|
3270
3430
|
</button>
|
|
3271
3431
|
`}))}
|
|
3272
3432
|
</div>
|
|
3273
|
-
`}renderDayView(){const t=
|
|
3433
|
+
`}renderDayView(){const t=Hi(this.viewDate),i=si(this.viewDate),r=Ye(i,o?.in).getDay();var o;const s=Array.from({length:0===r?6:r-1},(()=>null)),n=Array.from({length:t},((t,e)=>function(t,e,i){const r=Ye(t,i?.in);return r.setDate(e),r}(i,e+1))),a=this.getShortWeekdays();return e`
|
|
3274
3434
|
<div class="weekdays">
|
|
3275
|
-
${
|
|
3435
|
+
${a.map((t=>e`<div>${t}</div>`))}
|
|
3276
3436
|
</div>
|
|
3277
3437
|
|
|
3278
3438
|
<div class="days-grid">
|
|
3279
|
-
${
|
|
3280
|
-
${
|
|
3439
|
+
${s.map((()=>e`<div></div>`))}
|
|
3440
|
+
${n.map((t=>{const i=ii(t),r=this.selectedDate?ii(this.selectedDate):null,o=this.minDate&&Wi(i,ii(this.minDate))||this.maxDate&&qi(i,ii(this.maxDate)),s=Xi(i),n=r&&Ui(i)===Ui(r),a=n&&r&&Yi(i,r)&&Gi(i,r);return e`
|
|
3281
3441
|
<button
|
|
3282
|
-
class="${`day ${
|
|
3283
|
-
?disabled=${
|
|
3442
|
+
class="${`day ${s?"today":""} ${a?"selected":n&&!a?"secondary-selected":""}`}"
|
|
3443
|
+
?disabled=${o}
|
|
3284
3444
|
@click=${()=>this.handleDayClick(t)}
|
|
3285
3445
|
>
|
|
3286
|
-
${
|
|
3446
|
+
${Ri(t,"d")}
|
|
3287
3447
|
</button>
|
|
3288
3448
|
`}))}
|
|
3289
3449
|
</div>
|
|
@@ -3300,10 +3460,10 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3300
3460
|
<div class="calendar-container" style="width: ${this.calendarWidth}px;">
|
|
3301
3461
|
${i}
|
|
3302
3462
|
</div>
|
|
3303
|
-
`}};
|
|
3463
|
+
`}};n([_({type:Object}),a("design:type",Object)],Ki.prototype,"selectedDate",void 0),n([_({type:Object}),a("design:type",Date)],Ki.prototype,"viewDate",void 0),n([_({type:Boolean}),a("design:type",Object)],Ki.prototype,"isMobile",void 0),n([_({type:Number}),a("design:type",Number)],Ki.prototype,"calendarWidth",void 0),n([_({type:Object}),a("design:type",Object)],Ki.prototype,"minDate",void 0),n([_({type:Object}),a("design:type",Object)],Ki.prototype,"maxDate",void 0),n([T(),a("design:type",String)],Ki.prototype,"currentView",void 0),Ki=n([l("calendar-overlay")],Ki);let Qi=class extends P{constructor(){super(...arguments),this.isRenderClearButton=!0,this.eighteenOrOlder=!1,this.isOpen=!1,this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.inputValue=null,this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this),this.handleClickOutside=t=>{t.composedPath().includes(this)||(this.isOpen=!1)}}static{this.styles=r`
|
|
3304
3464
|
${X}
|
|
3305
|
-
${Q}
|
|
3306
3465
|
${K}
|
|
3466
|
+
${G}
|
|
3307
3467
|
|
|
3308
3468
|
/* Si se proporciona una propiedad width (ej. width="600px"), se usa ese valor. */
|
|
3309
3469
|
:host([width]) {
|
|
@@ -3319,7 +3479,7 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3319
3479
|
|
|
3320
3480
|
/* Estilos para evitar el desbordamiento en móviles */
|
|
3321
3481
|
calendar-overlay {
|
|
3322
|
-
max-width:
|
|
3482
|
+
max-width: 100dvw;
|
|
3323
3483
|
box-sizing: border-box;
|
|
3324
3484
|
}
|
|
3325
3485
|
|
|
@@ -3401,19 +3561,19 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3401
3561
|
.calendar-button randstad-icon {
|
|
3402
3562
|
font-size: 18px;
|
|
3403
3563
|
}
|
|
3404
|
-
`}setMessageErrorFormatInvalid(){return"formato de fecha inválido, se esperaba 'dd-MM-yyyy'"}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){this.setInitialWidth()}updated(t){t.has("value")&&this._syncValue(this.value),(t.has("isOpen")||t.has("value"))&&this.setInitialWidth(),super.updated(t)}setInitialWidth(){this.inputContainer&&(this.calendarWidth=this.inputContainer.getBoundingClientRect().width)}updateResponsiveMode(){this.isMobile=window.innerWidth<=940,this.setInitialWidth()}handleInput(t){const e=t.target;this._parseAndValidateDate(e.value,!0)}handleCalendarButtonClick(t){this.disabled||(t.stopPropagation(),this.isOpen=!this.isOpen,this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,this.requestUpdate())}handleClearDate(){this.selectedDate=null,this.error=!1,this.errorMessage=null,this.closeOverlay(null)}handleDateSelect(t){const e=t.detail.date;e
|
|
3405
|
-
<div class="datepicker-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""} ${
|
|
3564
|
+
`}setMessageErrorFormatInvalid(){return"formato de fecha inválido, se esperaba 'dd-MM-yyyy'"}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){this.setInitialWidth()}updated(t){t.has("value")&&this._syncValue(this.value),(t.has("isOpen")||t.has("value"))&&this.setInitialWidth(),super.updated(t)}setInitialWidth(){this.inputContainer&&(this.calendarWidth=this.inputContainer.getBoundingClientRect().width)}updateResponsiveMode(){this.isMobile=window.innerWidth<=940,this.setInitialWidth()}handleInput(t){const e=t.target;this.inputValue=e.value,this._parseAndValidateDate(e.value,!0)}handleCalendarButtonClick(t){this.disabled||(t.stopPropagation(),this.isOpen=!this.isOpen,this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,this.requestUpdate())}handleClearDate(){this.inputValue=null,this.selectedDate=null,this.error=!1,this.errorMessage=null,this.closeOverlay(null)}handleDateSelect(t){const e=t.detail.date;if(!e)return;if(this._validateDate(e)){this.selectedDate=e,this.viewDate=e;const t=Ri(e,"dd-MM-yyyy");this.inputValue=t,this.closeOverlay(t)}else{const t=Ri(e,"dd-MM-yyyy");this.inputValue=t,this.selectedDate=null,this.closeOverlay(null)}}handleViewDateChange(t){this.viewDate=t.detail.date}closeOverlay(t){this.value=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:t}})),this.isOpen=!1}_syncValue(t){if(""===t||null===t)return void(this.error||(this.selectedDate=null,this.inputValue=null,this.errorMessage=null));const e=this._parseDate(t);e&&this._validateDate(e)?(this.selectedDate=e,this.viewDate=e,this.error=!1,this.errorMessage=null,this.value=Ri(e,"dd-MM-yyyy"),this.inputValue=this.value):this.selectedDate=e}_validateDate(t){if(!t)return!1;if(this.error=!1,this.errorMessage=null,this.eighteenOrOlder){const e=function(t,e,i){return ri(t,-18,i)}(new Date);if(qi(t,e))return this.error=!0,this.errorMessage="tenés que ser mayor de 18 años",!1}if(!this._isWithinBounds(t)){const t=this._getValidDateRange();return this.error=!0,this.errorMessage=`la fecha debe estar entre ${t?.minDate?Ri(t.minDate,"dd-MM-yyyy"):""} y ${t?.maxDate?Ri(t.maxDate,"dd-MM-yyyy"):""}.`,!1}return!0}_parseAndValidateDate(t,e){if(this.disabled)return;if(""===t||null===t)return this.selectedDate=null,this.error=!1,this.errorMessage=null,void(e&&this.closeOverlay(null));const i=this._parseDate(t);if(i){this._validateDate(i)?(this.selectedDate=i,this.viewDate=i,this.error=!1,this.errorMessage=null,e&&this.closeOverlay(Ri(i,"dd-MM-yyyy"))):(this.error=!0,this.selectedDate=null,e&&this.closeOverlay(null))}else this.error=!0,this.errorMessage=this.setMessageErrorFormatInvalid(),this.selectedDate=null,e&&this.closeOverlay(null)}_parseDate(t){const e=t.split("-").map(Number);if(3===e.length){const[i,r,o]=e;if(i&&r&&o&&r>=1&&r<=12&&o>1e3){const e=new Date(o,r-1,i,12);if(oi(e)&&Ri(e,"dd-MM-yyyy")===t)return e}}const i=t.split("-").map(Number);if(3===i.length){const[e,r,o]=i;if(e&&r&&o&&r>=1&&r<=12&&e>1e3){const i=new Date(e,r-1,o,12);if(oi(i)&&Ri(i,"yyyy-MM-dd")===t)return i}}return null}_parseDateString(t){if(!t)return null;const e=t.split("-").map(Number);if(3===e.length&&!isNaN(e[0])&&!isNaN(e[1])&&!isNaN(e[2])){return new Date(e[0],e[1]-1,e[2],12)}return null}_getValidDateRange(){const t=this._parseDateString(this.minDate),e=this._parseDateString(this.maxDate);return t||e?t&&e&&qi(t,e)?null:{minDate:t,maxDate:e}:{minDate:null,maxDate:null}}_isWithinBounds(t){const e=this._getValidDateRange();return!e||(!e.minDate||!Wi(t,e.minDate))&&(!e.maxDate||!qi(t,e.maxDate))}render(){const t=s({"input-wrapper":!0,active:this.isOpen,error:this.error,disabled:this.disabled}),r=`width: ${this.width||"100%"};`,o=this._getValidDateRange();return e`
|
|
3565
|
+
<div class="datepicker-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""} ${r}">
|
|
3406
3566
|
${this.renderLabelContainer()}
|
|
3407
3567
|
|
|
3408
3568
|
<div class="input-container">
|
|
3409
3569
|
<div class="${t}" style="width: 100%">
|
|
3410
3570
|
<input
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3571
|
+
type="text"
|
|
3572
|
+
class="date-input"
|
|
3573
|
+
.value="${this.inputValue??""}"
|
|
3574
|
+
placeholder="${this.placeholder}"
|
|
3575
|
+
?disabled=${this.disabled}
|
|
3576
|
+
@input=${this.handleInput}
|
|
3417
3577
|
/>
|
|
3418
3578
|
|
|
3419
3579
|
${this.isRenderClearButton&&this.selectedDate&&!this.disabled?e`
|
|
@@ -3439,28 +3599,28 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3439
3599
|
.selectedDate=${this.selectedDate}
|
|
3440
3600
|
.viewDate=${this.viewDate}
|
|
3441
3601
|
.calendarWidth=${this.calendarWidth}
|
|
3442
|
-
.minDate=${
|
|
3443
|
-
.maxDate=${
|
|
3602
|
+
.minDate=${o?.minDate}
|
|
3603
|
+
.maxDate=${o?.maxDate}
|
|
3444
3604
|
@close=${()=>this.isOpen=!1}
|
|
3445
3605
|
@view-date-change=${this.handleViewDateChange}
|
|
3446
3606
|
@date-selected=${this.handleDateSelect}
|
|
3447
3607
|
>
|
|
3448
3608
|
</calendar-overlay>
|
|
3449
3609
|
`:i}
|
|
3450
|
-
|
|
3610
|
+
|
|
3451
3611
|
${this.renderError()}
|
|
3452
3612
|
</div>
|
|
3453
3613
|
|
|
3454
3614
|
${this.renderHelper()}
|
|
3455
3615
|
</div>
|
|
3456
|
-
`}};
|
|
3616
|
+
`}};n([_({type:String}),a("design:type",String)],Qi.prototype,"width",void 0),n([_({type:Boolean}),a("design:type",Object)],Qi.prototype,"isRenderClearButton",void 0),n([_({type:String}),a("design:type",String)],Qi.prototype,"minDate",void 0),n([_({type:String}),a("design:type",String)],Qi.prototype,"maxDate",void 0),n([_({type:Boolean}),a("design:type",Object)],Qi.prototype,"eighteenOrOlder",void 0),n([T(),a("design:type",Object)],Qi.prototype,"isOpen",void 0),n([T(),a("design:type",Object)],Qi.prototype,"selectedDate",void 0),n([T(),a("design:type",Date)],Qi.prototype,"viewDate",void 0),n([T(),a("design:type",Object)],Qi.prototype,"isMobile",void 0),n([T(),a("design:type",Number)],Qi.prototype,"calendarWidth",void 0),n([T(),a("design:type",Object)],Qi.prototype,"inputValue",void 0),n([j(".input-container"),a("design:type",HTMLDivElement)],Qi.prototype,"inputContainer",void 0),Qi=n([l("datepicker-component")],Qi);let Ji=class extends Ne{constructor(){super(...arguments),this.maxFiles=1,this.acceptedFileTypes=[],this.maxFileSize=5242880,this.buttonText="Agregar archivo"}static{this.styles=r`
|
|
3457
3617
|
${X}
|
|
3458
|
-
${Q}
|
|
3459
3618
|
${K}
|
|
3460
|
-
${
|
|
3619
|
+
${G}
|
|
3620
|
+
${Be}
|
|
3461
3621
|
|
|
3462
3622
|
:host([width]) {
|
|
3463
|
-
width: var(--upload-file-width);
|
|
3623
|
+
width: var( --upload-file-width );
|
|
3464
3624
|
}
|
|
3465
3625
|
|
|
3466
3626
|
/* Contenedor principal para organizar los elementos */
|
|
@@ -3470,7 +3630,7 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3470
3630
|
gap: 8px;
|
|
3471
3631
|
}
|
|
3472
3632
|
|
|
3473
|
-
input[type="file"] {
|
|
3633
|
+
input[ type="file" ] {
|
|
3474
3634
|
display: none;
|
|
3475
3635
|
}
|
|
3476
3636
|
|
|
@@ -3491,14 +3651,14 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3491
3651
|
display: flex;
|
|
3492
3652
|
align-items: center;
|
|
3493
3653
|
gap: 8px;
|
|
3494
|
-
color: var(--secondary-color-80, #404767);
|
|
3654
|
+
color: var( --secondary-color-80, #404767 );
|
|
3495
3655
|
max-width: 100%;
|
|
3496
3656
|
}
|
|
3497
3657
|
|
|
3498
3658
|
.file-name {
|
|
3499
|
-
${
|
|
3659
|
+
${I};
|
|
3500
3660
|
text-align: right;
|
|
3501
|
-
color: var(--secondary-color-40);
|
|
3661
|
+
color: var( --secondary-color-40 );
|
|
3502
3662
|
vertical-align: middle;
|
|
3503
3663
|
leading-trim: NONE;
|
|
3504
3664
|
white-space: nowrap;
|
|
@@ -3508,37 +3668,31 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3508
3668
|
}
|
|
3509
3669
|
|
|
3510
3670
|
.remove-file-button {
|
|
3511
|
-
--primary-color: var(--ui-negative, #E00F0F);
|
|
3671
|
+
--primary-color: var( --ui-negative, #E00F0F );
|
|
3512
3672
|
}
|
|
3513
3673
|
|
|
3514
3674
|
.progress-bar {
|
|
3515
3675
|
width: 100%;
|
|
3516
3676
|
}
|
|
3517
|
-
`}
|
|
3677
|
+
`}getFileConfig(){return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:`formato de archivo no válido, se aceptan: ${this.getTextAcceptedFileTypes()}`,errorMessageSize:`el archivo es demasiado grande, el máximo es de ${this.getTextMaxFileSize()}MB`,typeError:"file"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,Ve)}getTextMaxFileSize(){return this.baseGetTextMaxFileSize(this.maxFileSize)}updated(t){super.updated(t),this.applyWidth()}applyWidth(){this.width&&this.style.setProperty("--upload-file-width",this.width)}onFileInputChange(t){this.baseOnFileInputChange(t,this.getFileConfig())}render(){const t=this.files.length>=this.maxFiles,r=this.disabled||t,o=e`
|
|
3678
|
+
<randstad-button
|
|
3679
|
+
.label=${this.buttonText}
|
|
3680
|
+
.variant=${"button-primary"}
|
|
3681
|
+
?disabled=${r}
|
|
3682
|
+
@click=${()=>this.fileInput?.click()}
|
|
3683
|
+
>
|
|
3684
|
+
</randstad-button>
|
|
3685
|
+
`;return e`
|
|
3518
3686
|
<div class="file-container" style="${this.labelColor?`--label-color: ${this.labelColor};`:""}">
|
|
3519
3687
|
${this.renderLabelContainer()}
|
|
3520
3688
|
|
|
3521
|
-
${this.
|
|
3522
|
-
<div class="progress-bar-container">
|
|
3523
|
-
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
3524
|
-
<div class="progress-bar-fill" style="width: ${this.progress}%;"></div>
|
|
3525
|
-
</div>
|
|
3526
|
-
</div>
|
|
3527
|
-
`:e`
|
|
3528
|
-
<randstad-button
|
|
3529
|
-
.label=${this.buttonText}
|
|
3530
|
-
.variant=${"button-primary"}
|
|
3531
|
-
?disabled=${o}
|
|
3532
|
-
@click=${()=>this.fileInput?.click()}
|
|
3533
|
-
>
|
|
3534
|
-
</randstad-button>
|
|
3535
|
-
`}
|
|
3689
|
+
${this.renderLoadingContainer(o)}
|
|
3536
3690
|
|
|
3537
3691
|
<input
|
|
3538
3692
|
type="file"
|
|
3539
3693
|
accept=${this.acceptedFileTypes.join(",")}
|
|
3540
3694
|
?multiple=${this.maxFiles>1}
|
|
3541
|
-
?disabled=${
|
|
3695
|
+
?disabled=${r}
|
|
3542
3696
|
@change="${this.onFileInputChange}"
|
|
3543
3697
|
/>
|
|
3544
3698
|
|
|
@@ -3550,22 +3704,76 @@ const Yt=o`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3550
3704
|
<div class="file-list-container">
|
|
3551
3705
|
<div class="file-list">
|
|
3552
3706
|
${this.files.map(((t,i)=>e`
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3707
|
+
<div class="file-item">
|
|
3708
|
+
<span class="file-name">${t.name}</span>
|
|
3709
|
+
|
|
3710
|
+
<randstad-button
|
|
3711
|
+
class="remove-file-button"
|
|
3712
|
+
.variant=${"button-icon"}
|
|
3713
|
+
.iconName=${"trash"}
|
|
3714
|
+
@click=${()=>this.removeFile(i,"file")}
|
|
3715
|
+
?disabled=${this.disabled}
|
|
3716
|
+
>
|
|
3717
|
+
</randstad-button>
|
|
3718
|
+
</div>
|
|
3719
|
+
`))}
|
|
3566
3720
|
</div>
|
|
3567
3721
|
</div>
|
|
3568
3722
|
`:i}
|
|
3569
3723
|
</div>
|
|
3570
|
-
`}};
|
|
3724
|
+
`}};n([_({type:String}),a("design:type",String)],Ji.prototype,"width",void 0),n([_({type:Number}),a("design:type",Object)],Ji.prototype,"maxFiles",void 0),n([_({type:Array}),a("design:type",Array)],Ji.prototype,"acceptedFileTypes",void 0),n([_({type:Number}),a("design:type",Object)],Ji.prototype,"maxFileSize",void 0),n([_({type:String}),a("design:type",Object)],Ji.prototype,"buttonText",void 0),Ji=n([l("upload-file")],Ji);let Zi=class extends t{constructor(){super(...arguments),this.cards=[],this.isDown=!1,this.isDragging=!1,this.prevX=0}static{this.styles=r`
|
|
3725
|
+
:host {
|
|
3726
|
+
display: block;
|
|
3727
|
+
width: 100%;
|
|
3728
|
+
overflow: hidden;
|
|
3729
|
+
user-select: none;
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
.carousel-wrapper {
|
|
3733
|
+
display: flex;
|
|
3734
|
+
gap: 24px;
|
|
3735
|
+
overflow-x: auto;
|
|
3736
|
+
-webkit-overflow-scrolling: touch;
|
|
3737
|
+
padding: 0 16px;
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3740
|
+
.carousel-wrapper:hover {
|
|
3741
|
+
cursor: grab;
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
.carousel-wrapper.active {
|
|
3745
|
+
cursor: grabbing;
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
.carousel-wrapper::-webkit-scrollbar {
|
|
3749
|
+
display: none;
|
|
3750
|
+
}
|
|
3751
|
+
|
|
3752
|
+
.carousel-card-item {
|
|
3753
|
+
flex-shrink: 0;
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
@media ( min-width: 941px ) {
|
|
3757
|
+
.carousel-wrapper {
|
|
3758
|
+
gap: 40px;
|
|
3759
|
+
}
|
|
3760
|
+
}
|
|
3761
|
+
`}disconnectedCallback(){super.disconnectedCallback(),this.baseAddListeners()}get slider(){return this.shadowRoot.querySelector(".carousel-wrapper")}handleMouseDown(t){this.slider&&0===t.button&&(this.isDown=!0,this.isDragging=!1,this.slider.classList.add("active"),this.prevX=t.pageX)}handleMouseLeave(){this.slider&&(this.isDown=!1,this.isDragging=!1,this.slider.classList.remove("active"))}handleMouseUp(){if(this.slider){if(this.isDown=!1,this.slider.classList.remove("active"),this.isDragging){const t=this.slider.querySelector(".carousel-card-item").getBoundingClientRect().width+24,e=this.slider.scrollLeft,i=Math.round(e/t)*t;this.slider.scrollTo({left:i,behavior:"smooth"})}this.isDragging=!1}}handleMouseMove(t){if(t.preventDefault(),!this.isDown||!this.slider)return;this.isDragging=!0;const e=t.pageX-this.prevX;this.slider.scrollLeft-=1.5*e,this.prevX=t.pageX}firstUpdated(){const t=this.slider;t&&(t.addEventListener("mousedown",this.handleMouseDown.bind(this)),t.addEventListener("mouseleave",this.handleMouseLeave.bind(this)),t.addEventListener("mouseup",this.handleMouseUp.bind(this)),t.addEventListener("mousemove",this.handleMouseMove.bind(this)),t.addEventListener("dragstart",(t=>t.preventDefault())))}baseAddListeners(){const t=this.slider;t&&(t.addEventListener("mousedown",this.handleMouseDown.bind(this)),t.addEventListener("mouseleave",this.handleMouseLeave.bind(this)),t.addEventListener("mouseup",this.handleMouseUp.bind(this)),t.addEventListener("mousemove",this.handleMouseMove.bind(this)),t.addEventListener("dragstart",(t=>t.preventDefault())))}render(){return e`
|
|
3762
|
+
<div class="carousel-wrapper">
|
|
3763
|
+
${this.cards.map((t=>e`
|
|
3764
|
+
<div class="carousel-card-item">
|
|
3765
|
+
<carousel-card
|
|
3766
|
+
img=${t.img}
|
|
3767
|
+
name=${t.name}
|
|
3768
|
+
title=${t.title}
|
|
3769
|
+
description=${t.description}
|
|
3770
|
+
buttonLabel=${t.buttonLabel}
|
|
3771
|
+
cardId=${t.cardId}
|
|
3772
|
+
.onClick=${t.onClick}
|
|
3773
|
+
>
|
|
3774
|
+
</carousel-card>
|
|
3775
|
+
</div>
|
|
3776
|
+
`))}
|
|
3777
|
+
</div>
|
|
3778
|
+
`}};n([_({type:Array}),a("design:type",Array)],Zi.prototype,"cards",void 0),Zi=n([l("carousel-component")],Zi);export{H as AccordionList,U as AccordionPanel,P as BaseControl,Ki as CalendarOverlay,Zi as Carousel,W as CarouselCard,Y as Checkbox,Vt as CustomModal,Ut as CustomPopup,Te as CustomRadio,ze as CustomStepper,Qi as DatePickerComponent,je as FilterableSelect,Z as FormGroup,Bt as IconComponent,Ht as ProgressCircle,q as RandstadButton,J as RandstadForm,Rt as RandstadNotice,Ie as TabsBar,Ji as UploadFile,Ue as UploadImage,Q as scrollbarStyles};
|
|
3571
3779
|
//# sourceMappingURL=index.js.map
|