@redsift/popovers 7.7.0 → 7.8.0

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/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import React, { useContext, useState, useLayoutEffect, useMemo, useEffect, forwardRef, useRef, useId, useCallback } from 'react';
1
+ import React, { useState, useEffect, forwardRef, useContext, useRef, useId, useCallback } from 'react';
2
+ import { useLocalizedStringFormatter, useButton } from 'react-aria';
2
3
  import { FloatingOverlay, useMergeRefs, useTransitionStyles, FloatingPortal, FloatingFocusManager, useFloating, useDismiss, useRole, useInteractions, autoUpdate, offset, flip, shift, arrow, useHover, useFocus } from '@floating-ui/react';
3
4
  import classNames from 'classnames';
4
5
  import { mdiClose, mdiAlert, mdiCheckCircle, mdiAlertCircle, mdiInformation } from '@redsift/icons';
5
- import { useButton } from '@react-aria/button';
6
6
  import styled, { css } from 'styled-components';
7
7
  import { ToastContainer as ToastContainer$1, Slide, toast } from 'react-toastify';
8
8
 
@@ -21,6 +21,27 @@ const DialogSize = {
21
21
  large: 'large'
22
22
  };
23
23
 
24
+ /**
25
+ * Color palette.
26
+ */
27
+ const ColorPalette = {
28
+ default: 'default',
29
+ success: 'success',
30
+ error: 'error',
31
+ warning: 'warning',
32
+ info: 'info',
33
+ question: 'question',
34
+ 'no-data': 'no-data'
35
+ };
36
+ const ProductColorPalette = {
37
+ website: 'website',
38
+ ondmarc: 'ondmarc',
39
+ oninbox: 'oninbox',
40
+ ondomain: 'ondomain',
41
+ hardenize: 'hardenize',
42
+ tools: 'tools'
43
+ };
44
+
24
45
  /**
25
46
  * Create a predicate function that checks if a ReactNode is a react element from the given component.
26
47
  *
@@ -74,6 +95,19 @@ const warnIfNoAccessibleLabelFound = (props, additionalKeysToCheck) => {
74
95
  }
75
96
  };
76
97
 
98
+ /**
99
+ * Get the bounding rect of a component.
100
+ */
101
+ const useBoundingClientRect = (ref, deps) => {
102
+ const [boundingRect, setBoundingRect] = useState({});
103
+ useEffect(() => {
104
+ if (ref.current) {
105
+ setBoundingRect(ref.current.getBoundingClientRect());
106
+ }
107
+ }, deps);
108
+ return boundingRect;
109
+ };
110
+
77
111
  function ownKeys(object, enumerableOnly) {
78
112
  var keys = Object.keys(object);
79
113
  if (Object.getOwnPropertySymbols) {
@@ -165,360 +199,6 @@ function _toPropertyKey(arg) {
165
199
  return typeof key === "symbol" ? key : String(key);
166
200
  }
167
201
 
168
- /*
169
- * Copyright 2020 Adobe. All rights reserved.
170
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
171
- * you may not use this file except in compliance with the License. You may obtain a copy
172
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
173
- *
174
- * Unless required by applicable law or agreed to in writing, software distributed under
175
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
176
- * OF ANY KIND, either express or implied. See the License for the specific language
177
- * governing permissions and limitations under the License.
178
- */ /*
179
- * Copyright 2020 Adobe. All rights reserved.
180
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
181
- * you may not use this file except in compliance with the License. You may obtain a copy
182
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
183
- *
184
- * Unless required by applicable law or agreed to in writing, software distributed under
185
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
186
- * OF ANY KIND, either express or implied. See the License for the specific language
187
- * governing permissions and limitations under the License.
188
- */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is
189
- // guarded by a check that it only runs on the client side.
190
- // eslint-disable-next-line rulesdir/useLayoutEffectRule
191
-
192
- // Default context value to use in case there is no SSRProvider. This is fine for
193
- // client-only apps. In order to support multiple copies of React Aria potentially
194
- // being on the page at once, the prefix is set to a random number. SSRProvider
195
- // will reset this to zero for consistency between server and client, so in the
196
- // SSR case multiple copies of React Aria is not supported.
197
- const $704cf1d3b684cc5c$var$defaultContext = {
198
- prefix: String(Math.round(Math.random() * 10000000000)),
199
- current: 0
200
- };
201
- const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/ (React).createContext($704cf1d3b684cc5c$var$defaultContext);
202
- function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
203
- let cur = (useContext)($704cf1d3b684cc5c$var$SSRContext);
204
- let isInSSRContext = cur !== $704cf1d3b684cc5c$var$defaultContext;
205
- let [isSSR, setIsSSR] = (useState)(isInSSRContext);
206
- // If on the client, and the component was initially server rendered,
207
- // then schedule a layout effect to update the component after hydration.
208
- if (typeof window !== "undefined" && isInSSRContext) // This if statement technically breaks the rules of hooks, but is safe
209
- // because the condition never changes after mounting.
210
- // eslint-disable-next-line react-hooks/rules-of-hooks
211
- (useLayoutEffect)(()=>{
212
- setIsSSR(false);
213
- }, []);
214
- return isSSR;
215
- }
216
-
217
- /*
218
- * Copyright 2022 Adobe. All rights reserved.
219
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
220
- * you may not use this file except in compliance with the License. You may obtain a copy
221
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
222
- *
223
- * Unless required by applicable law or agreed to in writing, software distributed under
224
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
225
- * OF ANY KIND, either express or implied. See the License for the specific language
226
- * governing permissions and limitations under the License.
227
- */ /*
228
- * Copyright 2022 Adobe. All rights reserved.
229
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
230
- * you may not use this file except in compliance with the License. You may obtain a copy
231
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
232
- *
233
- * Unless required by applicable law or agreed to in writing, software distributed under
234
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
235
- * OF ANY KIND, either express or implied. See the License for the specific language
236
- * governing permissions and limitations under the License.
237
- */ class $5b160d28a433310d$export$c17fa47878dc55b6 {
238
- /** Returns a localized string for the given key and locale. */ getStringForLocale(key, locale) {
239
- let strings = this.strings[locale];
240
- if (!strings) {
241
- strings = $5b160d28a433310d$var$getStringsForLocale(locale, this.strings, this.defaultLocale);
242
- this.strings[locale] = strings;
243
- }
244
- let string = strings[key];
245
- if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);
246
- return string;
247
- }
248
- constructor(messages, defaultLocale = "en-US"){
249
- // Clone messages so we don't modify the original object.
250
- this.strings = {
251
- ...messages
252
- };
253
- this.defaultLocale = defaultLocale;
254
- }
255
- }
256
- function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") {
257
- // If there is an exact match, use it.
258
- if (strings[locale]) return strings[locale];
259
- // Attempt to find the closest match by language.
260
- // For example, if the locale is fr-CA (French Canadian), but there is only
261
- // an fr-FR (France) set of strings, use that.
262
- // This could be replaced with Intl.LocaleMatcher once it is supported.
263
- // https://github.com/tc39/proposal-intl-localematcher
264
- let language = $5b160d28a433310d$var$getLanguage(locale);
265
- if (strings[language]) return strings[language];
266
- for(let key in strings){
267
- if (key.startsWith(language + "-")) return strings[key];
268
- }
269
- // Nothing close, use english.
270
- return strings[defaultLocale];
271
- }
272
- function $5b160d28a433310d$var$getLanguage(locale) {
273
- // @ts-ignore
274
- if (Intl.Locale) // @ts-ignore
275
- return new Intl.Locale(locale).language;
276
- return locale.split("-")[0];
277
- }
278
-
279
-
280
- /*
281
- * Copyright 2022 Adobe. All rights reserved.
282
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
283
- * you may not use this file except in compliance with the License. You may obtain a copy
284
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
285
- *
286
- * Unless required by applicable law or agreed to in writing, software distributed under
287
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
288
- * OF ANY KIND, either express or implied. See the License for the specific language
289
- * governing permissions and limitations under the License.
290
- */ const $6db58dc88e78b024$var$pluralRulesCache = new Map();
291
- const $6db58dc88e78b024$var$numberFormatCache = new Map();
292
- class $6db58dc88e78b024$export$2f817fcdc4b89ae0 {
293
- /** Formats a localized string for the given key with the provided variables. */ format(key, variables) {
294
- let message = this.strings.getStringForLocale(key, this.locale);
295
- return typeof message === "function" ? message(variables, this) : message;
296
- }
297
- plural(count, options, type = "cardinal") {
298
- let opt = options["=" + count];
299
- if (opt) return typeof opt === "function" ? opt() : opt;
300
- let key = this.locale + ":" + type;
301
- let pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);
302
- if (!pluralRules) {
303
- pluralRules = new Intl.PluralRules(this.locale, {
304
- type: type
305
- });
306
- $6db58dc88e78b024$var$pluralRulesCache.set(key, pluralRules);
307
- }
308
- let selected = pluralRules.select(count);
309
- opt = options[selected] || options.other;
310
- return typeof opt === "function" ? opt() : opt;
311
- }
312
- number(value) {
313
- let numberFormat = $6db58dc88e78b024$var$numberFormatCache.get(this.locale);
314
- if (!numberFormat) {
315
- numberFormat = new Intl.NumberFormat(this.locale);
316
- $6db58dc88e78b024$var$numberFormatCache.set(this.locale, numberFormat);
317
- }
318
- return numberFormat.format(value);
319
- }
320
- select(options, value) {
321
- let opt = options[value] || options.other;
322
- return typeof opt === "function" ? opt() : opt;
323
- }
324
- constructor(locale, strings){
325
- this.locale = locale;
326
- this.strings = strings;
327
- }
328
- }
329
-
330
- /*
331
- * Copyright 2020 Adobe. All rights reserved.
332
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
333
- * you may not use this file except in compliance with the License. You may obtain a copy
334
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
335
- *
336
- * Unless required by applicable law or agreed to in writing, software distributed under
337
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
338
- * OF ANY KIND, either express or implied. See the License for the specific language
339
- * governing permissions and limitations under the License.
340
- */ /*
341
- * Copyright 2020 Adobe. All rights reserved.
342
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
343
- * you may not use this file except in compliance with the License. You may obtain a copy
344
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
345
- *
346
- * Unless required by applicable law or agreed to in writing, software distributed under
347
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
348
- * OF ANY KIND, either express or implied. See the License for the specific language
349
- * governing permissions and limitations under the License.
350
- */ /*
351
- * Copyright 2020 Adobe. All rights reserved.
352
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
353
- * you may not use this file except in compliance with the License. You may obtain a copy
354
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
355
- *
356
- * Unless required by applicable law or agreed to in writing, software distributed under
357
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
358
- * OF ANY KIND, either express or implied. See the License for the specific language
359
- * governing permissions and limitations under the License.
360
- */ // https://en.wikipedia.org/wiki/Right-to-left
361
- const $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([
362
- "Arab",
363
- "Syrc",
364
- "Samr",
365
- "Mand",
366
- "Thaa",
367
- "Mend",
368
- "Nkoo",
369
- "Adlm",
370
- "Rohg",
371
- "Hebr"
372
- ]);
373
- const $148a7a147e38ea7f$var$RTL_LANGS = new Set([
374
- "ae",
375
- "ar",
376
- "arc",
377
- "bcc",
378
- "bqi",
379
- "ckb",
380
- "dv",
381
- "fa",
382
- "glk",
383
- "he",
384
- "ku",
385
- "mzn",
386
- "nqo",
387
- "pnb",
388
- "ps",
389
- "sd",
390
- "ug",
391
- "ur",
392
- "yi"
393
- ]);
394
- function $148a7a147e38ea7f$export$702d680b21cbd764(locale) {
395
- // If the Intl.Locale API is available, use it to get the script for the locale.
396
- // This is more accurate than guessing by language, since languages can be written in multiple scripts.
397
- // @ts-ignore
398
- if (Intl.Locale) {
399
- // @ts-ignore
400
- let script = new Intl.Locale(locale).maximize().script;
401
- return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(script);
402
- }
403
- // If not, just guess by the language (first part of the locale)
404
- let lang = locale.split("-")[0];
405
- return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);
406
- }
407
-
408
-
409
- /*
410
- * Copyright 2020 Adobe. All rights reserved.
411
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
412
- * you may not use this file except in compliance with the License. You may obtain a copy
413
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
414
- *
415
- * Unless required by applicable law or agreed to in writing, software distributed under
416
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
417
- * OF ANY KIND, either express or implied. See the License for the specific language
418
- * governing permissions and limitations under the License.
419
- */
420
-
421
-
422
- function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
423
- // @ts-ignore
424
- let locale = typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
425
- try {
426
- // @ts-ignore
427
- Intl.DateTimeFormat.supportedLocalesOf([
428
- locale
429
- ]);
430
- } catch (_err) {
431
- locale = "en-US";
432
- }
433
- return {
434
- locale: locale,
435
- direction: ($148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? "rtl" : "ltr"
436
- };
437
- }
438
- let $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
439
- let $1e5a04cdaf7d1af8$var$listeners = new Set();
440
- function $1e5a04cdaf7d1af8$var$updateLocale() {
441
- $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
442
- for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);
443
- }
444
- function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
445
- let isSSR = ($704cf1d3b684cc5c$export$535bd6ca7f90a273)();
446
- let [defaultLocale, setDefaultLocale] = (useState)($1e5a04cdaf7d1af8$var$currentLocale);
447
- (useEffect)(()=>{
448
- if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
449
- $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);
450
- return ()=>{
451
- $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);
452
- if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
453
- };
454
- }, []);
455
- // We cannot determine the browser's language on the server, so default to
456
- // en-US. This will be updated after hydration on the client to the correct value.
457
- if (isSSR) return {
458
- locale: "en-US",
459
- direction: "ltr"
460
- };
461
- return defaultLocale;
462
- }
463
-
464
-
465
-
466
- const $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (React).createContext(null);
467
- function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {
468
- let defaultLocale = ($1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();
469
- let context = (useContext)($18f2051aff69b9bf$var$I18nContext);
470
- return context || defaultLocale;
471
- }
472
-
473
-
474
- /*
475
- * Copyright 2022 Adobe. All rights reserved.
476
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
477
- * you may not use this file except in compliance with the License. You may obtain a copy
478
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
479
- *
480
- * Unless required by applicable law or agreed to in writing, software distributed under
481
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
482
- * OF ANY KIND, either express or implied. See the License for the specific language
483
- * governing permissions and limitations under the License.
484
- */
485
-
486
-
487
- const $fca6afa0e843324b$var$cache = new WeakMap();
488
- function $fca6afa0e843324b$var$getCachedDictionary(strings) {
489
- let dictionary = $fca6afa0e843324b$var$cache.get(strings);
490
- if (!dictionary) {
491
- dictionary = new ($5b160d28a433310d$export$c17fa47878dc55b6)(strings);
492
- $fca6afa0e843324b$var$cache.set(strings, dictionary);
493
- }
494
- return dictionary;
495
- }
496
- function $fca6afa0e843324b$export$f12b703ca79dfbb1(strings) {
497
- let { locale: locale } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
498
- let dictionary = (useMemo)(()=>$fca6afa0e843324b$var$getCachedDictionary(strings), [
499
- strings
500
- ]);
501
- return (useMemo)(()=>new ($6db58dc88e78b024$export$2f817fcdc4b89ae0)(locale, dictionary), [
502
- locale,
503
- dictionary
504
- ]);
505
- }
506
-
507
- var close$3 = "Close";
508
- var enUS$2 = {
509
- close: close$3
510
- };
511
-
512
- var close$2 = "Fermer";
513
- var frFR$2 = {
514
- close: close$2
515
- };
516
-
517
- var intlMessages$2 = {
518
- 'en-US': enUS$2,
519
- 'fr-FR': frFR$2
520
- };
521
-
522
202
  /**
523
203
  * Component variant.
524
204
  */
@@ -528,27 +208,6 @@ const IconButtonVariant = {
528
208
  unstyled: 'unstyled'
529
209
  };
530
210
 
531
- /**
532
- * Color palette.
533
- */
534
- const ColorPalette = {
535
- default: 'default',
536
- success: 'success',
537
- error: 'error',
538
- warning: 'warning',
539
- info: 'info',
540
- question: 'question',
541
- 'no-data': 'no-data'
542
- };
543
- const ProductColorPalette = {
544
- website: 'website',
545
- ondmarc: 'ondmarc',
546
- oninbox: 'oninbox',
547
- ondomain: 'ondomain',
548
- hardenize: 'hardenize',
549
- tools: 'tools'
550
- };
551
-
552
211
  /**
553
212
  * Component size.
554
213
  */
@@ -1055,18 +714,18 @@ const StyledButton = styled.button`
1055
714
  `;
1056
715
 
1057
716
  var loading$1 = "Loading...";
1058
- var enUS$1 = {
717
+ var enUS$2 = {
1059
718
  loading: loading$1
1060
719
  };
1061
720
 
1062
721
  var loading = "Chargement...";
1063
- var frFR$1 = {
722
+ var frFR$2 = {
1064
723
  loading: loading
1065
724
  };
1066
725
 
1067
- var intlMessages$1 = {
1068
- 'en-US': enUS$1,
1069
- 'fr-FR': frFR$1
726
+ var intlMessages$2 = {
727
+ 'en-US': enUS$2,
728
+ 'fr-FR': frFR$2
1070
729
  };
1071
730
 
1072
731
  /**
@@ -1169,7 +828,7 @@ const Spinner = /*#__PURE__*/forwardRef((props, ref) => {
1169
828
  } = sizeToDimension(size);
1170
829
  const appContainerState = useContext(AppContainerContext);
1171
830
  const color = propsColor === ColorPalette.default && appContainerState && appContainerState.productTheme ? appContainerState.productTheme : propsColor;
1172
- const stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1(intlMessages$1);
831
+ const stringFormatter = useLocalizedStringFormatter(intlMessages$2);
1173
832
  return /*#__PURE__*/React.createElement(StyledSpinner, _extends({
1174
833
  alt: stringFormatter.format('loading')
1175
834
  }, forwardedProps, {
@@ -1257,6 +916,163 @@ IconButton.className = CLASSNAME$g;
1257
916
  IconButton.defaultProps = DEFAULT_PROPS$g;
1258
917
  IconButton.displayName = COMPONENT_NAME$g;
1259
918
 
919
+ /**
920
+ * Component style.
921
+ */
922
+ const StyledHeading = styled.span`
923
+ margin: 0;
924
+ padding: 0;
925
+ border: 0;
926
+ font-size: 100%;
927
+ font: inherit;
928
+ vertical-align: baseline;
929
+
930
+ ${baseStyling}
931
+
932
+ ${_ref => {
933
+ let {
934
+ $variant
935
+ } = _ref;
936
+ return $variant === 'h1' ? css`
937
+ color: var(--redsift-color-neutral-black);
938
+ font-family: var(--redsift-typography-h1-font-family);
939
+ font-size: var(--redsift-typography-h1-font-size);
940
+ font-weight: var(--redsift-typography-h1-font-weight);
941
+ line-height: var(--redsift-typography-h1-line-height);
942
+ text-transform: var(--redsift-typography-h1-text-transform);
943
+ ` : $variant === 'h2' ? css`
944
+ color: var(--redsift-color-neutral-black);
945
+ font-family: var(--redsift-typography-h2-font-family);
946
+ font-size: var(--redsift-typography-h2-font-size);
947
+ font-weight: var(--redsift-typography-h2-font-weight);
948
+ line-height: var(--redsift-typography-h2-line-height);
949
+ ` : $variant === 'h3' ? css`
950
+ color: var(--redsift-color-neutral-black);
951
+ font-family: var(--redsift-typography-h3-font-family);
952
+ font-size: var(--redsift-typography-h3-font-size);
953
+ font-weight: var(--redsift-typography-h3-font-weight);
954
+ line-height: var(--redsift-typography-h3-line-height);
955
+ ` : $variant === 'h4' ? css`
956
+ color: var(--redsift-color-neutral-black);
957
+ font-family: var(--redsift-typography-h4-font-family);
958
+ font-size: var(--redsift-typography-h4-font-size);
959
+ font-weight: var(--redsift-typography-h4-font-weight);
960
+ line-height: var(--redsift-typography-h4-line-height);
961
+ ` : $variant === 'h5' ? css`
962
+ color: var(--redsift-color-neutral-black);
963
+ font-family: var(--redsift-typography-h5-font-family);
964
+ font-size: var(--redsift-typography-h5-font-size);
965
+ font-weight: var(--redsift-typography-h5-font-weight);
966
+ line-height: var(--redsift-typography-h5-line-height);
967
+ ` : css`
968
+ color: var(--redsift-color-neutral-black);
969
+ font-family: var(--redsift-typography-body-font-family);
970
+ font-size: var(--redsift-typography-body-font-size);
971
+ font-weight: var(--redsift-typography-body-font-weight);
972
+ line-height: var(--redsift-typography-body-line-height);
973
+ `;
974
+ }}
975
+
976
+ ${_ref2 => {
977
+ let {
978
+ $noWrap
979
+ } = _ref2;
980
+ return $noWrap ? css`
981
+ overflow: hidden;
982
+ text-overflow: ellipsis;
983
+ white-space: nowrap;
984
+ ` : css`
985
+ word-break: break-word;
986
+ `;
987
+ }}
988
+ `;
989
+
990
+ const _excluded$8 = ["as", "children", "className", "noWrap", "variant"];
991
+ const COMPONENT_NAME$f = 'Heading';
992
+ const CLASSNAME$f = 'redsift-heading';
993
+ const DEFAULT_PROPS$f = {};
994
+
995
+ /**
996
+ * The Heading component.
997
+ */
998
+ const Heading = /*#__PURE__*/forwardRef((props, ref) => {
999
+ const {
1000
+ as,
1001
+ children,
1002
+ className,
1003
+ noWrap,
1004
+ variant
1005
+ } = props,
1006
+ forwardedProps = _objectWithoutProperties(props, _excluded$8);
1007
+ return /*#__PURE__*/React.createElement(StyledHeading, _extends({
1008
+ as: as
1009
+ }, forwardedProps, {
1010
+ className: classNames(Heading.className, className),
1011
+ ref: ref,
1012
+ $noWrap: noWrap,
1013
+ $variant: variant ? variant : as === 'span' ? 'body' : as
1014
+ }), children);
1015
+ });
1016
+ Heading.className = CLASSNAME$f;
1017
+ Heading.defaultProps = DEFAULT_PROPS$f;
1018
+ Heading.displayName = COMPONENT_NAME$f;
1019
+
1020
+ /**
1021
+ * Component style.
1022
+ */
1023
+ const StyledFlexbox = styled.div`
1024
+ display: ${_ref => {
1025
+ let {
1026
+ inline
1027
+ } = _ref;
1028
+ return inline ? 'inline-flex' : 'flex';
1029
+ }};
1030
+
1031
+ ${baseStyling}
1032
+ ${baseInternalSpacing}
1033
+ ${baseFlexbox}
1034
+ `;
1035
+
1036
+ const _excluded$7 = ["children", "className"];
1037
+ const COMPONENT_NAME$e = 'Flexbox';
1038
+ const CLASSNAME$e = 'redsift-flex-box';
1039
+ const DEFAULT_PROPS$e = {
1040
+ gap: '16px'
1041
+ };
1042
+
1043
+ /**
1044
+ * The Flexbox component.
1045
+ */
1046
+ const Flexbox = /*#__PURE__*/forwardRef((props, ref) => {
1047
+ const {
1048
+ children,
1049
+ className
1050
+ } = props,
1051
+ forwardedProps = _objectWithoutProperties(props, _excluded$7);
1052
+ return /*#__PURE__*/React.createElement(StyledFlexbox, _extends({}, forwardedProps, {
1053
+ className: classNames(Flexbox.className, className),
1054
+ ref: ref
1055
+ }), children);
1056
+ });
1057
+ Flexbox.className = CLASSNAME$e;
1058
+ Flexbox.defaultProps = DEFAULT_PROPS$e;
1059
+ Flexbox.displayName = COMPONENT_NAME$e;
1060
+
1061
+ var close$3 = "Close";
1062
+ var enUS$1 = {
1063
+ close: close$3
1064
+ };
1065
+
1066
+ var close$2 = "Fermer";
1067
+ var frFR$1 = {
1068
+ close: close$2
1069
+ };
1070
+
1071
+ var intlMessages$1 = {
1072
+ 'en-US': enUS$1,
1073
+ 'fr-FR': frFR$1
1074
+ };
1075
+
1260
1076
  /**
1261
1077
  * Component style.
1262
1078
  */
@@ -1342,10 +1158,10 @@ const StyledDialogContentActions = styled.div`
1342
1158
  }
1343
1159
  `;
1344
1160
 
1345
- const _excluded$8 = ["children", "className"];
1346
- const COMPONENT_NAME$f = 'DialogContentActions';
1347
- const CLASSNAME$f = 'redsift-dialog-content-actions';
1348
- const DEFAULT_PROPS$f = {
1161
+ const _excluded$6 = ["children", "className"];
1162
+ const COMPONENT_NAME$d = 'DialogContentActions';
1163
+ const CLASSNAME$d = 'redsift-dialog-content-actions';
1164
+ const DEFAULT_PROPS$d = {
1349
1165
  flexDirection: 'row'
1350
1166
  };
1351
1167
 
@@ -1357,7 +1173,7 @@ const DialogContentActions = /*#__PURE__*/forwardRef((props, ref) => {
1357
1173
  children,
1358
1174
  className
1359
1175
  } = props,
1360
- forwardedProps = _objectWithoutProperties(props, _excluded$8);
1176
+ forwardedProps = _objectWithoutProperties(props, _excluded$6);
1361
1177
  const {
1362
1178
  actionsRef,
1363
1179
  initialFocus
@@ -1368,9 +1184,9 @@ const DialogContentActions = /*#__PURE__*/forwardRef((props, ref) => {
1368
1184
  tabIndex: initialFocus === 'actions' ? -1 : undefined
1369
1185
  }), children);
1370
1186
  });
1371
- DialogContentActions.className = CLASSNAME$f;
1372
- DialogContentActions.defaultProps = DEFAULT_PROPS$f;
1373
- DialogContentActions.displayName = COMPONENT_NAME$f;
1187
+ DialogContentActions.className = CLASSNAME$d;
1188
+ DialogContentActions.defaultProps = DEFAULT_PROPS$d;
1189
+ DialogContentActions.displayName = COMPONENT_NAME$d;
1374
1190
 
1375
1191
  /**
1376
1192
  * Component style.
@@ -1433,23 +1249,10 @@ const StyledDialogContentBody = styled.div`
1433
1249
  }
1434
1250
  `;
1435
1251
 
1436
- /**
1437
- * Get the bounding rect of a component.
1438
- */
1439
- const useBoundingClientRect = (ref, deps) => {
1440
- const [boundingRect, setBoundingRect] = useState({});
1441
- useEffect(() => {
1442
- if (ref.current) {
1443
- setBoundingRect(ref.current.getBoundingClientRect());
1444
- }
1445
- }, deps);
1446
- return boundingRect;
1447
- };
1448
-
1449
- const _excluded$7 = ["children", "className"];
1450
- const COMPONENT_NAME$e = 'DialogContentBody';
1451
- const CLASSNAME$e = 'redsift-dialog-content-body';
1452
- const DEFAULT_PROPS$e = {};
1252
+ const _excluded$5 = ["children", "className"];
1253
+ const COMPONENT_NAME$c = 'DialogContentBody';
1254
+ const CLASSNAME$c = 'redsift-dialog-content-body';
1255
+ const DEFAULT_PROPS$c = {};
1453
1256
 
1454
1257
  /**
1455
1258
  * The DialogContentBody component.
@@ -1459,7 +1262,7 @@ const DialogContentBody = /*#__PURE__*/forwardRef((props, ref) => {
1459
1262
  children,
1460
1263
  className
1461
1264
  } = props,
1462
- forwardedProps = _objectWithoutProperties(props, _excluded$7);
1265
+ forwardedProps = _objectWithoutProperties(props, _excluded$5);
1463
1266
  const {
1464
1267
  actionsRef,
1465
1268
  bodyRef,
@@ -1483,110 +1286,9 @@ const DialogContentBody = /*#__PURE__*/forwardRef((props, ref) => {
1483
1286
  $marginBottom: (actionsHeight === 0 ? 0 : actionsHeight + 16) + 80
1484
1287
  }), children);
1485
1288
  });
1486
- DialogContentBody.className = CLASSNAME$e;
1487
- DialogContentBody.defaultProps = DEFAULT_PROPS$e;
1488
- DialogContentBody.displayName = COMPONENT_NAME$e;
1489
-
1490
- /**
1491
- * Component style.
1492
- */
1493
- const StyledHeading = styled.span`
1494
- margin: 0;
1495
- padding: 0;
1496
- border: 0;
1497
- font-size: 100%;
1498
- font: inherit;
1499
- vertical-align: baseline;
1500
-
1501
- ${baseStyling}
1502
-
1503
- ${_ref => {
1504
- let {
1505
- $variant
1506
- } = _ref;
1507
- return $variant === 'h1' ? css`
1508
- color: var(--redsift-color-neutral-black);
1509
- font-family: var(--redsift-typography-h1-font-family);
1510
- font-size: var(--redsift-typography-h1-font-size);
1511
- font-weight: var(--redsift-typography-h1-font-weight);
1512
- line-height: var(--redsift-typography-h1-line-height);
1513
- text-transform: var(--redsift-typography-h1-text-transform);
1514
- ` : $variant === 'h2' ? css`
1515
- color: var(--redsift-color-neutral-black);
1516
- font-family: var(--redsift-typography-h2-font-family);
1517
- font-size: var(--redsift-typography-h2-font-size);
1518
- font-weight: var(--redsift-typography-h2-font-weight);
1519
- line-height: var(--redsift-typography-h2-line-height);
1520
- ` : $variant === 'h3' ? css`
1521
- color: var(--redsift-color-neutral-black);
1522
- font-family: var(--redsift-typography-h3-font-family);
1523
- font-size: var(--redsift-typography-h3-font-size);
1524
- font-weight: var(--redsift-typography-h3-font-weight);
1525
- line-height: var(--redsift-typography-h3-line-height);
1526
- ` : $variant === 'h4' ? css`
1527
- color: var(--redsift-color-neutral-black);
1528
- font-family: var(--redsift-typography-h4-font-family);
1529
- font-size: var(--redsift-typography-h4-font-size);
1530
- font-weight: var(--redsift-typography-h4-font-weight);
1531
- line-height: var(--redsift-typography-h4-line-height);
1532
- ` : $variant === 'h5' ? css`
1533
- color: var(--redsift-color-neutral-black);
1534
- font-family: var(--redsift-typography-h5-font-family);
1535
- font-size: var(--redsift-typography-h5-font-size);
1536
- font-weight: var(--redsift-typography-h5-font-weight);
1537
- line-height: var(--redsift-typography-h5-line-height);
1538
- ` : css`
1539
- color: var(--redsift-color-neutral-black);
1540
- font-family: var(--redsift-typography-body-font-family);
1541
- font-size: var(--redsift-typography-body-font-size);
1542
- font-weight: var(--redsift-typography-body-font-weight);
1543
- line-height: var(--redsift-typography-body-line-height);
1544
- `;
1545
- }}
1546
-
1547
- ${_ref2 => {
1548
- let {
1549
- $noWrap
1550
- } = _ref2;
1551
- return $noWrap ? css`
1552
- overflow: hidden;
1553
- text-overflow: ellipsis;
1554
- white-space: nowrap;
1555
- ` : css`
1556
- word-break: break-word;
1557
- `;
1558
- }}
1559
- `;
1560
-
1561
- const _excluded$6 = ["as", "children", "className", "noWrap", "variant"];
1562
- const COMPONENT_NAME$d = 'Heading';
1563
- const CLASSNAME$d = 'redsift-heading';
1564
- const DEFAULT_PROPS$d = {};
1565
-
1566
- /**
1567
- * The Heading component.
1568
- */
1569
- const Heading = /*#__PURE__*/forwardRef((props, ref) => {
1570
- const {
1571
- as,
1572
- children,
1573
- className,
1574
- noWrap,
1575
- variant
1576
- } = props,
1577
- forwardedProps = _objectWithoutProperties(props, _excluded$6);
1578
- return /*#__PURE__*/React.createElement(StyledHeading, _extends({
1579
- as: as
1580
- }, forwardedProps, {
1581
- className: classNames(Heading.className, className),
1582
- ref: ref,
1583
- $noWrap: noWrap,
1584
- $variant: variant ? variant : as === 'span' ? 'body' : as
1585
- }), children);
1586
- });
1587
- Heading.className = CLASSNAME$d;
1588
- Heading.defaultProps = DEFAULT_PROPS$d;
1589
- Heading.displayName = COMPONENT_NAME$d;
1289
+ DialogContentBody.className = CLASSNAME$c;
1290
+ DialogContentBody.defaultProps = DEFAULT_PROPS$c;
1291
+ DialogContentBody.displayName = COMPONENT_NAME$c;
1590
1292
 
1591
1293
  /**
1592
1294
  * Component style.
@@ -1622,10 +1324,10 @@ const StyledDialogContentHeader = styled.div`
1622
1324
  }
1623
1325
  `;
1624
1326
 
1625
- const _excluded$5 = ["children", "className", "header", "headingProps", "icon", "subheader"];
1626
- const COMPONENT_NAME$c = 'DialogContentHeader';
1627
- const CLASSNAME$c = 'redsift-dialog-content-header';
1628
- const DEFAULT_PROPS$c = {};
1327
+ const _excluded$4 = ["children", "className", "header", "headingProps", "icon", "subheader"];
1328
+ const COMPONENT_NAME$b = 'DialogContentHeader';
1329
+ const CLASSNAME$b = 'redsift-dialog-content-header';
1330
+ const DEFAULT_PROPS$b = {};
1629
1331
 
1630
1332
  /**
1631
1333
  * The DialogContentHeader component.
@@ -1639,7 +1341,7 @@ const DialogContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
1639
1341
  icon,
1640
1342
  subheader
1641
1343
  } = props,
1642
- forwardedProps = _objectWithoutProperties(props, _excluded$5);
1344
+ forwardedProps = _objectWithoutProperties(props, _excluded$4);
1643
1345
  const {
1644
1346
  setLabelId,
1645
1347
  setDescriptionId,
@@ -1681,14 +1383,14 @@ const DialogContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
1681
1383
  id: descriptionId
1682
1384
  }, children) : null);
1683
1385
  });
1684
- DialogContentHeader.className = CLASSNAME$c;
1685
- DialogContentHeader.defaultProps = DEFAULT_PROPS$c;
1686
- DialogContentHeader.displayName = COMPONENT_NAME$c;
1386
+ DialogContentHeader.className = CLASSNAME$b;
1387
+ DialogContentHeader.defaultProps = DEFAULT_PROPS$b;
1388
+ DialogContentHeader.displayName = COMPONENT_NAME$b;
1687
1389
 
1688
- const _excluded$4 = ["children", "className"];
1689
- const COMPONENT_NAME$b = 'DialogContent';
1690
- const CLASSNAME$b = 'redsift-dialog-content';
1691
- const DEFAULT_PROPS$b = {};
1390
+ const _excluded$3 = ["children", "className"];
1391
+ const COMPONENT_NAME$a = 'DialogContent';
1392
+ const CLASSNAME$a = 'redsift-dialog-content';
1393
+ const DEFAULT_PROPS$a = {};
1692
1394
 
1693
1395
  /**
1694
1396
  * The DialogContent component.
@@ -1698,7 +1400,7 @@ const BaseDialogContent = /*#__PURE__*/forwardRef((props, ref) => {
1698
1400
  children,
1699
1401
  className
1700
1402
  } = props,
1701
- forwardedProps = _objectWithoutProperties(props, _excluded$4);
1403
+ forwardedProps = _objectWithoutProperties(props, _excluded$3);
1702
1404
  const {
1703
1405
  context: floatingContext,
1704
1406
  getFloatingProps,
@@ -1718,7 +1420,7 @@ const BaseDialogContent = /*#__PURE__*/forwardRef((props, ref) => {
1718
1420
  styles
1719
1421
  } = useTransitionStyles(floatingContext);
1720
1422
  const dialogRef = useMergeRefs([refs.setFloating, ref]);
1721
- const stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1(intlMessages$2);
1423
+ const stringFormatter = useLocalizedStringFormatter(intlMessages$1);
1722
1424
  const [[header], [body], [actions]] = partitionComponents(React.Children.toArray(children), [isComponent('DialogContentHeader'), isComponent('DialogContentBody'), isComponent('DialogContentActions')]);
1723
1425
  const initialFocus = propsInitialFocus === 'header' ? headerRef : propsInitialFocus === 'body' ? bodyRef : propsInitialFocus === 'actions' ? actionsRef : propsInitialFocus ? propsInitialFocus : undefined;
1724
1426
  return /*#__PURE__*/React.createElement(FloatingPortal, null, isMounted && /*#__PURE__*/React.createElement(StyledFloatingOverlay, {
@@ -1748,18 +1450,18 @@ const BaseDialogContent = /*#__PURE__*/forwardRef((props, ref) => {
1748
1450
  className: `${BaseDialogContent.className}__content`
1749
1451
  }, body, actions) : null))));
1750
1452
  });
1751
- BaseDialogContent.className = CLASSNAME$b;
1752
- BaseDialogContent.defaultProps = DEFAULT_PROPS$b;
1753
- BaseDialogContent.displayName = COMPONENT_NAME$b;
1453
+ BaseDialogContent.className = CLASSNAME$a;
1454
+ BaseDialogContent.defaultProps = DEFAULT_PROPS$a;
1455
+ BaseDialogContent.displayName = COMPONENT_NAME$a;
1754
1456
  const DialogContent = Object.assign(BaseDialogContent, {
1755
1457
  Header: DialogContentHeader,
1756
1458
  Body: DialogContentBody,
1757
1459
  Actions: DialogContentActions
1758
1460
  });
1759
1461
 
1760
- const COMPONENT_NAME$a = 'DialogTrigger';
1761
- const CLASSNAME$a = 'redsift-dialog-trigger';
1762
- const DEFAULT_PROPS$a = {};
1462
+ const COMPONENT_NAME$9 = 'DialogTrigger';
1463
+ const CLASSNAME$9 = 'redsift-dialog-trigger';
1464
+ const DEFAULT_PROPS$9 = {};
1763
1465
 
1764
1466
  /**
1765
1467
  * The DialogTrigger component.
@@ -1786,9 +1488,9 @@ const DialogTrigger = /*#__PURE__*/forwardRef((props, ref) => {
1786
1488
  }
1787
1489
  return /*#__PURE__*/React.createElement(React.Fragment, null, children);
1788
1490
  });
1789
- DialogTrigger.className = CLASSNAME$a;
1790
- DialogTrigger.defaultProps = DEFAULT_PROPS$a;
1791
- DialogTrigger.displayName = COMPONENT_NAME$a;
1491
+ DialogTrigger.className = CLASSNAME$9;
1492
+ DialogTrigger.defaultProps = DEFAULT_PROPS$9;
1493
+ DialogTrigger.displayName = COMPONENT_NAME$9;
1792
1494
 
1793
1495
  function useDialog(_ref) {
1794
1496
  let {
@@ -1843,9 +1545,9 @@ function useDialog(_ref) {
1843
1545
  }), [isOpen, handleOpen, interactions, data, labelId, descriptionId, hasCloseButton, initialFocus, size, headerRef, bodyRef, actionsRef]);
1844
1546
  }
1845
1547
 
1846
- const COMPONENT_NAME$9 = 'Dialog';
1847
- const CLASSNAME$9 = 'redsift-dialog';
1848
- const DEFAULT_PROPS$9 = {
1548
+ const COMPONENT_NAME$8 = 'Dialog';
1549
+ const CLASSNAME$8 = 'redsift-dialog';
1550
+ const DEFAULT_PROPS$8 = {
1849
1551
  hasCloseButton: true,
1850
1552
  size: DialogSize.medium
1851
1553
  };
@@ -1857,7 +1559,7 @@ const BaseDialog = props => {
1857
1559
  const {
1858
1560
  children,
1859
1561
  defaultOpen,
1860
- hasCloseButton,
1562
+ hasCloseButton = DEFAULT_PROPS$8.hasCloseButton,
1861
1563
  initialFocus,
1862
1564
  isOpen,
1863
1565
  onOpen,
@@ -1876,9 +1578,9 @@ const BaseDialog = props => {
1876
1578
  value: dialog
1877
1579
  }, trigger, content);
1878
1580
  };
1879
- BaseDialog.className = CLASSNAME$9;
1880
- BaseDialog.defaultProps = DEFAULT_PROPS$9;
1881
- BaseDialog.displayName = COMPONENT_NAME$9;
1581
+ BaseDialog.className = CLASSNAME$8;
1582
+ BaseDialog.defaultProps = DEFAULT_PROPS$8;
1583
+ BaseDialog.displayName = COMPONENT_NAME$8;
1882
1584
  const Dialog = Object.assign(BaseDialog, {
1883
1585
  Trigger: DialogTrigger,
1884
1586
  Content: DialogContent
@@ -1940,9 +1642,9 @@ const StyledPopoverContent = styled.div`
1940
1642
  }
1941
1643
  `;
1942
1644
 
1943
- const COMPONENT_NAME$8 = 'PopoverContent';
1944
- const CLASSNAME$8 = 'redsift-popover-content';
1945
- const DEFAULT_PROPS$8 = {};
1645
+ const COMPONENT_NAME$7 = 'PopoverContent';
1646
+ const CLASSNAME$7 = 'redsift-popover-content';
1647
+ const DEFAULT_PROPS$7 = {};
1946
1648
 
1947
1649
  /**
1948
1650
  * The PopoverContent component.
@@ -1978,13 +1680,13 @@ const PopoverContent = /*#__PURE__*/forwardRef((props, ref) => {
1978
1680
  }, style)
1979
1681
  }, getFloatingProps(props)), children)));
1980
1682
  });
1981
- PopoverContent.className = CLASSNAME$8;
1982
- PopoverContent.defaultProps = DEFAULT_PROPS$8;
1983
- PopoverContent.displayName = COMPONENT_NAME$8;
1683
+ PopoverContent.className = CLASSNAME$7;
1684
+ PopoverContent.defaultProps = DEFAULT_PROPS$7;
1685
+ PopoverContent.displayName = COMPONENT_NAME$7;
1984
1686
 
1985
- const COMPONENT_NAME$7 = 'PopoverTrigger';
1986
- const CLASSNAME$7 = 'redsift-popover-trigger';
1987
- const DEFAULT_PROPS$7 = {};
1687
+ const COMPONENT_NAME$6 = 'PopoverTrigger';
1688
+ const CLASSNAME$6 = 'redsift-popover-trigger';
1689
+ const DEFAULT_PROPS$6 = {};
1988
1690
 
1989
1691
  /**
1990
1692
  * The PopoverTrigger component.
@@ -2011,9 +1713,9 @@ const PopoverTrigger = /*#__PURE__*/forwardRef((props, ref) => {
2011
1713
  }
2012
1714
  return /*#__PURE__*/React.createElement(React.Fragment, null, children);
2013
1715
  });
