@descope/web-components-ui 1.0.333 → 1.0.335

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/dist/cjs/index.cjs.js +86 -509
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +88 -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-grid-index-js.js +1 -1
  10. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  11. package/dist/umd/descope-new-password-index-js.js +1 -1
  12. package/dist/umd/descope-number-field-index-js.js +1 -1
  13. package/dist/umd/descope-passcode-index-js.js +1 -1
  14. package/dist/umd/descope-password-index-js.js +1 -1
  15. package/dist/umd/descope-radio-group-index-js.js +1 -1
  16. package/dist/umd/descope-text-field-index-js.js +2 -2
  17. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  18. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  19. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  20. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
  21. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  22. package/package.json +1 -1
  23. package/src/components/descope-email-field/EmailFieldClass.js +3 -103
  24. package/src/components/descope-grid/GridClass.js +1 -0
  25. package/src/components/descope-new-password/NewPasswordClass.js +0 -24
  26. package/src/components/descope-password/PasswordClass.js +1 -126
  27. package/src/components/descope-text-field/TextFieldClass.js +1 -26
  28. package/src/components/descope-text-field/textFieldMappings.js +6 -37
  29. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +2 -11
  30. package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +2 -5
  31. package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js +1 -1
  32. package/src/mixins/proxyInputMixin.js +2 -5
  33. package/src/theme/components/comboBox.js +10 -15
  34. package/src/theme/components/emailField.js +10 -15
  35. package/src/theme/components/grid.js +1 -0
  36. package/src/theme/components/multiSelectComboBox.js +9 -10
  37. package/src/theme/components/newPassword.js +1 -6
  38. package/src/theme/components/numberField.js +10 -15
  39. package/src/theme/components/password.js +9 -14
  40. package/src/theme/components/phoneField.js +3 -8
  41. package/src/theme/components/phoneInputBoxField.js +9 -14
  42. package/src/theme/components/textField.js +10 -15
  43. 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 {
@@ -8856,6 +8469,7 @@ const GridClass = compose(
8856
8469
  { ...rowSeparator, property: 'border-top-color' },
8857
8470
  ],
8858
8471
  resizeHandleColor: { ...resizeHandle, property: 'background-color' },
8472
+ hostDirection: { ...host$6, property: 'direction', fallback: 'ltr' },
8859
8473
  },
8860
8474
  }),
8861
8475
  draggableMixin,
@@ -12452,21 +12066,16 @@ const textField = {
12452
12066
  left: { [vars$G.inputTextAlign]: 'left' },
12453
12067
  center: { [vars$G.inputTextAlign]: 'center' },
12454
12068
  },
12455
-
12456
- labelType: {
12457
- floating: {
12458
- [vars$G.labelPosition]: refs.labelPosition,
12459
- [vars$G.labelTopPosition]: refs.labelTopPosition,
12460
- [vars$G.labelHorizontalPosition]: refs.labelHorizontalPosition,
12461
- [vars$G.inputTransformY]: refs.inputTransformY,
12462
- [vars$G.inputTransition]: refs.inputTransition,
12463
- [vars$G.marginInlineStart]: refs.marginInlineStart,
12464
- [vars$G.placeholderOpacity]: refs.placeholderOpacity,
12465
- [vars$G.inputVerticalAlignment]: refs.inputVerticalAlignment,
12466
- [vars$G.valueInputHeight]: refs.valueInputHeight,
12467
- [vars$G.valueInputMarginBottom]: refs.valueInputMarginBottom,
12468
- },
12469
- },
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,
12470
12079
  };
12471
12080
 
