@descope/web-components-ui 1.0.413 → 1.0.414-1

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 (128) hide show
  1. package/dist/cjs/index.cjs.js +108 -975
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +100 -493
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/{1497.js → 1053.js} +19 -19
  6. package/dist/umd/{1497.js.LICENSE.txt → 1053.js.LICENSE.txt} +0 -6
  7. package/dist/umd/{4671.js → 1414.js} +122 -10
  8. package/dist/umd/{4671.js.LICENSE.txt → 1414.js.LICENSE.txt} +0 -6
  9. package/dist/umd/1437.js +6 -6
  10. package/dist/umd/2566.js +2 -0
  11. package/dist/umd/{952.js.LICENSE.txt → 2566.js.LICENSE.txt} +6 -0
  12. package/dist/umd/286.js +2 -2
  13. package/dist/umd/2919.js +832 -0
  14. package/dist/umd/{8910.js.LICENSE.txt → 2919.js.LICENSE.txt} +0 -6
  15. package/dist/umd/3222.js +282 -0
  16. package/dist/umd/351.js +7 -7
  17. package/dist/umd/3607.js +1 -1
  18. package/dist/umd/3607.js.LICENSE.txt +0 -6
  19. package/dist/umd/3711.js +123 -0
  20. package/dist/umd/4619.js +1 -1
  21. package/dist/umd/4834.js +4 -4
  22. package/dist/umd/{8799.js → 5026.js} +117 -5
  23. package/dist/umd/{8799.js.LICENSE.txt → 5026.js.LICENSE.txt} +0 -6
  24. package/dist/umd/5086.js +2 -2
  25. package/dist/umd/5273.js +4 -4
  26. package/dist/umd/5412.js +2 -2
  27. package/dist/umd/5443.js +116 -4
  28. package/dist/umd/5459.js +1 -0
  29. package/dist/umd/6418.js +2 -0
  30. package/dist/umd/6474.js +6 -6
  31. package/dist/umd/{6206.js → 6637.js} +9 -9
  32. package/dist/umd/{6206.js.LICENSE.txt → 6637.js.LICENSE.txt} +6 -0
  33. package/dist/umd/6726.js +148 -0
  34. package/dist/umd/{8114.js → 7212.js} +16 -16
  35. package/dist/umd/{1012.js.LICENSE.txt → 7212.js.LICENSE.txt} +0 -6
  36. package/dist/umd/{1180.js → 7407.js} +117 -5
  37. package/dist/umd/{9547.js.LICENSE.txt → 7407.js.LICENSE.txt} +0 -6
  38. package/dist/umd/{7200.js → 7607.js} +16 -16
  39. package/dist/umd/{8114.js.LICENSE.txt → 7607.js.LICENSE.txt} +0 -6
  40. package/dist/umd/7824.js +116 -4
  41. package/dist/umd/{9547.js → 8162.js} +3 -3
  42. package/dist/umd/{1180.js.LICENSE.txt → 8162.js.LICENSE.txt} +0 -6
  43. package/dist/umd/8164.js +319 -0
  44. package/dist/umd/{1221.js → 8980.js} +5 -5
  45. package/dist/umd/{1221.js.LICENSE.txt → 8980.js.LICENSE.txt} +0 -6
  46. package/dist/umd/9167.js +452 -0
  47. package/dist/umd/9632.js +275 -0
  48. package/dist/umd/9632.js.LICENSE.txt +23 -0
  49. package/dist/umd/9895.js +17 -0
  50. package/dist/umd/DescopeDev.js +1 -1674
  51. package/dist/umd/DescopeDev.js.LICENSE.txt +0 -92
  52. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  53. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  54. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  55. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  56. package/dist/umd/descope-apps-list-index-js.js +1 -1
  57. package/dist/umd/descope-avatar-index-js.js +1 -1
  58. package/dist/umd/descope-button-index-js.js +116 -4
  59. package/dist/umd/descope-combo-box-index-js.js +14 -14
  60. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  61. package/dist/umd/descope-date-field-index-js.js +1 -1
  62. package/dist/umd/descope-email-field-index-js.js +4 -4
  63. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -4
  64. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt +6 -0
  65. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +4 -19
  66. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.LICENSE.txt +0 -18
  67. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  68. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.LICENSE.txt +6 -0
  69. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +2 -2
  70. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +6 -0
  71. package/dist/umd/descope-grid-index-js.js +1 -1
  72. package/dist/umd/descope-hybrid-field-index-js.js +3 -3
  73. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  74. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  75. package/dist/umd/descope-new-password-index-js.js +1 -2
  76. package/dist/umd/descope-number-field-index-js.js +1 -1
  77. package/dist/umd/descope-passcode-index-js.js +1 -1
  78. package/dist/umd/descope-password-index-js.js +1 -1
  79. package/dist/umd/descope-policy-validation-index-js.js +1 -1
  80. package/dist/umd/descope-radio-group-index-js.js +1 -1
  81. package/dist/umd/descope-recaptcha-index-js.js +1 -1
  82. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  83. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  84. package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
  85. package/dist/umd/descope-security-questions-verify-index-js.js.LICENSE.txt +0 -6
  86. package/dist/umd/descope-text-area-index-js.js +1 -1
  87. package/dist/umd/descope-text-field-index-js.js +2 -2
  88. package/dist/umd/descope-text-field-index-js.js.LICENSE.txt +0 -6
  89. package/dist/umd/descope-upload-file-index-js.js +1 -1
  90. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  91. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  92. package/dist/umd/index.js +1 -1
  93. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
  94. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
  95. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  96. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  97. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  98. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  99. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
  100. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.LICENSE.txt +0 -6
  101. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +15 -15
  102. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.LICENSE.txt +0 -6
  103. package/package.json +1 -1
  104. package/src/components/descope-grid/helpers.js +1 -1
  105. package/src/components/descope-hybrid-field/HybridFieldClass.js +2 -2
  106. package/src/components/descope-policy-validation/PolicyValidationClass.js +2 -2
  107. package/src/components/descope-upload-file/UploadFileClass.js +3 -3
  108. package/dist/umd/1012.js +0 -148
  109. package/dist/umd/2520.js +0 -1
  110. package/dist/umd/2584.js +0 -123
  111. package/dist/umd/4480.js +0 -1
  112. package/dist/umd/4771.js +0 -129
  113. package/dist/umd/481.js +0 -2
  114. package/dist/umd/5021.js +0 -170
  115. package/dist/umd/7871.js +0 -452
  116. package/dist/umd/8082.js +0 -319
  117. package/dist/umd/8677.js +0 -275
  118. package/dist/umd/8677.js.LICENSE.txt +0 -29
  119. package/dist/umd/8910.js +0 -832
  120. package/dist/umd/952.js +0 -2
  121. package/dist/umd/descope-new-password-index-js.js.LICENSE.txt +0 -5
  122. /package/dist/umd/{4771.js.LICENSE.txt → 3222.js.LICENSE.txt} +0 -0
  123. /package/dist/umd/{2584.js.LICENSE.txt → 3711.js.LICENSE.txt} +0 -0
  124. /package/dist/umd/{481.js.LICENSE.txt → 6418.js.LICENSE.txt} +0 -0
  125. /package/dist/umd/{7200.js.LICENSE.txt → 6726.js.LICENSE.txt} +0 -0
  126. /package/dist/umd/{8082.js.LICENSE.txt → 8164.js.LICENSE.txt} +0 -0
  127. /package/dist/umd/{7871.js.LICENSE.txt → 9167.js.LICENSE.txt} +0 -0
  128. /package/dist/umd/{5021.js.LICENSE.txt → 9895.js.LICENSE.txt} +0 -0
@@ -5,12 +5,8 @@ var Color = require('color');
5
5
  var DOMPurify = require('dompurify');
6
6
  var MarkdownIt = require('markdown-it');
7
7
  require('lodash.debounce');
8
- var min = require('libphonenumber-js/min');
8
+ require('libphonenumber-js/min');
9
9
  var hljs = require('highlight.js');
10
- require('@vaadin/combo-box');
11
- require('@vaadin/text-field');
12
- require('@vaadin/icons');
13
- require('@vaadin/icon');
14
10
 
15
11
  const DESCOPE_PREFIX = 'descope';
16
12
  const CSS_SELECTOR_SPECIFIER_MULTIPLY = 3;
@@ -1064,8 +1060,6 @@ const booleanAttributesList = [
1064
1060
  'opening',
1065
1061
  'closing',
1066
1062
  'has-no-options',
1067
- 'loading',
1068
- 'allow-custom-value',
1069
1063
  ];
1070
1064
 
1071
1065
  const isBooleanAttribute = (attr) => {
@@ -2035,7 +2029,7 @@ const createProxy = ({
2035
2029
 
2036
2030
  })();
2037
2031
 
2038
- const observedAttributes$5 = ['required', 'pattern'];
2032
+ const observedAttributes$4 = ['required', 'pattern'];
2039
2033
 
2040
2034
  const errorAttributes = {
2041
2035
  valueMissing: 'data-errormessage-value-missing',
@@ -2054,7 +2048,7 @@ const inputValidationMixin = (superclass) =>
2054
2048
  #validationTarget = validationTargetSymbol;
2055
2049
 
2056
2050
  static get observedAttributes() {
2057
- return [...(superclass.observedAttributes || []), ...observedAttributes$5];
2051
+ return [...(superclass.observedAttributes || []), ...observedAttributes$4];
2058
2052
  }
2059
2053
 
2060
2054
  static get formAssociated() {
@@ -2226,7 +2220,7 @@ const inputValidationMixin = (superclass) =>
2226
2220
  attributeChangedCallback(attrName, oldValue, newValue) {
2227
2221
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
2228
2222
 
2229
- if (observedAttributes$5.includes(attrName)) {
2223
+ if (observedAttributes$4.includes(attrName)) {
2230
2224
  this.#setValidity();
2231
2225
  }
2232
2226
  }
@@ -2429,7 +2423,7 @@ const proxyInputMixin =
2429
2423
  forwardProps(this, [this.inputElement, ...proxyTargets], prop);
2430
2424
  });
2431
2425
 
2432
- this.setSelectionRange = this.inputElement?.setSelectionRange?.bind(this.inputElement);
2426
+ this.setSelectionRange = this.inputElement.setSelectionRange?.bind(this.inputElement);
2433
2427
 
2434
2428
  forwardAttrs(this, this.inputElement, { includeAttrs: ['inputmode'] });
2435
2429
  });
