@everymatrix/general-registration 1.10.17 → 1.10.18

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-a69a5278.js');
5
+ const index = require('./index-5b4544e8.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["checkbox-input_11.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationsUrl":[513,"translations-url"],"errorMessage":[32],"isFormValid":[32],"listOfInputs":[32],"isLoading":[32],"registrationStep":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]]]]], options);
17
+ return index.bootstrapLazy([["checkbox-input_11.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationsUrl":[513,"translations-url"],"errorMessage":[32],"isFormValid":[32],"listOfInputs":[32],"isLoading":[32],"registrationStep":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -238,9 +238,7 @@ export class GeneralRegistration {
238
238
  })
239
239
  .catch((err) => {
240
240
  console.error(err);
241
- })
242
- .finally(() => {
243
- this.isLoading = false;
241
+ // this.isLoading = false;
244
242
  });
245
243
  }
246
244
  setRegister() {
@@ -335,7 +333,7 @@ export class GeneralRegistration {
335
333
  return listOfInputs.filter(input => input.isValid == false).length > 0;
336
334
  }
337
335
  renderInputs() {
338
- return (this.listOfInputs.map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling })));
336
+ return (this.listOfInputs.map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip })));
339
337
  }
340
338
  ;
341
339
  renderButtons() {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { t as translate } from './locale.utils.js';
2
+ import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
 
4
- const checkboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
4
+ const checkboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--flex{display:flex;gap:5px}.checkbox__wrapper--relative{position:relative}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkbox__label-text{font-size:16px}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}";
5
5
 
6
6
  const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -19,6 +19,7 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
19
19
  */
20
20
  this.clientStyling = '';
21
21
  this.limitStylingAppends = false;
22
+ this.showTooltip = false;
22
23
  this.value = '';
