@randstad-uca/design-system 1.0.7 → 1.0.9

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.
@@ -5,6 +5,7 @@ export declare class FilterableSelect extends LitElement {
5
5
  defaultValue: string;
6
6
  disabled: boolean;
7
7
  label: string;
8
+ value: string;
8
9
  labelColor: string;
9
10
  filterable: boolean;
10
11
  filteredOptions: never[];
@@ -13,7 +14,7 @@ export declare class FilterableSelect extends LitElement {
13
14
  private debounceTimeout;
14
15
  static styles: import("lit").CSSResult;
15
16
  constructor();
16
- willUpdate(changedProperties: any): void;
17
+ willUpdate(changedProperties: Map<string, any>): void;
17
18
  connectedCallback(): void;
18
19
  disconnectedCallback(): void;
19
20
  handleInputClick(e: any): void;
package/dist/index.js CHANGED
@@ -149,7 +149,7 @@ function N(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Refl
149
149
  }
150
150
 
151
151
  .button-round {
152
- width: 48px !important;
152
+ width: 48px;
153
153
  height: 48px;
154
154
  border-radius: 50%;
155
155
  background-color: var(--white);
@@ -221,7 +221,7 @@ function N(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Refl
221
221
  border: none;
222
222
  color: var(--white);
223
223
  }
224
- `}handleClick(t){this.disabled||this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0}))}render(){const t=`button ${"button-round"===this.variant?"":`button-${this.size}`} ${this.variant} ${this.loader?"loader":""}`,e="button-tertiary"===this.variant?"#2175D9":"white";return o`
224
+ `}handleClick(t){this.disabled||this.dispatchEvent(new CustomEvent("button-click",{bubbles:!0,composed:!0}))}render(){const t=`button button-${this.size} ${this.variant} ${this.loader?"loader":""}`,e="button-tertiary"===this.variant?"#2175D9":"white";return o`
225
225
  <button
226
226
  type="button"
227
227
  class=${t}
@@ -237,7 +237,7 @@ function N(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Refl
237
237
  `:o`
238
238
  ${this.iconSrc&&"button-round"===this.variant?o`<img src=${this.iconSrc} alt="icon" class="button-icon" />`:""}
239
239
  ${this.iconName&&"button-round"!==this.variant&&"left"===this.iconPosition?o`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
240
- <slot>${this.label}</slot>
240
+ ${this.label}
241
241
  ${this.iconName&&"button-round"!==this.variant&&"right"===this.iconPosition?o`<randstad-icon name=${this.iconName} size="24px"></randstad-icon>`:""}
242
242
  `}
243
243
  </button>
@@ -308,7 +308,7 @@ function N(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Refl
308
308
  ${this.prefix}&nbsp;
309
309
  ${this.renderClause(this.clause1Text,this.clause1Url)},&nbsp;
310
310
  ${this.connector}&nbsp;
311
- ${this.renderClause(this.clause2Text,this.clause2Url)}
311
+ ${this.renderClause(this.clause2Text,this.clause2Url)}.
312
312
  </span>
313
313
  </label>
314
314
  `}};n([I({type:String}),a("design:type",Object)],M.prototype,"prefix",void 0),n([I({type:String}),a("design:type",Object)],M.prototype,"clause1Text",void 0),n([I({type:String}),a("design:type",String)],M.prototype,"clause1Url",void 0),n([I({type:String}),a("design:type",Object)],M.prototype,"connector",void 0),n([I({type:String}),a("design:type",Object)],M.prototype,"clause2Text",void 0),n([I({type:String}),a("design:type",String)],M.prototype,"clause2Url",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],M.prototype,"checked",void 0),M=n([l("randstad-checkbox")],M);
@@ -4041,7 +4041,7 @@ console.warn('WARNING: Since Vaadin 23.2, "@vaadin/vaadin-date-picker" is deprec
4041
4041
  outline: none;
4042
4042
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
4043
4043
  width: 100%;
4044
- color: #0F1941 !important;
4044
+ color: #0F1941;
4045
4045
  }
4046
4046
 
4047
4047
  .form.error .form-input {
@@ -4161,7 +4161,7 @@ console.warn('WARNING: Since Vaadin 23.2, "@vaadin/vaadin-date-picker" is deprec
4161
4161
  }
4162
4162
 
4163
4163
  .link-text:hover {
4164
- text-decoration: underline;
4164
+ color: #0f3b65;
4165
4165
  }
4166
4166
 
4167
4167
  .tooltip-wrapper randstad-icon {
@@ -4176,13 +4176,6 @@ console.warn('WARNING: Since Vaadin 23.2, "@vaadin/vaadin-date-picker" is deprec
4176
4176
  .toggle-password randstad-icon svg {
4177
4177
  fill: #2175D9 !important;
4178
4178
  }
4179
-
4180
- input:-webkit-autofill,
4181
- textarea:-webkit-autofill {
4182
- box-shadow: 0 0 0px 1000px white inset !important;
4183
- -webkit-text-fill-color: #0F1941 !important;
4184
- transition: background-color 5000s ease-in-out 0s;
4185
- }
4186
4179
  `}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;this.value=e.value,this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0}))}handleLinkClick(t){t.preventDefault(),this.linkRoute&&this.dispatchEvent(new CustomEvent("linkClicked",{detail:this.linkRoute,bubbles:!0,composed:!0}))}render(){return o`
4187
4180
  <div
4188
4181
  class="form ${this.error?"error":""} ${this.success?"success":""} ${this.disabled?"disabled":""}"
@@ -4240,11 +4233,7 @@ console.warn('WARNING: Since Vaadin 23.2, "@vaadin/vaadin-date-picker" is deprec
4240
4233
  ${this.errorMessage?this.errorMessage:o`<slot name="error-extended"></slot>`}
4241
4234
  </p>
4242
4235
  `:r}