2014
- PopoverTrigger.className = CLASSNAME$7;
2015
- PopoverTrigger.defaultProps = DEFAULT_PROPS$7;
2016
- PopoverTrigger.displayName = COMPONENT_NAME$7;
1716
+ PopoverTrigger.className = CLASSNAME$6;
1717
+ PopoverTrigger.defaultProps = DEFAULT_PROPS$6;
1718
+ PopoverTrigger.displayName = COMPONENT_NAME$6;
2017
1719
 
2018
1720
  function usePopover(_ref) {
2019
1721
  let {
@@ -2058,9 +1760,9 @@ function usePopover(_ref) {
2058
1760
  }), [isOpen, handleOpen, interactions, data, isModal]);
2059
1761
  }
2060
1762
 
2061
- const COMPONENT_NAME$6 = 'Popover';
2062
- const CLASSNAME$6 = 'redsift-popover';
2063
- const DEFAULT_PROPS$6 = {
1763
+ const COMPONENT_NAME$5 = 'Popover';
1764
+ const CLASSNAME$5 = 'redsift-popover';
1765
+ const DEFAULT_PROPS$5 = {
2064
1766
  isModal: false,
2065
1767
  placement: PopoverPlacement.bottom
2066
1768
  };
@@ -2089,9 +1791,9 @@ const BasePopover = props => {
2089
1791
  value: popover
2090
1792
  }, trigger, content);
