@ds-autonomie/web-components 1.3.0 → 1.4.0

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 (81) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/chunks/{chunk.J2XNYTTZ.js → chunk.3GJ3KGGY.js} +2 -18
  3. package/dist/chunks/{chunk.YHOA7MQN.js → chunk.4TRQBTMY.js} +67 -56
  4. package/dist/chunks/{chunk.SQMWMSBA.js → chunk.7OLEA3GQ.js} +33 -3
  5. package/dist/chunks/{chunk.UPYCV66H.js → chunk.A3UKO7AU.js} +1 -1
  6. package/dist/chunks/{chunk.QDZXNGR6.js → chunk.BL4IZFBA.js} +1 -1
  7. package/dist/chunks/{chunk.EM4JONLW.js → chunk.C7CCBBLF.js} +1 -1
  8. package/dist/chunks/{chunk.JJLAOWR2.js → chunk.GY5KJYSY.js} +1 -1
  9. package/dist/chunks/chunk.H2JSXKGD.js +83 -0
  10. package/dist/chunks/{chunk.ZKYSHEVZ.js → chunk.IER4ZBFV.js} +3 -1
  11. package/dist/chunks/{chunk.YEVEBKAC.js → chunk.IV2XMACC.js} +60 -58
  12. package/dist/chunks/{chunk.J6XP4AFN.js → chunk.N7ZCXHGU.js} +1 -1
  13. package/dist/chunks/{chunk.WFJLQFI3.js → chunk.O4XPNLT4.js} +2 -0
  14. package/dist/chunks/chunk.RCSAV4XJ.js +99 -0
  15. package/dist/chunks/{chunk.FN42VBEO.js → chunk.TSK67ZZE.js} +5 -5
  16. package/dist/chunks/{chunk.DRGGQ4WL.js → chunk.UCJGKOXX.js} +1 -0
  17. package/dist/components/accordion/accordion.js +3 -3
  18. package/dist/components/alert/alert.js +5 -5
  19. package/dist/components/anchor-tag/anchor-tag.d.ts +42 -0
  20. package/dist/components/anchor-tag/anchor-tag.js +11 -0
  21. package/dist/components/anchor-tag/anchor-tag.styles.d.ts +2 -0
  22. package/dist/components/anchor-tag/anchor-tag.styles.js +8 -0
  23. package/dist/components/animation/animation.js +2 -2
  24. package/dist/components/avatar/avatar.js +5 -5
  25. package/dist/components/breadcrumb/breadcrumb.js +3 -3
  26. package/dist/components/button/button.js +6 -6
  27. package/dist/components/button/button.styles.js +1 -1
  28. package/dist/components/checkbox/checkbox.js +7 -7
  29. package/dist/components/checkbox-button/checkbox-button.js +6 -6
  30. package/dist/components/checkbox-button/checkbox-button.styles.js +2 -2
  31. package/dist/components/checkbox-group/checkbox-group.js +2 -2
  32. package/dist/components/combobox/combobox.js +8 -8
  33. package/dist/components/combobox/combobox.styles.js +1 -1
  34. package/dist/components/dialog/dialog.js +6 -6
  35. package/dist/components/drawer/drawer.js +6 -6
  36. package/dist/components/icon/icon.js +3 -3
  37. package/dist/components/icon-button/icon-button.js +4 -4
  38. package/dist/components/input/input.js +7 -7
  39. package/dist/components/input-mask/input-mask.configs.d.ts +1 -0
  40. package/dist/components/input-mask/input-mask.configs.js +1 -1
  41. package/dist/components/input-mask/input-mask.d.ts +30 -6
  42. package/dist/components/input-mask/input-mask.js +4 -4
  43. package/dist/components/input-mask/input-mask.utils.d.ts +7 -1
  44. package/dist/components/input-mask/input-mask.utils.js +7 -3
  45. package/dist/components/input-phone/input-phone.configs.d.ts +1 -0
  46. package/dist/components/input-phone/input-phone.configs.js +1 -1
  47. package/dist/components/input-phone/input-phone.d.ts +3 -3
  48. package/dist/components/input-phone/input-phone.js +13 -13
  49. package/dist/components/menu-item/menu-item.js +3 -3
  50. package/dist/components/option/option.js +3 -3
  51. package/dist/components/progress-bar/progress-bar.js +2 -2
  52. package/dist/components/radio/radio.js +3 -3
  53. package/dist/components/radio-button/radio-button.js +3 -3
  54. package/dist/components/radio-button/radio-button.styles.js +2 -2
  55. package/dist/components/radio-group/radio-group.js +1 -1
  56. package/dist/components/select/select.js +7 -7
  57. package/dist/components/step/step.js +3 -3
  58. package/dist/components/tag/tag.js +5 -5
  59. package/dist/components/textarea/textarea.js +3 -3
  60. package/dist/components/tree/tree.js +7 -7
  61. package/dist/components/tree-item/tree-item.js +7 -7
  62. package/dist/custom-elements.json +343 -71
  63. package/dist/design-system.d.ts +1 -0
  64. package/dist/design-system.js +87 -82
  65. package/dist/themes/dsa-wc-theme.css +2 -0
  66. package/dist/themes/dsa-wc-theme.min.css +1 -1
  67. package/dist/themes/dsa-wc-theme.styles.js +2 -0
  68. package/dist/vscode.html-custom-data.json +68 -11
  69. package/dist/web-types.json +200 -39
  70. package/package.json +1 -1
  71. package/dist/chunks/{chunk.3Y4CKW7H.js → chunk.3Y56GJS7.js} +6 -6
  72. package/dist/chunks/{chunk.XYHFMIYJ.js → chunk.5ND4OP7Q.js} +3 -3
  73. package/dist/chunks/{chunk.ZW4JE66G.js → chunk.AO3M5GSN.js} +3 -3
  74. package/dist/chunks/{chunk.Y3VP37FX.js → chunk.D2QVNPSR.js} +6 -6
  75. package/dist/chunks/{chunk.JKHFW3KV.js → chunk.DXP3BNWO.js} +3 -3
  76. package/dist/chunks/{chunk.GP5Z27QB.js → chunk.F6FCZQ67.js} +5 -5
  77. package/dist/chunks/{chunk.EDRQ2QWB.js → chunk.N3ADQCT7.js} +3 -3
  78. package/dist/chunks/{chunk.KAQ2HMPU.js → chunk.PCT24AYO.js} +3 -3
  79. package/dist/chunks/{chunk.2R6P5TGQ.js → chunk.PEAFJZ6C.js} +3 -3
  80. package/dist/chunks/{chunk.WC7TOR3H.js → chunk.WF42CVOM.js} +6 -6
  81. package/dist/chunks/{chunk.76JEX27F.js → chunk.XCG5TV7T.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @ds-autonomie/web-components
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - be8eaf7: `input-phone`,`input-mask`: ajout d'un nouvel attribut 'mask' qui spécifie les caractères autorisés qui peuvent être présents à des positions spécifiques dans une séquence.
8
+ - 994505d: `input-mask`, `input-phone`: refactorisation de la validation des composants input-mask et input-phone
9
+
10
+ ### Patch Changes
11
+
12
+ - a885c7a: `combobox`: mise à jour graphique des tags sur le composant combobox
13
+ - 0d8788d: `tag`: documentation sur l'utilisation d'un lien avec le composant tag
14
+ - 0a16775: `button`: mise à jour du style en enlevant la bordure lorsque le composant button a pour variant 'tertiary'
15
+
3
16
  ## 1.3.0
4
17
 
5
18
  ### Minor Changes
@@ -245,27 +245,23 @@ var button_styles_default = css`
245
245
  /* Tertiary/On Base */
246
246
  .button--on-base.button--tertiary {
247
247
  background-color: var(--dsa-wc-button-tertiary-on-base-color);
248
- border-color: var(--dsa-wc-button-tertiary-on-base-font-color);
248
+ border: none;
249
249
  color: var(--dsa-wc-button-tertiary-on-base-font-color);
250
250
  }
251
251
  .button--on-base.button--tertiary:hover:not(.button--disabled) {
252
252
  background-color: var(--dsa-wc-button-tertiary-on-base-hover-color);
253
- border-color: var(--dsa-wc-button-tertiary-on-base-hover-font-color);
254
253
  color: var(--dsa-wc-button-tertiary-on-base-hover-font-color);
255
254
  }
256
255
  .button--on-base.button--tertiary:active:not(.button--disabled) {
257
256
  background-color: var(--dsa-wc-button-tertiary-on-base-active-color);
258
- border-color: var(--dsa-wc-button-tertiary-on-base-active-font-color);
259
257
  color: var(--dsa-wc-button-tertiary-on-base-active-font-color);
260
258
  }
261
259
  .button--on-base.button--tertiary.button--disabled {
262
260
  background-color: var(--dsa-wc-button-tertiary-on-base-disabled-color);
263
- border-color: var(--dsa-wc-button-tertiary-on-base-disabled-font-color);
264
261
  color: var(--dsa-wc-button-tertiary-on-base-disabled-font-color);
265
262
  }
266
263
  .button--on-base.button--tertiary.button--loading {
267
264
  background-color: var(--dsa-wc-button-tertiary-on-base-loading-color);
268
- border-color: var(--dsa-wc-button-tertiary-on-base-loading-font-color);
269
265
  color: var(--dsa-wc-button-tertiary-on-base-loading-font-color);
270
266
  }
271
267
  .button--on-base.button--tertiary.button--loading dsa-spinner {
@@ -279,43 +275,31 @@ var button_styles_default = css`
279
275
  /* Tertiary/On Floating Menu */
280
276
  .button--on-floating-menu.button--tertiary {
281
277
  background-color: var(--dsa-wc-button-tertiary-on-floating-menu-color);
282
- border-color: var(--dsa-wc-button-tertiary-on-floating-menu-font-color);
278
+ border: none;
283
279
  color: var(--dsa-wc-button-tertiary-on-floating-menu-font-color);
284
280
  }
285
281
  .button--on-floating-menu.button--tertiary:hover:not(.button--disabled) {
286
282
  background-color: var(
287
283
  --dsa-wc-button-tertiary-on-floating-menu-hover-color
288
284
  );
289
- border-color: var(
290
- --dsa-wc-button-tertiary-on-floating-menu-hover-font-color
291
- );
292
285
  color: var(--dsa-wc-button-tertiary-on-floating-menu-hover-font-color);
293
286
  }
294
287
  .button--on-floating-menu.button--tertiary:active:not(.button--disabled) {
295
288
  background-color: var(
296
289
  --dsa-wc-button-tertiary-on-floating-menu-active-color
297
290
  );
298
- border-color: var(
299
- --dsa-wc-button-tertiary-on-floating-menu-active-font-color
300
- );
301
291
  color: var(--dsa-wc-button-tertiary-on-floating-menu-active-font-color);
302
292
  }
303
293
  .button--on-floating-menu.button--tertiary.button--disabled {
304
294
  background-color: var(
305
295
  --dsa-wc-button-tertiary-on-floating-menu-disabled-color
306
296
  );
307
- border-color: var(
308
- --dsa-wc-button-tertiary-on-floating-menu-disabled-font-color
309
- );
310
297
  color: var(--dsa-wc-button-tertiary-on-floating-menu-disabled-font-color);
311
298
  }
312
299
  .button--on-floating-menu.button--tertiary.button--loading {
313
300
  background-color: var(
314
301
  --dsa-wc-button-tertiary-on-floating-menu-loading-color
315
302
  );
316
- border-color: var(
317
- --dsa-wc-button-tertiary-on-floating-menu-loading-font-color
318
- );
319
303
  color: var(--dsa-wc-button-tertiary-on-floating-menu-loading-font-color);
320
304
  }
321
305
  .button--on-floating-menu.button--tertiary.button--loading dsa-spinner {
@@ -2,9 +2,10 @@ import {
2
2
  input_mask_styles_default
3
3
  } from "./chunk.2HV2U4RQ.js";
4
4
  import {
5
- getMaskedValue,
5
+ maskedValueToRawValue,
6
+ rawValueToMaskedValue,
6
7
  stripSpecialChars
7
- } from "./chunk.SQMWMSBA.js";
8
+ } from "./chunk.7OLEA3GQ.js";
8
9
  import {
9
10
  defaultValue
10
11
  } from "./chunk.CMJ2SRTL.js";
@@ -14,15 +15,15 @@ import {
14
15
  import {
15
16
  HasSlotController
16
17
  } from "./chunk.YIY5RM53.js";
17
- import {
18
- ifDefinedAndNotEmpty
19
- } from "./chunk.ZQJVCRB2.js";
20
18
  import {
21
19
  LocalizeController
22
20
  } from "./chunk.7BYKP4SA.js";
23
21
  import {
24
22
  watch
25
23
  } from "./chunk.6IH66JBY.js";
24
+ import {
25
+ ifDefinedAndNotEmpty
26
+ } from "./chunk.ZQJVCRB2.js";
26
27
  import {
27
28
  ShoelaceElement
28
29
  } from "./chunk.YCXTCVAZ.js";
@@ -50,6 +51,7 @@ var DSAInputMask = class extends ShoelaceElement {
50
51
  );
51
52
  this.localize = new LocalizeController(this);
52
53
  this.hasFocus = false;
54
+ this.maskedValue = "";
53
55
  this.title = "";
54
56
  this.name = "";
55
57
  this.value = "";
@@ -62,38 +64,35 @@ var DSAInputMask = class extends ShoelaceElement {
62
64
  this.disabled = false;
63
65
  this.placeholder = "";
64
66
  this.readonly = false;
65
- this.validate = false;
66
67
  this.error = false;
67
68
  this.errorMessage = "";
68
69
  this.form = "";
69
70
  this.required = false;
71
+ this.pattern = "";
72
+ this.mask = "";
70
73
  }
71
74
  /** Gets the validity state object */
72
75
  get validity() {
73
- if (this.validate) {
74
- if (this.value.length > 0) {
75
- const strippedValue = stripSpecialChars(this.value);
76
- const matches = strippedValue.match(this.pattern);
77
- this.error = matches === null;
78
- } else {
79
- this.error = false;
80
- }
81
- const validityState = {
82
- badInput: false,
83
- customError: false,
84
- patternMismatch: this.error,
85
- rangeOverflow: false,
86
- rangeUnderflow: false,
87
- stepMismatch: false,
88
- tooLong: false,
89
- tooShort: false,
90
- typeMismatch: false,
91
- valid: !this.error,
92
- valueMissing: false
93
- };
94
- return validityState;
76
+ let patternMatch = void 0;
77
+ if (this.value.length > 0 && this.pattern.length > 0) {
78
+ const strippedValue = stripSpecialChars(this.value);
79
+ const matches = strippedValue.match(this.pattern);
80
+ patternMatch = matches !== null;
95
81
  }
96
- return this.input.validity;
82
+ const validityState = {
83
+ badInput: this.input.validity.badInput,
84
+ customError: this.input.validity.customError,
85
+ patternMismatch: !patternMatch,
86
+ rangeOverflow: this.input.validity.rangeOverflow,
87
+ rangeUnderflow: this.input.validity.rangeUnderflow,
88
+ stepMismatch: this.input.validity.stepMismatch,
89
+ tooLong: this.input.validity.tooLong,
90
+ tooShort: this.input.validity.tooShort,
91
+ typeMismatch: this.input.validity.typeMismatch,
92
+ valid: patternMatch !== void 0 ? patternMatch : this.input.validity.valid,
93
+ valueMissing: this.input.validity.valueMissing
94
+ };
95
+ return validityState;
97
96
  }
98
97
  /** Gets the validation message */
99
98
  get validationMessage() {
@@ -102,17 +101,34 @@ var DSAInputMask = class extends ShoelaceElement {
102
101
  firstUpdated() {
103
102
  this.formControlController.updateValidity();
104
103
  }
104
+ connectedCallback() {
105
+ super.connectedCallback();
106
+ if (this.mask.length > 0 && this.mask.length !== this.placeholder.length) {
107
+ console.warn(
108
+ "For correct usage: add `mask` attribute. It should have the same format than the placeholder."
109
+ );
110
+ }
111
+ this.maskedValue = this.rawValueToMaskedValue(this.value);
112
+ }
113
+ handleDocumentKeyUp() {
114
+ const strippedValue = stripSpecialChars(this.input.value);
115
+ const newValue = maskedValueToRawValue(
116
+ strippedValue,
117
+ this.mask.length > 0 ? this.mask : this.placeholder
118
+ );
119
+ const maskedValue = this.rawValueToMaskedValue(newValue);
120
+ this.value = newValue;
121
+ this.maskedValue = maskedValue;
122
+ this.input.value = maskedValue;
123
+ this.formControlController.updateValidity();
124
+ this.emit("dsa-input");
125
+ }
105
126
  handleBlur() {
106
127
  this.hasFocus = false;
107
128
  this.emit("dsa-blur");
108
129
  }
109
- handleChange() {
110
- const strippedValue = stripSpecialChars(this.input.value);
111
- this.value = strippedValue;
112
- this.emit("dsa-change");
113
- }
114
- getMaskedValue(inputValue) {
115
- return getMaskedValue(inputValue, this.placeholder);
130
+ rawValueToMaskedValue(inputValue) {
131
+ return rawValueToMaskedValue(inputValue, this.placeholder);
116
132
  }
117
133
  handleClearClick(event) {
118
134
  this.value = "";
@@ -126,11 +142,9 @@ var DSAInputMask = class extends ShoelaceElement {
126
142
  this.hasFocus = true;
127
143
  this.emit("dsa-focus");
128
144
  }
129
- handleInput() {
130
- const strippedValue = stripSpecialChars(this.input.value);
131
- this.value = strippedValue;
132
- this.formControlController.updateValidity();
133
- this.emit("dsa-input");
145
+ handleChange() {
146
+ this.value = this.input.value;
147
+ this.emit("dsa-change");
134
148
  }
135
149
  handleInvalid(event) {
136
150
  this.formControlController.setValidity(false);
@@ -201,11 +215,7 @@ var DSAInputMask = class extends ShoelaceElement {
201
215
  }
202
216
  /** Sets a custom validation message. Pass an empty string to restore validity. */
203
217
  setCustomValidity(message) {
204
- if (this.validate) {
205
- this.input.setCustomValidity(this.error ? this.errorMessage : "");
206
- } else {
207
- this.input.setCustomValidity(message);
208
- }
218
+ this.input.setCustomValidity(message);
209
219
  this.formControlController.updateValidity();
210
220
  }
211
221
  render() {
@@ -215,8 +225,7 @@ var DSAInputMask = class extends ShoelaceElement {
215
225
  const hasLabel = this.label ? true : !!hasLabelSlot;
216
226
  const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
217
227
  const hasClearIcon = this.clearable && !this.disabled && !this.readonly && (typeof this.value === "number" || this.value.length > 0);
218
- const maskedValue = this.getMaskedValue(this.value);
219
- const placeholder = this.placeholder.substring(maskedValue.length);
228
+ const placeholder = this.placeholder.substring(this.maskedValue.length);
220
229
  return html`
221
230
  <div
222
231
  part="form-control"
@@ -268,7 +277,7 @@ var DSAInputMask = class extends ShoelaceElement {
268
277
  "input-mask__placeholder": true
269
278
  })} aria-placeholder=${placeholder} aria-hidden="true"
270
279
  >
271
- <span class="input-mask__value" aria-hidden="true">${maskedValue}</span>
280
+ <span class="input-mask__value" aria-hidden="true">${this.maskedValue}</span>
272
281
  ${placeholder}</div
273
282
  >
274
283
 
@@ -288,9 +297,8 @@ var DSAInputMask = class extends ShoelaceElement {
288
297
  minlength=${ifDefined(this.minlength)}
289
298
  maxlength=${ifDefined(this.placeholder.length)}
290
299
  size=${ifDefined(this.placeholder.length)}
291
- pattern=${ifDefined(this.pattern)}
292
300
  placeholder=${ifDefined(this.placeholder)}
293
- .value=${live(maskedValue)}
301
+ .value=${live(this.maskedValue)}
294
302
  autocomplete=${ifDefined(this.autocomplete)}
295
303
  autocorrect=${ifDefined(this.autocorrect)}
296
304
  ?autofocus=${this.autofocus}
@@ -302,8 +310,8 @@ var DSAInputMask = class extends ShoelaceElement {
302
310
  )}
303
311
  aria-describedby=${this.error ? "input-mask error-text help-text" : "input-mask help-text"}
304
312
  @change=${this.handleChange}
305
- @input=${this.handleInput}
306
313
  @invalid=${this.handleInvalid}
314
+ @keyup=${this.handleDocumentKeyUp}
307
315
  @keydown=${this.handleKeyDown}
308
316
  @focus=${this.handleFocus}
309
317
  @blur=${this.handleBlur}
@@ -355,6 +363,9 @@ __decorateClass([
355
363
  __decorateClass([
356
364
  state()
357
365
  ], DSAInputMask.prototype, "hasFocus", 2);
366
+ __decorateClass([
367
+ state()
368
+ ], DSAInputMask.prototype, "maskedValue", 2);
358
369
  __decorateClass([
359
370
  property()
360
371
  ], DSAInputMask.prototype, "title", 2);
@@ -392,10 +403,7 @@ __decorateClass([
392
403
  property({ type: Boolean, reflect: true })
393
404
  ], DSAInputMask.prototype, "readonly", 2);
394
405
  __decorateClass([
395
- property({ type: Boolean, reflect: true })
396
- ], DSAInputMask.prototype, "validate", 2);
397
- __decorateClass([
398
- property({ type: Boolean, reflect: true })
406
+ property({ type: Boolean })
399
407
  ], DSAInputMask.prototype, "error", 2);
400
408
  __decorateClass([
401
409
  property({ attribute: "error-message" })
@@ -427,6 +435,9 @@ __decorateClass([
427
435
  __decorateClass([
428
436
  property()
429
437
  ], DSAInputMask.prototype, "enterkeyhint", 2);
438
+ __decorateClass([
439
+ property({ reflect: true })
440
+ ], DSAInputMask.prototype, "mask", 2);
430
441
  __decorateClass([
431
442
  watch("disabled", { waitUntilFirstUpdate: true })
432
443
  ], DSAInputMask.prototype, "handleDisabledChange", 1);
@@ -1,13 +1,21 @@
1
1
  // src/components/input-mask/input-mask.utils.ts
2
- var specialCharPattern = /[\W]+/g;
2
+ var specialCharPattern = /[^a-zA-Z0-9#?_]+/g;
3
3
  var normalCharPattern = /^[_A-z0-9]*((-)*[_A-z0-9])*$/;
4
+ var maskOptions = {
5
+ allChar: "_",
6
+ numericChar: "#dDmMyYaA09",
7
+ alphaChar: "?LaA"
8
+ };
9
+ function keepMaskChars(word) {
10
+ return word.replace(/[^_#dDmMyYaA09?L]+/g, "");
11
+ }
4
12
  function stripSpecialChars(word) {
5
13
  return word.replace(specialCharPattern, "");
6
14
  }
7
15
  function isSpecialChar(word) {
8
16
  return word.match(specialCharPattern) !== null;
9
17
  }
10
- function getMaskedValue(rawValue, mask) {
18
+ function rawValueToMaskedValue(rawValue, mask) {
11
19
  const explodedValue = [...rawValue];
12
20
  const explodedMask = [...mask];
13
21
  let valueIndex = 0;
@@ -30,6 +38,26 @@ function getMaskedValue(rawValue, mask) {
30
38
  });
31
39
  return maskedValue;
32
40
  }
41
+ var BASE_RADIX = 10;
42
+ function maskedValueToRawValue(value, mask) {
43
+ let rawValue = "";
44
+ const maskControl = keepMaskChars(mask);
45
+ for (let maskIndex = 0, valueIndex = 0; maskIndex < maskControl.length; ++maskIndex) {
46
+ if (value[valueIndex] === void 0) {
47
+ return rawValue;
48
+ }
49
+ const valueCharMatchesMaskAny = maskOptions.allChar.indexOf(maskControl[maskIndex]) >= 0;
50
+ const valueCharMatchesMaskNumber = isFinite(parseInt(value[valueIndex], BASE_RADIX)) && maskOptions.numericChar.indexOf(maskControl[maskIndex]) >= 0;
51
+ const valueCharMatchesMaskLetter = value[valueIndex].match(/[A-Z]/i) && maskOptions.alphaChar.indexOf(maskControl[maskIndex]) >= 0;
52
+ if (valueCharMatchesMaskAny || valueCharMatchesMaskLetter || valueCharMatchesMaskNumber) {
53
+ rawValue += value[valueIndex];
54
+ ++valueIndex;
55
+ } else {
56
+ break;
57
+ }
58
+ }
59
+ return rawValue;
60
+ }
33
61
  var IBANTestValues = [
34
62
  "AD1400080001001234567890",
35
63
  "AT483200000012345864",
@@ -199,8 +227,10 @@ var NIRTestValues = ["187089932132113"];
199
227
  export {
200
228
  specialCharPattern,
201
229
  normalCharPattern,
230
+ maskOptions,
202
231
  stripSpecialChars,
203
- getMaskedValue,
232
+ rawValueToMaskedValue,
233
+ maskedValueToRawValue,
204
234
  IBANTestValues,
205
235
  BICTestValues,
206
236
  NIRTestValues
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  button_styles_default
3
- } from "./chunk.J2XNYTTZ.js";
3
+ } from "./chunk.3GJ3KGGY.js";
4
4
 
5
5
  // src/components/checkbox-button/checkbox-button.styles.ts
6
6
  import { css } from "lit";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  radio_button_styles_default
3
- } from "./chunk.EM4JONLW.js";
3
+ } from "./chunk.C7CCBBLF.js";
4
4
  import {
5
5
  HasSlotController
6
6
  } from "./chunk.YIY5RM53.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  button_styles_default
3
- } from "./chunk.J2XNYTTZ.js";
3
+ } from "./chunk.3GJ3KGGY.js";
4
4
 
5
5
  // src/components/radio-button/radio-button.styles.ts
6
6
  import { css } from "lit";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk.CMJ2SRTL.js";
10
10
  import {
11
11
  combobox_styles_default
12
- } from "./chunk.WFJLQFI3.js";
12
+ } from "./chunk.O4XPNLT4.js";
13
13
  import {
14
14
  FormControlController
15
15
  } from "./chunk.KIFBWPW5.js";
@@ -0,0 +1,83 @@
1
+ import {
2
+ component_styles_default
3
+ } from "./chunk.TUVJKY7S.js";
4
+
5
+ // src/components/anchor-tag/anchor-tag.styles.ts
6
+ import { css } from "lit";
7
+ var anchor_tag_styles_default = css`
8
+ ${component_styles_default}
9
+
10
+ :host {
11
+ display: inline-block;
12
+ }
13
+
14
+ .anchor-tag {
15
+ display: flex;
16
+ align-items: center;
17
+ white-space: nowrap;
18
+ user-select: none;
19
+ border-radius: var(--dsa-wc-tag-border-radius);
20
+ text-decoration: none;
21
+ color: hsla(120, 1%, 27%, 1);
22
+ background: hsla(0, 0%, 85%, 1);
23
+ }
24
+
25
+ .anchor-tag:hover {
26
+ color: hsla(265, 90%, 39%, 1);
27
+ background: hsla(265, 69%, 94%, 1);
28
+ }
29
+
30
+ .anchor-tag:active {
31
+ color: hsla(264, 68%, 25%, 1);
32
+ background: hsla(267, 61%, 81%, 1);
33
+ }
34
+
35
+ .anchor-tag__prefix,
36
+ .anchor-tag__suffix {
37
+ flex: 0 0 auto;
38
+ display: flex;
39
+ align-items: center;
40
+ pointer-events: none;
41
+ }
42
+
43
+ .anchor-tag__prefix {
44
+ margin-inline-end: var(--dsa-wc-tag-icon-spacing);
45
+ }
46
+
47
+ .anchor-tag__suffix {
48
+ margin-inline-start: var(--dsa-wc-tag-icon-spacing);
49
+ }
50
+
51
+ .anchor-tag__content {
52
+ display: inline-block;
53
+ overflow: hidden;
54
+ text-overflow: ellipsis;
55
+ text-wrap: nowrap;
56
+ }
57
+
58
+ /*
59
+ * Size modifiers
60
+ */
61
+
62
+ .anchor-tag--small {
63
+ font: var(--dsa-wc-tag-small-font-size);
64
+ height: var(--dsa-wc-tag-small-height);
65
+ padding: 0 var(--dsa-wc-tag-small-padding-y);
66
+ }
67
+
68
+ .anchor-tag--medium {
69
+ font: var(--dsa-wc-tag-medium-font-size);
70
+ height: var(--dsa-wc-tag-medium-height);
71
+ padding: 0 var(--dsa-wc-tag-medium-padding-y);
72
+ }
73
+
74
+ .anchor-tag--large {
75
+ font: var(--dsa-wc-tag-large-font-size);
76
+ height: var(--dsa-wc-tag-large-height);
77
+ padding: 0 var(--dsa-wc-tag-large-padding-y);
78
+ }
79
+ `;
80
+
81
+ export {
82
+ anchor_tag_styles_default
83
+ };
@@ -1,8 +1,9 @@
1
1
  // src/components/input-mask/input-mask.configs.ts
2
2
  var IBANConfig = {
3
3
  placeholder: "____ ____ ____ ____ ____ ____ ____ ___",
4
+ mask: "LL__ ____ ____ ____ ____ ____ ____ ___",
4
5
  pattern: "^(?:((?:IT|SM)\\d{2}[A-Z]{1}\\d{22})|(NL\\d{2}[A-Z]{4}\\d{10})|(LV\\d{2}[A-Z]{4}\\d{13})|((?:BG|GB|IE)\\d{2}[A-Z]{4}\\d{14})|(GI\\d{2}[A-Z]{4}\\d{15})|(RO\\d{2}[A-Z]{4}\\d{16})|(MT\\d{2}[A-Z]{4}\\d{23})|(NO\\d{13})|((?:DK|FI)\\d{16})|((?:SI)\\d{17})|((?:AT|EE|LU|LT)\\d{18})|((?:HR|LI|CH)\\d{19})|((?:DE|VA)\\d{20})|((?:AD|CZ|ES|MD|SK|SE)\\d{22})|(PT\\d{23})|((?:IS)\\d{24})|((?:BE)\\d{14})|((?:FR|MC|GR)\\d{25})|((?:PL|HU|CY)\\d{26}))$",
5
- "help-text": `Indicaficatif pays en 2 lettres majuscules suivi de 10 \xE0 31 charact\xE8res num\xE9riques`
6
+ "help-text": `Indicatif pays en 2 lettres majuscules suivi de 10 \xE0 31 charact\xE8res num\xE9riques`
6
7
  };
7
8
  var BICConfig = {
8
9
  placeholder: "____ __ __ ___",
@@ -11,6 +12,7 @@ var BICConfig = {
11
12
  };
12
13
  var NIRConfig = {
13
14
  placeholder: "_ __ __ __ ___ ___ __",
15
+ mask: "# ## ## ## ### ### ##",
14
16
  pattern: `[12][0-9]{2}(0[1-9]|1[0-2])(2[AB]|[0-9]{2})[0-9]{3}[0-9]{3}([0-9]{2})`,
15
17
  "help-text": "15 charact\xE8res"
16
18
  };