@descope/web-components-ui 1.0.334 → 1.0.335

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/dist/cjs/index.cjs.js +84 -509
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +86 -514
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/4392.js +1 -1
  6. package/dist/umd/4978.js +1 -1
  7. package/dist/umd/DescopeDev.js +1 -1
  8. package/dist/umd/descope-email-field-index-js.js +4 -4
  9. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  10. package/dist/umd/descope-new-password-index-js.js +1 -1
  11. package/dist/umd/descope-number-field-index-js.js +1 -1
  12. package/dist/umd/descope-passcode-index-js.js +1 -1
  13. package/dist/umd/descope-password-index-js.js +1 -1
  14. package/dist/umd/descope-radio-group-index-js.js +1 -1
  15. package/dist/umd/descope-text-field-index-js.js +2 -2
  16. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  17. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  18. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  19. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
  20. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  21. package/package.json +1 -1
  22. package/src/components/descope-email-field/EmailFieldClass.js +3 -103
  23. package/src/components/descope-new-password/NewPasswordClass.js +0 -24
  24. package/src/components/descope-password/PasswordClass.js +1 -126
  25. package/src/components/descope-text-field/TextFieldClass.js +1 -26
  26. package/src/components/descope-text-field/textFieldMappings.js +6 -37
  27. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +2 -11
  28. package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +2 -5
  29. package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js +1 -1
  30. package/src/mixins/proxyInputMixin.js +2 -5
  31. package/src/theme/components/comboBox.js +10 -15
  32. package/src/theme/components/emailField.js +10 -15
  33. package/src/theme/components/multiSelectComboBox.js +9 -10
  34. package/src/theme/components/newPassword.js +1 -6
  35. package/src/theme/components/numberField.js +10 -15
  36. package/src/theme/components/password.js +9 -14
  37. package/src/theme/components/phoneField.js +3 -8
  38. package/src/theme/components/phoneInputBoxField.js +9 -14
  39. package/src/theme/components/textField.js +10 -15
  40. package/src/helpers/externalInputs.js +0 -76
