@descope/web-components-ui 1.0.409 → 1.0.411
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.
- package/dist/cjs/index.cjs.js +823 -49
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +339 -40
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1012.js +148 -0
- package/dist/umd/{7607.js.LICENSE.txt → 1012.js.LICENSE.txt} +6 -0
- package/dist/umd/{7407.js → 1180.js} +5 -117
- package/dist/umd/{7407.js.LICENSE.txt → 1180.js.LICENSE.txt} +6 -0
- package/dist/umd/{8980.js → 1221.js} +5 -5
- package/dist/umd/{8980.js.LICENSE.txt → 1221.js.LICENSE.txt} +6 -0
- package/dist/umd/1437.js +6 -6
- package/dist/umd/{1053.js → 1497.js} +19 -19
- package/dist/umd/{1053.js.LICENSE.txt → 1497.js.LICENSE.txt} +6 -0
- package/dist/umd/2520.js +1 -0
- package/dist/umd/2584.js +123 -0
- package/dist/umd/286.js +2 -2
- package/dist/umd/351.js +7 -7
- package/dist/umd/3607.js +1 -1
- package/dist/umd/3607.js.LICENSE.txt +6 -0
- package/dist/umd/4480.js +1 -1
- package/dist/umd/{1414.js → 4671.js} +10 -122
- package/dist/umd/{1414.js.LICENSE.txt → 4671.js.LICENSE.txt} +6 -0
- package/dist/umd/4771.js +129 -0
- package/dist/umd/481.js +2 -0
- package/dist/umd/4834.js +4 -4
- package/dist/umd/5021.js +170 -0
- package/dist/umd/5086.js +2 -2
- package/dist/umd/5273.js +4 -4
- package/dist/umd/5412.js +2 -2
- package/dist/umd/5443.js +4 -116
- package/dist/umd/{6637.js → 6206.js} +9 -9
- package/dist/umd/{6637.js.LICENSE.txt → 6206.js.LICENSE.txt} +0 -6
- package/dist/umd/6474.js +6 -6
- package/dist/umd/{7607.js → 7200.js} +16 -16
- package/dist/umd/7824.js +4 -116
- package/dist/umd/7871.js +452 -0
- package/dist/umd/8082.js +319 -0
- package/dist/umd/{7212.js → 8114.js} +16 -16
- package/dist/umd/{7212.js.LICENSE.txt → 8114.js.LICENSE.txt} +6 -0
- package/dist/umd/8677.js +275 -0
- package/dist/umd/{9632.js.LICENSE.txt → 8677.js.LICENSE.txt} +6 -0
- package/dist/umd/{5026.js → 8799.js} +5 -117
- package/dist/umd/{5026.js.LICENSE.txt → 8799.js.LICENSE.txt} +6 -0
- package/dist/umd/8910.js +832 -0
- package/dist/umd/{2919.js.LICENSE.txt → 8910.js.LICENSE.txt} +6 -0
- package/dist/umd/952.js +2 -0
- package/dist/umd/{2566.js.LICENSE.txt → 952.js.LICENSE.txt} +0 -6
- package/dist/umd/{8162.js → 9547.js} +3 -3
- package/dist/umd/{8162.js.LICENSE.txt → 9547.js.LICENSE.txt} +6 -0
- package/dist/umd/DescopeDev.js +1674 -1
- package/dist/umd/DescopeDev.js.LICENSE.txt +92 -0
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/descope-apps-list-index-js.js +1 -1
- package/dist/umd/descope-avatar-index-js.js +1 -1
- package/dist/umd/descope-button-index-js.js +4 -116
- package/dist/umd/descope-combo-box-index-js.js +14 -14
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +4 -4
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -4
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt +0 -6
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +19 -4
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.LICENSE.txt +18 -0
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.LICENSE.txt +0 -6
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +2 -2
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +0 -6
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +3 -3
- package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +2 -1
- package/dist/umd/descope-new-password-index-js.js.LICENSE.txt +5 -0
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-password-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
- package/dist/umd/descope-security-questions-verify-index-js.js.LICENSE.txt +6 -0
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +2 -2
- package/dist/umd/descope-text-field-index-js.js.LICENSE.txt +6 -0
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.LICENSE.txt +6 -0
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +15 -15
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.LICENSE.txt +6 -0
- package/package.json +1 -1
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +5 -0
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +6 -0
- package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +5 -0
- package/src/components/descope-combo-box/ComboBoxClass.js +5 -0
- package/src/components/descope-hybrid-field/HybridFieldClass.js +55 -0
- package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +5 -0
- package/src/components/descope-new-password/NewPasswordClass.js +5 -0
- package/src/components/descope-passcode/PasscodeClass.js +5 -0
- package/src/components/descope-password/PasswordClass.js +5 -0
- package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +3 -0
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +24 -0
- package/src/components/descope-text-area/TextAreaClass.js +5 -0
- package/src/components/descope-text-field/textFieldMappings.js +6 -0
- package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +3 -0
- package/src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js +10 -1
- package/src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js +13 -1
- package/src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js +7 -1
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +6 -0
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +6 -0
- package/src/theme/components/buttonSelectionGroup/baseButtonSelectionGroup.js +9 -1
- package/src/theme/components/checkbox.js +7 -0
- package/src/theme/components/comboBox.js +7 -0
- package/src/theme/components/emailField.js +7 -0
- package/src/theme/components/hybridField.js +7 -0
- package/src/theme/components/inputWrapper.js +6 -0
- package/src/theme/components/multiSelectComboBox.js +7 -0
- package/src/theme/components/newPassword.js +7 -0
- package/src/theme/components/numberField.js +7 -0
- package/src/theme/components/passcode.js +7 -0
- package/src/theme/components/password.js +7 -0
- package/src/theme/components/phoneField.js +7 -0
- package/src/theme/components/phoneInputBoxField.js +7 -0
- package/src/theme/components/radioGroup/radioGroup.js +5 -0
- package/src/theme/components/samlGroupMappings.js +7 -0
- package/src/theme/components/switchToggle.js +7 -0
- package/src/theme/components/textArea.js +8 -0
- package/src/theme/components/textField.js +7 -0
- package/dist/umd/2566.js +0 -2
- package/dist/umd/2755.js +0 -1
- package/dist/umd/2919.js +0 -832
- package/dist/umd/3222.js +0 -282
- package/dist/umd/3711.js +0 -123
- package/dist/umd/6418.js +0 -2
- package/dist/umd/6726.js +0 -148
- package/dist/umd/8164.js +0 -319
- package/dist/umd/9167.js +0 -452
- package/dist/umd/9632.js +0 -275
- package/dist/umd/9895.js +0 -17
- /package/dist/umd/{3711.js.LICENSE.txt → 2584.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3222.js.LICENSE.txt → 4771.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6418.js.LICENSE.txt → 481.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9895.js.LICENSE.txt → 5021.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6726.js.LICENSE.txt → 7200.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9167.js.LICENSE.txt → 7871.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8164.js.LICENSE.txt → 8082.js.LICENSE.txt} +0 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -5,8 +5,12 @@ var Color = require('color');
|
|
5
5
|
var DOMPurify = require('dompurify');
|
6
6
|
var MarkdownIt = require('markdown-it');
|
7
7
|
require('lodash.debounce');
|
8
|
-
require('libphonenumber-js/min');
|
8
|
+
var min = 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');
|
10
14
|
|
11
15
|
const DESCOPE_PREFIX = 'descope';
|
12
16
|
const CSS_SELECTOR_SPECIFIER_MULTIPLY = 3;
|
@@ -2031,7 +2035,7 @@ const createProxy = ({
|
|
2031
2035
|
|
2032
2036
|
})();
|
2033
2037
|
|
2034
|
-
const observedAttributes$
|
2038
|
+
const observedAttributes$5 = ['required', 'pattern'];
|
2035
2039
|
|
2036
2040
|
const errorAttributes = {
|
2037
2041
|
valueMissing: 'data-errormessage-value-missing',
|
@@ -2050,7 +2054,7 @@ const inputValidationMixin = (superclass) =>
|
|
2050
2054
|
#validationTarget = validationTargetSymbol;
|
2051
2055
|
|
2052
2056
|
static get observedAttributes() {
|
2053
|
-
return [...(superclass.observedAttributes || []), ...observedAttributes$
|
2057
|
+
return [...(superclass.observedAttributes || []), ...observedAttributes$5];
|
2054
2058
|
}
|
2055
2059
|
|
2056
2060
|
static get formAssociated() {
|
@@ -2222,7 +2226,7 @@ const inputValidationMixin = (superclass) =>
|
|
2222
2226
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
2223
2227
|
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
2224
2228
|
|
2225
|
-
if (observedAttributes$
|
2229
|
+
if (observedAttributes$5.includes(attrName)) {
|
2226
2230
|
this.#setValidity();
|
2227
2231
|
}
|
2228
2232
|
}
|
@@ -3371,7 +3375,7 @@ const {
|
|
3371
3375
|
input: input$1,
|
3372
3376
|
inputMask,
|
3373
3377
|
helperText: helperText$a,
|
3374
|
-
errorMessage: errorMessage$
|
3378
|
+
errorMessage: errorMessage$d,
|
3375
3379
|
disabledPlaceholder,
|
3376
3380
|
inputDisabled,
|
3377
3381
|
inputIcon,
|
@@ -3404,7 +3408,7 @@ const {
|
|
3404
3408
|
var textFieldMappings = {
|
3405
3409
|
// we apply font-size also on the host so we can set its width with em
|
3406
3410
|
fontSize: [{}, host$n],
|
3407
|
-
fontFamily: [label$9, inputField$6, helperText$a, errorMessage$
|
3411
|
+
fontFamily: [label$9, inputField$6, helperText$a, errorMessage$d],
|
3408
3412
|
|
3409
3413
|
labelFontSize: { ...label$9, property: 'font-size' },
|
3410
3414
|
labelFontWeight: { ...label$9, property: 'font-weight' },
|
@@ -3426,7 +3430,13 @@ var textFieldMappings = {
|
|
3426
3430
|
{ ...inputMask, property: 'background-color' },
|
3427
3431
|
],
|
3428
3432
|
|
3429
|
-
errorMessageTextColor: { ...errorMessage$
|
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
|
+
|
3430
3440
|
helperTextColor: { ...helperText$a, property: '-webkit-text-fill-color' },
|
3431
3441
|
|
3432
3442
|
inputValueTextColor: [
|
@@ -3820,6 +3830,12 @@ const [theme$1, refs, vars$R] = createHelperVars(
|
|
3820
3830
|
|
3821
3831
|
overlayOpacity: '0.3',
|
3822
3832
|
|
3833
|
+
errorMessageIcon: '',
|
3834
|
+
errorMessageIconSize: '0',
|
3835
|
+
errorMessageIconPadding: '0',
|
3836
|
+
errorMessageIconPosition: '0 0.4em',
|
3837
|
+
errorMessageIconRepeat: 'no-repeat',
|
3838
|
+
|
3823
3839
|
size: {
|
3824
3840
|
xs: { fontSize: '12px', chipFontSize: '10px' },
|
3825
3841
|
sm: { fontSize: '14px', chipFontSize: '12px' },
|
@@ -3951,6 +3967,13 @@ const textField$1 = {
|
|
3951
3967
|
[vars$Q.inputIconOffset]: globalRefs$w.spacing.md,
|
3952
3968
|
[vars$Q.inputIconSize]: refs.inputIconSize,
|
3953
3969
|
[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,
|
3954
3977
|
};
|
3955
3978
|
|
3956
3979
|
var textField$2 = /*#__PURE__*/Object.freeze({
|
@@ -4116,7 +4139,7 @@ const {
|
|
4116
4139
|
revealButtonIcon,
|
4117
4140
|
label: label$8,
|
4118
4141
|
requiredIndicator: requiredIndicator$a,
|
4119
|
-
errorMessage: errorMessage$
|
4142
|
+
errorMessage: errorMessage$c,
|
4120
4143
|
helperText: helperText$9,
|
4121
4144
|
} = {
|
4122
4145
|
host: { selector: () => ':host' },
|
@@ -4138,7 +4161,7 @@ const PasswordClass = compose(
|
|
4138
4161
|
hostMinWidth: { ...host$m, property: 'min-width' },
|
4139
4162
|
hostDirection: { ...host$m, property: 'direction' },
|
4140
4163
|
fontSize: [{}, host$m],
|
4141
|
-
fontFamily: [label$8, inputField$5, errorMessage$
|
4164
|
+
fontFamily: [label$8, inputField$5, errorMessage$c, helperText$9],
|
4142
4165
|
inputHeight: { ...inputField$5, property: 'height' },
|
4143
4166
|
inputHorizontalPadding: [
|
4144
4167
|
{ ...inputElement$3, property: 'padding-left' },
|
@@ -4163,7 +4186,12 @@ const PasswordClass = compose(
|
|
4163
4186
|
{ ...requiredIndicator$a, property: 'color' },
|
4164
4187
|
],
|
4165
4188
|
labelRequiredIndicator: { ...requiredIndicator$a, property: 'content' },
|
4166
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
4167
4195
|
|
4168
4196
|
inputPlaceholderTextColor: [
|
4169
4197
|
{ ...inputElementPlaceholder, property: 'color' },
|
@@ -4318,6 +4346,13 @@ const password = {
|
|
4318
4346
|
[vars$P.placeholderOpacity]: refs.placeholderOpacity,
|
4319
4347
|
[vars$P.inputVerticalAlignment]: refs.inputVerticalAlignment,
|
4320
4348
|
[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,
|
4321
4356
|
};
|
4322
4357
|
|
4323
4358
|
var password$1 = /*#__PURE__*/Object.freeze({
|
@@ -4400,6 +4435,13 @@ const numberField = {
|
|
4400
4435
|
[vars$O.inputVerticalAlignment]: refs.inputVerticalAlignment,
|
4401
4436
|
[vars$O.valueInputHeight]: refs.valueInputHeight,
|
4402
4437
|
[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,
|
4403
4445
|
};
|
4404
4446
|
|
4405
4447
|
var numberField$1 = /*#__PURE__*/Object.freeze({
|
@@ -4517,6 +4559,13 @@ const emailField = {
|
|
4517
4559
|
[vars$N.inputVerticalAlignment]: refs.inputVerticalAlignment,
|
4518
4560
|
[vars$N.valueInputHeight]: refs.valueInputHeight,
|
4519
4561
|
[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,
|
4520
4569
|
};
|
4521
4570
|
|
4522
4571
|
var emailField$1 = /*#__PURE__*/Object.freeze({
|
@@ -4535,7 +4584,7 @@ const {
|
|
4535
4584
|
textArea: textArea$2,
|
4536
4585
|
requiredIndicator: requiredIndicator$9,
|
4537
4586
|
helperText: helperText$8,
|
4538
|
-
errorMessage: errorMessage$
|
4587
|
+
errorMessage: errorMessage$b,
|
4539
4588
|
} = {
|
4540
4589
|
host: { selector: () => ':host' },
|
4541
4590
|
label: { selector: '::part(label)' },
|
@@ -4554,13 +4603,18 @@ const TextAreaClass = compose(
|
|
4554
4603
|
hostMinWidth: { ...host$l, property: 'min-width' },
|
4555
4604
|
hostDirection: { ...host$l, property: 'direction' },
|
4556
4605
|
fontSize: [host$l, textArea$2],
|
4557
|
-
fontFamily: [label$7, inputField$4, helperText$8, errorMessage$
|
4606
|
+
fontFamily: [label$7, inputField$4, helperText$8, errorMessage$b],
|
4558
4607
|
labelTextColor: [
|
4559
4608
|
{ ...label$7, property: 'color' },
|
4560
4609
|
{ ...requiredIndicator$9, property: 'color' },
|
4561
4610
|
],
|
4562
4611
|
labelRequiredIndicator: { ...requiredIndicator$9, property: 'content' },
|
4563
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
4564
4618
|
inputBackgroundColor: { ...inputField$4, property: 'background-color' },
|
4565
4619
|
inputValueTextColor: { ...textArea$2, property: 'color' },
|
4566
4620
|
inputPlaceholderTextColor: { ...placeholder$2, property: 'color' },
|
@@ -4629,6 +4683,14 @@ const textArea = {
|
|
4629
4683
|
[vars$M.inputOutlineOffset]: refs.outlineOffset,
|
4630
4684
|
[vars$M.inputResizeType]: 'vertical',
|
4631
4685
|
[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
|
+
|
4632
4694
|
textAlign: {
|
4633
4695
|
right: { [vars$M.inputTextAlign]: 'right' },
|
4634
4696
|
left: { [vars$M.inputTextAlign]: 'left' },
|
@@ -4751,7 +4813,7 @@ const {
|
|
4751
4813
|
checkboxLabel: checkboxLabel$1,
|
4752
4814
|
requiredIndicator: requiredIndicator$8,
|
4753
4815
|
helperText: helperText$7,
|
4754
|
-
errorMessage: errorMessage$
|
4816
|
+
errorMessage: errorMessage$a,
|
4755
4817
|
} = {
|
4756
4818
|
host: { selector: () => ':host' },
|
4757
4819
|
requiredIndicator: { selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::after' },
|
@@ -4770,7 +4832,7 @@ const CheckboxClass = compose(
|
|
4770
4832
|
hostDirection: { ...host$k, property: 'direction' },
|
4771
4833
|
|
4772
4834
|
fontSize: [host$k, checkboxElement, checkboxLabel$1],
|
4773
|
-
fontFamily: [checkboxLabel$1, helperText$7, errorMessage$
|
4835
|
+
fontFamily: [checkboxLabel$1, helperText$7, errorMessage$a],
|
4774
4836
|
|
4775
4837
|
labelTextColor: { ...checkboxLabel$1, property: 'color' },
|
4776
4838
|
labelSpacing: { ...checkboxLabel$1, property: 'padding-inline-start' },
|
@@ -4778,7 +4840,12 @@ const CheckboxClass = compose(
|
|
4778
4840
|
labelFontWeight: { ...checkboxLabel$1, property: 'font-weight' },
|
4779
4841
|
labelRequiredIndicator: { ...requiredIndicator$8, property: 'content' },
|
4780
4842
|
|
4781
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
4782
4849
|
|
4783
4850
|
inputValueTextColor: { ...checkboxSurface, property: 'color' },
|
4784
4851
|
inputBackgroundColor: { ...checkboxElement, property: 'background-color' },
|
@@ -4882,6 +4949,13 @@ const checkbox = {
|
|
4882
4949
|
[vars$L.inputBackgroundColor]: refs.backgroundColor,
|
4883
4950
|
[vars$L.inputSize]: checkboxSize,
|
4884
4951
|
[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,
|
4885
4959
|
};
|
4886
4960
|
|
4887
4961
|
var checkbox$1 = /*#__PURE__*/Object.freeze({
|
@@ -4900,7 +4974,7 @@ const {
|
|
4900
4974
|
checkboxLabel,
|
4901
4975
|
requiredIndicator: requiredIndicator$7,
|
4902
4976
|
helperText: helperText$6,
|
4903
|
-
errorMessage: errorMessage$
|
4977
|
+
errorMessage: errorMessage$9,
|
4904
4978
|
} = {
|
4905
4979
|
host: { selector: () => ':host' },
|
4906
4980
|
requiredIndicator: { selector: '[required] vaadin-checkbox [slot="label"]:not(:empty)::after' },
|
@@ -4919,7 +4993,7 @@ const SwitchToggleClass = compose(
|
|
4919
4993
|
hostDirection: { ...host$j, property: 'direction' },
|
4920
4994
|
|
4921
4995
|
fontSize: [component, checkboxLabel, checkboxLabel],
|
4922
|
-
fontFamily: [checkboxLabel, helperText$6, errorMessage$
|
4996
|
+
fontFamily: [checkboxLabel, helperText$6, errorMessage$9],
|
4923
4997
|
|
4924
4998
|
labelTextColor: { ...checkboxLabel, property: 'color' },
|
4925
4999
|
labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },
|
@@ -4927,7 +5001,13 @@ const SwitchToggleClass = compose(
|
|
4927
5001
|
labelFontWeight: { ...checkboxLabel, property: 'font-weight' },
|
4928
5002
|
labelRequiredIndicator: { ...requiredIndicator$7, property: 'content' },
|
4929
5003
|
|
4930
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
4931
5011
|
|
4932
5012
|
trackBorderWidth: { ...track, property: 'border-width' },
|
4933
5013
|
trackBorderStyle: { ...track, property: 'border-style' },
|
@@ -5065,6 +5145,13 @@ const switchToggle = {
|
|
5065
5145
|
[vars$K.labelRequiredIndicator]: refs.requiredIndicator,
|
5066
5146
|
[vars$K.errorMessageTextColor]: refs.errorMessageTextColor,
|
5067
5147
|
|
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
|
+
|
5068
5155
|
_checked: {
|
5069
5156
|
[vars$K.trackBorderColor]: refs.borderColor,
|
5070
5157
|
[vars$K.knobLeftOffset]: `calc(100% - var(${vars$K.knobSize}) - ${knobMargin})`,
|
@@ -6116,12 +6203,12 @@ const LoaderRadialClass = compose(
|
|
6116
6203
|
|
6117
6204
|
const componentName$H = getComponentName('passcode');
|
6118
6205
|
|
6119
|
-
const observedAttributes$
|
6206
|
+
const observedAttributes$4 = ['digits'];
|
6120
6207
|
|
6121
6208
|
const customMixin$9 = (superclass) =>
|
6122
6209
|
class PasscodeMixinClass extends superclass {
|
6123
6210
|
static get observedAttributes() {
|
6124
|
-
return observedAttributes$
|
6211
|
+
return observedAttributes$4.concat(superclass.observedAttributes || []);
|
6125
6212
|
}
|
6126
6213
|
|
6127
6214
|
get digits() {
|
@@ -6164,7 +6251,7 @@ const {
|
|
6164
6251
|
requiredIndicator: requiredIndicator$6,
|
6165
6252
|
internalWrapper: internalWrapper$1,
|
6166
6253
|
focusedDigitField,
|
6167
|
-
errorMessage: errorMessage$
|
6254
|
+
errorMessage: errorMessage$8,
|
6168
6255
|
} = {
|
6169
6256
|
host: { selector: () => ':host' },
|
6170
6257
|
focusedDigitField: { selector: () => `${TextFieldClass.componentName}[focused="true"]` },
|
@@ -6190,7 +6277,12 @@ const PasscodeClass = compose(
|
|
6190
6277
|
{ ...requiredIndicator$6, property: 'color' },
|
6191
6278
|
],
|
6192
6279
|
labelRequiredIndicator: { ...requiredIndicator$6, property: 'content' },
|
6193
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
6194
6286
|
digitValueTextColor: {
|
6195
6287
|
selector: TextFieldClass.componentName,
|
6196
6288
|
property: textVars$3.inputValueTextColor,
|
@@ -6318,6 +6410,13 @@ const passcode = {
|
|
6318
6410
|
[vars$B.focusedDigitFieldOutlineColor]: refs.outlineColor,
|
6319
6411
|
[vars$B.digitSize]: refs.inputHeight,
|
6320
6412
|
|
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
|
+
|
6321
6420
|
size: {
|
6322
6421
|
xs: { [vars$B.spinnerSize]: '15px' },
|
6323
6422
|
sm: { [vars$B.spinnerSize]: '20px' },
|
@@ -6813,7 +6912,7 @@ const {
|
|
6813
6912
|
label: label$5,
|
6814
6913
|
requiredIndicator: requiredIndicator$5,
|
6815
6914
|
helperText: helperText$5,
|
6816
|
-
errorMessage: errorMessage$
|
6915
|
+
errorMessage: errorMessage$7,
|
6817
6916
|
} = {
|
6818
6917
|
host: { selector: () => ':host' },
|
6819
6918
|
inputField: { selector: '::part(input-field)' },
|
@@ -6834,14 +6933,19 @@ const ComboBoxClass = compose(
|
|
6834
6933
|
hostDirection: { ...host$e, property: 'direction' },
|
6835
6934
|
// we apply font-size also on the host so we can set its width with em
|
6836
6935
|
fontSize: [{}, host$e],
|
6837
|
-
fontFamily: [label$5, placeholder$1, inputField$3, helperText$5, errorMessage$
|
6936
|
+
fontFamily: [label$5, placeholder$1, inputField$3, helperText$5, errorMessage$7],
|
6838
6937
|
labelFontSize: { ...label$5, property: 'font-size' },
|
6839
6938
|
labelFontWeight: { ...label$5, property: 'font-weight' },
|
6840
6939
|
labelTextColor: [
|
6841
6940
|
{ ...label$5, property: 'color' },
|
6842
6941
|
{ ...requiredIndicator$5, property: 'color' },
|
6843
6942
|
],
|
6844
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
6845
6949
|
inputHeight: { ...inputField$3, property: 'height' },
|
6846
6950
|
inputBackgroundColor: { ...inputField$3, property: 'background-color' },
|
6847
6951
|
inputBorderColor: { ...inputField$3, property: 'border-color' },
|
@@ -7064,6 +7168,13 @@ const comboBox = {
|
|
7064
7168
|
[vars$y.valueInputHeight]: refs.valueInputHeight,
|
7065
7169
|
[vars$y.valueInputMarginBottom]: refs.valueInputMarginBottom,
|
7066
7170
|
|
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
|
+
|
7067
7178
|
_readonly: {
|
7068
7179
|
[vars$y.inputDropdownButtonCursor]: 'default',
|
7069
7180
|
},
|
@@ -7107,14 +7218,14 @@ var comboBox$1 = /*#__PURE__*/Object.freeze({
|
|
7107
7218
|
vars: vars$y
|
7108
7219
|
});
|
7109
7220
|
|
7110
|
-
const observedAttributes$
|
7221
|
+
const observedAttributes$3 = ['src', 'alt'];
|
7111
7222
|
|
7112
7223
|
const componentName$E = getComponentName('image');
|
7113
7224
|
|
7114
7225
|
const BaseClass$2 = createBaseClass({ componentName: componentName$E, baseSelector: ':host > img' });
|
7115
7226
|
class RawImage extends BaseClass$2 {
|
7116
7227
|
static get observedAttributes() {
|
7117
|
-
return observedAttributes$
|
7228
|
+
return observedAttributes$3.concat(BaseClass$2.observedAttributes || []);
|
7118
7229
|
}
|
7119
7230
|
|
7120
7231
|
constructor() {
|
@@ -7137,7 +7248,7 @@ class RawImage extends BaseClass$2 {
|
|
7137
7248
|
connectedCallback() {
|
7138
7249
|
super.connectedCallback?.();
|
7139
7250
|
|
7140
|
-
forwardAttrs(this, this.baseElement, { includeAttrs: observedAttributes$
|
7251
|
+
forwardAttrs(this, this.baseElement, { includeAttrs: observedAttributes$3 });
|
7141
7252
|
}
|
7142
7253
|
}
|
7143
7254
|
|
@@ -8377,9 +8488,322 @@ var CountryCodes = [
|
|
8377
8488
|
].sort((a, b) => (a.name < b.name ? -1 : 1)),
|
8378
8489
|
];
|
8379
8490
|
|
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
|
+
|
8380
8542
|
const componentName$D = getComponentName('phone-field-internal');
|
8381
8543
|
|
8382
|
-
|
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
|
+
};
|
8383
8807
|
|
8384
8808
|
const textVars$2 = TextFieldClass.cssVarList;
|
8385
8809
|
const comboVars = ComboBoxClass.cssVarList;
|
@@ -8457,7 +8881,7 @@ const {
|
|
8457
8881
|
countryCodeInput,
|
8458
8882
|
phoneInput: phoneInput$1,
|
8459
8883
|
separator: separator$1,
|
8460
|
-
errorMessage: errorMessage$
|
8884
|
+
errorMessage: errorMessage$6,
|
8461
8885
|
helperText: helperText$4,
|
8462
8886
|
} = {
|
8463
8887
|
host: { selector: () => ':host' },
|
@@ -8489,7 +8913,7 @@ const PhoneFieldClass = compose(
|
|
8489
8913
|
],
|
8490
8914
|
fontFamily: [
|
8491
8915
|
label$4,
|
8492
|
-
errorMessage$
|
8916
|
+
errorMessage$6,
|
8493
8917
|
helperText$4,
|
8494
8918
|
{
|
8495
8919
|
...countryCodeInput,
|
@@ -8539,7 +8963,13 @@ const PhoneFieldClass = compose(
|
|
8539
8963
|
{ ...requiredIndicator$4, property: 'color' },
|
8540
8964
|
],
|
8541
8965
|
labelRequiredIndicator: { ...requiredIndicator$4, property: 'content' },
|
8542
|
-
|
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' },
|
8543
8973
|
|
8544
8974
|
inputValueTextColor: [
|
8545
8975
|
{ ...phoneInput$1, property: textVars$2.inputValueTextColor },
|
@@ -8699,6 +9129,13 @@ const phoneField = {
|
|
8699
9129
|
[vars$w.valueInputHeight]: refs.valueInputHeight,
|
8700
9130
|
[vars$w.valueInputMarginBottom]: refs.valueInputMarginBottom,
|
8701
9131
|
|
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
|
+
|
8702
9139
|
// '@overlay': {
|
8703
9140
|
// overlayItemBackgroundColor: 'red'
|
8704
9141
|
// }
|
@@ -8710,9 +9147,176 @@ var phoneField$1 = /*#__PURE__*/Object.freeze({
|
|
8710
9147
|
vars: vars$w
|
8711
9148
|
});
|
8712
9149
|
|
9150
|
+
const getCountryByCodeId = (countryCode) => {
|
9151
|
+
return CountryCodes.find((c) => c.code === countryCode)?.dialCode;
|
9152
|
+
};
|
9153
|
+
|
8713
9154
|
const componentName$B = getComponentName('phone-field-internal-input-box');
|
8714
9155
|
|
8715
|
-
|
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
|
+
}
|
8716
9320
|
|
8717
9321
|
const textVars$1 = TextFieldClass.cssVarList;
|
8718
9322
|
|
@@ -8770,7 +9374,7 @@ const {
|
|
8770
9374
|
inputField: inputField$1,
|
8771
9375
|
inputFieldInternal,
|
8772
9376
|
phoneInput,
|
8773
|
-
errorMessage: errorMessage$
|
9377
|
+
errorMessage: errorMessage$5,
|
8774
9378
|
helperText: helperText$3,
|
8775
9379
|
} = {
|
8776
9380
|
host: { selector: () => ':host' },
|
@@ -8798,7 +9402,7 @@ const PhoneFieldInputBoxClass = compose(
|
|
8798
9402
|
property: TextFieldClass.cssVarList.fontSize,
|
8799
9403
|
},
|
8800
9404
|
],
|
8801
|
-
fontFamily: [label$3, errorMessage$
|
9405
|
+
fontFamily: [label$3, errorMessage$5, helperText$3],
|
8802
9406
|
hostWidth: { ...host$c, property: 'width' },
|
8803
9407
|
hostMinWidth: { ...host$c, property: 'min-width' },
|
8804
9408
|
hostDirection: { ...host$c, property: 'direction' },
|
@@ -8823,7 +9427,13 @@ const PhoneFieldInputBoxClass = compose(
|
|
8823
9427
|
{ ...requiredIndicator$3, property: 'color' },
|
8824
9428
|
],
|
8825
9429
|
labelRequiredIndicator: { ...requiredIndicator$3, property: 'content' },
|
8826
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
8827
9437
|
|
8828
9438
|
inputValueTextColor: { ...phoneInput, property: textVars$1.inputValueTextColor },
|
8829
9439
|
|
@@ -8961,6 +9571,13 @@ const phoneInputBoxField = {
|
|
8961
9571
|
[vars$v.valueInputMarginBottom]: refs.valueInputMarginBottom,
|
8962
9572
|
[vars$v.inputHorizontalPadding]: '0',
|
8963
9573
|
|
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
|
+
|
8964
9581
|
_fullWidth: {
|
8965
9582
|
[vars$v.hostWidth]: refs.width,
|
8966
9583
|
},
|
@@ -9283,7 +9900,7 @@ const {
|
|
9283
9900
|
host: host$a,
|
9284
9901
|
label: label$2,
|
9285
9902
|
internalInputsWrapper,
|
9286
|
-
errorMessage: errorMessage$
|
9903
|
+
errorMessage: errorMessage$4,
|
9287
9904
|
helperText: helperText$2,
|
9288
9905
|
passwordInput,
|
9289
9906
|
policyPreview,
|
@@ -9308,11 +9925,16 @@ const NewPasswordClass = compose(
|
|
9308
9925
|
property: PasswordClass.cssVarList.fontSize,
|
9309
9926
|
},
|
9310
9927
|
],
|
9311
|
-
fontFamily: [label$2, errorMessage$
|
9928
|
+
fontFamily: [label$2, errorMessage$4, helperText$2],
|
9312
9929
|
labelFontSize: { ...label$2, property: 'font-size' },
|
9313
9930
|
labelFontWeight: { ...label$2, property: 'font-weight' },
|
9314
9931
|
labelTextColor: { ...label$2, property: 'color' },
|
9315
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
9316
9938
|
hostWidth: { ...host$a, property: 'width' },
|
9317
9939
|
hostMinWidth: { ...host$a, property: 'min-width' },
|
9318
9940
|
hostDirection: [
|
@@ -9417,6 +10039,13 @@ const newPassword = {
|
|
9417
10039
|
[vars$u.policyPreviewPadding]: globalRefs$l.spacing.lg,
|
9418
10040
|
[vars$u.valueInputHeight]: refs.valueInputHeight,
|
9419
10041
|
|
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
|
+
|
9420
10049
|
_required: {
|
9421
10050
|
// NewPassword doesn't pass `required` attribute to its Password components.
|
9422
10051
|
// That's why we fake the required indicator on each input.
|
@@ -10140,7 +10769,7 @@ const buttonSelectionGroupBaseMixin = (superclass) =>
|
|
10140
10769
|
}
|
10141
10770
|
};
|
10142
10771
|
|
10143
|
-
const { host: host$8, label: label$1, requiredIndicator: requiredIndicator$1, internalWrapper, errorMessage: errorMessage$
|
10772
|
+
const { host: host$8, label: label$1, requiredIndicator: requiredIndicator$1, internalWrapper, errorMessage: errorMessage$3 } = {
|
10144
10773
|
host: { selector: () => ':host' },
|
10145
10774
|
label: { selector: '::part(label)' },
|
10146
10775
|
requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
|
@@ -10157,7 +10786,12 @@ const buttonSelectionGroupMappings = {
|
|
10157
10786
|
{ ...requiredIndicator$1, property: 'color' },
|
10158
10787
|
],
|
10159
10788
|
labelRequiredIndicator: { ...requiredIndicator$1, property: 'content' },
|
10160
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
10161
10795
|
itemsSpacing: { ...internalWrapper, property: 'gap' },
|
10162
10796
|
};
|
10163
10797
|
|
@@ -10273,9 +10907,17 @@ const createBaseButtonSelectionGroupMappings = (vars) => ({
|
|
10273
10907
|
[vars.fontFamily]: refs.fontFamily,
|
10274
10908
|
[vars.labelTextColor]: refs.labelTextColor,
|
10275
10909
|
[vars.labelRequiredIndicator]: refs.requiredIndicator,
|
10276
|
-
[vars.errorMessageTextColor]: refs.errorMessageTextColor,
|
10277
10910
|
[vars.itemsSpacing]: globalRefs$j.spacing.sm,
|
10278
10911
|
[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,
|
10279
10921
|
});
|
10280
10922
|
|
10281
10923
|
const vars$r = ButtonSelectionGroupClass.cssVarList;
|
@@ -11635,7 +12277,7 @@ const {
|
|
11635
12277
|
label,
|
11636
12278
|
requiredIndicator,
|
11637
12279
|
helperText: helperText$1,
|
11638
|
-
errorMessage: errorMessage$
|
12280
|
+
errorMessage: errorMessage$2,
|
11639
12281
|
chip,
|
11640
12282
|
chipLabel,
|
11641
12283
|
overflowChipFirstBorder,
|
@@ -11669,14 +12311,19 @@ const MultiSelectComboBoxClass = compose(
|
|
11669
12311
|
// we apply font-size also on the host so we can set its width with em
|
11670
12312
|
fontSize: [{}, host$6],
|
11671
12313
|
chipFontSize: { ...chipLabel, property: 'font-size' },
|
11672
|
-
fontFamily: [label, placeholder, inputField, helperText$1, errorMessage$
|
12314
|
+
fontFamily: [label, placeholder, inputField, helperText$1, errorMessage$2, chipLabel],
|
11673
12315
|
labelFontSize: { ...label, property: 'font-size' },
|
11674
12316
|
labelFontWeight: { ...label, property: 'font-weight' },
|
11675
12317
|
labelTextColor: [
|
11676
12318
|
{ ...label, property: 'color' },
|
11677
12319
|
{ ...requiredIndicator, property: 'color' },
|
11678
12320
|
],
|
11679
|
-
errorMessageTextColor: { ...errorMessage$
|
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' },
|
11680
12327
|
inputHeight: { ...inputField, property: 'min-height' },
|
11681
12328
|
inputBackgroundColor: { ...inputField, property: 'background-color' },
|
11682
12329
|
inputBorderColor: { ...inputField, property: 'border-color' },
|
@@ -11923,6 +12570,13 @@ const multiSelectComboBox = {
|
|
11923
12570
|
[vars$m.placeholderOpacity]: refs.placeholderOpacity,
|
11924
12571
|
[vars$m.inputVerticalAlignment]: refs.inputVerticalAlignment,
|
11925
12572
|
|
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
|
+
|
11926
12580
|
labelType: {
|
11927
12581
|
floating: {
|
11928
12582
|
[vars$m.inputHorizontalPadding]: '0.25em',
|
@@ -12285,6 +12939,9 @@ const customMixin$4 = (superclass) =>
|
|
12285
12939
|
'invalid',
|
12286
12940
|
'readonly',
|
12287
12941
|
'disabled',
|
12942
|
+
'st-error-message-icon',
|
12943
|
+
'st-error-message-icon-size',
|
12944
|
+
'st-error-message-icon-padding',
|
12288
12945
|
],
|
12289
12946
|
});
|
12290
12947
|
|
@@ -12299,7 +12956,7 @@ const customMixin$4 = (superclass) =>
|
|
12299
12956
|
const {
|
12300
12957
|
host: host$4,
|
12301
12958
|
helperText,
|
12302
|
-
errorMessage,
|
12959
|
+
errorMessage: errorMessage$1,
|
12303
12960
|
mappingItem,
|
12304
12961
|
labels,
|
12305
12962
|
labelsText,
|
@@ -12329,7 +12986,7 @@ const MappingsFieldClass = compose(
|
|
12329
12986
|
hostDirection: { ...host$4, property: 'direction' },
|
12330
12987
|
// we apply font-size also on the host so we can set its width with em
|
12331
12988
|
fontSize: [{}, host$4, { ...separator, property: 'margin-top' }],
|
12332
|
-
fontFamily: [helperText, errorMessage, labels],
|
12989
|
+
fontFamily: [helperText, errorMessage$1, labels],
|
12333
12990
|
separatorFontSize: { ...separator, property: 'font-size' },
|
12334
12991
|
labelsFontSize: { ...labelsText, property: 'font-size' },
|
12335
12992
|
labelsLineHeight: [
|
@@ -12957,9 +13614,10 @@ const customMixin$3 = (superclass) =>
|
|
12957
13614
|
}
|
12958
13615
|
};
|
12959
13616
|
|
12960
|
-
const { host: host$1, groupInput } = {
|
13617
|
+
const { host: host$1, groupInput, errorMessage } = {
|
12961
13618
|
host: { selector: () => ':host' },
|
12962
13619
|
groupInput: { selector: 'descope-text-field' },
|
13620
|
+
errorMessage: { selector: '::part(error-message)' },
|
12963
13621
|
};
|
12964
13622
|
|
12965
13623
|
const SamlGroupMappingsClass = compose(
|
@@ -12968,6 +13626,11 @@ const SamlGroupMappingsClass = compose(
|
|
12968
13626
|
hostWidth: { ...host$1, property: 'width' },
|
12969
13627
|
hostDirection: { ...host$1, property: 'direction' },
|
12970
13628
|
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' },
|
12971
13634
|
},
|
12972
13635
|
}),
|
12973
13636
|
draggableMixin,
|
@@ -13023,6 +13686,13 @@ const samlGroupMappings = {
|
|
13023
13686
|
[vars$g.hostWidth]: refs.width,
|
13024
13687
|
[vars$g.hostDirection]: refs.direction,
|
13025
13688
|
[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,
|
13026
13696
|
};
|
13027
13697
|
|
13028
13698
|
var samlGroupMappings$1 = /*#__PURE__*/Object.freeze({
|
@@ -13714,6 +14384,11 @@ const radioGroup = {
|
|
13714
14384
|
[vars$c.labelTextColor]: refs.labelTextColor,
|
13715
14385
|
[vars$c.labelRequiredIndicator]: refs.requiredIndicator,
|
13716
14386
|
[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,
|
13717
14392
|
[vars$c.helperTextColor]: refs.helperTextColor,
|
13718
14393
|
[vars$c.itemsLabelColor]: globalRefs$7.colors.surface.contrast,
|
13719
14394
|
|
@@ -16482,6 +17157,9 @@ const attrsToSync$1 = [
|
|
16482
17157
|
'answer-label',
|
16483
17158
|
'answer-placeholder',
|
16484
17159
|
'answer-data-errormessage-value-missing',
|
17160
|
+
'st-error-message-icon',
|
17161
|
+
'st-error-message-icon-size',
|
17162
|
+
'st-error-message-icon-padding',
|
16485
17163
|
];
|
16486
17164
|
|
16487
17165
|
const attrsToReRender$1 = ['count', 'questions'];
|
@@ -16723,6 +17401,9 @@ const textFieldsAttrs = [
|
|
16723
17401
|
'size',
|
16724
17402
|
'answer-placeholder',
|
16725
17403
|
'answer-data-errormessage-value-missing',
|
17404
|
+
'st-error-message-icon',
|
17405
|
+
'st-error-message-icon-size',
|
17406
|
+
'st-error-message-icon-padding',
|
16726
17407
|
];
|
16727
17408
|
|
16728
17409
|
const textsAttrs = ['question-mode'];
|
@@ -16911,6 +17592,27 @@ const SecurityQuestionsVerifyClass = compose(
|
|
16911
17592
|
selector: () => TextClass.componentName,
|
16912
17593
|
property: 'cursor',
|
16913
17594
|
},
|
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
|
+
},
|
16914
17616
|
},
|
16915
17617
|
}),
|
16916
17618
|
draggableMixin,
|
@@ -16941,6 +17643,18 @@ const isNumericValue = (val) => NUMERIC_RE.test(val.replaceAll('+', '').replaceA
|
|
16941
17643
|
|
16942
17644
|
const sanitizeCountryCodePrefix = (val) => val.replace(/\+\d+-/, '');
|
16943
17645
|
|
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
|
+
|
16944
17658
|
const componentName$2 = getComponentName('hybrid-field');
|
16945
17659
|
|
16946
17660
|
const attrs = {
|
@@ -16953,6 +17667,9 @@ const attrs = {
|
|
16953
17667
|
'readonly',
|
16954
17668
|
'required',
|
16955
17669
|
'st-host-direction',
|
17670
|
+
'st-error-message-icon',
|
17671
|
+
'st-error-message-icon-size',
|
17672
|
+
'st-error-message-icon-padding',
|
16956
17673
|
],
|
16957
17674
|
email: [
|
16958
17675
|
'label',
|
@@ -17238,6 +17955,56 @@ const HybridFieldClass = compose(
|
|
17238
17955
|
{ selector: () => 'descope-phone-field', property: 'direction' },
|
17239
17956
|
{ selector: () => 'descope-phone-input-box-field', property: 'direction' },
|
17240
17957
|
],
|
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
|
+
],
|
17241
18008
|
},
|
17242
18009
|
}),
|
17243
18010
|
draggableMixin,
|
@@ -17249,6 +18016,13 @@ const vars$1 = HybridFieldClass.cssVarList;
|
|
17249
18016
|
const hybridField = {
|
17250
18017
|
[vars$1.hostDirection]: refs.direction,
|
17251
18018
|
|
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
|
+
|
17252
18026
|
_fullWidth: {
|
17253
18027
|
[vars$1.hostWidth]: '100%',
|
17254
18028
|
},
|