@descope/flow-components 2.0.460 → 2.0.462

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.
@@ -6,6 +6,8 @@ type Props = {
6
6
  'phone-input-placeholder'?: string;
7
7
  'country-input-placeholder'?: string;
8
8
  'restrict-countries'?: string;
9
+ 'format-value'?: boolean;
10
+ 'strict-validation'?: boolean;
9
11
  } & DescopeInputProps;
10
12
  declare const Phone: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
11
13
  export default Phone;
package/dist/index.cjs.js CHANGED
@@ -78390,6 +78390,19 @@ function requireIndex_cjs () {
78390
78390
  }
78391
78391
  };
78392
78392
 
78393
+ const inputOverrideValidConstraintsMixin = (superclass) =>
78394
+ class InputOverrideValidConstraintsMixinClass extends superclass {
78395
+ init() {
78396
+ super.init?.();
78397
+
78398
+ // vaadin uses `validConstraints` (required, pattern, minlength, maxlength) to determine if it should validate
78399
+ // the input or not. We want to override this behavior, so we can enforce validation even if these attributes are not present.
78400
+ if (this.baseElement._hasValidConstraints) {
78401
+ this.baseElement._hasValidConstraints = () => true;
78402
+ }
78403
+ }
78404
+ };
78405
+
78393
78406
  const {
78394
78407
  host: host$r,
78395
78408
  label: label$9,
@@ -81374,6 +81387,7 @@ descope-boolean-field-internal {
81374
81387
  },
81375
81388
  }),
81376
81389
  draggableMixin,
81390
+ inputOverrideValidConstraintsMixin,
81377
81391
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
81378
81392
  componentNameValidationMixin,
81379
81393
  customMixin$b
@@ -83867,7 +83881,6 @@ descope-boolean-field-internal {
83867
83881
  includeAttrs: [
83868
83882
  'size',
83869
83883
  'bordered',
83870
- 'invalid',
83871
83884
  'minlength',
83872
83885
  'maxlength',
83873
83886
  'default-code',
@@ -83880,6 +83893,8 @@ descope-boolean-field-internal {
83880
83893
  'label',
83881
83894
  'label-type',
83882
83895
  'allow-alphanumeric-input',
83896
+ 'format-value',
83897
+ 'strict-validation',
83883
83898
  ],
83884
83899
  });
83885
83900
  }
@@ -84028,6 +84043,7 @@ descope-boolean-field-internal {
84028
84043
  },
84029
84044
  }),
84030
84045
  draggableMixin,
84046
+ inputOverrideValidConstraintsMixin,
84031
84047
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
84032
84048
  customMixin$a