23
24
  this.setClientStyling = () => {
24
25
  let sheet = document.createElement('style');
@@ -42,6 +43,12 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
42
43
  valueHandler(inputValueEvent) {
43
44
  this.sendInputValue.emit(inputValueEvent);
44
45
  }
46
+ handleClickOutside(event) {
47
+ if (event.composedPath()[0] === this.tooltipIconReference)
48
+ return;
49
+ if (event.composedPath()[0] !== this.tooltipReference)
50
+ this.showTooltip = false;
51
+ }
45
52
  componentDidRender() {
46
53
  // start custom styling area
47
54
  if (!this.limitStylingAppends && this.stylingContainer) {
@@ -71,10 +78,17 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
71
78
  }
72
79
  }
73
80
  renderLabel() {
74
- return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input` }, h("div", { innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
81
+ return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input` }, h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
82
+ }
83
+ renderTooltip() {
84
+ if (this.showTooltip) {
85
+ return (h("div", { class: `checkbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
86
+ }
87
+ return null;
75
88
  }
76
89
  render() {
77
- return h("div", { class: 'checkbox__wrapper', ref: el => this.stylingContainer = el }, h("input", { type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue == "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { class: 'checkbox__error-message' }, this.errorMessage));
90
+ return h("div", { class: 'checkbox__wrapper', ref: el => this.stylingContainer = el }, h("input", { type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { class: 'checkbox__error-message' }, this.errorMessage), h("div", { class: 'checkbox__wrapper--relative' }, this.tooltip &&
91
+ h("img", { class: 'checkbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
78
92
  }
79
93
  static get watchers() { return {
80
94
  "isValid": ["validityChanged"],
@@ -86,14 +100,16 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
86
100
  "displayName": [513, "display-name"],
87
101
  "defaultValue": [513, "default-value"],
88
102
  "autofilled": [516],
103
+ "tooltip": [513],
89
104
  "validation": [16],
90
105
  "language": [513],
91
106
  "emitValue": [516, "emit-value"],
92
107
  "clientStyling": [513, "client-styling"],
93
108
  "errorMessage": [32],
94
109
  "isValid": [32],
95
- "limitStylingAppends": [32]
96
- }]);
110
+ "limitStylingAppends": [32],
111
+ "showTooltip": [32]
112
+ }, [[4, "click", "handleClickOutside"]]]);
97
113
  function defineCustomElement() {
98
114
  if (typeof customElements === "undefined") {
99
115
  return;
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { t as translate$1 } from './locale.utils.js';
2
+ import { t as translate$1, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
  import { i, r as registerStyles, a as inputFieldShared, d as dedupingMixin, E as ElementMixin, w as wrap, l as legacyOptimizations, u as useShadow, P as PolymerElement, s as suppressTemplateNotifications, t as timeOut, m as microTask, b as matches, c as translate, F as FocusMixin, T as ThemableMixin, h as html, D as Debouncer$1, e as timeOut$1, C as ControllerMixin, f as DirMixin, g as DelegateFocusMixin, I as InputConstraintsMixin, K as KeyboardMixin, j as InputControlMixin, k as InputController, L as LabelledInputController, n as TooltipController, o as inputFieldShared$1, p as ElementMixin$1 } from './input-field-shared-styles.js';
4
4
  import { m as menuOverlay, P as PositionMixin, O as Overlay, a as OptionalMutableData, t as templatize, b as modelForElement, i as isFirefox, c as afterNextRender, d as isIOS, V as VirtualKeyboardController } from './virtual-keyboard-controller.js';
5
5
  import { a as addListener, s as setTouchAction } from './vaadin-button.js';
@@ -5052,7 +5052,7 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
5052
5052
 
5053
5053
  customElements.define(DatePicker.is, DatePicker);
5054
5054
 
5055
- const dateInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:\"Roboto\";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.date__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
5055
+ const dateInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:\"Roboto\";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.date__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}";
5056
5056
 
5057
5057
  const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5058
5058
  constructor() {
@@ -5066,6 +5066,7 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5066
5066
  */
5067
5067
  this.clientStyling = '';
5068
5068
  this.limitStylingAppends = false;
5069
+ this.showTooltip = false;
5069
5070
  this.setClientStyling = () => {
5070
5071
  let sheet = document.createElement('style');
5071
5072
  sheet.innerHTML = this.clientStyling;
@@ -5089,6 +5090,12 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5089
5090
  valueHandler(inputValueEvent) {
5090
5091
  this.sendInputValue.emit(inputValueEvent);
5091
5092
  }
5093
+ handleClickOutside(event) {
5094
+ if (event.composedPath()[0] === this.tooltipIconReference)
5095
+ return;
5096
+ if (event.composedPath()[0] !== this.tooltipReference)
5097
+ this.showTooltip = false;
5098
+ }
5092
5099
  componentDidRender() {
5093
5100
  // start custom styling area
5094
5101
  if (!this.limitStylingAppends && this.stylingContainer) {
@@ -5123,9 +5130,16 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5123
5130
  return translate$1('requiredError', this.language);
5124
5131
  }
5125
5132
  }
5133
+ renderTooltip() {
5134
+ if (this.showTooltip) {
5135
+ return (h("div", { class: `date__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
5136
+ }
5137
+ return null;
5138
+ }
5126
5139
  render() {
5127
5140
  const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'date__input--invalid';
5128
- return h("div", { class: 'date__wrapper', ref: el => this.stylingContainer = el }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'date__error-message' }, this.errorMessage));
5141
+ return h("div", { class: 'date__wrapper', ref: el => this.stylingContainer = el }, h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'date__error-message' }, this.errorMessage), this.tooltip &&
5142
+ h("img", { class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
5129
5143
  }
5130
5144
  get element() { return this; }
5131
5145
  static get watchers() { return {
@@ -5139,13 +5153,15 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
5139
5153
  "validation": [16],
5140
5154
  "defaultValue": [513, "default-value"],
5141
5155
  "autofilled": [516],
5156
+ "tooltip": [513],
5142
5157
  "language": [513],
5143
5158
  "emitValue": [516, "emit-value"],
5144
5159
  "clientStyling": [513, "client-styling"],
5145
5160
  "errorMessage": [32],
5146
5161
  "isValid": [32],
5147
- "limitStylingAppends": [32]
5148
- }]);
5162
+ "limitStylingAppends": [32],
5163
+ "showTooltip": [32]
5164
+ }, [[4, "click", "handleClickOutside"]]]);
5149
5165
  function defineCustomElement() {
5150
5166
  if (typeof customElements === "undefined") {
5151
5167
  return;
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { t as translate } from './locale.utils.js';
2
+ import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
 
4
- const emailInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:\"Roboto\";font-style:normal}.email__wrapper{position:relative;width:100%;padding-top:26px}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.email__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
4
+ const emailInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:\"Roboto\";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F}.email__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}";
5
5
 
6
6
  const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -15,6 +15,7 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
15
15
  */
16
16
  this.clientStyling = '';
17
17
  this.limitStylingAppends = false;
18
+ this.showTooltip = false;
18
19
  this.validationPattern = '';
19
20
  this.setClientStyling = () => {
20
21
  let sheet = document.createElement('style');
@@ -39,6 +40,12 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
39
40
  valueHandler(inputValueEvent) {
40
41
  this.sendInputValue.emit(inputValueEvent);
41
42
  }
43
+ handleClickOutside(event) {
44
+ if (event.composedPath()[0] === this.tooltipIconReference)
45
+ return;
46
+ if (event.composedPath()[0] !== this.tooltipReference)
47
+ this.showTooltip = false;
48
+ }
42
49
  valueChangedHandler(event) {
43
50
  if (this.isDuplicateInput) {
44
51
  if (this.name === event.detail.name + 'Duplicate') {
@@ -93,9 +100,16 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
93
100
  return this.validation.custom.find(customRule => customRule.rule === 'duplicate-input').errorMessage;
94
101
  }
95
102
  }
103
+ renderTooltip() {
104
+ if (this.showTooltip) {
105
+ return (h("div", { class: `email__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
106
+ }
107
+ return null;
108
+ }
96
109
  render() {
97
110
  const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'email__input--invalid';
98
- return h("div", { class: 'email__wrapper', ref: el => this.stylingContainer = el }, h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onBlur: (e) => this.handleInput(e) }), h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'email__error-message' }, this.errorMessage));
111
+ return h("div", { class: 'email__wrapper', ref: el => this.stylingContainer = el }, h("div", { class: 'email__wrapper--flex' }, h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'email__wrapper--relative' }, this.tooltip &&
112
+ h("img", { class: 'email__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { id: `${this.name}__input`, type: 'email', class: `email__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'email__error-message' }, this.errorMessage));
99
113
  }
100
114
  static get watchers() { return {
101
115
  "isValid": ["validityChanged"],
@@ -108,14 +122,16 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
108
122
  "validation": [16],
109
123
  "defaultValue": [513, "default-value"],
110
124
  "autofilled": [516],
125
+ "tooltip": [513],
111
126
  "language": [513],
112
127
  "emitValue": [516, "emit-value"],
113
128
  "isDuplicateInput": [516, "is-duplicate-input"],
114
129
  "clientStyling": [513, "client-styling"],
115
130
  "errorMessage": [32],
116
131
  "isValid": [32],
117
- "limitStylingAppends": [32]
118
- }, [[16, "sendInputValue", "valueChangedHandler"]]]);
132
+ "limitStylingAppends": [32],
133
+ "showTooltip": [32]
134
+ }, [[4, "click", "handleClickOutside"], [16, "sendInputValue", "valueChangedHandler"]]]);
119
135
  function defineCustomElement() {
120
136
  if (typeof customElements === "undefined") {
121
137
  return;
@@ -30,23 +30,23 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
30
30
  var _a;
31
31
  switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
32
32
  case 'text':
33
- return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling });
33
+ return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip });
34
34
  case 'email':
