@descope/web-components-ui 3.22.1 → 3.22.3

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/index.esm.js CHANGED
@@ -2343,6 +2343,13 @@ class EnrichedText extends createBaseClass$1({
2343
2343
  e.stopPropagation();
2344
2344
  }
2345
2345
  });
2346
+
2347
+ // The SDK submits the form (and prevents link activation) on any Enter that reaches the flow root
2348
+ this.contentNode?.addEventListener('keydown', (e) => {
2349
+ if (e.key === 'Enter' && e.target instanceof HTMLAnchorElement) {
2350
+ e.stopPropagation();
2351
+ }
2352
+ });
2346
2353
  }
2347
2354
 
2348
2355
  static get observedAttributes() {
@@ -9828,6 +9835,19 @@ const customMixin$c = (superclass) =>
9828
9835
  this.baseElement._setFocused = this.setFocus.bind(this);
9829
9836
 
9830
9837
  this.initExternalInput();
9838
+ this.stopRevealButtonEnterPropagation();
9839
+ }
9840
+
9841
+ // Vaadin toggles visibility on Enter keydown but lets the event bubble,
9842
+ // and the SDK submits the form on any Enter that reaches the flow root.
9843
+ stopRevealButtonEnterPropagation() {
9844
+ this.revealButton.addEventListener('keydown', (e) => {
9845
+ if (e.key === 'Enter') e.stopPropagation();
9846
+ });
9847
+ }
9848
+
9849
+ get revealButton() {
9850
+ return this.baseElement.querySelector('vaadin-password-field-button');
9831
9851
  }
9832
9852
 
9833
9853
  initExternalInput() {
@@ -9883,9 +9903,7 @@ const customMixin$c = (superclass) =>
9883
9903
  handlePasswordVisibility(externalInput) {
9884
9904
  // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener
9885
9905
  const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;
9886
- this.baseElement
9887
- .querySelector('vaadin-password-field-button')
9888
- .removeEventListener('mousedown', origBoundRevealButtonMouseDown);
9906
+ this.revealButton.removeEventListener('mousedown', origBoundRevealButtonMouseDown);
9889
9907
 
9890
9908
  // disable vaadin's `_passwordVisibleChanged` observer
9891
9909
  this.baseElement._passwordVisibleChanged = () => {};
@@ -24554,7 +24572,7 @@ var passwordStrength$1 = /*#__PURE__*/Object.freeze({
24554
24572
  vars: vars$V
24555
24573
  });
24556
24574
 
24557
- var chevronIcon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xNy4yMTkzIDkuMjcyODNDMTcuNjU4NCA4Ljg3OTEyIDE4LjMzMzQgOC45MTU4NyAxOC43MjcyIDkuMzU0OTJDMTkuMTIwOSA5Ljc5Mzk3IDE5LjA4NDEgMTAuNDY5MSAxOC42NDUxIDEwLjg2MjhDMTguNjQ1MSAxMC44NjI4IDEzLjA0NTcgMTYuMDAyMiAxMi42NCAxNi4zNjZDMTIuMjM0MyAxNi43Mjk4IDExLjc2MDggMTYuNzI5OCAxMS4zNTUyIDE2LjM2Nkw1LjM1NDkyIDEwLjg2MjhDNC45MTU4NyAxMC40NjkxIDQuODc5MTIgOS43OTM5NyA1LjI3MjgzIDkuMzU0OTJDNS42NjY1NSA4LjkxNTg3IDYuMzQxNjQgOC44NzkxMiA2Ljc4MDY5IDkuMjcyODNMMTIgMTQuMTM2OEwxNy4yMTkzIDkuMjcyODNaIi8+Cjwvc3ZnPgo=";
24575
+ var chevronIcon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02Ljc4MDcgMTQuNzI3MkM2LjM0MTYgMTUuMTIwOSA1LjY2NjYgMTUuMDg0MSA1LjI3MjggMTQuNjQ1MUM0Ljg3OTEgMTQuMjA2IDQuOTE1OSAxMy41MzA5IDUuMzU0OSAxMy4xMzcyQzUuMzU0OSAxMy4xMzcyIDEwLjk1NDMgNy45OTc4IDExLjM2IDcuNjM0QzExLjc2NTcgNy4yNzAyIDEyLjIzOTIgNy4yNzAyIDEyLjY0NDggNy42MzRMMTguNjQ1MSAxMy4xMzcyQzE5LjA4NDEgMTMuNTMwOSAxOS4xMjA5IDE0LjIwNiAxOC43MjcyIDE0LjY0NTFDMTguMzMzNCAxNS4wODQxIDE3LjY1ODQgMTUuMTIwOSAxNy4yMTkzIDE0LjcyNzJMMTIgOS44NjMyTDYuNzgwNyAxNC43MjcyWiIvPgo8L3N2Zz4K";
24558
24576
 
24559
24577
  const componentName$i = getComponentName$1('collapsible-container');
24560
24578
 
@@ -24630,9 +24648,6 @@ class RawCollapsibleContainer extends createBaseClass$1({
24630
24648
  descope-icon {
24631
24649
  transition-property: transform;
24632
24650
  }
24633
- .rotate {
24634
- transform: rotate(-180deg);
24635
- }
24636
24651
  descope-text {
24637
24652
  width: 100%;
24638
24653
  display: flex;
@@ -24739,6 +24754,7 @@ class RawCollapsibleContainer extends createBaseClass$1({
24739
24754
  const selectors = {
24740
24755
  host: () => ':host',
24741
24756
  icon: () => 'descope-icon',
24757
+ collapsedIcon: () => 'descope-icon.rotate',
24742
24758
  iconWrapper: () => '.icon',
24743
24759
  header: () => '.header',
24744
24760
  iconAndText: () => '.header, .title',
@@ -24793,6 +24809,11 @@ const CollapsibleContainerClass = compose$1(
24793
24809
  selector: selectors.content,
24794
24810
  property: 'transition-duration',
24795
24811
  },
24812
+ chevronRotation: {
24813
+ selector: selectors.collapsedIcon,
24814
+ property: 'transform',
24815
+ fallback: 'rotate(180deg)',
24816
+ },
24796
24817
  },
24797
24818
  }),
24798
24819
  draggableMixin$1,
@@ -24835,6 +24856,7 @@ const collapsibleContainer = {
24835
24856
 
24836
24857
  [compVars$5.headerGap]: globalRefs$u.spacing.md,
24837
24858
 
24859
+ [compVars$5.chevronRotation]: 'rotate(180deg)',
24838
24860
  [compVars$5.iconAnimationDuration]: '0.1s',
24839
24861
  [compVars$5.contentAnimationDuration]: '0.1s',
24840
24862