@randstad-uca/design-system 1.0.23 → 1.0.24

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.
@@ -0,0 +1,10 @@
1
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_3095_5899)">
3
+ <path d="M21.475 12.2H3.725L8.575 7.35C8.775 7.15 8.775 6.85 8.575 6.65C8.375 6.45 8.075 6.45 7.875 6.65L2.15 12.35C1.95 12.55 1.95 12.85 2.15 13.05L7.8 18.7C7.9 18.8 8.025 18.85 8.15 18.85C8.275 18.85 8.4 18.8 8.5 18.7C8.7 18.5 8.7 18.2 8.5 18L3.725 13.2H21.5C21.775 13.2 22 12.975 22 12.7C22 12.425 21.75 12.2 21.475 12.2Z" fill="#2175D9"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_3095_5899">
7
+ <rect width="24" height="24" fill="white" transform="translate(0 0.5)"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
2
  import '../styles/buttons.css';
3
3
  export declare class RandstadButton extends LitElement {
4
- variant: 'button-primary' | 'button-secondary' | 'button-tertiary' | 'button-round';
4
+ variant: 'button-primary' | 'button-secondary' | 'button-tertiary' | 'button-round' | 'button-card';
5
5
  size: 'md' | 'lg';
6
6
  label: string;
7
7
  loader: boolean;
package/dist/index.js CHANGED
@@ -42,13 +42,13 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
42
42
  font-size: 12px;
43
43
  line-height: 15px;
44
44
  letter-spacing: 0%;
45
- `,M=t`
45
+ `,F=t`
46
46
  font-family: 'Graphik', sans-serif;
47
47
  font-weight: 400;
48
48
  font-size: 14px;
49
49
  line-height: 25px;
50
50
  letter-spacing: 0%;
51
- `,F=t`
51
+ `,M=t`
52
52
  font-family: 'Graphik', sans-serif;
53
53
  font-weight: 400;
54
54
  font-size: 16px;
@@ -81,7 +81,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
81
81
  line-height: 30px;
82
82
  letter-spacing: -1%;
83
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`
84
+ `;let D=class extends e{constructor(){super(...arguments),this.variant="button-primary",this.size="md",this.label="",this.loader=!1,this.iconPosition="left",this.disabled=!1,this.iconName=null,this.type="button"}static{this.styles=t`
85
85
  :host {
86
86
  display: inline-block;
87
87
  }
@@ -106,7 +106,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
106
106
  }
107
107
 
108
108
  .button-md {
109
- ${F}
109
+ ${M}
110
110
  min-height: 57px;
111
111
  }
112
112
 
@@ -269,6 +269,41 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
269
269
  border: none;
270
270
  color: var(--white);
271
271
  }
272
+
273
+ .button-card {
274
+ font-family: 'Graphik';
275
+ background-color: var(--primary-color);
276
+ color: var(--white);
277
+ border-radius: 4px;
278
+ padding: 4px 16px;
279
+ font-weight: 400;
280
+ font-size: 12px;
281
+ line-height: 15px;
282
+ letter-spacing: 0%;
283
+ text-align: center;
284
+ vertical-align: middle;
285
+
286
+ }
287
+
288
+ .button-card:not([disabled]):hover {
289
+ background-color: #175197;
290
+ }
291
+
292
+ .button-card:not([disabled]):active {
293
+ background-color: #124077;
294
+ }
295
+
296
+ .button-card:not([disabled]):focus-visible {
297
+ outline: 2px solid var(--primary-color);
298
+ outline-offset: 2px;
299
+ }
300
+
301
+ .button-card[disabled] {
302
+ background-color: #CFD1D9;
303
+ color: #6F758D;
304
+ cursor: not-allowed;
305
+ }
306
+
272
307
  `}handleClick(t){if(!this.disabled)if("submit"===this.type){const t=this.closest("form");t&&t.requestSubmit()}else this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}render(){const t={button:!0,[`button-${this.size}`]:"button-round"!==this.variant,[this.variant]:!0,loader:this.loader},e="button-tertiary"===this.variant?"var(--primary-color)":"white";return i`
273
308
  <button
274
309
  part="button"
@@ -291,14 +326,14 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
291
326
  ${this.iconName&&"button-round"!==this.variant&&"right"===this.iconPosition?i`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
292
327
  `}
293
328
  </button>
294
- `}};n([j({type:String}),a("design:type",String)],q.prototype,"variant",void 0),n([j({type:String}),a("design:type",String)],q.prototype,"size",void 0),n([j({type:String}),a("design:type",Object)],q.prototype,"label",void 0),n([j({type:Boolean}),a("design:type",Object)],q.prototype,"loader",void 0),n([j({type:String,attribute:"icon-src"}),a("design:type",String)],q.prototype,"iconSrc",void 0),n([j({type:String}),a("design:type",String)],q.prototype,"iconPosition",void 0),n([j({type:Boolean,reflect:!0}),a("design:type",Boolean)],q.prototype,"disabled",void 0),n([j({type:String}),a("design:type",Object)],q.prototype,"iconName",void 0),n([j({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`
329
+ `}};n([j({type:String}),a("design:type",String)],D.prototype,"variant",void 0),n([j({type:String}),a("design:type",String)],D.prototype,"size",void 0),n([j({type:String}),a("design:type",Object)],D.prototype,"label",void 0),n([j({type:Boolean}),a("design:type",Object)],D.prototype,"loader",void 0),n([j({type:String,attribute:"icon-src"}),a("design:type",String)],D.prototype,"iconSrc",void 0),n([j({type:String}),a("design:type",String)],D.prototype,"iconPosition",void 0),n([j({type:Boolean,reflect:!0}),a("design:type",Boolean)],D.prototype,"disabled",void 0),n([j({type:String}),a("design:type",Object)],D.prototype,"iconName",void 0),n([j({type:String}),a("design:type",String)],D.prototype,"type",void 0),D=n([l("randstad-button")],D);let q=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`
295
330
  :host {
296
331
  display: block;
297
332
  max-width: 100%;
298
333
  }
299
334
 
300
335
  label {
301
- ${M}
336
+ ${F}
302
337
  display: flex;
303
338
  align-items: center;
304
339
  gap: 8px;
@@ -361,7 +396,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
361
396
  ${this.renderClause(this.clause2Text,this.clause2Url)}.
362
397
  </span>
363
398
  </label>
364
- `}};n([j({type:String}),a("design:type",Object)],D.prototype,"prefix",void 0),n([j({type:String}),a("design:type",Object)],D.prototype,"clause1Text",void 0),n([j({type:String}),a("design:type",String)],D.prototype,"clause1Url",void 0),n([j({type:String}),a("design:type",Object)],D.prototype,"connector",void 0),n([j({type:String}),a("design:type",Object)],D.prototype,"clause2Text",void 0),n([j({type:String}),a("design:type",String)],D.prototype,"clause2Url",void 0),n([j({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`
399
+ `}};n([j({type:String}),a("design:type",Object)],q.prototype,"prefix",void 0),n([j({type:String}),a("design:type",Object)],q.prototype,"clause1Text",void 0),n([j({type:String}),a("design:type",String)],q.prototype,"clause1Url",void 0),n([j({type:String}),a("design:type",Object)],q.prototype,"connector",void 0),n([j({type:String}),a("design:type",Object)],q.prototype,"clause2Text",void 0),n([j({type:String}),a("design:type",String)],q.prototype,"clause2Url",void 0),n([j({type:Boolean,reflect:!0}),a("design:type",Object)],q.prototype,"checked",void 0),q=n([l("randstad-checkbox")],q);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`
365
400
  :host {
366
401
  display: block;
367
402
  font-family: 'Graphik', sans-serif;
@@ -383,7 +418,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
383
418
  }
384
419
 
385
420
  .form-label {
386
- ${F}
421
+ ${M}
387
422
  color: var(--label-color, var(--secondary-color-80));
388
423
  }
389
424
 
@@ -483,7 +518,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
483
518
  }
484
519
 
485
520
  .helper-description {
486
- ${F}
521
+ ${M}
487
522
  color: var(--secondary-color-40);
488
523
  margin: 0px;
489
524
  }
@@ -493,13 +528,13 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
493
528
  }
494
529
 
495
530
  .error-message {
496
- ${F}
531
+ ${M}
497
532
  color: var(--ui-negative);
498
533
  margin: 0px;
499
534
  }
500
535
 
501
536
  .link-text {
502
- ${F}
537
+ ${M}
503
538
  color: var(--primary-color);
504
539
  cursor: pointer;
505
540
  text-align: end;
@@ -666,7 +701,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
666
701
  }
667
702
 
668
703
  .container {
669
- ${F}
704
+ ${M}
670
705
  display: flex;
671
706
  align-items: flex-start;
672
707
  gap: 8px;
@@ -805,7 +840,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
805
840
  }
806
841
 
807
842
  .modal-subtitle {
808
- ${F}
843
+ ${M}
809
844
  margin: 0;
810
845
  color: var(--secondary-color-60);
811
846
  }
@@ -953,7 +988,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
953
988
  }
954
989
 
955
990
  .popup-description {
956
- ${F}
991
+ ${M}
957
992
  margin: 0;
958
993
  color: var(--secondary-color-60);
959
994
  }
@@ -1144,7 +1179,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1144
1179
  * @license
1145
1180
  * Copyright 2022 Google LLC
1146
1181
  * SPDX-License-Identifier: Apache-2.0
1147
- */;let Mt=class extends _t{};Mt.styles=[Rt],Mt=n([l("md-radio")],Mt);let Ft=class extends e{constructor(){super(...arguments),this.name="radio-group",this.checked=!1,this.disabled=!1,this.error=!1}static{this.styles=t`
1182
+ */;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`
1148
1183
  :host {
1149
1184
  font-family: "Graphik", sans-serif;
1150
1185
  }
@@ -1203,7 +1238,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1203
1238
  ></md-radio>
1204
1239
  <span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
1205
1240
  </label>
1206
- `}};n([j({type:String}),a("design:type",Object)],Ft.prototype,"name",void 0),n([j({type:Boolean}),a("design:type",Object)],Ft.prototype,"checked",void 0),n([j({type:Boolean}),a("design:type",Object)],Ft.prototype,"disabled",void 0),n([j({type:Boolean}),a("design:type",Object)],Ft.prototype,"error",void 0),Ft=n([l("custom-radio")],Ft);let Ut=class extends e{static{this.styles=t`
1241
+ `}};n([j({type:String}),a("design:type",Object)],Mt.prototype,"name",void 0),n([j({type:Boolean}),a("design:type",Object)],Mt.prototype,"checked",void 0),n([j({type:Boolean}),a("design:type",Object)],Mt.prototype,"disabled",void 0),n([j({type:Boolean}),a("design:type",Object)],Mt.prototype,"error",void 0),Mt=n([l("custom-radio")],Mt);let Ut=class extends e{static{this.styles=t`
1207
1242
  :host {
1208
1243
  display: block;
1209
1244
  font-family: 'Graphik', sans-serif;
@@ -1246,7 +1281,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1246
1281
  }
1247
1282
 
1248
1283
  .form-label {
1249
- ${F};
1284
+ ${M};
1250
1285
  color: var(--label-color, var(--secondary-color-80));
1251
1286
  }
1252
1287
 
@@ -1747,7 +1782,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1747
1782
  }
1748
1783
 
1749
1784
  .container {
1750
- ${M};
1785
+ ${F};
1751
1786
  display: flex;
1752
1787
  align-items: center;
1753
1788
  box-sizing: border-box;
@@ -1813,7 +1848,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1813
1848
  <randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
1814
1849
  <span class="message">${this.message}</span>
1815
1850
  </div>
1816
- `}}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`
1851
+ `}}customElements.define("randstad-snackbar",Nt);let Dt=class extends e{constructor(){super(...arguments),this.tabs=[],this.selected="",this.internalSelected="",this.showPrev=!1,this.showNext=!1,this.SCROLL_OFFSET=56,this.handleScroll=()=>{const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const{scrollLeft:e,scrollWidth:i,clientWidth:o}=t;this.showPrev=e>0,this.showNext=e+o<i-1}}static{this.styles=t`
1817
1852
  :host {
1818
1853
  display: block;
1819
1854
  border-bottom: 1px solid #E7E8EC;
@@ -1900,7 +1935,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1900
1935
  font-size: 24px;
1901
1936
  cursor: pointer;
1902
1937
  z-index: 1;
1903
- width: 78px;
1938
+ width: 56px;
1904
1939
  height: 100%;
1905
1940
  display: flex;
1906
1941
  align-items: center;
@@ -1921,6 +1956,13 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1921
1956
  right: 0;
1922
1957
  background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);
1923
1958
  }
1959
+
1960
+ @media (max-width: 940px) {
1961
+ .tab {
1962
+ ${M};
1963
+ padding: 16px;
1964
+ }
1965
+ }
1924
1966
  `}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`
1925
1967
  <div class="scroll-container">
1926
1968
  ${this.showPrev?i`
@@ -1945,7 +1987,7 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
1945
1987
  </button>
1946
1988
  `:null}
1947
1989
  </div>
1948
- `}};n([j({type:Array}),a("design:type",Array)],qt.prototype,"tabs",void 0),n([j({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`
1990
+ `}};n([j({type:Array}),a("design:type",Array)],Dt.prototype,"tabs",void 0),n([j({type:String}),a("design:type",String)],Dt.prototype,"selected",void 0),n([L(),a("design:type",String)],Dt.prototype,"internalSelected",void 0),n([L(),a("design:type",Object)],Dt.prototype,"showPrev",void 0),n([L(),a("design:type",Object)],Dt.prototype,"showNext",void 0),Dt=n([l("tabs-bar")],Dt);let qt=class extends e{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=t`
1949
1991
  :host {
1950
1992
  display: inline-block;
1951
1993
  width: 64px;
@@ -2006,5 +2048,5 @@ const Rt=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
2006
2048
  ${this.value} de ${this.max}
2007
2049
  </text>
2008
2050
  </svg>
2009
- `}};n([j({type:Number}),a("design:type",Object)],Dt.prototype,"value",void 0),n([j({type:Number}),a("design:type",Object)],Dt.prototype,"max",void 0),Dt=n([l("progress-circle")],Dt);export{D as Checkbox,Y as CustomModal,W as CustomPopup,Ft as CustomRadio,Bt as CustomStepper,Ut as FilterableSelect,K as IconComponent,Dt as ProgressCircle,q as RandstadButton,G as RandstadForm,H as RandstadNotice,qt as TabsBar};
2051
+ `}};n([j({type:Number}),a("design:type",Object)],qt.prototype,"value",void 0),n([j({type:Number}),a("design:type",Object)],qt.prototype,"max",void 0),qt=n([l("progress-circle")],qt);export{q as Checkbox,Y as CustomModal,W as CustomPopup,Mt as CustomRadio,Bt as CustomStepper,Ut as FilterableSelect,K as IconComponent,qt as ProgressCircle,D as RandstadButton,G as RandstadForm,H as RandstadNotice,Dt as TabsBar};
2010
2052
  //# sourceMappingURL=index.js.map