12472
12081
  var textField$1 = /*#__PURE__*/Object.freeze({
@@ -12506,20 +12115,15 @@ const password = {
12506
12115
  [vars$F.revealButtonOffset]: globalRefs$p.spacing.md,
12507
12116
  [vars$F.revealButtonSize]: refs.toggleButtonSize,
12508
12117
  [vars$F.revealButtonColor]: refs.placeholderTextColor,
12509
-
12510
- labelType: {
12511
- floating: {
12512
- [vars$F.labelPosition]: refs.labelPosition,
12513
- [vars$F.labelTopPosition]: refs.labelTopPosition,
12514
- [vars$F.labelHorizontalPosition]: refs.labelHorizontalPosition,
12515
- [vars$F.inputTransformY]: refs.inputTransformY,
12516
- [vars$F.inputTransition]: refs.inputTransition,
12517
- [vars$F.marginInlineStart]: refs.marginInlineStart,
12518
- [vars$F.placeholderOpacity]: refs.placeholderOpacity,
12519
- [vars$F.inputVerticalAlignment]: refs.inputVerticalAlignment,
12520
- [vars$F.valueInputHeight]: refs.valueInputHeight,
12521
- },
12522
- },
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,
12523
12127
  };
12524
12128
 
12525
12129
  var password$1 = /*#__PURE__*/Object.freeze({
@@ -12554,21 +12158,16 @@ const numberField = {
12554
12158
  [vars$E.labelRequiredIndicator]: refs.requiredIndicator,
12555
12159
  [vars$E.inputHorizontalPadding]: refs.horizontalPadding,
12556
12160
  [vars$E.inputHeight]: refs.inputHeight,
12557
-
12558
- labelType: {
12559
- floating: {
12560
- [vars$E.labelPosition]: refs.labelPosition,
12561
- [vars$E.labelTopPosition]: refs.labelTopPosition,
12562
- [vars$E.labelHorizontalPosition]: refs.labelHorizontalPosition,
12563
- [vars$E.inputTransformY]: refs.inputTransformY,
12564
- [vars$E.inputTransition]: refs.inputTransition,
12565
- [vars$E.marginInlineStart]: refs.marginInlineStart,
12566
- [vars$E.placeholderOpacity]: refs.placeholderOpacity,
12567
- [vars$E.inputVerticalAlignment]: refs.inputVerticalAlignment,
12568
- [vars$E.valueInputHeight]: refs.valueInputHeight,
12569
- [vars$E.valueInputMarginBottom]: refs.valueInputMarginBottom,
12570
- },
12571
- },
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,
12572
12171
  };
12573
12172
 
12574
12173
  var numberField$1 = /*#__PURE__*/Object.freeze({
@@ -12603,21 +12202,16 @@ const emailField = {
12603
12202
  [vars$D.inputBackgroundColor]: refs.backgroundColor,
12604
12203
  [vars$D.inputHorizontalPadding]: refs.horizontalPadding,
12605
12204
  [vars$D.inputHeight]: refs.inputHeight,
12606
-
12607
- labelType: {
12608
- floating: {
12609
- [vars$D.labelPosition]: refs.labelPosition,
12610
- [vars$D.labelTopPosition]: refs.labelTopPosition,
12611
- [vars$D.labelHorizontalPosition]: refs.labelHorizontalPosition,
12612
- [vars$D.inputTransformY]: refs.inputTransformY,
12613
- [vars$D.inputTransition]: refs.inputTransition,
12614
- [vars$D.marginInlineStart]: refs.marginInlineStart,
12615
- [vars$D.placeholderOpacity]: refs.placeholderOpacity,
12616
- [vars$D.inputVerticalAlignment]: refs.inputVerticalAlignment,
12617
- [vars$D.valueInputHeight]: refs.valueInputHeight,
12618
- [vars$D.valueInputMarginBottom]: refs.valueInputMarginBottom,
12619
- },
12620
- },
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,
12621
12215
  };
12622
12216
 
12623
12217
  var emailField$1 = /*#__PURE__*/Object.freeze({
@@ -13368,21 +12962,16 @@ const comboBox = {
13368
12962
  [vars$o.inputDropdownButtonOffset]: globalRefs$g.spacing.xs,
13369
12963
  [vars$o.overlayItemPaddingInlineStart]: globalRefs$g.spacing.xs,
13370
12964
  [vars$o.overlayItemPaddingInlineEnd]: globalRefs$g.spacing.lg,
13371
-
13372
- labelType: {
13373
- floating: {
13374
- [vars$o.labelPosition]: refs.labelPosition,
13375
- [vars$o.labelTopPosition]: refs.labelTopPosition,
13376
- [vars$o.labelHorizontalPosition]: refs.labelHorizontalPosition,
13377
- [vars$o.inputTransformY]: refs.inputTransformY,
13378
- [vars$o.inputTransition]: refs.inputTransition,
13379
- [vars$o.marginInlineStart]: refs.marginInlineStart,
13380
- [vars$o.placeholderOpacity]: refs.placeholderOpacity,
13381
- [vars$o.inputVerticalAlignment]: refs.inputVerticalAlignment,
13382
- [vars$o.valueInputHeight]: refs.valueInputHeight,
13383
- [vars$o.valueInputMarginBottom]: refs.valueInputMarginBottom,
13384
- },
13385
- },
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,
13386
12975
 
13387
12976
  _readonly: {
13388
12977
  [vars$o.inputDropdownButtonCursor]: 'default',
@@ -13441,14 +13030,9 @@ const phoneField = {
13441
13030
  [vars$m.phoneInputWidth]: refs.minWidth,
13442
13031
  [vars$m.countryCodeInputWidth]: '5em',
13443
13032
  [vars$m.countryCodeDropdownWidth]: '20em',
13444
-
13445
- labelType: {
13446
- floating: {
13447
- [vars$m.marginInlineStart]: '-0.25em',
13448
- [vars$m.valueInputHeight]: '1.65em',
13449
- [vars$m.valueInputMarginBottom]: '0.25em',
13450
- },
13451
- },
13033
+ [vars$m.marginInlineStart]: '-0.25em',
13034
+ [vars$m.valueInputHeight]: refs.valueInputHeight,
13035
+ [vars$m.valueInputMarginBottom]: refs.valueInputMarginBottom,
13452
13036
 
13453
13037
  // '@overlay': {
13454
13038
  // overlayItemBackgroundColor: 'red'
@@ -13484,20 +13068,15 @@ const phoneInputBoxField = {
13484
13068
  [vars$l.inputOutlineWidth]: refs.outlineWidth,
13485
13069
  [vars$l.inputOutlineColor]: refs.outlineColor,
13486
13070
  [vars$l.inputOutlineOffset]: refs.outlineOffset,
13487
-
13488
- labelType: {
13489
- floating: {
13490
- [vars$l.labelPosition]: refs.labelPosition,
13491
- [vars$l.labelTopPosition]: refs.labelTopPosition,
13492
- [vars$l.labelHorizontalPosition]: refs.labelHorizontalPosition,
13493
- [vars$l.inputTransformY]: refs.inputTransformY,
13494
- [vars$l.inputTransition]: refs.inputTransition,
13495
- [vars$l.marginInlineStart]: refs.marginInlineStart,
13496
- [vars$l.valueInputHeight]: refs.valueInputHeight,
13497
- [vars$l.valueInputMarginBottom]: '0.25em',
13498
- [vars$l.inputHorizontalPadding]: '0',
13499
- },
13500
- },
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',
13501
13080
 
13502
13081
  _fullWidth: {
13503
13082
  [vars$l.hostWidth]: refs.width,
@@ -13526,12 +13105,7 @@ const newPassword = {
13526
13105
  [vars$k.errorMessageTextColor]: refs.errorMessageTextColor,
13527
13106
  [vars$k.policyPreviewBackgroundColor]: 'none',
13528
13107
  [vars$k.policyPreviewPadding]: globalRefs$f.spacing.lg,
13529
-
13530
- labelType: {
13531
- floating: {
13532
- [vars$k.valueInputHeight]: refs.valueInputHeight,
13533
- },
13534
- },
13108
+ [vars$k.valueInputHeight]: refs.valueInputHeight,
13535
13109
 
13536
13110
  _required: {
13537
13111
  // NewPassword doesn't pass `required` attribute to its Password components.
@@ -13732,6 +13306,7 @@ const grid = {
13732
13306
 
13733
13307
  [vars$e.valueTextColor]: globalRefs$b.colors.surface.contrast,
13734
13308
  [vars$e.selectedBackgroundColor]: globalRefs$b.colors.surface.highlight,
13309
+ [vars$e.hostDirection]: globalRefs$b.direction,
13735
13310
 
13736
13311
  _bordered: {
13737
13312
  [vars$e.borderColor]: refs.borderColor,
@@ -13835,20 +13410,19 @@ const multiSelectComboBox = {
13835
13410
  [vars$c.chipFontSize]: refs.chipFontSize,
13836
13411
  [vars$c.chipTextColor]: globalRefs$9.colors.surface.contrast,
13837
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,
13838
13422
 
13839
13423
  labelType: {
13840
13424
  floating: {
13841
- [vars$c.labelPosition]: refs.labelPosition,
13842
- [vars$c.labelTopPosition]: refs.labelTopPosition,
13843
- [vars$c.labelLeftPosition]: refs.labelLeftPosition,
13844
- [vars$c.labelHorizontalPosition]: refs.labelHorizontalPosition,
13845
- [vars$c.inputTransformY]: refs.inputTransformY,
13846
- [vars$c.inputTransition]: refs.inputTransition,
13847
- [vars$c.marginInlineStart]: refs.marginInlineStart,
13848
- [vars$c.placeholderOpacity]: refs.placeholderOpacity,
13849
- [vars$c.inputVerticalAlignment]: refs.inputVerticalAlignment,
13850
13425
  [vars$c.inputHorizontalPadding]: '0.25em',
13851
-
13852
13426
  _hasValue: {
13853
13427
  [vars$c.inputHorizontalPadding]: '0.45em',
13854
13428
  },