35
- return h("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling });
35
+ return h("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip });
36
36
  case 'number':
37
- return h("number-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling });
37
+ return h("number-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip });
38
38
  case 'checkbox':
39
- return h("checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, defaultValue: this.defaultValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling });
39
+ return h("checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, defaultValue: this.defaultValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip });
40
40
  case 'datetime':
41
- return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling });
41
+ return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip });
42
42
  case 'password':
43
- return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling });
43
+ return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip });
44
44
  case 'radio':
45
45
  return h("radio-input", { name: this.name, displayName: this.displayName, optionsGroup: this.options, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling });
46
46
  case 'tel':
47
- return h("tel-input", { name: this.name, action: this.action, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, emitValue: this.emitValue, language: this.language, autofilled: this.autofilled, "client-styling": this.clientStyling });
47
+ return h("tel-input", { name: this.name, action: this.action, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, emitValue: this.emitValue, language: this.language, autofilled: this.autofilled, "client-styling": this.clientStyling, tooltip: this.tooltip });
48
48
  case 'dropdown':
49
- return h("select-input", { name: this.name, action: this.action, defaultValue: this.defaultValue, displayName: this.displayName, options: this.options, validation: this.validation, emitValue: this.emitValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling });
49
+ return h("select-input", { name: this.name, action: this.action, defaultValue: this.defaultValue, displayName: this.displayName, options: this.options, validation: this.validation, emitValue: this.emitValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip });
50
50
  default:
