@descope/flow-components 2.0.66 → 2.0.68

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.cjs.js CHANGED
@@ -156,8 +156,8 @@ TextField.defaultProps = {
156
156
  size: 'md'
157
157
  };
158
158
 
159
- const PasswordField = React__default.default.forwardRef((props, ref) => React__default.default.createElement("descope-password-field", { ...props, ref: ref }));
160
- PasswordField.defaultProps = {
159
+ const Password = React__default.default.forwardRef((props, ref) => React__default.default.createElement("descope-password", { ...props, ref: ref }));
160
+ Password.defaultProps = {
161
161
  size: 'md'
162
162
  };
163
163
 
@@ -166,7 +166,7 @@ const Input = React__default.default.forwardRef(({ type, ...rest }, ref) => {
166
166
  case 'email':
167
167
  return React__default.default.createElement(EmailField, { ...rest, ref: ref });
168
168
  case 'password':
169
- return React__default.default.createElement(PasswordField, { ...rest, ref: ref });
169
+ return React__default.default.createElement(Password, { ...rest, ref: ref });
170
170
  case 'number':
171
171
  return React__default.default.createElement(NumberField, { ...rest, ref: ref });
172
172
  default:
@@ -232,6 +232,14 @@ const TOTPLink = React__default.default.forwardRef(({ ...props }, ref) => {
232
232
  return React__default.default.createElement(Link, { ref: ref, ...readyProps });
233
233
  });
234
234
 
235
+ /* eslint-disable @typescript-eslint/no-unused-vars */
236
+ const UploadFile = React__default.default.forwardRef(({ title, description, required, fullWidth, size, icon, buttonProps, inputProps }, ref) => React__default.default.createElement("div", { ref: ref }, "NOT SUPPORTED"));
237
+
238
+ /* eslint-disable react/no-unused-prop-types */
239
+ const Recaptcha = React__default.default.forwardRef((props, ref) => (React__default.default.createElement("div", { ref: ref },
240
+ "NOT SUPPORTED",
241
+ React__default.default.createElement("img", { style: { minWidth: 256, maxWidth: 256 }, src: "https://imgs.descope.com/connectors/templates/recaptcha/recaptcha-big.png", alt: "recaptcha" }))));
242
+
235
243
  exports.Boolean = Boolean;
236
244
  exports.Button = Button;
237
245
  exports.Checkbox = Checkbox;
@@ -245,8 +253,9 @@ exports.Loader = Loader;
245
253
  exports.Logo = Logo;
246
254
  exports.NewPassword = NewPassword;
247
255
  exports.NumberField = NumberField;
248
- exports.PasswordField = PasswordField;
256
+ exports.Password = Password;
249
257
  exports.Phone = Phone;
258
+ exports.Recaptcha = Recaptcha;
250
259
  exports.Select = Select;
251
260
  exports.Switch = Switch;
252
261
  exports.TOTPImage = TOTPImage;
@@ -254,6 +263,7 @@ exports.TOTPLink = TOTPLink;
254
263
  exports.Text = Text;
255
264
  exports.TextField = TextField;
256
265
  exports.Textarea = Textarea;
266
+ exports.UploadFile = UploadFile;
257
267
  exports.apple = apple;
258
268
  exports.discord = discord;
259
269
  exports.facebook = facebook;
package/dist/index.d.ts CHANGED
@@ -44,8 +44,8 @@ declare const Switch: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "r
44
44
  type BooleanType = {
45
45
  type: 'switch' | 'checkbox';
46
46
  };
47
- type Props$e = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
48
- declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$e, "ref"> & React.RefAttributes<HTMLInputElement>>;
47
+ type Props$g = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
48
+ declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$g, "ref"> & React.RefAttributes<HTMLInputElement>>;
49
49
 
50
50
  declare global {
51
51
  namespace JSX {
@@ -66,17 +66,17 @@ declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes
66
66
  'full-width'?: boolean;
67
67
  }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
68
68
 
69
- type Props$d = {
69
+ type Props$f = {
70
70
  digits?: number;
71
71
  };
72
72
  declare global {
73
73
  namespace JSX {
74
74
  interface IntrinsicElements {
75
- 'descope-passcode': DescopeInputProps & Props$d;
75
+ 'descope-passcode': DescopeInputProps & Props$f;
76
76
  }
77
77
  }
78
78
  }
79
- declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$d, "ref"> & React.RefAttributes<HTMLInputElement>>;
79
+ declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$f, "ref"> & React.RefAttributes<HTMLInputElement>>;
80
80
 
81
81
  type Never<T extends Record<string, any>> = {
82
82
  [K in keyof T]: never;
@@ -92,7 +92,7 @@ type ContainerAlignment = {
92
92
  'vertical-alignment'?: FlexAlignment;
93
93
  'space-between'?: 'sm' | 'md' | 'lg';
94
94
  };
95
- type Props$c = {
95
+ type Props$e = {
96
96
  direction?: 'row' | 'column';
97
97
  shadow?: 'md' | 'lg' | 'xl' | '2xl';
98
98
  'border-radius'?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
@@ -108,9 +108,9 @@ declare global {
108
108
  }
109
109
  }
110
110
  }
111
- declare const Container: React.ForwardRefExoticComponent<(Props$c & React.HTMLAttributes<HTMLDivElement>) & React.RefAttributes<HTMLDivElement>>;
111
+ declare const Container: React.ForwardRefExoticComponent<(Props$e & React.HTMLAttributes<HTMLDivElement>) & React.RefAttributes<HTMLDivElement>>;
112
112
 
113
- type Props$b = {
113
+ type Props$d = {
114
114
  vertical?: boolean;
115
115
  italic?: boolean;
116
116
  variant?: TypographyVariants;
@@ -120,11 +120,11 @@ type Props$b = {
120
120
  declare global {
121
121
  namespace JSX {
122
122
  interface IntrinsicElements {
123
- 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$b, 'children'>;
123
+ 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$d, 'children'>;
124
124
  }
125
125
  }
126
126
  }
127
- declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & Props$b, "ref"> & React.RefAttributes<HTMLDivElement>>;
127
+ declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & Props$d, "ref"> & React.RefAttributes<HTMLDivElement>>;
128
128
 
129
129
  declare const _default$a: ({ noColor }: {
130
130
  noColor: any;
@@ -170,22 +170,22 @@ declare const _default: ({ noColor }: {
170
170
  noColor: any;
171
171
  }) => React.JSX.Element;
172
172
 
173
- type Props$a = {
173
+ type Props$c = {
174
174
  width?: number;
175
175
  height?: number;
176
176
  };
177
177
  declare global {
178
178
  namespace JSX {
179
179
  interface IntrinsicElements {
180
- 'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLImageElement>, HTMLImageElement> & Props$a;
180
+ 'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLImageElement>, HTMLImageElement> & Props$c;
181
181
  }
182
182
  }
183
183
  }
184
- declare const Image: React.ForwardRefExoticComponent<Props$a & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLImageElement>>;
184
+ declare const Image: React.ForwardRefExoticComponent<Props$c & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLImageElement>>;
185
185
 
186
186
  declare const Input: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
187
187
 
188
- type Props$9 = {
188
+ type Props$b = {
189
189
  href?: string | undefined;
190
190
  italic?: boolean;
191
191
  variant?: TypographyVariants;
@@ -197,18 +197,18 @@ type Props$9 = {
197
197
  declare global {
198
198
  namespace JSX {
199
199
  interface IntrinsicElements {
200
- 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$9, 'children'>;
200
+ 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$b, 'children'>;
201
201
  }
202
202
  }
203
203
  }
204
- declare const Link: React.ForwardRefExoticComponent<Props$9 & React.RefAttributes<HTMLAnchorElement>>;
204
+ declare const Link: React.ForwardRefExoticComponent<Props$b & React.RefAttributes<HTMLAnchorElement>>;
205
205
 
206
- type Props$8 = {
206
+ type Props$a = {
207
207
  variant?: 'linear' | 'radial';
208
208
  size?: 'xs' | 'sm' | 'md' | 'lg';
209
209
  color?: Mode;
210
210
  };
211
- type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$8>;
211
+ type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$a>;
212
212
  declare global {
213
213
  namespace JSX {
214
214
  interface IntrinsicElements {
@@ -217,22 +217,22 @@ declare global {
217
217
  }
218
218
  }
219
219
  }
220
- declare const Loader: React.ForwardRefExoticComponent<Props$8 & React.RefAttributes<HTMLDivElement>>;
220
+ declare const Loader: React.ForwardRefExoticComponent<Props$a & React.RefAttributes<HTMLDivElement>>;
221
221
 
222
- type Props$7 = {
222
+ type Props$9 = {
223
223
  width?: string;
224
224
  height?: string;
225
225
  };
226
226
  declare global {
227
227
  namespace JSX {
228
228
  interface IntrinsicElements {
229
- 'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$7>;
229
+ 'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$9>;
230
230
  }
231
231
  }
232
232
  }
233
- declare const Logo: React.ForwardRefExoticComponent<Props$7 & React.RefAttributes<HTMLDivElement>>;
233
+ declare const Logo: React.ForwardRefExoticComponent<Props$9 & React.RefAttributes<HTMLDivElement>>;
234
234
 
235
- type Props$6 = {
235
+ type Props$8 = {
236
236
  'password-label'?: string;
237
237
  'password-placeholder'?: string;
238
238
  'confirm-label'?: string;
@@ -242,11 +242,11 @@ type Props$6 = {
242
242
  declare global {
243
243
  namespace JSX {
244
244
  interface IntrinsicElements {
245
- 'descope-new-password': DescopeInputProps & Props$6;
245
+ 'descope-new-password': DescopeInputProps & Props$8;
246
246
  }
247
247
  }
248
248
  }
249
- declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$6, "ref"> & React.RefAttributes<HTMLInputElement>>;
249
+ declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$8, "ref"> & React.RefAttributes<HTMLInputElement>>;
250
250
 
251
251
  declare global {
252
252
  namespace JSX {
@@ -260,13 +260,13 @@ declare const NumberField: React.ForwardRefExoticComponent<Omit<DescopeInputProp
260
260
  declare global {
261
261
  namespace JSX {
262
262
  interface IntrinsicElements {
263
- 'descope-password-field': DescopeInputProps;
263
+ 'descope-password': DescopeInputProps;
264
264
  }
265
265
  }
266
266
  }
267
- declare const PasswordField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
267
+ declare const Password: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
268
268
 
269
- type Props$5 = {
269
+ type Props$7 = {
270
270
  'default-code'?: string;
271
271
  'phone-input-placeholder'?: string;
272
272
  'country-input-placeholder'?: string;
@@ -274,13 +274,13 @@ type Props$5 = {
274
274
  declare global {
275
275
  namespace JSX {
276
276
  interface IntrinsicElements {
277
- 'descope-phone-field': DescopeInputProps & Props$5;
277
+ 'descope-phone-field': DescopeInputProps & Props$7;
278
278
  }
279
279
  }
280
280
  }
281
- declare const Phone: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$5, "ref"> & React.RefAttributes<HTMLInputElement>>;
281
+ declare const Phone: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$7, "ref"> & React.RefAttributes<HTMLInputElement>>;
282
282
 
283
- type Props$4 = {
283
+ type Props$6 = {
284
284
  children?: JSX.Element[];
285
285
  };
286
286
  declare global {
@@ -290,9 +290,9 @@ declare global {
290
290
  }
291
291
  }
292
292
  }
293
- declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$4, "ref"> & React.RefAttributes<HTMLInputElement>>;
293
+ declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$6, "ref"> & React.RefAttributes<HTMLInputElement>>;
294
294
 
295
- type Props$3 = {
295
+ type Props$5 = {
296
296
  italic?: boolean;
297
297
  variant?: string;
298
298
  mode?: string;
@@ -302,11 +302,11 @@ type Props$3 = {
302
302
  declare global {
303
303
  namespace JSX {
304
304
  interface IntrinsicElements {
305
- 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$3;
305
+ 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$5;
306
306
  }
307
307
  }
308
308
  }
309
- declare const Text: React.ForwardRefExoticComponent<Omit<Props$3 & {
309
+ declare const Text: React.ForwardRefExoticComponent<Omit<Props$5 & {
310
310
  typography?: TypographyVariants;
311
311
  } & Omit<React.HTMLProps<HTMLSpanElement>, "mode">, "ref"> & React.RefAttributes<HTMLElement>>;
312
312
 
@@ -328,18 +328,43 @@ declare global {
328
328
  }
329
329
  declare const TextField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
330
330
 
331
- type Props$2 = {
331
+ type Props$4 = {
332
332
  varName: string;
333
333
  fallback?: string;
334
334
  width?: number;
335
335
  height?: number;
336
336
  };
337
- declare const CssVarImage: React.ForwardRefExoticComponent<Props$2 & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLDivElement>>;
337
+ declare const CssVarImage: React.ForwardRefExoticComponent<Props$4 & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLDivElement>>;
338
+
339
+ type Props$3 = Omit<React.ComponentProps<typeof CssVarImage>, 'varName' | 'fallback'>;
340
+ declare const TOTPImage: React.ForwardRefExoticComponent<Omit<Props$3, "ref"> & React.RefAttributes<HTMLDivElement>>;
338
341
 
339
- type Props$1 = Omit<React.ComponentProps<typeof CssVarImage>, 'varName' | 'fallback'>;
340
- declare const TOTPImage: React.ForwardRefExoticComponent<Omit<Props$1, "ref"> & React.RefAttributes<HTMLDivElement>>;
342
+ type Props$2 = Omit<React.ComponentProps<typeof Link>, 'href'>;
343
+ declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props$2, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
341
344
 
342
- type Props = Omit<React.ComponentProps<typeof Link>, 'href'>;
343
- declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
345
+ type Props$1 = {
346
+ title?: string;
347
+ description?: string;
348
+ size?: ComponentSize;
349
+ fullWidth?: boolean;
350
+ required?: boolean;
351
+ icon?: string;
352
+ buttonProps?: React.ComponentProps<typeof Button>;
353
+ inputProps?: React.ComponentProps<typeof TextField>;
354
+ };
355
+ declare const UploadFile: React.ForwardRefExoticComponent<Props$1 & React.RefAttributes<HTMLInputElement>>;
356
+
357
+ type Props = {
358
+ enabled?: 'true' | 'false';
359
+ 'site-key'?: string;
360
+ enterprise?: 'true' | 'false';
361
+ action?: string;
362
+ };
363
+ declare global {
364
+ interface Window {
365
+ onRecaptchaLoadCallback: () => void;
366
+ }
367
+ }
368
+ declare const Recaptcha: React.ForwardRefExoticComponent<Props & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
344
369
 
345
- export { Boolean, Button, Checkbox, Code, Container, Divider, Image, Input, Link, Loader, Logo, NewPassword, NumberField, PasswordField, Phone, Select, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, _default$a as apple, _default$2 as discord, _default$9 as facebook, _default$8 as fingerprint, _default$6 as github, _default$5 as gitlab, _default$4 as google, _default$1 as linkedin, _default$3 as microsoft, _default$7 as passkey, _default as sso };
370
+ export { Boolean, Button, Checkbox, Code, Container, Divider, Image, Input, Link, Loader, Logo, NewPassword, NumberField, Password, Phone, Recaptcha, Select, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, _default$a as apple, _default$2 as discord, _default$9 as facebook, _default$8 as fingerprint, _default$6 as github, _default$5 as gitlab, _default$4 as google, _default$1 as linkedin, _default$3 as microsoft, _default$7 as passkey, _default as sso };
package/dist/index.esm.js CHANGED
@@ -150,8 +150,8 @@ TextField.defaultProps = {
150
150
  size: 'md'
151
151
  };
152
152
 
153
- const PasswordField = React.forwardRef((props, ref) => React.createElement("descope-password-field", { ...props, ref: ref }));
154
- PasswordField.defaultProps = {
153
+ const Password = React.forwardRef((props, ref) => React.createElement("descope-password", { ...props, ref: ref }));
154
+ Password.defaultProps = {
155
155
  size: 'md'
156
156
  };
157
157
 
@@ -160,7 +160,7 @@ const Input = React.forwardRef(({ type, ...rest }, ref) => {
160
160
  case 'email':
161
161
  return React.createElement(EmailField, { ...rest, ref: ref });
162
162
  case 'password':
163
- return React.createElement(PasswordField, { ...rest, ref: ref });
163
+ return React.createElement(Password, { ...rest, ref: ref });
164
164
  case 'number':
165
165
  return React.createElement(NumberField, { ...rest, ref: ref });
166
166
  default:
@@ -226,4 +226,12 @@ const TOTPLink = React.forwardRef(({ ...props }, ref) => {
226
226
  return React.createElement(Link, { ref: ref, ...readyProps });
227
227
  });
228
228
 
229
- export { Boolean, Button, Checkbox, Code, Container, Divider, Image, Input, Link, Loader, Logo, NewPassword, NumberField, PasswordField, Phone, Select, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, apple, discord, facebook, fingerprint, github, gitlab, google, linkedin, microsoft, passkey, sso };
229
+ /* eslint-disable @typescript-eslint/no-unused-vars */
230
+ const UploadFile = React.forwardRef(({ title, description, required, fullWidth, size, icon, buttonProps, inputProps }, ref) => React.createElement("div", { ref: ref }, "NOT SUPPORTED"));
231
+
232
+ /* eslint-disable react/no-unused-prop-types */
233
+ const Recaptcha = React.forwardRef((props, ref) => (React.createElement("div", { ref: ref },
234
+ "NOT SUPPORTED",
235
+ React.createElement("img", { style: { minWidth: 256, maxWidth: 256 }, src: "https://imgs.descope.com/connectors/templates/recaptcha/recaptcha-big.png", alt: "recaptcha" }))));
236
+
237
+ export { Boolean, Button, Checkbox, Code, Container, Divider, Image, Input, Link, Loader, Logo, NewPassword, NumberField, Password, Phone, Recaptcha, Select, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, apple, discord, facebook, fingerprint, github, gitlab, google, linkedin, microsoft, passkey, sso };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "2.0.66",
3
+ "version": "2.0.68",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -80,6 +80,7 @@
80
80
  "eslint-plugin-promise": "6.1.1",
81
81
  "eslint-plugin-react": "^7.30.1",
82
82
  "eslint-plugin-testing-library": "^5.6.0",
83
+ "flat": "^5.0.2",
83
84
  "husky": "^8.0.1",
84
85
  "jest": "^29.0.0",
85
86
  "jest-environment-jsdom": "29.6.1",
@@ -99,7 +100,7 @@
99
100
  "typescript": "^4.5.3"
100
101
  },
101
102
  "dependencies": {
102
- "@descope/web-components-ui": "1.0.116",
103
+ "@descope/web-components-ui": "1.0.129",
103
104
  "rollup-plugin-dts": "^5.3.0"
104
105
  },
105
106
  "peerDependencies": {