@randstad-uca/design-system 1.0.61 → 1.0.63
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/icons/arrow_next.svg +3 -0
- package/dist/assets/icons/arrow_prev.svg +3 -0
- package/dist/components/Carousel.d.ts +63 -10
- package/dist/components/CarouselCards.d.ts +2 -0
- package/dist/components/Icon.d.ts +3 -3
- package/dist/index.js +463 -223
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/stories/Carousel.stories.d.ts +6 -2
- package/dist/stories/CarouselCards.stories.d.ts +1 -0
- package/dist/stories/Upload.stories.d.ts +16 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 o,isServer as r}from"lit";import{classMap as s}from"lit/directives/class-map.js";function a(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a}function n(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
|
|
@@ -9,23 +9,23 @@ const l=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)}
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/let u=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==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
|
|
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 g=(t,e)=>{if(c)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=d.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}},m=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:b,defineProperty:y,getOwnPropertyDescriptor:v,getOwnPropertyNames:f,getOwnPropertySymbols:x,getPrototypeOf:w}=Object,k=globalThis,$=k.trustedTypes,S=$?$.emptyScript:"",C=k.reactiveElementPolyfillSupport,D=(t,e)=>t,E={toAttribute(t,e){switch(e){case Boolean:t=t?S:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},M=(t,e)=>!b(t,e),O={attribute:!0,type:String,converter:E,reflect:!1,useDefault:!1,hasChanged:M};
|
|
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"),k.litPropertyMetadata??=new WeakMap;class F 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=O){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&y(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=v(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=o?.call(this);r?.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??O}static _$Ei(){if(this.hasOwnProperty(D("elementProperties")))return;const t=w(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(D("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(D("properties"))){const t=this.properties,e=[...f(t),...x(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(m(t))}else void 0!==t&&e.push(m(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 g(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:E).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:E;this._$Em=o,this[o]=r.fromAttribute(e,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const o=this.constructor,r=this[t];if(i??=o.getPropertyOptions(t),!((i.hasChanged??M)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:r},s){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==r||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[D("elementProperties")]=new Map,F[D("finalized")]=new Map,C?.({ReactiveElement:F}),(k.reactiveElementVersions??=[]).push("2.1.0");
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const P={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:M},T=(t=P,e,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function L(t){return(e,i)=>"object"==typeof i?T(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/function
|
|
28
|
+
*/function B(t){return L({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,7 +36,7 @@ const O={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:D},F=(t=O,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function j(t,e){return(e,i,
|
|
39
|
+
function j(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let A=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 j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
79
79
|
${this.helper}
|
|
80
80
|
</p>
|
|
81
81
|
`:i}
|
|
82
|
-
`}};
|
|
82
|
+
`}};a([L({type:String}),n("design:type",Object)],A.prototype,"label",void 0),a([L({type:String}),n("design:type",Object)],A.prototype,"placeholder",void 0),a([L({type:String}),n("design:type",Object)],A.prototype,"labelColor",void 0),a([L(),n("design:type",Object)],A.prototype,"value",void 0),a([L({type:Boolean}),n("design:type",Object)],A.prototype,"required",void 0),a([L({type:Boolean}),n("design:type",Object)],A.prototype,"optional",void 0),a([L({type:Boolean}),n("design:type",Object)],A.prototype,"disabled",void 0),a([L({type:Boolean,reflect:!0}),n("design:type",Object)],A.prototype,"error",void 0),a([L({type:String}),n("design:type",Object)],A.prototype,"errorMessage",void 0),a([L({type:String}),n("design:type",Object)],A.prototype,"helper",void 0),a([L({type:String}),n("design:type",String)],A.prototype,"helperAlign",void 0),a([L({type:String}),n("design:type",String)],A.prototype,"help",void 0),a([L({type:String}),n("design:type",String)],A.prototype,"helpLink",void 0),a([L({type:String}),n("design:type",String)],A.prototype,"helpLinkTooltipMessage",void 0),A=a([l("base-control")],A);const z=o`
|
|
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
|
+
`,W=o`
|
|
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
|
-
`,I=
|
|
94
|
+
`,I=o`
|
|
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=o`
|
|
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
|
+
`,_=o`
|
|
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
|
-
`,R=
|
|
113
|
+
`,R=o`
|
|
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
|
-
`,V=
|
|
120
|
+
`,V=o`
|
|
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 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=
|
|
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=o`
|
|
128
128
|
:host {
|
|
129
129
|
display: flex;
|
|
130
130
|
flex-direction: column;
|
|
@@ -215,13 +215,13 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
215
215
|
<div class="content ${this.isOpen?"open":""}">
|
|
216
216
|
<slot></slot>
|
|
217
217
|
</div>
|
|
218
|
-
`}};
|
|
218
|
+
`}};a([L({type:String}),n("design:type",Object)],U.prototype,"title",void 0),a([B(),n("design:type",Object)],U.prototype,"isOpen",void 0),a([B(),n("design:type",Object)],U.prototype,"isDesktop",void 0),U=a([l("accordion-panel")],U);let q=class extends t{static{this.styles=o`
|
|
219
219
|
:host {
|
|
220
220
|
display: flex;
|
|
221
221
|
flex-direction: column;
|
|
222
222
|
gap: 16px;
|
|
223
223
|
}
|
|
224
|
-
`}render(){return e`<slot></slot>`}};
|
|
224
|
+
`}render(){return e`<slot></slot>`}};q=a([l("accordion-list")],q);let Y=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=o`
|
|
225
225
|
:host {
|
|
226
226
|
display: inline-block;
|
|
227
227
|
--content-padding: 16px;
|
|
@@ -547,7 +547,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
547
547
|
</div>
|
|
548
548
|
`}
|
|
549
549
|
</button>
|
|
550
|
-
`}};
|
|
550
|
+
`}};a([L({type:String}),n("design:type",String)],Y.prototype,"type",void 0),a([L({type:String}),n("design:type",String)],Y.prototype,"variant",void 0),a([L({type:String}),n("design:type",String)],Y.prototype,"size",void 0),a([L({type:String}),n("design:type",Object)],Y.prototype,"label",void 0),a([L({type:Boolean}),n("design:type",Object)],Y.prototype,"loader",void 0),a([L({type:String,attribute:"icon-src"}),n("design:type",String)],Y.prototype,"iconSrc",void 0),a([L({type:String}),n("design:type",String)],Y.prototype,"iconPosition",void 0),a([L({type:String}),n("design:type",Object)],Y.prototype,"iconName",void 0),a([L({type:Boolean,reflect:!0}),n("design:type",Boolean)],Y.prototype,"disabled",void 0),a([L({type:String}),n("design:type",Object)],Y.prototype,"idevent",void 0),Y=a([l("randstad-button")],Y);let H=class extends t{constructor(){super(...arguments),this.img="",this.name="",this.title="",this.description="",this.buttonLabel="",this.cardId="",this.width="",this.height=""}static{this.styles=o`
|
|
551
551
|
:host {
|
|
552
552
|
display: inline-block;
|
|
553
553
|
font-family: "Graphik", sans-serif;
|
|
@@ -556,8 +556,6 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
556
556
|
}
|
|
557
557
|
|
|
558
558
|
.image-container {
|
|
559
|
-
width: 280px;
|
|
560
|
-
height: 390px;
|
|
561
559
|
position: relative;
|
|
562
560
|
border-radius: 8px;
|
|
563
561
|
overflow: hidden;
|
|
@@ -635,7 +633,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
635
633
|
}
|
|
636
634
|
|
|
637
635
|
.description {
|
|
638
|
-
${
|
|
636
|
+
${W}
|
|
639
637
|
margin: 0;
|
|
640
638
|
}
|
|
641
639
|
|
|
@@ -648,14 +646,14 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
648
646
|
}
|
|
649
647
|
|
|
650
648
|
::part(button):hover {
|
|
651
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
649
|
+
background-color: rgba( 255, 255, 255, 0.1 );
|
|
652
650
|
}
|
|
653
651
|
|
|
654
652
|
::part(button):active {
|
|
655
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
653
|
+
background-color: rgba( 255, 255, 255, 0.2 );
|
|
656
654
|
}
|
|
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="
|
|
655
|
+
`}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(){const t=` background-image: url( ${this.img} ); `,i=`${this.width?`width: ${this.width};`:""} height: ${this.height??"390px"};`;return e`
|
|
656
|
+
<div class="image-container" style="${`${i} ${t}`};">
|
|
659
657
|
<div class="overlay-gradient"></div>
|
|
660
658
|
|
|
661
659
|
<div class="overlay-hover"></div>
|
|
@@ -686,14 +684,14 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
686
684
|
</div>
|
|
687
685
|
</div>
|
|
688
686
|
</div>
|
|
689
|
-
`}};
|
|
687
|
+
`}};a([L({type:String}),n("design:type",Object)],H.prototype,"img",void 0),a([L({type:String}),n("design:type",Object)],H.prototype,"name",void 0),a([L({type:String}),n("design:type",Object)],H.prototype,"title",void 0),a([L({type:String}),n("design:type",Object)],H.prototype,"description",void 0),a([L({type:String}),n("design:type",Object)],H.prototype,"buttonLabel",void 0),a([L({type:String}),n("design:type",Object)],H.prototype,"cardId",void 0),a([L({type:Object}),n("design:type",Object)],H.prototype,"onClick",void 0),a([L({type:String}),n("design:type",String)],H.prototype,"width",void 0),a([L({type:String}),n("design:type",String)],H.prototype,"height",void 0),H=a([l("carousel-card")],H);let G=class extends t{constructor(){super(...arguments),this.checked=!1,this.error=!1,this.disabled=!1}static{this.styles=o`
|
|
690
688
|
:host {
|
|
691
689
|
display: block;
|
|
692
690
|
max-width: 100%;
|
|
693
691
|
}
|
|
694
692
|
|
|
695
693
|
label {
|
|
696
|
-
${
|
|
694
|
+
${W}
|
|
697
695
|
display: flex;
|
|
698
696
|
align-items: center;
|
|
699
697
|
gap: 8px;
|
|
@@ -805,7 +803,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
805
803
|
<slot></slot>
|
|
806
804
|
</span>
|
|
807
805
|
</label>
|
|
808
|
-
`}};
|
|
806
|
+
`}};a([L({type:Boolean,reflect:!0}),n("design:type",Object)],G.prototype,"checked",void 0),a([L({type:Boolean}),n("design:type",Object)],G.prototype,"error",void 0),a([L({type:Boolean}),n("design:type",Object)],G.prototype,"disabled",void 0),G=a([l("randstad-checkbox")],G);const X=o`
|
|
809
807
|
.label-container {
|
|
810
808
|
display: flex;
|
|
811
809
|
align-items: center;
|
|
@@ -858,7 +856,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
858
856
|
visibility: visible;
|
|
859
857
|
opacity: 1;
|
|
860
858
|
}
|
|
861
|
-
`,
|
|
859
|
+
`,K=o`
|
|
862
860
|
:host {
|
|
863
861
|
display: block;
|
|
864
862
|
font-family: "Graphik", sans-serif;
|
|
@@ -898,13 +896,13 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
898
896
|
|
|
899
897
|
.optional {
|
|
900
898
|
color: var( --secondary-color-60 );
|
|
901
|
-
${
|
|
899
|
+
${z}
|
|
902
900
|
}
|
|
903
901
|
|
|
904
902
|
randstad-icon {
|
|
905
903
|
color: var( --primary-color );
|
|
906
904
|
}
|
|
907
|
-
`,
|
|
905
|
+
`,Q=o`
|
|
908
906
|
:host([error]) .input-wrapper, .form.error .form-input {
|
|
909
907
|
border: 1px solid var( --ui-negative, red ) !important;
|
|
910
908
|
}
|
|
@@ -923,7 +921,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
923
921
|
color: var(--ui-negative, #E00F0F);
|
|
924
922
|
margin-top: 4px;
|
|
925
923
|
}
|
|
926
|
-
`,
|
|
924
|
+
`,J=new CSSStyleSheet;J.replaceSync(o`
|
|
927
925
|
::-webkit-scrollbar {
|
|
928
926
|
width: 8px;
|
|
929
927
|
height: 8px;
|
|
@@ -941,10 +939,10 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
941
939
|
::-webkit-scrollbar-button {
|
|
942
940
|
display: none;
|
|
943
941
|
}
|
|
944
|
-
`.cssText);let
|
|
945
|
-
${X}
|
|
942
|
+
`.cssText);let Z=class extends A{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=[J,o`
|
|
946
943
|
${K}
|
|
947
|
-
${
|
|
944
|
+
${Q}
|
|
945
|
+
${X}
|
|
948
946
|
|
|
949
947
|
.form {
|
|
950
948
|
display: flex;
|
|
@@ -1081,9 +1079,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1081
1079
|
height: 24px;
|
|
1082
1080
|
color: var( --primary-color );
|
|
1083
1081
|
}
|
|
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,
|
|
1085
|
-
${this.labelColor?`--label-color: ${this.labelColor};`:""}
|
|
1086
|
-
`,s=e`
|
|
1082
|
+
`]}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,o="textarea"===this.type?`height: ${this.heightTextArea??"30px"}; max-height: ${this.maxHeightTextArea??"30px"}; overflow-y: auto;`:"",r=this.labelColor?`--label-color: ${this.labelColor};`:"",s=e`
|
|
1087
1083
|
<randstad-icon
|
|
1088
1084
|
name="${this.isPasswordVisible?"eye_crossed":"eye"}"
|
|
1089
1085
|
size="24px"
|
|
@@ -1092,7 +1088,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1092
1088
|
`;return e`
|
|
1093
1089
|
<div
|
|
1094
1090
|
class="form ${this.error?"error":""} ${this.disabled?"disabled":""}"
|
|
1095
|
-
style="${
|
|
1091
|
+
style="${r}"
|
|
1096
1092
|
>
|
|
1097
1093
|
${this.renderLabelContainer()}
|
|
1098
1094
|
|
|
@@ -1109,7 +1105,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1109
1105
|
@input=${this.handleInput}
|
|
1110
1106
|
@keydown=${this.handleKeyDown}
|
|
1111
1107
|
maxlength=${this.maxLength??i}
|
|
1112
|
-
style="${
|
|
1108
|
+
style="${o}"
|
|
1113
1109
|
>
|
|
1114
1110
|
</textarea>
|
|
1115
1111
|
`:e`
|
|
@@ -1165,10 +1161,10 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1165
1161
|
|
|
1166
1162
|
${this.renderHelper()}
|
|
1167
1163
|
</div>
|
|
1168
|
-
`}};
|
|
1169
|
-
${X}
|
|
1164
|
+
`}};a([L({type:String}),n("design:type",Object)],Z.prototype,"keydown",void 0),a([L({type:String}),n("design:type",String)],Z.prototype,"size",void 0),a([L({type:String}),n("design:type",Object)],Z.prototype,"icon",void 0),a([L({type:Boolean}),n("design:type",Boolean)],Z.prototype,"typing",void 0),a([L({type:String}),n("design:type",String)],Z.prototype,"type",void 0),a([L({type:String}),n("design:type",String)],Z.prototype,"linkText",void 0),a([L({type:String}),n("design:type",String)],Z.prototype,"linkRoute",void 0),a([L({type:Boolean,reflect:!0}),n("design:type",Object)],Z.prototype,"isPasswordVisible",void 0),a([L({type:Boolean}),n("design:type",Boolean)],Z.prototype,"cleanButton",void 0),a([L({type:Number}),n("design:type",Number)],Z.prototype,"maxLength",void 0),a([L({type:String}),n("design:type",String)],Z.prototype,"heightTextArea",void 0),a([L({type:String}),n("design:type",String)],Z.prototype,"maxHeightTextArea",void 0),Z=a([l("randstad-form")],Z);let tt=class extends A{constructor(){super(...arguments),this.rows=""}static{this.styles=o`
|
|
1170
1165
|
${K}
|
|
1171
|
-
${
|
|
1166
|
+
${Q}
|
|
1167
|
+
${X}
|
|
1172
1168
|
|
|
1173
1169
|
:host {
|
|
1174
1170
|
display: flex;
|
|
@@ -1200,30 +1196,7 @@ function j(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1200
1196
|
|
|
1201
1197
|
${this.renderHelper()}
|
|
1202
1198
|
</div>
|
|
1203
|
-
`}};
|
|
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`
|
|
1199
|
+
`}};a([L({type:String}),n("design:type",String)],tt.prototype,"rows",void 0),tt=a([l("randstad-form-group")],tt);class et extends t{constructor(){super(...arguments),this.name="",this.size="24px",this.color="",this.svgTemplate=null}static{this.styles=o`
|
|
1227
1200
|
:host {
|
|
1228
1201
|
display: inline-flex;
|
|
1229
1202
|
width: var( --icon-size, 24px );
|
|
@@ -1245,11 +1218,11 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1245
1218
|
width: 100%;
|
|
1246
1219
|
height: 100%;
|
|
1247
1220
|
}
|
|
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
|
|
1221
|
+
`}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 i=await t.text();i=i.replace(/fill="[^"]*"/g,""),i=i.replace(/fill='[^']*'/g,"");const o=new DOMParser,r=o.parseFromString(i,"image/svg+xml").documentElement;this.svgTemplate=e` ${r} `}catch(t){console.error(`❌ Error cargando icono ${this.name}:`,t),this.innerHTML=" <span>⚠️</span> "}}render(){return this.svgTemplate?e`
|
|
1249
1222
|
<div class="custom-icon" style="color: ${this.color};">
|
|
1250
|
-
${
|
|
1223
|
+
${this.svgTemplate}
|
|
1251
1224
|
</div>
|
|
1252
|
-
`:e``}}
|
|
1225
|
+
`:e``}}a([L({type:String}),n("design:type",Object)],et.prototype,"name",void 0),a([L({type:String}),n("design:type",Object)],et.prototype,"size",void 0),a([L({type:String}),n("design:type",Object)],et.prototype,"color",void 0),a([B(),n("design:type",Object)],et.prototype,"svgTemplate",void 0),customElements.define("randstad-icon",et);let it=class extends t{constructor(){super(...arguments),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1}static{this.styles=o`
|
|
1253
1226
|
:host {
|
|
1254
1227
|
display: block;
|
|
1255
1228
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1306,7 +1279,7 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1306
1279
|
|
|
1307
1280
|
<span class="message">${this.message}</span>
|
|
1308
1281
|
</div>
|
|
1309
|
-
`}};
|
|
1282
|
+
`}};a([L({type:String}),n("design:type",String)],it.prototype,"type",void 0),a([L({type:String}),n("design:type",String)],it.prototype,"icon",void 0),a([L({type:String}),n("design:type",String)],it.prototype,"message",void 0),a([L({type:Boolean}),n("design:type",Boolean)],it.prototype,"open",void 0),it=a([l("randstad-notice")],it);let ot=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=[J,o`
|
|
1310
1283
|
:host {
|
|
1311
1284
|
font-family: 'Graphik', sans-serif;
|
|
1312
1285
|
display: none;
|
|
@@ -1505,7 +1478,7 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1505
1478
|
</div>
|
|
1506
1479
|
</div>
|
|
1507
1480
|
</div>
|
|
1508
|
-
`}};
|
|
1481
|
+
`}};a([L({type:Boolean,reflect:!0}),n("design:type",Object)],ot.prototype,"open",void 0),a([L({type:String}),n("design:type",Object)],ot.prototype,"title",void 0),a([L({type:String}),n("design:type",String)],ot.prototype,"subtitle",void 0),a([L({type:Boolean}),n("design:type",Object)],ot.prototype,"showNotice",void 0),a([L({type:String}),n("design:type",String)],ot.prototype,"noticeType",void 0),a([L({type:String}),n("design:type",Object)],ot.prototype,"noticeMessage",void 0),a([L({type:String}),n("design:type",Object)],ot.prototype,"noticeIcon",void 0),a([L({type:Boolean}),n("design:type",Object)],ot.prototype,"showPrimaryButton",void 0),a([L({type:String}),n("design:type",Object)],ot.prototype,"primaryButtonLabel",void 0),a([L({type:Boolean}),n("design:type",Object)],ot.prototype,"showSecondaryButton",void 0),a([L({type:String}),n("design:type",Object)],ot.prototype,"secondaryButtonLabel",void 0),a([L({type:Boolean}),n("design:type",Object)],ot.prototype,"isFooterCustom",void 0),a([L({type:Boolean}),n("design:type",Object)],ot.prototype,"isPrimaryLoader",void 0),a([L({type:Boolean}),n("design:type",Object)],ot.prototype,"isPrimaryDisabled",void 0),a([L({type:String}),n("design:type",Object)],ot.prototype,"modalWidth",void 0),a([B(),n("design:type",Object)],ot.prototype,"scrollable",void 0),ot=a([l("custom-modal")],ot);let rt=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=o`
|
|
1509
1482
|
:host {
|
|
1510
1483
|
display: none;
|
|
1511
1484
|
position: fixed;
|
|
@@ -1601,7 +1574,7 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1601
1574
|
}
|
|
1602
1575
|
|
|
1603
1576
|
.action-item {
|
|
1604
|
-
${
|
|
1577
|
+
${_};
|
|
1605
1578
|
display: flex;
|
|
1606
1579
|
align-items: center;
|
|
1607
1580
|
gap: 16px;
|
|
@@ -1697,7 +1670,7 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1697
1670
|
`}
|
|
1698
1671
|
</div>
|
|
1699
1672
|
</div>
|
|
1700
|
-
`}};
|
|
1673
|
+
`}};a([L({type:Boolean,reflect:!0}),n("design:type",Object)],rt.prototype,"open",void 0),a([L({type:String}),n("design:type",String)],rt.prototype,"type",void 0),a([L({type:String}),n("design:type",Object)],rt.prototype,"icon",void 0),a([L({type:String}),n("design:type",Object)],rt.prototype,"title",void 0),a([L({type:String}),n("design:type",Object)],rt.prototype,"description",void 0),a([L({type:String}),n("design:type",Object)],rt.prototype,"width",void 0),a([L({type:String}),n("design:type",Object)],rt.prototype,"buttonText",void 0),a([L({type:String}),n("design:type",Object)],rt.prototype,"confirmText",void 0),a([L({type:String}),n("design:type",Object)],rt.prototype,"cancelText",void 0),a([L({type:Array}),n("design:type",Array)],rt.prototype,"stackedActions",void 0),rt=a([l("custom-popup")],rt);let st=class extends t{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=o`
|
|
1701
1674
|
:host {
|
|
1702
1675
|
display: inline-block;
|
|
1703
1676
|
width: 64px;
|
|
@@ -1710,7 +1683,7 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1710
1683
|
}
|
|
1711
1684
|
|
|
1712
1685
|
.circle-text {
|
|
1713
|
-
${
|
|
1686
|
+
${z};
|
|
1714
1687
|
text-align: center;
|
|
1715
1688
|
vertical-align: middle;
|
|
1716
1689
|
fill: var(--randstad-dark-blue-40);
|
|
@@ -1726,7 +1699,7 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1726
1699
|
stroke: var(--primary-light-blue);
|
|
1727
1700
|
stroke-linecap: round;
|
|
1728
1701
|
}
|
|
1729
|
-
`}render(){const t=2*Math.PI*28,i=Math.max(this.max,1),
|
|
1702
|
+
`}render(){const t=2*Math.PI*28,i=Math.max(this.max,1),o=t*(1-Math.min(this.value/i,1));return e`
|
|
1730
1703
|
<svg
|
|
1731
1704
|
viewBox="0 0 64 64"
|
|
1732
1705
|
role="img"
|
|
@@ -1750,7 +1723,7 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1750
1723
|
stroke-width="${6}"
|
|
1751
1724
|
fill="none"
|
|
1752
1725
|
stroke-dasharray="${t}"
|
|
1753
|
-
stroke-dashoffset="${
|
|
1726
|
+
stroke-dashoffset="${o}"
|
|
1754
1727
|
transform="rotate(-90 32 32)"
|
|
1755
1728
|
/>
|
|
1756
1729
|
<!-- Texto -->
|
|
@@ -1758,18 +1731,18 @@ class It extends zt{}It.directiveName="unsafeSVG",It.resultType=2;const Nt=(t=>(
|
|
|
1758
1731
|
${this.value} de ${this.max}
|
|
1759
1732
|
</text>
|
|
1760
1733
|
</svg>
|
|
1761
|
-
`}};
|
|
1734
|
+
`}};a([L({type:Number}),n("design:type",Object)],st.prototype,"value",void 0),a([L({type:Number}),n("design:type",Object)],st.prototype,"max",void 0),st=a([l("progress-circle")],st);
|
|
1762
1735
|
/**
|
|
1763
1736
|
* @license
|
|
1764
1737
|
* Copyright 2023 Google LLC
|
|
1765
1738
|
* SPDX-License-Identifier: Apache-2.0
|
|
1766
1739
|
*/
|
|
1767
|
-
const
|
|
1740
|
+
const at=Symbol("attachableController");let nt;r||(nt=new MutationObserver((t=>{for(const e of t)e.target[at]?.hostConnected()})));class lt{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[at]=this,nt?.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}}
|
|
1768
1741
|
/**
|
|
1769
1742
|
* @license
|
|
1770
1743
|
* Copyright 2021 Google LLC
|
|
1771
1744
|
* SPDX-License-Identifier: Apache-2.0
|
|
1772
|
-
*/const
|
|
1745
|
+
*/const dt=["focusin","focusout","pointerdown"];class ct extends t{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new lt(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[ht]){switch(t.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[ht]=!0}}onControlChange(t,e){if(!r)for(const i of dt)t?.removeEventListener(i,this),e?.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}a([L({type:Boolean,reflect:!0})],ct.prototype,"visible",void 0),a([L({type:Boolean,reflect:!0})],ct.prototype,"inward",void 0);const ht=Symbol("handledByFocusRing"),pt=o`: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}}
|
|
1773
1746
|
`
|
|
1774
1747
|
/**
|
|
1775
1748
|
* @license
|
|
@@ -1780,80 +1753,80 @@ const qt=Symbol("attachableController");let Wt;o||(Wt=new MutationObserver((t=>{
|
|
|
1780
1753
|
* @license
|
|
1781
1754
|
* Copyright 2024 Google LLC
|
|
1782
1755
|
* SPDX-License-Identifier: Apache-2.0
|
|
1783
|
-
*/let
|
|
1756
|
+
*/let ut=class extends ct{};ut.styles=[pt],ut=a([l("md-focus-ring")],ut);
|
|
1784
1757
|
/**
|
|
1785
1758
|
* @license
|
|
1786
1759
|
* Copyright 2021 Google LLC
|
|
1787
1760
|
* SPDX-License-Identifier: Apache-2.0
|
|
1788
1761
|
*/
|
|
1789
|
-
const
|
|
1762
|
+
const gt="cubic-bezier(0.2, 0, 0, 1)";
|
|
1790
1763
|
/**
|
|
1791
1764
|
* @license
|
|
1792
1765
|
* Copyright 2022 Google LLC
|
|
1793
1766
|
* SPDX-License-Identifier: Apache-2.0
|
|
1794
|
-
*/var
|
|
1767
|
+
*/var mt;!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"}(mt||(mt={}));const bt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],yt=r?null:window.matchMedia("(forced-colors: active)");class vt extends t{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=mt.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new lt(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!==mt.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==mt.HOLDING)return this.state===mt.TOUCH_DELAY?(this.state=mt.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=mt.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=mt.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=mt.TOUCH_DELAY,await new Promise((t=>{setTimeout(t,150)})),this.state===mt.TOUCH_DELAY&&(this.state=mt.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==mt.WAITING_FOR_CLICK?this.state===mt.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:e}=this.getBoundingClientRect(),i=Math.max(t,e),o=Math.max(.35*i,75),r=Math.floor(.2*i),s=Math.sqrt(e**2+t**2)+10;this.initialSize=r,this.rippleScale=""+(s+o)/r,this.rippleSize=`${r}px`}getNormalizedPointerEventCoords(t){const{scrollX:e,scrollY:i}=window,{left:o,top:r}=this.getBoundingClientRect(),s=e+o,a=i+r,{pageX:n,pageY:l}=t;return{x:n-s,y:l-a}}getTranslationCoordinates(t){const{height:e,width:i}=this.getBoundingClientRect(),o={x:(i-this.initialSize)/2,y:(e-this.initialSize)/2};let r;return r=t instanceof PointerEvent?this.getNormalizedPointerEventCoords(t):{x:i/2,y:e/2},r={x:r.x-this.initialSize/2,y:r.y-this.initialSize/2},{startPoint:r,endPoint:o}}startPressAnimation(t){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:e,endPoint:i}=this.getTranslationCoordinates(t),o=`${e.x}px, ${e.y}px`,r=`${i.x}px, ${i.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${o}) scale(1)`,`translate(${r}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:gt,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=mt.INACTIVE;const t=this.growAnimation;let e=1/0;"number"==typeof t?.currentTime?e=t.currentTime:t?.currentTime&&(e=t.currentTime.to("ms").value),e>=225?this.pressed=!1:(await new Promise((t=>{setTimeout(t,225-e)})),this.growAnimation===t&&(this.pressed=!1))}shouldReactToEvent(t){if(this.disabled||!t.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if("pointerenter"===t.type||"pointerleave"===t.type)return!this.isTouch(t);const e=1===t.buttons;return this.isTouch(t)||e}inBounds({x:t,y:e}){const{top:i,left:o,bottom:r,right:s}=this.getBoundingClientRect();return t>=o&&t<=s&&e>=i&&e<=r}isTouch({pointerType:t}){return"touch"===t}async handleEvent(t){if(!yt?.matches)switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t)}}onControlChange(t,e){if(!r)for(const i of bt)t?.removeEventListener(i,this),e?.addEventListener(i,this)}}a([L({type:Boolean,reflect:!0})],vt.prototype,"disabled",void 0),a([B()],vt.prototype,"hovered",void 0),a([B()],vt.prototype,"pressed",void 0),a([j(".surface")],vt.prototype,"mdRoot",void 0);
|
|
1795
1768
|
/**
|
|
1796
1769
|
* @license
|
|
1797
1770
|
* Copyright 2024 Google LLC
|
|
1798
1771
|
* SPDX-License-Identifier: Apache-2.0
|
|
1799
1772
|
*/
|
|
1800
|
-
const
|
|
1773
|
+
const ft=o`: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}
|
|
1801
1774
|
`
|
|
1802
1775
|
/**
|
|
1803
1776
|
* @license
|
|
1804
1777
|
* Copyright 2022 Google LLC
|
|
1805
1778
|
* SPDX-License-Identifier: Apache-2.0
|
|
1806
|
-
*/;let
|
|
1779
|
+
*/;let xt=class extends vt{};
|
|
1807
1780
|
/**
|
|
1808
1781
|
* @license
|
|
1809
1782
|
* Copyright 2021 Google LLC
|
|
1810
1783
|
* SPDX-License-Identifier: Apache-2.0
|
|
1811
1784
|
*/
|
|
1812
|
-
function
|
|
1785
|
+
function wt(t){return t.currentTarget===t.target&&(t.composedPath()[0]===t.target&&(!t.target.disabled&&!function(t){const e=kt;e&&(t.preventDefault(),t.stopImmediatePropagation());return async function(){kt=!0,await null,kt=!1}
|
|
1813
1786
|
/**
|
|
1814
1787
|
* @license
|
|
1815
1788
|
* Copyright 2023 Google LLC
|
|
1816
1789
|
* SPDX-License-Identifier: Apache-2.0
|
|
1817
|
-
*/(),e}(t)))}
|
|
1790
|
+
*/(),e}(t)))}xt.styles=[ft],xt=a([l("md-ripple")],xt);let kt=!1;const $t=Symbol("internals"),St=Symbol("privateInternals");
|
|
1818
1791
|
/**
|
|
1819
1792
|
* @license
|
|
1820
1793
|
* Copyright 2023 Google LLC
|
|
1821
1794
|
* SPDX-License-Identifier: Apache-2.0
|
|
1822
1795
|
*/
|
|
1823
|
-
const
|
|
1796
|
+
const Ct=Symbol("createValidator"),Dt=Symbol("getValidityAnchor"),Et=Symbol("privateValidator"),Mt=Symbol("privateSyncValidity"),Ot=Symbol("privateCustomValidationMessage");
|
|
1824
1797
|
/**
|
|
1825
1798
|
* @license
|
|
1826
1799
|
* Copyright 2023 Google LLC
|
|
1827
1800
|
* SPDX-License-Identifier: Apache-2.0
|
|
1828
1801
|
*/
|
|
1829
|
-
const
|
|
1802
|
+
const Ft=Symbol("isFocusable"),Pt=Symbol("privateIsFocusable"),Tt=Symbol("externalTabIndex"),Lt=Symbol("isUpdatingTabIndex"),Bt=Symbol("updateTabIndex");
|
|
1830
1803
|
/**
|
|
1831
1804
|
* @license
|
|
1832
1805
|
* Copyright 2023 Google LLC
|
|
1833
1806
|
* SPDX-License-Identifier: Apache-2.0
|
|
1834
1807
|
*/
|
|
1835
|
-
const
|
|
1808
|
+
const jt=Symbol("getFormValue"),At=Symbol("getFormState");
|
|
1836
1809
|
/**
|
|
1837
1810
|
* @license
|
|
1838
1811
|
* Copyright 2023 Google LLC
|
|
1839
1812
|
* SPDX-License-Identifier: Apache-2.0
|
|
1840
1813
|
*/
|
|
1841
|
-
class
|
|
1814
|
+
class zt{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}}
|
|
1842
1815
|
/**
|
|
1843
1816
|
* @license
|
|
1844
1817
|
* Copyright 2023 Google LLC
|
|
1845
1818
|
* SPDX-License-Identifier: Apache-2.0
|
|
1846
|
-
*/class
|
|
1819
|
+
*/class Wt extends zt{computeValidity(t){this.radioElement||(this.radioElement=document.createElement("input"),this.radioElement.type="radio",this.radioElement.name="group");let e=!1,i=!1;for(const{checked:o,required:r}of t)r&&(e=!0),o&&(i=!0);return this.radioElement.checked=i,this.radioElement.required=e,{validity:{valueMissing:e&&!i},validationMessage:this.radioElement.validationMessage}}equals(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++){const o=t[i],r=e[i];if(o.checked!==r.checked||o.required!==r.required)return!1}return!0}copy(t){return t.map((({checked:t,required:e})=>({checked:t,required:e})))}}
|
|
1847
1820
|
/**
|
|
1848
1821
|
* @license
|
|
1849
1822
|
* Copyright 2022 Google LLC
|
|
1850
1823
|
* SPDX-License-Identifier: Apache-2.0
|
|
1851
|
-
*/class
|
|
1824
|
+
*/class It{get controls(){const t=this.host.getAttribute("name");return t&&this.root&&this.host.isConnected?Array.from(this.root.querySelectorAll(`[name="${t}"]`)):[this.host]}constructor(t){this.host=t,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=t=>{const e="ArrowDown"===t.key,i="ArrowUp"===t.key,o="ArrowLeft"===t.key,r="ArrowRight"===t.key;if(!(o||r||e||i))return;const s=this.controls;if(!s.length)return;t.preventDefault();const a="rtl"===getComputedStyle(this.host).direction?o||e:r||e,n=s.indexOf(this.host);let l=a?n+1:n-1;for(;l!==n;){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}a?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}}
|
|
1852
1825
|
/**
|
|
1853
1826
|
* @license
|
|
1854
1827
|
* Copyright 2018 Google LLC
|
|
1855
1828
|
* SPDX-License-Identifier: Apache-2.0
|
|
1856
|
-
*/var
|
|
1829
|
+
*/var Nt;const _t=Symbol("checked");let Rt=0;const Vt=function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=""}get validity(){return this[Mt](),this[$t].validity}get validationMessage(){return this[Mt](),this[$t].validationMessage}get willValidate(){return this[Mt](),this[$t].willValidate}checkValidity(){return this[Mt](),this[$t].checkValidity()}reportValidity(){return this[Mt](),this[$t].reportValidity()}setCustomValidity(t){this[Ot]=t,this[Mt]()}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[Mt]()}firstUpdated(t){super.firstUpdated(t),this[Mt]()}[(e=Ot,Mt)](){if(r)return;this[Et]||(this[Et]=this[Ct]());const{validity:t,validationMessage:e}=this[Et].getValidity(),i=!!this[Ot],o=this[Ot]||e;this[$t].setValidity({...t,customError:i},o,this[Dt]()??void 0)}[Ct](){throw new Error("Implement [createValidator]")}[Dt](){throw new Error("Implement [getValidityAnchor]")}}return i}(function(t){class e extends t{get form(){return this[$t].form}get labels(){return this[$t].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[$t].setFormValue(this[jt](),this[At]())}[jt](){throw new Error("Implement [getFormValue]")}[At](){return this[jt]()}formDisabledCallback(t){this.disabled=t}}return e.formAssociated=!0,a([L({noAccessor:!0})],e.prototype,"name",null),a([L({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}((Ut=function(t){var e,i,o;class r extends t{constructor(){super(...arguments),this[e]=!0,this[i]=null,this[o]=!1}get[Ft](){return this[Pt]}set[Ft](t){this[Ft]!==t&&(this[Pt]=t,this[Bt]())}connectedCallback(){super.connectedCallback(),this[Bt]()}attributeChangedCallback(t,e,i){if("tabindex"===t){if(this.requestUpdate("tabIndex",Number(e??-1)),!this[Lt])return this.hasAttribute("tabindex")?void(this[Tt]=this.tabIndex):(this[Tt]=null,void this[Bt]())}else super.attributeChangedCallback(t,e,i)}[(e=Pt,i=Tt,o=Lt,Bt)](){const t=this[Ft]?0:-1,e=this[Tt]??t;this[Lt]=!0,this.tabIndex=e,this[Lt]=!1}}return a([L({noAccessor:!0})],r.prototype,"tabIndex",void 0),r}(t),class extends Ut{get[$t](){return this[St]||(this[St]=this.attachInternals()),this[St]}})));var Ut;class qt extends Vt{get checked(){return this[_t]}set checked(t){const e=this.checked;e!==t&&(this[_t]=t,this.requestUpdate("checked",e),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId="cutout"+ ++Rt,this[Nt]=!1,this.required=!1,this.value="on",this.selectionController=new It(this),this.addController(this.selectionController),r||(this[$t].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
1830
|
<div class="container ${s(t)}" aria-hidden="true">
|
|
1858
1831
|
<md-ripple
|
|
1859
1832
|
part="ripple"
|
|
@@ -1876,19 +1849,19 @@ class ke{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{}
|
|
|
1876
1849
|
|
|
1877
1850
|
<div class="touch-target"></div>
|
|
1878
1851
|
</div>
|
|
1879
|
-
`}updated(){this[
|
|
1852
|
+
`}updated(){this[$t].ariaChecked=String(this.checked)}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(wt(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()}[(Nt=_t,jt)](){return this.checked?this.value:null}[At](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(t){this.checked="true"===t}[Ct](){return new Wt((()=>this.selectionController?this.selectionController.controls:[this]))}[Dt](){return this.container}}a([L({type:Boolean})],qt.prototype,"checked",null),a([L({type:Boolean})],qt.prototype,"required",void 0),a([L()],qt.prototype,"value",void 0),a([j(".container")],qt.prototype,"container",void 0);
|
|
1880
1853
|
/**
|
|
1881
1854
|
* @license
|
|
1882
1855
|
* Copyright 2024 Google LLC
|
|
1883
1856
|
* SPDX-License-Identifier: Apache-2.0
|
|
1884
1857
|
*/
|
|
1885
|
-
const
|
|
1858
|
+
const Yt=o`@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}}}
|
|
1886
1859
|
`
|
|
1887
1860
|
/**
|
|
1888
1861
|
* @license
|
|
1889
1862
|
* Copyright 2022 Google LLC
|
|
1890
1863
|
* SPDX-License-Identifier: Apache-2.0
|
|
1891
|
-
*/;let
|
|
1864
|
+
*/;let Ht=class extends qt{};Ht.styles=[Yt],Ht=a([l("md-radio")],Ht);let Gt=class extends t{constructor(){super(...arguments),this.name="radio-group",this.checked=!1,this.disabled=!1,this.error=!1}static{this.styles=o`
|
|
1892
1865
|
:host {
|
|
1893
1866
|
font-family: "Graphik", sans-serif;
|
|
1894
1867
|
}
|
|
@@ -1954,10 +1927,10 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1954
1927
|
|
|
1955
1928
|
<span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
|
|
1956
1929
|
</label>
|
|
1957
|
-
`}};
|
|
1958
|
-
${X}
|
|
1930
|
+
`}};a([L({type:String}),n("design:type",Object)],Gt.prototype,"name",void 0),a([L({type:Boolean}),n("design:type",Object)],Gt.prototype,"checked",void 0),a([L({type:Boolean}),n("design:type",Object)],Gt.prototype,"disabled",void 0),a([L({type:Boolean}),n("design:type",Object)],Gt.prototype,"error",void 0),Gt=a([l("custom-radio")],Gt);let Xt=class extends A{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=[J,o`
|
|
1959
1931
|
${K}
|
|
1960
|
-
${
|
|
1932
|
+
${Q}
|
|
1933
|
+
${X}
|
|
1961
1934
|
|
|
1962
1935
|
/* --- Own Error Styles --- */
|
|
1963
1936
|
:host([error]) .input-container:not(.open) .input-wrapper:hover {
|
|
@@ -2088,7 +2061,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2088
2061
|
|
|
2089
2062
|
.filter-input::placeholder {
|
|
2090
2063
|
${N};
|
|
2091
|
-
|
|
2064
|
+
color: var( --filter-text-color, var( --secondary-color-40 ) );
|
|
2092
2065
|
}
|
|
2093
2066
|
|
|
2094
2067
|
.icon-button {
|
|
@@ -2209,7 +2182,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2209
2182
|
background: white;
|
|
2210
2183
|
box-sizing: border-box;
|
|
2211
2184
|
cursor: pointer;
|
|
2212
|
-
|
|
2185
|
+
color: var( --filter-text-color, var( --secondary-color-80 ) );
|
|
2213
2186
|
white-space: nowrap;
|
|
2214
2187
|
overflow: hidden;
|
|
2215
2188
|
text-overflow: ellipsis;
|
|
@@ -2272,7 +2245,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2272
2245
|
margin-right: 8px;
|
|
2273
2246
|
flex-shrink: 0;
|
|
2274
2247
|
}
|
|
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`
|
|
2248
|
+
`]}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,o=` --filter-text-color: ${this.value?"var( --secondary-color )":"var( --secondary-color-40 )"}; `,r=e`
|
|
2276
2249
|
<randstad-icon
|
|
2277
2250
|
name="${this.isOpen&&this.filteredOptions.length>0?"arrow_up":"arrow_down"}"
|
|
2278
2251
|
size="24px"
|
|
@@ -2280,7 +2253,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2280
2253
|
>
|
|
2281
2254
|
</randstad-icon>
|
|
2282
2255
|
`;return e`
|
|
2283
|
-
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}
|
|
2256
|
+
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor};`:""} ${o}">
|
|
2284
2257
|
${this.renderLabelContainer()}
|
|
2285
2258
|
|
|
2286
2259
|
<div class="list-container">
|
|
@@ -2328,15 +2301,15 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2328
2301
|
|
|
2329
2302
|
${!t&&this.isOpen&&this.filteredOptions.length>0?e`
|
|
2330
2303
|
<ul class="options-list">
|
|
2331
|
-
${this.filteredOptions.map(((t,i)=>{const
|
|
2304
|
+
${this.filteredOptions.map(((t,i)=>{const o="string"==typeof t?t:t.label,r="object"==typeof t&&t.disabled,s="object"==typeof t?t.icon:void 0;return e`
|
|
2332
2305
|
<li
|
|
2333
|
-
class="${
|
|
2306
|
+
class="${r?"disabled":""} ${i===this.highlightedIndex?"highlighted":""}"
|
|
2334
2307
|
role="option"
|
|
2335
2308
|
aria-selected="${i===this.highlightedIndex}"
|
|
2336
|
-
@click="${()=>{
|
|
2309
|
+
@click="${()=>{r||this.handleSelect(t)}}"
|
|
2337
2310
|
>
|
|
2338
2311
|
${this.renderOptionIcon(s)}
|
|
2339
|
-
${
|
|
2312
|
+
${o}
|
|
2340
2313
|
</li>
|
|
2341
2314
|
`}))}
|
|
2342
2315
|
</ul>
|
|
@@ -2366,22 +2339,22 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2366
2339
|
</div>
|
|
2367
2340
|
|
|
2368
2341
|
<ul class="options-list">
|
|
2369
|
-
${this.filteredOptions.map(((t,i)=>{const
|
|
2342
|
+
${this.filteredOptions.map(((t,i)=>{const o="string"==typeof t?t:t.label,r="object"==typeof t&&t.disabled,s="object"==typeof t?t.icon:void 0;return e`
|
|
2370
2343
|
<li
|
|
2371
|
-
class="${
|
|
2344
|
+
class="${r?"disabled":""} ${i===this.highlightedIndex?"highlighted":""}"
|
|
2372
2345
|
role="option"
|
|
2373
2346
|
aria-selected="${i===this.highlightedIndex}"
|
|
2374
|
-
@click="${()=>{
|
|
2347
|
+
@click="${()=>{r||this.handleSelect(t)}}"
|
|
2375
2348
|
>
|
|
2376
2349
|
${this.renderOptionIcon(s)}
|
|
2377
|
-
${
|
|
2350
|
+
${o}
|
|
2378
2351
|
</li>
|
|
2379
2352
|
`}))}
|
|
2380
2353
|
</ul>
|
|
2381
2354
|
</div>
|
|
2382
2355
|
</div>
|
|
2383
2356
|
`:i}
|
|
2384
|
-
`}};
|
|
2357
|
+
`}};a([L({type:Object}),n("design:type",Object)],Xt.prototype,"value",void 0),a([L({type:String,attribute:"default-value"}),n("design:type",Object)],Xt.prototype,"defaultValue",void 0),a([L({type:Array}),n("design:type",Array)],Xt.prototype,"options",void 0),a([L({type:Boolean}),n("design:type",Object)],Xt.prototype,"filterable",void 0),a([L({type:Number}),n("design:type",Number)],Xt.prototype,"maxLength",void 0),a([B(),n("design:type",Boolean)],Xt.prototype,"isMobile",void 0),a([B(),n("design:type",Object)],Xt.prototype,"highlightedIndex",void 0),a([B(),n("design:type",Boolean)],Xt.prototype,"_isCleared",void 0),a([B(),n("design:type",Array)],Xt.prototype,"filteredOptions",void 0),a([B(),n("design:type",Object)],Xt.prototype,"filterValue",void 0),a([B(),n("design:type",Object)],Xt.prototype,"isOpen",void 0),a([B(),n("design:type",Object)],Xt.prototype,"mobileFilterValue",void 0),Xt=a([l("filterable-select")],Xt);const Kt=new CSSStyleSheet;Kt.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 Qt extends t{static{this.styles=[Kt,o`
|
|
2385
2358
|
:host {
|
|
2386
2359
|
display: flex;
|
|
2387
2360
|
position: fixed;
|
|
@@ -2451,7 +2424,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2451
2424
|
}
|
|
2452
2425
|
|
|
2453
2426
|
.container {
|
|
2454
|
-
${
|
|
2427
|
+
${W};
|
|
2455
2428
|
display: flex;
|
|
2456
2429
|
align-items: center;
|
|
2457
2430
|
box-sizing: border-box;
|
|
@@ -2517,7 +2490,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2517
2490
|
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
2518
2491
|
<span class="message">${this.message}</span>
|
|
2519
2492
|
</div>
|
|
2520
|
-
`}}customElements.define("randstad-snackbar",
|
|
2493
|
+
`}}customElements.define("randstad-snackbar",Qt);let Jt=class extends t{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=o`
|
|
2521
2494
|
.stepper {
|
|
2522
2495
|
display: flex;
|
|
2523
2496
|
gap: 20px;
|
|
@@ -2617,7 +2590,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2617
2590
|
</div>
|
|
2618
2591
|
`))}
|
|
2619
2592
|
</div>
|
|
2620
|
-
`}};
|
|
2593
|
+
`}};a([L({type:Number}),n("design:type",Object)],Jt.prototype,"totalSteps",void 0),a([L({type:Number}),n("design:type",Object)],Jt.prototype,"currentStep",void 0),Jt=a([l("custom-stepper")],Jt);let Zt=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:o}=t;this.showPrev=e>0,this.showNext=e+o<i-1}}static{this.styles=o`
|
|
2621
2594
|
:host {
|
|
2622
2595
|
display: block;
|
|
2623
2596
|
border-bottom: 1px solid #E7E8EC;
|
|
@@ -2630,7 +2603,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2630
2603
|
}
|
|
2631
2604
|
|
|
2632
2605
|
.tab {
|
|
2633
|
-
${
|
|
2606
|
+
${_};
|
|
2634
2607
|
display: flex;
|
|
2635
2608
|
gap: 8px;
|
|
2636
2609
|
flex-direction: row;
|
|
@@ -2732,7 +2705,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2732
2705
|
padding: 16px;
|
|
2733
2706
|
}
|
|
2734
2707
|
}
|
|
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
|
|
2708
|
+
`}firstUpdated(){this.handleScroll()}updated(t){t.has("selected")&&(this.internalSelected=this.selected)}selectTab(t){this.internalSelected=t;const e=this.tabs.find((e=>e.value===t));e&&this.dispatchEvent(new CustomEvent("tab-change",{detail:e,bubbles:!0,composed:!0}))}scrollTabsLeft(){const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const e=t.scrollLeft,i=Array.from(t.querySelectorAll(".tab"));for(let o=i.length-1;o>=0;o--){const r=i[o].offsetLeft;if(r<e+this.SCROLL_OFFSET-1){const e=r-this.SCROLL_OFFSET;t.scrollTo({left:e,behavior:"smooth"});break}}setTimeout((()=>this.handleScroll()),300)}scrollTabsRight(){const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const e=t.scrollLeft,i=Array.from(t.querySelectorAll(".tab"));for(const o of i)if(o.offsetLeft>e+this.SCROLL_OFFSET){const e=o.offsetLeft-this.SCROLL_OFFSET;t.scrollTo({left:e,behavior:"smooth"});break}setTimeout((()=>this.handleScroll()),300)}render(){return e`
|
|
2736
2709
|
<div class="scroll-container">
|
|
2737
2710
|
${this.showPrev?e`
|
|
2738
2711
|
<button class="scroll-button prev" @click=${this.scrollTabsLeft}>
|
|
@@ -2756,7 +2729,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2756
2729
|
</button>
|
|
2757
2730
|
`:null}
|
|
2758
2731
|
</div>
|
|
2759
|
-
`}};
|
|
2732
|
+
`}};a([L({type:Array}),n("design:type",Array)],Zt.prototype,"tabs",void 0),a([L({type:String}),n("design:type",String)],Zt.prototype,"selected",void 0),a([B(),n("design:type",String)],Zt.prototype,"internalSelected",void 0),a([B(),n("design:type",Object)],Zt.prototype,"showPrev",void 0),a([B(),n("design:type",Object)],Zt.prototype,"showNext",void 0),Zt=a([l("tabs-bar")],Zt);let te=class extends A{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 o=i.pop();return`${i.join(", ")} y ${o}`}validateFiles(t,e,i,o,r,s){const a=e>0,n=i.length>0;for(const l of t){if(n&&!i.includes(l.type))return this.setError(s,o),!1;if(a&&l.size>e)return this.setError(s,r),!1}return!0}async baseHandleFiles(t,e){const{baseMaxFiles:i,maxFileSize:o,acceptedFileTypes:r,errorMessageType:s,errorMessageSize:a,typeError:n}=e;if(this.setError(n,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(n,t)}const h=Array.from(t).slice(0,c);if(0===h.length)return;if(!this.validateFiles(h,o,r,s,a,n))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(),g=setInterval((()=>{const t=Date.now()-u,e=Math.min(Math.round(t/p*100),100);this.progress=e,this.progress>=100&&(clearInterval(g),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
2733
|
${this.loading?e`
|
|
2761
2734
|
<div class="progress-bar-container">
|
|
2762
2735
|
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
@@ -2766,7 +2739,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2766
2739
|
`:e`
|
|
2767
2740
|
${t}
|
|
2768
2741
|
`}
|
|
2769
|
-
`}};
|
|
2742
|
+
`}};a([L({type:Array}),n("design:type",Array)],te.prototype,"files",void 0),a([L({type:Number}),n("design:type",Object)],te.prototype,"simulatedDelay",void 0),a([B(),n("design:type",Object)],te.prototype,"loading",void 0),a([B(),n("design:type",Object)],te.prototype,"progress",void 0),a([B(),n("design:type",Object)],te.prototype,"errorTextMessage",void 0),a([j('input[ type="file" ]'),n("design:type",HTMLInputElement)],te.prototype,"fileInput",void 0),te=a([l("base-upload")],te);const ee={"image/jpg":".jpg","image/jpeg":".jpeg","image/png":".png"},ie={"application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx",...ee,"text/plain":".txt"},oe=o`
|
|
2770
2743
|
.progress-bar-container {
|
|
2771
2744
|
min-height: 23px;
|
|
2772
2745
|
display: flex;
|
|
@@ -2786,13 +2759,20 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2786
2759
|
background-color: var( --primary-color );
|
|
2787
2760
|
transition: width 0.1s ease;
|
|
2788
2761
|
}
|
|
2789
|
-
|
|
2790
|
-
${
|
|
2762
|
+
`;let re=class extends te{constructor(){super(...arguments),this.acceptedFileTypes=[],this.maxFiles=3,this.maxFileSize=0,this.isDragging=!1,this.imageUrls=[],this.isMaxFilesReached=!1}static{this.styles=o`
|
|
2763
|
+
${K}
|
|
2764
|
+
${oe}
|
|
2791
2765
|
|
|
2792
2766
|
:host {
|
|
2793
2767
|
font-family: 'Graphik', sans-serif;
|
|
2794
2768
|
}
|
|
2795
2769
|
|
|
2770
|
+
.image-container {
|
|
2771
|
+
display: flex;
|
|
2772
|
+
flex-direction: column;
|
|
2773
|
+
gap: 8px;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2796
2776
|
.upload-component-wrapper {
|
|
2797
2777
|
display: flex;
|
|
2798
2778
|
flex-direction: column;
|
|
@@ -2828,28 +2808,28 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2828
2808
|
}
|
|
2829
2809
|
|
|
2830
2810
|
.text-main {
|
|
2831
|
-
${
|
|
2811
|
+
${W};
|
|
2832
2812
|
text-align: center;
|
|
2833
2813
|
vertical-align: middle;
|
|
2834
2814
|
color: var( --secondary-color-80 );
|
|
2835
2815
|
}
|
|
2836
2816
|
|
|
2837
2817
|
.text-secondary {
|
|
2838
|
-
${
|
|
2818
|
+
${z};
|
|
2839
2819
|
text-align: center;
|
|
2840
2820
|
vertical-align: middle;
|
|
2841
2821
|
color: var( --secondary-color-60 );
|
|
2842
2822
|
}
|
|
2843
2823
|
|
|
2844
2824
|
.text-tertiary {
|
|
2845
|
-
${
|
|
2825
|
+
${z};
|
|
2846
2826
|
text-align: center;
|
|
2847
2827
|
vertical-align: middle;
|
|
2848
2828
|
color: var( --secondary-color-40 );
|
|
2849
2829
|
}
|
|
2850
2830
|
|
|
2851
2831
|
.button {
|
|
2852
|
-
${
|
|
2832
|
+
${z};
|
|
2853
2833
|
background-color: var( --primary-color );
|
|
2854
2834
|
border: none;
|
|
2855
2835
|
padding: 4px 16px;
|
|
@@ -2908,7 +2888,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2908
2888
|
.text-main.error {
|
|
2909
2889
|
color: var(--ui-negative, #E00F0F);
|
|
2910
2890
|
}
|
|
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,
|
|
2891
|
+
`}getFileConfig(){const t="tu archivo no es válido",e=this.maxFileSize>0,i=this.acceptedFileTypes.length>0;return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:i?t:"",errorMessageSize:e?t:"",typeError:"image"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,ee)}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,o=this.disabled,r=this.maxFileSize>0,s=this.acceptedFileTypes.length>0,a=r?` / max. ${this.getTextMaxFileSize()}MB`:"",n=s?this.getTextAcceptedFileTypes():"",l=this.errorTextMessage||`subí hasta ${this.maxFiles} imágenes`,d=this.errorTextMessage?"assets/img/image-upload-error.svg":t?"assets/img/image-upload-disabled.svg":"assets/img/image-upload-circle.svg",c=`container ${this.isDragging?"dragging":""} ${this.errorTextMessage?"error":""}`,h=e`
|
|
2912
2892
|
<label class="button">
|
|
2913
2893
|
agregar archivo
|
|
2914
2894
|
|
|
@@ -2921,52 +2901,56 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2921
2901
|
/>
|
|
2922
2902
|
</label>
|
|
2923
2903
|
`;return e`
|
|
2924
|
-
<div class="
|
|
2925
|
-
${this.
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
<
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2904
|
+
<div class="image-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
2905
|
+
${this.label?e` ${this.renderLabelContainer()} `:i}
|
|
2906
|
+
|
|
2907
|
+
<div class="upload-component-wrapper">
|
|
2908
|
+
${this.imageUrls.length>0?e`
|
|
2909
|
+
<div class="image-gallery">
|
|
2910
|
+
${this.imageUrls.map(((t,i)=>e`
|
|
2911
|
+
<div class="image-item">
|
|
2912
|
+
<img src="${t}" loading="lazy" alt="Uploaded image" />
|
|
2913
|
+
|
|
2914
|
+
<randstad-button
|
|
2915
|
+
.variant=${"button-icon"}
|
|
2916
|
+
.iconName=${"trash"}
|
|
2917
|
+
@click=${()=>this.removeFile(i,"image")}
|
|
2918
|
+
?disabled=${o}
|
|
2919
|
+
>
|
|
2920
|
+
</randstad-button>
|
|
2921
|
+
</div>
|
|
2922
|
+
`))}
|
|
2923
|
+
</div>
|
|
2924
|
+
`:""}
|
|
2942
2925
|
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2926
|
+
<div
|
|
2927
|
+
class="${c}"
|
|
2928
|
+
?disabled="${t}"
|
|
2929
|
+
@drop="${this.onDrop}"
|
|
2930
|
+
@dragover="${this.onDragOver}"
|
|
2931
|
+
@dragleave="${this.onDragLeave}"
|
|
2932
|
+
>
|
|
2933
|
+
<img
|
|
2934
|
+
class="icon"
|
|
2935
|
+
src=${d}
|
|
2936
|
+
alt="Subir imagen"
|
|
2937
|
+
/>
|
|
2955
2938
|
|
|
2956
|
-
|
|
2957
|
-
|
|
2939
|
+
<div class="text-container">
|
|
2940
|
+
<div class="text-main ${this.errorTextMessage?"error":""}">${l}</div>
|
|
2958
2941
|
|
|
2959
|
-
|
|
2960
|
-
|
|
2942
|
+
<div class="text-secondary">
|
|
2943
|
+
Podés agregar un archivo o arrastrar y soltar acá
|
|
2944
|
+
</div>
|
|
2945
|
+
|
|
2946
|
+
<div class="text-tertiary">${n}${a}</div>
|
|
2961
2947
|
</div>
|
|
2962
2948
|
|
|
2963
|
-
|
|
2949
|
+
${this.renderLoadingContainer(h)}
|
|
2964
2950
|
</div>
|
|
2965
|
-
|
|
2966
|
-
${this.renderLoadingContainer(n)}
|
|
2967
2951
|
</div>
|
|
2968
2952
|
</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`
|
|
2953
|
+
`}};a([L({type:Array}),n("design:type",Array)],re.prototype,"acceptedFileTypes",void 0),a([L({type:Number}),n("design:type",Object)],re.prototype,"maxFiles",void 0),a([L({type:Number}),n("design:type",Object)],re.prototype,"maxFileSize",void 0),a([B(),n("design:type",Object)],re.prototype,"isDragging",void 0),a([B(),n("design:type",Array)],re.prototype,"imageUrls",void 0),a([B(),n("design:type",Boolean)],re.prototype,"isMaxFilesReached",void 0),re=a([l("upload-image")],re);const se=6048e5,ae=Symbol.for("constructDateFrom");function ne(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&ae in t?t[ae](e):t instanceof Date?new t.constructor(e):new Date(e)}function le(t,e){return ne(e||t,t)}function de(t,e,i){const o=le(t,i?.in);if(isNaN(e))return ne(t,NaN);if(!e)return o;const r=o.getDate(),s=ne(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let ce={};function he(){return ce}function pe(t,e){const i=he(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=le(t,e?.in),s=r.getDay(),a=(s<o?7:0)+s-o;return r.setDate(r.getDate()-a),r.setHours(0,0,0,0),r}function ue(t,e){return pe(t,{...e,weekStartsOn:1})}function ge(t,e){const i=le(t,e?.in),o=i.getFullYear(),r=ne(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=ue(r),a=ne(i,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);const n=ue(a);return i.getTime()>=s.getTime()?o+1:i.getTime()>=n.getTime()?o:o-1}function me(t){const e=le(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 be(t,...e){const i=ne.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function ye(t,e){const i=le(t,e?.in);return i.setHours(0,0,0,0),i}function ve(t,e,i){return de(t,12*e,i)}function fe(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+le(t)));var e}function xe(t,e){const i=le(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const we={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 ke(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const $e={date:ke({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ke({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:ke({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Se={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ce(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 De(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=e.match(r);if(!s)return null;const a=s[0],n=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(n,(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}(n,(t=>t.test(a)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(a.length)}}}var Ee;const Me={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=we[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:$e,formatRelative:(t,e,i,o)=>Se[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:Ce({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ce({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:Ce({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:Ce({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:Ce({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:(Ee={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(Ee.matchPattern);if(!i)return null;const o=i[0],r=t.match(Ee.parsePattern);if(!r)return null;let s=Ee.valueCallback?Ee.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:De({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:De({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:De({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:De({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:De({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 Oe(t,e){const i=le(t,e?.in),o=function(t,e){const[i,o]=be(0,t,e),r=ye(i),s=ye(o),a=+r-me(r),n=+s-me(s);return Math.round((a-n)/864e5)}(i,function(t,e){const i=le(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function Fe(t,e){const i=le(t,e?.in),o=+ue(i)-+function(t,e){const i=ge(t,e),o=ne(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),ue(o)}(i);return Math.round(o/se)+1}function Pe(t,e){const i=le(t,e?.in),o=i.getFullYear(),r=he(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=ne(e?.in||t,0);a.setFullYear(o+1,0,s),a.setHours(0,0,0,0);const n=pe(a,e),l=ne(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=pe(l,e);return+i>=+n?o+1:+i>=+d?o:o-1}function Te(t,e){const i=le(t,e?.in),o=+pe(i,e)-+function(t,e){const i=he(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Pe(t,e),s=ne(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),pe(s,e)}(i,e);return Math.round(o/se)+1}function Le(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Be={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Le("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Le(i+1,2)},d:(t,e)=>Le(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)=>Le(t.getHours()%12||12,e.length),H:(t,e)=>Le(t.getHours(),e.length),m:(t,e)=>Le(t.getMinutes(),e.length),s:(t,e)=>Le(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Le(Math.trunc(o*Math.pow(10,i-3)),e.length)}},je="midnight",Ae="noon",ze="morning",We="afternoon",Ie="evening",Ne="night",_e={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 Be.y(t,e)},Y:function(t,e,i,o){const r=Pe(t,o),s=r>0?r:1-r;if("YY"===e){return Le(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Le(s,e.length)},R:function(t,e){return Le(ge(t),e.length)},u:function(t,e){return Le(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 Le(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 Le(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 Be.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 Le(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=Te(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Le(r,e.length)},I:function(t,e,i){const o=Fe(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Le(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Be.d(t,e)},D:function(t,e,i){const o=Oe(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Le(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(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Le(s,2);case"eo":return i.ordinalNumber(s,{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(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Le(s,e.length);case"co":return i.ordinalNumber(s,{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 Le(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?Ae:0===o?je: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?Ie:o>=12?We:o>=4?ze:Ne,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 Be.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Be.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Le(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Le(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Be.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Be.s(t,e)},S:function(t,e){return Be.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return Ve(o);case"XXXX":case"XX":return Ue(o);default:return Ue(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return Ve(o);case"xxxx":case"xx":return Ue(o);default:return Ue(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Re(o,":");default:return"GMT"+Ue(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Re(o,":");default:return"GMT"+Ue(o,":")}},t:function(t,e,i){return Le(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Le(+t,e.length)}};function Re(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),s=o%60;return 0===s?i+String(r):i+String(r)+e+Le(s,2)}function Ve(t,e){if(t%60==0){return(t>0?"-":"+")+Le(Math.abs(t)/60,2)}return Ue(t,e)}function Ue(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Le(Math.trunc(o/60),2)+e+Le(o%60,2)}const qe=(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"})}},Ye=(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"})}},He={p:Ye,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return qe(t,e);let s;switch(o){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}}",qe(o,e)).replace("{{time}}",Ye(r,e))}},Ge=/^D+$/,Xe=/^Y+$/,Ke=["D","DD","YY","YYYY"];const Qe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Je=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ze=/^'([^]*?)'?$/,ti=/''/g,ei=/[a-zA-Z]/;function ii(t,e,i){const o=he(),r=o.locale??Me,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=le(t,i?.in);if(!fe(n))throw new RangeError("Invalid time value");let l=e.match(Je).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,He[e])(t,r.formatLong)}return t})).join("").match(Qe).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:oi(t)};if(_e[e])return{isToken:!0,value:t};if(e.match(ei))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(n,l));const d={firstWeekContainsDate:s,weekStartsOn:a,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return Xe.test(t)}(o)||function(t){return Ge.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),Ke.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,_e[o[0]])(n,o,r.localize,d)})).join("")}function oi(t){const e=t.match(Ze);return e?e[1].replace(ti,"'"):t}function ri(t,e){return le(t,e?.in).getDate()}function si(t,e){const i=le(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=ne(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function ai(t,e){return+le(t)>+le(e)}function ni(t,e){return+le(t)<+le(e)}function li(t,e,i){const[o,r]=be(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function di(t,e,i){const[o,r]=be(0,t,e);return o.getFullYear()===r.getFullYear()}function ci(t,e){return function(t,e){const[i,o]=be(0,t,e);return+ye(i)===+ye(o)}(ne(t,t),function(t){return ne(t,Date.now())}(t))}let hi=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=[J,o`
|
|
2970
2954
|
/* Estilos generales del contenedor del calendario (escritorio) */
|
|
2971
2955
|
.calendar-container {
|
|
2972
2956
|
position: absolute;
|
|
@@ -3031,7 +3015,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3031
3015
|
}
|
|
3032
3016
|
|
|
3033
3017
|
.month-year-button {
|
|
3034
|
-
${
|
|
3018
|
+
${W}
|
|
3035
3019
|
display: flex;
|
|
3036
3020
|
align-items: center;
|
|
3037
3021
|
justify-content: center;
|
|
@@ -3380,7 +3364,7 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3380
3364
|
color: var(--secondary-randstad-dark-blue-30, #b1b5c4);
|
|
3381
3365
|
}
|
|
3382
3366
|
/* */
|
|
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?
|
|
3367
|
+
`]}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?de(this.viewDate,t):"months"===this.currentView?ve(this.viewDate,t):ve(this.viewDate,21*t),this._updateView(e)}handleYearSelect(t){const e=function(t,e,i){const o=le(t,i?.in);return isNaN(+o)?ne(t,NaN):(o.setFullYear(e),o)}(this.viewDate,t);this._updateView(e,"months")}handleMonthSelect(t){const e=function(t,e,i){const o=le(t,i?.in),r=o.getFullYear(),s=o.getDate(),a=ne(t,0);a.setFullYear(r,e,15),a.setHours(0,0,0,0);const n=si(a);return o.setMonth(e,Math.min(s,n)),o}(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="",o=!1,r=!1;if("years"===this.currentView){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,e=t+20;i=`${t} - ${e}`;o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=e>=(this.maxDate?this.maxDate.getFullYear():1/0)}else if("months"===this.currentView){i=`${this.viewDate.getFullYear()}`;const t=this.viewDate.getFullYear();o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=t>=(this.maxDate?this.maxDate.getFullYear():1/0)}else{i=`${t[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`,this.minDate&&(o=li(xe(this.viewDate),xe(this.minDate))||ni(this.viewDate,this.minDate)),this.maxDate&&(r=li(xe(this.viewDate),xe(this.maxDate))||ai(this.viewDate,this.maxDate))}const s=e`
|
|
3384
3368
|
<randstad-icon
|
|
3385
3369
|
name="${"days"===this.currentView?"arrow_drop_down":"arrow_drop_up"}"
|
|
3386
3370
|
class="select-icon"
|
|
@@ -3397,32 +3381,32 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3397
3381
|
</div>
|
|
3398
3382
|
|
|
3399
3383
|
<div class="header-right">
|
|
3400
|
-
<button class="nav-button" @click=${()=>this.handleNavClick(-1)} ?disabled=${
|
|
3384
|
+
<button class="nav-button" @click=${()=>this.handleNavClick(-1)} ?disabled=${o}>
|
|
3401
3385
|
<randstad-icon name="arrow_left"></randstad-icon>
|
|
3402
3386
|
</button>
|
|
3403
3387
|
|
|
3404
|
-
<button class="nav-button" @click=${()=>this.handleNavClick(1)} ?disabled=${
|
|
3388
|
+
<button class="nav-button" @click=${()=>this.handleNavClick(1)} ?disabled=${r}>
|
|
3405
3389
|
<randstad-icon name="arrow_right"></randstad-icon>
|
|
3406
3390
|
</button>
|
|
3407
3391
|
</div>
|
|
3408
3392
|
</div>
|
|
3409
|
-
`}renderYearsView(){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,i=Array.from({length:21},((e,i)=>t+i)),
|
|
3393
|
+
`}renderYearsView(){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,i=Array.from({length:21},((e,i)=>t+i)),o=this.selectedDate?this.selectedDate.getFullYear():null,r=(new Date).getFullYear(),s=this.minDate?this.minDate.getFullYear():-1/0,a=this.maxDate?this.maxDate.getFullYear():1/0;return e`
|
|
3410
3394
|
<div class="year-grid">
|
|
3411
3395
|
${i.map((t=>e`
|
|
3412
3396
|
<button
|
|
3413
|
-
class="${"year-button "+(t===
|
|
3397
|
+
class="${"year-button "+(t===o?"selected":t===r?"current":"")}"
|
|
3414
3398
|
@click=${()=>this.handleYearSelect(t)}
|
|
3415
|
-
?disabled=${t<s||t>
|
|
3399
|
+
?disabled=${t<s||t>a}
|
|
3416
3400
|
>
|
|
3417
3401
|
${t}
|
|
3418
3402
|
</button>
|
|
3419
3403
|
`))}
|
|
3420
3404
|
</div>
|
|
3421
|
-
`}renderMonthsView(){const t=this.getShortMonthNames(),i=this.selectedDate?.getMonth(),
|
|
3405
|
+
`}renderMonthsView(){const t=this.getShortMonthNames(),i=this.selectedDate?.getMonth(),o=(new Date).getMonth(),r=this.viewDate.getFullYear();return e`
|
|
3422
3406
|
<div class="month-grid">
|
|
3423
|
-
${t.map(((t,s)=>{const
|
|
3407
|
+
${t.map(((t,s)=>{const a=s===o,n=s===i&&this.selectedDate&&di(this.viewDate,this.selectedDate),l=s===i&&this.selectedDate&&!di(this.viewDate,this.selectedDate);let d=!1;this.minDate&&r===this.minDate.getFullYear()&&(d=s<this.minDate.getMonth()),this.maxDate&&r===this.maxDate.getFullYear()&&(d=d||s>this.maxDate.getMonth());return e`
|
|
3424
3408
|
<button
|
|
3425
|
-
class="${"month-button "+(
|
|
3409
|
+
class="${"month-button "+(n?"selected":l?"secondary-selected":a?"current":"")}"
|
|
3426
3410
|
?disabled=${d}
|
|
3427
3411
|
@click=${()=>this.handleMonthSelect(s)}
|
|
3428
3412
|
>
|
|
@@ -3430,20 +3414,20 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3430
3414
|
</button>
|
|
3431
3415
|
`}))}
|
|
3432
3416
|
</div>
|
|
3433
|
-
`}renderDayView(){const t=
|
|
3417
|
+
`}renderDayView(){const t=si(this.viewDate),i=xe(this.viewDate),o=le(i,r?.in).getDay();var r;const s=Array.from({length:0===o?6:o-1},(()=>null)),a=Array.from({length:t},((t,e)=>function(t,e,i){const o=le(t,i?.in);return o.setDate(e),o}(i,e+1))),n=this.getShortWeekdays();return e`
|
|
3434
3418
|
<div class="weekdays">
|
|
3435
|
-
${
|
|
3419
|
+
${n.map((t=>e`<div>${t}</div>`))}
|
|
3436
3420
|
</div>
|
|
3437
3421
|
|
|
3438
3422
|
<div class="days-grid">
|
|
3439
3423
|
${s.map((()=>e`<div></div>`))}
|
|
3440
|
-
${
|
|
3424
|
+
${a.map((t=>{const i=ye(t),o=this.selectedDate?ye(this.selectedDate):null,r=this.minDate&&ni(i,ye(this.minDate))||this.maxDate&&ai(i,ye(this.maxDate)),s=ci(i),a=o&&ri(i)===ri(o),n=a&&o&&li(i,o)&&di(i,o);return e`
|
|
3441
3425
|
<button
|
|
3442
|
-
class="${`day ${s?"today":""} ${
|
|
3443
|
-
?disabled=${
|
|
3426
|
+
class="${`day ${s?"today":""} ${n?"selected":a&&!n?"secondary-selected":""}`}"
|
|
3427
|
+
?disabled=${r}
|
|
3444
3428
|
@click=${()=>this.handleDayClick(t)}
|
|
3445
3429
|
>
|
|
3446
|
-
${
|
|
3430
|
+
${ii(t,"d")}
|
|
3447
3431
|
</button>
|
|
3448
3432
|
`}))}
|
|
3449
3433
|
</div>
|
|
@@ -3460,10 +3444,10 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3460
3444
|
<div class="calendar-container" style="width: ${this.calendarWidth}px;">
|
|
3461
3445
|
${i}
|
|
3462
3446
|
</div>
|
|
3463
|
-
`}};
|
|
3464
|
-
${X}
|
|
3447
|
+
`}};a([L({type:Object}),n("design:type",Object)],hi.prototype,"selectedDate",void 0),a([L({type:Object}),n("design:type",Date)],hi.prototype,"viewDate",void 0),a([L({type:Boolean}),n("design:type",Object)],hi.prototype,"isMobile",void 0),a([L({type:Number}),n("design:type",Number)],hi.prototype,"calendarWidth",void 0),a([L({type:Object}),n("design:type",Object)],hi.prototype,"minDate",void 0),a([L({type:Object}),n("design:type",Object)],hi.prototype,"maxDate",void 0),a([B(),n("design:type",String)],hi.prototype,"currentView",void 0),hi=a([l("calendar-overlay")],hi);let pi=class extends A{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=o`
|
|
3465
3448
|
${K}
|
|
3466
|
-
${
|
|
3449
|
+
${Q}
|
|
3450
|
+
${X}
|
|
3467
3451
|
|
|
3468
3452
|
/* Si se proporciona una propiedad width (ej. width="600px"), se usa ese valor. */
|
|
3469
3453
|
:host([width]) {
|
|
@@ -3561,8 +3545,8 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3561
3545
|
.calendar-button randstad-icon {
|
|
3562
3546
|
font-size: 18px;
|
|
3563
3547
|
}
|
|
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=
|
|
3565
|
-
<div class="datepicker-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""} ${
|
|
3548
|
+
`}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=ii(e,"dd-MM-yyyy");this.inputValue=t,this.closeOverlay(t)}else{const t=ii(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=ii(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 ve(t,-18,i)}(new Date);if(ai(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?ii(t.minDate,"dd-MM-yyyy"):""} y ${t?.maxDate?ii(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(ii(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,o,r]=e;if(i&&o&&r&&o>=1&&o<=12&&r>1e3){const e=new Date(r,o-1,i,12);if(fe(e)&&ii(e,"dd-MM-yyyy")===t)return e}}const i=t.split("-").map(Number);if(3===i.length){const[e,o,r]=i;if(e&&o&&r&&o>=1&&o<=12&&e>1e3){const i=new Date(e,o-1,r,12);if(fe(i)&&ii(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&&ai(t,e)?null:{minDate:t,maxDate:e}:{minDate:null,maxDate:null}}_isWithinBounds(t){const e=this._getValidDateRange();return!e||(!e.minDate||!ni(t,e.minDate))&&(!e.maxDate||!ai(t,e.maxDate))}render(){const t=s({"input-wrapper":!0,active:this.isOpen,error:this.error,disabled:this.disabled}),o=`width: ${this.width||"100%"};`,r=this._getValidDateRange();return e`
|
|
3549
|
+
<div class="datepicker-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""} ${o}">
|
|
3566
3550
|
${this.renderLabelContainer()}
|
|
3567
3551
|
|
|
3568
3552
|
<div class="input-container">
|
|
@@ -3599,8 +3583,8 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3599
3583
|
.selectedDate=${this.selectedDate}
|
|
3600
3584
|
.viewDate=${this.viewDate}
|
|
3601
3585
|
.calendarWidth=${this.calendarWidth}
|
|
3602
|
-
.minDate=${
|
|
3603
|
-
.maxDate=${
|
|
3586
|
+
.minDate=${r?.minDate}
|
|
3587
|
+
.maxDate=${r?.maxDate}
|
|
3604
3588
|
@close=${()=>this.isOpen=!1}
|
|
3605
3589
|
@view-date-change=${this.handleViewDateChange}
|
|
3606
3590
|
@date-selected=${this.handleDateSelect}
|
|
@@ -3613,11 +3597,11 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3613
3597
|
|
|
3614
3598
|
${this.renderHelper()}
|
|
3615
3599
|
</div>
|
|
3616
|
-
`}};
|
|
3617
|
-
${X}
|
|
3600
|
+
`}};a([L({type:String}),n("design:type",String)],pi.prototype,"width",void 0),a([L({type:Boolean}),n("design:type",Object)],pi.prototype,"isRenderClearButton",void 0),a([L({type:String}),n("design:type",String)],pi.prototype,"minDate",void 0),a([L({type:String}),n("design:type",String)],pi.prototype,"maxDate",void 0),a([L({type:Boolean}),n("design:type",Object)],pi.prototype,"eighteenOrOlder",void 0),a([B(),n("design:type",Object)],pi.prototype,"isOpen",void 0),a([B(),n("design:type",Object)],pi.prototype,"selectedDate",void 0),a([B(),n("design:type",Date)],pi.prototype,"viewDate",void 0),a([B(),n("design:type",Object)],pi.prototype,"isMobile",void 0),a([B(),n("design:type",Number)],pi.prototype,"calendarWidth",void 0),a([B(),n("design:type",Object)],pi.prototype,"inputValue",void 0),a([j(".input-container"),n("design:type",HTMLDivElement)],pi.prototype,"inputContainer",void 0),pi=a([l("datepicker-component")],pi);let ui=class extends te{constructor(){super(...arguments),this.maxFiles=1,this.acceptedFileTypes=[],this.maxFileSize=0,this.buttonText="Agregar archivo"}static{this.styles=o`
|
|
3618
3601
|
${K}
|
|
3619
|
-
${
|
|
3620
|
-
${
|
|
3602
|
+
${Q}
|
|
3603
|
+
${X}
|
|
3604
|
+
${oe}
|
|
3621
3605
|
|
|
3622
3606
|
:host([width]) {
|
|
3623
3607
|
width: var( --upload-file-width );
|
|
@@ -3674,11 +3658,11 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3674
3658
|
.progress-bar {
|
|
3675
3659
|
width: 100%;
|
|
3676
3660
|
}
|
|
3677
|
-
`}getFileConfig(){return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType
|
|
3661
|
+
`}getFileConfig(){const t=this.acceptedFileTypes.length>0,e=this.maxFileSize>0;return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:t?`formato de archivo no válido, se aceptan: ${this.getTextAcceptedFileTypes()}`:"",errorMessageSize:e?`el archivo es demasiado grande, el máximo es de ${this.getTextMaxFileSize()}MB`:"",typeError:"file"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,ie)}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,o=this.disabled||t,r=e`
|
|
3678
3662
|
<randstad-button
|
|
3679
3663
|
.label=${this.buttonText}
|
|
3680
3664
|
.variant=${"button-primary"}
|
|
3681
|
-
?disabled=${
|
|
3665
|
+
?disabled=${o}
|
|
3682
3666
|
@click=${()=>this.fileInput?.click()}
|
|
3683
3667
|
>
|
|
3684
3668
|
</randstad-button>
|
|
@@ -3686,13 +3670,13 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3686
3670
|
<div class="file-container" style="${this.labelColor?`--label-color: ${this.labelColor};`:""}">
|
|
3687
3671
|
${this.renderLabelContainer()}
|
|
3688
3672
|
|
|
3689
|
-
${this.renderLoadingContainer(
|
|
3673
|
+
${this.renderLoadingContainer(r)}
|
|
3690
3674
|
|
|
3691
3675
|
<input
|
|
3692
3676
|
type="file"
|
|
3693
3677
|
accept=${this.acceptedFileTypes.join(",")}
|
|
3694
3678
|
?multiple=${this.maxFiles>1}
|
|
3695
|
-
?disabled=${
|
|
3679
|
+
?disabled=${o}
|
|
3696
3680
|
@change="${this.onFileInputChange}"
|
|
3697
3681
|
/>
|
|
3698
3682
|
|
|
@@ -3721,59 +3705,315 @@ const Fe=r`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
3721
3705
|
</div>
|
|
3722
3706
|
`:i}
|
|
3723
3707
|
</div>
|
|
3724
|
-
`}};
|
|
3708
|
+
`}};a([L({type:String}),n("design:type",String)],ui.prototype,"width",void 0),a([L({type:Number}),n("design:type",Object)],ui.prototype,"maxFiles",void 0),a([L({type:Array}),n("design:type",Array)],ui.prototype,"acceptedFileTypes",void 0),a([L({type:Number}),n("design:type",Object)],ui.prototype,"maxFileSize",void 0),a([L({type:String}),n("design:type",Object)],ui.prototype,"buttonText",void 0),ui=a([l("upload-file")],ui);let gi=class extends t{constructor(){super(),this.cards=[],this.cardWidth="",this.cardHeight="",this.navWidth=112,this.showNavButtons=!0,this.isDynamicWidth=!0,this.isInfiniteScrollPartial=!0,this.autoPlayDelayMs=0,this.showPrevButton=!1,this.showNextButton=!0,this.isDraggingWithButtons=!1,this.isDownWithButtons=!1,this.startXWithButtons=0,this.scrollLeftPositionWithButtons=0,this.isScrollingByButton=!1,this.isDownDrag=!1,this.prevXDrag=0,this.isDraggingDrag=!1,this.scrollLeftDrag=0,this.observer=null,this.scrollTimeout=null,this.autoPlayTimer=null,this.handleResize=()=>{},this.DESKTOP_GAP=40,this.TABLET_GAP=24,this.MOBILE_GAP=24,this.handleMouseDownWithButtons=this.handleMouseDownWithButtons.bind(this),this.handleMouseLeaveWithButtons=this.handleMouseLeaveWithButtons.bind(this),this.handleMouseUpWithButtons=this.handleMouseUpWithButtons.bind(this),this.handleMouseMoveWithButtons=this.handleMouseMoveWithButtons.bind(this),this.handleScrollWithButtons=this.handleScrollWithButtons.bind(this),this.handleMouseDownDrag=this.handleMouseDownDrag.bind(this),this.handleMouseLeaveDrag=this.handleMouseLeaveDrag.bind(this),this.handleMouseUpDrag=this.handleMouseUpDrag.bind(this),this.handleMouseMoveDrag=this.handleMouseMoveDrag.bind(this),this.handleResize=this.resizeHandler.bind(this)}static{this.styles=o`
|
|
3725
3709
|
:host {
|
|
3726
3710
|
display: block;
|
|
3727
3711
|
width: 100%;
|
|
3728
3712
|
overflow: hidden;
|
|
3729
3713
|
user-select: none;
|
|
3714
|
+
position: relative;
|
|
3715
|
+
|
|
3716
|
+
--nav-width: 112px;
|
|
3717
|
+
--carousel-cards-gap: 24px;
|
|
3730
3718
|
}
|
|
3731
3719
|
|
|
3732
3720
|
.carousel-wrapper {
|
|
3733
3721
|
display: flex;
|
|
3734
|
-
gap:
|
|
3722
|
+
gap: var( --carousel-cards-gap );
|
|
3735
3723
|
overflow-x: auto;
|
|
3736
3724
|
-webkit-overflow-scrolling: touch;
|
|
3737
|
-
|
|
3725
|
+
scroll-snap-type: x mandatory;
|
|
3726
|
+
|
|
3727
|
+
scroll-padding-left: 25px;
|
|
3728
|
+
padding-right: 0;
|
|
3729
|
+
padding-left: 0;
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
.carousel-wrapper.not-ininite-scroll-partial {
|
|
3733
|
+
scroll-padding-left: var( --nav-width );
|
|
3734
|
+
padding-right: 0;
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
.carousel-wrapper::-webkit-scrollbar {
|
|
3738
|
+
display: none;
|
|
3739
|
+
}
|
|
3740
|
+
|
|
3741
|
+
.carousel-card-item {
|
|
3742
|
+
flex-shrink: 0;
|
|
3743
|
+
scroll-snap-align: start;
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3746
|
+
.nav-button {
|
|
3747
|
+
width: var( --nav-width );
|
|
3748
|
+
display: flex;
|
|
3749
|
+
align-items: center;
|
|
3750
|
+
justify-content: center;
|
|
3751
|
+
position: absolute;
|
|
3752
|
+
top: 0;
|
|
3753
|
+
height: 100%;
|
|
3754
|
+
border: none;
|
|
3755
|
+
background-color: rgba( 15, 25, 65, 0.7 );
|
|
3756
|
+
cursor: pointer;
|
|
3757
|
+
z-index: 10;
|
|
3758
|
+
transition: opacity 0.3s ease, background-color 0.3s ease;
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
|
+
.nav-button:hover, .nav-button:active {
|
|
3762
|
+
background-color: rgba( 15, 25, 65, 0.7 );
|
|
3763
|
+
}
|
|
3764
|
+
|
|
3765
|
+
.nav-button.prev {
|
|
3766
|
+
left: 0;
|
|
3767
|
+
}
|
|
3768
|
+
|
|
3769
|
+
.nav-button.next {
|
|
3770
|
+
right: 0;
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
.nav-button.hidden {
|
|
3774
|
+
opacity: 0;
|
|
3775
|
+
pointer-events: none;
|
|
3738
3776
|
}
|
|
3739
3777
|
|
|
3740
|
-
.
|
|
3778
|
+
.nav-button-inner {
|
|
3779
|
+
width: 48px;
|
|
3780
|
+
height: 48px;
|
|
3781
|
+
border-radius: 50%;
|
|
3782
|
+
display: flex;
|
|
3783
|
+
justify-content: center;
|
|
3784
|
+
align-items: center;
|
|
3785
|
+
background-color: transparent;
|
|
3786
|
+
transition: background-color 0.3s ease;
|
|
3787
|
+
}
|
|
3788
|
+
|
|
3789
|
+
.nav-button:hover .nav-button-inner {
|
|
3790
|
+
background-color: rgba( 0, 215, 255, 1 );
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3793
|
+
.nav-button:hover .nav-button-inner:active, .nav-button:active .nav-button-inner {
|
|
3794
|
+
background-color: rgba( 0, 194, 230, 1 );
|
|
3795
|
+
}
|
|
3796
|
+
|
|
3797
|
+
.nav-button-inner randstad-icon {
|
|
3798
|
+
width: 32px;
|
|
3799
|
+
height: 32px;
|
|
3800
|
+
--icon-color: white;
|
|
3801
|
+
transition: --icon-color 0.3s ease;
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
.nav-button:hover .nav-button-inner randstad-icon {
|
|
3805
|
+
--icon-color: rgba( 15, 25, 65, 1 );
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
.nav-button:hover .nav-button-inner:active randstad-icon {
|
|
3809
|
+
--icon-color: rgba( 15, 25, 65, 1 );
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
.carousel-wrapper.drag-mode {
|
|
3813
|
+
scroll-snap-type: none;
|
|
3814
|
+
|
|
3815
|
+
padding-right: 25px !important;
|
|
3816
|
+
padding-left: 25px !important;
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3819
|
+
.carousel-wrapper.drag-mode.not-ininite-scroll-partial {
|
|
3820
|
+
scroll-snap-type: none;
|
|
3821
|
+
scroll-padding-left: 0 !important;
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
.carousel-wrapper.drag-mode:hover {
|
|
3741
3825
|
cursor: grab;
|
|
3742
3826
|
}
|
|
3743
3827
|
|
|
3744
|
-
.carousel-wrapper.active {
|
|
3828
|
+
.carousel-wrapper.drag-mode.active {
|
|
3745
3829
|
cursor: grabbing;
|
|
3746
3830
|
}
|
|
3831
|
+
|
|
3832
|
+
.dynamic-width-mode, .static-width-mode {
|
|
3833
|
+
padding-right: 15%;
|
|
3834
|
+
scroll-padding-left: var( --nav-width );
|
|
3835
|
+
}
|
|
3747
3836
|
|
|
3748
|
-
.carousel-
|
|
3749
|
-
|
|
3837
|
+
.dynamic-width-mode .carousel-card-item {
|
|
3838
|
+
width: 85%;
|
|
3750
3839
|
}
|
|
3751
3840
|
|
|
3752
|
-
|
|
3753
|
-
|
|
3841
|
+
@media ( min-width: 941px ) {
|
|
3842
|
+
.carousel-wrapper {
|
|
3843
|
+
gap: var( --carousel-cards-gap );
|
|
3844
|
+
scroll-padding-left: 100px;
|
|
3845
|
+
scroll-padding-right: 100px;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
.carousel-wrapper.not-ininite-scroll-partial {
|
|
3849
|
+
gap: var( --carousel-cards-gap );
|
|
3850
|
+
scroll-padding-left: 0;
|
|
3851
|
+
scroll-padding-right: 0;
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3854
|
+
.static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper {
|
|
3855
|
+
gap: var( --carousel-cards-gap );
|
|
3856
|
+
padding-right: 100px !important;
|
|
3857
|
+
padding-left: 100px !important;
|
|
3858
|
+
}
|
|
3859
|
+
|
|
3860
|
+
.static-width-mode.carousel-wrapper.not-ininite-scroll-partial,.dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial {
|
|
3861
|
+
gap: var( --carousel-cards-gap );
|
|
3862
|
+
padding-right: 0 !important;
|
|
3863
|
+
padding-left: 0 !important;
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3866
|
+
.dynamic-width-mode .carousel-card-item {
|
|
3867
|
+
width: calc( ( 100% - ( 2 * var( --carousel-cards-gap ) ) + 100px ) / 3 );
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
.dynamic-width-mode.not-ininite-scroll-partial .carousel-card-item {
|
|
3871
|
+
width: calc( ( 100% - ( 2 * var( --carousel-cards-gap ) ) ) / 3 );
|
|
3872
|
+
}
|
|
3754
3873
|
}
|
|
3755
3874
|
|
|
3756
|
-
@media ( min-width:
|
|
3875
|
+
@media ( min-width: 501px ) and ( max-width: 940px ) {
|
|
3876
|
+
.nav-button {
|
|
3877
|
+
/* Se ocultan en modo tablet. Se mantiene lógica por un posible futuro fix. */
|
|
3878
|
+
display: none;
|
|
3879
|
+
}
|
|
3880
|
+
|
|
3881
|
+
.carousel-wrapper {
|
|
3882
|
+
gap: var( --carousel-cards-gap );
|
|
3883
|
+
scroll-padding-left: 50px !important;
|
|
3884
|
+
padding-right: var( --nav-width ) !important;
|
|
3885
|
+
}
|
|
3886
|
+
|
|
3887
|
+
.carousel-wrapper.not-ininite-scroll-partial {
|
|
3888
|
+
scroll-padding-left: 0 !important;
|
|
3889
|
+
}
|
|
3890
|
+
|
|
3891
|
+
.carousel-wrapper.drag-mode {
|
|
3892
|
+
padding-right: 0 !important;
|
|
3893
|
+
padding-left: 50px !important;
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
.carousel-wrapper.drag-mode.not-ininite-scroll-partial {
|
|
3897
|
+
padding-right: 0 !important;
|
|
3898
|
+
padding-left: 0 !important;
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
.static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper {
|
|
3902
|
+
gap: var( --carousel-cards-gap );
|
|
3903
|
+
padding-left: 50px !important;
|
|
3904
|
+
padding-right: 0 !important;
|
|
3905
|
+
}
|
|
3906
|
+
|
|
3907
|
+
.static-width-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial {
|
|
3908
|
+
gap: var( --carousel-cards-gap );
|
|
3909
|
+
padding-left: 0 !important;
|
|
3910
|
+
padding-right: 0 !important;
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3913
|
+
.static-width-mode:not(.drag-mode).carousel-wrapper, .dynamic-width-mode:not(.drag-mode).carousel-wrapper, .static-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial {
|
|
3914
|
+
gap: var( --carousel-cards-gap );
|
|
3915
|
+
}
|
|
3916
|
+
|
|
3917
|
+
.dynamic-width-mode .carousel-card-item {
|
|
3918
|
+
width: calc( 100% - var( --nav-width ) - var( --carousel-cards-gap ) - 50px ); /* Ancho ajustado para nav-mode */
|
|
3919
|
+
}
|
|
3920
|
+
|
|
3921
|
+
.dynamic-width-mode.not-ininite-scroll-partial .carousel-card-item {
|
|
3922
|
+
width: calc( 100% - var( --nav-width ) - var( --carousel-cards-gap ) );
|
|
3923
|
+
}
|
|
3924
|
+
|
|
3925
|
+
.dynamic-width-mode.drag-mode .carousel-card-item {
|
|
3926
|
+
width: 85%;
|
|
3927
|
+
}
|
|
3928
|
+
}
|
|
3929
|
+
|
|
3930
|
+
@media ( max-width: 500px ) {
|
|
3931
|
+
.nav-button {
|
|
3932
|
+
display: none;
|
|
3933
|
+
}
|
|
3934
|
+
|
|
3757
3935
|
.carousel-wrapper {
|
|
3758
|
-
|
|
3936
|
+
scroll-padding-left: 25px !important;
|
|
3937
|
+
padding-right: 15%;
|
|
3938
|
+
}
|
|
3939
|
+
|
|
3940
|
+
.carousel-wrapper.not-ininite-scroll-partial {
|
|
3941
|
+
scroll-padding-left: 0 !important;
|
|
3942
|
+
}
|
|
3943
|
+
|
|
3944
|
+
.static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper {
|
|
3945
|
+
gap: var( --carousel-cards-gap );
|
|
3946
|
+
padding-left: 25px !important;
|
|
3947
|
+
padding-right: 0;
|
|
3948
|
+
}
|
|
3949
|
+
|
|
3950
|
+
.static-width-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial {
|
|
3951
|
+
gap: var( --carousel-cards-gap );
|
|
3952
|
+
padding-left: 0 !important;
|
|
3953
|
+
padding-right: 0 !important;
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3956
|
+
.dynamic-width-mode .carousel-card-item {
|
|
3957
|
+
width: 85%;
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3960
|
+
.static-width-mode.drag-mode.carousel-wrapper, .dynamic-width-mode.drag-mode.carousel-wrapper {
|
|
3961
|
+
padding-right: 0 !important;
|
|
3962
|
+
padding-left: 25px !important;
|
|
3963
|
+
}
|
|
3964
|
+
|
|
3965
|
+
.static-width-mode.drag-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.drag-mode.carousel-wrapper.not-ininite-scroll-partial {
|
|
3966
|
+
padding-right: 0 !important;
|
|
3967
|
+
padding-left: 0 !important;
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
.static-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial {
|
|
3971
|
+
gap: var( --carousel-cards-gap );
|
|
3972
|
+
padding-right: 0 !important;
|
|
3759
3973
|
}
|
|
3760
3974
|
}
|
|
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="
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3975
|
+
`}getCarouselGap(){let t;const e=window.innerWidth;return t=e>=941?this.DESKTOP_GAP:e>=501?this.TABLET_GAP:this.MOBILE_GAP,t}setCarouselGap(){this.style.setProperty("--carousel-cards-gap",`${this.getCarouselGap()}px`)}getNavWidth(){return this.navWidth??112}getInitialPadding(){if(!this.slider||!1===this.showNavButtons)return 0;const t=window.getComputedStyle(this.slider).getPropertyValue("scroll-padding-left");return parseFloat(t)||0}updated(t){super.updated(t),t.has("navWidth")&&this.style.setProperty("--nav-width",`${this.getNavWidth()}px`)}firstUpdated(){this.slider&&(this.setCarouselGap(),this.initAutoPlayConfig(),this.cardWidth||!1===this.isDynamicWidth?this.isDynamicWidth=!1:this.hasAttribute("isdynamicwidth")&&void 0!==this.isDynamicWidth||(this.isDynamicWidth=!0),this.initNavModeConfig(),this.slider.addEventListener("dragstart",(t=>t.preventDefault())),0===this.cards.length&&this.slotElement&&this.loadMutationObserver())}initAutoPlayConfig(){this.autoPlayDelayMs>0&&(this.isDynamicWidth=!0,this.showNavButtons=!1),this.autoPlayDelayMs>0&&this.slider&&(this.slider.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),this.slider.addEventListener("mouseleave",this.handleMouseLeaveDrag.bind(this)),this.slider.addEventListener("touchstart",this.handleMouseEnter.bind(this)),this.slider.addEventListener("touchend",this.handleMouseLeaveDrag.bind(this)))}initNavModeConfig(){!1!==this.showNavButtons?(this.slider.addEventListener("mousedown",this.handleMouseDownWithButtons),this.slider.addEventListener("mouseleave",this.handleMouseLeaveWithButtons),this.slider.addEventListener("mouseup",this.handleMouseUpWithButtons),this.slider.addEventListener("mousemove",this.handleMouseMoveWithButtons),this.slider.addEventListener("scroll",this.handleScrollWithButtons),window.requestAnimationFrame((()=>this.handleScrollWithButtons())),this.slider.addEventListener("mouseenter",this.handleMouseEnter.bind(this))):(this.slider.classList.add("drag-mode"),this.slider.addEventListener("mousedown",this.handleMouseDownDrag),this.slider.addEventListener("mouseleave",this.handleMouseLeaveDrag),this.slider.addEventListener("mouseup",this.handleMouseUpDrag),this.slider.addEventListener("mousemove",this.handleMouseMoveDrag),this.slider.addEventListener("mouseenter",this.handleMouseEnter.bind(this)))}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize),this.autoPlayDelayMs>0&&setTimeout((()=>this.startAutoPlay()),100)}disconnectedCallback(){super.disconnectedCallback(),this.slider&&(this.slider.removeEventListener("mousedown",this.handleMouseDownWithButtons),this.slider.removeEventListener("mouseleave",this.handleMouseLeaveWithButtons),this.slider.removeEventListener("mouseup",this.handleMouseUpWithButtons),this.slider.removeEventListener("mousemove",this.handleMouseMoveWithButtons),this.slider.removeEventListener("scroll",this.handleScrollWithButtons),this.slider.removeEventListener("mousedown",this.handleMouseDownDrag),this.slider.removeEventListener("mouseleave",this.handleMouseLeaveDrag),this.slider.removeEventListener("mouseup",this.handleMouseUpDrag),this.slider.removeEventListener("mousemove",this.handleMouseMoveDrag),null!==this.scrollTimeout&&window.clearTimeout(this.scrollTimeout),this.observer&&this.observer.disconnect(),this.stopAutoPlay())}resizeHandler(){this.requestUpdate(),this.setCarouselGap()}loadMutationObserver(){this.observer=new MutationObserver(((t,e)=>{t.some((t=>t.addedNodes.length>0))&&setTimeout((()=>{this.handleScrollWithButtons(),this.slider.scrollWidth>this.slider.clientWidth&&e.disconnect()}),50)})),this.observer.observe(this,{childList:!0,subtree:!0})}handleMouseEnter(){this.stopAutoPlay()}startAutoPlay(){this.autoPlayDelayMs<=0||!this.slider||null!==this.autoPlayTimer||window.setTimeout((()=>{null===this.autoPlayTimer&&(this.autoPlayTimer=window.setInterval((()=>this.scrollToNext(new Event("autoplay"))),this.autoPlayDelayMs))}),100)}stopAutoPlay(){null!==this.autoPlayTimer&&(window.clearInterval(this.autoPlayTimer),this.autoPlayTimer=null)}handleMouseDownDrag(t){this.slider&&0===t.button&&(this.autoPlayDelayMs>0&&this.stopAutoPlay(),this.isDownDrag=!0,this.isDraggingDrag=!1,this.slider.classList.add("active"),this.slider.style.scrollBehavior="auto",this.prevXDrag=t.pageX,this.scrollLeftDrag=this.slider.scrollLeft)}handleMouseLeaveDrag(){this.slider&&(this.isDownDrag=!1,this.isDraggingDrag=!1,this.slider.classList.remove("active"),this.autoPlayDelayMs>0&&window.setTimeout((()=>{this.startAutoPlay()}),500))}handleMouseUpDrag(){this.slider&&(this.isDownDrag=!1,this.isDraggingDrag=!1,this.slider.classList.remove("active"))}handleMouseMoveDrag(t){if(t.preventDefault(),!this.isDownDrag||!this.slider)return;this.isDraggingDrag=!0;const e=t.pageX-this.prevXDrag;this.slider.scrollLeft-=1.5*e,this.prevXDrag=t.pageX}shouldPreventDragWithButtons(){if(!this.slider)return!1;return this.slider.scrollWidth-this.slider.clientWidth>1}handleMouseDownWithButtons(t){this.slider&&0===t.button&&(this.shouldPreventDragWithButtons()||(this.isDownWithButtons=!0,this.isDraggingWithButtons=!1,this.slider.classList.add("active"),this.slider.style.scrollBehavior="auto",this.startXWithButtons=t.pageX,this.scrollLeftPositionWithButtons=this.slider.scrollLeft))}handleMouseMoveWithButtons(t){if(t.preventDefault(),!this.isDownWithButtons||!this.slider)return;if(this.shouldPreventDragWithButtons())return;this.isDraggingWithButtons=!0;const e=1.5*(t.pageX-this.startXWithButtons);this.slider.scrollLeft=this.scrollLeftPositionWithButtons-e}handleMouseUpWithButtons(){this.slider&&(this.isDownWithButtons=!1,this.isDraggingWithButtons=!1,this.slider.classList.remove("active"))}handleMouseLeaveWithButtons(){this.isDownWithButtons&&(this.isDownWithButtons=!1,this.isDraggingWithButtons=!1,this.slider.classList.remove("active"),this.autoPlayDelayMs>0&&this.startAutoPlay())}handleScrollWithButtons(){if(!this.slider)return;if(this.isScrollingByButton){const t=this.slider.scrollWidth-this.slider.clientWidth,e=this.slider.scrollLeft,i=10;return t<=i?(this.showPrevButton=!1,void(this.showNextButton=!1)):(this.showPrevButton=e>i,void(this.showNextButton=e<t-i))}null!==this.scrollTimeout&&window.clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout((()=>{this.slider.style.scrollSnapType="none",this.scrollTimeout=null}),100);const t=this.slider.scrollWidth-this.slider.clientWidth,e=this.slider.scrollLeft;if(t<=10)return this.showPrevButton=!1,void(this.showNextButton=!1);this.showPrevButton=e>10,this.showNextButton=e<t-10}getNavButtonWidth(){if(!1===this.showNavButtons)return 0;if(!this.isDynamicWidth)return this.getNavWidth();return window.matchMedia("( max-width: 500px )").matches?0:this.getNavWidth()}getScrollAmount(){let t=null;if(this.cards.length>0)t=this.slider.querySelector(".carousel-card-item");else if(this.slotElement){t=this.slotElement.assignedElements({flatten:!0}).find((t=>t.classList.contains("carousel-card-item")))||null}if(!t||0===t.getBoundingClientRect().width){const t=parseFloat(this.cardWidth.replace("px",""))||280,e=window.getComputedStyle(this.slider),i=e.getPropertyValue("gap")||e.getPropertyValue("column-gap");return t+(parseFloat(i)||0)}const e=t.getBoundingClientRect().width,i=window.getComputedStyle(this.slider),o=i.getPropertyValue("gap")||i.getPropertyValue("column-gap");return e+(parseFloat(o)||0)}getCarouselItems(){return this.cards.length>0?this.slider?Array.from(this.slider.querySelectorAll(".carousel-card-item")):[]:this.slotElement?this.slotElement.assignedElements({flatten:!0}):[]}getCardsToCenterCount(){return this.isDynamicWidth&&window.matchMedia("( min-width: 941px )").matches?2:1}calculateTargetIndex(t,e,i){const o=this.getCardsToCenterCount();if(0===i.length||0===o)return-1;let r;r=t+5;let s,a=0;for(let t=0;t<i.length;t++){if(i[t].offsetLeft>=r){a=t;break}}if(this.isInfiniteScrollPartial){const e=this.getInitialPadding();0===a&&t>e&&(a=i.length-o)}if(!e&&t<5)return 0;const n=i.length-o,l=2===o;if(e){s=t<(this.isInfiniteScrollPartial?this.getInitialPadding():this.getNavButtonWidth())+5?l?2:1:a+1,s=Math.min(s,n)}else s=l&&a<=2?0:a-1,s=Math.max(0,s);return s}getScrollLeftToCenter(t,e){const i=this.getCardsToCenterCount();if(t<0||t>=e.length||0===i)return this.slider.scrollLeft;const o=e[t],r=o.getBoundingClientRect().width;if(0===r)return this.slider.scrollLeft;const s=window.getComputedStyle(this.slider),a=s.getPropertyValue("gap")||s.getPropertyValue("column-gap"),n=r*i+(parseFloat(a)||0)*(i-1);let l=o.offsetLeft+n/2-this.slider.clientWidth/2;l=Math.max(0,l);const d=this.slider.scrollWidth-this.slider.clientWidth;return l=Math.min(l,d),l}scrollToPrev(t){if("autoplay"===t.type||(t.preventDefault(),t.stopPropagation()),!this.slider)return;const e=this.getCarouselItems();if(0===e.length)return;let i;if(this.isDynamicWidth&&window.matchMedia("( min-width: 501px )").matches){const t=this.slider.scrollLeft,o=this.calculateTargetIndex(t,!1,e);i=this.getScrollLeftToCenter(o,e)}else{const t=this.slider.scrollLeft;i=0;const o=this.getInitialPadding(),r=this.getNavButtonWidth(),s=this.isInfiniteScrollPartial?o:r;for(let o=e.length-1;o>=0;o--){const r=e[o];if(Math.round(r.offsetLeft-s)<Math.round(t)-1){i=r.offsetLeft-s;break}}}this.slider.style.scrollSnapType="none",this.isScrollingByButton=!0,this.slider.scrollTo({left:i,behavior:"smooth"}),window.setTimeout((()=>{this.isScrollingByButton=!1,this.handleScrollWithButtons()}),350)}scrollToNext(t){const e="autoplay"===t.type;if(e||(t.preventDefault(),t.stopPropagation()),!this.slider)return;const i=this.getCarouselItems();if(0===i.length)return;let o;if(this.isDynamicWidth&&window.matchMedia("( min-width: 501px )").matches){const t=this.slider.scrollLeft,e=this.calculateTargetIndex(t,!0,i);o=this.getScrollLeftToCenter(e,i)}else{const t=this.slider.scrollLeft;o=-1;const e=this.getInitialPadding(),r=this.getNavButtonWidth(),s=this.isInfiniteScrollPartial?e:r;for(let e=0;e<i.length;e++){const r=i[e];if(Math.round(r.offsetLeft-s)>Math.round(t)+1){o=r.offsetLeft-s;break}}if(-1===o){o=this.slider.scrollWidth-this.slider.clientWidth}}const r=this.slider.scrollWidth-this.slider.clientWidth,s=this.slider.scrollLeft;if(e&&Math.round(s)>=Math.round(r))return this.slider.style.scrollBehavior="auto",this.slider.scrollTo({left:0,behavior:"auto"}),void(this.slider.style.scrollBehavior="smooth");this.slider.style.scrollSnapType="none",this.isScrollingByButton=!0,this.slider.scrollTo({left:o,behavior:"smooth"}),window.setTimeout((()=>{this.isScrollingByButton=!1,this.handleScrollWithButtons()}),350)}getCardCustomDimensionValue(t,e){if("width"!==t||!this.isDynamicWidth){if("width"===t){let t=window.innerWidth;if(t-=2*this.getNavButtonWidth(),t-=this.getCarouselGap(),!e)return`${t}px`;const i=e.match(/^(\d+)px$/);if(!i)return`${t}px`;return parseFloat(i[1])>t?`${t}px`:e}{const t=window.innerHeight;if(!e)return;const i=e.match(/^(\d+)px$/);if(!i)return e;return parseFloat(i[1])>t?`${t}px`:e}}}renderNavButtons(){if(!1===this.showNavButtons)return e``;const t={"nav-button":!0,prev:!0,hidden:!this.showPrevButton},i={"nav-button":!0,next:!0,hidden:!this.showNextButton};return e`
|
|
3976
|
+
<div class="nav-buttons-container">
|
|
3977
|
+
<button
|
|
3978
|
+
class=${s(t)}
|
|
3979
|
+
@click=${this.scrollToPrev}
|
|
3980
|
+
>
|
|
3981
|
+
<div class="nav-button-inner">
|
|
3982
|
+
<randstad-icon name="arrow_prev" size="32px"></randstad-icon>
|
|
3983
|
+
</div>
|
|
3984
|
+
</button>
|
|
3985
|
+
|
|
3986
|
+
<button
|
|
3987
|
+
class=${s(i)}
|
|
3988
|
+
@click=${this.scrollToNext}
|
|
3989
|
+
>
|
|
3990
|
+
<div class="nav-button-inner">
|
|
3991
|
+
<randstad-icon name="arrow_next" size="32px"></randstad-icon>
|
|
3992
|
+
</div>
|
|
3993
|
+
</button>
|
|
3994
|
+
</div>
|
|
3995
|
+
`}renderContent(){const t=this.getCardCustomDimensionValue("width",this.cardWidth),i=this.getCardCustomDimensionValue("height",this.cardHeight);return this.cards&&this.cards.length>0?this.cards.map((o=>e`
|
|
3996
|
+
<div class="carousel-card-item">
|
|
3997
|
+
<carousel-card
|
|
3998
|
+
.img=${o.img}
|
|
3999
|
+
.name=${o.name}
|
|
4000
|
+
.title=${o.title}
|
|
4001
|
+
.description=${o.description}
|
|
4002
|
+
.buttonLabel=${o.buttonLabel}
|
|
4003
|
+
.cardId=${o.cardId}
|
|
4004
|
+
.width=${t}
|
|
4005
|
+
.height=${i}
|
|
4006
|
+
.onClick=${o.onClick}
|
|
4007
|
+
>
|
|
4008
|
+
</carousel-card>
|
|
4009
|
+
</div>
|
|
4010
|
+
`)):e`<slot></slot>`}render(){const t=!1!==this.showNavButtons,i=!1===this.isInfiniteScrollPartial,o={"carousel-wrapper":!0,"drag-mode":!t,"dynamic-width-mode":this.isDynamicWidth,"static-width-mode":!this.isDynamicWidth,"not-ininite-scroll-partial":i};return e`
|
|
4011
|
+
<div class="carousel-container">
|
|
4012
|
+
<div class=${s(o)}>
|
|
4013
|
+
${this.renderContent()}
|
|
4014
|
+
</div>
|
|
4015
|
+
|
|
4016
|
+
${this.renderNavButtons()}
|
|
3777
4017
|
</div>
|
|
3778
|
-
`}};
|
|
4018
|
+
`}};a([L({type:Array}),n("design:type",Array)],gi.prototype,"cards",void 0),a([L({type:String}),n("design:type",String)],gi.prototype,"cardWidth",void 0),a([L({type:String}),n("design:type",String)],gi.prototype,"cardHeight",void 0),a([L({type:Number}),n("design:type",Number)],gi.prototype,"navWidth",void 0),a([L({type:Boolean}),n("design:type",Boolean)],gi.prototype,"showNavButtons",void 0),a([L({type:Boolean}),n("design:type",Boolean)],gi.prototype,"isDynamicWidth",void 0),a([L({type:Boolean}),n("design:type",Boolean)],gi.prototype,"isInfiniteScrollPartial",void 0),a([L({type:Number}),n("design:type",Number)],gi.prototype,"autoPlayDelayMs",void 0),a([B(),n("design:type",Object)],gi.prototype,"showPrevButton",void 0),a([B(),n("design:type",Object)],gi.prototype,"showNextButton",void 0),a([j(".carousel-wrapper"),n("design:type",HTMLElement)],gi.prototype,"slider",void 0),a([j("slot"),n("design:type",HTMLSlotElement)],gi.prototype,"slotElement",void 0),gi=a([l("carousel-component"),n("design:paramtypes",[])],gi);export{q as AccordionList,U as AccordionPanel,A as BaseControl,hi as CalendarOverlay,gi as Carousel,H as CarouselCard,G as Checkbox,ot as CustomModal,rt as CustomPopup,Gt as CustomRadio,Jt as CustomStepper,pi as DatePickerComponent,Xt as FilterableSelect,tt as FormGroup,et as IconComponent,st as ProgressCircle,Y as RandstadButton,Z as RandstadForm,it as RandstadNotice,Zt as TabsBar,ui as UploadFile,re as UploadImage,J as scrollbarStyles};
|
|
3779
4019
|
//# sourceMappingURL=index.js.map
|