51
51
  return h("p", null, "The ", this.type, " input type is not valid");
52
52
  }
@@ -61,6 +61,7 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
61
61
  "options": [520],
62
62
  "language": [513],
63
63
  "autofilled": [516],
64
+ "tooltip": [513],
64
65
  "defaultValue": [520, "default-value"],
65
66
  "emitValue": [516, "emit-value"],
66
67
  "isDuplicateInput": [516, "is-duplicate-input"],
@@ -281,9 +281,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
281
281
  })
282
282
  .catch((err) => {
283
283
  console.error(err);
284
- })
285
- .finally(() => {
286
- this.isLoading = false;
284
+ // this.isLoading = false;
287
285
  });
288
286
  }
289
287
  setRegister() {
@@ -378,7 +376,7 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
378
376
  return listOfInputs.filter(input => input.isValid == false).length > 0;
379
377
  }
380
378
  renderInputs() {
381
- return (this.listOfInputs.map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling })));
379
+ return (this.listOfInputs.map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data ? input.data.values : [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip })));
382
380
  }
383
381
  ;
384
382
  renderButtons() {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { t as translate } from './locale.utils.js';
2
+ import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
 
4
- const numberInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:\"Roboto\";font-style:normal}.number__wrapper{position:relative;width:100%;padding-top:26px}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.number__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
4
+ const numberInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:\"Roboto\";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F}.number__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}";
5
5
 
6
6
  const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -15,6 +15,7 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
15
15
  */
16
16
  this.clientStyling = '';
17
17
  this.limitStylingAppends = false;
18
+ this.showTooltip = false;
18
19
  this.validationPattern = '';
19
20
  this.setClientStyling = () => {
20
21
  let sheet = document.createElement('style');
@@ -39,6 +40,12 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
39
40
  valueHandler(inputValueEvent) {
40
41
  this.sendInputValue.emit(inputValueEvent);
41
42
  }
43
+ handleClickOutside(event) {
44
+ if (event.composedPath()[0] === this.tooltipIconReference)
45
+ return;
46
+ if (event.composedPath()[0] !== this.tooltipReference)
47
+ this.showTooltip = false;
48
+ }
42
49
  connectedCallback() {
43
50
  this.validationPattern = this.setPattern();
44
51
  }
@@ -83,9 +90,16 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
83
90
  return translate('requiredError', this.language);
84
91
  }
85
92
  }