84033
84049
  )(
@@ -84188,7 +84204,7 @@ descope-boolean-field-internal {
84188
84204
  const componentName$H = getComponentName$1('phone-input-box-field');
84189
84205
 
84190
84206
  const customMixin$9 = (superclass) =>
84191
- class PhoneInputBoxFieldMixinClass extends superclass {
84207
+ class PhoneFieldInputBoxMixinClass extends superclass {
84192
84208
  static get CountryCodes() {
84193
84209
  return CountryCodes;
84194
84210
  }
@@ -84212,8 +84228,6 @@ descope-boolean-field-internal {
84212
84228
  forwardAttrs$1(this.shadowRoot.host, this.inputElement, {
84213
84229
  includeAttrs: [
84214
84230
  'size',
84215
- 'bordered',
84216
- 'invalid',
84217
84231
  'minlength',
84218
84232
  'maxlength',
84219
84233
  'default-code',
@@ -84222,6 +84236,10 @@ descope-boolean-field-internal {
84222
84236
  'label',
84223
84237
  'label-type',
84224
84238
  'allow-alphanumeric-input',
84239
+ 'restrict-countries',
84240
+ 'format-value',
84241
+ 'strict-validation',
84242
+ 'data-errormessage-type-mismatch',
84225
84243
  ],
84226
84244
  });
84227
84245
  }
@@ -84237,7 +84255,8 @@ descope-boolean-field-internal {
84237
84255
  inputElement: inputElement$1,
84238
84256
  requiredIndicator: requiredIndicator$3,
84239
84257
  inputField: inputField$1,
84240
- inputFieldInternal,
84258
+ internalComponent,
84259
+ internalComponentAfter,
84241
84260
  phoneInput,
84242
84261
  errorMessage: errorMessage$5,
84243
84262
  helperText: helperText$3,
@@ -84248,8 +84267,11 @@ descope-boolean-field-internal {
84248
84267
  inputElement: { selector: 'input' },
84249
84268
  requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
84250
84269
  inputField: { selector: () => 'vaadin-text-field::part(input-field)' },
84251
- inputFieldInternal: {
84252
- selector: () => 'descope-phone-field-internal-input-box vaadin-text-field::part(input-field)',
84270
+ internalComponent: {
84271
+ selector: 'descope-phone-field-internal-input-box',
84272
+ },
84273
+ internalComponentAfter: {
84274
+ selector: 'descope-phone-field-internal-input-box::after',
84253
84275
  },
84254
84276
  phoneInput: { selector: () => 'descope-text-field' },
84255
84277
  helperText: { selector: '::part(helper-text)' },
@@ -84272,14 +84294,6 @@ descope-boolean-field-internal {
84272
84294
  hostMinWidth: { ...host$g, property: 'min-width' },
84273
84295
  hostDirection: { ...host$g, property: 'direction' },
84274
84296
 
84275
- inputBorderStyle: { ...inputFieldInternal, property: 'border-style' },
84276
- inputBorderWidth: { ...inputFieldInternal, property: 'border-width' },
84277
- inputBorderColor: { ...inputFieldInternal, property: 'border-color' },
84278
- inputBorderRadius: [
84279
- { ...inputField$1, property: 'border-radius' },
84280
- { ...inputFieldInternal, property: 'border-radius' },
84281
- ],
84282
-
84283
84297
  inputHorizontalPadding: [
84284
84298
  { ...phoneInput, property: 'padding-left' },
84285
84299
  { ...phoneInput, property: 'padding-right' },
@@ -84304,10 +84318,18 @@ descope-boolean-field-internal {
84304
84318
 
84305
84319
  inputPlaceholderTextColor: { ...phoneInput, property: textVars$1.inputPlaceholderColor },
84306
84320
 
84307
- inputOutlineStyle: { ...inputField$1, property: 'outline-style' },
84308
- inputOutlineColor: { ...inputField$1, property: 'outline-color' },
84309
- inputOutlineWidth: { ...inputField$1, property: 'outline-width' },
84310
- inputOutlineOffset: { ...inputField$1, property: 'outline-offset' },
84321
+ inputBorderStyle: { ...internalComponentAfter, property: 'border-style' },
84322
+ inputBorderWidth: { ...internalComponentAfter, property: 'border-width' },
84323
+ inputBorderColor: { ...internalComponentAfter, property: 'border-color' },
84324
+ inputBorderRadius: [
84325
+ { ...internalComponent, property: 'border-radius' },
84326
+ { ...internalComponentAfter, property: 'border-radius' },
84327
+ ],
84328
+
84329
+ inputOutlineStyle: { ...internalComponent, property: 'outline-style' },
84330
+ inputOutlineColor: { ...internalComponent, property: 'outline-color' },
84331
+ inputOutlineWidth: { ...internalComponent, property: 'outline-width' },
84332
+ inputOutlineOffset: { ...internalComponent, property: 'outline-offset' },
84311
84333
 
84312
84334
  labelPosition: { ...label$3, property: 'position' },
84313
84335
  labelTopPosition: { ...label$3, property: 'top' },
@@ -84326,6 +84348,7 @@ descope-boolean-field-internal {
84326
84348
  },
84327
84349
  }),
84328
84350
  draggableMixin,
84351
+ inputOverrideValidConstraintsMixin,
84329
84352
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
84330
84353
  customMixin$9
84331
84354
  )(
@@ -84357,7 +84380,6 @@ descope-boolean-field-internal {
84357
84380
  vaadin-text-field::part(input-field) {
84358
84381
  padding: 0;
84359
84382
  background: transparent;
84360
- overflow: hidden;
84361
84383
  -webkit-mask-image: none;
84362
84384
  }
84363
84385
  descope-phone-field-internal-input-box {
@@ -84368,14 +84390,20 @@ descope-boolean-field-internal {
84368
84390
  descope-phone-field-internal-input-box > div {
84369
84391
  width: 100%;
84370
84392
  }
84371
- descope-phone-field-internal-input-box .separator {
84372
- flex: 0;
84373
- border: none;
84374
- }
84375
84393
  descope-phone-field-internal-input-box descope-text-field {
84376
84394
  ${textVars$1.inputOutlineWidth}: 0;
84377
84395
  ${textVars$1.inputOutlineOffset}: 0;
84378
84396
  }
84397
+ descope-phone-field-internal-input-box::after {
84398
+ content: '';
84399
+ position: absolute;
84400
+ width: 100%;
84401
+ height: 100%;
84402
+ top: 0;
84403
+ left: 0;
84404
+ box-sizing: border-box;
84405
+ pointer-events: none;
84406
+ }
84379
84407
  descope-text-field {
84380
84408
  flex-grow: 1;
84381
84409
  width: 100%;
@@ -92624,6 +92652,8 @@ descope-boolean-field-internal {
92624
92652
  'restrict-countries',
92625
92653
  'default-code',
92626
92654
  'phone-minlength',
92655
+ 'phone-format-value',
92656
+ 'phone-strict-validation',
92627
92657
  'data-errormessage-value-missing-phone',
92628
92658
  ],
92629
92659
  inputBox: [
@@ -92631,6 +92661,8 @@ descope-boolean-field-internal {
92631
92661
  'restrict-countries',
92632
92662
  'default-code',
92633
92663
  'phone-minlength',
92664
+ 'phone-format-value',
92665
+ 'phone-strict-validation',
92634
92666
  'data-errormessage-value-missing-phone',
92635
92667
  ],
92636
92668
  },
@@ -92644,6 +92676,8 @@ descope-boolean-field-internal {
92644
92676
  phone: {
92645
92677
  'phone-input-label': 'label',
92646
92678
  'phone-minlength': 'minlength',
92679
+ 'phone-format-value': 'format-value',
92680
+ 'phone-strict-validation': 'strict-validation',
92647
92681
  'data-errormessage-value-missing-phone': 'data-errormessage-value-missing',
92648
92682
  },
92649
92683
  };
package/dist/index.d.ts CHANGED
@@ -261,6 +261,8 @@ type Props$x = {
261
261
  'phone-input-placeholder'?: string;
262
262
  'country-input-placeholder'?: string;
263
263
  'restrict-countries'?: string;
264
+ 'format-value'?: boolean;
265
+ 'strict-validation'?: boolean;
264
266
  } & DescopeInputProps;
265
267
  declare const Phone: React.ForwardRefExoticComponent<Omit<Props$x, "ref"> & React.RefAttributes<HTMLInputElement>>;
266
268
 
@@ -6,6 +6,8 @@ type Props = {
6
6
  'phone-input-placeholder'?: string;
7
7
  'country-input-placeholder'?: string;
8
8
  'restrict-countries'?: string;
9
+ 'format-value'?: boolean;
10
+ 'strict-validation'?: boolean;
9
11
  } & DescopeInputProps;
10
12
  declare const Phone: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
11
13
  export default Phone;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "2.0.460",
3
+ "version": "2.0.462",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -66,7 +66,7 @@
66
66
  "eslint": "8.57.1",
67
67
  "eslint-config-airbnb": "^19.0.4",
68
68
  "eslint-config-airbnb-typescript": "18.0.0",
69
- "eslint-config-prettier": "10.0.1",
69
+ "eslint-config-prettier": "10.0.2",
70
70
  "eslint-config-standard": "17.1.0",
71
71
  "eslint-import-resolver-typescript": "3.8.3",
72
72
  "eslint-plugin-import": "2.31.0",
@@ -104,7 +104,7 @@
104
104
  "typescript": "^5.7.2"
105
105
  },
106
106
  "dependencies": {
107
- "@descope/web-components-ui": "1.44.0"
107
+ "@descope/web-components-ui": "1.45.0"
108
108
  },
109
109
  "peerDependencies": {
110
110
  "react": ">= 18"