@@ -3375,7 +3369,7 @@ const {
3375
3369
  input: input$1,
3376
3370
  inputMask,
3377
3371
  helperText: helperText$a,
3378
- errorMessage: errorMessage$d,
3372
+ errorMessage: errorMessage$c,
3379
3373
  disabledPlaceholder,
3380
3374
  inputDisabled,
3381
3375
  inputIcon,
@@ -3408,7 +3402,7 @@ const {
3408
3402
  var textFieldMappings = {
3409
3403
  // we apply font-size also on the host so we can set its width with em
3410
3404
  fontSize: [{}, host$n],
3411
- fontFamily: [label$9, inputField$6, helperText$a, errorMessage$d],
3405
+ fontFamily: [label$9, inputField$6, helperText$a, errorMessage$c],
3412
3406
 
3413
3407
  labelFontSize: { ...label$9, property: 'font-size' },
3414
3408
  labelFontWeight: { ...label$9, property: 'font-weight' },
@@ -3430,13 +3424,7 @@ var textFieldMappings = {
3430
3424
  { ...inputMask, property: 'background-color' },
3431
3425
  ],
3432
3426
 
3433
- errorMessageTextColor: { ...errorMessage$d, property: 'color' },
3434
- errorMessageIcon: { ...errorMessage$d, property: 'background-image' },
3435
- errorMessageIconSize: { ...errorMessage$d, property: 'background-size' },
3436
- errorMessageIconPadding: { ...errorMessage$d, property: 'padding-inline-start' },
3437
- errorMessageIconRepeat: { ...errorMessage$d, property: 'background-repeat' },
3438
- errorMessageIconPosition: { ...errorMessage$d, property: 'background-position' },
3439
-
3427
+ errorMessageTextColor: { ...errorMessage$c, property: 'color' },
3440
3428
  helperTextColor: { ...helperText$a, property: '-webkit-text-fill-color' },
3441
3429
 
3442
3430
  inputValueTextColor: [
@@ -3830,12 +3818,6 @@ const [theme$1, refs, vars$R] = createHelperVars(
3830
3818
 
3831
3819
  overlayOpacity: '0.3',
3832
3820
 
3833
- errorMessageIcon: '',
3834
- errorMessageIconSize: '0',
3835
- errorMessageIconPadding: '0',
3836
- errorMessageIconPosition: '0 0.4em',
3837
- errorMessageIconRepeat: 'no-repeat',
3838
-
3839
3821
  size: {
3840
3822
  xs: { fontSize: '12px', chipFontSize: '10px' },
3841
3823
  sm: { fontSize: '14px', chipFontSize: '12px' },
@@ -3967,13 +3949,6 @@ const textField$1 = {
3967
3949
  [vars$Q.inputIconOffset]: globalRefs$w.spacing.md,
3968
3950
  [vars$Q.inputIconSize]: refs.inputIconSize,
3969
3951
  [vars$Q.inputIconColor]: refs.placeholderTextColor,
3970
-
3971
- // error message icon
3972
- [vars$Q.errorMessageIcon]: refs.errorMessageIcon,
3973
- [vars$Q.errorMessageIconSize]: refs.errorMessageIconSize,
3974
- [vars$Q.errorMessageIconPadding]: refs.errorMessageIconPadding,
3975
- [vars$Q.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
3976
- [vars$Q.errorMessageIconPosition]: refs.errorMessageIconPosition,
3977
3952
  };
3978
3953
 
3979
3954
  var textField$2 = /*#__PURE__*/Object.freeze({
@@ -4139,7 +4114,7 @@ const {
4139
4114
  revealButtonIcon,
4140
4115
  label: label$8,
4141
4116
  requiredIndicator: requiredIndicator$a,
4142
- errorMessage: errorMessage$c,
4117
+ errorMessage: errorMessage$b,
4143
4118
  helperText: helperText$9,
4144
4119
  } = {
4145
4120
  host: { selector: () => ':host' },
@@ -4161,7 +4136,7 @@ const PasswordClass = compose(
4161
4136
  hostMinWidth: { ...host$m, property: 'min-width' },
4162
4137
  hostDirection: { ...host$m, property: 'direction' },
4163
4138
  fontSize: [{}, host$m],
4164
- fontFamily: [label$8, inputField$5, errorMessage$c, helperText$9],
4139
+ fontFamily: [label$8, inputField$5, errorMessage$b, helperText$9],
4165
4140
  inputHeight: { ...inputField$5, property: 'height' },
4166
4141
  inputHorizontalPadding: [
4167
4142
  { ...inputElement$3, property: 'padding-left' },
@@ -4186,12 +4161,7 @@ const PasswordClass = compose(
4186
4161
  { ...requiredIndicator$a, property: 'color' },
4187
4162
  ],
4188
4163
  labelRequiredIndicator: { ...requiredIndicator$a, property: 'content' },
4189
- errorMessageTextColor: { ...errorMessage$c, property: 'color' },
4190
- errorMessageIcon: { ...errorMessage$c, property: 'background-image' },
4191
- errorMessageIconSize: { ...errorMessage$c, property: 'background-size' },
4192
- errorMessageIconPadding: { ...errorMessage$c, property: 'padding-inline-start' },
4193
- errorMessageIconRepeat: { ...errorMessage$c, property: 'background-repeat' },
4194
- errorMessageIconPosition: { ...errorMessage$c, property: 'background-position' },
4164
+ errorMessageTextColor: { ...errorMessage$b, property: 'color' },
4195
4165
 
4196
4166
  inputPlaceholderTextColor: [
4197
4167
  { ...inputElementPlaceholder, property: 'color' },
@@ -4346,13 +4316,6 @@ const password = {
4346
4316
  [vars$P.placeholderOpacity]: refs.placeholderOpacity,
4347
4317
  [vars$P.inputVerticalAlignment]: refs.inputVerticalAlignment,
4348
4318
  [vars$P.valueInputHeight]: refs.valueInputHeight,
4349
-
4350
- // error message icon
4351
- [vars$P.errorMessageIcon]: refs.errorMessageIcon,
4352
- [vars$P.errorMessageIconSize]: refs.errorMessageIconSize,
4353
- [vars$P.errorMessageIconPadding]: refs.errorMessageIconPadding,
4354
- [vars$P.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
4355
- [vars$P.errorMessageIconPosition]: refs.errorMessageIconPosition,
4356
4319
  };
4357
4320
 
4358
4321
  var password$1 = /*#__PURE__*/Object.freeze({
@@ -4435,13 +4398,6 @@ const numberField = {
4435
4398
  [vars$O.inputVerticalAlignment]: refs.inputVerticalAlignment,
4436
4399
  [vars$O.valueInputHeight]: refs.valueInputHeight,
4437
4400
  [vars$O.valueInputMarginBottom]: refs.valueInputMarginBottom,
4438
-
4439
- // error message icon
4440
- [vars$O.errorMessageIcon]: refs.errorMessageIcon,
4441
- [vars$O.errorMessageIconSize]: refs.errorMessageIconSize,
4442
- [vars$O.errorMessageIconPadding]: refs.errorMessageIconPadding,
4443
- [vars$O.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
4444
- [vars$O.errorMessageIconPosition]: refs.errorMessageIconPosition,
4445
4401
  };
4446
4402
 
4447
4403
  var numberField$1 = /*#__PURE__*/Object.freeze({
@@ -4559,13 +4515,6 @@ const emailField = {
4559
4515
  [vars$N.inputVerticalAlignment]: refs.inputVerticalAlignment,
4560
4516
  [vars$N.valueInputHeight]: refs.valueInputHeight,
4561
4517
  [vars$N.valueInputMarginBottom]: refs.valueInputMarginBottom,
4562
-
4563
- // error message icon
4564
- [vars$N.errorMessageIcon]: refs.errorMessageIcon,
4565
- [vars$N.errorMessageIconSize]: refs.errorMessageIconSize,
4566
- [vars$N.errorMessageIconPadding]: refs.errorMessageIconPadding,
4567
- [vars$N.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
4568
- [vars$N.errorMessageIconPosition]: refs.errorMessageIconPosition,
4569
4518
  };
4570
4519
 
4571
4520
  var emailField$1 = /*#__PURE__*/Object.freeze({
@@ -4584,7 +4533,7 @@ const {
4584
4533
  textArea: textArea$2,
4585
4534
  requiredIndicator: requiredIndicator$9,
4586
4535
  helperText: helperText$8,
4587
- errorMessage: errorMessage$b,
4536
+ errorMessage: errorMessage$a,
4588
4537
  } = {
4589
4538
  host: { selector: () => ':host' },
4590
4539
  label: { selector: '::part(label)' },
@@ -4603,18 +4552,13 @@ const TextAreaClass = compose(
4603
4552
  hostMinWidth: { ...host$l, property: 'min-width' },
4604
4553
  hostDirection: { ...host$l, property: 'direction' },
4605
4554
  fontSize: [host$l, textArea$2],
4606
- fontFamily: [label$7, inputField$4, helperText$8, errorMessage$b],
4555
+ fontFamily: [label$7, inputField$4, helperText$8, errorMessage$a],
4607
4556
  labelTextColor: [
4608
4557
  { ...label$7, property: 'color' },
4609
4558
  { ...requiredIndicator$9, property: 'color' },
4610
4559
  ],
4611
4560
  labelRequiredIndicator: { ...requiredIndicator$9, property: 'content' },
4612
- errorMessageTextColor: { ...errorMessage$b, property: 'color' },
4613
- errorMessageIcon: { ...errorMessage$b, property: 'background-image' },
4614
- errorMessageIconSize: { ...errorMessage$b, property: 'background-size' },
4615
- errorMessageIconPadding: { ...errorMessage$b, property: 'padding-inline-start' },
4616
- errorMessageIconRepeat: { ...errorMessage$b, property: 'background-repeat' },
4617
- errorMessageIconPosition: { ...errorMessage$b, property: 'background-position' },
4561
+ errorMessageTextColor: { ...errorMessage$a, property: 'color' },
4618
4562
  inputBackgroundColor: { ...inputField$4, property: 'background-color' },
4619
4563
  inputValueTextColor: { ...textArea$2, property: 'color' },
4620
4564
  inputPlaceholderTextColor: { ...placeholder$2, property: 'color' },
@@ -4683,14 +4627,6 @@ const textArea = {
4683
4627
  [vars$M.inputOutlineOffset]: refs.outlineOffset,
4684
4628
  [vars$M.inputResizeType]: 'vertical',
4685
4629
  [vars$M.inputMinHeight]: '5em',
4686
-
4687
- // error message icon
4688
- [vars$M.errorMessageIcon]: refs.errorMessageIcon,
4689
- [vars$M.errorMessageIconSize]: refs.errorMessageIconSize,
4690
- [vars$M.errorMessageIconPadding]: refs.errorMessageIconPadding,
4691
- [vars$M.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
4692
- [vars$M.errorMessageIconPosition]: refs.errorMessageIconPosition,
4693
-
4694
4630
  textAlign: {
4695
4631
  right: { [vars$M.inputTextAlign]: 'right' },
4696
4632
  left: { [vars$M.inputTextAlign]: 'left' },
@@ -4813,7 +4749,7 @@ const {
4813
4749
  checkboxLabel: checkboxLabel$1,
4814
4750
  requiredIndicator: requiredIndicator$8,
4815
4751
  helperText: helperText$7,
4816
- errorMessage: errorMessage$a,
4752
+ errorMessage: errorMessage$9,
4817
4753
  } = {
4818
4754
  host: { selector: () => ':host' },
4819
4755
  requiredIndicator: { selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::after' },
@@ -4832,7 +4768,7 @@ const CheckboxClass = compose(
4832
4768
  hostDirection: { ...host$k, property: 'direction' },
4833
4769
 
4834
4770
  fontSize: [host$k, checkboxElement, checkboxLabel$1],
4835
- fontFamily: [checkboxLabel$1, helperText$7, errorMessage$a],
4771
+ fontFamily: [checkboxLabel$1, helperText$7, errorMessage$9],
4836
4772
 
4837
4773
  labelTextColor: { ...checkboxLabel$1, property: 'color' },
4838
4774
  labelSpacing: { ...checkboxLabel$1, property: 'padding-inline-start' },
@@ -4840,12 +4776,7 @@ const CheckboxClass = compose(
4840
4776
  labelFontWeight: { ...checkboxLabel$1, property: 'font-weight' },
4841
4777
  labelRequiredIndicator: { ...requiredIndicator$8, property: 'content' },
4842
4778
 
4843
- errorMessageTextColor: { ...errorMessage$a, property: 'color' },
4844
- errorMessageIcon: { ...errorMessage$a, property: 'background-image' },
4845
- errorMessageIconSize: { ...errorMessage$a, property: 'background-size' },
4846
- errorMessageIconPadding: { ...errorMessage$a, property: 'padding-inline-start' },
4847
- errorMessageIconRepeat: { ...errorMessage$a, property: 'background-repeat' },
4848
- errorMessageIconPosition: { ...errorMessage$a, property: 'background-position' },
4779
+ errorMessageTextColor: { ...errorMessage$9, property: 'color' },
4849
4780
 
4850
4781
  inputValueTextColor: { ...checkboxSurface, property: 'color' },
4851
4782
  inputBackgroundColor: { ...checkboxElement, property: 'background-color' },
@@ -4949,13 +4880,6 @@ const checkbox = {
4949
4880
  [vars$L.inputBackgroundColor]: refs.backgroundColor,
4950
4881
  [vars$L.inputSize]: checkboxSize,
4951
4882
  [vars$L.inputValueTextColor]: refs.valueTextColor,
4952
-
4953
- // error message icon
4954
- [vars$L.errorMessageIcon]: refs.errorMessageIcon,
4955
- [vars$L.errorMessageIconSize]: refs.errorMessageIconSize,
4956
- [vars$L.errorMessageIconPadding]: refs.errorMessageIconPadding,
4957
- [vars$L.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
4958
- [vars$L.errorMessageIconPosition]: refs.errorMessageIconPosition,
4959
4883
  };
4960
4884
 
4961
4885
  var checkbox$1 = /*#__PURE__*/Object.freeze({
@@ -4974,7 +4898,7 @@ const {
4974
4898
  checkboxLabel,
4975
4899
  requiredIndicator: requiredIndicator$7,
4976
4900
  helperText: helperText$6,
4977
- errorMessage: errorMessage$9,
4901
+ errorMessage: errorMessage$8,
4978
4902
  } = {
4979
4903
  host: { selector: () => ':host' },
4980
4904
  requiredIndicator: { selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::after' },
@@ -4993,7 +4917,7 @@ const SwitchToggleClass = compose(
4993
4917
  hostDirection: { ...host$j, property: 'direction' },
4994
4918
 
4995
4919
  fontSize: [component, checkboxLabel, checkboxLabel],
4996
- fontFamily: [checkboxLabel, helperText$6, errorMessage$9],
4920
+ fontFamily: [checkboxLabel, helperText$6, errorMessage$8],
4997
4921
 
4998
4922
  labelTextColor: { ...checkboxLabel, property: 'color' },
4999
4923
  labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },
@@ -5001,13 +4925,7 @@ const SwitchToggleClass = compose(
5001
4925
  labelFontWeight: { ...checkboxLabel, property: 'font-weight' },
5002
4926
  labelRequiredIndicator: { ...requiredIndicator$7, property: 'content' },
5003
4927
 
5004
- errorMessageTextColor: { ...errorMessage$9, property: 'color' },
5005
-
5006
- errorMessageIcon: { ...errorMessage$9, property: 'background-image' },
5007
- errorMessageIconSize: { ...errorMessage$9, property: 'background-size' },
5008
- errorMessageIconPadding: { ...errorMessage$9, property: 'padding-inline-start' },
5009
- errorMessageIconRepeat: { ...errorMessage$9, property: 'background-repeat' },
5010
- errorMessageIconPosition: { ...errorMessage$9, property: 'background-position' },
4928
+ errorMessageTextColor: { ...errorMessage$8, property: 'color' },
5011
4929
 
5012
4930
  trackBorderWidth: { ...track, property: 'border-width' },
5013
4931
  trackBorderStyle: { ...track, property: 'border-style' },
@@ -5145,13 +5063,6 @@ const switchToggle = {
5145
5063
  [vars$K.labelRequiredIndicator]: refs.requiredIndicator,
5146
5064
  [vars$K.errorMessageTextColor]: refs.errorMessageTextColor,
5147
5065
 
5148
- // error message icon
5149
- [vars$K.errorMessageIcon]: refs.errorMessageIcon,
5150
- [vars$K.errorMessageIconSize]: refs.errorMessageIconSize,
5151
- [vars$K.errorMessageIconPadding]: refs.errorMessageIconPadding,
5152
- [vars$K.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
5153
- [vars$K.errorMessageIconPosition]: refs.errorMessageIconPosition,
5154
-
5155
5066
  _checked: {
5156
5067
  [vars$K.trackBorderColor]: refs.borderColor,
5157
5068
  [vars$K.knobLeftOffset]: `calc(100% - var(${vars$K.knobSize}) - ${knobMargin})`,
@@ -6203,12 +6114,12 @@ const LoaderRadialClass = compose(
6203
6114
 
6204
6115
  const componentName$H = getComponentName('passcode');
6205
6116
 
6206
- const observedAttributes$4 = ['digits'];
6117
+ const observedAttributes$3 = ['digits'];
6207
6118
 
6208
6119
  const customMixin$9 = (superclass) =>
6209
6120
  class PasscodeMixinClass extends superclass {
6210
6121
  static get observedAttributes() {
6211
- return observedAttributes$4.concat(superclass.observedAttributes || []);
6122
+ return observedAttributes$3.concat(superclass.observedAttributes || []);
6212
6123
  }
6213
6124
 
6214
6125
  get digits() {
@@ -6251,7 +6162,7 @@ const {
6251
6162
  requiredIndicator: requiredIndicator$6,
6252
6163
  internalWrapper: internalWrapper$1,
6253
6164
  focusedDigitField,
6254
- errorMessage: errorMessage$8,
6165
+ errorMessage: errorMessage$7,
6255
6166
  } = {
6256
6167
  host: { selector: () => ':host' },
6257
6168
  focusedDigitField: { selector: () => `${TextFieldClass.componentName}[focused="true"]` },
@@ -6277,12 +6188,7 @@ const PasscodeClass = compose(
6277
6188
  { ...requiredIndicator$6, property: 'color' },
6278
6189
  ],
6279
6190
  labelRequiredIndicator: { ...requiredIndicator$6, property: 'content' },
6280
- errorMessageTextColor: { ...errorMessage$8, property: 'color' },
6281
- errorMessageIcon: { ...errorMessage$8, property: 'background-image' },
6282
- errorMessageIconSize: { ...errorMessage$8, property: 'background-size' },
6283
- errorMessageIconPadding: { ...errorMessage$8, property: 'padding-inline-start' },
6284
- errorMessageIconRepeat: { ...errorMessage$8, property: 'background-repeat' },
6285
- errorMessageIconPosition: { ...errorMessage$8, property: 'background-position' },
6191
+ errorMessageTextColor: { ...errorMessage$7, property: 'color' },
6286
6192
  digitValueTextColor: {
6287
6193
  selector: TextFieldClass.componentName,
6288
6194
  property: textVars$3.inputValueTextColor,
@@ -6410,13 +6316,6 @@ const passcode = {
6410
6316
  [vars$B.focusedDigitFieldOutlineColor]: refs.outlineColor,
6411
6317
  [vars$B.digitSize]: refs.inputHeight,
6412
6318
 
6413
- // error message icon
6414
- [vars$B.errorMessageIcon]: refs.errorMessageIcon,
6415
- [vars$B.errorMessageIconSize]: refs.errorMessageIconSize,
6416
- [vars$B.errorMessageIconPadding]: refs.errorMessageIconPadding,
6417
- [vars$B.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
6418
- [vars$B.errorMessageIconPosition]: refs.errorMessageIconPosition,
6419
-
6420
6319
  size: {
6421
6320
  xs: { [vars$B.spinnerSize]: '15px' },
6422
6321
  sm: { [vars$B.spinnerSize]: '20px' },
@@ -6632,23 +6531,6 @@ const ComboBoxMixin = (superclass) =>
6632
6531
  this.renderItems();
6633
6532
  }
6634
6533
 
6635
- set renderer(fn) {
6636
- // fn takes (root, comboBox, model) as arguments
6637
- this.baseElement.renderer = fn;
6638
- }
6639
-
6640
- get loading() {
6641
- return this.getAttribute('loading') === 'true';
6642
- }
6643
-
6644
- set loading(val) {
6645
- if (val) {
6646
- this.setAttribute('loading', 'true');
6647
- } else {
6648
- this.removeAttribute('loading');
6649
- }
6650
- }
6651
-
6652
6534
  get data() {
6653
6535
  if (this.#data) return this.#data;
6654
6536
 
@@ -6692,20 +6574,14 @@ const ComboBoxMixin = (superclass) =>
6692
6574
  }
6693
6575
 
6694
6576
  renderItems() {
6695
- if (this.#data || this.getAttribute('data')) {
6696
- const template = this.getItemsTemplate();
6697
- this.innerHTML = template;
6698
- }
6577
+ const template = this.getItemsTemplate();
6578
+ if (template) this.innerHTML = template;
6699
6579
  }
6700
6580
 
6701
6581
  handleSelectedItem() {
6702
- const { selectedItem } = this.baseElement;
6703
- const currentSelected = selectedItem?.['data-id'];
6582
+ const currentSelected = this.baseElement.selectedItem?.['data-id'];
6704
6583
 
6705
- // If the selected item is still a child, there's no need to update the value
6706
- if (selectedItem && Array.from(this.children).includes(selectedItem)) {
6707
- return;
6708
- }
6584
+ this.baseElement.selectedItem = undefined;
6709
6585
 
6710
6586
  // if previously selected item ID exists in current children, set it as selected
6711
6587
  if (currentSelected) {
@@ -6738,7 +6614,7 @@ const ComboBoxMixin = (superclass) =>
6738
6614
  value: {
6739
6615
  ...valueDescriptor,
6740
6616
  set(val) {
6741
- if (!comboBox.baseElement.items?.length && !comboBox.allowCustomValue) {
6617
+ if (!comboBox.baseElement.items?.length) {
6742
6618
  return;
6743
6619
  }
6744
6620
 
@@ -6758,27 +6634,39 @@ const ComboBoxMixin = (superclass) =>
6758
6634
  // in order to avoid it, we are passing the children of this component
6759
6635
  // to the items & renderer props, so it will be used as the combo box items
6760
6636
  #onChildrenChange() {
6637
+ const baseElement = this.shadowRoot.querySelector(this.baseSelector);
6761
6638
  const items = Array.from(this.children);
6762
6639
 
6763
6640
  // we want the data-name attribute to be accessible as an object attribute
6764
- items.forEach((node) => {
6765
- Object.defineProperty(node, 'data-name', {
6766
- value: node.getAttribute('data-name'),
6767
- configurable: true,
6768
- writable: true,
6769
- });
6770
- Object.defineProperty(node, 'data-id', {
6771
- value: node.getAttribute('data-id'),
6772
- configurable: true,
6773
- writable: true,
6641
+ if (items.length) {
6642
+ items.forEach((node) => {
6643
+ Object.defineProperty(node, 'data-name', {
6644
+ value: node.getAttribute('data-name'),
6645
+ configurable: true,
6646
+ writable: true,
6647
+ });
6648
+ Object.defineProperty(node, 'data-id', {
6649
+ value: node.getAttribute('data-id'),
6650
+ configurable: true,
6651
+ writable: true,
6652
+ });
6774
6653
  });
6775
- });
6776
6654
 
6777
- this.baseElement.items = items;
6778
- setTimeout(() => {
6779
- // set timeout to ensure this runs after customValueTransformFn had the chance to be overriden
6780
- this.handleSelectedItem();
6781
- }, 0);
6655
+ baseElement.items = items;
6656
+
6657
+ setTimeout(() => {
6658
+ // set timeout to ensure this runs after customValueTransformFn had the chance to be overriden
6659
+ this.handleSelectedItem();
6660
+ }, 0);
6661
+ }
6662
+
6663
+ // use vaadin combobox custom renderer to render options as HTML
6664
+ // and not via default renderer, which renders only the data-name's value
6665
+ // in its own HTML template
6666
+ baseElement.renderer = (root, combo, model) => {
6667
+ // eslint-disable-next-line no-param-reassign
6668
+ root.innerHTML = model.item.outerHTML;
6669
+ };
6782
6670
  }
6783
6671
 
6784
6672
  // the default vaadin behavior is to attach the overlay to the body when opened
@@ -6793,16 +6681,6 @@ const ComboBoxMixin = (superclass) =>
6793
6681
  overlay._enterModalState = () => {};
6794
6682
  }
6795
6683
 
6796
- #overrideRenderer() {
6797
- // use vaadin combobox custom renderer to render options as HTML
6798
- // and not via default renderer, which renders only the data-name's value
6799
- // in its own HTML template
6800
- this.baseElement.renderer = (root, combo, model) => {
6801
- // eslint-disable-next-line no-param-reassign
6802
- root.innerHTML = model.item.outerHTML;
6803
- };
6804
- }
6805
-
6806
6684
  init() {
6807
6685
  super.init?.();
6808
6686
 
@@ -6817,11 +6695,13 @@ const ComboBoxMixin = (superclass) =>
6817
6695
  };
6818
6696
 
6819
6697
  this.setComboBoxDescriptor();
6698
+
6820
6699
  this.#overrideOverlaySettings();
6821
- this.#overrideRenderer();
6822
6700
 
6823
- // Set up observers - order matters here since renderItems can clear innerHTML
6701
+ this.renderItems();
6702
+
6824
6703
  observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
6704
+
6825
6705
  observeChildren(this, this.#onChildrenChange.bind(this));
6826
6706
 
6827
6707
  this.setDefaultValue();
@@ -6854,38 +6734,16 @@ const ComboBoxMixin = (superclass) =>
6854
6734
  }
6855
6735
 
6856
6736
  setDefaultValue() {
6857
- if (this.defaultValue) {
6858
- this.value = this.defaultValue;
6859
- }
6860
- }
6861
-
6862
- #getChildToSelect(val) {
6863
- return this.baseElement.items?.find((item) => item['data-id'] === val);
6864
- }
6865
-
6866
- #preventSelectedItemChangeEventIfNeeded(val, selectedChild) {
6867
- // If the actual value didn't change, but the selected item did (the element changed),
6868
- // we want to stop the event propagation since it's not a real change
6869
- const shouldPreventItemChangeEvent =
6870
- val === this.value && selectedChild !== this.baseElement.selectedItem;
6871
- if (shouldPreventItemChangeEvent) {
6872
- this.baseElement.addEventListener(
6873
- 'selected-item-changed',
6874
- (e) => {
6875
- e.stopImmediatePropagation();
6876
- },
6877
- { once: true, capture: true }
6878
- );
6879
- }
6737
+ this.value = this.defaultValue;
6880
6738
  }
6881
6739
 
6882
6740
  set value(val) {
6883
- const selectedChild = this.#getChildToSelect(val);
6884
- this.#preventSelectedItemChangeEventIfNeeded(val, selectedChild);
6885
- if (val && selectedChild) {
6886
- this.baseElement.selectedItem = selectedChild;
6887
- } else if (!selectedChild && this.allowCustomValue) {
6888
- this.baseElement.value = val;
6741
+ if (val) {
6742
+ const child = this.baseElement.items?.find((item) => item['data-id'] === val);
6743
+
6744
+ if (child) {
6745
+ this.baseElement.selectedItem = child;
6746
+ }
6889
6747
  } else {
6890
6748
  this.baseElement.selectedItem = undefined;
6891
6749
  }
@@ -6912,7 +6770,7 @@ const {
6912
6770
  label: label$5,
6913
6771
  requiredIndicator: requiredIndicator$5,
6914
6772
  helperText: helperText$5,
6915
- errorMessage: errorMessage$7,
6773
+ errorMessage: errorMessage$6,
6916
6774
  } = {
6917
6775
  host: { selector: () => ':host' },
6918
6776
  inputField: { selector: '::part(input-field)' },
@@ -6933,19 +6791,14 @@ const ComboBoxClass = compose(
6933
6791
  hostDirection: { ...host$e, property: 'direction' },
6934
6792
  // we apply font-size also on the host so we can set its width with em
6935
6793
  fontSize: [{}, host$e],
6936
- fontFamily: [label$5, placeholder$1, inputField$3, helperText$5, errorMessage$7],
6794
+ fontFamily: [label$5, placeholder$1, inputField$3, helperText$5, errorMessage$6],
6937
6795
  labelFontSize: { ...label$5, property: 'font-size' },
6938
6796
  labelFontWeight: { ...label$5, property: 'font-weight' },
6939
6797
  labelTextColor: [
6940
6798
  { ...label$5, property: 'color' },
6941
6799
  { ...requiredIndicator$5, property: 'color' },
6942
6800
  ],
6943
- errorMessageTextColor: { ...errorMessage$7, property: 'color' },
6944
- errorMessageIcon: { ...errorMessage$7, property: 'background-image' },
6945
- errorMessageIconSize: { ...errorMessage$7, property: 'background-size' },
6946
- errorMessageIconPadding: { ...errorMessage$7, property: 'padding-inline-start' },
6947
- errorMessageIconRepeat: { ...errorMessage$7, property: 'background-repeat' },
6948
- errorMessageIconPosition: { ...errorMessage$7, property: 'background-position' },
6801
+ errorMessageTextColor: { ...errorMessage$6, property: 'color' },
6949
6802
  inputHeight: { ...inputField$3, property: 'height' },
6950
6803
  inputBackgroundColor: { ...inputField$3, property: 'background-color' },
6951
6804
  inputBorderColor: { ...inputField$3, property: 'border-color' },
@@ -7020,10 +6873,7 @@ const ComboBoxClass = compose(
7020
6873
  name: 'overlay',
7021
6874
  selector: '',
7022
6875
  mappings: {
7023
- backgroundColor: [
7024
- { selector: 'vaadin-combo-box-scroller' },
7025
- { selector: 'vaadin-combo-box-overlay::part(overlay)' },
7026
- ],
6876
+ backgroundColor: { selector: 'vaadin-combo-box-scroller' },
7027
6877
  minHeight: { selector: 'vaadin-combo-box-overlay' },
7028
6878
  margin: { selector: 'vaadin-combo-box-overlay' },
7029
6879
  cursor: { selector: 'vaadin-combo-box-item' },
@@ -7036,24 +6886,6 @@ const ComboBoxClass = compose(
7036
6886
  property: 'padding-inline-start',
7037
6887
  },
7038
6888
  itemPaddingInlineEnd: { selector: 'vaadin-combo-box-item', property: 'padding-inline-end' },
7039
-
7040
- loaderTop: { selector: 'vaadin-combo-box-overlay::part(loader)', property: 'top' },
7041
- loaderLeft: { selector: 'vaadin-combo-box-overlay::part(loader)', property: 'left' },
7042
- loaderRight: { selector: 'vaadin-combo-box-overlay::part(loader)', property: 'right' },
7043
- loaderMargin: { selector: 'vaadin-combo-box-overlay::part(loader)', property: 'margin' },
7044
- loaderWidth: { selector: 'vaadin-combo-box-overlay::part(loader)', property: 'width' },
7045
- loaderHeight: { selector: 'vaadin-combo-box-overlay::part(loader)', property: 'height' },
7046
- loaderBorder: { selector: 'vaadin-combo-box-overlay::part(loader)', property: 'border' },
7047
- loaderBorderColor: {
7048
- selector: 'vaadin-combo-box-overlay::part(loader)',
7049
- property: 'border-color',
7050
- },
7051
- loaderBorderRadius: {
7052
- selector: 'vaadin-combo-box-overlay::part(loader)',
7053
- property: 'border-radius',
7054
- },
7055
- contentHeight: { selector: 'vaadin-combo-box-overlay::part(content)', property: 'height' },
7056
- contentOpacity: { selector: 'vaadin-combo-box-overlay::part(content)', property: 'opacity' },
7057
6889
  },
7058
6890
  forward: {
7059
6891
  include: false,
@@ -7101,10 +6933,6 @@ const ComboBoxClass = compose(
7101
6933
  align-self: center;
7102
6934
  }
7103
6935
 
7104
- vaadin-combo-box[hide-toggle-button="true"]::part(toggle-button) {
7105
- display: none;
7106
- }
7107
-
7108
6936
  vaadin-combo-box[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {
7109
6937
  opacity: 0;
7110
6938
  }
@@ -7119,7 +6947,7 @@ const ComboBoxClass = compose(
7119
6947
  // with the same name. Including it will cause Vaadin to calculate NaN size,
7120
6948
  // and reset items to an empty array, and opening the list box with no items
7121
6949
  // to display.
7122
- excludeAttrsSync: ['tabindex', 'size', 'data', 'loading'],
6950
+ excludeAttrsSync: ['tabindex', 'size', 'data'],
7123
6951
  componentName: componentName$F,
7124
6952
  includeForwardProps: ['items', 'renderer', 'selectedItem'],
7125
6953
  })
@@ -7168,13 +6996,6 @@ const comboBox = {
7168
6996
  [vars$y.valueInputHeight]: refs.valueInputHeight,
7169
6997
  [vars$y.valueInputMarginBottom]: refs.valueInputMarginBottom,
7170
6998
 
7171
- // error message icon
7172
- [vars$y.errorMessageIcon]: refs.errorMessageIcon,
7173
- [vars$y.errorMessageIconSize]: refs.errorMessageIconSize,
7174
- [vars$y.errorMessageIconPadding]: refs.errorMessageIconPadding,
7175
- [vars$y.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
7176
- [vars$y.errorMessageIconPosition]: refs.errorMessageIconPosition,
7177
-
7178
6999
  _readonly: {
7179
7000
  [vars$y.inputDropdownButtonCursor]: 'default',
7180
7001
  },
@@ -7190,25 +7011,6 @@ const comboBox = {
7190
7011
  // Overlay direct theme:
7191
7012
  [vars$y.overlay.minHeight]: '400px',
7192
7013
  [vars$y.overlay.margin]: '0',
7193
-
7194
- [vars$y.overlay.contentHeight]: '100%',
7195
- [vars$y.overlay.contentOpacity]: '1',
7196
- _loading: {
7197
- [vars$y.overlay.loaderTop]: '50%',
7198
- [vars$y.overlay.loaderLeft]: '50%',
7199
- [vars$y.overlay.loaderRight]: 'auto',
7200
- // Margin has to be negative to center the loader, "transform" can't be used because the animation uses it
7201
- // Margin has to be half of the width/height of the loader to center it
7202
- [vars$y.overlay.loaderMargin]: '-15px 0 0 -15px',
7203
- [vars$y.overlay.loaderWidth]: '30px',
7204
- [vars$y.overlay.loaderHeight]: '30px',
7205
- [vars$y.overlay.loaderBorder]: '2px solid transparent',
7206
- [vars$y.overlay
7207
- .loaderBorderColor]: `${globalRefs$m.colors.primary.highlight} ${globalRefs$m.colors.primary.highlight} ${globalRefs$m.colors.primary.main} ${globalRefs$m.colors.primary.main}`,
7208
- [vars$y.overlay.loaderBorderRadius]: '50%',
7209
- [vars$y.overlay.contentHeight]: '100px',
7210
- [vars$y.overlay.contentOpacity]: '0',
7211
- },
7212
7014
  };
7213
7015
 
7214
7016
  var comboBox$1 = /*#__PURE__*/Object.freeze({
@@ -7218,14 +7020,14 @@ var comboBox$1 = /*#__PURE__*/Object.freeze({
7218
7020
  vars: vars$y
7219
7021
  });
7220
7022
 
7221
- const observedAttributes$3 = ['src', 'alt'];
7023
+ const observedAttributes$2 = ['src', 'alt'];
7222
7024
 
7223
7025
  const componentName$E = getComponentName('image');
7224
7026
 
7225
7027
  const BaseClass$2 = createBaseClass({ componentName: componentName$E, baseSelector: ':host > img' });
7226
7028
  class RawImage extends BaseClass$2 {
7227
7029
  static get observedAttributes() {
7228
- return observedAttributes$3.concat(BaseClass$2.observedAttributes || []);
7030
+ return observedAttributes$2.concat(BaseClass$2.observedAttributes || []);
7229
7031
  }
7230
7032
 
7231
7033
  constructor() {
@@ -7248,7 +7050,7 @@ class RawImage extends BaseClass$2 {
7248
7050
  connectedCallback() {
7249
7051
  super.connectedCallback?.();
7250
7052
 
7251
- forwardAttrs(this, this.baseElement, { includeAttrs: observedAttributes$3 });
7053
+ forwardAttrs(this, this.baseElement, { includeAttrs: observedAttributes$2 });
7252
7054
  }
7253
7055
  }
7254
7056
 
@@ -8488,322 +8290,9 @@ var CountryCodes = [
8488
8290
  ].sort((a, b) => (a.name < b.name ? -1 : 1)),
8489
8291
  ];
8490
8292
 
8491
- // We use JSDelivr (proxy by static.descope.com) in order to fetch the images as image file from this library (svg-country-flags)
8492
- // This reduces our bundle size, and we use it as a static remote resource.
8493
- const getCountryFlag = (code) =>
8494
- `https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${code.toLowerCase()}.svg`;
8495
-
8496
- const comboBoxItem = ({ code, dialCode, name: country }) => `
8497
- <div
8498
- style="display:flex; flex-direction: column;"
8499
- data-id="${dialCode}"
8500
- data-name="${code} ${dialCode} ${country}"
8501
- data-country-code="${code}"
8502
- >
8503
- <div>
8504
- <span>
8505
- <img src="${getCountryFlag(code)}" width="20"/>
8506
- </span>
8507
- <span>${country}</span>
8508
- </div>
8509
- <div>
8510
- <span>${code}</span>
8511
- <span>${dialCode}</span>
8512
- </div>
8513
- </div>
8514
- `;
8515
-
8516
- const parsePhoneNumber = (val) => {
8517
- const value = val || '';
8518
- let countryCode = '';
8519
- let phoneNumber = '';
8520
-
8521
- // Attempt to parse the value using libphonenumber-js
8522
- const parsed = min.parsePhoneNumberFromString(value);
8523
-
8524
- if (parsed) {
8525
- if (parsed.countryCallingCode) {
8526
- countryCode = `+${parsed.countryCallingCode}`;
8527
- }
8528
-
8529
- if (parsed.nationalNumber) {
8530
- phoneNumber = parsed.nationalNumber;
8531
- }
8532
- } else {
8533
- // Fallback: assume a dash separates country code and phone number
8534
- const [country, phone] = value.split('-');
8535
- countryCode = country || '';
8536
- phoneNumber = phone || '';
8537
- }
8538
-
8539
- return [countryCode, phoneNumber];
8540
- };
8541
-
8542
8293
  const componentName$D = getComponentName('phone-field-internal');
8543
8294
 
8544
- const commonAttrs = ['disabled', 'size', 'bordered', 'readonly', 'allow-alphanumeric-input'];
8545
- const countryAttrs = ['country-input-placeholder', 'default-code', 'restrict-countries'];
8546
- const phoneAttrs = ['phone-input-placeholder', 'maxlength', 'autocomplete', 'name'];
8547
- const labelTypeAttrs = ['label-type', 'country-input-label', 'label'];
8548
- const mapAttrs$1 = {
8549
- 'country-input-label': 'label',
8550
- 'country-input-placeholder': 'placeholder',
8551
- 'phone-input-placeholder': 'placeholder',
8552
- };
8553
-
8554
- const inputRelatedAttrs = [].concat(commonAttrs, countryAttrs, phoneAttrs, labelTypeAttrs);
8555
-
8556
- const BaseInputClass$4 = createBaseInputClass({ componentName: componentName$D, baseSelector: 'div' });
8557
-
8558
- let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$4 {
8559
- static get observedAttributes() {
8560
- return [].concat(BaseInputClass$4.observedAttributes || [], inputRelatedAttrs);
8561
- }
8562
-
8563
- constructor() {
8564
- super();
8565
-
8566
- this.innerHTML = `
8567
- <div class="wrapper">
8568
- <descope-combo-box
8569
- item-label-path="data-name"
8570
- item-value-path="data-id"
8571
- >
8572
- ${CountryCodes.map((item) => comboBoxItem(item)).join('')}
8573
- </descope-combo-box>
8574
- <div class="separator"></div>
8575
- <descope-text-field type="tel"></descope-text-field>
8576
- </div>
8577
- `;
8578
-
8579
- this.countryCodeInput = this.querySelector('descope-combo-box');
8580
- this.phoneNumberInput = this.querySelector('descope-text-field');
8581
- this.inputs = [this.countryCodeInput, this.phoneNumberInput];
8582
-
8583
- forwardAttrs(this, this.countryCodeInput, { includeAttrs: ['label-type'] });
8584
- forwardAttrs(this, this.phoneNumberInput, { includeAttrs: ['label-type', 'required'] });
8585
-
8586
- // override combo box setter to display dialCode value in input
8587
- this.countryCodeInput.customValueTransformFn = (val) => {
8588
- const [, dialCode] = val?.split?.(' ') || [];
8589
- return dialCode;
8590
- };
8591
- }
8592
-
8593
- get countryCodeInputData() {
8594
- return this.countryCodeInput.items;
8595
- }
8596
-
8597
- get allowAlphanumericInput() {
8598
- return this.getAttribute('allow-alphanumeric-input') === 'true';
8599
- }
8600
-
8601
- get value() {
8602
- if (!this.phoneNumberValue) {
8603
- return '';
8604
- }
8605
- return `${this.countryCodeInput.value}-${this.phoneNumberInput.value}`;
8606
- }
8607
-
8608
- set value(val) {
8609
- const [countryCode, phoneNumber] = parsePhoneNumber(val);
8610
-
8611
- this.#setCountryCode(countryCode);
8612
- this.#setPhoneNumber(phoneNumber);
8613
- }
8614
-
8615
- setSelectionRange(...args) {
8616
- this.phoneNumberInput.setSelectionRange(...args);
8617
- }
8618
-
8619
- get selectionStart() {
8620
- return this.phoneNumberInput.selectionStart;
8621
- }
8622
-
8623
- #setCountryCode(val) {
8624
- if (val) {
8625
- const countryCodeItem = this.getCountryByDialCode(val);
8626
- if (countryCodeItem) {
8627
- this.countryCodeInput.selectedItem = countryCodeItem;
8628
- }
8629
- } else {
8630
- this.countryCodeInput.selectedItem = undefined;
8631
- }
8632
- }
8633
-
8634
- #setPhoneNumber(val) {
8635
- if (this.phoneNumberInput.value === val) {
8636
- return;
8637
- }
8638
-
8639
- this.phoneNumberInput.value = val;
8640
- }
8641
-
8642
- get phoneNumberValue() {
8643
- return this.phoneNumberInput.value;
8644
- }
8645
-
8646
- get countryCodeValue() {
8647
- return this.countryCodeInput.shadowRoot.querySelector('input').value;
8648
- }
8649
-
8650
- get phoneNumberInputEle() {
8651
- return this.phoneNumberInput.shadowRoot.querySelector('input');
8652
- }
8653
-
8654
- get minLength() {
8655
- return parseInt(this.getAttribute('minlength'), 10) || 0;
8656
- }
8657
-
8658
- getValidity() {
8659
- const hasCode = this.countryCodeInput.value;
8660
- const hasPhone = this.phoneNumberInput.value;
8661
- const emptyValue = !hasCode || !hasPhone;
8662
- const hasMinPhoneLength =
8663
- this.phoneNumberInput.value?.length && this.phoneNumberInput.value.length < this.minLength;
8664
-
8665
- if (this.isRequired && emptyValue) {
8666
- return { valueMissing: true };
8667
- }
8668
- if (hasMinPhoneLength) {
8669
- return { tooShort: true };
8670
- }
8671
- if (hasPhone && !hasCode) {
8672
- return { valueMissing: true };
8673
- }
8674
- return {};
8675
- }
8676
-
8677
- init() {
8678
- this.addEventListener('focus', (e) => {
8679
- // we want to ignore focus events we are dispatching
8680
- if (e.isTrusted) this.inputs[1].focus();
8681
- });
8682
-
8683
- super.init?.();
8684
- this.initInputs();
8685
- }
8686
-
8687
- getRestrictedCountries() {
8688
- const attr = this.getAttribute('restrict-countries');
8689
- return attr ? attr.split(',') : [];
8690
- }
8691
-
8692
- getCountryByDialCode(countryDialCode) {
8693
- return this.countryCodeInput.items?.find((c) => c.getAttribute('data-id') === countryDialCode);
8694
- }
8695
-
8696
- getCountryByCodeId(countryCode) {
8697
- return this.countryCodeInput.items?.find(
8698
- (c) => c.getAttribute('data-country-code') === countryCode
8699
- );
8700
- }
8701
-
8702
- updateCountryCodeItems(restrictCountries) {
8703
- const items = restrictCountries.length
8704
- ? CountryCodes.filter((c) => restrictCountries.includes(c.code))
8705
- : CountryCodes;
8706
- this.querySelector('descope-combo-box').innerHTML = items
8707
- .map((item) => comboBoxItem(item))
8708
- .join('');
8709
- }
8710
-
8711
- handleDefaultCountryCode(countryCode) {
8712
- if (!this.countryCodeInput.value) {
8713
- const countryCodeItem = this.getCountryByCodeId(countryCode);
8714
- // When replacing the input component (inserting internal component into text-field) -
8715
- // Vaadin resets the input's value. We use setTimeout in order to make sure this happens
8716
- // after the reset.
8717
- if (countryCodeItem) {
8718
- setTimeout(() => {
8719
- this.countryCodeInput.selectedItem = countryCodeItem;
8720
- });
8721
- }
8722
- }
8723
- }
8724
-
8725
- initInputs() {
8726
- // Sanitize phone input value to filter everything but digits
8727
- this.phoneNumberInput.addEventListener('input', (e) => {
8728
- if (!this.allowAlphanumericInput) {
8729
- const telDigitsRegExp = /^\d$/;
8730
- const sanitizedInput = e.target.value
8731
- .split('')
8732
- .filter((char) => telDigitsRegExp.test(char))
8733
- .join('');
8734
- e.target.value = sanitizedInput;
8735
- }
8736
- });
8737
-
8738
- this.handleFocusEventsDispatching(this.inputs);
8739
- this.handleInputEventDispatching();
8740
- }
8741
-
8742
- handleLabelTypeAttrs(attrName, newValue) {
8743
- // set or remove label attributes from inner text/combo components on `label-type` change
8744
- const attr = mapAttrs$1[attrName] || attrName;
8745
-
8746
- if (attrName === 'label-type') {
8747
- this.onLabelTypeChange(newValue);
8748
- }
8749
- // on inner components label attr change - set label attributes for text/combo components
8750
- // only if label-type is `floating`
8751
- else if (this.getAttribute('label-type') === 'floating') {
8752
- if (attrName === 'country-input-label') {
8753
- this.countryCodeInput.setAttribute(attr, newValue);
8754
- } else if (attrName === 'label') {
8755
- this.phoneNumberInput.setAttribute(attr, newValue);
8756
- }
8757
- }
8758
- }
8759
-
8760
- onLabelTypeChange(newValue) {
8761
- if (newValue === 'floating') {
8762
- // on change to `floating` label - set inner components `label` and `placeholder`
8763
- this.countryCodeInput.setAttribute('label', this.getAttribute('country-input-label') || '');
8764
- this.countryCodeInput.setAttribute(
8765
- 'placeholder',
8766
- this.getAttribute('country-input-placeholder') || ''
8767
- );
8768
- this.phoneNumberInput.setAttribute('label', this.getAttribute('label') || '');
8769
- this.phoneNumberInput.setAttribute(
8770
- 'placeholder',
8771
- this.getAttribute('phone-input-placeholder') || ''
8772
- );
8773
- } else {
8774
- // for other cases - reset inner components label-type and labels
8775
- this.inputs.forEach((input) => input.removeAttribute('label'));
8776
- }
8777
- }
8778
-
8779
- attributeChangedCallback(attrName, oldValue, newValue) {
8780
- super.attributeChangedCallback(attrName, oldValue, newValue);
8781
-
8782
- if (oldValue !== newValue) {
8783
- if (attrName === 'default-code' && newValue) {
8784
- this.handleDefaultCountryCode(newValue);
8785
- } else if (inputRelatedAttrs.includes(attrName)) {
8786
- const attr = mapAttrs$1[attrName] || attrName;
8787
-
8788
- if (commonAttrs.includes(attrName)) {
8789
- this.inputs.forEach((input) => input.setAttribute(attr, newValue));
8790
- } else if (countryAttrs.includes(attrName)) {
8791
- this.countryCodeInput.setAttribute(attr, newValue);
8792
- } else if (phoneAttrs.includes(attrName)) {
8793
- this.phoneNumberInput.setAttribute(attr, newValue);
8794
- }
8795
- }
8796
-
8797
- if (labelTypeAttrs.includes(attrName)) {
8798
- this.handleLabelTypeAttrs(attrName, newValue);
8799
- }
8800
-
8801
- if (attrName === 'restrict-countries') {
8802
- this.updateCountryCodeItems(this.getRestrictedCountries());
8803
- }
8804
- }
8805
- }
8806
- };
8295
+ createBaseInputClass({ componentName: componentName$D, baseSelector: 'div' });
8807
8296
 
8808
8297
  const textVars$2 = TextFieldClass.cssVarList;
8809
8298
  const comboVars = ComboBoxClass.cssVarList;
@@ -8881,7 +8370,7 @@ const {
8881
8370
  countryCodeInput,
8882
8371
  phoneInput: phoneInput$1,
8883
8372
  separator: separator$1,
8884
- errorMessage: errorMessage$6,
8373
+ errorMessage: errorMessage$5,
8885
8374
  helperText: helperText$4,
8886
8375
  } = {
8887
8376
  host: { selector: () => ':host' },
@@ -8913,7 +8402,7 @@ const PhoneFieldClass = compose(
8913
8402
  ],
8914
8403
  fontFamily: [
8915
8404
  label$4,
8916
- errorMessage$6,
8405
+ errorMessage$5,
8917
8406
  helperText$4,
8918
8407
  {
8919
8408
  ...countryCodeInput,
@@ -8963,13 +8452,7 @@ const PhoneFieldClass = compose(
8963
8452
  { ...requiredIndicator$4, property: 'color' },
8964
8453
  ],
8965
8454
  labelRequiredIndicator: { ...requiredIndicator$4, property: 'content' },
8966
-
8967
- errorMessageTextColor: { ...errorMessage$6, property: 'color' },
8968
- errorMessageIcon: { ...errorMessage$6, property: 'background-image' },
8969
- errorMessageIconSize: { ...errorMessage$6, property: 'background-size' },
8970
- errorMessageIconPadding: { ...errorMessage$6, property: 'padding-inline-start' },
8971
- errorMessageIconRepeat: { ...errorMessage$6, property: 'background-repeat' },
8972
- errorMessageIconPosition: { ...errorMessage$6, property: 'background-position' },
8455
+ errorMessageTextColor: { ...errorMessage$5, property: 'color' },
8973
8456
 
8974
8457
  inputValueTextColor: [
8975
8458
  { ...phoneInput$1, property: textVars$2.inputValueTextColor },
@@ -9129,13 +8612,6 @@ const phoneField = {
9129
8612
  [vars$w.valueInputHeight]: refs.valueInputHeight,
9130
8613
  [vars$w.valueInputMarginBottom]: refs.valueInputMarginBottom,
9131
8614
 
9132
- // error message icon
9133
- [vars$w.errorMessageIcon]: refs.errorMessageIcon,
9134
- [vars$w.errorMessageIconSize]: refs.errorMessageIconSize,
9135
- [vars$w.errorMessageIconPadding]: refs.errorMessageIconPadding,
9136
- [vars$w.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
9137
- [vars$w.errorMessageIconPosition]: refs.errorMessageIconPosition,
9138
-
9139
8615
  // '@overlay': {
9140
8616
  // overlayItemBackgroundColor: 'red'
9141
8617
  // }
@@ -9147,176 +8623,9 @@ var phoneField$1 = /*#__PURE__*/Object.freeze({
9147
8623
  vars: vars$w
9148
8624
  });
9149
8625
 
9150
- const getCountryByCodeId = (countryCode) => {
9151
- return CountryCodes.find((c) => c.code === countryCode)?.dialCode;
9152
- };
9153
-
9154
8626
  const componentName$B = getComponentName('phone-field-internal-input-box');
9155
8627
 
9156
- const observedAttributes$2 = [
9157
- 'disabled',
9158
- 'size',
9159
- 'bordered',
9160
- 'invalid',
9161
- 'readonly',
9162
- 'phone-input-placeholder',
9163
- 'name',
9164
- 'autocomplete',
9165
- 'label-type',
9166
- 'allow-alphanumeric-input',
9167
- ];
9168
- const mapAttrs = {
9169
- 'phone-input-placeholder': 'placeholder',
9170
- };
9171
-
9172
- const BaseInputClass$3 = createBaseInputClass({ componentName: componentName$B, baseSelector: 'div' });
9173
-
9174
- class PhoneFieldInternal extends BaseInputClass$3 {
9175
- static get observedAttributes() {
9176
- return [].concat(BaseInputClass$3.observedAttributes || [], observedAttributes$2);
9177
- }
9178
-
9179
- constructor() {
9180
- super();
9181
-
9182
- this.innerHTML = `
9183
- <div>
9184
- <descope-text-field tabindex="1"></descope-text-field>
9185
- </div>
9186
- `;
9187
-
9188
- this.phoneNumberInput = this.querySelector('descope-text-field');
9189
- }
9190
-
9191
- get defaultCountryCode() {
9192
- return getCountryByCodeId(this.getAttribute('default-code'));
9193
- }
9194
-
9195
- get hasDefaultCode() {
9196
- return !!this.getAttribute('default-code');
9197
- }
9198
-
9199
- get allowAlphanumericInput() {
9200
- return this.getAttribute('allow-alphanumeric-input') === 'true';
9201
- }
9202
-
9203
- get value() {
9204
- if (!this.phoneNumberValue) {
9205
- return '';
9206
- }
9207
-
9208
- if (this.hasDefaultCode) {
9209
- // we want to transform phone numbers to a valid {dialCode}-{phoneNumber} format
9210
- // e.g.:
9211
- // +972-12345 => +972-12345
9212
- // 972-12345 => +972-12345
9213
- // 12345 => +972-12345
9214
- //
9215
- // we also want to handle any extra dash if added in the start of the phone number
9216
- // e.g.:
9217
- // +972--12345 => +972-12345
9218
- const pattern = new RegExp(`\\+?${parseInt(this.defaultCountryCode, 10)}--?`);
9219
- return `${this.defaultCountryCode}-${this.phoneNumberInput.value.replace(pattern, '')}`;
9220
- }
9221
-
9222
- return this.phoneNumberInput.value;
9223
- }
9224
-
9225
- set value(val) {
9226
- this.phoneNumberInput.value = val;
9227
- }
9228
-
9229
- get phoneNumberValue() {
9230
- return this.phoneNumberInput.value;
9231
- }
9232
-
9233
- get phoneNumberInputEle() {
9234
- return this.phoneNumberInput.shadowRoot.querySelector('input');
9235
- }
9236
-
9237
- get minLength() {
9238
- return parseInt(this.getAttribute('minlength'), 10) || 0;
9239
- }
9240
-
9241
- get maxLength() {
9242
- return parseInt(this.getAttribute('maxlength'), 10) || 50;
9243
- }
9244
-
9245
- getValidity() {
9246
- const validPhonePattern = /^\+?\d{1,4}-?(?:\d-?){1,15}$/;
9247
- const stripValue = this.value.replace(/\D/g, '');
9248
-
9249
- if (this.isRequired && !this.value) {
9250
- return { valueMissing: true };
9251
- }
9252
-
9253
- if (stripValue.length < this.minLength) {
9254
- return { tooShort: true };
9255
- }
9256
-
9257
- if (stripValue.length > this.maxLength) {
9258
- return { tooLong: true };
9259
- }
9260
-
9261
- if (!validPhonePattern.test(this.value)) {
9262
- return { patternMismatch: true };
9263
- }
9264
-
9265
- return {};
9266
- }
9267
-
9268
- init() {
9269
- this.addEventListener('focus', (e) => {
9270
- // we want to ignore focus events we are dispatching
9271
- if (e.isTrusted) this.phoneNumberInput.focus();
9272
- });
9273
-
9274
- super.init?.();
9275
- this.initInputs();
9276
- }
9277
-
9278
- getCountryByDialCode(countryDialCode) {
9279
- return this.countryCodeInput.items?.find(
9280
- (c) => c.getAttribute('data-country-code') === countryDialCode
9281
- );
9282
- }
9283
-
9284
- initInputs() {
9285
- // Sanitize phone input value to filter everything but digits
9286
- this.phoneNumberInput.addEventListener('input', (e) => {
9287
- if (e.target.value.length === 1 && e.target.value === '-') {
9288
- e.target.value = '';
9289
- }
9290
-
9291
- e.target.value = e.target.value
9292
- .replace(/(?!^)\+/g, '')
9293
- .replace('--', '-')
9294
- .replace('+-', '+');
9295
-
9296
- let sanitizedInput = e.target.value;
9297
- if (!this.allowAlphanumericInput) {
9298
- const telDigitsRegExp = /^[+\d-]+$/;
9299
- sanitizedInput = e.target.value
9300
- .split('')
9301
- .filter((char) => telDigitsRegExp.test(char))
9302
- .join('');
9303
- }
9304
-
9305
- e.target.value = sanitizedInput;
9306
- });
9307
-
9308
- this.handleFocusEventsDispatching([this.phoneNumberInput]);
9309
- }
9310
-
9311
- attributeChangedCallback(attrName, oldValue, newValue) {
9312
- super.attributeChangedCallback(attrName, oldValue, newValue);
9313
-
9314
- if (oldValue !== newValue && observedAttributes$2.includes(attrName)) {
9315
- const attr = mapAttrs[attrName] || attrName;
9316
- this.phoneNumberInput.setAttribute(attr, newValue);
9317
- }
9318
- }
9319
- }
8628
+ createBaseInputClass({ componentName: componentName$B, baseSelector: 'div' });
9320
8629
 
9321
8630
  const textVars$1 = TextFieldClass.cssVarList;
9322
8631
 
@@ -9374,7 +8683,7 @@ const {
9374
8683
  inputField: inputField$1,
9375
8684
  inputFieldInternal,
9376
8685
  phoneInput,
9377
- errorMessage: errorMessage$5,
8686
+ errorMessage: errorMessage$4,
9378
8687
  helperText: helperText$3,
9379
8688
  } = {
9380
8689
  host: { selector: () => ':host' },
@@ -9402,7 +8711,7 @@ const PhoneFieldInputBoxClass = compose(
9402
8711
  property: TextFieldClass.cssVarList.fontSize,
9403
8712
  },
9404
8713
  ],
9405
- fontFamily: [label$3, errorMessage$5, helperText$3],
8714
+ fontFamily: [label$3, errorMessage$4, helperText$3],
9406
8715
  hostWidth: { ...host$c, property: 'width' },
9407
8716
  hostMinWidth: { ...host$c, property: 'min-width' },
9408
8717
  hostDirection: { ...host$c, property: 'direction' },
@@ -9427,13 +8736,7 @@ const PhoneFieldInputBoxClass = compose(
9427
8736
  { ...requiredIndicator$3, property: 'color' },
9428
8737
  ],
9429
8738
  labelRequiredIndicator: { ...requiredIndicator$3, property: 'content' },
9430
- errorMessageTextColor: { ...errorMessage$5, property: 'color' },
9431
-
9432
- errorMessageIcon: { ...errorMessage$5, property: 'background-image' },
9433
- errorMessageIconSize: { ...errorMessage$5, property: 'background-size' },
9434
- errorMessageIconPadding: { ...errorMessage$5, property: 'padding-inline-start' },
9435
- errorMessageIconRepeat: { ...errorMessage$5, property: 'background-repeat' },
9436
- errorMessageIconPosition: { ...errorMessage$5, property: 'background-position' },
8739
+ errorMessageTextColor: { ...errorMessage$4, property: 'color' },
9437
8740
 
9438
8741
  inputValueTextColor: { ...phoneInput, property: textVars$1.inputValueTextColor },
9439
8742
 
@@ -9571,13 +8874,6 @@ const phoneInputBoxField = {
9571
8874
  [vars$v.valueInputMarginBottom]: refs.valueInputMarginBottom,
9572
8875
  [vars$v.inputHorizontalPadding]: '0',
9573
8876
 
9574
- // error message icon
9575
- [vars$v.errorMessageIcon]: refs.errorMessageIcon,
9576
- [vars$v.errorMessageIconSize]: refs.errorMessageIconSize,
9577
- [vars$v.errorMessageIconPadding]: refs.errorMessageIconPadding,
9578
- [vars$v.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
9579
- [vars$v.errorMessageIconPosition]: refs.errorMessageIconPosition,
9580
-
9581
8877
  _fullWidth: {
9582
8878
  [vars$v.hostWidth]: refs.width,
9583
8879
  },
@@ -9767,9 +9063,9 @@ class RawPolicyValidation extends createBaseClass({ componentName: componentName
9767
9063
  updateLabel(val) {
9768
9064
  if (!val) {
9769
9065
  this.classList.add('hide-label');
9770
- this.label.innerHTML = '';
9066
+ this.label.textContent = '';
9771
9067
  } else {
9772
- this.label.innerHTML = val;
9068
+ this.label.textContent = val;
9773
9069
  this.classList.remove('hide-label');
9774
9070
  }
9775
9071
  }
@@ -9900,7 +9196,7 @@ const {
9900
9196
  host: host$a,
9901
9197
  label: label$2,
9902
9198
  internalInputsWrapper,
9903
- errorMessage: errorMessage$4,
9199
+ errorMessage: errorMessage$3,
9904
9200
  helperText: helperText$2,
9905
9201
  passwordInput,
9906
9202
  policyPreview,
@@ -9925,16 +9221,11 @@ const NewPasswordClass = compose(
9925
9221
  property: PasswordClass.cssVarList.fontSize,
9926
9222
  },
9927
9223
  ],
9928
- fontFamily: [label$2, errorMessage$4, helperText$2],
9224
+ fontFamily: [label$2, errorMessage$3, helperText$2],
9929
9225
  labelFontSize: { ...label$2, property: 'font-size' },
9930
9226
  labelFontWeight: { ...label$2, property: 'font-weight' },
9931
9227
  labelTextColor: { ...label$2, property: 'color' },
9932
- errorMessageTextColor: { ...errorMessage$4, property: 'color' },
9933
- errorMessageIcon: { ...errorMessage$4, property: 'background-image' },
9934
- errorMessageIconSize: { ...errorMessage$4, property: 'background-size' },
9935
- errorMessageIconPadding: { ...errorMessage$4, property: 'padding-inline-start' },
9936
- errorMessageIconRepeat: { ...errorMessage$4, property: 'background-repeat' },
9937
- errorMessageIconPosition: { ...errorMessage$4, property: 'background-position' },
9228
+ errorMessageTextColor: { ...errorMessage$3, property: 'color' },
9938
9229
  hostWidth: { ...host$a, property: 'width' },
9939
9230
  hostMinWidth: { ...host$a, property: 'min-width' },
9940
9231
  hostDirection: [
@@ -10039,13 +9330,6 @@ const newPassword = {
10039
9330
  [vars$u.policyPreviewPadding]: globalRefs$l.spacing.lg,
10040
9331
  [vars$u.valueInputHeight]: refs.valueInputHeight,
10041
9332
 
10042
- // error message icon
10043
- [vars$u.errorMessageIcon]: refs.errorMessageIcon,
10044
- [vars$u.errorMessageIconSize]: refs.errorMessageIconSize,
10045
- [vars$u.errorMessageIconPadding]: refs.errorMessageIconPadding,
10046
- [vars$u.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
10047
- [vars$u.errorMessageIconPosition]: refs.errorMessageIconPosition,
10048
-
10049
9333
  _required: {
10050
9334
  // NewPassword doesn't pass `required` attribute to its Password components.
10051
9335
  // That's why we fake the required indicator on each input.
@@ -10222,15 +9506,15 @@ class RawUploadFile extends BaseInputClass$2 {
10222
9506
  }
10223
9507
 
10224
9508
  updateTitle(val) {
10225
- this.title.innerHTML = val;
9509
+ this.title.textContent = val;
10226
9510
  }
10227
9511
 
10228
9512
  updateDescription(val) {
10229
- this.description.innerHTML = val;
9513
+ this.description.textContent = val;
10230
9514
  }
10231
9515
 
10232
9516
  updateButtonLabel(val) {
10233
- this.button.innerHTML = val;
9517
+ this.button.textContent = val;
10234
9518
  }
10235
9519
 
10236
9520
  updateButtonSize(val) {
@@ -10769,7 +10053,7 @@ const buttonSelectionGroupBaseMixin = (superclass) =>
10769
10053
  }
10770
10054
  };
10771
10055
 
10772
- const { host: host$8, label: label$1, requiredIndicator: requiredIndicator$1, internalWrapper, errorMessage: errorMessage$3 } = {
10056
+ const { host: host$8, label: label$1, requiredIndicator: requiredIndicator$1, internalWrapper, errorMessage: errorMessage$2 } = {
10773
10057
  host: { selector: () => ':host' },
10774
10058
  label: { selector: '::part(label)' },
10775
10059
  requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
@@ -10786,12 +10070,7 @@ const buttonSelectionGroupMappings = {
10786
10070
  { ...requiredIndicator$1, property: 'color' },
10787
10071
  ],
10788
10072
  labelRequiredIndicator: { ...requiredIndicator$1, property: 'content' },
10789
- errorMessageTextColor: { ...errorMessage$3, property: 'color' },
10790
- errorMessageIcon: { ...errorMessage$3, property: 'background-image' },
10791
- errorMessageIconSize: { ...errorMessage$3, property: 'background-size' },
10792
- errorMessageIconPadding: { ...errorMessage$3, property: 'padding-inline-start' },
10793
- errorMessageIconRepeat: { ...errorMessage$3, property: 'background-repeat' },
10794
- errorMessageIconPosition: { ...errorMessage$3, property: 'background-position' },
10073
+ errorMessageTextColor: { ...errorMessage$2, property: 'color' },
10795
10074
  itemsSpacing: { ...internalWrapper, property: 'gap' },
10796
10075
  };
10797
10076
 
@@ -10907,17 +10186,9 @@ const createBaseButtonSelectionGroupMappings = (vars) => ({
10907
10186
  [vars.fontFamily]: refs.fontFamily,
10908
10187
  [vars.labelTextColor]: refs.labelTextColor,
10909
10188
  [vars.labelRequiredIndicator]: refs.requiredIndicator,
10189
+ [vars.errorMessageTextColor]: refs.errorMessageTextColor,
10910
10190
  [vars.itemsSpacing]: globalRefs$j.spacing.sm,
10911
10191
  [vars.hostWidth]: refs.width,
10912
-
10913
- [vars.errorMessageTextColor]: refs.errorMessageTextColor,
10914
-
10915
- // error message icon
10916
- [vars.errorMessageIcon]: refs.errorMessageIcon,
10917
- [vars.errorMessageIconSize]: refs.errorMessageIconSize,
10918
- [vars.errorMessageIconPadding]: refs.errorMessageIconPadding,
10919
- [vars.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
10920
- [vars.errorMessageIconPosition]: refs.errorMessageIconPosition,
10921
10192
  });
10922
10193
 
10923
10194
  const vars$r = ButtonSelectionGroupClass.cssVarList;
@@ -11256,7 +10527,7 @@ const renderCodeSnippet = (value, lang) =>
11256
10527
 
11257
10528
  const renderText = (text) =>
11258
10529
  `<div class="row-details__value text" title="${text}">${text}</div>`;
11259
- const renderJson = (value) => renderCodeSnippet(JSON.stringify(value, null, 2), 'json');
10530
+ const renderJson = (value) => renderCodeSnippet(escapeXML(JSON.stringify(value, null, 2)), 'json');
11260
10531
  const renderXml = (value) => renderCodeSnippet(escapeXML(value), 'xml');
11261
10532
 
11262
10533
  const defaultRowDetailsValueRenderer = (value) => {
@@ -12277,7 +11548,7 @@ const {
12277
11548
  label,
12278
11549
  requiredIndicator,
12279
11550
  helperText: helperText$1,
12280
- errorMessage: errorMessage$2,
11551
+ errorMessage: errorMessage$1,
12281
11552
  chip,
12282
11553
  chipLabel,
12283
11554
  overflowChipFirstBorder,
@@ -12311,19 +11582,14 @@ const MultiSelectComboBoxClass = compose(
12311
11582
  // we apply font-size also on the host so we can set its width with em
12312
11583
  fontSize: [{}, host$6],
12313
11584
  chipFontSize: { ...chipLabel, property: 'font-size' },
12314
- fontFamily: [label, placeholder, inputField, helperText$1, errorMessage$2, chipLabel],
11585
+ fontFamily: [label, placeholder, inputField, helperText$1, errorMessage$1, chipLabel],
12315
11586
  labelFontSize: { ...label, property: 'font-size' },
12316
11587
  labelFontWeight: { ...label, property: 'font-weight' },
12317
11588
  labelTextColor: [
12318
11589
  { ...label, property: 'color' },
12319
11590
  { ...requiredIndicator, property: 'color' },
12320
11591
  ],
12321
- errorMessageTextColor: { ...errorMessage$2, property: 'color' },
12322
- errorMessageIcon: { ...errorMessage$2, property: 'background-image' },
12323
- errorMessageIconSize: { ...errorMessage$2, property: 'background-size' },
12324
- errorMessageIconPadding: { ...errorMessage$2, property: 'padding-inline-start' },
12325
- errorMessageIconRepeat: { ...errorMessage$2, property: 'background-repeat' },
12326
- errorMessageIconPosition: { ...errorMessage$2, property: 'background-position' },
11592
+ errorMessageTextColor: { ...errorMessage$1, property: 'color' },
12327
11593
  inputHeight: { ...inputField, property: 'min-height' },
12328
11594
  inputBackgroundColor: { ...inputField, property: 'background-color' },
12329
11595
  inputBorderColor: { ...inputField, property: 'border-color' },
@@ -12570,13 +11836,6 @@ const multiSelectComboBox = {
12570
11836
  [vars$m.placeholderOpacity]: refs.placeholderOpacity,
12571
11837
  [vars$m.inputVerticalAlignment]: refs.inputVerticalAlignment,
12572
11838
 
12573
- // error message icon
12574
- [vars$m.errorMessageIcon]: refs.errorMessageIcon,
12575
- [vars$m.errorMessageIconSize]: refs.errorMessageIconSize,
12576
- [vars$m.errorMessageIconPadding]: refs.errorMessageIconPadding,
12577
- [vars$m.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
12578
- [vars$m.errorMessageIconPosition]: refs.errorMessageIconPosition,
12579
-
12580
11839
  labelType: {
12581
11840
  floating: {
12582
11841
  [vars$m.inputHorizontalPadding]: '0.25em',
@@ -12939,9 +12198,6 @@ const customMixin$4 = (superclass) =>
12939
12198
  'invalid',
12940
12199
  'readonly',
12941
12200
  'disabled',
12942
- 'st-error-message-icon',
12943
- 'st-error-message-icon-size',
12944
- 'st-error-message-icon-padding',
12945
12201
  ],
12946
12202
  });
12947
12203
 
@@ -12956,7 +12212,7 @@ const customMixin$4 = (superclass) =>
12956
12212
  const {
12957
12213
  host: host$4,
12958
12214
  helperText,
12959
- errorMessage: errorMessage$1,
12215
+ errorMessage,
12960
12216
  mappingItem,
12961
12217
  labels,
12962
12218
  labelsText,
@@ -12986,7 +12242,7 @@ const MappingsFieldClass = compose(
12986
12242
  hostDirection: { ...host$4, property: 'direction' },
12987
12243
  // we apply font-size also on the host so we can set its width with em
12988
12244
  fontSize: [{}, host$4, { ...separator, property: 'margin-top' }],
12989
- fontFamily: [helperText, errorMessage$1, labels],
12245
+ fontFamily: [helperText, errorMessage, labels],
12990
12246
  separatorFontSize: { ...separator, property: 'font-size' },
12991
12247
  labelsFontSize: { ...labelsText, property: 'font-size' },
12992
12248
  labelsLineHeight: [
@@ -13614,10 +12870,9 @@ const customMixin$3 = (superclass) =>
13614
12870
  }
13615
12871
  };
13616
12872
 
13617
- const { host: host$1, groupInput, errorMessage } = {
12873
+ const { host: host$1, groupInput } = {
13618
12874
  host: { selector: () => ':host' },
13619
12875
  groupInput: { selector: 'descope-text-field' },
13620
- errorMessage: { selector: '::part(error-message)' },
13621
12876
  };
13622
12877
 
13623
12878
  const SamlGroupMappingsClass = compose(
@@ -13626,11 +12881,6 @@ const SamlGroupMappingsClass = compose(
13626
12881
  hostWidth: { ...host$1, property: 'width' },
13627
12882
  hostDirection: { ...host$1, property: 'direction' },
13628
12883
  groupNameInputMarginBottom: { ...groupInput, property: 'margin-bottom' },
13629
- errorMessageIcon: { ...errorMessage, property: 'background-image' },
13630
- errorMessageIconSize: { ...errorMessage, property: 'background-size' },
13631
- errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },
13632
- errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },
13633
- errorMessageIconPosition: { ...errorMessage, property: 'background-position' },
13634
12884
  },
13635
12885
  }),
13636
12886
  draggableMixin,
@@ -13686,13 +12936,6 @@ const samlGroupMappings = {
13686
12936
  [vars$g.hostWidth]: refs.width,
13687
12937
  [vars$g.hostDirection]: refs.direction,
13688
12938
  [vars$g.groupNameInputMarginBottom]: '1em',
13689
-
13690
- // error message icon
13691
- [vars$g.errorMessageIcon]: refs.errorMessageIcon,
13692
- [vars$g.errorMessageIconSize]: refs.errorMessageIconSize,
13693
- [vars$g.errorMessageIconPadding]: refs.errorMessageIconPadding,
13694
- [vars$g.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
13695
- [vars$g.errorMessageIconPosition]: refs.errorMessageIconPosition,
13696
12939
  };
13697
12940
 
13698
12941
  var samlGroupMappings$1 = /*#__PURE__*/Object.freeze({
@@ -14384,11 +13627,6 @@ const radioGroup = {
14384
13627
  [vars$c.labelTextColor]: refs.labelTextColor,
14385
13628
  [vars$c.labelRequiredIndicator]: refs.requiredIndicator,
14386
13629
  [vars$c.errorMessageTextColor]: refs.errorMessageTextColor,
14387
- [vars$c.errorMessageIcon]: refs.errorMessageIcon,
14388
- [vars$c.errorMessageIconSize]: refs.errorMessageIconSize,
14389
- [vars$c.errorMessageIconPadding]: refs.errorMessageIconPadding,
14390
- [vars$c.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
14391
- [vars$c.errorMessageIconPosition]: refs.errorMessageIconPosition,
14392
13630
  [vars$c.helperTextColor]: refs.helperTextColor,
14393
13631
  [vars$c.itemsLabelColor]: globalRefs$7.colors.surface.contrast,
14394
13632
 
@@ -15024,9 +14262,7 @@ class RawCalendar extends BaseInputClass$1 {
15024
14262
  this.monthInput.value = month;
15025
14263
  // For the yearInput we update the base element directly to properly trigger the change event
15026
14264
  // since this can be a custom value
15027
- setTimeout(() => {
15028
- this.yearInput.baseElement.value = year;
15029
- });
14265
+ this.yearInput.baseElement.value = year;
15030
14266
  }
15031
14267
  }
15032
14268
 
@@ -15165,10 +14401,11 @@ class RawCalendar extends BaseInputClass$1 {
15165
14401
  }
15166
14402
 
15167
14403
  onMonthNamesChange() {
15168
- setTimeout(() => {
15169
- if (this.monthInput) {
15170
- this.monthInput.innerHTML = getMonthsOptions(this.monthNames);
15171
- }
14404
+ Array.from(this.monthInput?.children || []).forEach((child, index) => {
14405
+ const month = this.monthNames[index];
14406
+ child.setAttribute('data-name', month);
14407
+ // eslint-disable-next-line no-param-reassign
14408
+ child.textContent = month;
15172
14409
  });
15173
14410
  }
15174
14411
 
@@ -17157,9 +16394,6 @@ const attrsToSync$1 = [
17157
16394
  'answer-label',
17158
16395
  'answer-placeholder',
17159
16396
  'answer-data-errormessage-value-missing',
17160
- 'st-error-message-icon',
17161
- 'st-error-message-icon-size',
17162
- 'st-error-message-icon-padding',
17163
16397
  ];
17164
16398
 
17165
16399
  const attrsToReRender$1 = ['count', 'questions'];
@@ -17401,9 +16635,6 @@ const textFieldsAttrs = [
17401
16635
  'size',
17402
16636
  'answer-placeholder',
17403
16637
  'answer-data-errormessage-value-missing',
17404
- 'st-error-message-icon',
17405
- 'st-error-message-icon-size',
17406
- 'st-error-message-icon-padding',
17407
16638
  ];
17408
16639
 
17409
16640
  const textsAttrs = ['question-mode'];
@@ -17592,27 +16823,6 @@ const SecurityQuestionsVerifyClass = compose(
17592
16823
  selector: () => TextClass.componentName,
17593
16824
  property: 'cursor',
17594
16825
  },
17595
-
17596
- errorMessageIcon: {
17597
- selector: () => TextClass.componentName,
17598
- property: TextClass.cssVarList.errorMessageIcon,
17599
- },
17600
- errorMessageIconSize: {
17601
- selector: () => TextClass.componentName,
17602
- property: TextClass.cssVarList.errorMessageSize,
17603
- },
17604
- errorMessageIconPadding: {
17605
- selector: () => TextClass.componentName,
17606
- property: TextClass.cssVarList.errorMessagePadding,
17607
- },
17608
- errorMessageIconRepeat: {
17609
- selector: () => TextClass.componentName,
17610
- property: TextClass.cssVarList.errorMessageRepeat,
17611
- },
17612
- errorMessageIconPosition: {
17613
- selector: () => TextClass.componentName,
17614
- property: TextClass.cssVarList.errorMessagePosition,
17615
- },
17616
16826
  },
17617
16827
  }),
17618
16828
  draggableMixin,
@@ -17643,18 +16853,6 @@ const isNumericValue = (val) => NUMERIC_RE.test(val.replaceAll('+', '').replaceA
17643
16853
 
17644
16854
  const sanitizeCountryCodePrefix = (val) => val.replace(/\+\d+-/, '');
17645
16855
 
17646
- customElements.define(componentName$F, ComboBoxClass);
17647
-
17648
- customElements.define(componentName$_, TextFieldClass);
17649
-
17650
- customElements.define(componentName$D, PhoneFieldInternal$1);
17651
-
17652
- customElements.define(componentName$C, PhoneFieldClass);
17653
-
17654
- customElements.define(componentName$B, PhoneFieldInternal);
17655
-
17656
- customElements.define(componentName$A, PhoneFieldInputBoxClass);
17657
-
17658
16856
  const componentName$2 = getComponentName('hybrid-field');
17659
16857
 
17660
16858
  const attrs = {
@@ -17667,9 +16865,6 @@ const attrs = {
17667
16865
  'readonly',
17668
16866
  'required',
17669
16867
  'st-host-direction',
17670
- 'st-error-message-icon',
17671
- 'st-error-message-icon-size',
17672
- 'st-error-message-icon-padding',
17673
16868
  ],
17674
16869
  email: [
17675
16870
  'label',
@@ -17955,56 +17150,6 @@ const HybridFieldClass = compose(
17955
17150
  { selector: () => 'descope-phone-field', property: 'direction' },
17956
17151
  { selector: () => 'descope-phone-input-box-field', property: 'direction' },
17957
17152
  ],
17958
- errorMessageIcon: [
17959
- {
17960
- selector: () => PhoneFieldClass.componentName,
17961
- property: PhoneFieldClass.cssVarList.errorMessageIcon,
17962
- },
17963
- {
17964
- selector: () => PhoneFieldInputBoxClass.componentName,
17965
- property: PhoneFieldInputBoxClass.cssVarList.errorMessageIcon,
17966
- },
17967
- ],
17968
- errorMessageIconSize: [
17969
- {
17970
- selector: () => PhoneFieldClass.componentName,
17971
- property: PhoneFieldClass.cssVarList.errorMessageIconSize,
17972
- },
17973
- {
17974
- selector: () => PhoneFieldInputBoxClass.componentName,
17975
- property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconSize,
17976
- },
17977
- ],
17978
- errorMessageIconPadding: [
17979
- {
17980
- selector: () => PhoneFieldClass.componentName,
17981
- property: PhoneFieldClass.cssVarList.errorMessageIconPadding,
17982
- },
17983
- {
17984
- selector: () => PhoneFieldInputBoxClass.componentName,
17985
- property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPadding,
17986
- },
17987
- ],
17988
- errorMessageIconRepeat: [
17989
- {
17990
- selector: () => PhoneFieldClass.componentName,
17991
- property: PhoneFieldClass.cssVarList.errorMessageIconRepeat,
17992
- },
17993
- {
17994
- selector: () => PhoneFieldInputBoxClass.componentName,
17995
- property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconRepeat,
17996
- },
17997
- ],
17998
- errorMessageIconPosition: [
17999
- {
18000
- selector: () => PhoneFieldClass.componentName,
18001
- property: PhoneFieldClass.cssVarList.errorMessageIconPosition,
18002
- },
18003
- {
18004
- selector: () => PhoneFieldInputBoxClass.componentName,
18005
- property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPosition,
18006
- },
18007
- ],
18008
17153
  },
18009
17154
  }),
18010
17155
  draggableMixin,
@@ -18016,13 +17161,6 @@ const vars$1 = HybridFieldClass.cssVarList;
18016
17161
  const hybridField = {
18017
17162
  [vars$1.hostDirection]: refs.direction,
18018
17163
 
18019
- // error message icon
18020
- [vars$1.errorMessageIcon]: refs.errorMessageIcon,
18021
- [vars$1.errorMessageIconSize]: refs.errorMessageIconSize,
18022
- [vars$1.errorMessageIconPadding]: refs.errorMessageIconPadding,
18023
- [vars$1.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
18024
- [vars$1.errorMessageIconPosition]: refs.errorMessageIconPosition,
18025
-
18026
17164
  _fullWidth: {
18027
17165
  [vars$1.hostWidth]: '100%',
18028
17166
  },
@@ -18178,10 +17316,6 @@ class RawRecaptcha extends BaseClass {
18178
17316
  return;
18179
17317
  }
18180
17318
 
18181
- this.toggleRecaptchaEles(enabled);
18182
- }
18183
-
18184
- toggleRecaptchaEles(enabled) {
18185
17319
  if (enabled) {
18186
17320
  this.recaptchaEle.style.display = '';
18187
17321
  this.mockRecaptchaEle.style.display = 'none';
@@ -18246,7 +17380,6 @@ class RawRecaptcha extends BaseClass {
18246
17380
  this.mockRecaptchaEle.style.display = 'none';
18247
17381
  this.badge.classList.add('hidden');
18248
17382
  } else {
18249
- this.toggleRecaptchaEles(this.enabled);
18250
17383
  this.badge.classList.remove('hidden');
18251
17384
  }
18252
17385
  }