93
+ renderTooltip() {
94
+ if (this.showTooltip) {
95
+ return (h("div", { class: `number__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
96
+ }
97
+ return null;
98
+ }
86
99
  render() {
87
100
  const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'number__input--invalid';
88
- return h("div", { class: 'number__wrapper', ref: el => this.stylingContainer = el }, h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${invalidClass}`, pattern: this.validationPattern, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onBlur: (e) => this.handleInput(e) }), h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'number__error-message' }, this.errorMessage));
101
+ return h("div", { class: 'number__wrapper', ref: el => this.stylingContainer = el }, h("div", { class: 'number__wrapper--flex' }, h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'number__wrapper--relative' }, this.tooltip &&
102
+ h("img", { class: 'number__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${invalidClass}`, pattern: this.validationPattern, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'number__error-message' }, this.errorMessage));
89
103
  }
90
104
  static get watchers() { return {
91
105
  "isValid": ["validityChanged"],
@@ -98,13 +112,15 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
98
112
  "validation": [16],
99
113
  "defaultValue": [513, "default-value"],
100
114
  "autofilled": [516],
115
+ "tooltip": [513],
101
116
  "language": [513],
102
117
  "emitValue": [516, "emit-value"],
103
118
  "clientStyling": [513, "client-styling"],
104
119
  "errorMessage": [32],
105
120
  "isValid": [32],
106
- "limitStylingAppends": [32]
107
- }]);
121
+ "limitStylingAppends": [32],
122
+ "showTooltip": [32]
123
+ }, [[4, "click", "handleClickOutside"]]]);
108
124
  function defineCustomElement() {
109
125
  if (typeof customElements === "undefined") {
110
126
  return;
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { t as translate } from './locale.utils.js';
2
+ import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
  import { r as registerStyles, a as inputFieldShared, j as InputControlMixin, h as html, k as InputController, L as LabelledInputController, n as TooltipController, o as inputFieldShared$1, T as ThemableMixin, p as ElementMixin, P as PolymerElement, i, S as SlotController } from './input-field-shared-styles.js';
4
4
  import { P as PatternMixin } from './pattern-mixin.js';
5
5
  import { b as button, B as Button } from './vaadin-button.js';
@@ -718,7 +718,7 @@ class PasswordField extends TextField {
718
718
 
719
719
  customElements.define(PasswordField.is, PasswordField);
720
720
 
721
- const passwordInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:\"Roboto\";font-style:normal}.password__wrapper{position:relative;width:100%;padding-top:26px}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.password__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:#3E3E3E}.password__input[invalid]::part(input-field){border-color:#cc0000b3}.password__input::part(input-field){border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;width:100%;position:relative;border:2px solid #DEE1EE}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
721
+ const passwordInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:\"Roboto\";font-style:normal}.password__wrapper{position:relative;width:100%}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F}.password__label--required::after{content:\"*\";font-family:inherit;color:#1F1F1F;margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:#3E3E3E}.password__input[invalid]::part(input-field){border-color:#cc0000b3}.password__input::part(input-field){border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;width:100%;position:relative;border:2px solid #DEE1EE}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}";
722
722
 
723
723
  const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
724
724
  constructor() {
@@ -736,6 +736,7 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
736
736
  */
737
737
  this.clientStyling = '';
738
738
  this.limitStylingAppends = false;
739
+ this.showTooltip = false;
739
740
  this.value = '';
740
741
  this.validationPattern = '';
741
742
  this.setClientStyling = () => {
@@ -768,6 +769,12 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
768
769
  }
769
770
  }
770
771
  }
772
+ handleClickOutside(event) {
773
+ if (event.composedPath()[0] === this.tooltipIconReference)
774
+ return;
775
+ if (event.composedPath()[0] !== this.tooltipReference)
776
+ this.showTooltip = false;
777
+ }
771
778
  connectedCallback() {
772
779
  this.validationPattern = this.setPattern();
773
780
  }
@@ -818,11 +825,18 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
818
825
  return this.validation.custom.find(customRule => customRule.rule === 'duplicate-input').errorMessage;
819
826
  }
820
827
  }