package/dist/index.esm.js CHANGED
@@ -985,7 +985,7 @@ const proxyInputMixin =
985
985
  ({
986
986
  proxyProps = [],
987
987
  // useProxyTargets flag allows to forwardProps to other targets, other than
988
- // `this.inputElement`. It's to be used within `external-input` components,
988
+ // `this.inputElement`.
989
989
  // if needed
990
990
  useProxyTargets = false,
991
991
  // allows us to set the event that should trigger validation
@@ -1114,10 +1114,7 @@ const proxyInputMixin =
1114
1114
 
1115
1115
  // sync properties
1116
1116
  proxyProps.forEach((prop) => {
1117
- const externalInput = this.querySelector('input[slot="external-input"]') || null;
1118
- const proxyTargets = useProxyTargets
1119
- ? [this.baseElement, externalInput].filter(Boolean)
1120
- : [];
1117
+ const proxyTargets = useProxyTargets ? [this.baseElement].filter(Boolean) : [];
1121
1118
  forwardProps(this, [this.inputElement, ...proxyTargets], prop);
1122
1119
  });
1123
1120
 
@@ -2496,10 +2493,6 @@ const {
2496
2493
  errorMessage: errorMessage$a,
2497
2494
  disabledPlaceholder,
2498
2495
  inputDisabled,
2499
- externalInput,
2500
- externalInputDisabled,
2501
- externalPlaceholder,
2502
- externalDisabledPlaceholder,
2503
2496
  } = {
2504
2497
  host: { selector: () => ':host' },
2505
2498
  label: { selector: '::part(label)' },
@@ -2514,10 +2507,6 @@ const {
2514
2507
  inputDisabled: { selector: 'input:disabled' },
2515
2508
  helperText: { selector: '::part(helper-text)' },
2516
2509
  errorMessage: { selector: '::part(error-message)' },
2517
- externalInput: { selector: () => '::slotted(input)' },
2518
- externalInputDisabled: { selector: () => '::slotted(input:disabled)' },
2519
- externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },
2520
- externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },
2521
2510
  };
2522
2511
 
2523
2512
  var textFieldMappings = {
@@ -2547,12 +2536,8 @@ var textFieldMappings = {
2547
2536
  inputValueTextColor: [
2548
2537
  { ...inputField$6, property: 'color' },
2549
2538
  { ...inputDisabled, property: '-webkit-text-fill-color' },
2550
- { ...externalInputDisabled, property: '-webkit-text-fill-color' },
2551
- ],
2552
- inputCaretTextColor: [
2553
- { ...input, property: 'color' },
2554
- { ...externalInput, property: 'color' },
2555
2539
  ],
2540
+ inputCaretTextColor: [{ ...input, property: 'color' }],
2556
2541
 
2557
2542
  labelRequiredIndicator: { ...requiredIndicator$9, property: 'content' },
2558
2543
 
@@ -2565,8 +2550,6 @@ var textFieldMappings = {
2565
2550
  inputHorizontalPadding: [
2566
2551
  { ...input, property: 'padding-left' },
2567
2552
  { ...input, property: 'padding-right' },
2568
- { ...externalInput, property: 'padding-left' },
2569
- { ...externalInput, property: 'padding-right' },
2570
2553
  ],
2571
2554
 
2572
2555
  inputOutlineColor: { ...inputField$6, property: 'outline-color' },
@@ -2574,17 +2557,12 @@ var textFieldMappings = {
2574
2557
  inputOutlineWidth: { ...inputField$6, property: 'outline-width' },
2575
2558
  inputOutlineOffset: { ...inputField$6, property: 'outline-offset' },
2576
2559
 
2577
- inputTextAlign: [
2578
- { ...input, property: 'text-align' },
2579
- { ...externalInput, property: 'text-align' },
2580
- ],
2560
+ inputTextAlign: [{ ...input, property: 'text-align' }],
2581
2561
 
2582
2562
  inputPlaceholderColor: [
2583
2563
  { selector: () => ':host input:placeholder-shown', property: 'color' },
2584
2564
  { ...placeholder$3, property: 'color' },
2585
- { ...externalPlaceholder, property: 'color' },
2586
2565
  { ...disabledPlaceholder, property: '-webkit-text-fill-color' },
2587
- { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },
2588
2566
  ],
2589
2567
 
2590
2568
  labelPosition: { ...label$9, property: 'position' },
@@ -2596,99 +2574,10 @@ var textFieldMappings = {
2596
2574
  inputTransformY: { ...label$9, property: 'transform' },
2597
2575
  inputTransition: { ...label$9, property: 'transition' },
2598
2576
  marginInlineStart: { ...label$9, property: 'margin-inline-start' },
2599
- placeholderOpacity: [
2600
- { selector: '> input:placeholder-shown', property: 'opacity' },
2601
- { ...externalPlaceholder, property: 'opacity' },
2602
- ],
2603
- inputVerticalAlignment: [
2604
- { ...inputField$6, property: 'align-items' },
2605
- { ...externalInput, property: 'align-items' },
2606
- ],
2607
- valueInputHeight: [
2608
- { ...input, property: 'height' },
2609
- { ...externalInput, property: 'height' },
2610
- ],
2611
- valueInputMarginBottom: [
2612
- { ...input, property: 'margin-bottom' },
2613
- { ...externalInput, property: 'margin-bottom' },
2614
- ],
2615
- };
2616
-
2617
- // since on load we can only sample the color of the placeholder,
2618
- // we need to temporarily populate the input in order to sample the value color
2619
- const getValueColor = (ele, computedStyle) => {
2620
- // eslint-disable-next-line no-param-reassign
2621
- ele.value = '_';
2622
-
2623
- const valueColor = computedStyle.getPropertyValue('color');
2624
-
2625
- // eslint-disable-next-line no-param-reassign
2626
- ele.value = '';
2627
-
2628
- return valueColor;
2629
- };
2630
-
2631
- const createExternalInputSlot = (slotName, targetSlotName) => {
2632
- const slotEle = document.createElement('slot');
2633
-
2634
- slotEle.setAttribute('name', slotName);
2635
- slotEle.setAttribute('slot', targetSlotName);
2636
-
2637
- return slotEle;
2638
- };
2639
-
2640
- const createExternalInputEle = (targetSlotName, type, autocompleteType) => {
2641
- const inputEle = document.createElement('input');
2642
-
2643
- inputEle.setAttribute('slot', targetSlotName);
2644
- inputEle.setAttribute('type', type);
2645
- inputEle.setAttribute('data-hidden-input', 'true');
2646
- inputEle.setAttribute('autocomplete', autocompleteType);
2647
-
2648
- return inputEle;
2649
- };
2650
-
2651
- // We apply the original input's style to the external-input.
2652
- // Eventually, the user should interact directly with the external input.
2653
- // We keep the original input
2654
- const applyExternalInputStyles = (sourceInputEle, targetInputEle, labelType) => {
2655
- const computedStyle = getComputedStyle(sourceInputEle);
2656
-
2657
- // Get minimal set of computed theme properties to set on external input
2658
- const height = computedStyle.getPropertyValue('height');
2659
- const paddingLeft = computedStyle.getPropertyValue('padding-left');
2660
- const paddingRight = computedStyle.getPropertyValue('padding-right');
2661
- const fontSize = computedStyle.getPropertyValue('font-size');
2662
- const fontFamily = computedStyle.getPropertyValue('font-family');
2663
- const letterSpacing = computedStyle.getPropertyValue('letter-spacing');
2664
- const caretColor = computedStyle.getPropertyValue('caret-color');
2665
-
2666
- const valueColor = getValueColor(sourceInputEle, computedStyle);
2667
-
2668
- const commonThemeStyles = [
2669
- ['all', 'unset'],
2670
- ['position', 'absolute'],
2671
- ['background-color', 'transparent'],
2672
- ['height', height],
2673
- ['left', paddingLeft],
2674
- ['right', paddingRight],
2675
- ['font-size', fontSize],
2676
- ['font-family', fontFamily],
2677
- ['letter-spacing', letterSpacing],
2678
- ['width', `calc(100% - ${paddingLeft} - ${paddingRight}`],
2679
- ['caret-color', caretColor], // this is for seeing caret when focusing on external input
2680
- ['color', valueColor],
2681
- ];
2682
-
2683
- commonThemeStyles.forEach(([key, val]) =>
2684
- targetInputEle.style.setProperty(key, val, 'important')
2685
- );
2686
-
2687
- // Handle floating label theme properties
2688
- if (labelType === 'floating') {
2689
- const marginBottom = computedStyle.getPropertyValue('margin-bottom');
2690
- targetInputEle.style.setProperty('margin-bottom', marginBottom, 'important');
2691
- }
2577
+ placeholderOpacity: [{ selector: '> input:placeholder-shown', property: 'opacity' }],
2578
+ inputVerticalAlignment: [{ ...inputField$6, property: 'align-items' }],
2579
+ valueInputHeight: [{ ...input, property: 'height' }],
2580
+ valueInputMarginBottom: [{ ...input, property: 'margin-bottom' }],
2692
2581
  };
2693
2582
 
2694
2583
  const componentName$M = getComponentName('email-field');
@@ -2700,103 +2589,12 @@ const customMixin$a = (superclass) =>
2700
2589
 
2701
2590
  this.baseElement.setAttribute('pattern', '^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$');
2702
2591
 
2703
- if (!this.isNoExternalInput) {
2704
- this.externalInput = this.handleExternalInput();
2705
-
2706
- this.addEventListener('focus', () => {
2707
- this.externalInput.focus();
2708
- });
2709
- } else {
2710
- this.setAttribute('autocomplete', this.getAutocompleteType());
2711
- }
2712
- }
2713
-
2714
- get isNoExternalInput() {
2715
- return this.getAttribute('no-external-input') === 'true';
2716
- }
2717
-
2718
- forwardInputValue(source, target) {
2719
- // set internal sync events
2720
- const valueDescriptor = Object.getOwnPropertyDescriptor(
2721
- this.inputElement.constructor.prototype,
2722
- 'value'
2723
- );
2724
-
2725
- Object.defineProperty(source, 'value', {
2726
- ...valueDescriptor,
2727
-
2728
- set(v) {
2729
- valueDescriptor.set.call(this, v);
2730
- // eslint-disable-next-line no-param-reassign
2731
- target.value = v;
2732
- },
2733
- configurable: true,
2734
- });
2735
- }
2736
-
2737
- handleExternalInput() {
2738
- // set safety attribute `external-input`
2739
- this.setAttribute('external-input', 'true');
2740
-
2741
- // use original input element as reference
2742
- const origInput = this.baseElement.querySelector('input');
2743
-
2744
- // to avoid focus loop between external-input and origInput
2745
- // we set origInput's tabindex to -1
2746
- // otherwise, shift-tab will never leave the component focus
2747
- origInput.setAttribute('tabindex', '-1');
2748
-
2749
- // create external slot
2750
- const externalInputSlot = createExternalInputSlot('external-input', 'suffix');
2751
- // append external slot to base element
2752
- this.baseElement.appendChild(externalInputSlot);
2753
-
2754
- const externalInput = createExternalInputEle(
2755
- 'external-input',
2756
- 'text',
2757
- this.getAutocompleteType()
2758
- );
2759
-
2760
- // apply original input's styles to external input
2761
- setTimeout(() => {
2762
- applyExternalInputStyles(origInput, externalInput, this.getAttribute('label-type'));
2763
- });
2764
-
2765
- // set external input events
2766
- this.handleExternalInputEvents(externalInput);
2767
-
2768
- // 1Password catches the internal input, so we forward the value to the external input
2769
- this.forwardInputValue(origInput, externalInput);
2770
-
2771
- syncAttrs(origInput, externalInput, {
2772
- includeAttrs: ['disabled', 'readonly', 'pattern'],
2773
- });
2774
-
2775
- // append external input to component's DOM
2776
- this.appendChild(externalInput);
2777
-
2778
- return externalInput;
2592
+ this.setAttribute('autocomplete', this.getAutocompleteType());
2779
2593
  }
2780
2594
 
2781
2595
  getAutocompleteType() {
2782
2596
  return this.getAttribute('autocomplete') || 'username';
2783
2597
  }
2784
-
2785
- handleExternalInputEvents(externalInput) {
2786
- // sync value of insible input back to original input
2787
- externalInput.addEventListener('input', (e) => {
2788
- this.value = e.target.value;
2789
- });
2790
-
2791
- // sync `focused` attribute on host when focusing on external input
2792
- externalInput.addEventListener('focus', () => {
2793
- this.setAttribute('focused', 'true');
2794
- });
2795
-
2796
- externalInput.addEventListener('blur', () => {
2797
- this.removeAttribute('focused');
2798
- });
2799
- }
2800
2598
  };
2801
2599
 
2802
2600
  const EmailFieldClass = compose(
@@ -2804,7 +2602,7 @@ const EmailFieldClass = compose(
2804
2602
  mappings: textFieldMappings,
2805
2603
  }),
2806
2604
  draggableMixin,
2807
- composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),
2605
+ composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
2808
2606
  componentNameValidationMixin,
2809
2607
  customMixin$a
2810
2608
  )(
@@ -2832,10 +2630,6 @@ const EmailFieldClass = compose(
2832
2630
  opacity: 0;
2833
2631
  }
2834
2632
 
2835
- vaadin-email-field:not([no-external-input="true"]) > input:not(:placeholder-shown) {
2836
- opacity: 0;
2837
- }
2838
-
2839
2633
  :host ::slotted(*) {
2840
2634
  -webkit-mask-image: none;
2841
2635
  }
@@ -3321,31 +3115,6 @@ const customMixin$9 = (superclass) =>
3321
3115
  }
3322
3116
  }