4243
- ${this.linkText&&this.linkRoute?o`
4244
- <div style="text-align: right;">
4245
- <a class="link-text" href="#" @click=${this.handleLinkClick}>${this.linkText}</a>
4246
- </div>
4247
- `:r}
4236
+ ${this.linkText&&this.linkRoute?o`<a class="link-text" href="#" @click=${this.handleLinkClick}>${this.linkText}</a>`:r}
4248
4237
 
4249
4238
  ${this.helper?o`<p class="helper-description">${this.helper}</p>`:r}
4250
4239
  </div>
@@ -4348,6 +4337,7 @@ console.warn('WARNING: Since Vaadin 23.2, "@vaadin/vaadin-date-picker" is deprec
4348
4337
  line-height: 25px;
4349
4338
  font-weight: 400;
4350
4339
  color: white;
4340
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
4351
4341
  font-family: 'Graphik', sans-serif;
4352
4342
  }
4353
4343
  .container {
@@ -4460,13 +4450,17 @@ console.warn('WARNING: Since Vaadin 23.2, "@vaadin/vaadin-date-picker" is deprec
4460
4450
  `}closePopup(t){this.dispatchEvent(new CustomEvent("popup-close",{detail:t})),this.open=!1}render(){return o`
4461
4451
  <div class="popup" style="width: ${this.width};">
4462
4452
  ${"default"===this.type?o`
4463
- <div><img src="assets/img/icon_${this.icon}.svg"></div>
4453
+ <div>
4454
+ <randstad-icon name="${this.icon}" size="56px"></randstad-icon>
4455
+ </div>
4464
4456
  <p>${this.description}</p>
4465
4457
  <div class="buttons">
4466
4458
  <button class="primary" @click=${()=>this.closePopup(!0)}>${this.buttonText}</button>
4467
4459
  </div>
4468
4460
  `:o`
4469
- <div><img src="assets/img/icon_${this.icon}.svg"></div>
4461
+ <div>
4462
+ <randstad-icon name="${this.icon}" size="56px"></randstad-icon>
4463
+ </div>
4470
4464
  <h2>${this.title}</h2>
4471
4465
  <p>${this.description}</p>
4472
4466
  <div class="buttons">
@@ -4855,7 +4849,6 @@ const ha=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
4855
4849
  background: white;
4856
4850
  cursor: pointer;
4857
4851
  transition: background-color 0.3s ease;
4858
- color: #0F1941 !important;
4859
4852
  }
4860
4853
 
4861
4854
  .input-container:hover .filter-input {
@@ -4963,7 +4956,7 @@ const ha=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
4963
4956
  .hidden {
4964
4957
  display: none;
4965
4958
  }
4966
- `}constructor(){super(),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.label="",this.labelColor="",this.filterable=!0,this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.debounceTimeout=null,this.defaultValue&&this.options.includes(this.defaultValue)&&(this.filterValue=this.defaultValue)}willUpdate(t){t.has("options")&&(this.filteredOptions=[...this.options]),t.has("defaultValue")&&this.options.includes(this.defaultValue)&&(this.filterValue=this.defaultValue)}connectedCallback(){super.connectedCallback(),this.filteredOptions=[...this.options],document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleClickOutside.bind(this))}handleInputClick(t){this.disabled||t.target!==this.shadowRoot.querySelector(".filter-input")||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){const e=t.target.value.toLowerCase();this.filterValue=e,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()}handleSelect(t){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.isOpen||this.filterValue?(this.isOpen=!1,this.filterValue="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}))):this.isOpen=!0,this.requestUpdate())}handleClickOutside(t){this.contains(t.target)||(this.isOpen=!1,this.requestUpdate())}render(){const t=this.isOpen||this.filterValue?"close":"arrow_down";return o`
4959
+ `}constructor(){if(super(),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.label="",this.value="",this.labelColor="",this.filterable=!0,this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.debounceTimeout=null,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.filteredOptions=[...this.options],document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleClickOutside.bind(this))}handleInputClick(t){this.disabled||t.target!==this.shadowRoot.querySelector(".filter-input")||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){const e=t.target.value.toLowerCase();this.filterValue=e,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()}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){this.contains(t.target)||(this.isOpen=!1,this.requestUpdate())}render(){return o`
4967
4960
  <div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
4968
4961
  ${this.label?o`
4969
4962
  <div class="label-container">
@@ -4986,7 +4979,8 @@ const ha=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
4986
4979
  @click="${this.handleIconClick}"
4987
4980
  ?disabled="${this.disabled}"
4988
4981
  >
4989
- <randstad-icon name="${t}" size="24px" color="#2175D9"></randstad-icon>
4982
+ ${this.filterable&&this.filterValue?o`<randstad-icon name="close" size="24px" color="#2175D9"></randstad-icon>`:this.isOpen&&this.filteredOptions.length>0?o`<randstad-icon name="arrow_up" size="24px" color="#2175D9"></randstad-icon>`:o`<randstad-icon name="arrow_down" size="24px" color="#2175D9"></randstad-icon>`}
4983
+
4990
4984
  </button>
4991
4985
  </div>
4992
4986
  <ul class="options-list ${this.isOpen&&this.filteredOptions.length>0?"":"hidden"}">
@@ -4998,7 +4992,7 @@ const ha=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
4998
4992
  </ul>
4999
4993
  </div>
5000
4994
  </div>
5001
- `}};n([I({type:Array}),a("design:type",Array)],ma.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],ma.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],ma.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],ma.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],ma.prototype,"label",void 0),n([I({type:String}),a("design:type",Object)],ma.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],ma.prototype,"filterable",void 0),n([$(),a("design:type",Object)],ma.prototype,"filteredOptions",void 0),n([$(),a("design:type",Object)],ma.prototype,"filterValue",void 0),n([$(),a("design:type",Object)],ma.prototype,"isOpen",void 0),ma=n([l("filterable-select"),a("design:paramtypes",[])],ma);let fa=class extends t{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=e`
4995
+ `}};n([I({type:Array}),a("design:type",Array)],ma.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],ma.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],ma.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],ma.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],ma.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],ma.prototype,"value",void 0),n([I({type:String}),a("design:type",Object)],ma.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],ma.prototype,"filterable",void 0),n([$(),a("design:type",Object)],ma.prototype,"filteredOptions",void 0),n([$(),a("design:type",Object)],ma.prototype,"filterValue",void 0),n([$(),a("design:type",Object)],ma.prototype,"isOpen",void 0),ma=n([l("filterable-select"),a("design:paramtypes",[])],ma);let fa=class extends t{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=e`
5002
4996
  .stepper {
5003
4997
  display: flex;
5004
4998
  gap: 20px;
@@ -5155,8 +5149,8 @@ const ha=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
5155
5149
  align-items: center;
5156
5150
  box-sizing: border-box;
5157
5151
  min-height: 48px;
5158
- min-width: 380px;
5159
- max-width: 380px;
5152
+ min-width: 270px;
5153
+ max-width: 480px;
5160
5154
  border-radius: 4px;
5161
5155
  padding: 8px;
5162
5156
  gap: 8px;
@@ -5210,17 +5204,6 @@ const ha=e`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
5210
5204
  .informative {
5211
5205
  background-color: var(--ui-informative);
5212
5206
  }
5213
-
5214
- @media (max-width: 940px) {
5215
- :host {
5216
- bottom: 16px !important;
5217
- left: 50% !important;
5218
- right: auto !important;
5219
- top: auto !important;
5220
- transform: translateX(-50%) !important;
5221
- justify-content: center !important;
5222
- }
5223
- }
5224
5207
  `]}constructor(){super(),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1,this.position="bottom-center"}static get properties(){return{type:{type:String},icon:{type:String},message:{type:String},open:{type:Boolean},position:{type:String,reflect:!0}}}render(){const t="error"===this.type||"warning"===this.type?"alert":"status";return o`
5225
5208
  <div
5226
5209
  class="container ${this.open?"":"hidden"} ${this.type}"