@descope/flow-components 3.14.10 → 3.15.1

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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.14.10",
8
+ "buildVersion": "3.15.1",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.14.10",
8
+ "buildVersion": "3.15.1",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -85533,6 +85533,17 @@ function requireIndex_cjs () {
85533
85533
  selector: () => 'slot[name="empty-state"]',
85534
85534
  property: 'font-family',
85535
85535
  },
85536
+ // allow overriding empty state height and padding from parent list components:
85537
+ emptyStateVerticalPadding: [
85538
+ {
85539
+ selector: () => 'slot[name="empty-state"]',
85540
+ property: 'padding-top',
85541
+ },
85542
+ {
85543
+ selector: () => 'slot[name="empty-state"]',
85544
+ property: 'padding-bottom',
85545
+ },
85546
+ ],
85536
85547
  },
85537
85548
  }),
85538
85549
  draggableMixin$1,
@@ -89550,6 +89561,14 @@ function requireIndex_cjs () {
89550
89561
  property: ListClass.cssVarList.horizontalPadding,
89551
89562
  },
89552
89563
  ],
89564
+ emptyStateMinHeight: {
89565
+ selector: () => ListClass.componentName,
89566
+ property: ListClass.cssVarList.minHeight,
89567
+ },
89568
+ emptyStateVerticalPadding: {
89569
+ selector: () => ListClass.componentName,
89570
+ property: ListClass.cssVarList.emptyStateVerticalPadding,
89571
+ },
89553
89572
  },
89554
89573
  }),
89555
89574
  draggableMixin$1,
@@ -89581,6 +89600,8 @@ function requireIndex_cjs () {
89581
89600
  [vars$R.listPadding]: '0',
89582
89601
  [vars$R.listBorderWidth]: '0',
89583
89602
  [vars$R.listBoxShadow]: 'none',
89603
+ [vars$R.emptyStateMinHeight]: '0',
89604
+ [vars$R.emptyStateVerticalPadding]: globals.spacing.lg,
89584
89605
 
89585
89606
  size: {
89586
89607
  xs: {
@@ -90077,6 +90098,14 @@ function requireIndex_cjs () {
90077
90098
  property: ListClass.cssVarList.horizontalPadding,
90078
90099
  },
90079
90100
  ],
90101
+ emptyStateMinHeight: {
90102
+ selector: () => ListClass.componentName,
90103
+ property: ListClass.cssVarList.minHeight,
90104
+ },
90105
+ emptyStateVerticalPadding: {
90106
+ selector: () => ListClass.componentName,
90107
+ property: ListClass.cssVarList.emptyStateVerticalPadding,
90108
+ },
90080
90109
 
90081
90110
  itemVerticalPadding: {
90082
90111
  selector: ListItemClass.componentName,
@@ -90181,6 +90210,8 @@ function requireIndex_cjs () {
90181
90210
  [vars$P.listPadding]: '0',
90182
90211
  [vars$P.listBoxShadow]: 'none',
90183
90212
  [vars$P.listItemsGap]: globals.spacing.lg,
90213
+ [vars$P.emptyStateMinHeight]: '0',
90214
+ [vars$P.emptyStateVerticalPadding]: globals.spacing.lg,
90184
90215
 
90185
90216
  [vars$P.itemBorderColor]: globals.colors.surface.light,
90186
90217
  [vars$P.itemVerticalPadding]: globals.spacing.lg,
@@ -102572,6 +102603,10 @@ descope-enriched-text {
102572
102603
  return this.getAttribute('opened') === 'true';
102573
102604
  }
102574
102605
 
102606
+ get closeOnOutsideClick() {
102607
+ return this.getAttribute('close-on-outside-click') === 'true';
102608
+ }
102609
+
102575
102610
  handleOpened() {
102576
102611
  if (this.opened) {
102577
102612
  this.style.display = '';
@@ -102637,6 +102672,28 @@ descope-enriched-text {
102637
102672
  overlay._enterModalState = () => {};
102638
102673
 
102639
102674
  overlay.close = () => false;
102675
+
102676
+ // close the modal when the user clicks/taps the backdrop (outside the modal
102677
+ // box). Vaadin's own outside-click does not fire here because we keep the
102678
+ // overlay in the shadow DOM (see _attachOverlay above), which leaves it out
102679
+ // of Vaadin's overlay stack, so we detect the backdrop click ourselves.
102680
+ // the listener is always attached and reads `closeOnOutsideClick` at click
102681
+ // time, so toggling the attribute after init is respected.
102682
+ overlay.addEventListener('click', (event) => {
102683
+ if (!this.closeOnOutsideClick || !this.opened) return;
102684
+
102685
+ // the visible modal box; clicks inside it (content + its padding) keep
102686
+ // the modal open, only clicks on the dimmed backdrop close it. if we
102687
+ // can't find the box, don't close - safer than closing on an inside click
102688
+ const overlayPart = overlay.shadowRoot?.querySelector('[part="overlay"]');
102689
+ if (!overlayPart || event.composedPath().includes(overlayPart)) {
102690
+ return;
102691
+ }
102692
+
102693
+ // just close ourselves; consumers that need to react (e.g. ModalDriver
102694
+ // resetting the content) observe the `opened` attribute
102695
+ this.removeAttribute('opened');
102696
+ });
102640
102697
  }
102641
102698
  };
102642
102699
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.14.10",
3
+ "version": "3.15.1",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -97,7 +97,7 @@
97
97
  "webpack-subresource-integrity": "5.2.0-rc.1"
98
98
  },
99
99
  "dependencies": {
100
- "@descope/web-components-ui": "3.14.10"
100
+ "@descope/web-components-ui": "3.15.1"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "react": ">= 18"