3323
3117
  }
3324
-
3325
- // webauthn is not working when the native input element is nested inside multiple shadow roots
3326
- // so we need to be able move the input outside the shadow root for some cases
3327
- get isExternalInput() {
3328
- return this.getAttribute('external-input') === 'true';
3329
- }
3330
-
3331
- constructor() {
3332
- super();
3333
-
3334
- if (this.isExternalInput) {
3335
- const origInput = this.baseElement.querySelector('input');
3336
- this.inputSlot = document.createElement('slot');
3337
-
3338
- this.focus = () => {
3339
- origInput.focus();
3340
- };
3341
-
3342
- this.inputSlot.setAttribute('name', 'input');
3343
- this.inputSlot.setAttribute('slot', 'input');
3344
- this.baseElement.appendChild(this.inputSlot);
3345
-
3346
- this.appendChild(origInput);
3347
- }
3348
- }
3349
3118
  };
3350
3119
 
3351
3120
  const TextFieldClass = compose(
@@ -3353,7 +3122,7 @@ const TextFieldClass = compose(
3353
3122
  mappings: textFieldMappings,
3354
3123
  }),
3355
3124
  draggableMixin,
3356
- composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),
3125
+ composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
3357
3126
  componentNameValidationMixin,
3358
3127
  customMixin$9
