@randstad-uca/design-system 1.0.29 → 1.0.30
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/package.json +19 -18
- package/dist/assets/icons/arrow_back.svg +0 -10
- package/dist/assets/icons/arrow_down.svg +0 -3
- package/dist/assets/icons/arrow_left.svg +0 -3
- package/dist/assets/icons/arrow_right.svg +0 -3
- package/dist/assets/icons/arrow_up.svg +0 -3
- package/dist/assets/icons/ayuda.svg +0 -12
- package/dist/assets/icons/calendar.svg +0 -20
- package/dist/assets/icons/check.svg +0 -10
- package/dist/assets/icons/close.svg +0 -10
- package/dist/assets/icons/edit.svg +0 -10
- package/dist/assets/icons/email.svg +0 -11
- package/dist/assets/icons/eye.svg +0 -11
- package/dist/assets/icons/eye_crossed.svg +0 -10
- package/dist/assets/icons/home.svg +0 -10
- package/dist/assets/icons/icon_check.svg +0 -4
- package/dist/assets/icons/icon_trash.svg +0 -7
- package/dist/assets/icons/icon_warning.svg +0 -6
- package/dist/assets/icons/image.svg +0 -5
- package/dist/assets/icons/info.svg +0 -12
- package/dist/assets/icons/settings.svg +0 -11
- package/dist/assets/icons/thumbs_up.svg +0 -11
- package/dist/assets/icons/tick-circle.svg +0 -3
- package/dist/assets/icons/trash.svg +0 -13
- package/dist/assets/icons/user.svg +0 -10
- package/dist/assets/icons/warning.svg +0 -12
- package/dist/assets/img/carousel-example.png +0 -0
- package/dist/assets/img/facebook_logo.svg +0 -4
- package/dist/assets/img/google_logo.svg +0 -13
- package/dist/assets/img/icon_check.svg +0 -4
- package/dist/assets/img/icon_trash.svg +0 -7
- package/dist/assets/img/icon_warning.svg +0 -6
- package/dist/assets/img/image-upload-circle.svg +0 -6
- package/dist/assets/img/image-upload-disabled.svg +0 -6
- package/dist/assets/img/linkedin_logo.svg +0 -3
- package/dist/components/Accordion.d.ts +0 -13
- package/dist/components/AccordionList.d.ts +0 -5
- package/dist/components/Button.d.ts +0 -16
- package/dist/components/CarouselCards.d.ts +0 -12
- package/dist/components/Checkbox.d.ts +0 -9
- package/dist/components/Form.d.ts +0 -32
- package/dist/components/FormGroup.d.ts +0 -11
- package/dist/components/Icon.d.ts +0 -10
- package/dist/components/Modal.d.ts +0 -23
- package/dist/components/Notice.d.ts +0 -9
- package/dist/components/Popup.d.ts +0 -27
- package/dist/components/ProgressCircle.d.ts +0 -7
- package/dist/components/Radio.d.ts +0 -10
- package/dist/components/Select.d.ts +0 -42
- package/dist/components/Snackbar.d.ts +0 -1
- package/dist/components/Stepper.d.ts +0 -7
- package/dist/components/Tabs.d.ts +0 -23
- package/dist/components/Upload.d.ts +0 -15
- package/dist/components/iconList.d.ts +0 -1
- package/dist/index.d.ts +0 -21
- package/dist/index.js +0 -2558
- package/dist/index.js.map +0 -1
- package/dist/package.json +0 -51
- package/dist/randstad-design-system.css +0 -1
- package/dist/stories/Accordion.stories.d.ts +0 -6
- package/dist/stories/Button.stories.d.ts +0 -29
- package/dist/stories/CarouselCards.stories.d.ts +0 -5
- package/dist/stories/Checkbox.stories.d.ts +0 -16
- package/dist/stories/Form.stories.d.ts +0 -48
- package/dist/stories/Icon.stories.d.ts +0 -6
- package/dist/stories/Modal.stories.d.ts +0 -16
- package/dist/stories/Notice.stories.d.ts +0 -72
- package/dist/stories/Popup.stories.d.ts +0 -7
- package/dist/stories/ProgressCircle.stories.d.ts +0 -5
- package/dist/stories/Radio.stories.d.ts +0 -11
- package/dist/stories/Select.stories.d.ts +0 -54
- package/dist/stories/Snackbar.stories.d.ts +0 -39
- package/dist/stories/Stepper.stories.d.ts +0 -51
- package/dist/stories/Tabs.stories.d.ts +0 -13
- package/dist/stories/Upload.stories.d.ts +0 -8
- package/dist/styles/buttons.css +0 -209
- package/dist/styles/colors.css +0 -50
- package/dist/styles/fontStyles.d.ts +0 -7
- package/dist/styles/fontStyles.ts +0 -60
- package/dist/styles/fonts.css +0 -8
- package/dist/styles/forms.css +0 -151
- package/dist/styles/globalStyles.d.ts +0 -2
- package/dist/styles/globalStyles.ts +0 -22
- package/dist/styles/icons.css +0 -25
- package/dist/styles/index.css +0 -5
- package/dist/styles/notice.css +0 -0
- package/dist/styles/select.css +0 -12
- package/dist/styles/snackbar.css +0 -0
package/dist/index.js
DELETED
|
@@ -1,2558 +0,0 @@
|
|
|
1
|
-
import{css as t,LitElement as e,html as i,nothing as o,isServer as r}from"lit";import{classMap as s}from"lit/directives/class-map.js";function n(t,e,i,o){var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2017 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
const l=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},d=globalThis,c=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,p=Symbol(),h=new WeakMap;
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright 2019 Google LLC
|
|
11
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/let u=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=h.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&h.set(e,t))}return t}toString(){return this.cssText}};const b=(t,e)=>{if(c)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=d.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}},g=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,p))(e)})(t):t,{is:y,defineProperty:v,getOwnPropertyDescriptor:m,getOwnPropertyNames:f,getOwnPropertySymbols:x,getPrototypeOf:w}=Object,k=globalThis,$=k.trustedTypes,S=$?$.emptyScript:"",C=k.reactiveElementPolyfillSupport,E=(t,e)=>t,O={toAttribute(t,e){switch(e){case Boolean:t=t?S:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},A=(t,e)=>!y(t,e),j={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:A};
|
|
13
|
-
/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2017 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/Symbol.metadata??=Symbol("metadata"),k.litPropertyMetadata??=new WeakMap;class z 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=j){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&v(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=m(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=o?.call(this);r?.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??j}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=w(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...f(t),...x(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(g(t))}else void 0!==t&&e.push(g(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return b(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:O).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:O;this._$Em=o,this[o]=r.fromAttribute(e,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const o=this.constructor,r=this[t];if(i??=o.getPropertyOptions(t),!((i.hasChanged??A)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:r},s){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==r||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}z.elementStyles=[],z.shadowRootOptions={mode:"open"},z[E("elementProperties")]=new Map,z[E("finalized")]=new Map,C?.({ReactiveElement:z}),(k.reactiveElementVersions??=[]).push("2.1.0");
|
|
18
|
-
/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2017 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/
|
|
23
|
-
const P={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:A},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 I(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
|
-
/**
|
|
25
|
-
* @license
|
|
26
|
-
* Copyright 2017 Google LLC
|
|
27
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/function L(t){return I({...t,state:!0,attribute:!1})}
|
|
29
|
-
/**
|
|
30
|
-
* @license
|
|
31
|
-
* Copyright 2017 Google LLC
|
|
32
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* @license
|
|
36
|
-
* Copyright 2017 Google LLC
|
|
37
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
-
*/
|
|
39
|
-
function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}const _=t`
|
|
40
|
-
font-family: 'Graphik', sans-serif;
|
|
41
|
-
font-weight: 400;
|
|
42
|
-
font-size: 12px;
|
|
43
|
-
line-height: 15px;
|
|
44
|
-
letter-spacing: 0%;
|
|
45
|
-
`,R=t`
|
|
46
|
-
font-family: 'Graphik', sans-serif;
|
|
47
|
-
font-weight: 400;
|
|
48
|
-
font-size: 14px;
|
|
49
|
-
line-height: 25px;
|
|
50
|
-
letter-spacing: 0%;
|
|
51
|
-
`,M=t`
|
|
52
|
-
font-family: 'Graphik', sans-serif;
|
|
53
|
-
font-weight: 400;
|
|
54
|
-
font-size: 16px;
|
|
55
|
-
line-height: 25px;
|
|
56
|
-
letter-spacing: 0%;
|
|
57
|
-
`,B=t`
|
|
58
|
-
font-family: 'Graphik', sans-serif;
|
|
59
|
-
font-weight: 400;
|
|
60
|
-
font-size: 18px;
|
|
61
|
-
line-height: 30px;
|
|
62
|
-
letter-spacing: 0%;
|
|
63
|
-
`,D=t`
|
|
64
|
-
font-family: 'Graphik', sans-serif;
|
|
65
|
-
font-weight: 400;
|
|
66
|
-
font-size: 18px;
|
|
67
|
-
line-height: 30px;
|
|
68
|
-
letter-spacing: 0%;
|
|
69
|
-
vertical-align: middle;
|
|
70
|
-
`,U=t`
|
|
71
|
-
font-family: 'Graphik', sans-serif;
|
|
72
|
-
font-weight: 400;
|
|
73
|
-
font-size: 20px;
|
|
74
|
-
line-height: 30px;
|
|
75
|
-
letter-spacing: -1%;
|
|
76
|
-
vertical-align: middle;
|
|
77
|
-
`,q=t`
|
|
78
|
-
font-family: 'Graphik', sans-serif;
|
|
79
|
-
font-weight: 400;
|
|
80
|
-
font-size: 26px;
|
|
81
|
-
line-height: 30px;
|
|
82
|
-
letter-spacing: -1%;
|
|
83
|
-
vertical-align: middle;
|
|
84
|
-
`;let V=class extends e{constructor(){super(...arguments),this.title="",this.isOpen=!1,this.isDesktop=window.innerWidth>940,this.handleResize=()=>{this.isDesktop=window.innerWidth>940}}static{this.styles=t`
|
|
85
|
-
:host {
|
|
86
|
-
display: flex;
|
|
87
|
-
flex-direction: column;
|
|
88
|
-
font-family: 'Graphik', sans-serif;
|
|
89
|
-
position: relative;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.header {
|
|
93
|
-
display: flex;
|
|
94
|
-
justify-content: space-between;
|
|
95
|
-
gap: 16px;
|
|
96
|
-
flex-direction: row;
|
|
97
|
-
align-items: center;
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
padding-bottom: 16px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.title {
|
|
103
|
-
${M}
|
|
104
|
-
color: var(--secondary-color);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.icon-wrapper {
|
|
108
|
-
width: 40px;
|
|
109
|
-
height: 40px;
|
|
110
|
-
border-radius: 50%;
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
justify-content: center;
|
|
114
|
-
transition: background-color 0.3s ease;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.icon {
|
|
118
|
-
transition: transform 0.3s;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.content {
|
|
122
|
-
overflow: hidden;
|
|
123
|
-
max-height: 0;
|
|
124
|
-
transition: max-height 0.3s ease, padding-bottom 0.3s ease;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.content.open {
|
|
128
|
-
max-height: 1000px;
|
|
129
|
-
padding-bottom: 16px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
:host::after {
|
|
133
|
-
content: '';
|
|
134
|
-
display: block;
|
|
135
|
-
height: 1px;
|
|
136
|
-
background-color: var(--secondary-color-20);
|
|
137
|
-
width: 100%;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
@media (min-width: 941px) {
|
|
141
|
-
.header {
|
|
142
|
-
align-items: flex-start;
|
|
143
|
-
}
|
|
144
|
-
.header:hover .icon-wrapper {
|
|
145
|
-
background-color: var(--primary-color-5);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
`}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}toggle(){this.isOpen=!this.isOpen}renderIcon(){return this.isOpen?i`<randstad-icon name="arrow_up" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>`:i`<randstad-icon name="arrow_down" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>`}render(){return i`
|
|
149
|
-
<div class="header" @click=${this.toggle}>
|
|
150
|
-
<div class="title">${this.title}</div>
|
|
151
|
-
<div class="icon">
|
|
152
|
-
${this.isDesktop?i`
|
|
153
|
-
<div class="icon-wrapper">
|
|
154
|
-
${this.renderIcon()}
|
|
155
|
-
</div>
|
|
156
|
-
`:this.renderIcon()}
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
<div class="content ${this.isOpen?"open":""}">
|
|
160
|
-
<slot></slot>
|
|
161
|
-
</div>
|
|
162
|
-
`}};n([I({type:String}),a("design:type",Object)],V.prototype,"title",void 0),n([L(),a("design:type",Object)],V.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],V.prototype,"isDesktop",void 0),V=n([l("accordion-panel")],V);let N=class extends e{static{this.styles=t`
|
|
163
|
-
:host {
|
|
164
|
-
display: flex;
|
|
165
|
-
flex-direction: column;
|
|
166
|
-
gap: 16px;
|
|
167
|
-
}
|
|
168
|
-
`}render(){return i`<slot></slot>`}};N=n([l("accordion-list")],N);let G=class extends e{constructor(){super(...arguments),this.variant="button-primary",this.size="md",this.label="",this.loader=!1,this.iconPosition="left",this.disabled=!1,this.iconName=null,this.type="button"}static{this.styles=t`
|
|
169
|
-
:host {
|
|
170
|
-
display: inline-block;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.button {
|
|
174
|
-
display: flex;
|
|
175
|
-
align-items: center;
|
|
176
|
-
justify-content: center;
|
|
177
|
-
border-radius: 4px;
|
|
178
|
-
cursor: pointer;
|
|
179
|
-
font-weight: 400;
|
|
180
|
-
padding: 16px;
|
|
181
|
-
border: none;
|
|
182
|
-
transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
|
|
183
|
-
gap: 4px;
|
|
184
|
-
width: 100%;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.button-lg {
|
|
188
|
-
${B}
|
|
189
|
-
min-height: 62px;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.button-md {
|
|
193
|
-
${M}
|
|
194
|
-
min-height: 57px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/* Primary */
|
|
198
|
-
.button-primary {
|
|
199
|
-
background-color: var(--primary-color);
|
|
200
|
-
color: var(--white);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.button-primary:not([disabled]):hover {
|
|
204
|
-
background-color: var(--primary-button-hover);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.button-primary:not([disabled]):active {
|
|
208
|
-
background-color: var(--primary-button-active);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.button-primary:not([disabled]):focus-visible {
|
|
212
|
-
outline: 2px solid var(--primary-button-focus);
|
|
213
|
-
outline-offset: 2px;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.button-primary[disabled] {
|
|
217
|
-
color: var(--secondary-color-60);
|
|
218
|
-
background-color: var(--secondary-color-20);
|
|
219
|
-
cursor: not-allowed;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/* Secondary */
|
|
223
|
-
.button-secondary {
|
|
224
|
-
background: none;
|
|
225
|
-
color: var(--primary-color);
|
|
226
|
-
border: 1px solid var(--primary-color);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.button-secondary:not([disabled]):hover {
|
|
230
|
-
color: var(--primary-button-hover);
|
|
231
|
-
border-color: var(--primary-button-hover);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.button-secondary:not([disabled]):active {
|
|
235
|
-
color: var(--secondary-color-80);
|
|
236
|
-
border-color: var(--secondary-color-80);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.button-secondary:not([disabled]):focus-visible {
|
|
240
|
-
outline: 2px solid var(--primary-color);
|
|
241
|
-
outline-offset: 2px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.button-secondary[disabled] {
|
|
245
|
-
color: var(--secondary-color-60);
|
|
246
|
-
border-color: var(--secondary-color-60);
|
|
247
|
-
cursor: not-allowed;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/* Tertiary */
|
|
251
|
-
.button-tertiary {
|
|
252
|
-
background: none;
|
|
253
|
-
border: none;
|
|
254
|
-
color: var(--primary-color);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.button-tertiary:not([disabled]):hover {
|
|
258
|
-
background: var(--primary-color-5);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.button-tertiary:not([disabled]):active {
|
|
262
|
-
background-color: var(--primary-color-10);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.button-tertiary:not([disabled]):focus-visible {
|
|
266
|
-
outline: 2px solid var(--primary-color);
|
|
267
|
-
outline-offset: 2px;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.button-tertiary[disabled] {
|
|
271
|
-
color: var(--secondary-color-60);
|
|
272
|
-
cursor: not-allowed;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/* Round */
|
|
276
|
-
.button-round {
|
|
277
|
-
width: 48px;
|
|
278
|
-
height: 48px;
|
|
279
|
-
border-radius: 50%;
|
|
280
|
-
background-color: var(--white);
|
|
281
|
-
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
|
|
282
|
-
padding: 0;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.button-round:not([disabled]):hover {
|
|
286
|
-
background-color: var(--randstad-blue-10);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.button-round:not([disabled]):active {
|
|
290
|
-
background-color: var(--randstad-blue-40);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.button-round:not([disabled]):focus-visible {
|
|
294
|
-
outline: 2px solid var(--primary-color);
|
|
295
|
-
outline-offset: 2px;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.button-round[disabled] {
|
|
299
|
-
background-color: var(--secondary-color-20);
|
|
300
|
-
cursor: not-allowed;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.button-round img.button-icon {
|
|
304
|
-
width: 24px;
|
|
305
|
-
height: 24px;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/* Loader */
|
|
309
|
-
.loader {
|
|
310
|
-
display: flex;
|
|
311
|
-
gap: 8px;
|
|
312
|
-
justify-content: center;
|
|
313
|
-
align-items: center;
|
|
314
|
-
width: 100%;
|
|
315
|
-
height: 100%;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.dot {
|
|
319
|
-
border-radius: 50%;
|
|
320
|
-
display: inline-block;
|
|
321
|
-
animation: growAndFade 2.4s infinite ease-in-out;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.button-md .dot {
|
|
325
|
-
width: 6px;
|
|
326
|
-
height: 6px;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.button-lg .dot {
|
|
330
|
-
width: 8px;
|
|
331
|
-
height: 8px;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.dot:nth-child(1) { animation-delay: 0s; }
|
|
335
|
-
.dot:nth-child(2) { animation-delay: 0.8s; }
|
|
336
|
-
.dot:nth-child(3) { animation-delay: 1.6s; }
|
|
337
|
-
|
|
338
|
-
@keyframes growAndFade {
|
|
339
|
-
0% { transform: scale(1); }
|
|
340
|
-
16.67% { transform: scale(1.5); }
|
|
341
|
-
33.33% { transform: scale(1.5); }
|
|
342
|
-
50% { transform: scale(1); }
|
|
343
|
-
100% { transform: scale(1); }
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.button-primary.loader .dot,
|
|
347
|
-
.button-secondary.loader .dot {
|
|
348
|
-
background-color: var(--white);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.button-secondary.loader {
|
|
352
|
-
background-color: var(--primary-color);
|
|
353
|
-
border: none;
|
|
354
|
-
color: var(--white);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.button-card {
|
|
358
|
-
font-family: 'Graphik';
|
|
359
|
-
background-color: var(--primary-color);
|
|
360
|
-
color: var(--white);
|
|
361
|
-
border-radius: 4px;
|
|
362
|
-
padding: 4px 16px;
|
|
363
|
-
font-weight: 400;
|
|
364
|
-
font-size: 12px;
|
|
365
|
-
line-height: 15px;
|
|
366
|
-
letter-spacing: 0%;
|
|
367
|
-
text-align: center;
|
|
368
|
-
vertical-align: middle;
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
.button-card:not([disabled]):hover {
|
|
373
|
-
background-color: #175197;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.button-card:not([disabled]):active {
|
|
377
|
-
background-color: #124077;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.button-card:not([disabled]):focus-visible {
|
|
381
|
-
outline: 2px solid var(--primary-color);
|
|
382
|
-
outline-offset: 2px;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.button-card[disabled] {
|
|
386
|
-
background-color: #CFD1D9;
|
|
387
|
-
color: #6F758D;
|
|
388
|
-
cursor: not-allowed;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
`}handleClick(t){if(!this.disabled)if("submit"===this.type){const t=this.closest("form");t&&t.requestSubmit()}else this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}render(){const t={button:!0,[this.variant]:!0,loader:this.loader,[`button-${this.size}`]:"button-round"!==this.variant&&"button-card"!==this.variant},e="button-tertiary"===this.variant?"var(--primary-color)":"white";return i`
|
|
392
|
-
<button
|
|
393
|
-
part="button"
|
|
394
|
-
type=${this.type}
|
|
395
|
-
class=${s(t)}
|
|
396
|
-
?disabled=${this.disabled}
|
|
397
|
-
?aria-busy=${this.loader}
|
|
398
|
-
@click=${this.handleClick}
|
|
399
|
-
>
|
|
400
|
-
${this.loader?i`
|
|
401
|
-
<div class="loader">
|
|
402
|
-
<span class="dot" style="background-color: ${e};"></span>
|
|
403
|
-
<span class="dot" style="background-color: ${e};"></span>
|
|
404
|
-
<span class="dot" style="background-color: ${e};"></span>
|
|
405
|
-
</div>
|
|
406
|
-
`:i`
|
|
407
|
-
${this.iconSrc&&"button-round"===this.variant?i`<img src=${this.iconSrc} alt="icon" class="button-icon" part="button-icon"/>`:""}
|
|
408
|
-
${this.iconName&&"button-round"!==this.variant&&"left"===this.iconPosition?i`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
|
|
409
|
-
${this.label?i`<span part="label">${this.label}</span>`:i`<slot></slot>`}
|
|
410
|
-
${this.iconName&&"button-round"!==this.variant&&"right"===this.iconPosition?i`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
|
|
411
|
-
`}
|
|
412
|
-
</button>
|
|
413
|
-
`}};n([I({type:String}),a("design:type",String)],G.prototype,"variant",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"size",void 0),n([I({type:String}),a("design:type",Object)],G.prototype,"label",void 0),n([I({type:Boolean}),a("design:type",Object)],G.prototype,"loader",void 0),n([I({type:String,attribute:"icon-src"}),a("design:type",String)],G.prototype,"iconSrc",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"iconPosition",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],G.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],G.prototype,"iconName",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"type",void 0),G=n([l("randstad-button")],G);let H=class extends e{constructor(){super(...arguments),this.img="",this.name="",this.title="",this.description="",this.url="#",this.buttonLabel="Contactanos"}static{this.styles=t`
|
|
414
|
-
:host {
|
|
415
|
-
display: inline-block;
|
|
416
|
-
font-family: "Graphik", sans-serif;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.image-container {
|
|
420
|
-
width: 280px;
|
|
421
|
-
height: 390px;
|
|
422
|
-
position: relative;
|
|
423
|
-
border-radius: 8px;
|
|
424
|
-
overflow: hidden;
|
|
425
|
-
background-size: cover;
|
|
426
|
-
background-position: center;
|
|
427
|
-
background-repeat: no-repeat;
|
|
428
|
-
display: flex;
|
|
429
|
-
align-items: flex-end;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.overlay-gradient,
|
|
433
|
-
.overlay-hover {
|
|
434
|
-
position: absolute;
|
|
435
|
-
inset: 0;
|
|
436
|
-
border-radius: 8px;
|
|
437
|
-
transition: opacity 1s ease;
|
|
438
|
-
z-index: 0;
|
|
439
|
-
pointer-events: none;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
.overlay-gradient {
|
|
443
|
-
background: linear-gradient(180deg, rgba(15, 25, 65, 0) 0%, rgba(15, 25, 65, 0.279522) 48.01%, rgba(15, 25, 65, 0.6) 80.13%, rgba(15, 25, 65, 0.6) 100%);
|
|
444
|
-
opacity: 1;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.overlay-hover {
|
|
448
|
-
background: #0F1941CC;
|
|
449
|
-
opacity: 0;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.image-container:hover .overlay-hover {
|
|
453
|
-
opacity: 1;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.content-container {
|
|
457
|
-
position: relative;
|
|
458
|
-
z-index: 1;
|
|
459
|
-
color: #FFFFFF;
|
|
460
|
-
padding: 24px;
|
|
461
|
-
box-sizing: border-box;
|
|
462
|
-
width: 100%;
|
|
463
|
-
display: flex;
|
|
464
|
-
flex-direction: column;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.title-wrapper {
|
|
468
|
-
margin-bottom: 0; /* reset, por si acaso */
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.title {
|
|
472
|
-
${B}
|
|
473
|
-
margin: 0;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.details {
|
|
477
|
-
max-height: 0;
|
|
478
|
-
overflow: hidden;
|
|
479
|
-
opacity: 0;
|
|
480
|
-
transform: translateY(40px);
|
|
481
|
-
transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.image-container:hover .details {
|
|
485
|
-
max-height: 240px;
|
|
486
|
-
opacity: 1;
|
|
487
|
-
transform: translateY(0);
|
|
488
|
-
overflow: visible;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
.description {
|
|
492
|
-
${R}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
::part(button) {
|
|
496
|
-
color: white;
|
|
497
|
-
border: 1px solid white;
|
|
498
|
-
background: transparent;
|
|
499
|
-
text-align: left;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
::part(button):hover {
|
|
503
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
::part(button):active {
|
|
507
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
508
|
-
}
|
|
509
|
-
`}handleClick(){this.dispatchEvent(new CustomEvent("card-click",{detail:{img:this.img,name:this.name,title:this.title,description:this.description,url:this.url},bubbles:!0,composed:!0}))}render(){return i`
|
|
510
|
-
<div class="image-container" style="background-image: url(${this.img});">
|
|
511
|
-
<div class="overlay-gradient"></div>
|
|
512
|
-
<div class="overlay-hover"></div>
|
|
513
|
-
<div class="content-container">
|
|
514
|
-
<div class="title-wrapper">
|
|
515
|
-
<h3 class="title">${this.name}</h3>
|
|
516
|
-
</div>
|
|
517
|
-
<div class="details">
|
|
518
|
-
<p class="description">${this.description}</p>
|
|
519
|
-
<randstad-button
|
|
520
|
-
variant="button-tertiary"
|
|
521
|
-
.label=${this.buttonLabel}
|
|
522
|
-
@button-click=${this.handleClick}
|
|
523
|
-
></randstad-button>
|
|
524
|
-
</div>
|
|
525
|
-
</div>
|
|
526
|
-
</div>
|
|
527
|
-
`}};n([I({type:String}),a("design:type",Object)],H.prototype,"img",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"name",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"title",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"description",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"url",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"buttonLabel",void 0),H=n([l("carousel-card")],H);let K=class extends e{constructor(){super(...arguments),this.checked=!1,this.error=!1,this.disabled=!1}static{this.styles=t`
|
|
528
|
-
:host {
|
|
529
|
-
display: block;
|
|
530
|
-
max-width: 100%;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
label {
|
|
534
|
-
${R}
|
|
535
|
-
display: flex;
|
|
536
|
-
align-items: center;
|
|
537
|
-
gap: 8px;
|
|
538
|
-
color: var(--secondary-color);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
input[type="checkbox"] {
|
|
542
|
-
min-width: 24px;
|
|
543
|
-
min-height: 24px;
|
|
544
|
-
cursor: pointer;
|
|
545
|
-
border-radius: 4px;
|
|
546
|
-
border: 1px solid var(--secondary-color-20);
|
|
547
|
-
appearance: none;
|
|
548
|
-
position: relative;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
input[type="checkbox"]:checked {
|
|
552
|
-
background-color: var(--primary-color);
|
|
553
|
-
border: 1px solid var(--primary-color);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
input[type="checkbox"]:checked::after {
|
|
557
|
-
content: '';
|
|
558
|
-
position: absolute;
|
|
559
|
-
left: 8px;
|
|
560
|
-
top: 4px;
|
|
561
|
-
width: 5px;
|
|
562
|
-
height: 11px;
|
|
563
|
-
border: solid white;
|
|
564
|
-
border-width: 0 1px 1px 0;
|
|
565
|
-
transform: rotate(45deg);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
input[type="checkbox"]:checked:disabled::after {
|
|
569
|
-
border-color: var(--secondary-color-40);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
label.error input[type="checkbox"]:checked:disabled::after {
|
|
573
|
-
border-color: white;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.terms-text {
|
|
577
|
-
display: inline;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
.terms-text ::slotted(a) {
|
|
581
|
-
color: var(--primary-color);
|
|
582
|
-
text-decoration: none;
|
|
583
|
-
cursor: pointer;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
input[type="checkbox"].error,
|
|
587
|
-
label.error input[type="checkbox"]:not(:disabled) {
|
|
588
|
-
border-color: var(--ui-negative);
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
/* Hover sin error (solo si no está deshabilitado) */
|
|
592
|
-
input[type="checkbox"]:hover:not(:disabled):not(.error) {
|
|
593
|
-
box-shadow: 0 0 0 4px var(--secondary-color-10);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/* Hover con error (solo si no está deshabilitado) */
|
|
597
|
-
label.error input[type="checkbox"]:hover:not(:disabled) {
|
|
598
|
-
box-shadow: 0px 0px 0px 4px #E00F0F1A;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/* ✅ Focus sin error */
|
|
602
|
-
input[type="checkbox"]:focus-visible:not(:disabled):not(.error),
|
|
603
|
-
label:not(.error) input[type="checkbox"]:focus-visible:not(:disabled) {
|
|
604
|
-
outline: none;
|
|
605
|
-
box-shadow: 0 0 0 4px var(--secondary-color-10);
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
/* ❌ Focus con error */
|
|
609
|
-
label.error input[type="checkbox"]:focus-visible:not(:disabled) {
|
|
610
|
-
outline: none;
|
|
611
|
-
box-shadow: 0 0 0 4px #E00F0F1A;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
input[type="checkbox"].error:checked,
|
|
615
|
-
label.error input[type="checkbox"]:checked {
|
|
616
|
-
background-color: var(--ui-negative);
|
|
617
|
-
border-color: var(--ui-negative);
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
input[type="checkbox"]:disabled {
|
|
621
|
-
background-color: var(--secondary-color-10);
|
|
622
|
-
border-color: var(--secondary-color-20);
|
|
623
|
-
cursor: not-allowed;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
`}toggleCheck(t){this.checked=t.target.checked,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}render(){return i`
|
|
627
|
-
<label class="${this.error?"error":""} ${this.disabled?"disabled":""}">
|
|
628
|
-
<input
|
|
629
|
-
type="checkbox"
|
|
630
|
-
role="checkbox"
|
|
631
|
-
aria-checked=${this.checked?"true":"false"}
|
|
632
|
-
.checked=${this.checked}
|
|
633
|
-
?disabled=${this.disabled}
|
|
634
|
-
@change=${this.toggleCheck}
|
|
635
|
-
@focus=${()=>this.setAttribute("focused","")}
|
|
636
|
-
@blur=${()=>this.removeAttribute("focused")}
|
|
637
|
-
/>
|
|
638
|
-
<span class="terms-text">
|
|
639
|
-
<slot></slot>
|
|
640
|
-
</span>
|
|
641
|
-
</label>
|
|
642
|
-
`}};n([I({type:Boolean,reflect:!0}),a("design:type",Object)],K.prototype,"checked",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"error",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"disabled",void 0),K=n([l("randstad-checkbox")],K);let Y=class extends e{constructor(){super(...arguments),this.value="",this.size="md",this.icon=null,this.helper=null,this.error=!1,this.errorMessage="",this.disabled=!1,this.typing=!1,this.type="text",this.isPasswordVisible=!1,this.cleanButton=!1,this.required=!1,this.optional=!1}static{this.styles=t`
|
|
643
|
-
:host {
|
|
644
|
-
display: block;
|
|
645
|
-
font-family: 'Graphik', sans-serif;
|
|
646
|
-
width: 100%;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
.form {
|
|
650
|
-
display: flex;
|
|
651
|
-
flex-direction: column;
|
|
652
|
-
gap: 8px;
|
|
653
|
-
width: 100%;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
.label-container {
|
|
657
|
-
display: flex;
|
|
658
|
-
align-items: center;
|
|
659
|
-
justify-content: space-between;
|
|
660
|
-
gap: 8px;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
.form-label {
|
|
664
|
-
${M}
|
|
665
|
-
display: flex;
|
|
666
|
-
align-items: baseline;
|
|
667
|
-
flex-direction: row;
|
|
668
|
-
gap: 4px;
|
|
669
|
-
color: var(--label-color, var(--secondary-color-80));
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
.form-container {
|
|
673
|
-
position: relative;
|
|
674
|
-
display: flex;
|
|
675
|
-
align-items: center;
|
|
676
|
-
width: 100%;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
.form-input {
|
|
680
|
-
${B}
|
|
681
|
-
padding: 16px;
|
|
682
|
-
border: 1px solid var(--secondary-color-10);
|
|
683
|
-
border-radius: 4px;
|
|
684
|
-
outline: none;
|
|
685
|
-
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
686
|
-
width: 100%;
|
|
687
|
-
color: var(--secondary-color);
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
.form.error .form-input {
|
|
691
|
-
background-color: var(--ui-negative-5);
|
|
692
|
-
border-color: var(--ui-negative);
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
/* Hover normal (sin error ni foco) */
|
|
696
|
-
.form:not(.error):not(:focus-within) .form-input:hover {
|
|
697
|
-
box-shadow: 0px 0px 0px 4px var(--form-hover-shadow);
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
/* Hover con error (sin foco) */
|
|
701
|
-
.form.error:not(:focus-within) .form-input:hover {
|
|
702
|
-
box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
.form-input:focus {
|
|
706
|
-
border: 2px solid var(--primary-color)
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
.form.disabled .form-input {
|
|
710
|
-
background-color: var(--secondary-color-10);
|
|
711
|
-
cursor: not-allowed;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
input::placeholder {
|
|
715
|
-
${B}
|
|
716
|
-
color: var(--secondary-color-40);
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
.input-with-button {
|
|
720
|
-
display: flex;
|
|
721
|
-
align-items: center;
|
|
722
|
-
width: 100%;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
.input-with-button input {
|
|
726
|
-
width: 100%;
|
|
727
|
-
padding-right: 40px;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
.input-with-button button {
|
|
731
|
-
position: absolute;
|
|
732
|
-
right: 10px;
|
|
733
|
-
top: 50%;
|
|
734
|
-
transform: translateY(-50%);
|
|
735
|
-
background: transparent;
|
|
736
|
-
border: none;
|
|
737
|
-
cursor: pointer;
|
|
738
|
-
display: flex;
|
|
739
|
-
align-items: center;
|
|
740
|
-
justify-content: center;
|
|
741
|
-
width: 40px;
|
|
742
|
-
height: 40px;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
.toggle-password randstad-icon {
|
|
746
|
-
width: 100%;
|
|
747
|
-
height: 100%;
|
|
748
|
-
max-width: 32px;
|
|
749
|
-
max-height: 32px;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
textarea {
|
|
753
|
-
${B}
|
|
754
|
-
resize: none;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
textarea.form-input {
|
|
758
|
-
min-height: 100px;
|
|
759
|
-
width: 100%;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.form.disabled textarea.form-input {
|
|
763
|
-
background-color: var(--secondary-color-10);
|
|
764
|
-
cursor: not-allowed;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
.helper-description {
|
|
768
|
-
${M}
|
|
769
|
-
color: var(--secondary-color-40);
|
|
770
|
-
margin: 0px;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
.help-icon {
|
|
774
|
-
cursor:pointer;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
.error-message {
|
|
778
|
-
${M}
|
|
779
|
-
color: var(--ui-negative);
|
|
780
|
-
margin: 0px;
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
.link-text {
|
|
784
|
-
${M}
|
|
785
|
-
color: var(--primary-color);
|
|
786
|
-
cursor: pointer;
|
|
787
|
-
text-align: end;
|
|
788
|
-
text-decoration: none;
|
|
789
|
-
vertical-align: middle;
|
|
790
|
-
display: inline;
|
|
791
|
-
padding: 0;
|
|
792
|
-
margin: 0;
|
|
793
|
-
line-height: normal;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
.link-text:hover {
|
|
797
|
-
color: var(--secondary-color);
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
randstad-icon {
|
|
801
|
-
color: var(--primary-color);
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
.clean-button {
|
|
805
|
-
position: absolute;
|
|
806
|
-
right: 10px;
|
|
807
|
-
top: 50%;
|
|
808
|
-
transform: translateY(-50%);
|
|
809
|
-
background: transparent;
|
|
810
|
-
border: none;
|
|
811
|
-
cursor: pointer;
|
|
812
|
-
display: flex;
|
|
813
|
-
align-items: center;
|
|
814
|
-
justify-content: center;
|
|
815
|
-
width: 40px;
|
|
816
|
-
height: 40px;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
.clean-button randstad-icon {
|
|
820
|
-
width: 24px;
|
|
821
|
-
height: 24px;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
// TOOLTIP, NO SE ESTÁ USANDO EN FORMS EN ESTE MOMENTO, PERO SE DEJA POR SI SE NECESITA
|
|
825
|
-
.tooltip-wrapper {
|
|
826
|
-
position: relative;
|
|
827
|
-
display: inline-flex;
|
|
828
|
-
align-items: center;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
.tooltip {
|
|
832
|
-
visibility: hidden;
|
|
833
|
-
position: absolute;
|
|
834
|
-
top: auto;
|
|
835
|
-
right: 125%;
|
|
836
|
-
left: auto;
|
|
837
|
-
transform: none;
|
|
838
|
-
background-color: #333;
|
|
839
|
-
color: #fff;
|
|
840
|
-
padding: 8px 12px;
|
|
841
|
-
border-radius: 4px;
|
|
842
|
-
font-size: 14px;
|
|
843
|
-
line-height: 20px;
|
|
844
|
-
white-space: nowrap;
|
|
845
|
-
z-index: 10;
|
|
846
|
-
opacity: 0;
|
|
847
|
-
transition: opacity 0.2s ease;
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
.tooltip::after {
|
|
851
|
-
content: '';
|
|
852
|
-
position: absolute;
|
|
853
|
-
right: -6px;
|
|
854
|
-
bottom: 50%;
|
|
855
|
-
transform: translateY(50%);
|
|
856
|
-
width: 0;
|
|
857
|
-
height: 0;
|
|
858
|
-
border-style: solid;
|
|
859
|
-
border-width: 6px 0 6px 6px;
|
|
860
|
-
border-color: transparent transparent transparent #333;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
.tooltip-wrapper:hover .tooltip {
|
|
864
|
-
visibility: visible;
|
|
865
|
-
opacity: 1;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
.required {
|
|
869
|
-
color: var(--ui-negative);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
.optional {
|
|
873
|
-
color: var(--secondary-color-60);
|
|
874
|
-
${_}
|
|
875
|
-
}
|
|
876
|
-
`}togglePassword(t){this.isPasswordVisible=!this.isPasswordVisible;const e=t.currentTarget.parentElement?.querySelector("input");e&&(e.type=this.isPasswordVisible?"text":"password"),this.requestUpdate()}handleInput(t){const e=t.target.value;void 0!==this.maxLength&&"textarea"!==this.type?this.value=e.slice(0,this.maxLength):this.value=e,this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleClear(){this.value="",this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleLinkClick(t){t.preventDefault(),this.linkRoute&&this.dispatchEvent(new CustomEvent("linkClicked",{detail:this.linkRoute,bubbles:!0,composed:!0}))}handleHelpClick(){this.helpLink&&window.open(this.helpLink,"_blank")}handleKeyDown(t){if("Enter"===t.key){const t=new Event("submit",{bubbles:!0,composed:!0,cancelable:!0}),e=this.closest("form");e&&e.dispatchEvent(t)}}render(){const t=this.cleanButton&&this.value&&"password"!==this.type&&"textarea"!==this.type;return i`
|
|
877
|
-
<div
|
|
878
|
-
class="form ${this.error?"error":""} ${this.disabled?"disabled":""}"
|
|
879
|
-
style=${this.labelColor?`--label-color: ${this.labelColor}`:o}
|
|
880
|
-
>
|
|
881
|
-
${this.label?i`
|
|
882
|
-
<div class="label-container">
|
|
883
|
-
<label class="form-label">
|
|
884
|
-
${this.label}
|
|
885
|
-
${this.required?i`<span class="required">*</span>`:this.optional?i`<span class="optional">opcional</span>`:o}
|
|
886
|
-
</label>
|
|
887
|
-
${this.helpLink?i`
|
|
888
|
-
<div class="tooltip-wrapper">
|
|
889
|
-
<randstad-icon
|
|
890
|
-
class="help-icon"
|
|
891
|
-
name="ayuda"
|
|
892
|
-
size="20px"
|
|
893
|
-
@click=${this.handleHelpClick}>
|
|
894
|
-
</randstad-icon>
|
|
895
|
-
</div>
|
|
896
|
-
`:o}
|
|
897
|
-
</div>
|
|
898
|
-
`:o}
|
|
899
|
-
|
|
900
|
-
<div class="form-container">
|
|
901
|
-
${"left"===this.icon?i`<span class="icon left"></span>`:o}
|
|
902
|
-
|
|
903
|
-
<div class="input-with-button">
|
|
904
|
-
${"textarea"===this.type?i`
|
|
905
|
-
<textarea
|
|
906
|
-
class="form-input"
|
|
907
|
-
placeholder=${this.placeholder||""}
|
|
908
|
-
.value=${this.value}
|
|
909
|
-
?disabled=${this.disabled}
|
|
910
|
-
@input=${this.handleInput}
|
|
911
|
-
@keydown=${this.handleKeyDown}
|
|
912
|
-
maxlength=${this.maxLength??o}
|
|
913
|
-
></textarea>`:i`
|
|
914
|
-
<input
|
|
915
|
-
class="form-input"
|
|
916
|
-
type=${"password"!==this.type||this.isPasswordVisible?"text":"password"}
|
|
917
|
-
placeholder=${this.placeholder||""}
|
|
918
|
-
.value=${this.value}
|
|
919
|
-
?disabled=${this.disabled}
|
|
920
|
-
@input=${this.handleInput}
|
|
921
|
-
@keydown=${this.handleKeyDown}
|
|
922
|
-
maxlength=${this.maxLength??o}
|
|
923
|
-
/>
|
|
924
|
-
|
|
925
|
-
${"password"===this.type?i`<button type="button" class="toggle-password" @click=${this.togglePassword}>
|
|
926
|
-
${this.isPasswordVisible?i`<randstad-icon name='eye_crossed' size="24px"></randstad-icon>`:i`<randstad-icon name='eye' size="24px"></randstad-icon>`}
|
|
927
|
-
</button>`:o}
|
|
928
|
-
|
|
929
|
-
${t?i`<button type="button" class="clean-button" @click=${this.handleClear}>
|
|
930
|
-
<randstad-icon name="close" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>
|
|
931
|
-
</button>`:o}
|
|
932
|
-
`}
|
|
933
|
-
</div>
|
|
934
|
-
|
|
935
|
-
${"right"===this.icon?i`<span class="icon right"></span>`:o}
|
|
936
|
-
</div>
|
|
937
|
-
|
|
938
|
-
${this.error?i`
|
|
939
|
-
<p class="error-message">
|
|
940
|
-
${this.errorMessage?this.errorMessage:i`<slot name="error-extended"></slot>`}
|
|
941
|
-
</p>`:o}
|
|
942
|
-
|
|
943
|
-
${this.linkText&&this.linkRoute?i`<div style="text-align: end;">
|
|
944
|
-
<a class="link-text" @click=${this.handleLinkClick}>${this.linkText}</a>
|
|
945
|
-
</div>`:o}
|
|
946
|
-
|
|
947
|
-
${this.helper?i`<p class="helper-description">${this.helper}</p>`:o}
|
|
948
|
-
</div>
|
|
949
|
-
`}};n([I({type:String}),a("design:type",String)],Y.prototype,"placeholder",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"labelColor",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"value",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"size",void 0),n([I({type:String}),a("design:type",Object)],Y.prototype,"icon",void 0),n([I({type:String}),a("design:type",Object)],Y.prototype,"helper",void 0),n([I({type:Boolean}),a("design:type",Boolean)],Y.prototype,"error",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"errorMessage",void 0),n([I({type:Boolean}),a("design:type",Boolean)],Y.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Boolean)],Y.prototype,"typing",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"type",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"tooltipMessage",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"linkText",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"linkRoute",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Y.prototype,"isPasswordVisible",void 0),n([I({type:Boolean}),a("design:type",Boolean)],Y.prototype,"cleanButton",void 0),n([I({type:Number}),a("design:type",Number)],Y.prototype,"maxLength",void 0),n([I({type:Boolean}),a("design:type",Object)],Y.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],Y.prototype,"optional",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"helpLink",void 0),Y=n([l("randstad-form")],Y);let W=class extends e{constructor(){super(...arguments),this.label="",this.error=!1,this.errorMessage="",this.required=!1,this.optional=!1}static{this.styles=t`
|
|
950
|
-
:host {
|
|
951
|
-
display: flex;
|
|
952
|
-
flex-direction: column;
|
|
953
|
-
font-family: 'Graphik', sans-serif;
|
|
954
|
-
gap: 8px;
|
|
955
|
-
width: 100%;
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
.form-label {
|
|
959
|
-
${M}
|
|
960
|
-
display: flex;
|
|
961
|
-
align-items: baseline;
|
|
962
|
-
flex-direction: row;
|
|
963
|
-
gap: 4px;
|
|
964
|
-
color: var(--label-color, var(--secondary-color-80));
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
.fields {
|
|
968
|
-
display: flex;
|
|
969
|
-
flex-direction: column;
|
|
970
|
-
gap: 16px; /* espaciado entre inputs */
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
.helper {
|
|
974
|
-
${M}
|
|
975
|
-
color: var(--secondary-color-40);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
.error {
|
|
979
|
-
${M}
|
|
980
|
-
color: var(--ui-negative);
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
.required {
|
|
984
|
-
color: var(--ui-negative);
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
.optional {
|
|
988
|
-
color: var(--secondary-color-60);
|
|
989
|
-
${_}
|
|
990
|
-
}
|
|
991
|
-
`}render(){return i`
|
|
992
|
-
<label class="form-label">
|
|
993
|
-
${this.label}
|
|
994
|
-
${this.required?i`<span class="required">*</span>`:this.optional?i`<span class="optional">opcional</span>`:o}
|
|
995
|
-
</label>
|
|
996
|
-
|
|
997
|
-
<div class="fields">
|
|
998
|
-
<slot></slot>
|
|
999
|
-
</div>
|
|
1000
|
-
|
|
1001
|
-
${this.error?i`<p class="error">${this.errorMessage}</p>`:this.helper?i`<p class="helper">${this.helper}</p>`:null}
|
|
1002
|
-
`}};n([I({type:String}),a("design:type",Object)],W.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],W.prototype,"helper",void 0),n([I({type:Boolean}),a("design:type",Object)],W.prototype,"error",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"errorMessage",void 0),n([I({type:Boolean}),a("design:type",Object)],W.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],W.prototype,"optional",void 0),W=n([l("randstad-form-group")],W);class X extends e{constructor(){super(...arguments),this.name="",this.size="24px"}static{this.styles=t`
|
|
1003
|
-
:host {
|
|
1004
|
-
display: inline-flex;
|
|
1005
|
-
width: var(--icon-size, 24px);
|
|
1006
|
-
height: var(--icon-size, 24px);
|
|
1007
|
-
align-items: center;
|
|
1008
|
-
justify-content: center;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
svg {
|
|
1012
|
-
width: var(--icon-size, 24px);
|
|
1013
|
-
height: var(--icon-size, 24px);
|
|
1014
|
-
fill: var(--icon-color, currentColor);
|
|
1015
|
-
}
|
|
1016
|
-
`}connectedCallback(){super.connectedCallback(),this.style.setProperty("--icon-size",this.size)}updated(t){t.has("size")&&this.style.setProperty("--icon-size",this.size)}async loadIcon(){try{const t=await fetch(`/assets/icons/${this.name}.svg`);if(!t.ok)throw new Error("Icon not found");const e=await t.text(),i=new DOMParser,o=i.parseFromString(e,"image/svg+xml").querySelector("svg");if(!o)throw new Error("No se encontró un elemento SVG válido");o.removeAttribute("fill"),o.setAttribute("width",this.size),o.setAttribute("height",this.size),o.querySelectorAll("[fill]").forEach((t=>t.removeAttribute("fill"))),o.setAttribute("fill","currentColor"),"innerHTML"in this.renderRoot&&(this.renderRoot.innerHTML=""),this.renderRoot.appendChild(o)}catch(t){console.error(`❌ Error cargando icono ${this.name}:`,t),"innerHTML"in this.renderRoot&&(this.renderRoot.innerHTML="<span>⚠️</span>")}}render(){return this.loadIcon(),null}}n([I({type:String}),a("design:type",Object)],X.prototype,"name",void 0),n([I({type:String}),a("design:type",Object)],X.prototype,"size",void 0),customElements.define("randstad-icon",X);let J=class extends e{constructor(){super(...arguments),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1}static{this.styles=t`
|
|
1017
|
-
:host {
|
|
1018
|
-
display: block;
|
|
1019
|
-
font-family: 'Graphik', sans-serif;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.container {
|
|
1023
|
-
${M}
|
|
1024
|
-
display: flex;
|
|
1025
|
-
align-items: flex-start;
|
|
1026
|
-
gap: 8px;
|
|
1027
|
-
border-radius: 8px;
|
|
1028
|
-
padding: 16px;
|
|
1029
|
-
color: var(--secondary-color);
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
.icon {
|
|
1033
|
-
font-size: 34px;
|
|
1034
|
-
flex-shrink: 0;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
.hidden {
|
|
1038
|
-
display: none;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
.success {
|
|
1042
|
-
border: 1px solid var(--ui-positive);
|
|
1043
|
-
background: var(--ui-positive-5);
|
|
1044
|
-
--icon-color: var(--ui-positive);
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
.error {
|
|
1048
|
-
border: 1px solid var(--ui-negative);
|
|
1049
|
-
background: var(--ui-negative-5);
|
|
1050
|
-
--icon-color: var(--ui-negative);
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.warning {
|
|
1054
|
-
border: 1px solid var(--ui-warning);
|
|
1055
|
-
background: var(--ui-warning-10);
|
|
1056
|
-
--icon-color: var(--ui-warning);
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
.informative {
|
|
1060
|
-
border: 1px solid var(--ui-informative);
|
|
1061
|
-
background: var(--ui-informative-10);
|
|
1062
|
-
--icon-color: var(--ui-informative);
|
|
1063
|
-
}
|
|
1064
|
-
`}render(){return i`
|
|
1065
|
-
<div class="container ${this.open?"":"hidden"} ${this.type}">
|
|
1066
|
-
<randstad-icon class="icon" name="${this.icon}" size="24px" style="color: var(--icon-color);"></randstad-icon>
|
|
1067
|
-
<span class="message">${this.message}</span>
|
|
1068
|
-
</div>
|
|
1069
|
-
`}};n([I({type:String}),a("design:type",String)],J.prototype,"type",void 0),n([I({type:String}),a("design:type",String)],J.prototype,"icon",void 0),n([I({type:String}),a("design:type",String)],J.prototype,"message",void 0),n([I({type:Boolean}),a("design:type",Boolean)],J.prototype,"open",void 0),J=n([l("randstad-notice")],J);let Q=class extends e{constructor(){super(...arguments),this.open=!1,this.title="Título del modal",this.showNotice=!1,this.noticeType="informative",this.noticeMessage="",this.noticeIcon="info",this.showPrimaryButton=!1,this.primaryButtonLabel="Aceptar",this.showSecondaryButton=!1,this.secondaryButtonLabel="Cancelar",this.scrollable=!1,this.setScrollableMode=()=>{this.scrollable=window.innerWidth>940}}static{this.styles=t`
|
|
1070
|
-
:host {
|
|
1071
|
-
font-family: 'Graphik', sans-serif;
|
|
1072
|
-
display: none;
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
:host([open]) {
|
|
1076
|
-
display: block;
|
|
1077
|
-
z-index: 9999;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
.overlay {
|
|
1081
|
-
position: fixed;
|
|
1082
|
-
top: 0;
|
|
1083
|
-
left: 0;
|
|
1084
|
-
right: 0;
|
|
1085
|
-
bottom: 0;
|
|
1086
|
-
background: rgba(0, 0, 0, 0.5);
|
|
1087
|
-
overflow-y: auto;
|
|
1088
|
-
padding: 40px 16px;
|
|
1089
|
-
z-index: 9999;
|
|
1090
|
-
display: flex;
|
|
1091
|
-
justify-content: center;
|
|
1092
|
-
align-items: flex-start;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
.modal {
|
|
1096
|
-
background: var(--brand-off-white);
|
|
1097
|
-
width: 100%;
|
|
1098
|
-
max-width: 500px;
|
|
1099
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1100
|
-
display: flex;
|
|
1101
|
-
flex-direction: column;
|
|
1102
|
-
margin-top: 40px;
|
|
1103
|
-
border-radius: 8px;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
.modal.scrollable {
|
|
1107
|
-
max-height: 90vh;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
.modal-body.scrollable {
|
|
1111
|
-
overflow-y: auto;
|
|
1112
|
-
flex: 1;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
.modal-body {
|
|
1116
|
-
display: flex;
|
|
1117
|
-
flex-direction: column;
|
|
1118
|
-
padding: 24px;
|
|
1119
|
-
gap: 16px;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
.modal-header {
|
|
1123
|
-
display: flex;
|
|
1124
|
-
flex-direction: column;
|
|
1125
|
-
gap: 8px;
|
|
1126
|
-
justify-content: space-between;
|
|
1127
|
-
align-items: center;
|
|
1128
|
-
padding: 24px;
|
|
1129
|
-
border-bottom: 1px solid var(--secondary-color-20);
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
.modal-header-content {
|
|
1133
|
-
display: flex;
|
|
1134
|
-
gap: 32px;
|
|
1135
|
-
width: 100%;
|
|
1136
|
-
justify-content: space-between;
|
|
1137
|
-
align-items: center;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
.titles-container {
|
|
1141
|
-
display: flex;
|
|
1142
|
-
flex-direction: column;
|
|
1143
|
-
gap: 8px;
|
|
1144
|
-
flex-grow: 1;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
.modal-title {
|
|
1148
|
-
${q}
|
|
1149
|
-
margin: 0;
|
|
1150
|
-
color: var(--secondary-color);
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
.modal-subtitle {
|
|
1154
|
-
${M}
|
|
1155
|
-
margin: 0;
|
|
1156
|
-
color: var(--secondary-color-60);
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
.modal-header randstad-notice {
|
|
1160
|
-
width: 100%;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
.modal-close {
|
|
1164
|
-
background: none;
|
|
1165
|
-
border: none;
|
|
1166
|
-
cursor: pointer;
|
|
1167
|
-
display: flex;
|
|
1168
|
-
align-items: center;
|
|
1169
|
-
justify-content: center;
|
|
1170
|
-
padding: 0;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
.modal-footer {
|
|
1174
|
-
display: flex;
|
|
1175
|
-
justify-content: flex-end;
|
|
1176
|
-
flex-direction: row;
|
|
1177
|
-
padding: 24px;
|
|
1178
|
-
gap: 16px;
|
|
1179
|
-
border-top: 1px solid var(--secondary-color-20);
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
.modal-footer.one-button randstad-button {
|
|
1183
|
-
width: 100%;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
.modal-footer.two-buttons randstad-button {
|
|
1187
|
-
width: 50%;
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
@media (max-width: 940px) {
|
|
1191
|
-
.modal-footer.two-buttons {
|
|
1192
|
-
flex-direction: column;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
.modal-footer.two-buttons randstad-button {
|
|
1196
|
-
width: 100%;
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
`}closeModal(){this.dispatchEvent(new CustomEvent("modal-close"))}connectedCallback(){super.connectedCallback(),this.setScrollableMode(),window.addEventListener("resize",this.setScrollableMode)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.setScrollableMode)}render(){return i`
|
|
1200
|
-
<div class="overlay" role="dialog" aria-modal="true">
|
|
1201
|
-
<div class="modal ${this.scrollable?"scrollable":""}">
|
|
1202
|
-
<div class="modal-header">
|
|
1203
|
-
<div class="modal-header-content">
|
|
1204
|
-
<div class="titles-container">
|
|
1205
|
-
<div class="modal-title">${this.title}</div>
|
|
1206
|
-
${this.subtitle?i`<div class="modal-subtitle">${this.subtitle}</div>`:o}
|
|
1207
|
-
</div>
|
|
1208
|
-
<button class="modal-close" @click=${this.closeModal} aria-label="Cerrar modal">
|
|
1209
|
-
<randstad-icon name="close" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>
|
|
1210
|
-
</button>
|
|
1211
|
-
</div>
|
|
1212
|
-
${this.showNotice?i`
|
|
1213
|
-
<randstad-notice
|
|
1214
|
-
.open=${!0}
|
|
1215
|
-
.type=${this.noticeType}
|
|
1216
|
-
.icon=${this.noticeIcon}
|
|
1217
|
-
.message=${this.noticeMessage}
|
|
1218
|
-
></randstad-notice>
|
|
1219
|
-
`:o}
|
|
1220
|
-
</div>
|
|
1221
|
-
<div class="modal-body ${this.scrollable?"scrollable":""}">
|
|
1222
|
-
<slot name="content"></slot>
|
|
1223
|
-
</div>
|
|
1224
|
-
<div class="modal-footer ${this.showPrimaryButton&&this.showSecondaryButton?"two-buttons":"one-button"}">
|
|
1225
|
-
${this.showPrimaryButton?i`
|
|
1226
|
-
<randstad-button
|
|
1227
|
-
variant="button-primary"
|
|
1228
|
-
size="md"
|
|
1229
|
-
@click=${()=>this.dispatchEvent(new CustomEvent("primary-click"))}
|
|
1230
|
-
label=${this.primaryButtonLabel}
|
|
1231
|
-
></randstad-button>
|
|
1232
|
-
`:o}
|
|
1233
|
-
${this.showSecondaryButton?i`
|
|
1234
|
-
<randstad-button
|
|
1235
|
-
variant="button-secondary"
|
|
1236
|
-
size="md"
|
|
1237
|
-
@click=${()=>this.dispatchEvent(new CustomEvent("secondary-click"))}
|
|
1238
|
-
label=${this.secondaryButtonLabel}
|
|
1239
|
-
></randstad-button>
|
|
1240
|
-
`:o}
|
|
1241
|
-
</div>
|
|
1242
|
-
</div>
|
|
1243
|
-
</div>
|
|
1244
|
-
`}};n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Q.prototype,"open",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"title",void 0),n([I({type:String}),a("design:type",String)],Q.prototype,"subtitle",void 0),n([I({type:Boolean}),a("design:type",Object)],Q.prototype,"showNotice",void 0),n([I({type:String}),a("design:type",String)],Q.prototype,"noticeType",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"noticeMessage",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"noticeIcon",void 0),n([I({type:Boolean}),a("design:type",Object)],Q.prototype,"showPrimaryButton",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"primaryButtonLabel",void 0),n([I({type:Boolean}),a("design:type",Object)],Q.prototype,"showSecondaryButton",void 0),n([I({type:String}),a("design:type",Object)],Q.prototype,"secondaryButtonLabel",void 0),n([L(),a("design:type",Object)],Q.prototype,"scrollable",void 0),Q=n([l("custom-modal")],Q);let Z=class extends e{constructor(){super(...arguments),this.open=!1,this.type="default",this.icon="warning",this.title="Título del Popup",this.description="Descripción del popup",this.width="400px",this.buttonText="Aceptar",this.confirmText="Sí",this.cancelText="No",this.stackedActions=[],this._onBackgroundClick=t=>{const e=t.composedPath(),i=this.renderRoot.querySelector(".popup");i&&!e.includes(i)&&(this.dispatchEvent(new CustomEvent("popup-close",{detail:null})),this.open=!1)}}static{this.styles=t`
|
|
1245
|
-
:host {
|
|
1246
|
-
display: none;
|
|
1247
|
-
position: fixed;
|
|
1248
|
-
top: 0;
|
|
1249
|
-
left: 0;
|
|
1250
|
-
width: 100%;
|
|
1251
|
-
height: 100%;
|
|
1252
|
-
background: rgba(0, 0, 0, 0.5);
|
|
1253
|
-
justify-content: center;
|
|
1254
|
-
align-items: center;
|
|
1255
|
-
font-family: "Graphik", sans-serif;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
:host([open]) {
|
|
1259
|
-
display: flex;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
.popup {
|
|
1263
|
-
background: var(--white);
|
|
1264
|
-
padding: 24px;
|
|
1265
|
-
border-radius: 16px;
|
|
1266
|
-
text-align: center;
|
|
1267
|
-
animation: fadeIn 0.2s ease-in-out;
|
|
1268
|
-
width: var(--popup-width, 400px);
|
|
1269
|
-
display: flex;
|
|
1270
|
-
flex-direction: column;
|
|
1271
|
-
gap: 24px;
|
|
1272
|
-
align-items: center;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
@keyframes fadeIn {
|
|
1276
|
-
from { opacity: 0; transform: scale(0.9); }
|
|
1277
|
-
to { opacity: 1; transform: scale(1); }
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
.popup-content {
|
|
1281
|
-
display: flex;
|
|
1282
|
-
flex-direction: column;
|
|
1283
|
-
gap: 24px;
|
|
1284
|
-
width: 100%;
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
.titles-container {
|
|
1288
|
-
display: flex;
|
|
1289
|
-
flex-direction: column;
|
|
1290
|
-
gap: 8px;
|
|
1291
|
-
align-items: center;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
.popup-title {
|
|
1295
|
-
${U}
|
|
1296
|
-
margin: 0;
|
|
1297
|
-
color: var(--secondary-color-80);
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
.popup-description {
|
|
1301
|
-
${M}
|
|
1302
|
-
margin: 0;
|
|
1303
|
-
color: var(--secondary-color-60);
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
.buttons-container {
|
|
1307
|
-
margin-top: 12px;
|
|
1308
|
-
display: flex;
|
|
1309
|
-
gap: 10px;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
.buttons-container ::slotted(randstad-button),
|
|
1313
|
-
.buttons-container randstad-button {
|
|
1314
|
-
flex: 1 1 50%;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
:host([type="stacked"]) .buttons-container {
|
|
1318
|
-
flex-direction: column;
|
|
1319
|
-
gap: 12px;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
.popup-actions {
|
|
1323
|
-
display: flex;
|
|
1324
|
-
flex-direction: column;
|
|
1325
|
-
width: 100%;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
.action-item {
|
|
1329
|
-
${D};
|
|
1330
|
-
display: flex;
|
|
1331
|
-
align-items: center;
|
|
1332
|
-
gap: 16px;
|
|
1333
|
-
cursor: pointer;
|
|
1334
|
-
color: var(--secondary-color);
|
|
1335
|
-
padding: 16px;
|
|
1336
|
-
border-radius: 8px;
|
|
1337
|
-
transition: background 0.2s;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
.action-item:hover {
|
|
1341
|
-
background: var(--secondary-color-10, #f0f4ff);
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
.icon-circle {
|
|
1345
|
-
width: 32px;
|
|
1346
|
-
height: 32px;
|
|
1347
|
-
background: var(--primary-color-20, #D3E3F7);
|
|
1348
|
-
border-radius: 50%;
|
|
1349
|
-
display: flex;
|
|
1350
|
-
align-items: center;
|
|
1351
|
-
justify-content: center;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
`}firstUpdated(){if(this.open){const t=this.renderRoot.querySelector("randstad-button");t&&t.focus()}this.addEventListener("click",this._onBackgroundClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onBackgroundClick)}closePopup(t){this.dispatchEvent(new CustomEvent("popup-close",{detail:t})),this.open=!1}render(){return i`
|
|
1355
|
-
<div
|
|
1356
|
-
class="popup"
|
|
1357
|
-
role="dialog"
|
|
1358
|
-
aria-modal="true"
|
|
1359
|
-
style="width: ${this.width};"
|
|
1360
|
-
${"default"!==this.type?i`aria-labelledby="popup-title"`:o}
|
|
1361
|
-
aria-describedby="popup-description"
|
|
1362
|
-
>
|
|
1363
|
-
${"stacked"!==this.type&&this.icon?i`<img src="/assets/icons/${this.icon}" alt="" width="56" height="56" />`:o}
|
|
1364
|
-
|
|
1365
|
-
<div class="popup-content">
|
|
1366
|
-
${"default"===this.type?i`
|
|
1367
|
-
<div class="titles-container">
|
|
1368
|
-
<p id="popup-description" class="popup-description">${this.description}</p>
|
|
1369
|
-
</div>
|
|
1370
|
-
<div class="buttons-container">
|
|
1371
|
-
<randstad-button
|
|
1372
|
-
variant="button-primary"
|
|
1373
|
-
size="md"
|
|
1374
|
-
@click=${()=>this.closePopup(!0)}
|
|
1375
|
-
label=${this.buttonText}
|
|
1376
|
-
></randstad-button>
|
|
1377
|
-
</div>
|
|
1378
|
-
`:"stacked"===this.type?i`
|
|
1379
|
-
<div class="popup-actions">
|
|
1380
|
-
${this.stackedActions.map((t=>i`
|
|
1381
|
-
<div
|
|
1382
|
-
class="action-item"
|
|
1383
|
-
@click=${()=>this.closePopup(t.value)}
|
|
1384
|
-
>
|
|
1385
|
-
<div class="icon-circle">
|
|
1386
|
-
<randstad-icon
|
|
1387
|
-
name=${t.icon}
|
|
1388
|
-
size="24px"
|
|
1389
|
-
style="--icon-color: var(--primary-color);"
|
|
1390
|
-
></randstad-icon>
|
|
1391
|
-
</div>
|
|
1392
|
-
<span>${t.label}</span>
|
|
1393
|
-
</div>
|
|
1394
|
-
`))}
|
|
1395
|
-
</div>
|
|
1396
|
-
`:i`
|
|
1397
|
-
<div class="titles-container">
|
|
1398
|
-
<h2 id="popup-title" class="popup-title">${this.title}</h2>
|
|
1399
|
-
<p id="popup-description" class="popup-description">${this.description}</p>
|
|
1400
|
-
</div>
|
|
1401
|
-
<div class="buttons-container">
|
|
1402
|
-
<randstad-button
|
|
1403
|
-
variant="button-secondary"
|
|
1404
|
-
size="md"
|
|
1405
|
-
@click=${()=>this.closePopup(!1)}
|
|
1406
|
-
label=${this.cancelText}
|
|
1407
|
-
></randstad-button>
|
|
1408
|
-
<randstad-button
|
|
1409
|
-
variant="button-primary"
|
|
1410
|
-
size="md"
|
|
1411
|
-
@click=${()=>this.closePopup(!0)}
|
|
1412
|
-
label=${this.confirmText}
|
|
1413
|
-
></randstad-button>
|
|
1414
|
-
</div>
|
|
1415
|
-
`}
|
|
1416
|
-
</div>
|
|
1417
|
-
</div>
|
|
1418
|
-
`}};n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Z.prototype,"open",void 0),n([I({type:String}),a("design:type",String)],Z.prototype,"type",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"icon",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"title",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"description",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"width",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"buttonText",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"confirmText",void 0),n([I({type:String}),a("design:type",Object)],Z.prototype,"cancelText",void 0),n([I({type:Array}),a("design:type",Array)],Z.prototype,"stackedActions",void 0),Z=n([l("custom-popup")],Z);let tt=class extends e{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=t`
|
|
1419
|
-
:host {
|
|
1420
|
-
display: inline-block;
|
|
1421
|
-
width: 64px;
|
|
1422
|
-
height: 64px;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
svg {
|
|
1426
|
-
width: 64px;
|
|
1427
|
-
height: 64px;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
.circle-text {
|
|
1431
|
-
${_};
|
|
1432
|
-
text-align: center;
|
|
1433
|
-
vertical-align: middle;
|
|
1434
|
-
fill: var(--randstad-dark-blue-40);
|
|
1435
|
-
text-anchor: middle;
|
|
1436
|
-
dominant-baseline: middle;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
circle.bg {
|
|
1440
|
-
stroke: var(--primary-light-blue-20);
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
circle.fg {
|
|
1444
|
-
stroke: var(--primary-light-blue);
|
|
1445
|
-
stroke-linecap: round;
|
|
1446
|
-
}
|
|
1447
|
-
`}render(){const t=2*Math.PI*28,e=Math.max(this.max,1),o=t*(1-Math.min(this.value/e,1));return i`
|
|
1448
|
-
<svg
|
|
1449
|
-
viewBox="0 0 64 64"
|
|
1450
|
-
role="img"
|
|
1451
|
-
aria-label="Progreso: ${this.value} de ${this.max}"
|
|
1452
|
-
>
|
|
1453
|
-
<!-- Fondo -->
|
|
1454
|
-
<circle
|
|
1455
|
-
class="bg"
|
|
1456
|
-
cx="32"
|
|
1457
|
-
cy="32"
|
|
1458
|
-
r="${28}"
|
|
1459
|
-
stroke-width="${6}"
|
|
1460
|
-
fill="none"
|
|
1461
|
-
/>
|
|
1462
|
-
<!-- Progreso -->
|
|
1463
|
-
<circle
|
|
1464
|
-
class="fg"
|
|
1465
|
-
cx="32"
|
|
1466
|
-
cy="32"
|
|
1467
|
-
r="${28}"
|
|
1468
|
-
stroke-width="${6}"
|
|
1469
|
-
fill="none"
|
|
1470
|
-
stroke-dasharray="${t}"
|
|
1471
|
-
stroke-dashoffset="${o}"
|
|
1472
|
-
transform="rotate(-90 32 32)"
|
|
1473
|
-
/>
|
|
1474
|
-
<!-- Texto -->
|
|
1475
|
-
<text x="32" y="34" class="circle-text">
|
|
1476
|
-
${this.value} de ${this.max}
|
|
1477
|
-
</text>
|
|
1478
|
-
</svg>
|
|
1479
|
-
`}};n([I({type:Number}),a("design:type",Object)],tt.prototype,"value",void 0),n([I({type:Number}),a("design:type",Object)],tt.prototype,"max",void 0),tt=n([l("progress-circle")],tt);
|
|
1480
|
-
/**
|
|
1481
|
-
* @license
|
|
1482
|
-
* Copyright 2023 Google LLC
|
|
1483
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1484
|
-
*/
|
|
1485
|
-
const et=Symbol("attachableController");let it;r||(it=new MutationObserver((t=>{for(const e of t)e.target[et]?.hostConnected()})));class ot{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(t){null===t?this.host.removeAttribute("for"):this.host.setAttribute("for",t)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(t){t?this.attach(t):this.detach()}constructor(t,e){this.host=t,this.onControlChange=e,this.currentControl=null,t.addController(this),t[et]=this,it?.observe(t,{attributeFilter:["for"]})}attach(t){t!==this.currentControl&&(this.setCurrentControl(t),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(t){this.onControlChange(this.currentControl,t),this.currentControl=t}}
|
|
1486
|
-
/**
|
|
1487
|
-
* @license
|
|
1488
|
-
* Copyright 2021 Google LLC
|
|
1489
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1490
|
-
*/const rt=["focusin","focusout","pointerdown"];class st extends e{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new ot(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(t){if(!t[nt]){switch(t.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[nt]=!0}}onControlChange(t,e){if(!r)for(const i of rt)t?.removeEventListener(i,this),e?.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}n([I({type:Boolean,reflect:!0})],st.prototype,"visible",void 0),n([I({type:Boolean,reflect:!0})],st.prototype,"inward",void 0);const nt=Symbol("handledByFocusRing"),at=t`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
1491
|
-
`
|
|
1492
|
-
/**
|
|
1493
|
-
* @license
|
|
1494
|
-
* Copyright 2021 Google LLC
|
|
1495
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1496
|
-
*/;
|
|
1497
|
-
/**
|
|
1498
|
-
* @license
|
|
1499
|
-
* Copyright 2024 Google LLC
|
|
1500
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1501
|
-
*/let lt=class extends st{};lt.styles=[at],lt=n([l("md-focus-ring")],lt);
|
|
1502
|
-
/**
|
|
1503
|
-
* @license
|
|
1504
|
-
* Copyright 2021 Google LLC
|
|
1505
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1506
|
-
*/
|
|
1507
|
-
const dt="cubic-bezier(0.2, 0, 0, 1)";
|
|
1508
|
-
/**
|
|
1509
|
-
* @license
|
|
1510
|
-
* Copyright 2022 Google LLC
|
|
1511
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1512
|
-
*/var ct;!function(t){t[t.INACTIVE=0]="INACTIVE",t[t.TOUCH_DELAY=1]="TOUCH_DELAY",t[t.HOLDING=2]="HOLDING",t[t.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(ct||(ct={}));const pt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ht=r?null:window.matchMedia("(forced-colors: active)");class ut extends e{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=ct.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new ot(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return i`<div class="surface ${s(t)}"></div>`}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==ct.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==ct.HOLDING)return this.state===ct.TOUCH_DELAY?(this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=ct.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=ct.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=ct.TOUCH_DELAY,await new Promise((t=>{setTimeout(t,150)})),this.state===ct.TOUCH_DELAY&&(this.state=ct.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==ct.WAITING_FOR_CLICK?this.state===ct.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:e}=this.getBoundingClientRect(),i=Math.max(t,e),o=Math.max(.35*i,75),r=Math.floor(.2*i),s=Math.sqrt(e**2+t**2)+10;this.initialSize=r,this.rippleScale=""+(s+o)/r,this.rippleSize=`${r}px`}getNormalizedPointerEventCoords(t){const{scrollX:e,scrollY:i}=window,{left:o,top:r}=this.getBoundingClientRect(),s=e+o,n=i+r,{pageX:a,pageY:l}=t;return{x:a-s,y:l-n}}getTranslationCoordinates(t){const{height:e,width:i}=this.getBoundingClientRect(),o={x:(i-this.initialSize)/2,y:(e-this.initialSize)/2};let r;return r=t instanceof PointerEvent?this.getNormalizedPointerEventCoords(t):{x:i/2,y:e/2},r={x:r.x-this.initialSize/2,y:r.y-this.initialSize/2},{startPoint:r,endPoint:o}}startPressAnimation(t){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:e,endPoint:i}=this.getTranslationCoordinates(t),o=`${e.x}px, ${e.y}px`,r=`${i.x}px, ${i.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${o}) scale(1)`,`translate(${r}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:dt,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=ct.INACTIVE;const t=this.growAnimation;let e=1/0;"number"==typeof t?.currentTime?e=t.currentTime:t?.currentTime&&(e=t.currentTime.to("ms").value),e>=225?this.pressed=!1:(await new Promise((t=>{setTimeout(t,225-e)})),this.growAnimation===t&&(this.pressed=!1))}shouldReactToEvent(t){if(this.disabled||!t.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if("pointerenter"===t.type||"pointerleave"===t.type)return!this.isTouch(t);const e=1===t.buttons;return this.isTouch(t)||e}inBounds({x:t,y:e}){const{top:i,left:o,bottom:r,right:s}=this.getBoundingClientRect();return t>=o&&t<=s&&e>=i&&e<=r}isTouch({pointerType:t}){return"touch"===t}async handleEvent(t){if(!ht?.matches)switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t)}}onControlChange(t,e){if(!r)for(const i of pt)t?.removeEventListener(i,this),e?.addEventListener(i,this)}}n([I({type:Boolean,reflect:!0})],ut.prototype,"disabled",void 0),n([L()],ut.prototype,"hovered",void 0),n([L()],ut.prototype,"pressed",void 0),n([F(".surface")],ut.prototype,"mdRoot",void 0);
|
|
1513
|
-
/**
|
|
1514
|
-
* @license
|
|
1515
|
-
* Copyright 2024 Google LLC
|
|
1516
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1517
|
-
*/
|
|
1518
|
-
const bt=t`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
|
|
1519
|
-
`
|
|
1520
|
-
/**
|
|
1521
|
-
* @license
|
|
1522
|
-
* Copyright 2022 Google LLC
|
|
1523
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1524
|
-
*/;let gt=class extends ut{};
|
|
1525
|
-
/**
|
|
1526
|
-
* @license
|
|
1527
|
-
* Copyright 2021 Google LLC
|
|
1528
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1529
|
-
*/
|
|
1530
|
-
function yt(t){return t.currentTarget===t.target&&(t.composedPath()[0]===t.target&&(!t.target.disabled&&!function(t){const e=vt;e&&(t.preventDefault(),t.stopImmediatePropagation());return async function(){vt=!0,await null,vt=!1}
|
|
1531
|
-
/**
|
|
1532
|
-
* @license
|
|
1533
|
-
* Copyright 2023 Google LLC
|
|
1534
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1535
|
-
*/(),e}(t)))}gt.styles=[bt],gt=n([l("md-ripple")],gt);let vt=!1;const mt=Symbol("internals"),ft=Symbol("privateInternals");
|
|
1536
|
-
/**
|
|
1537
|
-
* @license
|
|
1538
|
-
* Copyright 2023 Google LLC
|
|
1539
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1540
|
-
*/
|
|
1541
|
-
const xt=Symbol("createValidator"),wt=Symbol("getValidityAnchor"),kt=Symbol("privateValidator"),$t=Symbol("privateSyncValidity"),St=Symbol("privateCustomValidationMessage");
|
|
1542
|
-
/**
|
|
1543
|
-
* @license
|
|
1544
|
-
* Copyright 2023 Google LLC
|
|
1545
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1546
|
-
*/
|
|
1547
|
-
const Ct=Symbol("isFocusable"),Et=Symbol("privateIsFocusable"),Ot=Symbol("externalTabIndex"),At=Symbol("isUpdatingTabIndex"),jt=Symbol("updateTabIndex");
|
|
1548
|
-
/**
|
|
1549
|
-
* @license
|
|
1550
|
-
* Copyright 2023 Google LLC
|
|
1551
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1552
|
-
*/
|
|
1553
|
-
const zt=Symbol("getFormValue"),Pt=Symbol("getFormState");
|
|
1554
|
-
/**
|
|
1555
|
-
* @license
|
|
1556
|
-
* Copyright 2023 Google LLC
|
|
1557
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1558
|
-
*/
|
|
1559
|
-
class Tt{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}}
|
|
1560
|
-
/**
|
|
1561
|
-
* @license
|
|
1562
|
-
* Copyright 2023 Google LLC
|
|
1563
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1564
|
-
*/class It extends Tt{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})))}}
|
|
1565
|
-
/**
|
|
1566
|
-
* @license
|
|
1567
|
-
* Copyright 2022 Google LLC
|
|
1568
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1569
|
-
*/class Lt{get controls(){const t=this.host.getAttribute("name");return t&&this.root&&this.host.isConnected?Array.from(this.root.querySelectorAll(`[name="${t}"]`)):[this.host]}constructor(t){this.host=t,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=t=>{const e="ArrowDown"===t.key,i="ArrowUp"===t.key,o="ArrowLeft"===t.key,r="ArrowRight"===t.key;if(!(o||r||e||i))return;const s=this.controls;if(!s.length)return;t.preventDefault();const n="rtl"===getComputedStyle(this.host).direction?o||e:r||e,a=s.indexOf(this.host);let l=n?a+1:a-1;for(;l!==a;){l>=s.length?l=0:l<0&&(l=s.length-1);const t=s[l];if(!t.hasAttribute("disabled")){for(const e of s)e!==t&&(e.checked=!1,e.tabIndex=-1,e.blur());t.checked=!0,t.tabIndex=0,t.focus(),t.dispatchEvent(new Event("change",{bubbles:!0}));break}n?l++:l--}}}hostConnected(){this.root=this.host.getRootNode(),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("focusin",this.handleFocusIn),this.host.addEventListener("focusout",this.handleFocusOut),this.host.checked&&this.uncheckSiblings(),this.updateTabIndices()}hostDisconnected(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("focusin",this.handleFocusIn),this.host.removeEventListener("focusout",this.handleFocusOut),this.updateTabIndices(),this.root=null}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(const t of this.controls)t!==this.host&&(t.checked=!1)}updateTabIndices(){const t=this.controls,e=t.find((t=>t.checked));if(e||this.focused){const i=e||this.host;i.tabIndex=0;for(const e of t)e!==i&&(e.tabIndex=-1)}else for(const e of t)e.tabIndex=0}}
|
|
1570
|
-
/**
|
|
1571
|
-
* @license
|
|
1572
|
-
* Copyright 2018 Google LLC
|
|
1573
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1574
|
-
*/var Ft;const _t=Symbol("checked");let Rt=0;const Mt=function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=""}get validity(){return this[$t](),this[mt].validity}get validationMessage(){return this[$t](),this[mt].validationMessage}get willValidate(){return this[$t](),this[mt].willValidate}checkValidity(){return this[$t](),this[mt].checkValidity()}reportValidity(){return this[$t](),this[mt].reportValidity()}setCustomValidity(t){this[St]=t,this[$t]()}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[$t]()}firstUpdated(t){super.firstUpdated(t),this[$t]()}[(e=St,$t)](){if(r)return;this[kt]||(this[kt]=this[xt]());const{validity:t,validationMessage:e}=this[kt].getValidity(),i=!!this[St],o=this[St]||e;this[mt].setValidity({...t,customError:i},o,this[wt]()??void 0)}[xt](){throw new Error("Implement [createValidator]")}[wt](){throw new Error("Implement [getValidityAnchor]")}}return i}(function(t){class e extends t{get form(){return this[mt].form}get labels(){return this[mt].labels}get name(){return this.getAttribute("name")??""}set name(t){this.setAttribute("name",t)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",t)}attributeChangedCallback(t,e,i){if("name"!==t&&"disabled"!==t)super.attributeChangedCallback(t,e,i);else{const i="disabled"===t?null!==e:e;this.requestUpdate(t,i)}}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[mt].setFormValue(this[zt](),this[Pt]())}[zt](){throw new Error("Implement [getFormValue]")}[Pt](){return this[zt]()}formDisabledCallback(t){this.disabled=t}}return e.formAssociated=!0,n([I({noAccessor:!0})],e.prototype,"name",null),n([I({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}((Bt=function(t){var e,i,o;class r extends t{constructor(){super(...arguments),this[e]=!0,this[i]=null,this[o]=!1}get[Ct](){return this[Et]}set[Ct](t){this[Ct]!==t&&(this[Et]=t,this[jt]())}connectedCallback(){super.connectedCallback(),this[jt]()}attributeChangedCallback(t,e,i){if("tabindex"===t){if(this.requestUpdate("tabIndex",Number(e??-1)),!this[At])return this.hasAttribute("tabindex")?void(this[Ot]=this.tabIndex):(this[Ot]=null,void this[jt]())}else super.attributeChangedCallback(t,e,i)}[(e=Et,i=Ot,o=At,jt)](){const t=this[Ct]?0:-1,e=this[Ot]??t;this[At]=!0,this.tabIndex=e,this[At]=!1}}return n([I({noAccessor:!0})],r.prototype,"tabIndex",void 0),r}(e),class extends Bt{get[mt](){return this[ft]||(this[ft]=this.attachInternals()),this[ft]}})));var Bt;class Dt extends Mt{get checked(){return this[_t]}set checked(t){const e=this.checked;e!==t&&(this[_t]=t,this.requestUpdate("checked",e),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId="cutout"+ ++Rt,this[Ft]=!1,this.required=!1,this.value="on",this.selectionController=new Lt(this),this.addController(this.selectionController),r||(this[mt].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this)))}render(){const t={checked:this.checked};return i`
|
|
1575
|
-
<div class="container ${s(t)}" aria-hidden="true">
|
|
1576
|
-
<md-ripple
|
|
1577
|
-
part="ripple"
|
|
1578
|
-
.control=${this}
|
|
1579
|
-
?disabled=${this.disabled}></md-ripple>
|
|
1580
|
-
<md-focus-ring part="focus-ring" .control=${this}></md-focus-ring>
|
|
1581
|
-
<svg class="icon" viewBox="0 0 20 20">
|
|
1582
|
-
<mask id="${this.maskId}">
|
|
1583
|
-
<rect width="100%" height="100%" fill="white" />
|
|
1584
|
-
<circle cx="10" cy="10" r="8" fill="black" />
|
|
1585
|
-
</mask>
|
|
1586
|
-
<circle
|
|
1587
|
-
class="outer circle"
|
|
1588
|
-
cx="10"
|
|
1589
|
-
cy="10"
|
|
1590
|
-
r="10"
|
|
1591
|
-
mask="url(#${this.maskId})" />
|
|
1592
|
-
<circle class="inner circle" cx="10" cy="10" r="5" />
|
|
1593
|
-
</svg>
|
|
1594
|
-
|
|
1595
|
-
<div class="touch-target"></div>
|
|
1596
|
-
</div>
|
|
1597
|
-
`}updated(){this[mt].ariaChecked=String(this.checked)}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(yt(t)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(t){await 0," "!==t.key||t.defaultPrevented||this.click()}[(Ft=_t,zt)](){return this.checked?this.value:null}[Pt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(t){this.checked="true"===t}[xt](){return new It((()=>this.selectionController?this.selectionController.controls:[this]))}[wt](){return this.container}}n([I({type:Boolean})],Dt.prototype,"checked",null),n([I({type:Boolean})],Dt.prototype,"required",void 0),n([I()],Dt.prototype,"value",void 0),n([F(".container")],Dt.prototype,"container",void 0);
|
|
1598
|
-
/**
|
|
1599
|
-
* @license
|
|
1600
|
-
* Copyright 2024 Google LLC
|
|
1601
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1602
|
-
*/
|
|
1603
|
-
const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}}
|
|
1604
|
-
`
|
|
1605
|
-
/**
|
|
1606
|
-
* @license
|
|
1607
|
-
* Copyright 2022 Google LLC
|
|
1608
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1609
|
-
*/;let qt=class extends Dt{};qt.styles=[Ut],qt=n([l("md-radio")],qt);let Vt=class extends e{constructor(){super(...arguments),this.name="radio-group",this.checked=!1,this.disabled=!1,this.error=!1}static{this.styles=t`
|
|
1610
|
-
:host {
|
|
1611
|
-
font-family: "Graphik", sans-serif;
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
.radio-container {
|
|
1615
|
-
display: flex;
|
|
1616
|
-
align-items: center;
|
|
1617
|
-
gap: 8px;
|
|
1618
|
-
cursor: pointer;
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
md-radio {
|
|
1622
|
-
width: 24px;
|
|
1623
|
-
height: 24px;
|
|
1624
|
-
border-radius: 50%;
|
|
1625
|
-
background: var(--white);
|
|
1626
|
-
border: 1px solid var(--secondary-color-20);
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
md-radio::part(container):hover {
|
|
1630
|
-
box-shadow: 0px 0px 0px 4px #0F19411A;
|
|
1631
|
-
border: 1px solid var(--secondary-color-20);
|
|
1632
|
-
border-radius: 50%;
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
md-radio:focus-visible::part(container) {
|
|
1636
|
-
border: 1px solid var(--primary-color);
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
md-radio.checked {
|
|
1640
|
-
background: var(--primary-color);
|
|
1641
|
-
border: 1px solid var(--primary-color);
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
md-radio.checked.error {
|
|
1645
|
-
background: var(--ui-negative);
|
|
1646
|
-
border: 1px solid var(--ui-negative);
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
md-radio.error {
|
|
1650
|
-
border: 1px solid var(--ui-negative);
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
md-radio.disabled {
|
|
1654
|
-
cursor: not-allowed;
|
|
1655
|
-
background: var(--secondary-color-20);
|
|
1656
|
-
border: 1px solid var(--secondary-color-20);
|
|
1657
|
-
}
|
|
1658
|
-
`}render(){const t=[this.checked?"checked":"",this.error?"error":"",this.disabled?"disabled":""].join(" ");return i`
|
|
1659
|
-
<label class="radio-container">
|
|
1660
|
-
<md-radio
|
|
1661
|
-
name=${this.name}
|
|
1662
|
-
class=${t}
|
|
1663
|
-
?checked=${this.checked}
|
|
1664
|
-
?disabled=${this.disabled}
|
|
1665
|
-
></md-radio>
|
|
1666
|
-
<span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
|
|
1667
|
-
</label>
|
|
1668
|
-
`}};n([I({type:String}),a("design:type",Object)],Vt.prototype,"name",void 0),n([I({type:Boolean}),a("design:type",Object)],Vt.prototype,"checked",void 0),n([I({type:Boolean}),a("design:type",Object)],Vt.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Object)],Vt.prototype,"error",void 0),Vt=n([l("custom-radio")],Vt);let Nt=class extends e{constructor(){super(...arguments),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.label="",this.value="",this.labelColor="",this.filterable=!0,this.error=!1,this.required=!1,this.optional=!1,this.isMobile=!1,this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.highlightedIndex=-1,this.debounceTimeout=null,this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this)}static{this.styles=t`
|
|
1669
|
-
:host {
|
|
1670
|
-
display: block;
|
|
1671
|
-
font-family: 'Graphik', sans-serif;
|
|
1672
|
-
width: 100%;
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
:host([error]) .input-wrapper {
|
|
1676
|
-
border: 1px solid var(--ui-negative, red) !important;
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
:host([error]) .input-container:not(.open) .input-wrapper:hover {
|
|
1680
|
-
box-shadow: 0px 0px 0px 4px #E00F0F1A;
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
:host([error]) .input-container.open:not(.mobile) .input-wrapper {
|
|
1684
|
-
border-bottom-left-radius: 0;
|
|
1685
|
-
border-bottom-right-radius: 0;
|
|
1686
|
-
border: 1px solid var(--ui-negative, red) !important;
|
|
1687
|
-
border-bottom: 1px solid transparent !important;
|
|
1688
|
-
}
|
|
1689
|
-
|
|
1690
|
-
:host([error]) .input-container:not(.mobile) .options-list {
|
|
1691
|
-
border: 1px solid var(--ui-negative, red) !important;
|
|
1692
|
-
border-top: none !important;
|
|
1693
|
-
border-radius: 0 0 4px 4px;
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
.select-container {
|
|
1697
|
-
display: flex;
|
|
1698
|
-
flex-direction: column;
|
|
1699
|
-
gap: 8px;
|
|
1700
|
-
width: 100%;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
.label-container {
|
|
1704
|
-
display: flex;
|
|
1705
|
-
align-items: center;
|
|
1706
|
-
justify-content: space-between;
|
|
1707
|
-
gap: 8px;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
.form-label {
|
|
1711
|
-
${M}
|
|
1712
|
-
display: flex;
|
|
1713
|
-
align-items: baseline;
|
|
1714
|
-
flex-direction: row;
|
|
1715
|
-
gap: 4px;
|
|
1716
|
-
color: var(--label-color, var(--secondary-color-80));
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
.input-container {
|
|
1720
|
-
position: relative;
|
|
1721
|
-
width: 100%;
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
|
-
.input-container.focused:not(.open):not(.mobile) .input-wrapper {
|
|
1725
|
-
border: 1px solid var(--primary-color);
|
|
1726
|
-
border-radius: 4px;
|
|
1727
|
-
box-shadow: none;
|
|
1728
|
-
z-index: 11;
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
.input-container.focused:not(.open):not(.mobile) .input-wrapper:hover {
|
|
1732
|
-
box-shadow: none;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
:host(:not([error])) .input-container.open:not(.mobile) {
|
|
1736
|
-
border-radius: 4px;
|
|
1737
|
-
border-bottom-left-radius: 0;
|
|
1738
|
-
border-bottom-right-radius: 0;
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
:host(:not([error])) .input-container.open:not(.mobile) .input-wrapper {
|
|
1742
|
-
border: 1px solid var(--primary-color);
|
|
1743
|
-
border-top-left-radius: 4px;
|
|
1744
|
-
border-top-right-radius: 4px;
|
|
1745
|
-
border-bottom-left-radius: 0;
|
|
1746
|
-
border-bottom-right-radius: 0;
|
|
1747
|
-
border-bottom: 1px solid transparent;
|
|
1748
|
-
box-shadow: none;
|
|
1749
|
-
z-index: 11;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
:host(:not([error])) .input-wrapper:hover {
|
|
1753
|
-
box-shadow: 0px 0px 0px 4px #0F19411A;
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
:host .input-container.open:not(.mobile)::after {
|
|
1757
|
-
content: '';
|
|
1758
|
-
position: absolute;
|
|
1759
|
-
top: calc(100% - 1px);
|
|
1760
|
-
left: 20px;
|
|
1761
|
-
right: 20px;
|
|
1762
|
-
height: 1px;
|
|
1763
|
-
background-color: var(--gray-20);
|
|
1764
|
-
z-index: 10;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
.input-wrapper {
|
|
1768
|
-
border: 1px solid var(--secondary-color-10);
|
|
1769
|
-
border-radius: 4px;
|
|
1770
|
-
overflow: hidden;
|
|
1771
|
-
display: flex;
|
|
1772
|
-
align-items: center;
|
|
1773
|
-
width: 100%;
|
|
1774
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
.mobile-modal .filter-input {
|
|
1778
|
-
border-bottom: 1px solid var(--gray-20);
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
.filter-input {
|
|
1782
|
-
${B};
|
|
1783
|
-
padding: 16px;
|
|
1784
|
-
padding-right: 40px;
|
|
1785
|
-
border: none;
|
|
1786
|
-
outline: none;
|
|
1787
|
-
width: 100%;
|
|
1788
|
-
box-sizing: border-box;
|
|
1789
|
-
background: white;
|
|
1790
|
-
cursor: pointer;
|
|
1791
|
-
color: var(--secondary-color);
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
.filter-input,
|
|
1795
|
-
.filter-fake,
|
|
1796
|
-
.input-wrapper,
|
|
1797
|
-
.mobile-modal {
|
|
1798
|
-
-webkit-tap-highlight-color: transparent !important;
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
.filter-input::placeholder {
|
|
1802
|
-
${B};
|
|
1803
|
-
color: var(--secondary-color-40);
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
.icon-button {
|
|
1807
|
-
position: absolute;
|
|
1808
|
-
right: 10px;
|
|
1809
|
-
top: 50%;
|
|
1810
|
-
transform: translateY(-50%);
|
|
1811
|
-
background: transparent;
|
|
1812
|
-
border: none;
|
|
1813
|
-
cursor: pointer;
|
|
1814
|
-
display: flex;
|
|
1815
|
-
align-items: center;
|
|
1816
|
-
justify-content: center;
|
|
1817
|
-
width: 24px;
|
|
1818
|
-
height: 24px;
|
|
1819
|
-
padding: 0;
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
randstad-icon {
|
|
1823
|
-
width: 24px;
|
|
1824
|
-
height: 24px;
|
|
1825
|
-
color: var(--primary-color);
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
.options-list {
|
|
1829
|
-
width: 100%;
|
|
1830
|
-
position: absolute;
|
|
1831
|
-
top: 99%;
|
|
1832
|
-
left: 0;
|
|
1833
|
-
right: 0;
|
|
1834
|
-
max-height: 200px;
|
|
1835
|
-
overflow-y: auto;
|
|
1836
|
-
border: 1px solid var(--primary-color);
|
|
1837
|
-
border-top: none;
|
|
1838
|
-
border-radius: 0 0 4px 4px;
|
|
1839
|
-
background: white;
|
|
1840
|
-
list-style: none;
|
|
1841
|
-
margin: 0;
|
|
1842
|
-
padding: 0;
|
|
1843
|
-
z-index: 10;
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
.options-list li {
|
|
1847
|
-
${B};
|
|
1848
|
-
padding: 8px 16px 8px 16px;
|
|
1849
|
-
cursor: pointer;
|
|
1850
|
-
color: var(--secondary-color-80);
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
.options-list li.highlighted {
|
|
1854
|
-
background-color: var(--primary-color-10);
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
.mobile-modal {
|
|
1858
|
-
position: fixed;
|
|
1859
|
-
bottom: 0;
|
|
1860
|
-
left: 0;
|
|
1861
|
-
right: 0;
|
|
1862
|
-
background-color: white;
|
|
1863
|
-
z-index: 1000;
|
|
1864
|
-
border-radius: 12px 12px 0 0;
|
|
1865
|
-
box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
|
|
1866
|
-
display: flex;
|
|
1867
|
-
flex-direction: column;
|
|
1868
|
-
padding: 0px;
|
|
1869
|
-
gap: 12px;
|
|
1870
|
-
animation: slideUp 0.5s ease-out;
|
|
1871
|
-
max-height: 80vh;
|
|
1872
|
-
overflow-y: auto;
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
.mobile-modal .options-list {
|
|
1876
|
-
position: static;
|
|
1877
|
-
max-height: none;
|
|
1878
|
-
border: none;
|
|
1879
|
-
box-shadow: none;
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
.mobile-modal .modal-input-container {
|
|
1883
|
-
position: relative;
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
.mobile-modal .modal-close-button {
|
|
1887
|
-
position: absolute;
|
|
1888
|
-
top: 50%;
|
|
1889
|
-
right: 12px;
|
|
1890
|
-
transform: translateY(-50%);
|
|
1891
|
-
background: transparent;
|
|
1892
|
-
border: none;
|
|
1893
|
-
cursor: pointer;
|
|
1894
|
-
padding: 4px;
|
|
1895
|
-
display: flex;
|
|
1896
|
-
align-items: center;
|
|
1897
|
-
justify-content: center;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
.mobile-modal .modal-close-button randstad-icon {
|
|
1901
|
-
width: 20px;
|
|
1902
|
-
height: 20px;
|
|
1903
|
-
color: var(--secondary-color-60);
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
.mobile-backdrop {
|
|
1907
|
-
position: fixed;
|
|
1908
|
-
inset: 0;
|
|
1909
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
1910
|
-
z-index: 999;
|
|
1911
|
-
display: flex;
|
|
1912
|
-
align-items: flex-end;
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
.filter-fake {
|
|
1916
|
-
${B};
|
|
1917
|
-
padding: 15px;
|
|
1918
|
-
padding-right: 40px;
|
|
1919
|
-
width: 100%;
|
|
1920
|
-
background: white;
|
|
1921
|
-
box-sizing: border-box;
|
|
1922
|
-
cursor: pointer;
|
|
1923
|
-
color: var(--secondary-color-80);
|
|
1924
|
-
white-space: nowrap;
|
|
1925
|
-
overflow: hidden;
|
|
1926
|
-
text-overflow: ellipsis;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
@keyframes slideUp {
|
|
1930
|
-
from {
|
|
1931
|
-
transform: translateY(100%);
|
|
1932
|
-
}
|
|
1933
|
-
to {
|
|
1934
|
-
transform: translateY(0);
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
.options-list::-webkit-scrollbar {
|
|
1939
|
-
width: 6px;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
.options-list::-webkit-scrollbar-track {
|
|
1943
|
-
background: transparent;
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
.options-list::-webkit-scrollbar-thumb {
|
|
1947
|
-
background-color: var(--secondary-color-30);
|
|
1948
|
-
border-radius: 4px;
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
.options-list::-webkit-scrollbar-button {
|
|
1952
|
-
display: none;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
.required {
|
|
1956
|
-
color: var(--ui-negative);
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
.optional {
|
|
1960
|
-
color: var(--secondary-color-60);
|
|
1961
|
-
${_}
|
|
1962
|
-
}
|
|
1963
|
-
`}updated(t){if(t.has("options")||t.has("value")||t.has("defaultValue")){const t=this.value||this.defaultValue,e=this.options.find((e=>"string"==typeof e?e===t:e.value===t));this.filterValue=e?"string"==typeof e?e:e.label:""}t.has("options")&&(this.filteredOptions=[...this.options])}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.isMobile&&(this.mobileFilterValue=""),this.disabled||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){if(!this.filterable)return;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.filterValue=i,this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(this.filterValue.toLowerCase()))),this.isOpen=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.mobileFilterValue=i,this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(i))),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0}))}),300)}handleSelect(t){this.value="string"==typeof t?t:t.value;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.isOpen=!1,this.requestUpdate()}handleIconClick(){this.disabled||(this.filterable&&this.filterValue?(this.filterValue="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1):this.isOpen=!this.isOpen,this.requestUpdate())}handleClickOutside(t){const e=t.target;e instanceof Node&&(this.contains(e)||(this.isOpen=!1,this.requestUpdate()))}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)}render(){const t=this.isMobile;return i`
|
|
1964
|
-
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
1965
|
-
${this.label?i`
|
|
1966
|
-
<div class="label-container">
|
|
1967
|
-
<label class="form-label">
|
|
1968
|
-
${this.label}
|
|
1969
|
-
${this.required?i`<span class="required">*</span>`:this.optional?i`<span class="optional">opcional</span>`:o}
|
|
1970
|
-
</label>
|
|
1971
|
-
</div>
|
|
1972
|
-
`:""}
|
|
1973
|
-
|
|
1974
|
-
<div class="input-container ${this.isOpen?"focused":""} ${this.isOpen&&this.filteredOptions.length>0?"open":""} ${t?"mobile":""}">
|
|
1975
|
-
|
|
1976
|
-
<div class="input-wrapper">
|
|
1977
|
-
${t?i`
|
|
1978
|
-
<div
|
|
1979
|
-
class="filter-fake"
|
|
1980
|
-
@click="${this.handleInputClick}"
|
|
1981
|
-
@keydown="${this.handleKeyDown}"
|
|
1982
|
-
tabindex="0"
|
|
1983
|
-
role="combobox"
|
|
1984
|
-
aria-expanded="${this.isOpen}"
|
|
1985
|
-
aria-controls="options-list"
|
|
1986
|
-
aria-haspopup="listbox"
|
|
1987
|
-
aria-activedescendant=""
|
|
1988
|
-
">
|
|
1989
|
-
${this.filterValue||this.placeholder}
|
|
1990
|
-
</div>
|
|
1991
|
-
`:i`
|
|
1992
|
-
<input
|
|
1993
|
-
class="filter-input"
|
|
1994
|
-
.value="${this.filterValue||""}"
|
|
1995
|
-
@click="${this.handleInputClick}"
|
|
1996
|
-
@keydown="${this.handleKeyDown}"
|
|
1997
|
-
@input=${this.handleInput}
|
|
1998
|
-
placeholder="${this.filterValue?"":this.placeholder}"
|
|
1999
|
-
?disabled="${this.disabled}"
|
|
2000
|
-
?readonly="${!this.filterable}"
|
|
2001
|
-
maxlength="${this.maxLength??""}"
|
|
2002
|
-
/>
|
|
2003
|
-
`}
|
|
2004
|
-
<button
|
|
2005
|
-
class="icon-button"
|
|
2006
|
-
@click="${this.handleIconClick}"
|
|
2007
|
-
?disabled="${this.disabled}"
|
|
2008
|
-
>
|
|
2009
|
-
${this.filterable&&this.filterValue?i`<randstad-icon name="close" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>`:this.isOpen&&this.filteredOptions.length>0?i`<randstad-icon name="arrow_up" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>`:i`<randstad-icon name="arrow_down" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>`}
|
|
2010
|
-
</button>
|
|
2011
|
-
</div>
|
|
2012
|
-
|
|
2013
|
-
${t&&this.isOpen?i`
|
|
2014
|
-
<div class="mobile-backdrop" @click="${()=>{this.isOpen=!1}}">
|
|
2015
|
-
<div class="mobile-modal" @click="${t=>t.stopPropagation()}">
|
|
2016
|
-
<div class="modal-input-container">
|
|
2017
|
-
<input
|
|
2018
|
-
class="filter-input"
|
|
2019
|
-
.value="${this.mobileFilterValue||""}"
|
|
2020
|
-
@input=${t=>this.handleMobileInput(t)}
|
|
2021
|
-
placeholder="${this.placeholder}" maxlength="${this.maxLength??""}"
|
|
2022
|
-
autofocus
|
|
2023
|
-
/>
|
|
2024
|
-
<button class="modal-close-button" @click="${()=>{this.isOpen=!1}}">
|
|
2025
|
-
<randstad-icon name="close" size="20px"></randstad-icon>
|
|
2026
|
-
</button>
|
|
2027
|
-
</div>
|
|
2028
|
-
<ul class="options-list">
|
|
2029
|
-
${this.filteredOptions.map(((t,e)=>{const o="string"==typeof t?t:t.label,r="object"==typeof t&&t.disabled;return i`
|
|
2030
|
-
<li
|
|
2031
|
-
class="${r?"disabled":""} ${e===this.highlightedIndex?"highlighted":""}"
|
|
2032
|
-
role="option"
|
|
2033
|
-
aria-selected="${e===this.highlightedIndex}"
|
|
2034
|
-
@click="${()=>{r||this.handleSelect(t)}}"
|
|
2035
|
-
>
|
|
2036
|
-
${o}
|
|
2037
|
-
</li>
|
|
2038
|
-
`}))}
|
|
2039
|
-
</ul>
|
|
2040
|
-
</div>
|
|
2041
|
-
</div>
|
|
2042
|
-
`:!t&&this.isOpen&&this.filteredOptions.length>0?i`
|
|
2043
|
-
<ul class="options-list">
|
|
2044
|
-
${this.filteredOptions.map(((t,e)=>{const o="string"==typeof t?t:t.label,r="object"==typeof t&&t.disabled;return i`
|
|
2045
|
-
<li
|
|
2046
|
-
class="${r?"disabled":""} ${e===this.highlightedIndex?"highlighted":""}"
|
|
2047
|
-
role="option"
|
|
2048
|
-
aria-selected="${e===this.highlightedIndex}"
|
|
2049
|
-
@click="${()=>{r||this.handleSelect(t)}}"
|
|
2050
|
-
>
|
|
2051
|
-
${o}
|
|
2052
|
-
</li>
|
|
2053
|
-
`}))}
|
|
2054
|
-
</ul>
|
|
2055
|
-
`:""}
|
|
2056
|
-
</div>
|
|
2057
|
-
</div>
|
|
2058
|
-
`}};n([I({type:Array}),a("design:type",Array)],Nt.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],Nt.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],Nt.prototype,"value",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"filterable",void 0),n([I({type:Number}),a("design:type",Number)],Nt.prototype,"maxLength",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],Nt.prototype,"error",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"optional",void 0),n([L(),a("design:type",Boolean)],Nt.prototype,"isMobile",void 0),n([L(),a("design:type",Array)],Nt.prototype,"filteredOptions",void 0),n([L(),a("design:type",Object)],Nt.prototype,"filterValue",void 0),n([L(),a("design:type",Object)],Nt.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],Nt.prototype,"mobileFilterValue",void 0),n([L(),a("design:type",Object)],Nt.prototype,"highlightedIndex",void 0),Nt=n([l("filterable-select")],Nt);const Gt=new CSSStyleSheet;Gt.replaceSync("\n @font-face {\n font-family: 'Graphik';\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n .body-s {\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n letter-spacing: 0%;\n color: green;\n }\n");class Ht extends e{static{this.styles=[Gt,t`
|
|
2059
|
-
:host {
|
|
2060
|
-
display: flex;
|
|
2061
|
-
position: fixed;
|
|
2062
|
-
align-items: center;
|
|
2063
|
-
max-width: 100vw;
|
|
2064
|
-
height: auto;
|
|
2065
|
-
z-index: 9999;
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
:host([position="top-left"]) {
|
|
2069
|
-
top: 16px;
|
|
2070
|
-
left: 16px;
|
|
2071
|
-
right: auto;
|
|
2072
|
-
transform: none;
|
|
2073
|
-
justify-content: flex-start;
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
:host([position="top-center"]) {
|
|
2077
|
-
top: 16px;
|
|
2078
|
-
left: 50%;
|
|
2079
|
-
transform: translateX(-50%);
|
|
2080
|
-
justify-content: center;
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
:host([position="top-right"]) {
|
|
2084
|
-
top: 16px;
|
|
2085
|
-
right: 16px;
|
|
2086
|
-
left: auto;
|
|
2087
|
-
transform: none;
|
|
2088
|
-
justify-content: flex-end;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
:host([position="bottom-left"]) {
|
|
2092
|
-
bottom: 16px;
|
|
2093
|
-
left: 16px;
|
|
2094
|
-
right: auto;
|
|
2095
|
-
transform: none;
|
|
2096
|
-
justify-content: flex-start;
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
:host([position="bottom-center"]) {
|
|
2100
|
-
bottom: 16px;
|
|
2101
|
-
left: 50%;
|
|
2102
|
-
transform: translateX(-50%);
|
|
2103
|
-
justify-content: center;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
:host([position="bottom-right"]) {
|
|
2107
|
-
bottom: 16px;
|
|
2108
|
-
right: 16px;
|
|
2109
|
-
left: auto;
|
|
2110
|
-
transform: none;
|
|
2111
|
-
justify-content: flex-end;
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
:host(.mobile) {
|
|
2115
|
-
bottom: 16px !important;
|
|
2116
|
-
top: auto !important;
|
|
2117
|
-
left: 50% !important;
|
|
2118
|
-
transform: translateX(-50%) !important;
|
|
2119
|
-
justify-content: center !important;
|
|
2120
|
-
width: 100%;
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
:host(.mobile) .container {
|
|
2124
|
-
width: 90vw !important;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
.container {
|
|
2128
|
-
${R};
|
|
2129
|
-
display: flex;
|
|
2130
|
-
align-items: center;
|
|
2131
|
-
box-sizing: border-box;
|
|
2132
|
-
min-height: 48px;
|
|
2133
|
-
min-width: 270px;
|
|
2134
|
-
max-width: 480px;
|
|
2135
|
-
border-radius: 4px;
|
|
2136
|
-
padding: 8px;
|
|
2137
|
-
gap: 8px;
|
|
2138
|
-
white-space: nowrap;
|
|
2139
|
-
color: var(--white);
|
|
2140
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
.message {
|
|
2144
|
-
display: block;
|
|
2145
|
-
display: -webkit-box;
|
|
2146
|
-
-webkit-box-orient: vertical;
|
|
2147
|
-
-webkit-line-clamp: 2;
|
|
2148
|
-
overflow: hidden;
|
|
2149
|
-
text-overflow: ellipsis;
|
|
2150
|
-
white-space: normal;
|
|
2151
|
-
max-height: calc(2 * 25px);
|
|
2152
|
-
line-height: 25px;
|
|
2153
|
-
word-break: break-word;
|
|
2154
|
-
max-width: 100%;
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
.container {
|
|
2158
|
-
color: var(--white);
|
|
2159
|
-
}
|
|
2160
|
-
randstad-icon {
|
|
2161
|
-
color: var(--white);
|
|
2162
|
-
}
|
|
2163
|
-
randstad-icon svg {
|
|
2164
|
-
fill: var(--white);
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
.icon {
|
|
2168
|
-
font-size: 18px;
|
|
2169
|
-
}
|
|
2170
|
-
.hidden {
|
|
2171
|
-
display: none;
|
|
2172
|
-
}
|
|
2173
|
-
.success {
|
|
2174
|
-
background-color: var(--ui-positive);
|
|
2175
|
-
}
|
|
2176
|
-
.error {
|
|
2177
|
-
background-color: var(--ui-negative);
|
|
2178
|
-
}
|
|
2179
|
-
.warning {
|
|
2180
|
-
background-color: var(--ui-warning);
|
|
2181
|
-
}
|
|
2182
|
-
.informative {
|
|
2183
|
-
background-color: var(--ui-informative);
|
|
2184
|
-
}
|
|
2185
|
-
`]}static get properties(){return{type:{type:String},icon:{type:String},message:{type:String},open:{type:Boolean},position:{type:String,reflect:!0}}}constructor(){super(),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1,this.position="bottom-center",this.isMobile=!1,this.updateResponsiveStyles=this.updateResponsiveStyles.bind(this)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.updateResponsiveStyles),this.updateResponsiveStyles()}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveStyles),super.disconnectedCallback()}updateResponsiveStyles(){const t=window.innerWidth<=940;this.classList.toggle("mobile",t)}render(){const t="error"===this.type||"warning"===this.type?"alert":"status";return i`
|
|
2186
|
-
<div
|
|
2187
|
-
class="container ${this.open?"":"hidden"} ${this.type}"
|
|
2188
|
-
role="${t}"
|
|
2189
|
-
aria-live="polite"
|
|
2190
|
-
>
|
|
2191
|
-
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
2192
|
-
<span class="message">${this.message}</span>
|
|
2193
|
-
</div>
|
|
2194
|
-
`}}customElements.define("randstad-snackbar",Ht);let Kt=class extends e{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=t`
|
|
2195
|
-
.stepper {
|
|
2196
|
-
display: flex;
|
|
2197
|
-
gap: 20px;
|
|
2198
|
-
align-items: center;
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
.step {
|
|
2202
|
-
width: 20px;
|
|
2203
|
-
height: 20px;
|
|
2204
|
-
border-radius: 50%;
|
|
2205
|
-
background-color: var(--white);
|
|
2206
|
-
border: 1px solid var(--secondary-color-20);
|
|
2207
|
-
position: relative;
|
|
2208
|
-
box-sizing: content-box;
|
|
2209
|
-
display: flex;
|
|
2210
|
-
align-items: center;
|
|
2211
|
-
justify-content: center;
|
|
2212
|
-
font-size: 12px;
|
|
2213
|
-
color: var(--secondary-color-20);
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
.step .inner-circle {
|
|
2217
|
-
width: 4px;
|
|
2218
|
-
height: 4px;
|
|
2219
|
-
border-radius: 50%;
|
|
2220
|
-
background-color: var(--white);
|
|
2221
|
-
position: absolute;
|
|
2222
|
-
top: 50%;
|
|
2223
|
-
left: 50%;
|
|
2224
|
-
transform: translate(-50%, -50%);
|
|
2225
|
-
image-rendering: -webkit-optimize-contrast;
|
|
2226
|
-
image-rendering: crisp-edges;
|
|
2227
|
-
backface-visibility: hidden;
|
|
2228
|
-
transform-style: preserve-3d;
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
.step.completed {
|
|
2232
|
-
background-color: var(--primary-color);
|
|
2233
|
-
border: 1px solid var(--primary-color);
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
.step.completed randstad-icon {
|
|
2237
|
-
color: white;
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
.step.active {
|
|
2241
|
-
background-color: var(--white);
|
|
2242
|
-
border: 1px solid var(--primary-color);
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
.step.active .inner-circle {
|
|
2246
|
-
background-color: var(--primary-color);
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
.step.active .pulse-circle {
|
|
2250
|
-
width: 12px;
|
|
2251
|
-
height: 12px;
|
|
2252
|
-
border-radius: 50%;
|
|
2253
|
-
background-color: var(--primary-color);
|
|
2254
|
-
opacity: 0.25;
|
|
2255
|
-
position: absolute;
|
|
2256
|
-
top: 50%;
|
|
2257
|
-
left: 50%;
|
|
2258
|
-
transform: translate(-50%, -50%) scale(0.6);
|
|
2259
|
-
animation: pulse 2000ms ease-in-out infinite;
|
|
2260
|
-
image-rendering: -webkit-optimize-contrast;
|
|
2261
|
-
image-rendering: crisp-edges;
|
|
2262
|
-
backface-visibility: hidden;
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
@keyframes pulse {
|
|
2266
|
-
0% {
|
|
2267
|
-
transform: translate(-50%, -50%) scale(0.6);
|
|
2268
|
-
}
|
|
2269
|
-
80%, 100% {
|
|
2270
|
-
transform: translate(-50%, -50%) scale(1.2);
|
|
2271
|
-
}
|
|
2272
|
-
}
|
|
2273
|
-
|
|
2274
|
-
.step,
|
|
2275
|
-
.inner-circle,
|
|
2276
|
-
.pulse-circle {
|
|
2277
|
-
will-change: transform;
|
|
2278
|
-
-webkit-font-smoothing: antialiased;
|
|
2279
|
-
-moz-osx-font-smoothing: grayscale;
|
|
2280
|
-
}
|
|
2281
|
-
`}render(){return i`
|
|
2282
|
-
<div class="stepper">
|
|
2283
|
-
${Array.from({length:this.totalSteps},((t,e)=>i`
|
|
2284
|
-
<div
|
|
2285
|
-
class="step ${e<this.currentStep?"completed":e===this.currentStep?"active":""}"
|
|
2286
|
-
>
|
|
2287
|
-
${e<this.currentStep?i`<randstad-icon name="tick-circle" size="16px"></randstad-icon>`:e===this.currentStep?i`
|
|
2288
|
-
<span class="pulse-circle"></span>
|
|
2289
|
-
<span class="inner-circle"></span>
|
|
2290
|
-
`:i`<span class="inner-circle"></span>`}
|
|
2291
|
-
</div>
|
|
2292
|
-
`))}
|
|
2293
|
-
</div>
|
|
2294
|
-
`}};n([I({type:Number}),a("design:type",Object)],Kt.prototype,"totalSteps",void 0),n([I({type:Number}),a("design:type",Object)],Kt.prototype,"currentStep",void 0),Kt=n([l("custom-stepper")],Kt);let Yt=class extends e{constructor(){super(...arguments),this.tabs=[],this.selected="",this.internalSelected="",this.showPrev=!1,this.showNext=!1,this.SCROLL_OFFSET=56,this.handleScroll=()=>{const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const{scrollLeft:e,scrollWidth:i,clientWidth:o}=t;this.showPrev=e>0,this.showNext=e+o<i-1}}static{this.styles=t`
|
|
2295
|
-
:host {
|
|
2296
|
-
display: block;
|
|
2297
|
-
border-bottom: 1px solid #E7E8EC;
|
|
2298
|
-
font-family: "Graphik", sans-serif;
|
|
2299
|
-
}
|
|
2300
|
-
|
|
2301
|
-
.tab-wrapper {
|
|
2302
|
-
display: flex;
|
|
2303
|
-
justify-content: flex-start;
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
.tab {
|
|
2307
|
-
${D};
|
|
2308
|
-
display: flex;
|
|
2309
|
-
gap: 8px;
|
|
2310
|
-
flex-direction: row;
|
|
2311
|
-
padding: 24px;
|
|
2312
|
-
align-items: center;
|
|
2313
|
-
text-align: center;
|
|
2314
|
-
color: #6F758D;
|
|
2315
|
-
cursor: pointer;
|
|
2316
|
-
text-decoration: none;
|
|
2317
|
-
position: relative;
|
|
2318
|
-
flex: 0 0 auto;
|
|
2319
|
-
min-width: 0;
|
|
2320
|
-
white-space: nowrap;
|
|
2321
|
-
overflow: hidden;
|
|
2322
|
-
text-overflow: ellipsis;
|
|
2323
|
-
transition: background-color 0.2s ease-in-out;
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
.tab:hover {
|
|
2327
|
-
background-color: #E7E8EC;
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2330
|
-
.tab.active {
|
|
2331
|
-
color: #2175D9;
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
|
-
.tab.active::after {
|
|
2335
|
-
height: 2px;
|
|
2336
|
-
background-color: #2175D9;
|
|
2337
|
-
content: '';
|
|
2338
|
-
position: absolute;
|
|
2339
|
-
bottom: 0;
|
|
2340
|
-
left: 0;
|
|
2341
|
-
width: 100%;
|
|
2342
|
-
pointer-events: none;
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
.tab.active img {
|
|
2346
|
-
filter: brightness(0) saturate(100%) invert(28%) sepia(87%) saturate(3514%) hue-rotate(202deg) brightness(92%) contrast(101%);
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
|
-
img {
|
|
2350
|
-
width: 24px;
|
|
2351
|
-
height: 24px;
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
.scroll-container {
|
|
2355
|
-
position: relative;
|
|
2356
|
-
display: flex;
|
|
2357
|
-
align-items: center;
|
|
2358
|
-
overflow: hidden;
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
.tab-wrapper {
|
|
2362
|
-
display: flex;
|
|
2363
|
-
justify-content: flex-start;
|
|
2364
|
-
gap: 0px;
|
|
2365
|
-
overflow-x: auto;
|
|
2366
|
-
scroll-behavior: smooth;
|
|
2367
|
-
scrollbar-width: none; /* Firefox */
|
|
2368
|
-
-ms-overflow-style: none; /* IE 10+ */
|
|
2369
|
-
flex: 1;
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
|
-
.tab-wrapper::-webkit-scrollbar {
|
|
2373
|
-
display: none;
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
.scroll-button {
|
|
2377
|
-
border: none;
|
|
2378
|
-
font-size: 24px;
|
|
2379
|
-
cursor: pointer;
|
|
2380
|
-
z-index: 1;
|
|
2381
|
-
width: 56px;
|
|
2382
|
-
height: 100%;
|
|
2383
|
-
display: flex;
|
|
2384
|
-
align-items: center;
|
|
2385
|
-
color: #2175D9;
|
|
2386
|
-
padding: 0px;
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
.scroll-button.prev {
|
|
2390
|
-
justify-content: flex-start;
|
|
2391
|
-
position: absolute;
|
|
2392
|
-
left: 0;
|
|
2393
|
-
background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
.scroll-button.next {
|
|
2397
|
-
justify-content: flex-end;
|
|
2398
|
-
position: absolute;
|
|
2399
|
-
right: 0;
|
|
2400
|
-
background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
@media (max-width: 940px) {
|
|
2404
|
-
.tab {
|
|
2405
|
-
${M};
|
|
2406
|
-
padding: 16px;
|
|
2407
|
-
}
|
|
2408
|
-
}
|
|
2409
|
-
`}firstUpdated(){this.handleScroll()}updated(t){t.has("selected")&&(this.internalSelected=this.selected)}selectTab(t){this.internalSelected=t;const e=this.tabs.find((e=>e.value===t));e&&this.dispatchEvent(new CustomEvent("tab-change",{detail:e,bubbles:!0,composed:!0}))}scrollTabsLeft(){const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const e=t.scrollLeft,i=Array.from(t.querySelectorAll(".tab"));for(let o=i.length-1;o>=0;o--){const r=i[o].offsetLeft;if(r<e+this.SCROLL_OFFSET-1){const e=r-this.SCROLL_OFFSET;t.scrollTo({left:e,behavior:"smooth"});break}}setTimeout((()=>this.handleScroll()),300)}scrollTabsRight(){const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const e=t.scrollLeft,i=Array.from(t.querySelectorAll(".tab"));for(const o of i)if(o.offsetLeft>e+this.SCROLL_OFFSET){const e=o.offsetLeft-this.SCROLL_OFFSET;t.scrollTo({left:e,behavior:"smooth"});break}setTimeout((()=>this.handleScroll()),300)}render(){return i`
|
|
2410
|
-
<div class="scroll-container">
|
|
2411
|
-
${this.showPrev?i`
|
|
2412
|
-
<button class="scroll-button prev" @click=${this.scrollTabsLeft}>
|
|
2413
|
-
<randstad-icon name="arrow_left" size="36px"></randstad-icon>
|
|
2414
|
-
</button>
|
|
2415
|
-
`:null}
|
|
2416
|
-
|
|
2417
|
-
<div class="tab-wrapper" @scroll=${this.handleScroll}>
|
|
2418
|
-
${this.tabs.map((t=>i`
|
|
2419
|
-
<div class="tab ${this.internalSelected===t.value?"active":""}"
|
|
2420
|
-
@click=${()=>this.selectTab(t.value)}>
|
|
2421
|
-
<img src="/assets/icons/${t.icon}" alt="${t.label}" />
|
|
2422
|
-
<span>${t.label}</span>
|
|
2423
|
-
</div>
|
|
2424
|
-
`))}
|
|
2425
|
-
</div>
|
|
2426
|
-
|
|
2427
|
-
${this.showNext?i`
|
|
2428
|
-
<button class="scroll-button next" @click=${this.scrollTabsRight}>
|
|
2429
|
-
<randstad-icon name="arrow_right" size="36px"></randstad-icon>
|
|
2430
|
-
</button>
|
|
2431
|
-
`:null}
|
|
2432
|
-
</div>
|
|
2433
|
-
`}};n([I({type:Array}),a("design:type",Array)],Yt.prototype,"tabs",void 0),n([I({type:String}),a("design:type",String)],Yt.prototype,"selected",void 0),n([L(),a("design:type",String)],Yt.prototype,"internalSelected",void 0),n([L(),a("design:type",Object)],Yt.prototype,"showPrev",void 0),n([L(),a("design:type",Object)],Yt.prototype,"showNext",void 0),Yt=n([l("tabs-bar")],Yt);let Wt=class extends e{constructor(){super(...arguments),this.files=[],this.loading=!1,this.progress=0,this.isDragging=!1,this.disabled=!1}static{this.styles=t`
|
|
2434
|
-
|
|
2435
|
-
:host {
|
|
2436
|
-
font-family: 'Graphik', sans-serif;
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
.container {
|
|
2440
|
-
display: flex;
|
|
2441
|
-
gap: 16px;
|
|
2442
|
-
flex-direction: column;
|
|
2443
|
-
border: 1px solid var(--secondary-color-10);
|
|
2444
|
-
border-radius: 4px;
|
|
2445
|
-
padding: 16px;
|
|
2446
|
-
align-items: center;
|
|
2447
|
-
background-color: var(--white);
|
|
2448
|
-
transition: border 0.2s ease, outline 0.2s ease;
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
.container.dragging {
|
|
2452
|
-
border: 1px dashed var(--secondary-color-40);
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
.icon {
|
|
2456
|
-
width: 40px;
|
|
2457
|
-
height: 40px
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
.text-container {
|
|
2461
|
-
display: flex;
|
|
2462
|
-
flex-direction: column;
|
|
2463
|
-
align-items: center;
|
|
2464
|
-
gap: 8px;
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
|
-
.text-main {
|
|
2468
|
-
${R};
|
|
2469
|
-
text-align: center;
|
|
2470
|
-
vertical-align: middle;
|
|
2471
|
-
color: var(--secondary-color-80);
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
.text-secondary {
|
|
2475
|
-
${_};
|
|
2476
|
-
text-align: center;
|
|
2477
|
-
vertical-align: middle;
|
|
2478
|
-
color: var(--secondary-color-60);
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
.text-tertiary {
|
|
2482
|
-
${_};
|
|
2483
|
-
text-align: center;
|
|
2484
|
-
vertical-align: middle;
|
|
2485
|
-
color: var(--secondary-color-40);
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
.button {
|
|
2489
|
-
${_};
|
|
2490
|
-
background-color: var(--primary-color);
|
|
2491
|
-
border: none;
|
|
2492
|
-
padding: 4px 16px;
|
|
2493
|
-
cursor: pointer;
|
|
2494
|
-
border-radius: 4px;
|
|
2495
|
-
color: var(--white);
|
|
2496
|
-
text-align: center;
|
|
2497
|
-
vertical-align: middle;
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
|
-
:host([disabled]) .button {
|
|
2501
|
-
background-color: var(--secondary-color-20);
|
|
2502
|
-
color: var(--secondary-color-80);
|
|
2503
|
-
cursor: not-allowed;
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
input[type="file"] {
|
|
2507
|
-
display: none;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
.progress-bar-container {
|
|
2511
|
-
min-height: 23px;
|
|
2512
|
-
display: flex;
|
|
2513
|
-
align-items: center;
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
.progress-bar {
|
|
2517
|
-
min-width: 80px;
|
|
2518
|
-
height: 8px;
|
|
2519
|
-
background-color: var(--secondary-color-20);
|
|
2520
|
-
border-radius: 999px;
|
|
2521
|
-
overflow: hidden;
|
|
2522
|
-
}
|
|
2523
|
-
|
|
2524
|
-
.progress-bar-fill {
|
|
2525
|
-
height: 100%;
|
|
2526
|
-
background-color: var(--primary-color);
|
|
2527
|
-
transition: width 0.1s ease;
|
|
2528
|
-
}
|
|
2529
|
-
`}handleFiles(t){if(!t||this.loading)return;const e=Array.from(t).slice(0,3-this.files.length);this.loading=!0,this.progress=0;const i=setInterval((()=>{this.progress+=5,this.progress>=100&&(clearInterval(i),this.files=[...this.files,...e],this.loading=!1,this.progress=0,this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})))}),100)}onFileInputChange(t){const e=t.target;this.handleFiles(e.files)}onDrop(t){t.preventDefault(),this.disabled||(this.isDragging=!1,this.handleFiles(t.dataTransfer?.files||null))}onDragOver(t){t.preventDefault(),this.disabled||(this.isDragging=!0)}onDragLeave(t){t.preventDefault(),this.disabled||(this.isDragging=!1)}render(){return i`
|
|
2530
|
-
<div class="container ${this.isDragging?"dragging":""}"
|
|
2531
|
-
@drop="${this.onDrop}"
|
|
2532
|
-
@dragover="${this.onDragOver}"
|
|
2533
|
-
@dragleave="${this.onDragLeave}">
|
|
2534
|
-
<img class="icon"
|
|
2535
|
-
src=${this.disabled?"/assets/img/image-upload-disabled.svg":"/assets/img/image-upload-circle.svg"}
|
|
2536
|
-
alt="Subir imagen" />
|
|
2537
|
-
<div class="text-container">
|
|
2538
|
-
<div class="text-main">subí hasta 3 imágenes</div>
|
|
2539
|
-
<div class="text-secondary">
|
|
2540
|
-
Podés agregar un archivo o arrastrar y soltar acá
|
|
2541
|
-
</div>
|
|
2542
|
-
<div class="text-tertiary">.jpg, .jpeg, .png</div>
|
|
2543
|
-
</div>
|
|
2544
|
-
${this.loading?i`
|
|
2545
|
-
<div class="progress-bar-container">
|
|
2546
|
-
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
2547
|
-
<div class="progress-bar-fill" style="width: ${this.progress}%;"></div>
|
|
2548
|
-
</div>
|
|
2549
|
-
</div>
|
|
2550
|
-
`:i`
|
|
2551
|
-
<label class="button">
|
|
2552
|
-
agregar archivo
|
|
2553
|
-
<input type="file" accept=".jpg,.jpeg,.png" multiple @change="${this.onFileInputChange}" />
|
|
2554
|
-
</label>
|
|
2555
|
-
`}
|
|
2556
|
-
</div>
|
|
2557
|
-
`}};n([I({type:Array}),a("design:type",Array)],Wt.prototype,"files",void 0),n([L(),a("design:type",Object)],Wt.prototype,"loading",void 0),n([L(),a("design:type",Object)],Wt.prototype,"progress",void 0),n([L(),a("design:type",Object)],Wt.prototype,"isDragging",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Wt.prototype,"disabled",void 0),Wt=n([l("upload-image")],Wt);export{N as AccordionList,V as AccordionPanel,H as CarouselCard,K as Checkbox,Q as CustomModal,Z as CustomPopup,Vt as CustomRadio,Kt as CustomStepper,Nt as FilterableSelect,W as FormGroup,X as IconComponent,tt as ProgressCircle,G as RandstadButton,Y as RandstadForm,J as RandstadNotice,Yt as TabsBar,Wt as UploadImage};
|
|
2558
|
-
//# sourceMappingURL=index.js.map
|