@descope/flow-components 2.0.73 → 2.0.75

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
@@ -191,7 +191,7 @@ const Loader = React__default.default.forwardRef(({ variant, color, ...restProps
191
191
  }
192
192
  });
193
193
 
194
- const Logo = React__default.default.forwardRef(({ width, height }, ref) => (React__default.default.createElement("descope-logo", { "st-width": width, "st-height": height, ref: ref })));
194
+ const Logo = React__default.default.forwardRef(({ width, height, ...props }, ref) => (React__default.default.createElement("descope-logo", { "st-width": width, "st-height": height, ref: ref, ...props })));
195
195
 
196
196
  const NewPassword = React__default.default.forwardRef((props, ref) => React__default.default.createElement("descope-new-password", { ...props, ref: ref }));
197
197
 
@@ -210,19 +210,7 @@ Textarea.defaultProps = {
210
210
  size: 'md'
211
211
  };
212
212
 
213
- const CssVarImage = React__default.default.forwardRef(({ width, height, varName, fallback = '', style }, ref) => (React__default.default.createElement("div", {
214
- // className={divClasses}
215
- ref: ref, style: {
216
- ...style,
217
- content: `var(--${varName}, ${fallback})`,
218
- width: width || 'initial',
219
- height: height || 'initial'
220
- } })));
221
-
222
- // The reason we define TOTPImage as a component, and not injecting the style from another place,
223
- // is to restrict the dependency between the code that injects this variable style (web-component) to this place only
224
- // Note: be careful when changing variables here, this can affect other packages implicitly
225
- const TOTPImage = React__default.default.forwardRef(({ ...props }, ref) => (React__default.default.createElement(CssVarImage, { ref: ref, varName: "totp-image", ...props })));
213
+ const TOTPImage = React__default.default.forwardRef(({ width, height, ...props }, ref) => (React__default.default.createElement("descope-totp-image", { "st-width": width, "st-height": height, ref: ref, ...props })));
226
214
 
227
215
  // The reason we define TOTPLink as a component, and not injecting the style from another place,
228
216
  // is to restrict the dependency between the code that injects this variable style (web-component) to this place only
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$g = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
48
- declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$g, "ref"> & React.RefAttributes<HTMLInputElement>>;
47
+ type Props$f = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
48
+ declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$f, "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$f = {
69
+ type Props$e = {
70
70
  digits?: number;
71
71
  };
72
72
  declare global {
73
73
  namespace JSX {
74
74
  interface IntrinsicElements {
75
- 'descope-passcode': DescopeInputProps & Props$f;
75
+ 'descope-passcode': DescopeInputProps & Props$e;
76
76
  }
77
77
  }
78
78
  }
79
- declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$f, "ref"> & React.RefAttributes<HTMLInputElement>>;
79
+ declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$e, "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$e = {
95
+ type Props$d = {
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$e & React.HTMLAttributes<HTMLDivElement>) & React.RefAttributes<HTMLDivElement>>;
111
+ declare const Container: React.ForwardRefExoticComponent<(Props$d & React.HTMLAttributes<HTMLDivElement>) & React.RefAttributes<HTMLDivElement>>;
112
112
 