3359
3128
  )(
@@ -3618,106 +3387,6 @@ const componentName$D = getComponentName('password');
3618
3387
 
3619
3388
  const customMixin$7 = (superclass) =>
3620
3389
  class PasswordFieldMixinClass extends superclass {
3621
- init() {
3622
- super.init?.();
3623
-
3624
- // reset vaadin's checkValidity
3625
- this.baseElement.checkValidity = () => {};
3626
- // set safety attribute `external-input`
3627
- this.setAttribute('external-input', 'true');
3628
-
3629
- // use original input element as reference
3630
- const origInput = this.baseElement.querySelector('input');
3631
-
3632
- // to avoid focus loop between external-input and origInput
3633
- // we set origInput's tabindex to -1
3634
- // otherwise, shift-tab will never leave the component focus
3635
- origInput.setAttribute('tabindex', '-1');
3636
-
3637
- // create external slot
3638
- const externalInputSlot = createExternalInputSlot('external-input', 'suffix');
3639
- // append external slot to base element
3640
- this.baseElement.appendChild(externalInputSlot);
3641
-
3642
- // create external input
3643
- const externalInput = createExternalInputEle(
3644
- 'external-input',
3645
- 'password',
3646
- this.getAutocompleteType()
3647
- );
3648
-
3649
- this.handlePasswordVisibility(externalInput);
3650
-
3651
- // apply original input's styles to external input
3652
- setTimeout(() => {
3653
- applyExternalInputStyles(origInput, externalInput, this.getAttribute('label-type'));
3654
- });
3655
-
3656
- // set external input events
3657
- this.handleExternalInputEvents(externalInput);
3658
-
3659
- // sync input stateful attributes: `type` (for visibility state change) and `readonly`
3660
- syncAttrs(origInput, externalInput, { includeAttrs: ['type', 'readonly'] });
3661
- syncAttrs(this, externalInput, { includeAttrs: ['focused'] });
3662
-
3663
- origInput.addEventListener('focus', (e) => {
3664
- e.preventDefault();
3665
- if (e.isTrusted) {
3666
- externalInput.focus();
3667
- }
3668
- });
3669
-
3670
- externalInput.addEventListener('input', (e) => {
3671
- if (!e.target.value) {
3672
- this.removeAttribute('has-value');
3673
- } else {
3674
- this.setAttribute('has-value', 'true');
3675
- }
3676
- });
3677
-
3678
- // append external input to component's DOM
3679
- this.appendChild(externalInput);
3680
- }
3681
-
3682
- // override vaadin's password visibility toggle.
3683
- // we need this override in order to to resolve the external input `focus` race condition,
3684
- // which is caused due to the focus sync between the two inputs.
3685
- handlePasswordVisibility(externalInput) {
3686
- // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener
3687
- const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;
3688
- this.baseElement
3689
- .querySelector('vaadin-password-field-button')
3690
- .removeEventListener('mousedown', origBoundRevealButtonMouseDown);
3691
-
3692
- // disable vaadin's `_passwordVisibleChanged` observer
3693
- this.baseElement._passwordVisibleChanged = () => {};
3694
-
3695
- // override vaadin's `_togglePasswordVisibility`
3696
- this.baseElement._togglePasswordVisibility = () => {
3697
- const currVisibility = externalInput.getAttribute('type');
3698
- if (currVisibility === 'password') {
3699
- this.showPasswordVisibility(externalInput);
3700
- } else {
3701
- this.hidePasswordVisibility(externalInput);
3702
- }
3703
- };
3704
-
3705
- // on component blur, if password is revealed - hide it
3706
- // this behaves differently from vaadin's focus handling, and checks if the blur takes the component out of focus
3707
- // (which menas the click was made outside the component) or if the blur was called due to clicking the Reveal Button
3708
- // and then focusing in the input again
3709
- this.addEventListener('blur', () => {
3710
- setTimeout(() => {
3711
- const isHiddenAndFocused =
3712
- externalInput.getAttribute('type') !== 'password' &&
3713
- externalInput.getAttribute('focused') !== 'true';
3714
- if (isHiddenAndFocused) {
3715
- this.hidePasswordVisibility(externalInput);
3716
- }
3717
- });
3718
- });
3719
- }
3720
-
3721
3390
  hidePasswordVisibility(input) {
3722
3391
  // handle input element's type
3723
3392
  input.setAttribute('type', 'password');
@@ -3735,22 +3404,6 @@ const customMixin$7 = (superclass) =>
3735
3404
  getAutocompleteType() {
3736
3405
  return this.getAttribute('autocomplete') || 'current-password';
3737
3406
  }
3738
-
3739
- handleExternalInputEvents(inputEle) {
3740
- // sync value of insible input back to original input
3741
- inputEle.addEventListener('input', (e) => {
3742
- this.value = e.target.value;
3743
- });
3744
-
3745
- // sync `focused` attribute on host when focusing on external input
3746
- inputEle.addEventListener('focus', () => {
3747
- this.setAttribute('focused', 'true');
3748
- });
3749
-
3750
- inputEle.addEventListener('blur', () => {
3751
- this.removeAttribute('focused');
3752
- });
3753
- }
3754
3407
  };
3755
3408
 
3756
3409
  const {
@@ -3909,10 +3562,6 @@ const PasswordClass = compose(
3909
3562
  ::part(reveal-button) {
3910
3563
  align-self: center;
3911
3564
  }
3912
-
3913
- vaadin-password-field > input:not(:placeholder-shown) {
3914
- opacity: 0;
3915
- }
3916
3565
  `,
3917
3566
  excludeAttrsSync: ['tabindex'],
3918
3567
  componentName: componentName$D,
@@ -5948,7 +5597,7 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$6 {
5948
5597
  ${CountryCodes.map((item) => comboBoxItem(item)).join('')}
5949
5598
  </descope-combo-box>
5950
5599
  <div class="separator"></div>
5951
- <descope-text-field type="tel" external-input="true"></descope-text-field>
5600
+ <descope-text-field type="tel"></descope-text-field>
5952
5601
  </div>
5953
5602
  `;
5954
5603
 
@@ -5959,9 +5608,6 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$6 {
5959
5608
  forwardAttrs(this, this.countryCodeInput, { includeAttrs: ['label-type'] });
5960
5609
  forwardAttrs(this, this.phoneNumberInput, { includeAttrs: ['label-type'] });
5961
5610
 
5962
- const externalInput = this.phoneNumberInput.querySelector('input');
5963
- syncAttrs(this.phoneNumberInput, externalInput, { includeAttrs: ['focused'] });
5964
-
5965
5611
  // override combo box setter to display dialCode value in input
5966
5612
  this.countryCodeInput.customValueTransformFn = (val) => {
5967
5613
  const [, dialCode] = val?.split?.(' ') || [];
@@ -6206,7 +5852,6 @@ const {
6206
5852
  inputField: inputField$2,
6207
5853
  countryCodeInput,
6208
5854
  phoneInput: phoneInput$1,
6209
- phoneExternalInput,
6210
5855
  separator: separator$1,
6211
5856
  errorMessage: errorMessage$5,
6212
5857
  helperText: helperText$4,
@@ -6216,7 +5861,6 @@ const {
6216
5861
  requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
6217
5862
  inputField: { selector: '::part(input-field)' },
6218
5863
  phoneInput: { selector: () => 'descope-text-field' },
6219
- phoneExternalInput: { selector: () => '::slotted(input)' },
6220
5864
  countryCodeInput: { selector: () => 'descope-combo-box' },
6221
5865
  separator: { selector: 'descope-phone-field-internal .separator' },
6222
5866
  helperText: { selector: '::part(helper-text)' },
@@ -6306,17 +5950,10 @@ const PhoneFieldClass = compose(
6306
5950
  inputOutlineWidth: { ...inputField$2, property: 'outline-width' },
6307
5951
  inputOutlineOffset: { ...inputField$2, property: 'outline-offset' },
6308
5952
 
6309
- valueInputHeight: [
6310
- { ...phoneExternalInput, property: textVars$1.valueInputHeight },
6311
- { ...countryCodeInput, property: comboVars.valueInputHeight },
6312
- ],
6313
- valueInputMarginBottom: [
6314
- { ...phoneInput$1, property: textVars$1.valueInputMarginBottom },
6315
- { ...phoneExternalInput, property: 'margin-bottom' },
6316
- ],
5953
+ valueInputHeight: [{ ...countryCodeInput, property: comboVars.valueInputHeight }],
5954
+ valueInputMarginBottom: [{ ...phoneInput$1, property: textVars$1.valueInputMarginBottom }],
6317
5955
  marginInlineStart: [
6318
5956
  { ...phoneInput$1, property: textVars$1.marginInlineStart },
6319
- { ...phoneExternalInput, property: 'margin-inline-start' },
6320
5957
  { ...countryCodeInput, property: comboVars.marginInlineStart },
6321
5958
  ],
6322
5959
  },
@@ -6446,7 +6083,7 @@ class PhoneFieldInternal extends BaseInputClass$5 {
6446
6083
 
6447
6084
  this.innerHTML = `
6448
6085
  <div>
6449
- <descope-text-field tabindex="1" external-input="true"></descope-text-field>
6086
+ <descope-text-field tabindex="1"></descope-text-field>
6450
6087
  </div>
6451
6088
  `;
6452
6089
 
@@ -7023,20 +6660,10 @@ const customMixin$4 = (superclass) =>
7023
6660
  </${componentName$u}>
7024
6661
  `;
7025
6662
 
7026
- this.setAttribute('external-input', 'true');
7027
-
7028
6663
  this.baseElement.appendChild(template.content.cloneNode(true));
7029
6664
 
7030
6665
  this.inputElement = this.shadowRoot.querySelector(componentName$u);
7031
6666
 
7032
- // get descope input components
7033
- this.passwordInput = this.inputElement.querySelector('[data-id="password"]');
7034
- this.confirmInput = this.inputElement.querySelector('[data-id="confirm"]');
7035
-
7036
- // create slots for external password input
7037
- this.createExternalInput(this.passwordInput, 'external-password-input');
7038
- this.createExternalInput(this.confirmInput, 'external-confirm-input');
7039
-
7040
6667
  forwardAttrs(this, this.inputElement, {
7041
6668
  includeAttrs: [
7042
6669
  'password-label',
@@ -7060,20 +6687,6 @@ const customMixin$4 = (superclass) =>
7060
6687
  ],
7061
6688
  });
7062
6689
  }
7063
-
7064
- createExternalInput(node, slotName) {
7065
- const externalInput = node.querySelector('input');
7066
- const slotEle = document.createElement('slot');
7067
- const targetSlot = externalInput.getAttribute('slot');
7068
- slotEle.setAttribute('name', slotName);
7069
- slotEle.setAttribute('slot', targetSlot);
7070
- node.appendChild(slotEle);
7071
-
7072
- // move external input
7073
- externalInput.setAttribute('slot', slotName);
7074
- externalInput.setAttribute('data-hidden-input', 'true');
7075
- this.appendChild(externalInput);
7076
- }
7077
6690
  };
7078
6691
 
7079
6692
  const {
@@ -12453,21 +12066,16 @@ const textField = {
12453
12066
  left: { [vars$G.inputTextAlign]: 'left' },
12454
12067
  center: { [vars$G.inputTextAlign]: 'center' },
12455
12068
  },
12456
-
12457
- labelType: {
12458
- floating: {
12459
- [vars$G.labelPosition]: refs.labelPosition,
12460
- [vars$G.labelTopPosition]: refs.labelTopPosition,
12461
- [vars$G.labelHorizontalPosition]: refs.labelHorizontalPosition,
12462
- [vars$G.inputTransformY]: refs.inputTransformY,
12463
- [vars$G.inputTransition]: refs.inputTransition,
12464
- [vars$G.marginInlineStart]: refs.marginInlineStart,
12465
- [vars$G.placeholderOpacity]: refs.placeholderOpacity,
12466
- [vars$G.inputVerticalAlignment]: refs.inputVerticalAlignment,
12467
- [vars$G.valueInputHeight]: refs.valueInputHeight,
12468
- [vars$G.valueInputMarginBottom]: refs.valueInputMarginBottom,
12469
- },
12470
- },
12069
+ [vars$G.labelPosition]: refs.labelPosition,
12070
+ [vars$G.labelTopPosition]: refs.labelTopPosition,
12071
+ [vars$G.labelHorizontalPosition]: refs.labelHorizontalPosition,
12072
+ [vars$G.inputTransformY]: refs.inputTransformY,
12073
+ [vars$G.inputTransition]: refs.inputTransition,
12074
+ [vars$G.marginInlineStart]: refs.marginInlineStart,
12075
+ [vars$G.placeholderOpacity]: refs.placeholderOpacity,
12076
+ [vars$G.inputVerticalAlignment]: refs.inputVerticalAlignment,
12077
+ [vars$G.valueInputHeight]: refs.valueInputHeight,
12078
+ [vars$G.valueInputMarginBottom]: refs.valueInputMarginBottom,
12471
12079
  };
12472
12080
 
12473
12081
  var textField$1 = /*#__PURE__*/Object.freeze({
@@ -12507,20 +12115,15 @@ const password = {
12507
12115
  [vars$F.revealButtonOffset]: globalRefs$p.spacing.md,
12508
12116
  [vars$F.revealButtonSize]: refs.toggleButtonSize,
12509
12117
  [vars$F.revealButtonColor]: refs.placeholderTextColor,
12510
-
12511
- labelType: {
12512
- floating: {
12513
- [vars$F.labelPosition]: refs.labelPosition,
12514
- [vars$F.labelTopPosition]: refs.labelTopPosition,
12515
- [vars$F.labelHorizontalPosition]: refs.labelHorizontalPosition,
12516
- [vars$F.inputTransformY]: refs.inputTransformY,
12517
- [vars$F.inputTransition]: refs.inputTransition,
12518
- [vars$F.marginInlineStart]: refs.marginInlineStart,
12519
- [vars$F.placeholderOpacity]: refs.placeholderOpacity,
12520
- [vars$F.inputVerticalAlignment]: refs.inputVerticalAlignment,
12521
- [vars$F.valueInputHeight]: refs.valueInputHeight,
12522
- },
12523
- },
12118
+ [vars$F.labelPosition]: refs.labelPosition,
12119
+ [vars$F.labelTopPosition]: refs.labelTopPosition,
12120
+ [vars$F.labelHorizontalPosition]: refs.labelHorizontalPosition,
12121
+ [vars$F.inputTransformY]: refs.inputTransformY,
12122
+ [vars$F.inputTransition]: refs.inputTransition,
12123
+ [vars$F.marginInlineStart]: refs.marginInlineStart,
12124
+ [vars$F.placeholderOpacity]: refs.placeholderOpacity,
12125
+ [vars$F.inputVerticalAlignment]: refs.inputVerticalAlignment,
12126
+ [vars$F.valueInputHeight]: refs.valueInputHeight,
12524
12127
  };
12525
12128
 
12526
12129
  var password$1 = /*#__PURE__*/Object.freeze({
@@ -12555,21 +12158,16 @@ const numberField = {
12555
12158
  [vars$E.labelRequiredIndicator]: refs.requiredIndicator,
12556
12159
  [vars$E.inputHorizontalPadding]: refs.horizontalPadding,
12557
12160
  [vars$E.inputHeight]: refs.inputHeight,
12558
-
12559
- labelType: {
12560
- floating: {
12561
- [vars$E.labelPosition]: refs.labelPosition,
12562
- [vars$E.labelTopPosition]: refs.labelTopPosition,
12563
- [vars$E.labelHorizontalPosition]: refs.labelHorizontalPosition,
12564
- [vars$E.inputTransformY]: refs.inputTransformY,
12565
- [vars$E.inputTransition]: refs.inputTransition,
12566
- [vars$E.marginInlineStart]: refs.marginInlineStart,
12567
- [vars$E.placeholderOpacity]: refs.placeholderOpacity,
12568
- [vars$E.inputVerticalAlignment]: refs.inputVerticalAlignment,
12569
- [vars$E.valueInputHeight]: refs.valueInputHeight,
12570
- [vars$E.valueInputMarginBottom]: refs.valueInputMarginBottom,
12571
- },
12572
- },
12161
+ [vars$E.labelPosition]: refs.labelPosition,
12162
+ [vars$E.labelTopPosition]: refs.labelTopPosition,
12163
+ [vars$E.labelHorizontalPosition]: refs.labelHorizontalPosition,
12164
+ [vars$E.inputTransformY]: refs.inputTransformY,
12165
+ [vars$E.inputTransition]: refs.inputTransition,
12166
+ [vars$E.marginInlineStart]: refs.marginInlineStart,
12167
+ [vars$E.placeholderOpacity]: refs.placeholderOpacity,
12168
+ [vars$E.inputVerticalAlignment]: refs.inputVerticalAlignment,
12169
+ [vars$E.valueInputHeight]: refs.valueInputHeight,
12170
+ [vars$E.valueInputMarginBottom]: refs.valueInputMarginBottom,
12573
12171
  };
12574
12172
 
12575
12173
  var numberField$1 = /*#__PURE__*/Object.freeze({
@@ -12604,21 +12202,16 @@ const emailField = {
12604
12202
  [vars$D.inputBackgroundColor]: refs.backgroundColor,
12605
12203
  [vars$D.inputHorizontalPadding]: refs.horizontalPadding,
12606
12204
  [vars$D.inputHeight]: refs.inputHeight,
12607
-
12608
- labelType: {
12609
- floating: {
12610
- [vars$D.labelPosition]: refs.labelPosition,
12611
- [vars$D.labelTopPosition]: refs.labelTopPosition,
12612
- [vars$D.labelHorizontalPosition]: refs.labelHorizontalPosition,
12613
- [vars$D.inputTransformY]: refs.inputTransformY,
12614
- [vars$D.inputTransition]: refs.inputTransition,
12615
- [vars$D.marginInlineStart]: refs.marginInlineStart,
12616
- [vars$D.placeholderOpacity]: refs.placeholderOpacity,
12617
- [vars$D.inputVerticalAlignment]: refs.inputVerticalAlignment,
12618
- [vars$D.valueInputHeight]: refs.valueInputHeight,
12619
- [vars$D.valueInputMarginBottom]: refs.valueInputMarginBottom,
12620
- },
12621
- },
12205
+ [vars$D.labelPosition]: refs.labelPosition,
12206
+ [vars$D.labelTopPosition]: refs.labelTopPosition,
12207
+ [vars$D.labelHorizontalPosition]: refs.labelHorizontalPosition,
12208
+ [vars$D.inputTransformY]: refs.inputTransformY,
12209
+ [vars$D.inputTransition]: refs.inputTransition,
12210
+ [vars$D.marginInlineStart]: refs.marginInlineStart,
12211
+ [vars$D.placeholderOpacity]: refs.placeholderOpacity,
12212
+ [vars$D.inputVerticalAlignment]: refs.inputVerticalAlignment,
12213
+ [vars$D.valueInputHeight]: refs.valueInputHeight,
12214
+ [vars$D.valueInputMarginBottom]: refs.valueInputMarginBottom,
12622
12215
  };
12623
12216
 
12624
12217
  var emailField$1 = /*#__PURE__*/Object.freeze({
@@ -13369,21 +12962,16 @@ const comboBox = {
13369
12962
  [vars$o.inputDropdownButtonOffset]: globalRefs$g.spacing.xs,
13370
12963
  [vars$o.overlayItemPaddingInlineStart]: globalRefs$g.spacing.xs,
13371
12964
  [vars$o.overlayItemPaddingInlineEnd]: globalRefs$g.spacing.lg,
13372
-
13373
- labelType: {
13374
- floating: {
13375
- [vars$o.labelPosition]: refs.labelPosition,
13376
- [vars$o.labelTopPosition]: refs.labelTopPosition,
13377
- [vars$o.labelHorizontalPosition]: refs.labelHorizontalPosition,
13378
- [vars$o.inputTransformY]: refs.inputTransformY,
13379
- [vars$o.inputTransition]: refs.inputTransition,
13380
- [vars$o.marginInlineStart]: refs.marginInlineStart,
13381
- [vars$o.placeholderOpacity]: refs.placeholderOpacity,
13382
- [vars$o.inputVerticalAlignment]: refs.inputVerticalAlignment,
13383
- [vars$o.valueInputHeight]: refs.valueInputHeight,
13384
- [vars$o.valueInputMarginBottom]: refs.valueInputMarginBottom,
13385
- },
13386
- },
12965
+ [vars$o.labelPosition]: refs.labelPosition,
12966
+ [vars$o.labelTopPosition]: refs.labelTopPosition,
12967
+ [vars$o.labelHorizontalPosition]: refs.labelHorizontalPosition,
12968
+ [vars$o.inputTransformY]: refs.inputTransformY,
12969
+ [vars$o.inputTransition]: refs.inputTransition,
12970
+ [vars$o.marginInlineStart]: refs.marginInlineStart,
12971
+ [vars$o.placeholderOpacity]: refs.placeholderOpacity,
12972
+ [vars$o.inputVerticalAlignment]: refs.inputVerticalAlignment,
12973
+ [vars$o.valueInputHeight]: refs.valueInputHeight,
12974
+ [vars$o.valueInputMarginBottom]: refs.valueInputMarginBottom,
13387
12975
 
13388
12976
  _readonly: {
13389
12977
  [vars$o.inputDropdownButtonCursor]: 'default',
@@ -13442,14 +13030,9 @@ const phoneField = {
13442
13030
  [vars$m.phoneInputWidth]: refs.minWidth,
13443
13031
  [vars$m.countryCodeInputWidth]: '5em',
13444
13032
  [vars$m.countryCodeDropdownWidth]: '20em',
13445
-
13446
- labelType: {
13447
- floating: {
13448
- [vars$m.marginInlineStart]: '-0.25em',
13449
- [vars$m.valueInputHeight]: '1.65em',
13450
- [vars$m.valueInputMarginBottom]: '0.25em',
13451
- },
13452
- },
13033
+ [vars$m.marginInlineStart]: '-0.25em',
13034
+ [vars$m.valueInputHeight]: refs.valueInputHeight,
13035
+ [vars$m.valueInputMarginBottom]: refs.valueInputMarginBottom,
13453
13036
 
13454
13037
  // '@overlay': {
13455
13038
  // overlayItemBackgroundColor: 'red'
@@ -13485,20 +13068,15 @@ const phoneInputBoxField = {
13485
13068
  [vars$l.inputOutlineWidth]: refs.outlineWidth,
13486
13069
  [vars$l.inputOutlineColor]: refs.outlineColor,
13487
13070
  [vars$l.inputOutlineOffset]: refs.outlineOffset,
13488
-
13489
- labelType: {
13490
- floating: {
13491
- [vars$l.labelPosition]: refs.labelPosition,
13492
- [vars$l.labelTopPosition]: refs.labelTopPosition,
13493
- [vars$l.labelHorizontalPosition]: refs.labelHorizontalPosition,
13494
- [vars$l.inputTransformY]: refs.inputTransformY,
13495
- [vars$l.inputTransition]: refs.inputTransition,
13496
- [vars$l.marginInlineStart]: refs.marginInlineStart,
13497
- [vars$l.valueInputHeight]: refs.valueInputHeight,
13498
- [vars$l.valueInputMarginBottom]: '0.25em',
13499
- [vars$l.inputHorizontalPadding]: '0',
13500
- },
13501
- },
13071
+ [vars$l.labelPosition]: refs.labelPosition,
13072
+ [vars$l.labelTopPosition]: refs.labelTopPosition,
13073
+ [vars$l.labelHorizontalPosition]: refs.labelHorizontalPosition,
13074
+ [vars$l.inputTransformY]: refs.inputTransformY,
13075
+ [vars$l.inputTransition]: refs.inputTransition,
13076
+ [vars$l.marginInlineStart]: refs.marginInlineStart,
13077
+ [vars$l.valueInputHeight]: refs.valueInputHeight,
13078
+ [vars$l.valueInputMarginBottom]: refs.valueInputMarginBottom,
13079
+ [vars$l.inputHorizontalPadding]: '0',
13502
13080
 
13503
13081
  _fullWidth: {
13504
13082
  [vars$l.hostWidth]: refs.width,
@@ -13527,12 +13105,7 @@ const newPassword = {
13527
13105
  [vars$k.errorMessageTextColor]: refs.errorMessageTextColor,
13528
13106
  [vars$k.policyPreviewBackgroundColor]: 'none',
13529
13107
  [vars$k.policyPreviewPadding]: globalRefs$f.spacing.lg,
13530
-
13531
- labelType: {
13532
- floating: {
13533
- [vars$k.valueInputHeight]: refs.valueInputHeight,
13534
- },
13535
- },
13108
+ [vars$k.valueInputHeight]: refs.valueInputHeight,
13536
13109
 
13537
13110
  _required: {
13538
13111
  // NewPassword doesn't pass `required` attribute to its Password components.
@@ -13837,20 +13410,19 @@ const multiSelectComboBox = {
13837
13410
  [vars$c.chipFontSize]: refs.chipFontSize,
13838
13411
  [vars$c.chipTextColor]: globalRefs$9.colors.surface.contrast,
13839
13412
  [vars$c.chipBackgroundColor]: globalRefs$9.colors.surface.light,
13413
+ [vars$c.labelPosition]: refs.labelPosition,
13414
+ [vars$c.labelTopPosition]: refs.labelTopPosition,
13415
+ [vars$c.labelLeftPosition]: refs.labelLeftPosition,
13416
+ [vars$c.labelHorizontalPosition]: refs.labelHorizontalPosition,
13417
+ [vars$c.inputTransformY]: refs.inputTransformY,
13418
+ [vars$c.inputTransition]: refs.inputTransition,
13419
+ [vars$c.marginInlineStart]: refs.marginInlineStart,
13420
+ [vars$c.placeholderOpacity]: refs.placeholderOpacity,
13421
+ [vars$c.inputVerticalAlignment]: refs.inputVerticalAlignment,
13840
13422
 
13841
13423
  labelType: {
13842
13424
  floating: {
13843
- [vars$c.labelPosition]: refs.labelPosition,
13844
- [vars$c.labelTopPosition]: refs.labelTopPosition,
13845
- [vars$c.labelLeftPosition]: refs.labelLeftPosition,
13846
- [vars$c.labelHorizontalPosition]: refs.labelHorizontalPosition,
13847
- [vars$c.inputTransformY]: refs.inputTransformY,
13848
- [vars$c.inputTransition]: refs.inputTransition,
13849
- [vars$c.marginInlineStart]: refs.marginInlineStart,
13850
- [vars$c.placeholderOpacity]: refs.placeholderOpacity,
13851
- [vars$c.inputVerticalAlignment]: refs.inputVerticalAlignment,
13852
13425
  [vars$c.inputHorizontalPadding]: '0.25em',
13853
-
13854
13426
  _hasValue: {
13855
13427
  [vars$c.inputHorizontalPadding]: '0.45em',
13856
13428
  },