@descope/flow-components 3.23.0 → 3.23.2

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.23.0",
8
+ "buildVersion": "3.23.2",
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.23.0",
8
+ "buildVersion": "3.23.2",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -97676,7 +97676,7 @@ function requireIndex_cjs () {
97676
97676
  // Vaadin toggles visibility on Enter keydown but lets the event bubble,
97677
97677
  // and the SDK submits the form on any Enter that reaches the flow root.
97678
97678
  stopRevealButtonEnterPropagation() {
97679
- this.revealButton.addEventListener('keydown', (e) => {
97679
+ this.revealButton?.addEventListener('keydown', (e) => {
97680
97680
  if (e.key === 'Enter') e.stopPropagation();
97681
97681
  });
97682
97682
  }
@@ -97738,7 +97738,7 @@ function requireIndex_cjs () {
97738
97738
  handlePasswordVisibility(externalInput) {
97739
97739
  // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener
97740
97740
  const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;
97741
- this.revealButton.removeEventListener('mousedown', origBoundRevealButtonMouseDown);
97741
+ this.revealButton?.removeEventListener('mousedown', origBoundRevealButtonMouseDown);
97742
97742
 
97743
97743
  // disable vaadin's `_passwordVisibleChanged` observer
97744
97744
  this.baseElement._passwordVisibleChanged = () => {};
@@ -111800,7 +111800,7 @@ const Recaptcha = React__default.default.forwardRef(({ variant = 'text', textLab
111800
111800
  });
111801
111801
 
111802
111802
  const defaultText$1 = 'This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply.';
111803
- const RecaptchaV2 = React__default.default.forwardRef(({ textLabel = defaultText$1, textVariant = 'body1', textMode = 'primary', textAlign = 'left', 'full-width': fullWidth, readOnly, connector: _connector, enterprise, action, enabled = true, variant = 'text', src, width, height, ...props }, ref) => {
111803
+ const RecaptchaV2 = React__default.default.forwardRef(({ textLabel = defaultText$1, textVariant = 'body1', textMode = 'primary', textAlign = 'left', 'full-width': fullWidth, readOnly, connector: _connector, name, enterprise, action, enabled = true, variant = 'text', src, width, height, ...props }, ref) => {
111804
111804
  if (variant === 'hide') {
111805
111805
  return null;
111806
111806
  }
@@ -111808,8 +111808,10 @@ const RecaptchaV2 = React__default.default.forwardRef(({ textLabel = defaultText
111808
111808
  // challenge, or nothing) into descope-recaptcha and mirrors the token into its hidden input,
111809
111809
  // which is what the form validation reads.
111810
111810
  if (variant === 'widget') {
111811
- return (React__default.default.createElement(Recaptcha, { ref: ref, variant: "widget", enterprise: enterprise, action: action, enabled: enabled, "full-width": fullWidth, ...props }));
111811
+ return (React__default.default.createElement(Recaptcha, { ref: ref, variant: "widget", enterprise: enterprise, action: action, enabled: enabled, "full-width": fullWidth, name: name, ...props }));
111812
111812
  }
111813
+ // Only the widget is a form field. The runtime validates every element with a `name`, and the
111814
+ // text/image elements cannot validate, so carrying it there blocks the screen's submit.
111813
111815
  if (variant === 'image') {
111814
111816
  return (React__default.default.createElement("descope-image", { ref: ref, "full-width": fullWidth, "st-width": width, "st-height": height, src: src, ...props }));
111815
111817
  }
package/dist/index.d.ts CHANGED
@@ -571,6 +571,7 @@ declare global {
571
571
  declare const Recaptcha: React.ForwardRefExoticComponent<Props$B & React.HTMLAttributes<HTMLDivElement, any> & React.RefAttributes<HTMLDivElement>>;
572
572
 
573
573
  type Props$A = {
574
+ name?: string;
574
575
  connector?: string;
575
576
  enterprise?: boolean;
576
577
  action?: string;
package/dist/index.esm.js CHANGED
@@ -436,7 +436,7 @@ const Recaptcha = React.forwardRef(({ variant = 'text', textLabel = defaultText$
436
436
  });
437
437
 
438
438
  const defaultText$1 = 'This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply.';
439
- const RecaptchaV2 = React.forwardRef(({ textLabel = defaultText$1, textVariant = 'body1', textMode = 'primary', textAlign = 'left', 'full-width': fullWidth, readOnly, connector: _connector, enterprise, action, enabled = true, variant = 'text', src, width, height, ...props }, ref) => {
439
+ const RecaptchaV2 = React.forwardRef(({ textLabel = defaultText$1, textVariant = 'body1', textMode = 'primary', textAlign = 'left', 'full-width': fullWidth, readOnly, connector: _connector, name, enterprise, action, enabled = true, variant = 'text', src, width, height, ...props }, ref) => {
440
440
  if (variant === 'hide') {
441
441
  return null;
442
442
  }
@@ -444,8 +444,10 @@ const RecaptchaV2 = React.forwardRef(({ textLabel = defaultText$1, textVariant =
444
444
  // challenge, or nothing) into descope-recaptcha and mirrors the token into its hidden input,
445
445
  // which is what the form validation reads.
446
446
  if (variant === 'widget') {
447
- return (React.createElement(Recaptcha, { ref: ref, variant: "widget", enterprise: enterprise, action: action, enabled: enabled, "full-width": fullWidth, ...props }));
447
+ return (React.createElement(Recaptcha, { ref: ref, variant: "widget", enterprise: enterprise, action: action, enabled: enabled, "full-width": fullWidth, name: name, ...props }));
448
448
  }
449
+ // Only the widget is a form field. The runtime validates every element with a `name`, and the
450
+ // text/image elements cannot validate, so carrying it there blocks the screen's submit.
449
451
  if (variant === 'image') {
450
452
  return (React.createElement("descope-image", { ref: ref, "full-width": fullWidth, "st-width": width, "st-height": height, src: src, ...props }));
451
453
  }
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { CaptchaVariants, Mode, TextAlign, TypographyVariants } from '../types';
3
3
  type Props = {
4
+ name?: string;
4
5
  connector?: string;
5
6
  enterprise?: boolean;
6
7
  action?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.23.0",
3
+ "version": "3.23.2",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -98,7 +98,7 @@
98
98
  "webpack-subresource-integrity": "5.2.0-rc.1"
99
99
  },
100
100
  "dependencies": {
101
- "@descope/web-components-ui": "3.23.0"
101
+ "@descope/web-components-ui": "3.23.2"
102
102
  },
103
103
  "peerDependencies": {
104
104
  "react": ">= 18"