@everymatrix/general-input-hsl 0.2.3 → 0.2.5

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.
Files changed (23) hide show
  1. package/dist/cjs/checkbox-group-input_13.cjs.entry.js +6 -4
  2. package/dist/cjs/general-input-hsl-fd627b3d.js +8131 -0
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/collection/components/date-input/date-input.js +5 -3
  5. package/dist/collection/utils/locale.utils.js +3 -1
  6. package/dist/esm/checkbox-group-input_13.entry.js +7 -5
  7. package/dist/esm/general-input-hsl-94db3149.js +8128 -0
  8. package/dist/esm/index.js +1 -1
  9. package/dist/general-input-hsl/checkbox-group-input_13.entry.js +1 -1
  10. package/dist/general-input-hsl/{general-input-hsl-1c14ae9b.js → general-input-hsl-94db3149.js} +2369 -440
  11. package/dist/general-input-hsl/index.esm.js +1 -1
  12. package/package.json +1 -1
  13. package/dist/cjs/general-input-hsl-a20b01f4.js +0 -6222
  14. package/dist/esm/general-input-hsl-1c14ae9b.js +0 -6219
  15. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  16. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/stencil.config.d.ts +0 -0
  17. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/stencil.config.dev.d.ts +0 -0
  18. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/storybook/main.d.ts +0 -0
  19. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/storybook/preview.d.ts +0 -0
  20. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/index.d.ts +0 -0
  21. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  22. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  23. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const generalInputHsl = require('./general-input-hsl-a20b01f4.js');
5
+ const generalInputHsl = require('./general-input-hsl-fd627b3d.js');
6
6
  require('./index-160616a9.js');
7
7
 
8
8
 
@@ -147,7 +147,9 @@ export class DateInput {
147
147
  return translate('dateError2', this.language);
148
148
  }
149
149
  if (!isMatch(this.formattedValue, this.dateFormat)) {
150
- return translate('dateFormatError', this.language);
150
+ const screenSize = window.screen.width;
151
+ const isShowingKeyboard = screenSize > 450 && screenSize <= 550;
152
+ return `${translate('dateFormatError', this.language)} ${isShowingKeyboard ? `(${translate('forExample', this.language)} ${this.placeholder})` : ''}`;
151
153
  }
152
154
  }
153
155
  renderTooltip() {
@@ -161,8 +163,8 @@ export class DateInput {
161
163
  if (this.touched) {
162
164
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
163
165
  }
164
- return h("div", { key: 'f2a2e6f7adf273e07934af51763f900f9051e5b1', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '70b360618031d48816fedf22d55119af01514de1', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: 'c463d260a39cde5ccb98dde604d74cdb8ebde287', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e) }), h("small", { key: 'cb7fb9acafcedfa80321f5f1d16b705ad00d8bdd', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
165
- h("img", { key: '535e3a1875cd328c3dd5627672afdc4fd32b078c', class: 'date__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
166
+ return h("div", { key: '301d146ebbab317532abcc4a6c89ee39701d209f', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '7d54ab1dd228b629b23c5a58aa9a8289c16f5da9', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: '47883cdb6b3391d39fb4e3dddeb2eb499ccd5f0f', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e) }), h("small", { key: '6f30b5737c42f11875ae834d2ef973c9bc6f6dd7', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
167
+ h("img", { key: 'a0de5106dbfbb2f799963cfd5aa6692ae8f68532', class: 'date__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
166
168
  }
167
169
  static get is() { return "date-input"; }
168
170
  static get encapsulation() { return "shadow"; }
@@ -25,6 +25,7 @@ export const TRANSLATIONS = {
25
25
  "twofaDescription": "<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",
26
26
  "twofaResendMessage": "Didn't receive the verification code?",
27
27
  "twofaResendButton": "Resend",
28
+ "forExample": 'e.g.'
28
29
  },
29
30
  "hu": {
30
31
  "dateError": "A választott dátumnak {min} és {max} között kell lennie",
@@ -50,7 +51,8 @@ export const TRANSLATIONS = {
50
51
  "InvalidDocumentNumber": "Csak számjegyek engedélyezettek.",
51
52
  "twofaDescription": "<p> A megerősítő kódot elküldtük a következő címre: <p> {destination}. </p> </p> <p> Kérjük, írja be az alábbi PIN-kódot. </p>",
52
53
  "twofaResendMessage": "Nem kapta meg a megerősítő kódot?",
53
- "twofaResendButton": "Újraküldés"
54
+ "twofaResendButton": "Újraküldés",
55
+ "forExample": 'pl.'
54
56
  }
55
57
  };
56
58
  export const translate = (key, customLang, values) => {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-b001401f.js';
2
- import { t as translate } from './general-input-hsl-1c14ae9b.js';
3
- export { G as general_input_hsl } from './general-input-hsl-1c14ae9b.js';
2
+ import { t as translate } from './general-input-hsl-94db3149.js';
3
+ export { G as general_input_hsl } from './general-input-hsl-94db3149.js';
4
4
 
5
5
  const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
6
6
 
@@ -5750,7 +5750,9 @@ const DateInput = class {
5750
5750
  return translate('dateError2', this.language);
5751
5751
  }
5752
5752
  if (!isMatch(this.formattedValue, this.dateFormat)) {
5753
- return translate('dateFormatError', this.language);
5753
+ const screenSize = window.screen.width;
5754
+ const isShowingKeyboard = screenSize > 450 && screenSize <= 550;
5755
+ return `${translate('dateFormatError', this.language)} ${isShowingKeyboard ? `(${translate('forExample', this.language)} ${this.placeholder})` : ''}`;
5754
5756
  }
5755
5757
  }
5756
5758
  renderTooltip() {
@@ -5764,8 +5766,8 @@ const DateInput = class {
5764
5766
  if (this.touched) {
5765
5767
  invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
5766
5768
  }
5767
- return h("div", { key: 'f2a2e6f7adf273e07934af51763f900f9051e5b1', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '70b360618031d48816fedf22d55119af01514de1', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: 'c463d260a39cde5ccb98dde604d74cdb8ebde287', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e) }), h("small", { key: 'cb7fb9acafcedfa80321f5f1d16b705ad00d8bdd', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
5768
- h("img", { key: '535e3a1875cd328c3dd5627672afdc4fd32b078c', class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
5769
+ return h("div", { key: '301d146ebbab317532abcc4a6c89ee39701d209f', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '7d54ab1dd228b629b23c5a58aa9a8289c16f5da9', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: '47883cdb6b3391d39fb4e3dddeb2eb499ccd5f0f', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e) }), h("small", { key: '6f30b5737c42f11875ae834d2ef973c9bc6f6dd7', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
5770
+ h("img", { key: 'a0de5106dbfbb2f799963cfd5aa6692ae8f68532', class: 'date__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
5769
5771
  }
5770
5772
  get element() { return getElement(this); }
5771
5773
  static get watchers() { return {