@descope/flow-components 3.0.10 → 3.1.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.0.10",
8
+ "buildVersion": "3.1.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.0.10",
8
+ "buildVersion": "3.1.1",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -105152,6 +105152,9 @@ const Recaptcha = React__default.default.forwardRef(({ variant, textLabel = defa
105152
105152
 
105153
105153
  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.';
105154
105154
  const RecaptchaV2 = React__default.default.forwardRef(({ textLabel = defaultText$1, textVariant = 'body1', textMode = 'primary', textAlign = 'left', 'full-width': fullWidth, readOnly, connector: _connector, enterprise: _enterprise, action: _action, variant = 'text', src, width, height, ...props }, ref) => {
105155
+ if (variant === 'hide') {
105156
+ return null;
105157
+ }
105155
105158
  if (variant === 'image') {
105156
105159
  return (React__default.default.createElement("descope-image", { ref: ref, "full-width": fullWidth, "st-width": width, "st-height": height, src: src, ...props }));
105157
105160
  }
package/dist/index.d.ts CHANGED
@@ -101,6 +101,7 @@ type MultiSelectProps = {
101
101
  'default-values'?: string[];
102
102
  };
103
103
  type LabelType = 'static' | 'floating';
104
+ type CaptchaVariants = 'text' | 'image' | 'widget' | 'hide';
104
105
 
105
106
  declare global {
106
107
  namespace React.JSX {
@@ -123,11 +124,11 @@ declare const Switch: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "r
123
124
  type BooleanType = {
124
125
  type: 'switch' | 'checkbox';
125
126
  };
126
- type Props$K = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
127
- declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$K, "ref"> & React.RefAttributes<HTMLInputElement>>;
127
+ type Props$L = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
128
+ declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$L, "ref"> & React.RefAttributes<HTMLInputElement>>;
128
129
 
129
130
  type TooltipPosition = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'start' | 'start-top' | 'start-bottom' | 'end' | 'end-top' | 'end-bottom';
130
- type Props$J = {
131
+ type Props$K = {
131
132
  text?: string;
132
133
  position?: TooltipPosition;
133
134
  hoverDelay?: number;
@@ -145,7 +146,7 @@ declare module 'react' {
145
146
  declare global {
146
147
  namespace React.JSX {
147
148
  interface IntrinsicElements {
148
- 'descope-tooltip': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$J;
149
+ 'descope-tooltip': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$K;
149
150
  }
150
151
  }
151
152
  }
@@ -186,17 +187,17 @@ declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes
186
187
  'data-name'?: string;
187
188
  } & ITooltip, "ref"> & React.RefAttributes<HTMLButtonElement>>;
188
189
 
189
- type Props$I = {
190
+ type Props$J = {
190
191
  digits?: number;
191
192
  };
192
193
  declare global {
193
194
  namespace React.JSX {
194
195
  interface IntrinsicElements {
195
- 'descope-passcode': DescopeInputProps & Props$I;
196
+ 'descope-passcode': DescopeInputProps & Props$J;
196
197
  }
197
198
  }
198
199
  }
199
- declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$I, "ref"> & React.RefAttributes<HTMLInputElement>>;
200
+ declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$J, "ref"> & React.RefAttributes<HTMLInputElement>>;
200
201
 
201
202
  declare global {
202
203
  namespace React.JSX {
@@ -207,7 +208,7 @@ declare global {
207
208
  }
208
209
  declare const Container$1: React.ForwardRefExoticComponent<any>;
209
210
 
210
- type Props$H = {
211
+ type Props$I = {
211
212
  vertical?: boolean;
212
213
  italic?: boolean;
213
214
  variant?: TypographyVariants;
@@ -217,15 +218,15 @@ type Props$H = {
217
218
  declare global {
218
219
  namespace React.JSX {
219
220
  interface IntrinsicElements {
220
- 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$H, 'children'>;
221
+ 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$I, 'children'>;
221
222
  }
222
223
  }
223
224
  }
224
- declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<any, "size"> & Props$H, "ref"> & React.RefAttributes<HTMLDivElement>>;
225
+ declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<any, "size"> & Props$I, "ref"> & React.RefAttributes<HTMLDivElement>>;
225
226
 
226
227
  declare const ReactComponent: (props: SVGProps) => React.JSX.Element;
227
228
 
228
- type Props$G = {
229
+ type Props$H = {
229
230
  width?: string;
230
231
  height?: string;
231
232
  alt?: string;
@@ -235,7 +236,7 @@ type Props$G = {
235
236
  declare global {
236
237
  namespace React.JSX {
237
238
  interface IntrinsicElements {
238
- 'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$G;
239
+ 'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$H;
239
240
  }
240
241
  }
241
242
  }
@@ -243,7 +244,7 @@ declare const Image: React.ForwardRefExoticComponent<any>;
243
244
 
244
245
  declare const Input: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
245
246
 
246
- type Props$F = {
247
+ type Props$G = {
247
248
  href?: string | undefined;
248
249
  italic?: boolean;
249
250
  variant?: TypographyVariants;
@@ -255,7 +256,7 @@ type Props$F = {
255
256
  declare global {
256
257
  namespace React.JSX {
257
258
  interface IntrinsicElements {
258
- 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$F, 'children'>;
259
+ 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$G, 'children'>;
259
260
  }
260
261
  }
261
262
  }
@@ -269,12 +270,12 @@ declare const Link: React.ForwardRefExoticComponent<{
269
270
  children?: React.ReactNode;
270
271
  } & ITooltip & React.RefAttributes<HTMLAnchorElement>>;
271
272
 
272
- type Props$E = {
273
+ type Props$F = {
273
274
  variant?: 'linear' | 'radial';
274
275
  size?: 'xs' | 'sm' | 'md' | 'lg';
275
276
  color?: Mode;
276
277
  };
277
- type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$E>;
278
+ type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$F>;
278
279
  declare global {
279
280
  namespace React.JSX {
280
281
  interface IntrinsicElements {
@@ -283,22 +284,22 @@ declare global {
283
284
  }
284
285
  }
285
286
  }
286
- declare const Loader: React.ForwardRefExoticComponent<Props$E & React.RefAttributes<HTMLDivElement>>;
287
+ declare const Loader: React.ForwardRefExoticComponent<Props$F & React.RefAttributes<HTMLDivElement>>;
287
288
 
288
- type Props$D = {
289
+ type Props$E = {
289
290
  width?: string;
290
291
  height?: string;
291
292
  };
292
293
  declare global {
293
294
  namespace React.JSX {
294
295
  interface IntrinsicElements {
295
- 'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$D>;
296
+ 'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$E>;
296
297
  }
297
298
  }
298
299
  }
299
- declare const Logo: React.ForwardRefExoticComponent<Props$D & React.RefAttributes<HTMLDivElement>>;
300
+ declare const Logo: React.ForwardRefExoticComponent<Props$E & React.RefAttributes<HTMLDivElement>>;
300
301
 
301
- type Props$C = {
302
+ type Props$D = {
302
303
  'password-label'?: string;
303
304
  'password-placeholder'?: string;
304
305
  'confirm-label'?: string;
@@ -325,11 +326,11 @@ type Props$C = {
325
326
  declare global {
326
327
  namespace React.JSX {
327
328
  interface IntrinsicElements {
328
- 'descope-new-password': DescopeInputProps & Props$C;
329
+ 'descope-new-password': DescopeInputProps & Props$D;
329
330
  }
330
331
  }
331
332
  }
332
- declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$C, "ref"> & React.RefAttributes<HTMLInputElement>>;
333
+ declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$D, "ref"> & React.RefAttributes<HTMLInputElement>>;
333
334
 
334
335
  declare global {
335
336
  namespace React.JSX {
@@ -349,7 +350,7 @@ declare global {
349
350
  }
350
351
  declare const Password: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
351
352
 
352
- type Props$B = {
353
+ type Props$C = {
353
354
  variant: 'countrySelection' | 'inputBox';
354
355
  'default-code'?: string;
355
356
  'phone-input-placeholder'?: string;
@@ -358,9 +359,9 @@ type Props$B = {
358
359
  'format-value'?: boolean;
359
360
  'strict-validation'?: boolean;
360
361
  } & DescopeInputProps;
361
- declare const Phone: React.ForwardRefExoticComponent<Omit<Props$B, "ref"> & React.RefAttributes<HTMLInputElement>>;
362
+ declare const Phone: React.ForwardRefExoticComponent<Omit<Props$C, "ref"> & React.RefAttributes<HTMLInputElement>>;
362
363
 
363
- type Props$A = {
364
+ type Props$B = {
364
365
  children?: React.JSX.Element[];
365
366
  data?: string | Record<string, string>[];
366
367
  };
@@ -373,9 +374,9 @@ declare global {
373
374
  }
374
375
  }
375
376
  }
376
- declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$A, "ref"> & React.RefAttributes<HTMLInputElement>>;
377
+ declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$B, "ref"> & React.RefAttributes<HTMLInputElement>>;
377
378
 
378
- type Props$z = {
379
+ type Props$A = {
379
380
  italic?: boolean;
380
381
  variant?: string;
381
382
  mode?: string;
@@ -387,8 +388,8 @@ type Props$z = {
387
388
  declare global {
388
389
  namespace React.JSX {
389
390
  interface IntrinsicElements {
390
- 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$z;
391
- 'descope-enriched-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$z & {
391
+ 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$A;
392
+ 'descope-enriched-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$A & {
392
393
  readonly?: boolean;
393
394
  };
394
395
  }
@@ -424,7 +425,7 @@ declare global {
424
425
  }
425
426
  declare const TextField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
426
427
 
427
- type Props$y = {
428
+ type Props$z = {
428
429
  width?: string;
429
430
  height?: string;
430
431
  component?: 'code' | 'text';
@@ -437,7 +438,7 @@ type Props$y = {
437
438
  declare global {
438
439
  namespace React.JSX {
439
440
  interface IntrinsicElements {
440
- 'descope-totp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$y>;
441
+ 'descope-totp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$z>;
441
442
  }
442
443
  }
443
444
  }
@@ -452,26 +453,26 @@ declare const TOTPImage: React.ForwardRefExoticComponent<{
452
453
  'hide-when-empty'?: boolean;
453
454
  } & ITooltip & React.RefAttributes<HTMLDivElement>>;
454
455
 
455
- type Props$x = Omit<React.ComponentProps<typeof Link>, 'href'>;
456
- declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props$x, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
456
+ type Props$y = Omit<React.ComponentProps<typeof Link>, 'href'>;
457
+ declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props$y, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
457
458
 
458
- type Props$w = {
459
+ type Props$x = {
459
460
  width?: string;
460
461
  height?: string;
461
462
  };
462
463
  declare global {
463
464
  namespace React.JSX {
464
465
  interface IntrinsicElements {
465
- 'descope-notp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$w>;
466
+ 'descope-notp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$x>;
466
467
  }
467
468
  }
468
469
  }
469
- declare const NOTPImage: React.ForwardRefExoticComponent<Props$w & React.RefAttributes<HTMLDivElement>>;
470
+ declare const NOTPImage: React.ForwardRefExoticComponent<Props$x & React.RefAttributes<HTMLDivElement>>;
470
471
 
471
- type Props$v = Omit<React.ComponentProps<typeof Link>, 'href'>;
472
- declare const NOTPLink: React.ForwardRefExoticComponent<Omit<Props$v, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
472
+ type Props$w = Omit<React.ComponentProps<typeof Link>, 'href'>;
473
+ declare const NOTPLink: React.ForwardRefExoticComponent<Omit<Props$w, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
473
474
 
474
- type Props$u = {
475
+ type Props$v = {
475
476
  title?: string;
476
477
  description?: string;
477
478
  icon?: string;
@@ -490,13 +491,13 @@ type Props$u = {
490
491
  declare global {
491
492
  namespace React.JSX {
492
493
  interface IntrinsicElements {
493
- 'descope-upload-file': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$u;
494
+ 'descope-upload-file': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$v;
494
495
  }
495
496
  }
496
497
  }
497
498
  declare const UploadFile: React.ForwardRefExoticComponent<any>;
498
499
 
499
- type Props$t = {
500
+ type Props$u = {
500
501
  enabled?: boolean;
501
502
  'site-key'?: string;
502
503
  enterprise?: boolean;
@@ -515,13 +516,28 @@ declare global {
515
516
  }
516
517
  namespace React.JSX {
517
518
  interface IntrinsicElements {
518
- 'descope-recaptcha': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$t;
519
+ 'descope-recaptcha': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$u;
519
520
  }
520
521
  }
521
522
  }
522
523
  declare const Recaptcha: React.ForwardRefExoticComponent<any>;
523
524
 
524
- declare const RecaptchaV2: React.ForwardRefExoticComponent<any>;
525
+ type Props$t = {
526
+ connector?: string;
527
+ enterprise?: boolean;
528
+ action?: string;
529
+ textLabel?: string;
530
+ textVariant?: TypographyVariants;
531
+ textMode?: Mode;
532
+ textAlign?: TextAlign;
533
+ 'full-width'?: boolean;
534
+ readOnly?: boolean;
535
+ variant?: CaptchaVariants;
536
+ src?: string;
537
+ width?: string;
538
+ height?: string;
539
+ };
540
+ declare const RecaptchaV2: React.ForwardRefExoticComponent<Props$t & React.HTMLAttributes<HTMLDivElement, any> & React.RefAttributes<HTMLDivElement>>;
525
541
 
526
542
  type Props$s = DescopeInputProps & {
527
543
  'default-value'?: string;
package/dist/index.esm.js CHANGED
@@ -391,6 +391,9 @@ const Recaptcha = React.forwardRef(({ variant, textLabel = defaultText$2, textVa
391
391
 
392
392
  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.';
393
393
  const RecaptchaV2 = React.forwardRef(({ textLabel = defaultText$1, textVariant = 'body1', textMode = 'primary', textAlign = 'left', 'full-width': fullWidth, readOnly, connector: _connector, enterprise: _enterprise, action: _action, variant = 'text', src, width, height, ...props }, ref) => {
394
+ if (variant === 'hide') {
395
+ return null;
396
+ }
394
397
  if (variant === 'image') {
395
398
  return (React.createElement("descope-image", { ref: ref, "full-width": fullWidth, "st-width": width, "st-height": height, src: src, ...props }));
396
399
  }
@@ -1,3 +1,19 @@
1
1
  import React from 'react';
2
- declare const RecaptchaV2: React.ForwardRefExoticComponent<any>;
2
+ import { CaptchaVariants, Mode, TextAlign, TypographyVariants } from '../types';
3
+ type Props = {
4
+ connector?: string;
5
+ enterprise?: boolean;
6
+ action?: string;
7
+ textLabel?: string;
8
+ textVariant?: TypographyVariants;
9
+ textMode?: Mode;
10
+ textAlign?: TextAlign;
11
+ 'full-width'?: boolean;
12
+ readOnly?: boolean;
13
+ variant?: CaptchaVariants;
14
+ src?: string;
15
+ width?: string;
16
+ height?: string;
17
+ };
18
+ declare const RecaptchaV2: React.ForwardRefExoticComponent<Props & React.HTMLAttributes<HTMLDivElement, any> & React.RefAttributes<HTMLDivElement>>;
3
19
  export default RecaptchaV2;
@@ -34,5 +34,5 @@ export type MultiSelectProps = {
34
34
  'default-values'?: string[];
35
35
  };
36
36
  export type LabelType = 'static' | 'floating';
37
- export type CaptchaVariants = 'text' | 'image' | 'widget';
37
+ export type CaptchaVariants = 'text' | 'image' | 'widget' | 'hide';
38
38
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.0.10",
3
+ "version": "3.1.1",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -51,7 +51,7 @@
51
51
  "@typescript-eslint/eslint-plugin": "^8.0.0",
52
52
  "@typescript-eslint/parser": "^8.0.0",
53
53
  "autoprefixer": "^10.4.8",
54
- "babel-jest": "30.2.0",
54
+ "babel-jest": "30.3.0",
55
55
  "eslint": "10.0.3",
56
56
  "eslint-config-airbnb": "^19.0.4",
57
57
  "eslint-config-airbnb-typescript": "18.0.0",
@@ -72,7 +72,7 @@
72
72
  "eslint-plugin-testing-library": "^7.0.0",
73
73
  "husky": "^9.0.0",
74
74
  "jest": "^30.0.0",
75
- "jest-environment-jsdom": "30.2.0",
75
+ "jest-environment-jsdom": "30.3.0",
76
76
  "lint-staged": "^16.0.0",
77
77
  "postcss": "^8.4.14",
78
78
  "prettier": "3.8.1",
@@ -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.0.10"
100
+ "@descope/web-components-ui": "3.1.1"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "react": ">= 18"