2091
1793
  };
2092
- BasePopover.className = CLASSNAME$6;
2093
- BasePopover.defaultProps = DEFAULT_PROPS$6;
2094
- BasePopover.displayName = COMPONENT_NAME$6;
1794
+ BasePopover.className = CLASSNAME$5;
1795
+ BasePopover.defaultProps = DEFAULT_PROPS$5;
1796
+ BasePopover.displayName = COMPONENT_NAME$5;
2095
1797
  const Popover = Object.assign(BasePopover, {
2096
1798
  Trigger: PopoverTrigger,
2097
1799
  Content: PopoverContent
@@ -2183,47 +1885,6 @@ const StyledToast = styled.div`
2183
1885
  }}
2184
1886
  `;
2185
1887
 
2186
- /**
2187
- * Component style.
2188
- */
2189
- const StyledFlexbox = styled.div`
2190
- display: ${_ref => {
2191
- let {
2192
- inline
2193
- } = _ref;
2194
- return inline ? 'inline-flex' : 'flex';
2195
- }};
2196
-
2197
- ${baseStyling}
2198
- ${baseInternalSpacing}
2199
- ${baseFlexbox}
2200
- `;
2201
-
2202
- const _excluded$3 = ["children", "className"];
2203
- const COMPONENT_NAME$5 = 'Flexbox';
2204
- const CLASSNAME$5 = 'redsift-flex-box';
2205
- const DEFAULT_PROPS$5 = {
2206
- gap: '16px'
2207
- };
2208
-
2209
- /**
2210
- * The Flexbox component.
2211
- */
2212
- const Flexbox = /*#__PURE__*/forwardRef((props, ref) => {
2213
- const {
2214
- children,
2215
- className
2216
- } = props,
2217
- forwardedProps = _objectWithoutProperties(props, _excluded$3);
2218
- return /*#__PURE__*/React.createElement(StyledFlexbox, _extends({}, forwardedProps, {
2219
- className: classNames(Flexbox.className, className),
2220
- ref: ref
2221
- }), children);
2222
- });
2223
- Flexbox.className = CLASSNAME$5;
2224
- Flexbox.defaultProps = DEFAULT_PROPS$5;
2225
- Flexbox.displayName = COMPONENT_NAME$5;
2226
-
2227
1888
  const _excluded$2 = ["children", "className", "closeToast", "closeButton", "title", "variant"];
2228
1889
  const COMPONENT_NAME$4 = 'Toast';
2229
1890
  const CLASSNAME$4 = 'redsift-toast';
@@ -2274,7 +1935,7 @@ const Toast = /*#__PURE__*/forwardRef((props, ref) => {
2274
1935
  variant
2275
1936
  } = props,
2276
1937
  forwardedProps = _objectWithoutProperties(props, _excluded$2);
2277
- const stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1(intlMessages);
1938
+ const stringFormatter = useLocalizedStringFormatter(intlMessages);
2278
1939
  const icon = getVariant(variant);
2279
1940
  return /*#__PURE__*/React.createElement(StyledToast, _extends({}, forwardedProps, {
2280
1941
  className: classNames(Toast.className, className),