828
+ renderTooltip() {
829
+ if (this.showTooltip) {
830
+ return (h("div", { class: `password__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
831
+ }
832
+ return null;
833
+ }
821
834
  render() {
822
835
  const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'password__input--invalid';
823
- return h("div", { class: 'password__wrapper', ref: el => this.stylingContainer = el }, h("vaadin-password-field", { type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue,
836
+ return h("div", { class: 'password__wrapper', ref: el => this.stylingContainer = el }, h("div", { class: 'password__wrapper--flex' }, h("label", { class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { class: 'password__wrapper--relative' }, this.tooltip &&
837
+ h("img", { class: 'password__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("vaadin-password-field", { type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue,
824
838
  // ref={(el) => this.inputReference = el as HTMLInputElement}
825
- required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, onBlur: (e) => this.handleInput(e) }), h("label", { class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'password__error-message' }, this.errorMessage));
839
+ required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, onBlur: (e) => this.handleInput(e) }), h("small", { class: 'password__error-message' }, this.errorMessage));
826
840
  }
827
841
  get element() { return this; }
828
842
  static get watchers() { return {
@@ -835,6 +849,7 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
835
849
  "displayName": [513, "display-name"],
836
850
  "defaultValue": [513, "default-value"],
837
851
  "autofilled": [516],
852
+ "tooltip": [513],
838
853
  "validation": [16],
839
854
  "language": [513],
840
855
  "emitValue": [516, "emit-value"],
@@ -842,8 +857,9 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
842
857
  "clientStyling": [513, "client-styling"],
843
858
  "isValid": [32],
844
859
  "errorMessage": [32],
845
- "limitStylingAppends": [32]
846
- }, [[16, "sendInputValue", "valueChangedHandler"]]]);
860
+ "limitStylingAppends": [32],
861
+ "showTooltip": [32]
862
+ }, [[16, "sendInputValue", "valueChangedHandler"], [4, "click", "handleClickOutside"]]]);
847
863
  function defineCustomElement() {
848
864
  if (typeof customElements === "undefined") {
849
865
  return;
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { t as translate } from './locale.utils.js';
2
+ import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
3
3
 
4
- const radioInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}";
4
+ const radioInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";
5
5
 
6
6
  const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -15,6 +15,7 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
15
15
  */
16
16
  this.clientStyling = '';
17
17
  this.limitStylingAppends = false;
18
+ this.showTooltip = false;
18
19
  this.setClientStyling = () => {
19
20
  let sheet = document.createElement('style');
20
21
  sheet.innerHTML = this.clientStyling;
@@ -38,6 +39,12 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
38
39
  validityStateHandler(inputStateEvent) {
39
40
  this.sendValidityState.emit(inputStateEvent);
40
41
  }
42
+ handleClickOutside(event) {
43
+ if (event.composedPath()[0] === this.tooltipIconReference)
44
+ return;
45
+ if (event.composedPath()[0] !== this.tooltipReference)
46
+ this.showTooltip = false;
47
+ }
41
48
  componentDidRender() {
42
49
  // start custom styling area
43
50
  if (!this.limitStylingAppends && this.stylingContainer) {
@@ -62,8 +69,15 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
62
69
  return translate('requiredError', this.language);
63
70
  }
64
71
  }
72
+ renderTooltip() {
73
+ if (this.showTooltip) {
74
+ return (h("div", { class: `radio__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
75
+ }
76
+ return null;
77
+ }
65
78
  render() {
66
- return h("fieldset", { class: 'radio__fieldset', ref: el => this.stylingContainer = el }, h("legend", { class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h("div", { class: 'radio__wrapper' }, h("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), h("label", { htmlFor: `${option.label}__input` }, option.label))), h("small", { class: 'radio__error-message' }, this.errorMessage));
79
+ return h("fieldset", { class: 'radio__fieldset', ref: el => this.stylingContainer = el }, h("legend", { class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h("div", { class: 'radio__wrapper' }, h("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), h("label", { htmlFor: `${option.label}__input` }, option.label))), h("small", { class: 'radio__error-message' }, this.errorMessage), this.tooltip &&
80
+ h("img", { class: 'radio__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
67
81
  }
68
82
  static get watchers() { return {
69
83
  "isValid": ["validityChanged"],
@@ -75,13 +89,15 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
75
89
  "displayName": [513, "display-name"],
76
90
  "optionsGroup": [16],
77
91
  "validation": [16],
92
+ "tooltip": [513],
78
93
  "language": [513],
79
94
  "emitValue": [516, "emit-value"],
80
95
  "clientStyling": [513, "client-styling"],
81
96
  "errorMessage": [32],
82
97
  "isValid": [32],
83
- "limitStylingAppends": [32]
84
- }]);
98
+ "limitStylingAppends": [32],
99
+ "showTooltip": [32]
100
+ }, [[4, "click", "handleClickOutside"]]]);
85
101
  function defineCustomElement() {
86
102
  if (typeof customElements === "undefined") {
87
103
  return;