@randstad-uca/design-system 1.0.20 → 1.0.22-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/arrow_down.svg +3 -0
- package/dist/assets/icons/arrow_left.svg +3 -0
- package/dist/assets/icons/arrow_right.svg +3 -0
- package/dist/assets/icons/arrow_up.svg +3 -0
- package/dist/assets/icons/{default/ayuda.svg → ayuda.svg} +5 -5
- package/dist/assets/icons/{default/calendar.svg → calendar.svg} +13 -13
- package/dist/assets/icons/{default/check.svg → check.svg} +10 -10
- package/dist/assets/icons/close.svg +10 -0
- package/dist/assets/icons/{default/email.svg → email.svg} +4 -4
- package/dist/assets/icons/{default/eye.svg → eye.svg} +4 -4
- package/dist/assets/icons/{default/eye_crossed.svg → eye_crossed.svg} +3 -3
- package/dist/assets/icons/home.svg +10 -0
- package/dist/assets/icons/icon_check.svg +4 -0
- package/dist/assets/icons/icon_trash.svg +7 -0
- package/dist/assets/icons/icon_warning.svg +6 -0
- package/dist/assets/icons/{default/info.svg → info.svg} +5 -5
- package/dist/assets/icons/settings.svg +11 -0
- package/dist/assets/icons/thumbs_up.svg +11 -0
- package/dist/assets/icons/tick-circle.svg +3 -0
- package/dist/assets/icons/user.svg +10 -0
- package/dist/assets/icons/{default/warning.svg → warning.svg} +5 -5
- package/dist/assets/img/carousel-example.png +0 -0
- package/dist/assets/img/facebook_logo.svg +4 -0
- package/dist/assets/img/google_logo.svg +13 -0
- package/dist/assets/img/icon_check.svg +4 -0
- package/dist/assets/img/icon_trash.svg +7 -0
- package/dist/assets/img/icon_warning.svg +6 -0
- package/dist/assets/img/image-upload-circle.svg +6 -0
- package/dist/assets/img/image-upload-disabled.svg +6 -0
- package/dist/assets/img/linkedin_logo.svg +3 -0
- package/dist/components/Form.d.ts +0 -1
- package/dist/components/Icon.d.ts +1 -3
- package/dist/components/Modal.d.ts +11 -0
- package/dist/components/Notice.d.ts +9 -1
- package/dist/components/Popup.d.ts +3 -0
- package/dist/components/Radio.d.ts +0 -1
- package/dist/components/Select.d.ts +11 -5
- package/dist/components/Tabs.d.ts +7 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +650 -435
- package/dist/index.js.map +1 -1
- package/dist/package.json +5 -3
- package/dist/{index.css → randstad-design-system.css} +1 -1
- package/dist/stories/Button.stories.d.ts +1 -0
- package/dist/stories/Icon.stories.d.ts +1 -2
- package/dist/stories/Modal.stories.d.ts +5 -0
- package/dist/stories/Notice.stories.d.ts +39 -6
- package/dist/stories/Select.stories.d.ts +13 -174
- package/dist/stories/Stepper.stories.d.ts +29 -16
- package/dist/stories/Tabs.stories.d.ts +3 -4
- package/dist/styles/colors.css +17 -3
- package/dist/styles/fontStyles.d.ts +7 -0
- package/dist/styles/fontStyles.ts +60 -0
- package/dist/styles/fonts.css +0 -43
- package/package.json +5 -3
- package/dist/components/Test.d.ts +0 -5
- package/dist/components/TestButton.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import{
|
|
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
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const
|
|
7
|
+
const l=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},d=globalThis,c=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,p=Symbol(),h=new WeakMap;
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/let
|
|
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)}},y=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:m,defineProperty:f,getOwnPropertyDescriptor:g,getOwnPropertyNames:v,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}},P=(t,e)=>!m(t,e),T={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:P};
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/Symbol.metadata??=Symbol("metadata"),
|
|
17
|
+
*/Symbol.metadata??=Symbol("metadata"),k.litPropertyMetadata??=new WeakMap;class A extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=T){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&&f(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=g(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)??T}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=[...v(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(y(t))}else void 0!==t&&e.push(y(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??P)(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){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[E("elementProperties")]=new Map,A[E("finalized")]=new Map,C?.({ReactiveElement:A}),(k.reactiveElementVersions??=[]).push("2.1.0");
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const z={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:P},j=(t=z,e,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function I(t){return(e,i)=>"object"==typeof i?j(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/function
|
|
28
|
+
*/function L(t){return I({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,7 +36,52 @@ const O={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:A},z=(t=O,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function
|
|
39
|
+
function _(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 R=t`
|
|
40
|
+
font-family: 'Graphik', sans-serif;
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
line-height: 15px;
|
|
44
|
+
letter-spacing: 0%;
|
|
45
|
+
`,F=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
|
+
`,U=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
|
+
`,V=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
|
+
`,N=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 q=class extends e{constructor(){super(...arguments),this.variant="button-primary",this.size="md",this.label="",this.loader=!1,this.iconPosition="left",this.disabled=!1,this.iconName=null,this.type="button"}static{this.styles=t`
|
|
40
85
|
:host {
|
|
41
86
|
display: inline-block;
|
|
42
87
|
}
|
|
@@ -45,7 +90,6 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
45
90
|
display: flex;
|
|
46
91
|
align-items: center;
|
|
47
92
|
justify-content: center;
|
|
48
|
-
font-family: "Graphik", sans-serif;
|
|
49
93
|
border-radius: 4px;
|
|
50
94
|
cursor: pointer;
|
|
51
95
|
font-weight: 400;
|
|
@@ -57,14 +101,12 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
57
101
|
}
|
|
58
102
|
|
|
59
103
|
.button-lg {
|
|
60
|
-
|
|
61
|
-
line-height: 30px;
|
|
104
|
+
${B}
|
|
62
105
|
min-height: 62px;
|
|
63
106
|
}
|
|
64
107
|
|
|
65
108
|
.button-md {
|
|
66
|
-
|
|
67
|
-
line-height: 25px;
|
|
109
|
+
${M}
|
|
68
110
|
min-height: 57px;
|
|
69
111
|
}
|
|
70
112
|
|
|
@@ -101,8 +143,8 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
101
143
|
}
|
|
102
144
|
|
|
103
145
|
.button-secondary:not([disabled]):hover {
|
|
104
|
-
color:
|
|
105
|
-
border-color:
|
|
146
|
+
color: var(--primary-button-hover);
|
|
147
|
+
border-color: var(--primary-button-hover);
|
|
106
148
|
}
|
|
107
149
|
|
|
108
150
|
.button-secondary:not([disabled]):active {
|
|
@@ -129,11 +171,11 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
129
171
|
}
|
|
130
172
|
|
|
131
173
|
.button-tertiary:not([disabled]):hover {
|
|
132
|
-
background:
|
|
174
|
+
background: var(--primary-color-5);
|
|
133
175
|
}
|
|
134
176
|
|
|
135
177
|
.button-tertiary:not([disabled]):active {
|
|
136
|
-
background-color:
|
|
178
|
+
background-color: var(--primary-color-10);
|
|
137
179
|
}
|
|
138
180
|
|
|
139
181
|
.button-tertiary:not([disabled]):focus-visible {
|
|
@@ -142,7 +184,7 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
142
184
|
}
|
|
143
185
|
|
|
144
186
|
.button-tertiary[disabled] {
|
|
145
|
-
color:
|
|
187
|
+
color: var(--secondary-color-60);
|
|
146
188
|
cursor: not-allowed;
|
|
147
189
|
}
|
|
148
190
|
|
|
@@ -157,11 +199,11 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
157
199
|
}
|
|
158
200
|
|
|
159
201
|
.button-round:not([disabled]):hover {
|
|
160
|
-
background-color:
|
|
202
|
+
background-color: var(--randstad-blue-10);
|
|
161
203
|
}
|
|
162
204
|
|
|
163
205
|
.button-round:not([disabled]):active {
|
|
164
|
-
background-color:
|
|
206
|
+
background-color: var(--randstad-blue-40);
|
|
165
207
|
}
|
|
166
208
|
|
|
167
209
|
.button-round:not([disabled]):focus-visible {
|
|
@@ -227,11 +269,13 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
227
269
|
border: none;
|
|
228
270
|
color: var(--white);
|
|
229
271
|
}
|
|
230
|
-
`}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}))}render(){const t
|
|
272
|
+
`}handleClick(t){if(!this.disabled)if("submit"===this.type){const t=this.closest("form");t&&t.requestSubmit()}else this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}render(){const t={button:!0,[`button-${this.size}`]:"button-round"!==this.variant,[this.variant]:!0,loader:this.loader},e="button-tertiary"===this.variant?"var(--primary-color)":"white";return i`
|
|
231
273
|
<button
|
|
274
|
+
part="button"
|
|
232
275
|
type=${this.type}
|
|
233
|
-
class=${t}
|
|
276
|
+
class=${s(t)}
|
|
234
277
|
?disabled=${this.disabled}
|
|
278
|
+
?aria-busy=${this.loader}
|
|
235
279
|
@click=${this.handleClick}
|
|
236
280
|
>
|
|
237
281
|
${this.loader?i`
|
|
@@ -241,26 +285,24 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
241
285
|
<span class="dot" style="background-color: ${e};"></span>
|
|
242
286
|
</div>
|
|
243
287
|
`:i`
|
|
244
|
-
${this.iconSrc&&"button-round"===this.variant?i`<img src=${this.iconSrc} alt="icon" class="button-icon" />`:""}
|
|
288
|
+
${this.iconSrc&&"button-round"===this.variant?i`<img src=${this.iconSrc} alt="icon" class="button-icon" part="button-icon"/>`:""}
|
|
245
289
|
${this.iconName&&"button-round"!==this.variant&&"left"===this.iconPosition?i`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
|
|
246
290
|
${this.label?i`<span>${this.label}</span>`:i`<slot></slot>`}
|
|
247
291
|
${this.iconName&&"button-round"!==this.variant&&"right"===this.iconPosition?i`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
|
|
248
292
|
`}
|
|
249
293
|
</button>
|
|
250
|
-
`}};
|
|
294
|
+
`}};n([I({type:String}),a("design:type",String)],q.prototype,"variant",void 0),n([I({type:String}),a("design:type",String)],q.prototype,"size",void 0),n([I({type:String}),a("design:type",Object)],q.prototype,"label",void 0),n([I({type:Boolean}),a("design:type",Object)],q.prototype,"loader",void 0),n([I({type:String,attribute:"icon-src"}),a("design:type",String)],q.prototype,"iconSrc",void 0),n([I({type:String}),a("design:type",String)],q.prototype,"iconPosition",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],q.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],q.prototype,"iconName",void 0),n([I({type:String}),a("design:type",String)],q.prototype,"type",void 0),q=n([l("randstad-button")],q);let D=class extends e{constructor(){super(...arguments),this.prefix="Acepto los",this.clause1Text="términos y condiciones",this.connector="y los",this.clause2Text="avisos de privacidad del sitio",this.checked=!1}static{this.styles=t`
|
|
251
295
|
:host {
|
|
252
296
|
display: block;
|
|
253
297
|
max-width: 100%;
|
|
254
298
|
}
|
|
255
299
|
|
|
256
300
|
label {
|
|
301
|
+
${F}
|
|
257
302
|
display: flex;
|
|
258
303
|
align-items: center;
|
|
259
304
|
gap: 8px;
|
|
260
|
-
|
|
261
|
-
font-size: 14px;
|
|
262
|
-
line-height: 25px;
|
|
263
|
-
color: #0F1941;
|
|
305
|
+
color: var(--secondary-color);
|
|
264
306
|
}
|
|
265
307
|
|
|
266
308
|
input[type="checkbox"] {
|
|
@@ -268,14 +310,14 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
268
310
|
min-height: 24px;
|
|
269
311
|
cursor: pointer;
|
|
270
312
|
border-radius: 4px;
|
|
271
|
-
border: 1px solid
|
|
313
|
+
border: 1px solid var(--secondary-color-20);
|
|
272
314
|
appearance: none;
|
|
273
315
|
position: relative;
|
|
274
316
|
}
|
|
275
317
|
|
|
276
318
|
input[type="checkbox"]:checked {
|
|
277
|
-
background-color:
|
|
278
|
-
border: 1px solid
|
|
319
|
+
background-color: var(--primary-color);
|
|
320
|
+
border: 1px solid var(--primary-color);
|
|
279
321
|
}
|
|
280
322
|
|
|
281
323
|
input[type="checkbox"]:checked::after {
|
|
@@ -299,14 +341,16 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
299
341
|
}
|
|
300
342
|
|
|
301
343
|
.terms-link {
|
|
302
|
-
color:
|
|
344
|
+
color: var(--primary-color);
|
|
303
345
|
text-decoration: none;
|
|
304
346
|
cursor: pointer;
|
|
305
347
|
}
|
|
306
|
-
`}toggleCheck(t){this.checked=t.target.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}renderClause(t,e){return e?i`<a class="terms-link" href="${e}" target="_blank" rel="noopener" @click=${this.stopPropagation}>${t}</a>`:i`${t}`}stopPropagation(t){t.stopPropagation()}render(){return i`
|
|
348
|
+
`}toggleCheck(t){this.checked=t.target.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}renderClause(t,e){return e?i`<a class="terms-link" href="${e}" target="_blank" rel="noopener" @click=${this.stopPropagation}>${t}</a>`:i`${t}`}stopPropagation(t){t.stopPropagation()}render(){return i`
|
|
307
349
|
<label>
|
|
308
350
|
<input
|
|
309
351
|
type="checkbox"
|
|
352
|
+
role="checkbox"
|
|
353
|
+
aria-checked=${this.checked?"true":"false"}
|
|
310
354
|
.checked=${this.checked}
|
|
311
355
|
@change=${this.toggleCheck}
|
|
312
356
|
/>
|
|
@@ -317,7 +361,7 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
317
361
|
${this.renderClause(this.clause2Text,this.clause2Url)}.
|
|
318
362
|
</span>
|
|
319
363
|
</label>
|
|
320
|
-
`}};
|
|
364
|
+
`}};n([I({type:String}),a("design:type",Object)],D.prototype,"prefix",void 0),n([I({type:String}),a("design:type",Object)],D.prototype,"clause1Text",void 0),n([I({type:String}),a("design:type",String)],D.prototype,"clause1Url",void 0),n([I({type:String}),a("design:type",Object)],D.prototype,"connector",void 0),n([I({type:String}),a("design:type",Object)],D.prototype,"clause2Text",void 0),n([I({type:String}),a("design:type",String)],D.prototype,"clause2Url",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],D.prototype,"checked",void 0),D=n([l("randstad-checkbox")],D);let G=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}static{this.styles=t`
|
|
321
365
|
:host {
|
|
322
366
|
display: block;
|
|
323
367
|
font-family: 'Graphik', sans-serif;
|
|
@@ -339,55 +383,10 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
339
383
|
}
|
|
340
384
|
|
|
341
385
|
.form-label {
|
|
342
|
-
|
|
343
|
-
line-height: 25px;
|
|
344
|
-
font-weight: 400;
|
|
386
|
+
${M}
|
|
345
387
|
color: var(--label-color, var(--secondary-color-80));
|
|
346
388
|
}
|
|
347
389
|
|
|
348
|
-
.tooltip-wrapper {
|
|
349
|
-
position: relative;
|
|
350
|
-
display: inline-flex;
|
|
351
|
-
align-items: center;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.tooltip {
|
|
355
|
-
visibility: hidden;
|
|
356
|
-
position: absolute;
|
|
357
|
-
top: auto;
|
|
358
|
-
right: 125%;
|
|
359
|
-
left: auto;
|
|
360
|
-
transform: none;
|
|
361
|
-
background-color: #333;
|
|
362
|
-
color: #fff;
|
|
363
|
-
padding: 8px 12px;
|
|
364
|
-
border-radius: 4px;
|
|
365
|
-
font-size: 14px;
|
|
366
|
-
line-height: 20px;
|
|
367
|
-
white-space: nowrap;
|
|
368
|
-
z-index: 10;
|
|
369
|
-
opacity: 0;
|
|
370
|
-
transition: opacity 0.2s ease;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.tooltip::after {
|
|
374
|
-
content: '';
|
|
375
|
-
position: absolute;
|
|
376
|
-
right: -6px;
|
|
377
|
-
bottom: 50%;
|
|
378
|
-
transform: translateY(50%);
|
|
379
|
-
width: 0;
|
|
380
|
-
height: 0;
|
|
381
|
-
border-style: solid;
|
|
382
|
-
border-width: 6px 0 6px 6px;
|
|
383
|
-
border-color: transparent transparent transparent #333;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.tooltip-wrapper:hover .tooltip {
|
|
387
|
-
visibility: visible;
|
|
388
|
-
opacity: 1;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
390
|
.form-container {
|
|
392
391
|
position: relative;
|
|
393
392
|
display: flex;
|
|
@@ -396,52 +395,43 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
396
395
|
}
|
|
397
396
|
|
|
398
397
|
.form-input {
|
|
399
|
-
|
|
400
|
-
line-height: 30px;
|
|
398
|
+
${B}
|
|
401
399
|
padding: 16px;
|
|
402
400
|
border: 1px solid var(--secondary-color-10);
|
|
403
401
|
border-radius: 4px;
|
|
404
402
|
outline: none;
|
|
405
403
|
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
406
404
|
width: 100%;
|
|
407
|
-
color:
|
|
405
|
+
color: var(--secondary-color);
|
|
408
406
|
}
|
|
409
407
|
|
|
410
408
|
.form.error .form-input {
|
|
411
|
-
background-color:
|
|
412
|
-
border-color:
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.form.success .form-input {
|
|
416
|
-
border-color: #28a745;
|
|
417
|
-
background-color: #d4edda;
|
|
409
|
+
background-color: var(--ui-negative-5);
|
|
410
|
+
border-color: var(--ui-negative);
|
|
418
411
|
}
|
|
419
412
|
|
|
420
413
|
/* Hover normal (sin error ni foco) */
|
|
421
414
|
.form:not(.error):not(:focus-within) .form-input:hover {
|
|
422
|
-
box-shadow: 0px 0px 0px 4px
|
|
415
|
+
box-shadow: 0px 0px 0px 4px var(--form-hover-shadow);
|
|
423
416
|
}
|
|
424
417
|
|
|
425
418
|
/* Hover con error (sin foco) */
|
|
426
419
|
.form.error:not(:focus-within) .form-input:hover {
|
|
427
|
-
box-shadow: 0px 0px 0px 4px
|
|
420
|
+
box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);
|
|
428
421
|
}
|
|
429
422
|
|
|
430
423
|
.form-input:focus {
|
|
431
|
-
border: 2px solid
|
|
424
|
+
border: 2px solid var(--primary-color)
|
|
432
425
|
}
|
|
433
426
|
|
|
434
427
|
.form.disabled .form-input {
|
|
435
|
-
background-color:
|
|
428
|
+
background-color: var(--secondary-color-10);
|
|
436
429
|
cursor: not-allowed;
|
|
437
430
|
}
|
|
438
431
|
|
|
439
432
|
input::placeholder {
|
|
440
|
-
|
|
433
|
+
${B}
|
|
441
434
|
color: var(--secondary-color-40);
|
|
442
|
-
font-size: 18px;
|
|
443
|
-
line-height: 30px;
|
|
444
|
-
font-weight: 400;
|
|
445
435
|
}
|
|
446
436
|
|
|
447
437
|
.input-with-button {
|
|
@@ -478,11 +468,7 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
478
468
|
}
|
|
479
469
|
|
|
480
470
|
textarea {
|
|
481
|
-
|
|
482
|
-
font-weight: 400;
|
|
483
|
-
font-size: 18px;
|
|
484
|
-
line-height: 30px;
|
|
485
|
-
letter-spacing: 0%;
|
|
471
|
+
${B}
|
|
486
472
|
resize: none;
|
|
487
473
|
}
|
|
488
474
|
|
|
@@ -492,14 +478,12 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
492
478
|
}
|
|
493
479
|
|
|
494
480
|
.form.disabled textarea.form-input {
|
|
495
|
-
background-color:
|
|
481
|
+
background-color: var(--secondary-color-10);
|
|
496
482
|
cursor: not-allowed;
|
|
497
483
|
}
|
|
498
484
|
|
|
499
485
|
.helper-description {
|
|
500
|
-
|
|
501
|
-
font-weight: 400;
|
|
502
|
-
line-height: 25px;
|
|
486
|
+
${M}
|
|
503
487
|
color: var(--secondary-color-40);
|
|
504
488
|
margin: 0px;
|
|
505
489
|
}
|
|
@@ -509,21 +493,15 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
509
493
|
}
|
|
510
494
|
|
|
511
495
|
.error-message {
|
|
512
|
-
|
|
513
|
-
line-height: 25px;
|
|
496
|
+
${M}
|
|
514
497
|
color: var(--ui-negative);
|
|
515
498
|
margin: 0px;
|
|
516
499
|
}
|
|
517
500
|
|
|
518
501
|
.link-text {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
color: #2175D9;
|
|
502
|
+
${M}
|
|
503
|
+
color: var(--primary-color);
|
|
522
504
|
cursor: pointer;
|
|
523
|
-
margin: 0px;
|
|
524
|
-
font-family: Graphik;
|
|
525
|
-
font-weight: 400;
|
|
526
|
-
letter-spacing: 0%;
|
|
527
505
|
text-align: end;
|
|
528
506
|
text-decoration: none;
|
|
529
507
|
vertical-align: middle;
|
|
@@ -534,20 +512,11 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
534
512
|
}
|
|
535
513
|
|
|
536
514
|
.link-text:hover {
|
|
537
|
-
color:
|
|
515
|
+
color: var(--secondary-color);
|
|
538
516
|
}
|
|
539
517
|
|
|
540
|
-
|
|
541
|
-
color:
|
|
542
|
-
}
|
|
543
|
-
.tooltip-wrapper randstad-icon svg {
|
|
544
|
-
fill: #2175D9 !important;
|
|
545
|
-
}
|
|
546
|
-
.toggle-password randstad-icon {
|
|
547
|
-
color: #2175D9 !important;
|
|
548
|
-
}
|
|
549
|
-
.toggle-password randstad-icon svg {
|
|
550
|
-
fill: #2175D9 !important;
|
|
518
|
+
randstad-icon {
|
|
519
|
+
color: var(--primary-color);
|
|
551
520
|
}
|
|
552
521
|
|
|
553
522
|
.clean-button {
|
|
@@ -564,20 +533,65 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
564
533
|
width: 40px;
|
|
565
534
|
height: 40px;
|
|
566
535
|
}
|
|
536
|
+
|
|
567
537
|
.clean-button randstad-icon {
|
|
568
538
|
width: 24px;
|
|
569
539
|
height: 24px;
|
|
570
540
|
}
|
|
541
|
+
|
|
542
|
+
// TOOLTIP, NO SE ESTÁ USANDO EN FORMS EN ESTE MOMENTO, PERO SE DEJA POR SI SE NECESITA
|
|
543
|
+
.tooltip-wrapper {
|
|
544
|
+
position: relative;
|
|
545
|
+
display: inline-flex;
|
|
546
|
+
align-items: center;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.tooltip {
|
|
550
|
+
visibility: hidden;
|
|
551
|
+
position: absolute;
|
|
552
|
+
top: auto;
|
|
553
|
+
right: 125%;
|
|
554
|
+
left: auto;
|
|
555
|
+
transform: none;
|
|
556
|
+
background-color: #333;
|
|
557
|
+
color: #fff;
|
|
558
|
+
padding: 8px 12px;
|
|
559
|
+
border-radius: 4px;
|
|
560
|
+
font-size: 14px;
|
|
561
|
+
line-height: 20px;
|
|
562
|
+
white-space: nowrap;
|
|
563
|
+
z-index: 10;
|
|
564
|
+
opacity: 0;
|
|
565
|
+
transition: opacity 0.2s ease;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.tooltip::after {
|
|
569
|
+
content: '';
|
|
570
|
+
position: absolute;
|
|
571
|
+
right: -6px;
|
|
572
|
+
bottom: 50%;
|
|
573
|
+
transform: translateY(50%);
|
|
574
|
+
width: 0;
|
|
575
|
+
height: 0;
|
|
576
|
+
border-style: solid;
|
|
577
|
+
border-width: 6px 0 6px 6px;
|
|
578
|
+
border-color: transparent transparent transparent #333;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.tooltip-wrapper:hover .tooltip {
|
|
582
|
+
visibility: visible;
|
|
583
|
+
opacity: 1;
|
|
584
|
+
}
|
|
571
585
|
`}togglePassword(t){this.isPasswordVisible=!this.isPasswordVisible;const e=t.currentTarget.parentElement?.querySelector("input");e&&(e.type=this.isPasswordVisible?"text":"password"),this.requestUpdate()}handleInput(t){const e=t.target.value;void 0!==this.maxLength&&"textarea"!==this.type?this.value=e.slice(0,this.maxLength):this.value=e,this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleClear(){this.value="",this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleLinkClick(t){t.preventDefault(),this.linkRoute&&this.dispatchEvent(new CustomEvent("linkClicked",{detail:this.linkRoute,bubbles:!0,composed:!0}))}render(){const t=this.cleanButton&&this.value&&"password"!==this.type&&"textarea"!==this.type;return i`
|
|
572
586
|
<div
|
|
573
|
-
class="form ${this.error?"error":""} ${this.
|
|
587
|
+
class="form ${this.error?"error":""} ${this.disabled?"disabled":""}"
|
|
574
588
|
style=${this.labelColor?`--label-color: ${this.labelColor}`:o}
|
|
575
589
|
>
|
|
576
590
|
${this.label?i`
|
|
577
591
|
<div class="label-container">
|
|
578
592
|
<label class="form-label">${this.label}</label>
|
|
579
593
|
${this.tooltipMessage?.trim()?i`<div class="tooltip-wrapper">
|
|
580
|
-
<randstad-icon class="help-icon" name="ayuda" size="20px"
|
|
594
|
+
<randstad-icon class="help-icon" name="ayuda" size="20px"></randstad-icon>
|
|
581
595
|
</div>`:o}
|
|
582
596
|
</div>
|
|
583
597
|
`:o}
|
|
@@ -605,11 +619,11 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
605
619
|
/>
|
|
606
620
|
|
|
607
621
|
${"password"===this.type?i`<button type="button" class="toggle-password" @click=${this.togglePassword}>
|
|
608
|
-
${this.isPasswordVisible?i`<randstad-icon name='eye_crossed' size="24px"
|
|
622
|
+
${this.isPasswordVisible?i`<randstad-icon name='eye_crossed' size="24px"></randstad-icon>`:i`<randstad-icon name='eye' size="24px"></randstad-icon>`}
|
|
609
623
|
</button>`:o}
|
|
610
624
|
|
|
611
625
|
${t?i`<button type="button" class="clean-button" @click=${this.handleClear}>
|
|
612
|
-
<randstad-icon name="close" size="24px"
|
|
626
|
+
<randstad-icon name="close" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>
|
|
613
627
|
</button>`:o}
|
|
614
628
|
`}
|
|
615
629
|
</div>
|
|
@@ -623,12 +637,12 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
623
637
|
</p>`:o}
|
|
624
638
|
|
|
625
639
|
${this.linkText&&this.linkRoute?i`<div style="text-align: end;">
|
|
626
|
-
<a class="link-text"
|
|
640
|
+
<a class="link-text" @click=${this.handleLinkClick}>${this.linkText}</a>
|
|
627
641
|
</div>`:o}
|
|
628
642
|
|
|
629
643
|
${this.helper?i`<p class="helper-description">${this.helper}</p>`:o}
|
|
630
644
|
</div>
|
|
631
|
-
`}};
|
|
645
|
+
`}};n([I({type:String}),a("design:type",String)],G.prototype,"placeholder",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"labelColor",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"value",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,"icon",void 0),n([I({type:String}),a("design:type",Object)],G.prototype,"helper",void 0),n([I({type:Boolean}),a("design:type",Boolean)],G.prototype,"error",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"errorMessage",void 0),n([I({type:Boolean}),a("design:type",Boolean)],G.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Boolean)],G.prototype,"typing",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"type",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"tooltipMessage",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"linkText",void 0),n([I({type:String}),a("design:type",String)],G.prototype,"linkRoute",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],G.prototype,"isPasswordVisible",void 0),n([I({type:Boolean}),a("design:type",Boolean)],G.prototype,"cleanButton",void 0),n([I({type:Number}),a("design:type",Number)],G.prototype,"maxLength",void 0),G=n([l("randstad-form")],G);class H extends e{constructor(){super(...arguments),this.name="",this.size="24px"}static{this.styles=t`
|
|
632
646
|
:host {
|
|
633
647
|
display: inline-flex;
|
|
634
648
|
width: var(--icon-size, 24px);
|
|
@@ -636,13 +650,68 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
636
650
|
align-items: center;
|
|
637
651
|
justify-content: center;
|
|
638
652
|
}
|
|
653
|
+
|
|
639
654
|
svg {
|
|
640
|
-
width: var(--icon-size, 24px);
|
|
641
|
-
height: var(--icon-size, 24px);
|
|
655
|
+
width: var(--icon-size, 24px);
|
|
656
|
+
height: var(--icon-size, 24px);
|
|
642
657
|
fill: var(--icon-color, currentColor);
|
|
643
658
|
}
|
|
644
|
-
`}
|
|
659
|
+
`}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)],H.prototype,"name",void 0),n([I({type:String}),a("design:type",Object)],H.prototype,"size",void 0),customElements.define("randstad-icon",H);let Y=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`
|
|
660
|
+
:host {
|
|
661
|
+
display: block;
|
|
662
|
+
font-family: 'Graphik', sans-serif;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.container {
|
|
666
|
+
${M}
|
|
667
|
+
display: flex;
|
|
668
|
+
align-items: flex-start;
|
|
669
|
+
gap: 8px;
|
|
670
|
+
border-radius: 8px;
|
|
671
|
+
padding: 16px;
|
|
672
|
+
color: var(--secondary-color);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.icon {
|
|
676
|
+
font-size: 34px;
|
|
677
|
+
flex-shrink: 0;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.hidden {
|
|
681
|
+
display: none;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.success {
|
|
685
|
+
border: 1px solid var(--ui-positive);
|
|
686
|
+
background: var(--ui-positive-5);
|
|
687
|
+
--icon-color: var(--ui-positive);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.error {
|
|
691
|
+
border: 1px solid var(--ui-negative);
|
|
692
|
+
background: var(--ui-negative-5);
|
|
693
|
+
--icon-color: var(--ui-negative);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.warning {
|
|
697
|
+
border: 1px solid var(--ui-warning);
|
|
698
|
+
background: var(--ui-warning-10);
|
|
699
|
+
--icon-color: var(--ui-warning);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.informative {
|
|
703
|
+
border: 1px solid var(--ui-informative);
|
|
704
|
+
background: var(--ui-informative-10);
|
|
705
|
+
--icon-color: var(--ui-informative);
|
|
706
|
+
}
|
|
707
|
+
`}render(){return i`
|
|
708
|
+
<div class="container ${this.open?"":"hidden"} ${this.type}">
|
|
709
|
+
<randstad-icon class="icon" name="${this.icon}" size="24px" style="color: var(--icon-color);"></randstad-icon>
|
|
710
|
+
<span class="message">${this.message}</span>
|
|
711
|
+
</div>
|
|
712
|
+
`}};n([I({type:String}),a("design:type",String)],Y.prototype,"type",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"icon",void 0),n([I({type:String}),a("design:type",String)],Y.prototype,"message",void 0),n([I({type:Boolean}),a("design:type",Boolean)],Y.prototype,"open",void 0),Y=n([l("randstad-notice")],Y);let K=class extends e{constructor(){super(...arguments),this.open=!1,this.title="Título del modal",this.scrollable=!1,this.showNotice=!1,this.noticeType="informative",this.noticeMessage="",this.noticeIcon="info",this.showPrimaryButton=!1,this.primaryButtonLabel="Aceptar",this.showSecondaryButton=!1,this.secondaryButtonLabel="Cancelar"}static{this.styles=t`
|
|
645
713
|
:host {
|
|
714
|
+
font-family: 'Graphik', sans-serif;
|
|
646
715
|
display: none;
|
|
647
716
|
}
|
|
648
717
|
|
|
@@ -662,51 +731,84 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
662
731
|
}
|
|
663
732
|
|
|
664
733
|
.overlay.scroll {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
.overlay.no-scroll {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
.modal {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
734
|
+
display: flex;
|
|
735
|
+
align-items: center;
|
|
736
|
+
justify-content: center;
|
|
737
|
+
height: 100%;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.overlay.no-scroll {
|
|
741
|
+
display: block;
|
|
742
|
+
height: auto;
|
|
743
|
+
min-height: 100vh;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.modal {
|
|
747
|
+
background: var(--brand-off-white);
|
|
748
|
+
width: 100%;
|
|
749
|
+
max-width: 500px;
|
|
750
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
751
|
+
display: flex;
|
|
752
|
+
flex-direction: column;
|
|
753
|
+
margin: 40px auto;
|
|
754
|
+
border-radius: 8px;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.modal.scrollable {
|
|
758
|
+
max-height: 90vh;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.modal-body.scrollable {
|
|
762
|
+
overflow-y: auto;
|
|
763
|
+
flex: 1;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.modal-body {
|
|
767
|
+
display: flex;
|
|
768
|
+
flex-direction: column;
|
|
769
|
+
padding: 24px;
|
|
770
|
+
gap: 16px;
|
|
771
|
+
}
|
|
695
772
|
|
|
696
773
|
.modal-header {
|
|
697
774
|
display: flex;
|
|
775
|
+
flex-direction: column;
|
|
776
|
+
gap: 8px;
|
|
777
|
+
justify-content: space-between;
|
|
778
|
+
align-items: center;
|
|
779
|
+
padding: 24px;
|
|
780
|
+
border-bottom: 1px solid var(--secondary-color-20);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.modal-header-content {
|
|
784
|
+
display: flex;
|
|
785
|
+
gap: 32px;
|
|
786
|
+
width: 100%;
|
|
698
787
|
justify-content: space-between;
|
|
699
788
|
align-items: center;
|
|
700
|
-
padding: 25px;
|
|
701
|
-
border-bottom: 1px solid #E0E0E0;
|
|
702
789
|
}
|
|
703
790
|
|
|
704
|
-
|
|
791
|
+
.titles-container {
|
|
792
|
+
display: flex;
|
|
793
|
+
flex-direction: column;
|
|
794
|
+
gap: 8px;
|
|
795
|
+
flex-grow: 1;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.modal-title {
|
|
799
|
+
${N}
|
|
705
800
|
margin: 0;
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
801
|
+
color: var(--secondary-color);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.modal-subtitle {
|
|
805
|
+
${M}
|
|
806
|
+
margin: 0;
|
|
807
|
+
color: var(--secondary-color-60);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
.modal-header randstad-notice {
|
|
811
|
+
width: 100%;
|
|
710
812
|
}
|
|
711
813
|
|
|
712
814
|
.modal-close {
|
|
@@ -719,89 +821,80 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
719
821
|
padding: 0;
|
|
720
822
|
}
|
|
721
823
|
|
|
722
|
-
.modal-
|
|
723
|
-
|
|
824
|
+
.modal-footer {
|
|
825
|
+
display: flex;
|
|
826
|
+
justify-content: flex-end;
|
|
827
|
+
flex-direction: row;
|
|
828
|
+
padding: 24px;
|
|
829
|
+
gap: 16px;
|
|
830
|
+
border-top: 1px solid var(--secondary-color-20);
|
|
724
831
|
}
|
|
725
832
|
|
|
726
|
-
.modal-
|
|
727
|
-
|
|
728
|
-
flex: 1;
|
|
833
|
+
.modal-footer.one-button randstad-button {
|
|
834
|
+
width: 100%;
|
|
729
835
|
}
|
|
730
836
|
|
|
731
|
-
.modal-footer {
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
837
|
+
.modal-footer.two-buttons randstad-button {
|
|
838
|
+
width: 50%;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
@media (max-width: 940px) {
|
|
842
|
+
.modal-footer.two-buttons {
|
|
843
|
+
flex-direction: column;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.modal-footer.two-buttons randstad-button {
|
|
847
|
+
width: 100%;
|
|
848
|
+
}
|
|
736
849
|
}
|
|
737
850
|
`}closeModal(){this.dispatchEvent(new CustomEvent("modal-close")),this.open=!1}render(){return i`
|
|
738
|
-
<div class="overlay ${this.scrollable?"scroll":"no-scroll"}">
|
|
851
|
+
<div class="overlay ${this.scrollable?"scroll":"no-scroll"}" role="dialog" aria-modal="true">
|
|
739
852
|
<div class="modal ${this.scrollable?"scrollable":""}">
|
|
740
853
|
<div class="modal-header">
|
|
741
|
-
<
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
854
|
+
<div class="modal-header-content">
|
|
855
|
+
<div class="titles-container">
|
|
856
|
+
<div class="modal-title">${this.title}</div>
|
|
857
|
+
${this.subtitle?i`<div class="modal-subtitle">${this.subtitle}</div>`:o}
|
|
858
|
+
</div>
|
|
859
|
+
<button class="modal-close" @click=${this.closeModal} aria-label="Cerrar modal">
|
|
860
|
+
<randstad-icon name="close" size="24px" style="--icon-color: var(--primary-color);"></randstad-icon>
|
|
861
|
+
</button>
|
|
862
|
+
</div>
|
|
863
|
+
${this.showNotice?i`
|
|
864
|
+
<randstad-notice
|
|
865
|
+
.open=${!0}
|
|
866
|
+
.type=${this.noticeType}
|
|
867
|
+
.icon=${this.noticeIcon}
|
|
868
|
+
.message=${this.noticeMessage}
|
|
869
|
+
></randstad-notice>
|
|
870
|
+
`:o}
|
|
745
871
|
</div>
|
|
746
872
|
<div class="modal-body ${this.scrollable?"scrollable":""}">
|
|
747
873
|
<slot name="content"></slot>
|
|
748
874
|
</div>
|
|
749
|
-
<div class="modal-footer">
|
|
750
|
-
|
|
875
|
+
<div class="modal-footer ${this.showPrimaryButton&&this.showSecondaryButton?"two-buttons":"one-button"}">
|
|
876
|
+
${this.showPrimaryButton?i`
|
|
877
|
+
<randstad-button
|
|
878
|
+
variant="button-primary"
|
|
879
|
+
size="md"
|
|
880
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("primary-click"))}
|
|
881
|
+
label=${this.primaryButtonLabel}
|
|
882
|
+
>
|
|
883
|
+
</randstad-button>
|
|
884
|
+
`:o}
|
|
885
|
+
${this.showSecondaryButton?i`
|
|
886
|
+
<randstad-button
|
|
887
|
+
variant="button-secondary"
|
|
888
|
+
size="md"
|
|
889
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("secondary-click"))}
|
|
890
|
+
label=${this.secondaryButtonLabel}
|
|
891
|
+
>
|
|
892
|
+
</randstad-button>
|
|
893
|
+
`:o}
|
|
751
894
|
</div>
|
|
752
895
|
</div>
|
|
753
896
|
</div>
|
|
754
|
-
`}};
|
|
755
|
-
:host {
|
|
756
|
-
display: block;
|
|
757
|
-
border-radius: 4px;
|
|
758
|
-
font-size: 16px;
|
|
759
|
-
line-height: 25px;
|
|
760
|
-
font-weight: 400;
|
|
761
|
-
color: white;
|
|
762
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
763
|
-
font-family: 'Graphik', sans-serif;
|
|
764
|
-
}
|
|
765
|
-
.container {
|
|
766
|
-
display: flex;
|
|
767
|
-
color: #0F1941;
|
|
768
|
-
align-items: flex-start;
|
|
769
|
-
gap: 8px;
|
|
770
|
-
border-radius: 8px;
|
|
771
|
-
padding: 16px;
|
|
772
|
-
}
|
|
773
|
-
.icon {
|
|
774
|
-
font-size: 34px;
|
|
775
|
-
}
|
|
776
|
-
.hidden {
|
|
777
|
-
display: none;
|
|
778
|
-
}
|
|
779
|
-
.success {
|
|
780
|
-
border: 1px solid #257156;
|
|
781
|
-
background: #F4F8F6;
|
|
782
|
-
--icon-color: #257156;
|
|
783
|
-
}
|
|
784
|
-
.error {
|
|
785
|
-
border: 1px solid #E00F0F;
|
|
786
|
-
background: #FDF3F3;
|
|
787
|
-
--icon-color: #E00F0F;
|
|
788
|
-
}
|
|
789
|
-
.warning {
|
|
790
|
-
border: 1px solid #E9A204;
|
|
791
|
-
background: #FCF5E5;
|
|
792
|
-
--icon-color: #E9A204;
|
|
793
|
-
}
|
|
794
|
-
.informative {
|
|
795
|
-
border: 1px solid #4E90E1;
|
|
796
|
-
background: #E8F1FB;
|
|
797
|
-
--icon-color: #4E90E1;
|
|
798
|
-
}
|
|
799
|
-
`}constructor(){super(),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1}static get properties(){return{type:{type:String},icon:{type:String},message:{type:String},open:{type:Boolean}}}render(){return console.log("Notice rendering with icon:",this.icon),i`
|
|
800
|
-
<div class="container ${this.open?"":"hidden"} ${this.type}">
|
|
801
|
-
<randstad-icon class="icon" name="${this.icon}" size="24px" style="color: var(--icon-color);"></randstad-icon>
|
|
802
|
-
<span class="message">${this.message}</span>
|
|
803
|
-
</div>
|
|
804
|
-
`}}customElements.define("randstad-notice",U);let L=class extends t{constructor(){super(...arguments),this.open=!1,this.type="default",this.icon="warning",this.title="Título del Popup",this.description="Descripción del popup",this.width="400px",this.buttonText="Aceptar",this.confirmText="Sí",this.cancelText="No"}static{this.styles=e`
|
|
897
|
+
`}};n([I({type:Boolean,reflect:!0}),a("design:type",Object)],K.prototype,"open",void 0),n([I({type:String}),a("design:type",Object)],K.prototype,"title",void 0),n([I({type:String}),a("design:type",String)],K.prototype,"subtitle",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"scrollable",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"showNotice",void 0),n([I({type:String}),a("design:type",String)],K.prototype,"noticeType",void 0),n([I({type:String}),a("design:type",Object)],K.prototype,"noticeMessage",void 0),n([I({type:String}),a("design:type",Object)],K.prototype,"noticeIcon",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"showPrimaryButton",void 0),n([I({type:String}),a("design:type",Object)],K.prototype,"primaryButtonLabel",void 0),n([I({type:Boolean}),a("design:type",Object)],K.prototype,"showSecondaryButton",void 0),n([I({type:String}),a("design:type",Object)],K.prototype,"secondaryButtonLabel",void 0),K=n([l("custom-modal")],K);let W=class extends e{constructor(){super(...arguments),this.open=!1,this.type="default",this.icon="warning",this.title="Título del Popup",this.description="Descripción del popup",this.width="400px",this.buttonText="Aceptar",this.confirmText="Sí",this.cancelText="No"}static{this.styles=t`
|
|
805
898
|
:host {
|
|
806
899
|
display: none;
|
|
807
900
|
position: fixed;
|
|
@@ -814,95 +907,122 @@ function I(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
814
907
|
align-items: center;
|
|
815
908
|
font-family: "Graphik", sans-serif;
|
|
816
909
|
}
|
|
910
|
+
|
|
817
911
|
:host([open]) {
|
|
818
912
|
display: flex;
|
|
819
913
|
}
|
|
914
|
+
|
|
820
915
|
.popup {
|
|
821
|
-
background: white;
|
|
822
|
-
padding:
|
|
823
|
-
border-radius:
|
|
824
|
-
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
|
|
916
|
+
background: var(--white);
|
|
917
|
+
padding: 24px;
|
|
918
|
+
border-radius: 16px;
|
|
825
919
|
text-align: center;
|
|
826
920
|
animation: fadeIn 0.2s ease-in-out;
|
|
827
921
|
width: var(--popup-width, 400px);
|
|
922
|
+
display: flex;
|
|
923
|
+
flex-direction: column;
|
|
924
|
+
gap: 24px;
|
|
925
|
+
align-items: center;
|
|
828
926
|
}
|
|
927
|
+
|
|
829
928
|
@keyframes fadeIn {
|
|
830
929
|
from { opacity: 0; transform: scale(0.9); }
|
|
831
930
|
to { opacity: 1; transform: scale(1); }
|
|
832
931
|
}
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
letter-spacing: 0%;
|
|
839
|
-
text-align: center;
|
|
840
|
-
color: #404767;
|
|
932
|
+
|
|
933
|
+
.popup-content {
|
|
934
|
+
display: flex;
|
|
935
|
+
flex-direction: column;
|
|
936
|
+
gap: 24px;
|
|
841
937
|
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
text-align: center;
|
|
849
|
-
color: #6F758D;
|
|
938
|
+
|
|
939
|
+
.titles-container {
|
|
940
|
+
display: flex;
|
|
941
|
+
flex-direction: column;
|
|
942
|
+
gap: 8px;
|
|
943
|
+
align-items: center;
|
|
850
944
|
}
|
|
851
|
-
|
|
945
|
+
|
|
946
|
+
.popup-title {
|
|
947
|
+
${V}
|
|
948
|
+
margin: 0;
|
|
949
|
+
color: var(--secondary-color-80);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.popup-description {
|
|
953
|
+
${M}
|
|
954
|
+
margin: 0;
|
|
955
|
+
color: var(--secondary-color-60);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.buttons-container {
|
|
852
959
|
margin-top: 12px;
|
|
853
960
|
display: flex;
|
|
854
|
-
justify-content: space-around;
|
|
855
961
|
gap: 10px;
|
|
856
962
|
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
963
|
+
|
|
964
|
+
.buttons-container ::slotted(randstad-button),
|
|
965
|
+
.buttons-container randstad-button {
|
|
966
|
+
flex: 1 1 50%;
|
|
967
|
+
}
|
|
968
|
+
`}firstUpdated(){if(this.open){const t=this.renderRoot.querySelector("randstad-button");t&&t.focus()}}closePopup(t){this.dispatchEvent(new CustomEvent("popup-close",{detail:t})),this.open=!1}render(){return i`
|
|
969
|
+
<div
|
|
970
|
+
class="popup"
|
|
971
|
+
role="dialog"
|
|
972
|
+
aria-modal="true"
|
|
973
|
+
style="width: ${this.width};"
|
|
974
|
+
${"default"!==this.type?i`aria-labelledby="popup-title"`:o}
|
|
975
|
+
aria-describedby="popup-description"
|
|
976
|
+
>
|
|
977
|
+
${this.icon?i`<img src="/assets/icons/${this.icon}" alt="" width="56" height="56" />`:o}
|
|
978
|
+
|
|
979
|
+
<div class="popup-content">
|
|
980
|
+
${"default"===this.type?i`
|
|
981
|
+
<div class="titles-container">
|
|
982
|
+
<p id="popup-description" class="popup-description">${this.description}</p>
|
|
983
|
+
</div>
|
|
984
|
+
<div class="buttons-container">
|
|
985
|
+
<randstad-button
|
|
986
|
+
variant="button-primary"
|
|
987
|
+
size="md"
|
|
988
|
+
@click=${()=>this.closePopup(!0)}
|
|
989
|
+
label=${this.buttonText}
|
|
990
|
+
></randstad-button>
|
|
991
|
+
</div>
|
|
992
|
+
`:i`
|
|
993
|
+
<div class="titles-container">
|
|
994
|
+
<h2 id="popup-title" class="popup-title">${this.title}</h2>
|
|
995
|
+
<p id="popup-description" class="popup-description">${this.description}</p>
|
|
996
|
+
</div>
|
|
997
|
+
<div class="buttons-container">
|
|
998
|
+
<randstad-button
|
|
999
|
+
variant="button-secondary"
|
|
1000
|
+
size="md"
|
|
1001
|
+
@click=${()=>this.closePopup(!1)}
|
|
1002
|
+
label=${this.cancelText}
|
|
1003
|
+
></randstad-button>
|
|
1004
|
+
<randstad-button
|
|
1005
|
+
variant="button-primary"
|
|
1006
|
+
size="md"
|
|
1007
|
+
@click=${()=>this.closePopup(!0)}
|
|
1008
|
+
label=${this.confirmText}
|
|
1009
|
+
></randstad-button>
|
|
1010
|
+
</div>
|
|
1011
|
+
`}
|
|
1012
|
+
</div>
|
|
893
1013
|
</div>
|
|
894
|
-
`}};
|
|
1014
|
+
`}};n([I({type:Boolean,reflect:!0}),a("design:type",Object)],W.prototype,"open",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"type",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"icon",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"title",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"description",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"width",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"buttonText",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"confirmText",void 0),n([I({type:String}),a("design:type",Object)],W.prototype,"cancelText",void 0),W=n([l("custom-popup")],W);
|
|
895
1015
|
/**
|
|
896
1016
|
* @license
|
|
897
1017
|
* Copyright 2023 Google LLC
|
|
898
1018
|
* SPDX-License-Identifier: Apache-2.0
|
|
899
1019
|
*/
|
|
900
|
-
const
|
|
1020
|
+
const X=Symbol("attachableController");let J;r||(J=new MutationObserver((t=>{for(const e of t)e.target[X]?.hostConnected()})));class Q{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[X]=this,J?.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}}
|
|
901
1021
|
/**
|
|
902
1022
|
* @license
|
|
903
1023
|
* Copyright 2021 Google LLC
|
|
904
1024
|
* SPDX-License-Identifier: Apache-2.0
|
|
905
|
-
*/const
|
|
1025
|
+
*/const Z=["focusin","focusout","pointerdown"];class tt extends e{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new Q(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[et]){switch(t.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[et]=!0}}onControlChange(t,e){if(!r)for(const i of Z)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})],tt.prototype,"visible",void 0),n([I({type:Boolean,reflect:!0})],tt.prototype,"inward",void 0);const et=Symbol("handledByFocusRing"),it=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}}
|
|
906
1026
|
`
|
|
907
1027
|
/**
|
|
908
1028
|
* @license
|
|
@@ -913,92 +1033,81 @@ const V=Symbol("attachableController");let N;s||(N=new MutationObserver((t=>{for
|
|
|
913
1033
|
* @license
|
|
914
1034
|
* Copyright 2024 Google LLC
|
|
915
1035
|
* SPDX-License-Identifier: Apache-2.0
|
|
916
|
-
*/let
|
|
1036
|
+
*/let ot=class extends tt{};ot.styles=[it],ot=n([l("md-focus-ring")],ot);
|
|
917
1037
|
/**
|
|
918
1038
|
* @license
|
|
919
|
-
* Copyright
|
|
920
|
-
* SPDX-License-Identifier:
|
|
921
|
-
*/
|
|
922
|
-
const K=globalThis,X=K.trustedTypes,J=X?X.createPolicy("lit-html",{createHTML:t=>t}):void 0,Z="$lit$",Q=`lit$${Math.random().toFixed(9).slice(2)}$`,tt="?"+Q,et=`<${tt}>`,it=document,ot=()=>it.createComment(""),st=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rt=Array.isArray,nt="[ \t\n\f\r]",at=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,dt=/>/g,ct=RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ht=/"/g,ut=/^(?:script|style|textarea|title)$/i,bt=Symbol.for("lit-noChange"),ft=Symbol.for("lit-nothing"),mt=new WeakMap,gt=it.createTreeWalker(it,129);function yt(t,e){if(!rt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==J?J.createHTML(e):e}const vt=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":3===e?"<math>":"",n=at;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===at?"!--"===l[1]?n=lt:void 0!==l[1]?n=dt:void 0!==l[2]?(ut.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=ct):void 0!==l[3]&&(n=ct):n===ct?">"===l[0]?(n=s??at,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?ct:'"'===l[3]?ht:pt):n===ht||n===pt?n=ct:n===lt||n===dt?n=at:(n=ct,s=void 0);const p=n===ct&&t[e+1].startsWith("/>")?" ":"";r+=n===at?i+et:d>=0?(o.push(a),i.slice(0,d)+Z+i.slice(d)+Q+p):i+Q+(-2===d?e:p)}return[yt(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]};class xt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,d]=vt(t,e);if(this.el=xt.createElement(l,i),gt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=gt.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(Z)){const e=d[r++],i=o.getAttribute(t).split(Q),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:n[2],strings:i,ctor:"."===n[1]?Ct:"?"===n[1]?At:"@"===n[1]?Et:St}),o.removeAttribute(t)}else t.startsWith(Q)&&(a.push({type:6,index:s}),o.removeAttribute(t));if(ut.test(o.tagName)){const t=o.textContent.split(Q),e=t.length-1;if(e>0){o.textContent=X?X.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],ot()),gt.nextNode(),a.push({type:2,index:++s});o.append(t[e],ot())}}}else if(8===o.nodeType)if(o.data===tt)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(Q,t+1));)a.push({type:7,index:s}),t+=Q.length-1}s++}}static createElement(t,e){const i=it.createElement("template");return i.innerHTML=t,i}}function wt(t,e,i=t,o){if(e===bt)return e;let s=void 0!==o?i._$Co?.[o]:i._$Cl;const r=st(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),void 0===r?s=void 0:(s=new r(t),s._$AT(t,i,o)),void 0!==o?(i._$Co??=[])[o]=s:i._$Cl=s),void 0!==s&&(e=wt(t,s._$AS(t,e.values),s,o)),e}class $t{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??it).importNode(e,!0);gt.currentNode=o;let s=gt.nextNode(),r=0,n=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new kt(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new _t(s,this,t)),this._$AV.push(e),a=i[++n]}r!==a?.index&&(s=gt.nextNode(),r++)}return gt.currentNode=it,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class kt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=ft,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=wt(this,t,e),st(t)?t===ft||null==t||""===t?(this._$AH!==ft&&this._$AR(),this._$AH=ft):t!==this._$AH&&t!==bt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>rt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==ft&&st(this._$AH)?this._$AA.nextSibling.data=t:this.T(it.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=xt.createElement(yt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new $t(o,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=mt.get(t.strings);return void 0===e&&mt.set(t.strings,e=new xt(t)),e}k(t){rt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new kt(this.O(ot()),this.O(ot()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class St{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,s){this.type=1,this._$AH=ft,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ft}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=wt(this,t,e,0),r=!st(t)||t!==this._$AH&&t!==bt,r&&(this._$AH=t);else{const o=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=wt(this,o[i+n],e,n),a===bt&&(a=this._$AH[n]),r||=!st(a)||a!==this._$AH[n],a===ft?t=ft:t!==ft&&(t+=(a??"")+s[n+1]),this._$AH[n]=a}r&&!o&&this.j(t)}j(t){t===ft?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ct extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ft?void 0:t}}class At extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==ft)}}class Et extends St{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){if((t=wt(this,t,e,0)??ft)===bt)return;const i=this._$AH,o=t===ft&&i!==ft||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==ft&&(i===ft||o);o&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class _t{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){wt(this,t)}}const Ot=K.litHtmlPolyfillSupport;Ot?.(xt,kt),(K.litHtmlVersions??=[]).push("3.3.0");
|
|
923
|
-
/**
|
|
924
|
-
* @license
|
|
925
|
-
* Copyright 2017 Google LLC
|
|
926
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1039
|
+
* Copyright 2021 Google LLC
|
|
1040
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
927
1041
|
*/
|
|
928
|
-
const
|
|
929
|
-
/**
|
|
930
|
-
* @license
|
|
931
|
-
* Copyright 2018 Google LLC
|
|
932
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
933
|
-
*/const Pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends Tt{constructor(t){if(super(t),t.type!==zt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const o=!!e[t];o===this.st.has(t)||this.nt?.has(t)||(o?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return bt}}),It="cubic-bezier(0.2, 0, 0, 1)";
|
|
1042
|
+
const rt="cubic-bezier(0.2, 0, 0, 1)";
|
|
934
1043
|
/**
|
|
935
1044
|
* @license
|
|
936
|
-
* Copyright
|
|
1045
|
+
* Copyright 2022 Google LLC
|
|
937
1046
|
* SPDX-License-Identifier: Apache-2.0
|
|
938
|
-
*/var
|
|
1047
|
+
*/var st;!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"}(st||(st={}));const nt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],at=r?null:window.matchMedia("(forced-colors: active)");class lt extends e{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=st.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new Q(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!==st.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==st.HOLDING)return this.state===st.TOUCH_DELAY?(this.state=st.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=st.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=st.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=st.TOUCH_DELAY,await new Promise((t=>{setTimeout(t,150)})),this.state===st.TOUCH_DELAY&&(this.state=st.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==st.WAITING_FOR_CLICK?this.state===st.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:rt,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=st.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(!at?.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 nt)t?.removeEventListener(i,this),e?.addEventListener(i,this)}}n([I({type:Boolean,reflect:!0})],lt.prototype,"disabled",void 0),n([L()],lt.prototype,"hovered",void 0),n([L()],lt.prototype,"pressed",void 0),n([_(".surface")],lt.prototype,"mdRoot",void 0);
|
|
939
1048
|
/**
|
|
940
1049
|
* @license
|
|
941
1050
|
* Copyright 2024 Google LLC
|
|
942
1051
|
* SPDX-License-Identifier: Apache-2.0
|
|
943
1052
|
*/
|
|
944
|
-
const
|
|
1053
|
+
const dt=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}
|
|
945
1054
|
`
|
|
946
1055
|
/**
|
|
947
1056
|
* @license
|
|
948
1057
|
* Copyright 2022 Google LLC
|
|
949
1058
|
* SPDX-License-Identifier: Apache-2.0
|
|
950
|
-
*/;let
|
|
1059
|
+
*/;let ct=class extends lt{};
|
|
951
1060
|
/**
|
|
952
1061
|
* @license
|
|
953
1062
|
* Copyright 2021 Google LLC
|
|
954
1063
|
* SPDX-License-Identifier: Apache-2.0
|
|
955
1064
|
*/
|
|
956
|
-
function
|
|
1065
|
+
function pt(t){return t.currentTarget===t.target&&(t.composedPath()[0]===t.target&&(!t.target.disabled&&!function(t){const e=ht;e&&(t.preventDefault(),t.stopImmediatePropagation());return async function(){ht=!0,await null,ht=!1}
|
|
957
1066
|
/**
|
|
958
1067
|
* @license
|
|
959
1068
|
* Copyright 2023 Google LLC
|
|
960
1069
|
* SPDX-License-Identifier: Apache-2.0
|
|
961
|
-
*/(),e}(t)))}
|
|
1070
|
+
*/(),e}(t)))}ct.styles=[dt],ct=n([l("md-ripple")],ct);let ht=!1;const ut=Symbol("internals"),bt=Symbol("privateInternals");
|
|
962
1071
|
/**
|
|
963
1072
|
* @license
|
|
964
1073
|
* Copyright 2023 Google LLC
|
|
965
1074
|
* SPDX-License-Identifier: Apache-2.0
|
|
966
1075
|
*/
|
|
967
|
-
const
|
|
1076
|
+
const yt=Symbol("createValidator"),mt=Symbol("getValidityAnchor"),ft=Symbol("privateValidator"),gt=Symbol("privateSyncValidity"),vt=Symbol("privateCustomValidationMessage");
|
|
968
1077
|
/**
|
|
969
1078
|
* @license
|
|
970
1079
|
* Copyright 2023 Google LLC
|
|
971
1080
|
* SPDX-License-Identifier: Apache-2.0
|
|
972
1081
|
*/
|
|
973
|
-
const
|
|
1082
|
+
const xt=Symbol("isFocusable"),wt=Symbol("privateIsFocusable"),kt=Symbol("externalTabIndex"),$t=Symbol("isUpdatingTabIndex"),St=Symbol("updateTabIndex");
|
|
974
1083
|
/**
|
|
975
1084
|
* @license
|
|
976
1085
|
* Copyright 2023 Google LLC
|
|
977
1086
|
* SPDX-License-Identifier: Apache-2.0
|
|
978
1087
|
*/
|
|
979
|
-
const
|
|
1088
|
+
const Ct=Symbol("getFormValue"),Et=Symbol("getFormState");
|
|
980
1089
|
/**
|
|
981
1090
|
* @license
|
|
982
1091
|
* Copyright 2023 Google LLC
|
|
983
1092
|
* SPDX-License-Identifier: Apache-2.0
|
|
984
1093
|
*/
|
|
985
|
-
class
|
|
1094
|
+
class Ot{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}}
|
|
986
1095
|
/**
|
|
987
1096
|
* @license
|
|
988
1097
|
* Copyright 2023 Google LLC
|
|
989
1098
|
* SPDX-License-Identifier: Apache-2.0
|
|
990
|
-
*/class
|
|
1099
|
+
*/class Pt extends Ot{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})))}}
|
|
991
1100
|
/**
|
|
992
1101
|
* @license
|
|
993
1102
|
* Copyright 2022 Google LLC
|
|
994
1103
|
* SPDX-License-Identifier: Apache-2.0
|
|
995
|
-
*/class
|
|
1104
|
+
*/class Tt{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}}
|
|
996
1105
|
/**
|
|
997
1106
|
* @license
|
|
998
1107
|
* Copyright 2018 Google LLC
|
|
999
1108
|
* SPDX-License-Identifier: Apache-2.0
|
|
1000
|
-
*/var
|
|
1001
|
-
<div class="container ${
|
|
1109
|
+
*/var At;const zt=Symbol("checked");let jt=0;const It=function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=""}get validity(){return this[gt](),this[ut].validity}get validationMessage(){return this[gt](),this[ut].validationMessage}get willValidate(){return this[gt](),this[ut].willValidate}checkValidity(){return this[gt](),this[ut].checkValidity()}reportValidity(){return this[gt](),this[ut].reportValidity()}setCustomValidity(t){this[vt]=t,this[gt]()}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[gt]()}firstUpdated(t){super.firstUpdated(t),this[gt]()}[(e=vt,gt)](){if(r)return;this[ft]||(this[ft]=this[yt]());const{validity:t,validationMessage:e}=this[ft].getValidity(),i=!!this[vt],o=this[vt]||e;this[ut].setValidity({...t,customError:i},o,this[mt]()??void 0)}[yt](){throw new Error("Implement [createValidator]")}[mt](){throw new Error("Implement [getValidityAnchor]")}}return i}(function(t){class e extends t{get form(){return this[ut].form}get labels(){return this[ut].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[ut].setFormValue(this[Ct](),this[Et]())}[Ct](){throw new Error("Implement [getFormValue]")}[Et](){return this[Ct]()}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}((Lt=function(t){var e,i,o;class r extends t{constructor(){super(...arguments),this[e]=!0,this[i]=null,this[o]=!1}get[xt](){return this[wt]}set[xt](t){this[xt]!==t&&(this[wt]=t,this[St]())}connectedCallback(){super.connectedCallback(),this[St]()}attributeChangedCallback(t,e,i){if("tabindex"===t){if(this.requestUpdate("tabIndex",Number(e??-1)),!this[$t])return this.hasAttribute("tabindex")?void(this[kt]=this.tabIndex):(this[kt]=null,void this[St]())}else super.attributeChangedCallback(t,e,i)}[(e=wt,i=kt,o=$t,St)](){const t=this[xt]?0:-1,e=this[kt]??t;this[$t]=!0,this.tabIndex=e,this[$t]=!1}}return n([I({noAccessor:!0})],r.prototype,"tabIndex",void 0),r}(e),class extends Lt{get[ut](){return this[bt]||(this[bt]=this.attachInternals()),this[bt]}})));var Lt;class _t extends It{get checked(){return this[zt]}set checked(t){const e=this.checked;e!==t&&(this[zt]=t,this.requestUpdate("checked",e),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId="cutout"+ ++jt,this[At]=!1,this.required=!1,this.value="on",this.selectionController=new Tt(this),this.addController(this.selectionController),r||(this[ut].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this)))}render(){const t={checked:this.checked};return i`
|
|
1110
|
+
<div class="container ${s(t)}" aria-hidden="true">
|
|
1002
1111
|
<md-ripple
|
|
1003
1112
|
part="ripple"
|
|
1004
1113
|
.control=${this}
|
|
@@ -1020,19 +1129,19 @@ class ie{constructor(t){this.getCurrentState=t,this.currentValidity={validity:{}
|
|
|
1020
1129
|
|
|
1021
1130
|
<div class="touch-target"></div>
|
|
1022
1131
|
</div>
|
|
1023
|
-
`}updated(){this[
|
|
1132
|
+
`}updated(){this[ut].ariaChecked=String(this.checked)}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(pt(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()}[(At=zt,Ct)](){return this.checked?this.value:null}[Et](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(t){this.checked="true"===t}[yt](){return new Pt((()=>this.selectionController?this.selectionController.controls:[this]))}[mt](){return this.container}}n([I({type:Boolean})],_t.prototype,"checked",null),n([I({type:Boolean})],_t.prototype,"required",void 0),n([I()],_t.prototype,"value",void 0),n([_(".container")],_t.prototype,"container",void 0);
|
|
1024
1133
|
/**
|
|
1025
1134
|
* @license
|
|
1026
1135
|
* Copyright 2024 Google LLC
|
|
1027
1136
|
* SPDX-License-Identifier: Apache-2.0
|
|
1028
1137
|
*/
|
|
1029
|
-
const
|
|
1138
|
+
const Rt=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}}}
|
|
1030
1139
|
`
|
|
1031
1140
|
/**
|
|
1032
1141
|
* @license
|
|
1033
1142
|
* Copyright 2022 Google LLC
|
|
1034
1143
|
* SPDX-License-Identifier: Apache-2.0
|
|
1035
|
-
*/;let
|
|
1144
|
+
*/;let Ft=class extends _t{};Ft.styles=[Rt],Ft=n([l("md-radio")],Ft);let Mt=class extends e{constructor(){super(...arguments),this.name="radio-group",this.checked=!1,this.disabled=!1,this.error=!1}static{this.styles=t`
|
|
1036
1145
|
:host {
|
|
1037
1146
|
font-family: "Graphik", sans-serif;
|
|
1038
1147
|
}
|
|
@@ -1048,44 +1157,38 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1048
1157
|
width: 24px;
|
|
1049
1158
|
height: 24px;
|
|
1050
1159
|
border-radius: 50%;
|
|
1051
|
-
background:
|
|
1052
|
-
border: 1px solid
|
|
1160
|
+
background: var(--white);
|
|
1161
|
+
border: 1px solid var(--secondary-color-20);
|
|
1053
1162
|
}
|
|
1054
1163
|
|
|
1055
|
-
/* Hover solo en el círculo */
|
|
1056
1164
|
md-radio::part(container):hover {
|
|
1057
1165
|
box-shadow: 0px 0px 0px 4px #0F19411A;
|
|
1058
|
-
border: 1px solid
|
|
1166
|
+
border: 1px solid var(--secondary-color-20);
|
|
1059
1167
|
border-radius: 50%;
|
|
1060
1168
|
}
|
|
1061
1169
|
|
|
1062
|
-
/* Focus solo en el círculo */
|
|
1063
1170
|
md-radio:focus-visible::part(container) {
|
|
1064
|
-
border: 1px solid
|
|
1171
|
+
border: 1px solid var(--primary-color);
|
|
1065
1172
|
}
|
|
1066
1173
|
|
|
1067
|
-
/* Estilos cuando está seleccionado (On) */
|
|
1068
1174
|
md-radio.checked {
|
|
1069
|
-
background:
|
|
1070
|
-
border: 1px solid
|
|
1175
|
+
background: var(--primary-color);
|
|
1176
|
+
border: 1px solid var(--primary-color);
|
|
1071
1177
|
}
|
|
1072
1178
|
|
|
1073
|
-
/* Estilos cuando está seleccionado y hay error (Error On) */
|
|
1074
1179
|
md-radio.checked.error {
|
|
1075
|
-
background:
|
|
1076
|
-
border: 1px solid
|
|
1180
|
+
background: var(--ui-negative);
|
|
1181
|
+
border: 1px solid var(--ui-negative);
|
|
1077
1182
|
}
|
|
1078
1183
|
|
|
1079
|
-
/* Estilos cuando está en Error Off */
|
|
1080
1184
|
md-radio.error {
|
|
1081
|
-
border: 1px solid
|
|
1185
|
+
border: 1px solid var(--ui-negative);
|
|
1082
1186
|
}
|
|
1083
1187
|
|
|
1084
|
-
/* Estilos cuando está deshabilitado */
|
|
1085
1188
|
md-radio.disabled {
|
|
1086
1189
|
cursor: not-allowed;
|
|
1087
|
-
background:
|
|
1088
|
-
border: 1px solid
|
|
1190
|
+
background: var(--secondary-color-20);
|
|
1191
|
+
border: 1px solid var(--secondary-color-20);
|
|
1089
1192
|
}
|
|
1090
1193
|
`}render(){const t=[this.checked?"checked":"",this.error?"error":"",this.disabled?"disabled":""].join(" ");return i`
|
|
1091
1194
|
<label class="radio-container">
|
|
@@ -1097,7 +1200,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1097
1200
|
></md-radio>
|
|
1098
1201
|
<span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
|
|
1099
1202
|
</label>
|
|
1100
|
-
`}};
|
|
1203
|
+
`}};n([I({type:String}),a("design:type",Object)],Mt.prototype,"name",void 0),n([I({type:Boolean}),a("design:type",Object)],Mt.prototype,"checked",void 0),n([I({type:Boolean}),a("design:type",Object)],Mt.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Object)],Mt.prototype,"error",void 0),Mt=n([l("custom-radio")],Mt);let Bt=class extends e{static{this.styles=t`
|
|
1101
1204
|
:host {
|
|
1102
1205
|
display: block;
|
|
1103
1206
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1140,9 +1243,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1140
1243
|
}
|
|
1141
1244
|
|
|
1142
1245
|
.form-label {
|
|
1143
|
-
|
|
1144
|
-
line-height: 25px;
|
|
1145
|
-
font-weight: 400;
|
|
1246
|
+
${M};
|
|
1146
1247
|
color: var(--label-color, var(--secondary-color-80));
|
|
1147
1248
|
}
|
|
1148
1249
|
|
|
@@ -1190,7 +1291,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1190
1291
|
left: 20px;
|
|
1191
1292
|
right: 20px;
|
|
1192
1293
|
height: 1px;
|
|
1193
|
-
background-color:
|
|
1294
|
+
background-color: var(--gray-20);
|
|
1194
1295
|
z-index: 10;
|
|
1195
1296
|
}
|
|
1196
1297
|
|
|
@@ -1209,16 +1310,13 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1209
1310
|
}
|
|
1210
1311
|
|
|
1211
1312
|
.filter-input {
|
|
1212
|
-
|
|
1213
|
-
line-height: 30px;
|
|
1313
|
+
${B};
|
|
1214
1314
|
padding: 16px;
|
|
1215
1315
|
padding-right: 40px;
|
|
1216
1316
|
border: none;
|
|
1217
1317
|
outline: none;
|
|
1218
1318
|
width: 100%;
|
|
1219
1319
|
box-sizing: border-box;
|
|
1220
|
-
font-family: 'Graphik', sans-serif;
|
|
1221
|
-
font-weight: 400;
|
|
1222
1320
|
background: white;
|
|
1223
1321
|
cursor: pointer;
|
|
1224
1322
|
color: var(--secondary-color);
|
|
@@ -1232,10 +1330,8 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1232
1330
|
}
|
|
1233
1331
|
|
|
1234
1332
|
.filter-input::placeholder {
|
|
1333
|
+
${B};
|
|
1235
1334
|
color: var(--secondary-color-40);
|
|
1236
|
-
font-size: 18px;
|
|
1237
|
-
line-height: 30px;
|
|
1238
|
-
font-weight: 400;
|
|
1239
1335
|
}
|
|
1240
1336
|
|
|
1241
1337
|
.icon-button {
|
|
@@ -1257,7 +1353,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1257
1353
|
randstad-icon {
|
|
1258
1354
|
width: 24px;
|
|
1259
1355
|
height: 24px;
|
|
1260
|
-
color:
|
|
1356
|
+
color: var(--primary-color);
|
|
1261
1357
|
}
|
|
1262
1358
|
|
|
1263
1359
|
.options-list {
|
|
@@ -1279,11 +1375,9 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1279
1375
|
}
|
|
1280
1376
|
|
|
1281
1377
|
.options-list li {
|
|
1378
|
+
${B};
|
|
1282
1379
|
padding: 8px 16px 8px 16px;
|
|
1283
1380
|
cursor: pointer;
|
|
1284
|
-
font-size: 18px;
|
|
1285
|
-
line-height: 30px;
|
|
1286
|
-
font-weight: 400;
|
|
1287
1381
|
color: var(--secondary-color-80);
|
|
1288
1382
|
}
|
|
1289
1383
|
|
|
@@ -1346,15 +1440,12 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1346
1440
|
}
|
|
1347
1441
|
|
|
1348
1442
|
.filter-fake {
|
|
1349
|
-
|
|
1350
|
-
line-height: 30px;
|
|
1443
|
+
${B};
|
|
1351
1444
|
padding: 15px;
|
|
1352
1445
|
padding-right: 40px;
|
|
1353
1446
|
width: 100%;
|
|
1354
1447
|
background: white;
|
|
1355
1448
|
box-sizing: border-box;
|
|
1356
|
-
font-family: 'Graphik', sans-serif;
|
|
1357
|
-
font-weight: 400;
|
|
1358
1449
|
cursor: pointer;
|
|
1359
1450
|
color: var(--secondary-color-80);
|
|
1360
1451
|
white-space: nowrap;
|
|
@@ -1380,14 +1471,14 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1380
1471
|
}
|
|
1381
1472
|
|
|
1382
1473
|
.options-list::-webkit-scrollbar-thumb {
|
|
1383
|
-
background-color: var(--secondary-color-30
|
|
1474
|
+
background-color: var(--secondary-color-30);
|
|
1384
1475
|
border-radius: 4px;
|
|
1385
1476
|
}
|
|
1386
1477
|
|
|
1387
1478
|
.options-list::-webkit-scrollbar-button {
|
|
1388
1479
|
display: none;
|
|
1389
1480
|
}
|
|
1390
|
-
`}constructor(){if(super(),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.label="",this.value="",this.labelColor="",this.filterable=!0,this.
|
|
1481
|
+
`}constructor(){if(super(),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.label="",this.value="",this.labelColor="",this.filterable=!0,this.error=!1,this.isMobile=!1,this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.debounceTimeout=null,this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this),this.defaultValue){const t=this.options.find((t=>"string"==typeof t?t===this.defaultValue:t.value===this.defaultValue));t&&(this.filterValue="string"==typeof t?t:t.label)}}willUpdate(t){if(t.has("options")&&(this.filteredOptions=[...this.options]),t.has("defaultValue")||t.has("options")){const t=this.options.find((t=>"string"==typeof t?t===this.defaultValue:t.value===this.defaultValue));t&&(this.filterValue="string"==typeof t?t:t.label)}if(t.has("value")){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));t&&(this.filterValue="string"==typeof t?t:t.label)}}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.isMobile&&(this.mobileFilterValue=""),this.disabled||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){if(!this.filterable)return;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.filterValue=i,this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(this.filterValue.toLowerCase()))),this.isOpen=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.mobileFilterValue=i,this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(i))),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0}))}),300)}handleSelect(t){this.value="string"==typeof t?t:t.value;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.isOpen=!1,this.requestUpdate()}handleIconClick(){this.disabled||(this.filterable&&this.filterValue?(this.filterValue="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1):this.isOpen=!this.isOpen,this.requestUpdate())}handleClickOutside(t){const e=t.target;e instanceof Node&&(this.contains(e)||(this.isOpen=!1,this.requestUpdate()))}render(){const t=this.isMobile;return i`
|
|
1391
1482
|
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
1392
1483
|
${this.label?i`
|
|
1393
1484
|
<div class="label-container">
|
|
@@ -1419,7 +1510,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1419
1510
|
@click="${this.handleIconClick}"
|
|
1420
1511
|
?disabled="${this.disabled}"
|
|
1421
1512
|
>
|
|
1422
|
-
${this.filterable&&this.filterValue?i`<randstad-icon name="close" size="24px"
|
|
1513
|
+
${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>`}
|
|
1423
1514
|
</button>
|
|
1424
1515
|
</div>
|
|
1425
1516
|
|
|
@@ -1464,72 +1555,77 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1464
1555
|
`:""}
|
|
1465
1556
|
</div>
|
|
1466
1557
|
</div>
|
|
1467
|
-
`}};
|
|
1558
|
+
`}};n([I({type:Array}),a("design:type",Array)],Bt.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],Bt.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],Bt.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],Bt.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],Bt.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],Bt.prototype,"value",void 0),n([I({type:String}),a("design:type",Object)],Bt.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],Bt.prototype,"filterable",void 0),n([I({type:Number}),a("design:type",Number)],Bt.prototype,"maxLength",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],Bt.prototype,"error",void 0),n([L(),a("design:type",Boolean)],Bt.prototype,"isMobile",void 0),n([L(),a("design:type",Array)],Bt.prototype,"filteredOptions",void 0),n([L(),a("design:type",Object)],Bt.prototype,"filterValue",void 0),n([L(),a("design:type",Object)],Bt.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],Bt.prototype,"mobileFilterValue",void 0),Bt=n([l("filterable-select"),a("design:paramtypes",[])],Bt);let Ut=class extends e{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=t`
|
|
1468
1559
|
.stepper {
|
|
1469
1560
|
display: flex;
|
|
1470
1561
|
gap: 20px;
|
|
1471
1562
|
align-items: center;
|
|
1472
1563
|
}
|
|
1564
|
+
|
|
1473
1565
|
.step {
|
|
1474
1566
|
width: 20px;
|
|
1475
1567
|
height: 20px;
|
|
1476
1568
|
border-radius: 50%;
|
|
1477
|
-
background-color:
|
|
1478
|
-
border: 1px solid
|
|
1569
|
+
background-color: var(--white);
|
|
1570
|
+
border: 1px solid var(--secondary-color-20);
|
|
1479
1571
|
position: relative;
|
|
1480
1572
|
box-sizing: content-box;
|
|
1481
1573
|
display: flex;
|
|
1482
1574
|
align-items: center;
|
|
1483
1575
|
justify-content: center;
|
|
1484
1576
|
font-size: 12px;
|
|
1485
|
-
color:
|
|
1577
|
+
color: var(--secondary-color-20);
|
|
1486
1578
|
}
|
|
1579
|
+
|
|
1487
1580
|
.step .inner-circle {
|
|
1488
1581
|
width: 4px;
|
|
1489
1582
|
height: 4px;
|
|
1490
1583
|
border-radius: 50%;
|
|
1491
|
-
background-color:
|
|
1584
|
+
background-color: var(--white);
|
|
1492
1585
|
position: absolute;
|
|
1493
1586
|
top: 50%;
|
|
1494
1587
|
left: 50%;
|
|
1495
1588
|
transform: translate(-50%, -50%);
|
|
1496
|
-
/* Improve sharpness */
|
|
1497
1589
|
image-rendering: -webkit-optimize-contrast;
|
|
1498
1590
|
image-rendering: crisp-edges;
|
|
1499
1591
|
backface-visibility: hidden;
|
|
1500
1592
|
transform-style: preserve-3d;
|
|
1501
1593
|
}
|
|
1594
|
+
|
|
1502
1595
|
.step.completed {
|
|
1503
|
-
background-color:
|
|
1504
|
-
border: 1px solid
|
|
1596
|
+
background-color: var(--primary-color);
|
|
1597
|
+
border: 1px solid var(--primary-color);
|
|
1505
1598
|
}
|
|
1599
|
+
|
|
1506
1600
|
.step.completed randstad-icon {
|
|
1507
1601
|
color: white;
|
|
1508
1602
|
}
|
|
1603
|
+
|
|
1509
1604
|
.step.active {
|
|
1510
|
-
background-color:
|
|
1511
|
-
border: 1px solid
|
|
1605
|
+
background-color: var(--white);
|
|
1606
|
+
border: 1px solid var(--primary-color);
|
|
1512
1607
|
}
|
|
1608
|
+
|
|
1513
1609
|
.step.active .inner-circle {
|
|
1514
|
-
background-color:
|
|
1610
|
+
background-color: var(--primary-color);
|
|
1515
1611
|
}
|
|
1516
|
-
|
|
1612
|
+
|
|
1517
1613
|
.step.active .pulse-circle {
|
|
1518
1614
|
width: 12px;
|
|
1519
1615
|
height: 12px;
|
|
1520
1616
|
border-radius: 50%;
|
|
1521
|
-
background-color:
|
|
1617
|
+
background-color: var(--primary-color);
|
|
1522
1618
|
opacity: 0.25;
|
|
1523
1619
|
position: absolute;
|
|
1524
1620
|
top: 50%;
|
|
1525
1621
|
left: 50%;
|
|
1526
1622
|
transform: translate(-50%, -50%) scale(0.6);
|
|
1527
1623
|
animation: pulse 2000ms ease-in-out infinite;
|
|
1528
|
-
/* Improve sharpness */
|
|
1529
1624
|
image-rendering: -webkit-optimize-contrast;
|
|
1530
1625
|
image-rendering: crisp-edges;
|
|
1531
1626
|
backface-visibility: hidden;
|
|
1532
1627
|
}
|
|
1628
|
+
|
|
1533
1629
|
@keyframes pulse {
|
|
1534
1630
|
0% {
|
|
1535
1631
|
transform: translate(-50%, -50%) scale(0.6);
|
|
@@ -1538,7 +1634,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1538
1634
|
transform: translate(-50%, -50%) scale(1.2);
|
|
1539
1635
|
}
|
|
1540
1636
|
}
|
|
1541
|
-
|
|
1637
|
+
|
|
1542
1638
|
.step,
|
|
1543
1639
|
.inner-circle,
|
|
1544
1640
|
.pulse-circle {
|
|
@@ -1559,7 +1655,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1559
1655
|
</div>
|
|
1560
1656
|
`))}
|
|
1561
1657
|
</div>
|
|
1562
|
-
`}};
|
|
1658
|
+
`}};n([I({type:Number}),a("design:type",Object)],Ut.prototype,"totalSteps",void 0),n([I({type:Number}),a("design:type",Object)],Ut.prototype,"currentStep",void 0),Ut=n([l("custom-stepper")],Ut);const Vt=new CSSStyleSheet;Vt.replaceSync("\n @font-face {\n font-family: 'Graphik';\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n .body-s {\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n letter-spacing: 0%;\n color: green;\n }\n");class Nt extends e{static{this.styles=[Vt,t`
|
|
1563
1659
|
:host {
|
|
1564
1660
|
display: flex;
|
|
1565
1661
|
position: fixed;
|
|
@@ -1569,7 +1665,6 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1569
1665
|
z-index: 9999;
|
|
1570
1666
|
}
|
|
1571
1667
|
|
|
1572
|
-
/* Posiciones por defecto */
|
|
1573
1668
|
:host([position="top-left"]) {
|
|
1574
1669
|
top: 16px;
|
|
1575
1670
|
left: 16px;
|
|
@@ -1616,7 +1711,6 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1616
1711
|
justify-content: flex-end;
|
|
1617
1712
|
}
|
|
1618
1713
|
|
|
1619
|
-
/* Estilos para mobile forzados */
|
|
1620
1714
|
:host(.mobile) {
|
|
1621
1715
|
bottom: 16px !important;
|
|
1622
1716
|
top: auto !important;
|
|
@@ -1631,7 +1725,7 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1631
1725
|
}
|
|
1632
1726
|
|
|
1633
1727
|
.container {
|
|
1634
|
-
|
|
1728
|
+
${F};
|
|
1635
1729
|
display: flex;
|
|
1636
1730
|
align-items: center;
|
|
1637
1731
|
box-sizing: border-box;
|
|
@@ -1641,9 +1735,6 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1641
1735
|
border-radius: 4px;
|
|
1642
1736
|
padding: 8px;
|
|
1643
1737
|
gap: 8px;
|
|
1644
|
-
font-size: 14px;
|
|
1645
|
-
line-height: 25px;
|
|
1646
|
-
font-weight: 400;
|
|
1647
1738
|
white-space: nowrap;
|
|
1648
1739
|
color: var(--white);
|
|
1649
1740
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
@@ -1700,74 +1791,198 @@ const pe=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1700
1791
|
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
1701
1792
|
<span class="message">${this.message}</span>
|
|
1702
1793
|
</div>
|
|
1703
|
-
`}}customElements.define("randstad-snackbar",
|
|
1704
|
-
div {
|
|
1705
|
-
color: red;
|
|
1706
|
-
font-size: 20px;
|
|
1707
|
-
}
|
|
1708
|
-
`}render(){return i`<div>Hola desde el Design System</div>`}}customElements.define("test-component",ye);let ve=class extends t{constructor(){super(...arguments),this.label="Test Button"}static{this.styles=e`
|
|
1709
|
-
button {
|
|
1710
|
-
padding: 10px 20px;
|
|
1711
|
-
font-size: 16px;
|
|
1712
|
-
background: blue;
|
|
1713
|
-
color: white;
|
|
1714
|
-
border: none;
|
|
1715
|
-
cursor: pointer;
|
|
1716
|
-
}
|
|
1717
|
-
`}render(){return i`<button>${this.label}</button>`}};r([T({type:String}),n("design:type",Object)],ve.prototype,"label",void 0),ve=r([a("test-button")],ve);let xe=class extends t{constructor(){super(...arguments),this.tabs=[],this.selected="",this.internalSelected=""}static{this.styles=e`
|
|
1794
|
+
`}}customElements.define("randstad-snackbar",Nt);let qt=class extends e{constructor(){super(...arguments),this.tabs=[],this.selected="",this.internalSelected="",this.showPrev=!1,this.showNext=!1,this.SCROLL_OFFSET=78,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`
|
|
1718
1795
|
:host {
|
|
1719
|
-
display:
|
|
1720
|
-
|
|
1721
|
-
background-color: #fafafa;
|
|
1722
|
-
border-top: 1px solid #eee;
|
|
1723
|
-
padding: 8px 0;
|
|
1796
|
+
display: block;
|
|
1797
|
+
border-bottom: 1px solid #E7E8EC;
|
|
1724
1798
|
font-family: "Graphik", sans-serif;
|
|
1725
1799
|
}
|
|
1726
1800
|
|
|
1801
|
+
.tab-wrapper {
|
|
1802
|
+
display: flex;
|
|
1803
|
+
justify-content: flex-start;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1727
1806
|
.tab {
|
|
1807
|
+
${U};
|
|
1728
1808
|
display: flex;
|
|
1729
1809
|
gap: 8px;
|
|
1730
1810
|
flex-direction: row;
|
|
1731
1811
|
padding: 24px;
|
|
1732
1812
|
align-items: center;
|
|
1733
|
-
font-weight: 400;
|
|
1734
|
-
font-size: 18.03px;
|
|
1735
|
-
line-height: 30.05px;
|
|
1736
|
-
letter-spacing: 0%;
|
|
1737
1813
|
text-align: center;
|
|
1738
1814
|
color: #6F758D;
|
|
1739
1815
|
cursor: pointer;
|
|
1740
1816
|
text-decoration: none;
|
|
1741
1817
|
position: relative;
|
|
1742
|
-
flex:
|
|
1818
|
+
flex: 0 0 auto;
|
|
1819
|
+
min-width: 0;
|
|
1820
|
+
white-space: nowrap;
|
|
1821
|
+
overflow: hidden;
|
|
1822
|
+
text-overflow: ellipsis;
|
|
1823
|
+
transition: background-color 0.2s ease-in-out;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
.tab:hover {
|
|
1827
|
+
background-color: #E7E8EC;
|
|
1743
1828
|
}
|
|
1744
1829
|
|
|
1745
1830
|
.tab.active {
|
|
1746
|
-
color: #
|
|
1831
|
+
color: #2175D9;
|
|
1747
1832
|
}
|
|
1748
1833
|
|
|
1749
1834
|
.tab.active::after {
|
|
1835
|
+
height: 2px;
|
|
1836
|
+
background-color: #2175D9;
|
|
1750
1837
|
content: '';
|
|
1751
1838
|
position: absolute;
|
|
1752
|
-
bottom:
|
|
1839
|
+
bottom: 0;
|
|
1753
1840
|
left: 0;
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1841
|
+
width: 100%;
|
|
1842
|
+
pointer-events: none;
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
.tab.active img {
|
|
1846
|
+
filter: brightness(0) saturate(100%) invert(28%) sepia(87%) saturate(3514%) hue-rotate(202deg) brightness(92%) contrast(101%);
|
|
1758
1847
|
}
|
|
1759
1848
|
|
|
1760
1849
|
img {
|
|
1761
1850
|
width: 24px;
|
|
1762
1851
|
height: 24px;
|
|
1763
1852
|
}
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1853
|
+
|
|
1854
|
+
.scroll-container {
|
|
1855
|
+
position: relative;
|
|
1856
|
+
display: flex;
|
|
1857
|
+
align-items: center;
|
|
1858
|
+
overflow: hidden;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
.tab-wrapper {
|
|
1862
|
+
display: flex;
|
|
1863
|
+
justify-content: flex-start;
|
|
1864
|
+
gap: 16px;
|
|
1865
|
+
overflow-x: auto;
|
|
1866
|
+
scroll-behavior: smooth;
|
|
1867
|
+
scrollbar-width: none; /* Firefox */
|
|
1868
|
+
-ms-overflow-style: none; /* IE 10+ */
|
|
1869
|
+
flex: 1;
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
.tab-wrapper::-webkit-scrollbar {
|
|
1873
|
+
display: none;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
.scroll-button {
|
|
1877
|
+
border: none;
|
|
1878
|
+
font-size: 24px;
|
|
1879
|
+
cursor: pointer;
|
|
1880
|
+
z-index: 1;
|
|
1881
|
+
width: 78px;
|
|
1882
|
+
height: 100%;
|
|
1883
|
+
display: flex;
|
|
1884
|
+
align-items: center;
|
|
1885
|
+
color: #2175D9;
|
|
1886
|
+
padding: 0px;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
.scroll-button.prev {
|
|
1890
|
+
justify-content: flex-start;
|
|
1891
|
+
position: absolute;
|
|
1892
|
+
left: 0;
|
|
1893
|
+
background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
.scroll-button.next {
|
|
1897
|
+
justify-content: flex-end;
|
|
1898
|
+
position: absolute;
|
|
1899
|
+
right: 0;
|
|
1900
|
+
background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);
|
|
1901
|
+
}
|
|
1902
|
+
`}firstUpdated(){this.handleScroll()}updated(t){t.has("selected")&&(this.internalSelected=this.selected)}selectTab(t){this.internalSelected=t,this.dispatchEvent(new CustomEvent("tab-change",{detail:t,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`
|
|
1903
|
+
<div class="scroll-container">
|
|
1904
|
+
${this.showPrev?i`
|
|
1905
|
+
<button class="scroll-button prev" @click=${this.scrollTabsLeft}>
|
|
1906
|
+
<randstad-icon name="arrow_left" size="36px"></randstad-icon>
|
|
1907
|
+
</button>
|
|
1908
|
+
`:null}
|
|
1909
|
+
|
|
1910
|
+
<div class="tab-wrapper" @scroll=${this.handleScroll}>
|
|
1911
|
+
${this.tabs.map((t=>i`
|
|
1912
|
+
<div class="tab ${this.internalSelected===t.value?"active":""}"
|
|
1913
|
+
@click=${()=>this.selectTab(t.value)}>
|
|
1914
|
+
<img src="/assets/icons/${t.icon}" alt="${t.label}" />
|
|
1915
|
+
<span>${t.label}</span>
|
|
1916
|
+
</div>
|
|
1917
|
+
`))}
|
|
1770
1918
|
</div>
|
|
1771
|
-
|
|
1772
|
-
|
|
1919
|
+
|
|
1920
|
+
${this.showNext?i`
|
|
1921
|
+
<button class="scroll-button next" @click=${this.scrollTabsRight}>
|
|
1922
|
+
<randstad-icon name="arrow_right" size="36px"></randstad-icon>
|
|
1923
|
+
</button>
|
|
1924
|
+
`:null}
|
|
1925
|
+
</div>
|
|
1926
|
+
`}};n([I({type:Array}),a("design:type",Array)],qt.prototype,"tabs",void 0),n([I({type:String}),a("design:type",String)],qt.prototype,"selected",void 0),n([L(),a("design:type",String)],qt.prototype,"internalSelected",void 0),n([L(),a("design:type",Object)],qt.prototype,"showPrev",void 0),n([L(),a("design:type",Object)],qt.prototype,"showNext",void 0),qt=n([l("tabs-bar")],qt);let Dt=class extends e{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=t`
|
|
1927
|
+
:host {
|
|
1928
|
+
display: inline-block;
|
|
1929
|
+
width: 64px;
|
|
1930
|
+
height: 64px;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
svg {
|
|
1934
|
+
width: 64px;
|
|
1935
|
+
height: 64px;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
.circle-text {
|
|
1939
|
+
${R};
|
|
1940
|
+
text-align: center;
|
|
1941
|
+
vertical-align: middle;
|
|
1942
|
+
fill: var(--randstad-dark-blue-40);
|
|
1943
|
+
text-anchor: middle;
|
|
1944
|
+
dominant-baseline: middle;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
circle.bg {
|
|
1948
|
+
stroke: var(--primary-light-blue-20);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
circle.fg {
|
|
1952
|
+
stroke: var(--primary-light-blue);
|
|
1953
|
+
stroke-linecap: round;
|
|
1954
|
+
}
|
|
1955
|
+
`}render(){const t=2*Math.PI*28,e=Math.max(this.max,1),o=t*(1-Math.min(this.value/e,1));return i`
|
|
1956
|
+
<svg
|
|
1957
|
+
viewBox="0 0 64 64"
|
|
1958
|
+
role="img"
|
|
1959
|
+
aria-label="Progreso: ${this.value} de ${this.max}"
|
|
1960
|
+
>
|
|
1961
|
+
<!-- Fondo -->
|
|
1962
|
+
<circle
|
|
1963
|
+
class="bg"
|
|
1964
|
+
cx="32"
|
|
1965
|
+
cy="32"
|
|
1966
|
+
r="${28}"
|
|
1967
|
+
stroke-width="${6}"
|
|
1968
|
+
fill="none"
|
|
1969
|
+
/>
|
|
1970
|
+
<!-- Progreso -->
|
|
1971
|
+
<circle
|
|
1972
|
+
class="fg"
|
|
1973
|
+
cx="32"
|
|
1974
|
+
cy="32"
|
|
1975
|
+
r="${28}"
|
|
1976
|
+
stroke-width="${6}"
|
|
1977
|
+
fill="none"
|
|
1978
|
+
stroke-dasharray="${t}"
|
|
1979
|
+
stroke-dashoffset="${o}"
|
|
1980
|
+
transform="rotate(-90 32 32)"
|
|
1981
|
+
/>
|
|
1982
|
+
<!-- Texto -->
|
|
1983
|
+
<text x="32" y="34" class="circle-text">
|
|
1984
|
+
${this.value} de ${this.max}
|
|
1985
|
+
</text>
|
|
1986
|
+
</svg>
|
|
1987
|
+
`}};n([I({type:Number}),a("design:type",Object)],Dt.prototype,"value",void 0),n([I({type:Number}),a("design:type",Object)],Dt.prototype,"max",void 0),Dt=n([l("progress-circle")],Dt);export{D as Checkbox,K as CustomModal,W as CustomPopup,Mt as CustomRadio,Ut as CustomStepper,Bt as FilterableSelect,H as IconComponent,Dt as ProgressCircle,q as RandstadButton,G as RandstadForm,Y as RandstadNotice,qt as TabsBar};
|
|
1773
1988
|
//# sourceMappingURL=index.js.map
|