113
- type Props$d = {
113
+ type Props$c = {
114
114
  vertical?: boolean;
115
115
  italic?: boolean;
116
116
  variant?: TypographyVariants;
@@ -120,11 +120,11 @@ type Props$d = {
120
120
  declare global {
121
121
  namespace JSX {
122
122
  interface IntrinsicElements {
123
- 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$d, 'children'>;
123
+ 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$c, 'children'>;
124
124
  }
125
125
  }
126
126
  }
127
- declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & Props$d, "ref"> & React.RefAttributes<HTMLDivElement>>;
127
+ declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & Props$c, "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$c = {
173
+ type Props$b = {
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$c;
180
+ 'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLImageElement>, HTMLImageElement> & Props$b;
181
181
  }
182
182
  }
183
183
  }
184
- declare const Image: React.ForwardRefExoticComponent<Props$c & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLImageElement>>;
184
+ declare const Image: React.ForwardRefExoticComponent<Props$b & 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$b = {
188
+ type Props$a = {
189
189
  href?: string | undefined;
190
190
  italic?: boolean;
191
191
  variant?: TypographyVariants;
@@ -197,18 +197,18 @@ type Props$b = {
197
197
  declare global {
198
198
  namespace JSX {
199
199
  interface IntrinsicElements {
200
- 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$b, 'children'>;
200
+ 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$a, 'children'>;
201
201
  }
202
202
  }
203
203
  }
204
- declare const Link: React.ForwardRefExoticComponent<Props$b & React.RefAttributes<HTMLAnchorElement>>;
204
+ declare const Link: React.ForwardRefExoticComponent<Props$a & React.RefAttributes<HTMLAnchorElement>>;
205
205
 
206
- type Props$a = {
206
+ type Props$9 = {
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$a>;
211
+ type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$9>;
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$a & React.RefAttributes<HTMLDivElement>>;
220
+ declare const Loader: React.ForwardRefExoticComponent<Props$9 & React.RefAttributes<HTMLDivElement>>;
221
221
 
222
- type Props$9 = {
222
+ type Props$8 = {
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$9>;
229
+ 'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$8>;
230
230
  }
231
231
  }
232
232
  }
233
- declare const Logo: React.ForwardRefExoticComponent<Props$9 & React.RefAttributes<HTMLDivElement>>;
233
+ declare const Logo: React.ForwardRefExoticComponent<Props$8 & React.RefAttributes<HTMLDivElement>>;
234
234
 
235
- type Props$8 = {
235
+ type Props$7 = {
236
236
  'password-label'?: string;
237
237
  'password-placeholder'?: string;
238
238
  'confirm-label'?: string;
@@ -242,11 +242,11 @@ type Props$8 = {
242
242
  declare global {
243
243
  namespace JSX {
244
244
  interface IntrinsicElements {
245
- 'descope-new-password': DescopeInputProps & Props$8;
245
+ 'descope-new-password': DescopeInputProps & Props$7;
246
246
  }
247
247
  }
248
248
  }
249
- declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$8, "ref"> & React.RefAttributes<HTMLInputElement>>;
249
+ declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$7, "ref"> & React.RefAttributes<HTMLInputElement>>;
250
250
 
251
251
  declare global {
252
252
  namespace JSX {
@@ -266,7 +266,7 @@ declare global {
266
266
  }
267
267
  declare const Password: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
268
268
 
269
- type Props$7 = {
269
+ type Props$6 = {
270
270
  'default-code'?: string;
271
271
  'phone-input-placeholder'?: string;
272
272
  'country-input-placeholder'?: string;
@@ -274,13 +274,13 @@ type Props$7 = {
274
274
  declare global {
275
275
  namespace JSX {
276
276
  interface IntrinsicElements {
277
- 'descope-phone-field': DescopeInputProps & Props$7;
277
+ 'descope-phone-field': DescopeInputProps & Props$6;
278
278
  }
279
279
  }
280
280
  }
281
- declare const Phone: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$7, "ref"> & React.RefAttributes<HTMLInputElement>>;
281
+ declare const Phone: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$6, "ref"> & React.RefAttributes<HTMLInputElement>>;
282
282
 
283
- type Props$6 = {
283
+ type Props$5 = {
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$6, "ref"> & React.RefAttributes<HTMLInputElement>>;
293
+ declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$5, "ref"> & React.RefAttributes<HTMLInputElement>>;
294
294
 
295
- type Props$5 = {
295
+ type Props$4 = {
296
296
  italic?: boolean;
297
297
  variant?: string;
298
298
  mode?: string;
@@ -302,11 +302,11 @@ type Props$5 = {
302
302
  declare global {
303
303
  namespace JSX {
304
304
  interface IntrinsicElements {
305
- 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$5;
305
+ 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$4;
306
306
  }
307
307
  }
308
308
  }
309
- declare const Text: React.ForwardRefExoticComponent<Omit<Props$5 & {
309
+ declare const Text: React.ForwardRefExoticComponent<Omit<Props$4 & {
310
310
  typography?: TypographyVariants;
311
311
  } & Omit<React.HTMLProps<HTMLSpanElement>, "mode">, "ref"> & React.RefAttributes<HTMLElement>>;
312
312
 
@@ -328,16 +328,18 @@ declare global {
328
328
  }
329
329
  declare const TextField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
330
330
 
331
- type Props$4 = {
332
- varName: string;
333
- fallback?: string;
334
- width?: number;
335
- height?: number;
331
+ type Props$3 = {
332
+ width?: string;
333
+ height?: string;
336
334
  };
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>>;
335
+ declare global {
336
+ namespace JSX {
337
+ interface IntrinsicElements {
338
+ 'descope-totp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$3>;
339
+ }
340
+ }
341
+ }
342
+ declare const TOTPImage: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLDivElement>>;
341
343
 
342
344
  type Props$2 = Omit<React.ComponentProps<typeof Link>, 'href'>;
343
345
  declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props$2, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
package/dist/index.esm.js CHANGED
@@ -185,7 +185,7 @@ const Loader = React.forwardRef(({ variant, color, ...restProps }, ref) => {
185
185
  }
186
186
  });
187
187
 
188
- const Logo = React.forwardRef(({ width, height }, ref) => (React.createElement("descope-logo", { "st-width": width, "st-height": height, ref: ref })));
188
+ const Logo = React.forwardRef(({ width, height, ...props }, ref) => (React.createElement("descope-logo", { "st-width": width, "st-height": height, ref: ref, ...props })));
189
189
 
190
190
  const NewPassword = React.forwardRef((props, ref) => React.createElement("descope-new-password", { ...props, ref: ref }));
191
191
 
@@ -204,19 +204,7 @@ Textarea.defaultProps = {
204
204
  size: 'md'
205
205
  };
206
206
 
207
- const CssVarImage = React.forwardRef(({ width, height, varName, fallback = '', style }, ref) => (React.createElement("div", {
208
- // className={divClasses}
209
- ref: ref, style: {
210
- ...style,
211
- content: `var(--${varName}, ${fallback})`,
212
- width: width || 'initial',
213
- height: height || 'initial'
214
- } })));
215
-
216
- // The reason we define TOTPImage as a component, and not injecting the style from another place,
217
- // is to restrict the dependency between the code that injects this variable style (web-component) to this place only
218
- // Note: be careful when changing variables here, this can affect other packages implicitly
219
- const TOTPImage = React.forwardRef(({ ...props }, ref) => (React.createElement(CssVarImage, { ref: ref, varName: "totp-image", ...props })));
207
+ const TOTPImage = React.forwardRef(({ width, height, ...props }, ref) => (React.createElement("descope-totp-image", { "st-width": width, "st-height": height, ref: ref, ...props })));
220
208
 
221
209
  // The reason we define TOTPLink as a component, and not injecting the style from another place,
222
210
  // is to restrict the dependency between the code that injects this variable style (web-component) to this place only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "2.0.73",
3
+ "version": "2.0.75",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -100,7 +100,7 @@
100
100
  "typescript": "^4.5.3"
101
101
  },
102
102
  "dependencies": {
103
- "@descope/web-components-ui": "1.0.129",
103
+ "@descope/web-components-ui": "1.0.136",
104
104
  "rollup-plugin-dts": "^5.3.0"
105
105
  },
106
106
  "peerDependencies": {