@descope/flow-components 2.0.234 → 2.0.236

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
@@ -85,6 +85,15 @@ var linkedin = ({ noColor }) => (React__default.default.createElement("svg", { x
85
85
  var sso = ({ noColor }) => (React__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1.5em", height: "1.5em", viewBox: "50 30 410 450", fill: noColor ? 'currentColor' : '#000000', "data-icon": "sso" },
86
86
  React__default.default.createElement("path", { d: "M56.629,379.2c-14.09,14.071-14.09,36.975,0,51.055 c14.08,14.087,36.981,14.087,50.965,0l10.177-10.08l42.438,42.428c7.257,7.268,18.888,7.268,26.155,0l63.244-63.244 c7.268-7.255,7.268-18.89,0-26.157l-42.429-42.427l75.586-75.682c16.174,8.357,34.61,13.075,54.059,13.075 c65.234,0,118.111-52.869,118.111-118.109c0-65.232-52.877-118.111-118.111-118.111c-65.238,0-118.11,52.879-118.11,118.111 c0,19.449,4.721,37.886,13.077,54.06L56.629,379.2z M291.396,150.059c0-25.075,20.354-45.429,45.427-45.429 c25.076,0,45.426,20.354,45.426,45.429s-20.35,45.426-45.426,45.426C311.751,195.485,291.396,175.133,291.396,150.059z" })));
87
87
 
88
+ const WhatsAppIcon = ({ noColor }) => (React__default.default.createElement("svg", { fill: "none", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg" },
89
+ React__default.default.createElement("clipPath", { id: "a" },
90
+ React__default.default.createElement("path", { d: "m0 0h24v24h-24z" })),
91
+ React__default.default.createElement("clipPath", { id: "b" },
92
+ React__default.default.createElement("path", { d: "m0 0h24v24h-24z" })),
93
+ React__default.default.createElement("g", { clipPath: "url(#a)" },
94
+ React__default.default.createElement("g", { clipPath: "url(#b)" },
95
+ React__default.default.createElement("path", { clipRule: "evenodd", d: "m20.5031 3.48501c-2.2558-2.24623-5.256-3.48387036-8.4527-3.48501-6.587 0-11.947836 5.33065-11.950128 11.883-.001146 2.0946.549492 4.1391 1.595188 5.9409l-1.69546 6.1586 6.33491-1.6525c1.74529.9471 3.71059 1.4456 5.71039 1.4462h.0051c6.5859 0 11.9473-5.3312 11.9496-11.8835.0011-3.1756-1.2405-6.1609-3.4969-8.40712zm-8.4527 18.28429h-.004c-1.782-.0005-3.53013-.4769-5.0554-1.3767l-.36272-.2142-3.75935.9806 1.0033-3.6451-.23608-.3738c-.99412-1.5727-1.51955-3.3904-1.5184-5.2565.00229-5.44579 4.45781-9.8767 9.93675-9.8767 2.6528.00114 5.1465 1.02966 7.0218 2.89696 1.8754 1.86673 2.9074 4.34887 2.9062 6.98764-.0023 5.4464-4.4578 9.8773-9.9321 9.8773zm5.4479-7.3973c-.2985-.1488-1.7664-.8668-2.0404-.9659-.2738-.0992-.4726-.1487-.6715.1487-.1988.2975-.7712.9665-.9454 1.1642-.1742.1983-.3484.2228-.6469.074-.2985-.1487-1.2606-.4621-2.4014-1.4735-.8875-.7875-1.4869-1.7596-1.66103-2.0571-.1742-.2974-.01834-.4581.1306-.6057.13406-.1333.29853-.347.44806-.5202.1496-.17325.19887-.29743.29857-.4952.0997-.19829.0498-.37147-.02463-.52024-.07454-.14871-.67154-1.61032-.9208-2.20462-.2424-.57892-.48874-.50029-.67154-.50997-.1742-.00855-.373-.01026-.5724-.01026s-.5226.07408-.79646.37152c-.27387.29742-1.04513 1.01596-1.04513 2.47698 0 1.46099 1.06979 2.87359 1.21933 3.07189.14953.1983 2.10566 3.1973 5.10063 4.4839.7123.306 1.2686.4889 1.7024.6257.7151.2262 1.366.1943 1.8805.1179.5736-.0854 1.7665-.7185 2.0152-1.412s.2487-1.2884.1742-1.412c-.0745-.1237-.2739-.1983-.5724-.347z", fill: noColor ? 'currentColor' : '#25D366', fillRule: "evenodd" })))));
96
+
88
97
  var icons = /*#__PURE__*/Object.freeze({
89
98
  __proto__: null,
90
99
  apple: apple,
@@ -98,7 +107,8 @@ var icons = /*#__PURE__*/Object.freeze({
98
107
  microsoft: microsoft,
99
108
  passkey: passkey,
100
109
  slack: slack,
101
- sso: sso
110
+ sso: sso,
111
+ whatsapp: WhatsAppIcon
102
112
  });
103
113
 
104
114
  const isImageSource = (src) => src.startsWith('data:image') || src.startsWith('http');
@@ -384,6 +394,26 @@ MappingsField.defaultProps = {
384
394
  size: 'md'
385
395
  };
386
396
 
397
+ const SAMLGroupMappings = React__default.default.forwardRef(({ options, ...props }, ref) => {
398
+ const serializedOptions = React.useMemo(() => {
399
+ if (!options)
400
+ return undefined;
401
+ try {
402
+ return JSON.stringify(options);
403
+ }
404
+ catch (e) {
405
+ // eslint-disable-next-line no-console
406
+ console.error('could not parse data string from attribute "options" -', e.message);
407
+ return '';
408
+ }
409
+ }, [options]);
410
+ return (React__default.default.createElement("descope-saml-group-mappings", { ...props, options: serializedOptions ?? undefined, ref: ref }));
411
+ });
412
+ SAMLGroupMappings.defaultProps = {
413
+ // eslint-disable-next-line react/default-props-match-prop-types
414
+ size: 'md'
415
+ };
416
+
387
417
  exports.Badge = Badge;
388
418
  exports.Boolean = Boolean;
389
419
  exports.Button = Button;
@@ -411,6 +441,7 @@ exports.NumberField = NumberField;
411
441
  exports.Password = Password;
412
442
  exports.Phone = Phone;
413
443
  exports.Recaptcha = Recaptcha;
444
+ exports.SAMLGroupMappings = SAMLGroupMappings;
414
445
  exports.Select = Select;
415
446
  exports.SingleSelect = SingleSelect;
416
447
  exports.Switch = Switch;
@@ -432,6 +463,7 @@ exports.microsoft = microsoft;
432
463
  exports.passkey = passkey;
433
464
  exports.slack = slack;
434
465
  exports.sso = sso;
466
+ exports.whatsapp = WhatsAppIcon;
435
467
  Object.keys(webComponentsUi).forEach(function (k) {
436
468
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
437
469
  enumerable: true,
package/dist/index.d.ts CHANGED
@@ -49,8 +49,8 @@ declare const Switch: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "r
49
49
  type BooleanType = {
50
50
  type: 'switch' | 'checkbox';
51
51
  };
52
- type Props$q = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
53
- declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$q, "ref"> & React.RefAttributes<HTMLInputElement>>;
52
+ type Props$r = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
53
+ declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$r, "ref"> & React.RefAttributes<HTMLInputElement>>;
54
54
 
55
55
  declare global {
56
56
  namespace JSX {
@@ -72,17 +72,17 @@ declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes
72
72
  'full-width'?: boolean;
73
73
  }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
74
74
 
75
- type Props$p = {
75
+ type Props$q = {
76
76
  digits?: number;
77
77
  };
78
78
  declare global {
79
79
  namespace JSX {
80
80
  interface IntrinsicElements {
81
- 'descope-passcode': DescopeInputProps & Props$p;
81
+ 'descope-passcode': DescopeInputProps & Props$q;
82
82
  }
83
83
  }
84
84
  }
85
- declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$p, "ref"> & React.RefAttributes<HTMLInputElement>>;
85
+ declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$q, "ref"> & React.RefAttributes<HTMLInputElement>>;
86
86
 
87
87
  type Never<T extends Record<string, any>> = {
88
88
  [K in keyof T]: never;
@@ -98,7 +98,7 @@ type ContainerAlignment = {
98
98
  'vertical-alignment'?: FlexAlignment;
99
99
  'space-between'?: 'sm' | 'md' | 'lg';
100
100
  };
101
- type Props$o = {
101
+ type Props$p = {
102
102
  direction?: 'row' | 'column';
103
103
  shadow?: 'md' | 'lg' | 'xl' | '2xl';
104
104
  'border-radius'?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
@@ -114,9 +114,9 @@ declare global {
114
114
  }
115
115
  }
116
116
  }
117
- declare const Container: React.ForwardRefExoticComponent<(Props$o & React.HTMLAttributes<HTMLDivElement>) & React.RefAttributes<HTMLDivElement>>;
117
+ declare const Container: React.ForwardRefExoticComponent<(Props$p & React.HTMLAttributes<HTMLDivElement>) & React.RefAttributes<HTMLDivElement>>;
118
118
 
119
- type Props$n = {
119
+ type Props$o = {
120
120
  vertical?: boolean;
121
121
  italic?: boolean;
122
122
  variant?: TypographyVariants;
@@ -126,11 +126,11 @@ type Props$n = {
126
126
  declare global {
127
127
  namespace JSX {
128
128
  interface IntrinsicElements {
129
- 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$n, 'children'>;
129
+ 'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$o, 'children'>;
130
130
  }
131
131
  }
132
132
  }
133
- declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & Props$n, "ref"> & React.RefAttributes<HTMLDivElement>>;
133
+ declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & Props$o, "ref"> & React.RefAttributes<HTMLDivElement>>;
134
134
 
135
135
  declare const _default$b: ({ noColor }: {
136
136
  noColor: any;
@@ -180,7 +180,11 @@ declare const _default: ({ noColor }: {
180
180
  noColor: any;
181
181
  }) => React.JSX.Element;
182
182
 
183
- type Props$m = {
183
+ declare const WhatsAppIcon: ({ noColor }: {
184
+ noColor: any;
185
+ }) => React.JSX.Element;
186
+
187
+ type Props$n = {
184
188
  width?: string;
185
189
  height?: string;
186
190
  alt?: string;
@@ -189,15 +193,15 @@ type Props$m = {
189
193
  declare global {
190
194
  namespace JSX {
191
195
  interface IntrinsicElements {
192
- 'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$m;
196
+ 'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$n;
193
197
  }
194
198
  }
195
199
  }
196
- declare const Image: React.ForwardRefExoticComponent<Props$m & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
200
+ declare const Image: React.ForwardRefExoticComponent<Props$n & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
197
201
 
198
202
  declare const Input: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
199
203
 
200
- type Props$l = {
204
+ type Props$m = {
201
205
  href?: string | undefined;
202
206
  italic?: boolean;
203
207
  variant?: TypographyVariants;
@@ -209,18 +213,18 @@ type Props$l = {
209
213
  declare global {
210
214
  namespace JSX {
211
215
  interface IntrinsicElements {
212
- 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$l, 'children'>;
216
+ 'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$m, 'children'>;
213
217
  }
214
218
  }
215
219
  }
216
- declare const Link: React.ForwardRefExoticComponent<Props$l & React.RefAttributes<HTMLAnchorElement>>;
220
+ declare const Link: React.ForwardRefExoticComponent<Props$m & React.RefAttributes<HTMLAnchorElement>>;
217
221
 
218
- type Props$k = {
222
+ type Props$l = {
219
223
  variant?: 'linear' | 'radial';
220
224
  size?: 'xs' | 'sm' | 'md' | 'lg';
221
225
  color?: Mode;
222
226
  };
223
- type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$k>;
227
+ type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$l>;
224
228
  declare global {
225
229
  namespace JSX {
226
230
  interface IntrinsicElements {
@@ -229,22 +233,22 @@ declare global {
229
233
  }
230
234
  }
231
235
  }
232
- declare const Loader: React.ForwardRefExoticComponent<Props$k & React.RefAttributes<HTMLDivElement>>;
236
+ declare const Loader: React.ForwardRefExoticComponent<Props$l & React.RefAttributes<HTMLDivElement>>;
233
237
 
234
- type Props$j = {
238
+ type Props$k = {
235
239
  width?: string;
236
240
  height?: string;
237
241
  };
238
242
  declare global {
239
243
  namespace JSX {
240
244
  interface IntrinsicElements {
241
- 'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$j>;
245
+ 'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$k>;
242
246
  }
243
247
  }
244
248
  }
245
- declare const Logo: React.ForwardRefExoticComponent<Props$j & React.RefAttributes<HTMLDivElement>>;
249
+ declare const Logo: React.ForwardRefExoticComponent<Props$k & React.RefAttributes<HTMLDivElement>>;
246
250
 
247
- type Props$i = {
251
+ type Props$j = {
248
252
  'password-label'?: string;
249
253
  'password-placeholder'?: string;
250
254
  'confirm-label'?: string;
@@ -254,11 +258,11 @@ type Props$i = {
254
258
  declare global {
255
259
  namespace JSX {
256
260
  interface IntrinsicElements {
257
- 'descope-new-password': DescopeInputProps & Props$i;
261
+ 'descope-new-password': DescopeInputProps & Props$j;
258
262
  }
259
263
  }
260
264
  }
261
- declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$i, "ref"> & React.RefAttributes<HTMLInputElement>>;
265
+ declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$j, "ref"> & React.RefAttributes<HTMLInputElement>>;
262
266
 
263
267
  declare global {
264
268
  namespace JSX {
@@ -278,16 +282,16 @@ declare global {
278
282
  }
279
283
  declare const Password: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
280
284
 
281
- type Props$h = {
285
+ type Props$i = {
282
286
  variant: 'countrySelection' | 'inputBox';
283
287
  'default-code'?: string;
284
288
  'phone-input-placeholder'?: string;
285
289
  'country-input-placeholder'?: string;
286
290
  'restrict-countries'?: string;
287
291
  } & DescopeInputProps;
288
- declare const Phone: React.ForwardRefExoticComponent<Omit<Props$h, "ref"> & React.RefAttributes<HTMLInputElement>>;
292
+ declare const Phone: React.ForwardRefExoticComponent<Omit<Props$i, "ref"> & React.RefAttributes<HTMLInputElement>>;
289
293
 
290
- type Props$g = {
294
+ type Props$h = {
291
295
  children?: JSX.Element[];
292
296
  data?: string | Record<string, string>[];
293
297
  };
@@ -300,9 +304,9 @@ declare global {
300
304
  }
301
305
  }
302
306
  }
303
- declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$g, "ref"> & React.RefAttributes<HTMLInputElement>>;
307
+ declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$h, "ref"> & React.RefAttributes<HTMLInputElement>>;
304
308
 
305
- type Props$f = {
309
+ type Props$g = {
306
310
  italic?: boolean;
307
311
  variant?: string;
308
312
  mode?: string;
@@ -312,11 +316,11 @@ type Props$f = {
312
316
  declare global {
313
317
  namespace JSX {
314
318
  interface IntrinsicElements {
315
- 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$f;
319
+ 'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$g;
316
320
  }
317
321
  }
318
322
  }
319
- declare const Text: React.ForwardRefExoticComponent<Omit<Props$f & {
323
+ declare const Text: React.ForwardRefExoticComponent<Omit<Props$g & {
320
324
  typography?: TypographyVariants;
321
325
  } & Omit<React.HTMLProps<HTMLSpanElement>, "mode">, "ref"> & React.RefAttributes<HTMLElement>>;
322
326
 
@@ -338,39 +342,39 @@ declare global {
338
342
  }
339
343
  declare const TextField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
340
344
 
341
- type Props$e = {
345
+ type Props$f = {
342
346
  width?: string;
343
347
  height?: string;
344
348
  };
345
349
  declare global {
346
350
  namespace JSX {
347
351
  interface IntrinsicElements {
348
- 'descope-totp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$e>;
352
+ 'descope-totp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$f>;
349
353
  }
350
354
  }
351
355
  }
352
- declare const TOTPImage: React.ForwardRefExoticComponent<Props$e & React.RefAttributes<HTMLDivElement>>;
356
+ declare const TOTPImage: React.ForwardRefExoticComponent<Props$f & React.RefAttributes<HTMLDivElement>>;
353
357
 
354
- type Props$d = Omit<React.ComponentProps<typeof Link>, 'href'>;
355
- declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props$d, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
358
+ type Props$e = Omit<React.ComponentProps<typeof Link>, 'href'>;
359
+ declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props$e, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
356
360
 
357
- type Props$c = {
361
+ type Props$d = {
358
362
  width?: string;
359
363
  height?: string;
360
364
  };
361
365
  declare global {
362
366
  namespace JSX {
363
367
  interface IntrinsicElements {
364
- 'descope-notp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$c>;
368
+ 'descope-notp-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$d>;
365
369
  }
366
370
  }
367
371
  }
368
- declare const NOTPImage: React.ForwardRefExoticComponent<Props$c & React.RefAttributes<HTMLDivElement>>;
372
+ declare const NOTPImage: React.ForwardRefExoticComponent<Props$d & React.RefAttributes<HTMLDivElement>>;
369
373
 
370
- type Props$b = Omit<React.ComponentProps<typeof Link>, 'href'>;
371
- declare const NOTPLink: React.ForwardRefExoticComponent<Omit<Props$b, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
374
+ type Props$c = Omit<React.ComponentProps<typeof Link>, 'href'>;
375
+ declare const NOTPLink: React.ForwardRefExoticComponent<Omit<Props$c, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
372
376
 
373
- type Props$a = {
377
+ type Props$b = {
374
378
  title?: string;
375
379
  description?: string;
376
380
  icon?: string;
@@ -389,13 +393,13 @@ type Props$a = {
389
393
  declare global {
390
394
  namespace JSX {
391
395
  interface IntrinsicElements {
392
- 'descope-upload-file': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$a;
396
+ 'descope-upload-file': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$b;
393
397
  }
394
398
  }
395
399
  }
396
- declare const UploadFile: React.ForwardRefExoticComponent<Props$a & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
400
+ declare const UploadFile: React.ForwardRefExoticComponent<Props$b & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
397
401
 
398
- type Props$9 = {
402
+ type Props$a = {
399
403
  enabled?: boolean;
400
404
  'site-key'?: string;
401
405
  enterprise?: boolean;
@@ -407,20 +411,20 @@ declare global {
407
411
  }
408
412
  namespace JSX {
409
413
  interface IntrinsicElements {
410
- 'descope-recaptcha': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$9;
414
+ 'descope-recaptcha': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$a;
411
415
  }
412
416
  }
413
417
  }
414
- declare const Recaptcha: React.ForwardRefExoticComponent<Props$9 & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
418
+ declare const Recaptcha: React.ForwardRefExoticComponent<Props$a & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
415
419
 
416
- type Props$8 = DescopeInputProps & {
420
+ type Props$9 = DescopeInputProps & {
417
421
  'default-value'?: string;
418
422
  'allow-deselect'?: boolean;
419
423
  };
420
424
  declare global {
421
425
  namespace JSX {
422
426
  interface IntrinsicElements {
423
- 'descope-button-selection-group': Props$8;
427
+ 'descope-button-selection-group': Props$9;
424
428
  'descope-button-selection-group-item': JSX.IntrinsicElements['span'] & {
425
429
  value: string;
426
430
  children: string;
@@ -435,19 +439,19 @@ declare const ButtonSelectionGroup: React.ForwardRefExoticComponent<Omit<HTMLInp
435
439
  children?: JSX.Element[];
436
440
  }, "ref"> & React.RefAttributes<HTMLInputElement>>;
437
441
 
438
- type Item$2 = {
442
+ type Item$3 = {
439
443
  label: string;
440
444
  value: string;
441
445
  };
442
446
  type SingleSelectType = {
443
447
  variant?: 'buttonSelectionGroup' | 'combobox';
444
- data?: Item$2[];
448
+ data?: Item$3[];
445
449
  allowClearValue?: boolean;
446
450
  };
447
- type Props$7 = Omit<React.ComponentProps<typeof ButtonSelectionGroup>, 'allow-deselect'> & SingleSelectType;
448
- declare const SingleSelect: React.ForwardRefExoticComponent<Omit<Props$7, "ref"> & React.RefAttributes<HTMLInputElement>>;
451
+ type Props$8 = Omit<React.ComponentProps<typeof ButtonSelectionGroup>, 'allow-deselect'> & SingleSelectType;
452
+ declare const SingleSelect: React.ForwardRefExoticComponent<Omit<Props$8, "ref"> & React.RefAttributes<HTMLInputElement>>;
449
453
 
450
- type Props$6 = DescopeInputProps & {
454
+ type Props$7 = DescopeInputProps & {
451
455
  'default-value'?: string;
452
456
  'item-label-path'?: string;
453
457
  'item-value-path'?: string;
@@ -455,7 +459,7 @@ type Props$6 = DescopeInputProps & {
455
459
  declare global {
456
460
  namespace JSX {
457
461
  interface IntrinsicElements {
458
- 'descope-combobox': Props$6;
462
+ 'descope-combobox': Props$7;
459
463
  }
460
464
  }
461
465
  }
@@ -477,7 +481,7 @@ type Column = {
477
481
  resizable: boolean;
478
482
  };
479
483
  };
480
- type Props$5 = {
484
+ type Props$6 = {
481
485
  identifier: any;
482
486
  children?: JSX.Element[];
483
487
  size?: Omit<ComponentSize, 'xl'>;
@@ -493,7 +497,7 @@ declare global {
493
497
  }
494
498
  }
495
499
  }
496
- declare const Grid: React.ForwardRefExoticComponent<Props$5 & React.RefAttributes<HTMLInputElement>>;
500
+ declare const Grid: React.ForwardRefExoticComponent<Props$6 & React.RefAttributes<HTMLInputElement>>;
497
501
 
498
502
  type ColumnProps = {
499
503
  sortable?: boolean;
@@ -533,7 +537,7 @@ declare global {
533
537
  }
534
538
  declare const GridTextColumn: React.ForwardRefExoticComponent<ColumnProps & React.RefAttributes<HTMLInputElement>>;
535
539
 
536
- type Props$4 = {
540
+ type Props$5 = {
537
541
  mode?: string;
538
542
  size?: string;
539
543
  bordered?: boolean;
@@ -542,11 +546,11 @@ type Props$4 = {
542
546
  declare global {
543
547
  namespace JSX {
544
548
  interface IntrinsicElements {
545
- 'descope-badge': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$4;
549
+ 'descope-badge': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$5;
546
550
  }
547
551
  }
548
552
  }
549
- declare const Badge: React.ForwardRefExoticComponent<Props$4 & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
553
+ declare const Badge: React.ForwardRefExoticComponent<Props$5 & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
550
554
 
551
555
  declare global {
552
556
  namespace JSX {
@@ -555,12 +559,12 @@ declare global {
555
559
  }
556
560
  }
557
561
  }
558
- type Props$3 = {
562
+ type Props$4 = {
559
563
  opened?: boolean;
560
564
  };
561
- declare const Modal: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLDivElement>>;
565
+ declare const Modal: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLDivElement>>;
562
566
 
563
- type Props$2 = DescopeInputProps & {
567
+ type Props$3 = DescopeInputProps & {
564
568
  size?: 'xs' | 'sm' | 'md' | 'lg';
565
569
  'min-items-selection'?: number;
566
570
  'max-items-selection'?: number;
@@ -568,7 +572,7 @@ type Props$2 = DescopeInputProps & {
568
572
  declare global {
569
573
  namespace JSX {
570
574
  interface IntrinsicElements {
571
- 'descope-button-multi-selection-group': Props$2 & {
575
+ 'descope-button-multi-selection-group': Props$3 & {
572
576
  'default-values'?: string;
573
577
  };
574
578
  'descope-button-selection-group-item': JSX.IntrinsicElements['span'] & {
@@ -584,20 +588,45 @@ declare const ButtonMultiSelectionGroup: React.ForwardRefExoticComponent<Omit<HT
584
588
  'max-items-selection'?: number;
585
589
  } & MultiSelectProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
586
590
 
587
- type Item$1 = {
591
+ type Item$2 = {
588
592
  label: string;
589
593
  value: string;
590
594
  };
591
595
  type MultiSelectType = {
592
596
  variant?: 'buttonSelectionGroup' | 'combobox' | 'dynamicCombobox';
593
- data?: Item$1[];
597
+ data?: Item$2[];
594
598
  'min-items-selection'?: number;
595
599
  'max-items-selection'?: number;
596
600
  };
597
- type Props$1 = Omit<React.ComponentProps<typeof ButtonMultiSelectionGroup>, 'default-values'> & MultiSelectType & {
601
+ type Props$2 = Omit<React.ComponentProps<typeof ButtonMultiSelectionGroup>, 'default-values'> & MultiSelectType & {
598
602
  'default-values'?: string[];
599
603
  };
600
- declare const MultiSelect: React.ForwardRefExoticComponent<Omit<Props$1, "ref"> & React.RefAttributes<HTMLInputElement>>;
604
+ declare const MultiSelect: React.ForwardRefExoticComponent<Omit<Props$2, "ref"> & React.RefAttributes<HTMLInputElement>>;
605
+
606
+ type Item$1 = {
607
+ label: string;
608
+ value: string;
609
+ };
610
+ type Props$1 = Omit<DescopeInputProps, 'bordered' | 'label' | 'placeholder' | 'helper-text' | 'data-errormessage-pattern-mismatch' | 'data-errormessage-value-missing'> & {
611
+ 'label-value'?: string;
612
+ 'label-attr'?: string;
613
+ 'button-label'?: string;
614
+ separator?: string;
615
+ size?: 'xs' | 'sm' | 'md' | 'lg';
616
+ 'default-values'?: Record<string, string>[];
617
+ options?: Item$1[];
618
+ };
619
+ declare global {
620
+ namespace JSX {
621
+ interface IntrinsicElements {
622
+ 'descope-mappings-field': Omit<Props$1, 'default-values' | 'options'> & {
623
+ 'default-values'?: string;
624
+ options?: string;
625
+ };
626
+ }
627
+ }
628
+ }
629
+ declare const MappingsField: React.ForwardRefExoticComponent<Omit<Props$1, "ref"> & React.RefAttributes<HTMLInputElement>>;
601
630
 
602
631
  type Item = {
603
632
  label: string;
@@ -606,22 +635,21 @@ type Item = {
606
635
  type Props = Omit<DescopeInputProps, 'bordered' | 'label' | 'placeholder' | 'helper-text' | 'data-errormessage-pattern-mismatch' | 'data-errormessage-value-missing'> & {
607
636
  'label-value'?: string;
608
637
  'label-attr'?: string;
638
+ 'label-group'?: string;
609
639
  'button-label'?: string;
610
640
  separator?: string;
611
641
  size?: 'xs' | 'sm' | 'md' | 'lg';
612
- 'default-values'?: Record<string, string>[];
613
642
  options?: Item[];
614
643
  };
615
644
  declare global {
616
645
  namespace JSX {
617
646
  interface IntrinsicElements {
618
- 'descope-mappings-field': Omit<Props, 'default-values' | 'options'> & {
619
- 'default-values'?: string;
647
+ 'descope-saml-group-mappings': Omit<Props, 'options'> & {
620
648
  options?: string;
621
649
  };
622
650
  }
623
651
  }
624
652
  }
625
- declare const MappingsField: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
653
+ declare const SAMLGroupMappings: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
626
654
 
627
- export { Badge, Boolean, Button, Checkbox, Code, ComboBox, Container, Divider, Grid, GridCustomColumn, GridSelectionColumn, GridTextColumn, Image, Input, Link, Loader, Logo, MappingsField, Modal, MultiSelect, NOTPImage, NOTPLink, NewPassword, NumberField, Password, Phone, Recaptcha, Select, SingleSelect, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, _default$b as apple, _default$2 as discord, _default$a 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$9 as slack, _default as sso };
655
+ export { Badge, Boolean, Button, Checkbox, Code, ComboBox, Container, Divider, Grid, GridCustomColumn, GridSelectionColumn, GridTextColumn, Image, Input, Link, Loader, Logo, MappingsField, Modal, MultiSelect, NOTPImage, NOTPLink, NewPassword, NumberField, Password, Phone, Recaptcha, SAMLGroupMappings, Select, SingleSelect, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, _default$b as apple, _default$2 as discord, _default$a 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$9 as slack, _default as sso, WhatsAppIcon as whatsapp };
package/dist/index.esm.js CHANGED
@@ -79,6 +79,15 @@ var linkedin = ({ noColor }) => (React.createElement("svg", { xmlns: "http://www
79
79
  var sso = ({ noColor }) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1.5em", height: "1.5em", viewBox: "50 30 410 450", fill: noColor ? 'currentColor' : '#000000', "data-icon": "sso" },
80
80
  React.createElement("path", { d: "M56.629,379.2c-14.09,14.071-14.09,36.975,0,51.055 c14.08,14.087,36.981,14.087,50.965,0l10.177-10.08l42.438,42.428c7.257,7.268,18.888,7.268,26.155,0l63.244-63.244 c7.268-7.255,7.268-18.89,0-26.157l-42.429-42.427l75.586-75.682c16.174,8.357,34.61,13.075,54.059,13.075 c65.234,0,118.111-52.869,118.111-118.109c0-65.232-52.877-118.111-118.111-118.111c-65.238,0-118.11,52.879-118.11,118.111 c0,19.449,4.721,37.886,13.077,54.06L56.629,379.2z M291.396,150.059c0-25.075,20.354-45.429,45.427-45.429 c25.076,0,45.426,20.354,45.426,45.429s-20.35,45.426-45.426,45.426C311.751,195.485,291.396,175.133,291.396,150.059z" })));
81
81
 
82
+ const WhatsAppIcon = ({ noColor }) => (React.createElement("svg", { fill: "none", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg" },
83
+ React.createElement("clipPath", { id: "a" },
84
+ React.createElement("path", { d: "m0 0h24v24h-24z" })),
85
+ React.createElement("clipPath", { id: "b" },
86
+ React.createElement("path", { d: "m0 0h24v24h-24z" })),
87
+ React.createElement("g", { clipPath: "url(#a)" },
88
+ React.createElement("g", { clipPath: "url(#b)" },
89
+ React.createElement("path", { clipRule: "evenodd", d: "m20.5031 3.48501c-2.2558-2.24623-5.256-3.48387036-8.4527-3.48501-6.587 0-11.947836 5.33065-11.950128 11.883-.001146 2.0946.549492 4.1391 1.595188 5.9409l-1.69546 6.1586 6.33491-1.6525c1.74529.9471 3.71059 1.4456 5.71039 1.4462h.0051c6.5859 0 11.9473-5.3312 11.9496-11.8835.0011-3.1756-1.2405-6.1609-3.4969-8.40712zm-8.4527 18.28429h-.004c-1.782-.0005-3.53013-.4769-5.0554-1.3767l-.36272-.2142-3.75935.9806 1.0033-3.6451-.23608-.3738c-.99412-1.5727-1.51955-3.3904-1.5184-5.2565.00229-5.44579 4.45781-9.8767 9.93675-9.8767 2.6528.00114 5.1465 1.02966 7.0218 2.89696 1.8754 1.86673 2.9074 4.34887 2.9062 6.98764-.0023 5.4464-4.4578 9.8773-9.9321 9.8773zm5.4479-7.3973c-.2985-.1488-1.7664-.8668-2.0404-.9659-.2738-.0992-.4726-.1487-.6715.1487-.1988.2975-.7712.9665-.9454 1.1642-.1742.1983-.3484.2228-.6469.074-.2985-.1487-1.2606-.4621-2.4014-1.4735-.8875-.7875-1.4869-1.7596-1.66103-2.0571-.1742-.2974-.01834-.4581.1306-.6057.13406-.1333.29853-.347.44806-.5202.1496-.17325.19887-.29743.29857-.4952.0997-.19829.0498-.37147-.02463-.52024-.07454-.14871-.67154-1.61032-.9208-2.20462-.2424-.57892-.48874-.50029-.67154-.50997-.1742-.00855-.373-.01026-.5724-.01026s-.5226.07408-.79646.37152c-.27387.29742-1.04513 1.01596-1.04513 2.47698 0 1.46099 1.06979 2.87359 1.21933 3.07189.14953.1983 2.10566 3.1973 5.10063 4.4839.7123.306 1.2686.4889 1.7024.6257.7151.2262 1.366.1943 1.8805.1179.5736-.0854 1.7665-.7185 2.0152-1.412s.2487-1.2884.1742-1.412c-.0745-.1237-.2739-.1983-.5724-.347z", fill: noColor ? 'currentColor' : '#25D366', fillRule: "evenodd" })))));
90
+
82
91
  var icons = /*#__PURE__*/Object.freeze({
83
92
  __proto__: null,
84
93
  apple: apple,
@@ -92,7 +101,8 @@ var icons = /*#__PURE__*/Object.freeze({
92
101
  microsoft: microsoft,
93
102
  passkey: passkey,
94
103
  slack: slack,
95
- sso: sso
104
+ sso: sso,
105
+ whatsapp: WhatsAppIcon
96
106
  });
97
107
 
98
108
  const isImageSource = (src) => src.startsWith('data:image') || src.startsWith('http');
@@ -378,4 +388,24 @@ MappingsField.defaultProps = {
378
388
  size: 'md'
379
389
  };
380
390
 
381
- export { Badge, Boolean, Button, Checkbox, Code, ComboBox, Container, Divider, Grid, GridCustomColumn, GridSelectionColumn, GridTextColumn, Image, Input, Link, Loader, Logo, MappingsField, Modal, MultiSelect, NOTPImage, NOTPLink, NewPassword, NumberField, Password, Phone, Recaptcha, Select, SingleSelect, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, apple, discord, facebook, fingerprint, github, gitlab, google, linkedin, microsoft, passkey, slack, sso };
391
+ const SAMLGroupMappings = React.forwardRef(({ options, ...props }, ref) => {
392
+ const serializedOptions = useMemo(() => {
393
+ if (!options)
394
+ return undefined;
395
+ try {
396
+ return JSON.stringify(options);
397
+ }
398
+ catch (e) {
399
+ // eslint-disable-next-line no-console
400
+ console.error('could not parse data string from attribute "options" -', e.message);
401
+ return '';
402
+ }
403
+ }, [options]);
404
+ return (React.createElement("descope-saml-group-mappings", { ...props, options: serializedOptions ?? undefined, ref: ref }));
405
+ });
406
+ SAMLGroupMappings.defaultProps = {
407
+ // eslint-disable-next-line react/default-props-match-prop-types
408
+ size: 'md'
409
+ };
410
+
411
+ export { Badge, Boolean, Button, Checkbox, Code, ComboBox, Container, Divider, Grid, GridCustomColumn, GridSelectionColumn, GridTextColumn, Image, Input, Link, Loader, Logo, MappingsField, Modal, MultiSelect, NOTPImage, NOTPLink, NewPassword, NumberField, Password, Phone, Recaptcha, SAMLGroupMappings, Select, SingleSelect, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, UploadFile, apple, discord, facebook, fingerprint, github, gitlab, google, linkedin, microsoft, passkey, slack, sso, WhatsAppIcon as whatsapp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "2.0.234",
3
+ "version": "2.0.236",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -100,7 +100,7 @@
100
100
  "typescript": "^5.0.0"
101
101
  },
102
102
  "dependencies": {
103
- "@descope/web-components-ui": "1.0.289"
103
+ "@descope/web-components-ui": "1.0.291"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "react": ">=17"