@ostack.tech/ui 0.5.0 → 0.6.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/dist/ostack-ui.js CHANGED
@@ -1,21 +1,21 @@
1
- import { forwardRef, createContext, useContext, useCallback, useRef, useEffect, useId, useMemo, useState, memo, isValidElement, cloneElement, Fragment, Children, useImperativeHandle, startTransition, useLayoutEffect as useLayoutEffect$1, createElement, useDeferredValue, useSyncExternalStore } from "react";
1
+ import { forwardRef, createContext, useContext, useCallback, useRef, useEffect, useId, useMemo, useState, memo, isValidElement, cloneElement, Fragment as Fragment$1, Children, useImperativeHandle, startTransition, useLayoutEffect as useLayoutEffect$1, createElement, useDeferredValue, useSyncExternalStore } from "react";
2
2
  import { tinykeys } from "tinykeys";
3
3
  import fromExponential from "from-exponential";
4
4
  import { isValid, isDate, addMonths, isAfter, isBefore, startOfMonth, setMonth, getYear, setYear, startOfYear, format, isSameYear, getMonth, max, min, lastDayOfMonth, parseISO, parse, isWithinInterval, isEqual } from "date-fns";
5
5
  import { createStore, useStore, create } from "zustand";
6
6
  import { shallow } from "zustand/shallow";
7
7
  import { removeNumericFormat, numericFormatter, NumericFormat } from "react-number-format";
8
- import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
8
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
9
9
  import { faClose, faTriangleExclamation, faCircleExclamation, faCircleCheck, faCircleInfo, faChevronUp, faChevronDown, faRedo, faCircleQuestion, faSortDown, faSortUp, faAsterisk, faMinus, faCheck, faFilter, faArrowLeft, faArrowRight, faSearch, faChevronLeft, faChevronRight, faArrowUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
10
10
  import { ErrorBoundary as ErrorBoundary$1 } from "react-error-boundary";
11
11
  import { useErrorBoundary } from "react-error-boundary";
12
- import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Slot as Slot$1, Portal as Portal$1, AccessibleIcon, Tooltip as Tooltip$1, Toast as Toast$1, Collapsible as Collapsible$1, VisuallyHidden as VisuallyHidden$1, Popover as Popover$1, Label as Label$1, Checkbox as Checkbox$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, Separator as Separator$1, Tabs as Tabs$1 } from "radix-ui";
12
+ import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Slot as Slot$1, Portal as Portal$1, AccessibleIcon, Tooltip as Tooltip$1, VisuallyHidden as VisuallyHidden$1, Toast as Toast$1, Collapsible as Collapsible$1, Popover as Popover$1, Label as Label$1, Checkbox as Checkbox$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, Separator as Separator$1, Tabs as Tabs$1 } from "radix-ui";
13
13
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
14
14
  import { subscribeWithSelector } from "zustand/middleware";
15
- import { enGB } from "./locales/en-GB.js";
16
- import { enUS } from "./locales/en-US.js";
17
- import { fr } from "./locales/fr.js";
18
- import { pt } from "./locales/pt.js";
15
+ import { locale } from "./locales/en-GB.js";
16
+ import { locale as locale2 } from "./locales/en-US.js";
17
+ import { locale as locale3, locale as locale4 } from "./locales/fr-FR.js";
18
+ import { locale as locale5, locale as locale6 } from "./locales/pt-PT.js";
19
19
  import { useDayPicker, DayPicker } from "react-day-picker";
20
20
  import { Command } from "cmdk";
21
21
  import { useShallow } from "zustand/react/shallow";
@@ -282,12 +282,12 @@ function spliceWindow(totalCount, offset, limit, window2, startIndex, deleted =
282
282
  }
283
283
  return { totalCount: newTotalCount, window: newWindow };
284
284
  }
285
- function matchAgainstFilter(value, filter, locale) {
285
+ function matchAgainstFilter(value, filter, locale7) {
286
286
  if (value === "" || filter === "") {
287
287
  return null;
288
288
  }
289
- const normalizedField = value.toLocaleLowerCase(locale);
290
- const normalizedFilter = filter.toLocaleLowerCase(locale);
289
+ const normalizedField = value.toLocaleLowerCase(locale7);
290
+ const normalizedFilter = filter.toLocaleLowerCase(locale7);
291
291
  const index = normalizedField.indexOf(normalizedFilter);
292
292
  return index === -1 ? null : {
293
293
  before: value.slice(0, index),
@@ -1249,15 +1249,15 @@ function LocalizationProvider({
1249
1249
  onLocaleChange,
1250
1250
  children
1251
1251
  }) {
1252
- const [locale, setLocale] = useControllableState(
1252
+ const [locale7, setLocale] = useControllableState(
1253
1253
  defaultLocale,
1254
1254
  controlledLocale
1255
1255
  );
1256
- return locale === void 0 ? children : /* @__PURE__ */ jsx(
1256
+ return locale7 === void 0 ? children : /* @__PURE__ */ jsx(
1257
1257
  LocalizationContext.Provider,
1258
1258
  {
1259
1259
  value: {
1260
- locale,
1260
+ locale: locale7,
1261
1261
  setLocale: combineEventHandlers(setLocale, onLocaleChange)
1262
1262
  },
1263
1263
  children
@@ -1397,6 +1397,7 @@ const Tooltip = forwardRef(function Tooltip2({
1397
1397
  );
1398
1398
  });
1399
1399
  const TooltipProvider = Tooltip$1.Provider;
1400
+ const VisuallyHidden = VisuallyHidden$1.Root;
1400
1401
  const IconButton = forwardRef(
1401
1402
  function IconButton2({
1402
1403
  asChild,
@@ -1410,6 +1411,8 @@ const IconButton = forwardRef(
1410
1411
  disabled,
1411
1412
  loading,
1412
1413
  enabledWhenLoading,
1414
+ loadingLabel,
1415
+ disableTooltip,
1413
1416
  iconProps,
1414
1417
  spinnerProps,
1415
1418
  tooltipProps,
@@ -1420,43 +1423,35 @@ const IconButton = forwardRef(
1420
1423
  ...otherProps
1421
1424
  }, forwardedRef) {
1422
1425
  const prefix = usePrefix();
1423
- const iconEl = useMemo(
1424
- () => icon && /* @__PURE__ */ jsx(
1425
- Slot,
1426
- {
1427
- className: cx(prefix("icon-button__icon"), iconProps?.className),
1428
- children: isValidElement(icon) ? icon : /* @__PURE__ */ jsx(Icon, { icon, fixedWidth: true, ...iconProps })
1429
- }
1430
- ),
1431
- [icon, iconProps, prefix]
1432
- );
1433
- const spinnerEl = useMemo(
1434
- () => /* @__PURE__ */ jsx(
1435
- Spinner,
1436
- {
1437
- ...spinnerProps,
1438
- className: cx(
1439
- prefix("icon-button__spinner"),
1440
- spinnerProps?.className
1441
- )
1442
- }
1443
- ),
1444
- [prefix, spinnerProps]
1426
+ const relevantLabel = loading ? loadingLabel ?? label : label;
1427
+ const labelEl = relevantLabel && /* @__PURE__ */ jsx(VisuallyHidden, { children: relevantLabel });
1428
+ const iconEl = icon && !loading && /* @__PURE__ */ jsx(Slot, { className: cx(prefix("icon-button__icon"), iconProps?.className), children: isValidElement(icon) ? icon : /* @__PURE__ */ jsx(Icon, { icon, fixedWidth: true, ...iconProps }) });
1429
+ const spinnerEl = loading && /* @__PURE__ */ jsx(
1430
+ Spinner,
1431
+ {
1432
+ ...spinnerProps,
1433
+ className: cx(prefix("icon-button__spinner"), spinnerProps?.className)
1434
+ }
1445
1435
  );
1446
- let content = loading ? spinnerEl : iconEl;
1447
- if (asChild && children) {
1436
+ let content = /* @__PURE__ */ jsxs(Fragment, { children: [
1437
+ spinnerEl,
1438
+ iconEl,
1439
+ labelEl
1440
+ ] });
1441
+ if (asChild) {
1448
1442
  content = cloneElement(children, void 0, content);
1449
1443
  }
1444
+ const loadingDisabled = loading && !enabledWhenLoading;
1445
+ const visiblyDisabled = disabled || loadingDisabled;
1450
1446
  const handleClick = useCallback(
1451
1447
  (evt) => {
1452
- if (disabled) {
1448
+ if (visiblyDisabled) {
1453
1449
  return evt.preventDefault();
1454
1450
  }
1455
1451
  return onClick?.(evt);
1456
1452
  },
1457
- [disabled, onClick]
1453
+ [onClick, visiblyDisabled]
1458
1454
  );
1459
- const shouldDisable = disabled || loading && !enabledWhenLoading;
1460
1455
  const As = asChild ? Slot : "button";
1461
1456
  const button = /* @__PURE__ */ jsx(
1462
1457
  As,
@@ -1471,23 +1466,23 @@ const IconButton = forwardRef(
1471
1466
  ),
1472
1467
  onClick: handleClick,
1473
1468
  "data-accent": color,
1474
- disabled: shouldDisable,
1475
- "data-disabled": boolDataAttr(asChild && shouldDisable),
1476
- "aria-disabled": asChild && shouldDisable ? "true" : void 0,
1469
+ disabled,
1470
+ "data-disabled": boolDataAttr(loadingDisabled || asChild && disabled),
1471
+ "aria-disabled": loadingDisabled || asChild && disabled ? "true" : void 0,
1477
1472
  "data-active": boolDataAttr(active),
1478
- tabIndex: asChild && shouldDisable ? -1 : void 0,
1473
+ tabIndex: asChild && disabled ? -1 : void 0,
1479
1474
  ref: forwardedRef,
1480
1475
  ...otherProps,
1481
1476
  children: content
1482
1477
  }
1483
1478
  );
1484
- return label ? /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, content: label, children: button }) : button;
1479
+ return relevantLabel && !disableTooltip ? /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, content: relevantLabel, children: button }) : button;
1485
1480
  }
1486
1481
  );
1487
1482
  const CloseButton = forwardRef(
1488
1483
  function CloseIconButton({ icon, label = null, className, ...otherProps }, forwardedRef) {
1489
1484
  const prefix = usePrefix();
1490
- const [locale] = useLocale();
1485
+ const [locale7] = useLocale();
1491
1486
  return /* @__PURE__ */ jsx(
1492
1487
  IconButton,
1493
1488
  {
@@ -1496,7 +1491,7 @@ const CloseButton = forwardRef(
1496
1491
  circle: true,
1497
1492
  icon: icon ?? faClose,
1498
1493
  label,
1499
- "aria-label": locale.CloseButton["aria-label"],
1494
+ "aria-label": locale7.CloseButton["aria-label"],
1500
1495
  ...otherProps,
1501
1496
  ref: forwardedRef
1502
1497
  }
@@ -1684,33 +1679,27 @@ const Button = forwardRef(
1684
1679
  ...otherProps
1685
1680
  }, forwardedRef) {
1686
1681
  const prefix = usePrefix();
1687
- const iconEl = useMemo(
1688
- () => icon && /* @__PURE__ */ jsx(
1689
- Slot,
1690
- {
1691
- className: cx(
1692
- prefix("button__icon"),
1693
- prefix(`button__icon--${iconPlacement}`),
1694
- iconProps?.className
1695
- ),
1696
- children: isValidElement(icon) ? icon : /* @__PURE__ */ jsx(Icon, { icon, ...iconProps })
1697
- }
1698
- ),
1699
- [icon, iconPlacement, iconProps, prefix]
1682
+ const iconEl = icon && !loading && /* @__PURE__ */ jsx(
1683
+ Slot,
1684
+ {
1685
+ className: cx(
1686
+ prefix("button__icon"),
1687
+ prefix(`button__icon--${iconPlacement}`),
1688
+ iconProps?.className
1689
+ ),
1690
+ children: isValidElement(icon) ? icon : /* @__PURE__ */ jsx(Icon, { icon, ...iconProps })
1691
+ }
1700
1692
  );
1701
- const spinnerEl = useMemo(
1702
- () => /* @__PURE__ */ jsx(
1703
- Spinner,
1704
- {
1705
- ...spinnerProps,
1706
- className: cx(
1707
- prefix("button__spinner"),
1708
- prefix(`button__spinner--${iconPlacement}`),
1709
- spinnerProps?.className
1710
- )
1711
- }
1712
- ),
1713
- [iconPlacement, prefix, spinnerProps]
1693
+ const spinnerEl = loading && /* @__PURE__ */ jsx(
1694
+ Spinner,
1695
+ {
1696
+ ...spinnerProps,
1697
+ className: cx(
1698
+ prefix("button__spinner"),
1699
+ prefix(`button__spinner--${iconPlacement}`),
1700
+ spinnerProps?.className
1701
+ )
1702
+ }
1714
1703
  );
1715
1704
  const content = loading && loadingContent ? asChild ? cloneElement(children, void 0, loadingContent) : loadingContent : children;
1716
1705
  const loadingDisabled = loading && !enabledWhenLoading;
@@ -1722,7 +1711,7 @@ const Button = forwardRef(
1722
1711
  }
1723
1712
  return onClick?.(evt);
1724
1713
  },
1725
- [visiblyDisabled, onClick]
1714
+ [onClick, visiblyDisabled]
1726
1715
  );
1727
1716
  const As = asChild ? Slot : "button";
1728
1717
  return /* @__PURE__ */ jsxs(
@@ -1746,11 +1735,11 @@ const Button = forwardRef(
1746
1735
  ref: forwardedRef,
1747
1736
  ...otherProps,
1748
1737
  children: [
1749
- loading && iconPlacement === "start" && spinnerEl,
1750
- !loading && iconPlacement === "start" && iconEl,
1738
+ iconPlacement === "start" && spinnerEl,
1739
+ iconPlacement === "start" && iconEl,
1751
1740
  /* @__PURE__ */ jsx(Slottable, { children: content }),
1752
- !loading && iconPlacement === "end" && iconEl,
1753
- loading && iconPlacement === "end" && spinnerEl
1741
+ iconPlacement === "end" && iconEl,
1742
+ iconPlacement === "end" && spinnerEl
1754
1743
  ]
1755
1744
  }
1756
1745
  );
@@ -1758,7 +1747,7 @@ const Button = forwardRef(
1758
1747
  );
1759
1748
  const AlertDialogProviderContext = createContext(void 0);
1760
1749
  function AlertDialogProvider({ children }) {
1761
- const [locale] = useLocale();
1750
+ const [locale7] = useLocale();
1762
1751
  const [open, setOpen] = useState(false);
1763
1752
  const [content, setContent] = useState(null);
1764
1753
  const resolveRef = useRef(null);
@@ -1772,7 +1761,7 @@ function AlertDialogProvider({ children }) {
1772
1761
  setContent(
1773
1762
  // XXX: This is a slight hack, but it makes sure that component
1774
1763
  // state is not kept between new dialogs
1775
- /* @__PURE__ */ jsx(Fragment, { children: renderContent(resolve) }, Math.random())
1764
+ /* @__PURE__ */ jsx(Fragment$1, { children: renderContent(resolve) }, Math.random())
1776
1765
  );
1777
1766
  setOpen(true);
1778
1767
  }),
@@ -1786,7 +1775,7 @@ function AlertDialogProvider({ children }) {
1786
1775
  size,
1787
1776
  title,
1788
1777
  extraBodyContent,
1789
- okText = locale.AlertDialog.okText,
1778
+ okText = locale7.AlertDialog.okText,
1790
1779
  triggerElement,
1791
1780
  contentProps,
1792
1781
  headerProps,
@@ -1826,7 +1815,7 @@ function AlertDialogProvider({ children }) {
1826
1815
  ]
1827
1816
  }
1828
1817
  )),
1829
- [locale.AlertDialog.okText, prompt]
1818
+ [locale7.AlertDialog.okText, prompt]
1830
1819
  );
1831
1820
  const confirm = useCallback(
1832
1821
  (description, {
@@ -1836,8 +1825,8 @@ function AlertDialogProvider({ children }) {
1836
1825
  size,
1837
1826
  title,
1838
1827
  extraBodyContent,
1839
- okText = locale.ConfirmDialog.okText ?? locale.AlertDialog.okText,
1840
- cancelText = locale.ConfirmDialog.cancelText,
1828
+ okText = locale7.ConfirmDialog.okText ?? locale7.AlertDialog.okText,
1829
+ cancelText = locale7.ConfirmDialog.cancelText,
1841
1830
  triggerElement,
1842
1831
  contentProps,
1843
1832
  headerProps,
@@ -1895,9 +1884,9 @@ function AlertDialogProvider({ children }) {
1895
1884
  }
1896
1885
  )),
1897
1886
  [
1898
- locale.AlertDialog.okText,
1899
- locale.ConfirmDialog.cancelText,
1900
- locale.ConfirmDialog.okText,
1887
+ locale7.AlertDialog.okText,
1888
+ locale7.ConfirmDialog.cancelText,
1889
+ locale7.ConfirmDialog.okText,
1901
1890
  prompt
1902
1891
  ]
1903
1892
  );
@@ -2240,8 +2229,8 @@ const Toast = forwardRef(function Toast2({
2240
2229
  });
2241
2230
  const ToastDescription = Toast$1.Description;
2242
2231
  function ToastProvider({ label, ...otherProps }) {
2243
- const [locale] = useLocale();
2244
- label ??= locale.ToastProvider.label;
2232
+ const [locale7] = useLocale();
2233
+ label ??= locale7.ToastProvider.label;
2245
2234
  return /* @__PURE__ */ jsx(Toast$1.Provider, { label, ...otherProps });
2246
2235
  }
2247
2236
  const ToastTitle = forwardRef(function ToastTitle2({ className, ...otherProps }, forwardedRef) {
@@ -2257,8 +2246,8 @@ const ToastTitle = forwardRef(function ToastTitle2({ className, ...otherProps },
2257
2246
  });
2258
2247
  const ToastViewport = forwardRef(function ToastViewport2({ label, className, ...otherProps }, forwardedRef) {
2259
2248
  const prefix = usePrefix();
2260
- const [locale] = useLocale();
2261
- label ??= locale.ToastViewport.label;
2249
+ const [locale7] = useLocale();
2250
+ label ??= locale7.ToastViewport.label;
2262
2251
  return /* @__PURE__ */ jsx(
2263
2252
  Toast$1.Viewport,
2264
2253
  {
@@ -2571,11 +2560,11 @@ const ErrorBoundary = forwardRef(function ErrorBoundary2({
2571
2560
  resetButtonProps,
2572
2561
  ...otherProps
2573
2562
  }, forwardedRef) {
2574
- const [locale] = useLocale();
2563
+ const [locale7] = useLocale();
2575
2564
  const reportError = useErrorReporter();
2576
- fallbackTitle ??= locale.ErrorBoundary.fallbackTitle;
2577
- fallbackMessage ??= locale.ErrorBoundary.fallbackMessage;
2578
- resetButtonLabel ??= locale.ErrorBoundary.resetButtonLabel;
2565
+ fallbackTitle ??= locale7.ErrorBoundary.fallbackTitle;
2566
+ fallbackMessage ??= locale7.ErrorBoundary.fallbackMessage;
2567
+ resetButtonLabel ??= locale7.ErrorBoundary.resetButtonLabel;
2579
2568
  fallback ??= ({ error, resetErrorBoundary }) => /* @__PURE__ */ jsxs(
2580
2569
  Alert,
2581
2570
  {
@@ -2597,11 +2586,11 @@ const ErrorBoundary = forwardRef(function ErrorBoundary2({
2597
2586
  }
2598
2587
  ),
2599
2588
  children: [
2600
- (!showError || !(error instanceof Error)) && /* @__PURE__ */ jsxs(Fragment$1, { children: [
2589
+ (!showError || !(error instanceof Error)) && /* @__PURE__ */ jsxs(Fragment, { children: [
2601
2590
  fallbackTitle && /* @__PURE__ */ jsx(AlertTitle, { children: typeof fallbackTitle === "function" ? fallbackTitle(error) : fallbackTitle }),
2602
2591
  typeof fallbackMessage === "function" ? fallbackMessage(error) : fallbackMessage
2603
2592
  ] }),
2604
- showError && error instanceof Error && /* @__PURE__ */ jsxs(Fragment$1, { children: [
2593
+ showError && error instanceof Error && /* @__PURE__ */ jsxs(Fragment, { children: [
2605
2594
  /* @__PURE__ */ jsx(AlertTitle, { children: error.name }),
2606
2595
  error.message,
2607
2596
  /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx(Code, { color: "danger", children: error.stack }) })
@@ -2630,13 +2619,13 @@ const RootElement = forwardRef(
2630
2619
  ...otherProps
2631
2620
  }, forwardedRef) {
2632
2621
  const prefix = usePrefix();
2633
- const [locale] = useLocale();
2622
+ const [locale7] = useLocale();
2634
2623
  const errorBoundChildren = (children2) => /* @__PURE__ */ jsx(ErrorBoundary, { ...errorBoundaryProps, children: children2 });
2635
2624
  const As = asChild ? Slot : "div";
2636
2625
  return /* @__PURE__ */ jsx(
2637
2626
  As,
2638
2627
  {
2639
- lang: locale.languageTag,
2628
+ lang: locale7.languageTag,
2640
2629
  className: cx(prefix("root"), className),
2641
2630
  ...otherProps,
2642
2631
  ref: forwardedRef,
@@ -2982,7 +2971,6 @@ function useResponsiveValues(options) {
2982
2971
  ]
2983
2972
  );
2984
2973
  }
2985
- const VisuallyHidden = VisuallyHidden$1.Root;
2986
2974
  const ControlCode = forwardRef(
2987
2975
  function ControlCode2({
2988
2976
  asChild,
@@ -2994,8 +2982,8 @@ const ControlCode = forwardRef(
2994
2982
  ...otherProps
2995
2983
  }, forwardedRef) {
2996
2984
  const prefix = usePrefix();
2997
- const [locale] = useLocale();
2998
- visuallyHiddenPrefix ??= locale.ControlCode.visuallyHiddenPrefix;
2985
+ const [locale7] = useLocale();
2986
+ visuallyHiddenPrefix ??= locale7.ControlCode.visuallyHiddenPrefix;
2999
2987
  const controlContext = useControlContext();
3000
2988
  const As = asChild ? Slot : "div";
3001
2989
  return /* @__PURE__ */ jsx(ControlContext.Provider, { value: null, children: /* @__PURE__ */ jsxs(
@@ -3025,6 +3013,9 @@ function usePrinterContext() {
3025
3013
  }
3026
3014
  return printerContext;
3027
3015
  }
3016
+ function usePrinterDocumentTitle() {
3017
+ return usePrinterContext().documentTitle;
3018
+ }
3028
3019
  function usePrintInProgress() {
3029
3020
  return useContext(PrinterContext)?.printInProgress ?? false;
3030
3021
  }
@@ -3051,9 +3042,7 @@ function Printer({
3051
3042
  const triggerRef = useRef(null);
3052
3043
  const contentRef = useRef(null);
3053
3044
  const [printInProgress, setPrintInProgress] = useState(false);
3054
- const [printOptions, setPrintOptions] = useState(
3055
- void 0
3056
- );
3045
+ const [printOptions, setPrintOptions] = useState(void 0);
3057
3046
  const resolvePrintRef = useRef(null);
3058
3047
  const rejectPrintRef = useRef(null);
3059
3048
  const pendingPromiseRef = useRef(null);
@@ -3075,7 +3064,7 @@ function Printer({
3075
3064
  };
3076
3065
  const reactToPrintFn = useReactToPrint({
3077
3066
  bodyClass: preview || printInForeground ? prefix("root") : void 0,
3078
- documentTitle: printOptions?.documentTitle ?? documentTitle ?? document.title,
3067
+ documentTitle: printOptions?.documentTitle ?? document.title,
3079
3068
  pageStyle: printPageStyle({
3080
3069
  pageSize: printOptions?.pageSize ?? pageSize,
3081
3070
  pageMargin: printOptions?.pageMargin ?? pageMargin,
@@ -3104,28 +3093,33 @@ function Printer({
3104
3093
  const latest = useLatestValues({
3105
3094
  printInProgress,
3106
3095
  reactToPrintFn,
3096
+ documentTitle,
3107
3097
  onBeforePrint
3108
3098
  });
3109
3099
  const handlePrint = useCallback(
3110
3100
  async (options) => {
3111
- if (latest.printInProgress) {
3101
+ const { printInProgress: printInProgress2, reactToPrintFn: reactToPrintFn2, documentTitle: documentTitle2, onBeforePrint: onBeforePrint2 } = latest;
3102
+ if (printInProgress2) {
3112
3103
  throw new Error("Printing is already in progress.");
3113
3104
  }
3114
- const onBeforePrint2 = latest.onBeforePrint;
3115
3105
  flushSync(() => {
3116
3106
  setPrintInProgress(true);
3117
- setPrintOptions(options);
3107
+ const documentTitleToUse = options?.documentTitle ?? documentTitle2;
3108
+ setPrintOptions({
3109
+ ...options,
3110
+ documentTitle: typeof documentTitleToUse === "function" ? documentTitleToUse() : documentTitleToUse
3111
+ });
3118
3112
  });
3119
3113
  await pendingPromiseRef.current;
3120
3114
  if (onBeforePrint2) {
3121
3115
  const event = new Event("ostack-ui.print");
3122
- await latest.onBeforePrint?.(event);
3116
+ await onBeforePrint2?.(event);
3123
3117
  if (event.defaultPrevented) {
3124
3118
  return finishPrint();
3125
3119
  }
3126
3120
  }
3127
3121
  return new Promise((res, rej) => {
3128
- latest.reactToPrintFn(() => contentRef.current);
3122
+ reactToPrintFn2(() => contentRef.current);
3129
3123
  resolvePrintRef.current = res;
3130
3124
  rejectPrintRef.current = rej;
3131
3125
  });
@@ -3154,6 +3148,7 @@ function Printer({
3154
3148
  value: {
3155
3149
  preview,
3156
3150
  printInForeground,
3151
+ documentTitle,
3157
3152
  printInProgress,
3158
3153
  triggerRef,
3159
3154
  contentRef,
@@ -3223,7 +3218,7 @@ const PrinterContent = forwardRef(function PrinterContent2({ asChild, printOnly,
3223
3218
  children
3224
3219
  }
3225
3220
  );
3226
- return preview || printInForeground ? /* @__PURE__ */ jsx(PrinterContentContext.Provider, { value: contentContext, children: content }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
3221
+ return preview || printInForeground ? /* @__PURE__ */ jsx(PrinterContentContext.Provider, { value: contentContext, children: content }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3227
3222
  !printOnly && /* @__PURE__ */ jsx(PrinterContentContext.Provider, { value: { printing: false }, children }),
3228
3223
  printInProgress && /* @__PURE__ */ jsx(PrinterContentContext.Provider, { value: contentContext, children: /* @__PURE__ */ jsx(Portal, { container: portalContainer, asChild: true, children: content }) })
3229
3224
  ] });
@@ -3669,8 +3664,8 @@ const TableHead = forwardRef(
3669
3664
  ...otherProps
3670
3665
  }, forwardedRef) {
3671
3666
  const prefix = usePrefix();
3672
- const [locale] = useLocale();
3673
- sortByColumnDescription ??= locale.TableHead.sortByColumnDescription;
3667
+ const [locale7] = useLocale();
3668
+ sortByColumnDescription ??= locale7.TableHead.sortByColumnDescription;
3674
3669
  const {
3675
3670
  status: tableStatus,
3676
3671
  layout,
@@ -3727,7 +3722,7 @@ const TableHead = forwardRef(
3727
3722
  label,
3728
3723
  labelText = typeof label === "string" ? label : "",
3729
3724
  helperText,
3730
- helperButtonLabel = locale.TableColumn.helperButtonLabel,
3725
+ helperButtonLabel = locale7.TableColumn.helperButtonLabel,
3731
3726
  width,
3732
3727
  fixed: _fixed,
3733
3728
  header = true,
@@ -4219,9 +4214,9 @@ const Label = forwardRef(function Label2({
4219
4214
  ...otherProps
4220
4215
  }, forwardedRef) {
4221
4216
  const prefix = usePrefix();
4222
- const [locale] = useLocale();
4223
- requiredIconLabel ??= locale.Label.requiredIconLabel;
4224
- helperButtonLabel ??= locale.Label.helperButtonLabel;
4217
+ const [locale7] = useLocale();
4218
+ requiredIconLabel ??= locale7.Label.requiredIconLabel;
4219
+ helperButtonLabel ??= locale7.Label.helperButtonLabel;
4225
4220
  const { printHidden } = usePrintClassNames();
4226
4221
  const labelId = useSetFieldLabel(children, id);
4227
4222
  const controlId = useFieldControlId();
@@ -4693,7 +4688,7 @@ const DataTableRow = memo(
4693
4688
  columnName,
4694
4689
  {
4695
4690
  filterable,
4696
- locale,
4691
+ locale: locale7,
4697
4692
  subColumns: _subColumns,
4698
4693
  getValue,
4699
4694
  format: format2,
@@ -4725,9 +4720,9 @@ const DataTableRow = memo(
4725
4720
  const match = !loadingRow && filterable ? matchAgainstFilter(
4726
4721
  formattedValue,
4727
4722
  filter,
4728
- locale ?? "pt-PT"
4723
+ locale7 ?? "pt-PT"
4729
4724
  ) : null;
4730
- const markedValue = match == null ? formattedValue : /* @__PURE__ */ jsxs(Fragment$1, { children: [
4725
+ const markedValue = match == null ? formattedValue : /* @__PURE__ */ jsxs(Fragment, { children: [
4731
4726
  match.before,
4732
4727
  /* @__PURE__ */ jsx(Mark, { children: match.matched }),
4733
4728
  match.after
@@ -4750,7 +4745,7 @@ const DataTableRow = memo(
4750
4745
  index
4751
4746
  }) : markedValue
4752
4747
  };
4753
- return renderCell ? /* @__PURE__ */ jsx(Fragment, { children: renderCell(props) }, columnName) : /* @__PURE__ */ jsx(DataTableCell, { ...props }, columnName);
4748
+ return renderCell ? /* @__PURE__ */ jsx(Fragment$1, { children: renderCell(props) }, columnName) : /* @__PURE__ */ jsx(DataTableCell, { ...props }, columnName);
4754
4749
  }
4755
4750
  )
4756
4751
  }
@@ -4782,7 +4777,7 @@ function DataTableEmptyOrLoadingRows({
4782
4777
  return loading ? Array.from({ length: loadingCount }, (_, i) => {
4783
4778
  const props = { row: void 0, index: i };
4784
4779
  const key = `loading-${i}`;
4785
- return renderRow ? /* @__PURE__ */ jsx(Fragment, { children: renderRow(props) }, key) : /* @__PURE__ */ jsx(DataTableRow, { ...props }, key);
4780
+ return renderRow ? /* @__PURE__ */ jsx(Fragment$1, { children: renderRow(props) }, key) : /* @__PURE__ */ jsx(DataTableRow, { ...props }, key);
4786
4781
  }) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { paddingless: false, colSpan: numberOfColumns2, children: !loading && /* @__PURE__ */ jsx(
4787
4782
  "div",
4788
4783
  {
@@ -4845,7 +4840,7 @@ function PagedDataTableRows() {
4845
4840
  return rowsWindow.map((row, i) => {
4846
4841
  const props = { row, index: pageOffset + i };
4847
4842
  const key = row ? `row-${getRowKey(row, rowKey)}` : `loading-${i}`;
4848
- return renderRow ? /* @__PURE__ */ jsx(Fragment, { children: renderRow(props) }, key) : /* @__PURE__ */ jsx(DataTableRow, { ...props }, key);
4843
+ return renderRow ? /* @__PURE__ */ jsx(Fragment$1, { children: renderRow(props) }, key) : /* @__PURE__ */ jsx(DataTableRow, { ...props }, key);
4849
4844
  });
4850
4845
  }
4851
4846
  function ScrolledDataTableRows({
@@ -4975,7 +4970,7 @@ function ScrolledDataTableRows({
4975
4970
  });
4976
4971
  });
4977
4972
  }, [endIndex, startIndex, store]);
4978
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
4973
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
4979
4974
  /* @__PURE__ */ jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx(
4980
4975
  "td",
4981
4976
  {
@@ -4998,7 +4993,7 @@ function ScrolledDataTableRows({
4998
4993
  ref: dynamicRowHeight ? virtualizer.measureElement : void 0
4999
4994
  };
5000
4995
  const key = rowsWindow[i] ? `row-${getRowKey(rowsWindow[i], rowKey)}` : `loading-${i}`;
5001
- return renderRow ? /* @__PURE__ */ jsx(Fragment, { children: renderRow(props) }, key) : /* @__PURE__ */ jsx(DataTableRow, { ...props }, key);
4996
+ return renderRow ? /* @__PURE__ */ jsx(Fragment$1, { children: renderRow(props) }, key) : /* @__PURE__ */ jsx(DataTableRow, { ...props }, key);
5002
4997
  }),
5003
4998
  /* @__PURE__ */ jsx("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx(
5004
4999
  "td",
@@ -5160,8 +5155,8 @@ const DataTableContent = forwardRef(function DataTable2({
5160
5155
  ...otherProps
5161
5156
  }, forwardedRef) {
5162
5157
  const prefix = usePrefix();
5163
- const [locale] = useLocale();
5164
- emptyMessage ??= locale.DataTable.emptyMessage;
5158
+ const [locale7] = useLocale();
5159
+ emptyMessage ??= locale7.DataTable.emptyMessage;
5165
5160
  const { displayMode, required, estimatedRowHeight, store } = useDataTableContext();
5166
5161
  const tableRef = useRef(null);
5167
5162
  const containerRef = useRef(null);
@@ -5239,9 +5234,9 @@ const DataTableFilter = forwardRef(function DataTableFilter2({
5239
5234
  ...otherProps
5240
5235
  }, forwardedRef) {
5241
5236
  const prefix = usePrefix();
5242
- const [locale] = useLocale();
5243
- ariaLabel ??= locale.DataTableFilter["aria-label"];
5244
- placeholder ??= locale.DataTableFilter.placeholder;
5237
+ const [locale7] = useLocale();
5238
+ ariaLabel ??= locale7.DataTableFilter["aria-label"];
5239
+ placeholder ??= locale7.DataTableFilter.placeholder;
5245
5240
  const { store } = useDataTableContext();
5246
5241
  const filter = useStore(store, (state) => state.filter);
5247
5242
  const handleFilterChange = (value) => {
@@ -5390,10 +5385,10 @@ const DataTablePagination = forwardRef(function DataTablePagination2({
5390
5385
  nextPageButtonProps,
5391
5386
  ...otherProps
5392
5387
  }, forwardedRef) {
5393
- const [locale] = useLocale();
5394
- rowsRange ??= locale.DataTablePagination.rowsRange;
5395
- previousPageButtonLabel ??= locale.DataTablePagination.previousPageButtonLabel;
5396
- nextPageButtonLabel ??= locale.DataTablePagination.nextPageButtonLabel;
5388
+ const [locale7] = useLocale();
5389
+ rowsRange ??= locale7.DataTablePagination.rowsRange;
5390
+ previousPageButtonLabel ??= locale7.DataTablePagination.previousPageButtonLabel;
5391
+ nextPageButtonLabel ??= locale7.DataTablePagination.nextPageButtonLabel;
5397
5392
  const { displayMode, showAllRowsWhilePrinting } = useDataTableContext();
5398
5393
  const printing = usePrinting();
5399
5394
  return printing && showAllRowsWhilePrinting ? null : displayMode === "paged" ? /* @__PURE__ */ jsx(
@@ -5424,8 +5419,8 @@ const DataTableRowsPerPage = forwardRef(function DataTableRowsPerPage2({
5424
5419
  ...otherProps
5425
5420
  }, forwardedRef) {
5426
5421
  const prefix = usePrefix();
5427
- const [locale] = useLocale();
5428
- label ??= locale.DataTableRowsPerPage.label;
5422
+ const [locale7] = useLocale();
5423
+ label ??= locale7.DataTableRowsPerPage.label;
5429
5424
  const { store } = useDataTableContext();
5430
5425
  const limit = useStore(store, (state) => state.limit);
5431
5426
  const { setLimit } = useStore(store, (state) => state.actions);
@@ -5529,8 +5524,8 @@ const Input = forwardRef(
5529
5524
  ...otherProps
5530
5525
  }, forwardedRef) {
5531
5526
  const prefix = usePrefix();
5532
- const [locale] = useLocale();
5533
- clearButtonLabel ??= locale.Input.clearButtonLabel;
5527
+ const [locale7] = useLocale();
5528
+ clearButtonLabel ??= locale7.Input.clearButtonLabel;
5534
5529
  const { responsiveValuesToCssVarsAndDataAttrs } = useResponsiveValues();
5535
5530
  const dataTableColumnLabelId = useDataTableColumnLabelId();
5536
5531
  const descriptionIds = useFieldDescriptionIds();
@@ -6017,12 +6012,12 @@ const CommandMenu = forwardRef(
6017
6012
  ...otherProps
6018
6013
  }, forwardedRef) {
6019
6014
  const prefix = usePrefix();
6020
- const [locale] = useLocale();
6021
- label ??= locale.CommandMenu.label;
6022
- searchPlaceholder ??= locale.CommandMenu.searchPlaceholder;
6023
- emptyMessage ??= locale.CommandMenu.emptyMessage;
6024
- listLabel ??= locale.CommandMenu.listLabel;
6025
- loadingLabel ??= locale.CommandMenu.loadingLabel;
6015
+ const [locale7] = useLocale();
6016
+ label ??= locale7.CommandMenu.label;
6017
+ searchPlaceholder ??= locale7.CommandMenu.searchPlaceholder;
6018
+ emptyMessage ??= locale7.CommandMenu.emptyMessage;
6019
+ listLabel ??= locale7.CommandMenu.listLabel;
6020
+ loadingLabel ??= locale7.CommandMenu.loadingLabel;
6026
6021
  const searchAdornmentEl = /* @__PURE__ */ jsx(
6027
6022
  ControlAddon,
6028
6023
  {
@@ -6152,9 +6147,9 @@ const CommandMenuDialog = forwardRef(function CommandMenuDialog2({
6152
6147
  ...otherProps
6153
6148
  }, forwardedRef) {
6154
6149
  const prefix = usePrefix();
6155
- const [locale] = useLocale();
6156
- title ??= locale.CommandMenuDialog.title;
6157
- description ??= locale.CommandMenuDialog.description;
6150
+ const [locale7] = useLocale();
6151
+ title ??= locale7.CommandMenuDialog.title;
6152
+ description ??= locale7.CommandMenuDialog.description;
6158
6153
  const portalContext = usePortalContext();
6159
6154
  return /* @__PURE__ */ jsx(
6160
6155
  Dialog$1.Root,
@@ -6549,7 +6544,7 @@ function SelectMultipleValue() {
6549
6544
  )
6550
6545
  );
6551
6546
  const valuesList = useMemo(
6552
- () => valuesOptionStates.map((optionState, i) => /* @__PURE__ */ jsxs(Fragment, { children: [
6547
+ () => valuesOptionStates.map((optionState, i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
6553
6548
  i === 0 ? "" : ", ",
6554
6549
  optionState?.content
6555
6550
  ] }, i)),
@@ -6612,9 +6607,9 @@ function SelectMultipleValue() {
6612
6607
  valuesToRender
6613
6608
  ]
6614
6609
  );
6615
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
6610
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
6616
6611
  valuesToRender.length > 0 && readOnly && valuesList,
6617
- valuesToRender.length > 0 && !readOnly && /* @__PURE__ */ jsxs(Fragment$1, { children: [
6612
+ valuesToRender.length > 0 && !readOnly && /* @__PURE__ */ jsxs(Fragment, { children: [
6618
6613
  /* @__PURE__ */ jsx(VisuallyHidden, { children: valuesList }),
6619
6614
  valuesTags
6620
6615
  ] })
@@ -6674,11 +6669,11 @@ const Select = forwardRef(function Select2({
6674
6669
  ...otherProps
6675
6670
  }, forwardedRef) {
6676
6671
  const prefix = usePrefix();
6677
- const [locale] = useLocale();
6678
- searchPlaceholder ??= locale.Select.searchPlaceholder;
6679
- emptyMessage ??= locale.Select.emptyMessage;
6680
- optionsLabel ??= locale.Select.optionsLabel;
6681
- loadingOptionsLabel ??= locale.Select.loadingOptionsLabel;
6672
+ const [locale7] = useLocale();
6673
+ searchPlaceholder ??= locale7.Select.searchPlaceholder;
6674
+ emptyMessage ??= locale7.Select.emptyMessage;
6675
+ optionsLabel ??= locale7.Select.optionsLabel;
6676
+ loadingOptionsLabel ??= locale7.Select.loadingOptionsLabel;
6682
6677
  const { cssVarStyle } = useCssVars();
6683
6678
  const labelId = useFieldLabelId();
6684
6679
  const { printHidden } = usePrintClassNames();
@@ -6828,7 +6823,7 @@ const Select = forwardRef(function Select2({
6828
6823
  required,
6829
6824
  loading: loading || loadingOptions,
6830
6825
  startAdornment,
6831
- endAdornment: /* @__PURE__ */ jsxs(Fragment$1, { children: [
6826
+ endAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
6832
6827
  !readOnly && /* @__PURE__ */ jsx(
6833
6828
  Icon,
6834
6829
  {
@@ -6971,7 +6966,7 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
6971
6966
  onNextClick,
6972
6967
  disableNavigation,
6973
6968
  pagedNavigation,
6974
- locale
6969
+ locale: locale7
6975
6970
  }
6976
6971
  } = useDayPicker();
6977
6972
  const displayDate = calendarMonth.date;
@@ -7043,7 +7038,7 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7043
7038
  className: prefix("calendar__caption-label"),
7044
7039
  role: "status",
7045
7040
  "aria-live": "polite",
7046
- children: format(displayDate, CAPTION_FORMAT, { locale })
7041
+ children: format(displayDate, CAPTION_FORMAT, { locale: locale7 })
7047
7042
  }
7048
7043
  );
7049
7044
  const prevButton = /* @__PURE__ */ jsx(
@@ -7090,15 +7085,15 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7090
7085
  {
7091
7086
  value: getMonth(monthDate),
7092
7087
  disabled: minAllowedDate && maxAllowedDate && isSameYear(minAllowedDate, maxAllowedDate) && (getMonth(monthDate) < getMonth(minAllowedDate) || getMonth(monthDate) > getMonth(maxAllowedDate)),
7093
- children: format(monthDate, MONTH_FORMAT, { locale })
7088
+ children: format(monthDate, MONTH_FORMAT, { locale: locale7 })
7094
7089
  },
7095
7090
  getMonth(monthDate)
7096
7091
  )),
7097
- [locale, maxAllowedDate, minAllowedDate, monthDates]
7092
+ [locale7, maxAllowedDate, minAllowedDate, monthDates]
7098
7093
  );
7099
7094
  const yearOptions = useMemo(
7100
- () => yearDates.map((yearDate) => /* @__PURE__ */ jsx(Option, { value: getYear(yearDate), children: format(yearDate, YEAR_FORMAT, { locale }) }, getYear(yearDate))),
7101
- [locale, yearDates]
7095
+ () => yearDates.map((yearDate) => /* @__PURE__ */ jsx(Option, { value: getYear(yearDate), children: format(yearDate, YEAR_FORMAT, { locale: locale7 }) }, getYear(yearDate))),
7096
+ [locale7, yearDates]
7102
7097
  );
7103
7098
  return /* @__PURE__ */ jsxs(
7104
7099
  "div",
@@ -7108,7 +7103,7 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7108
7103
  className: cx(prefix("calendar__caption"), captionProps?.className),
7109
7104
  children: [
7110
7105
  disableNavigation ? captionLabel : /* @__PURE__ */ jsx(VisuallyHidden, { children: captionLabel }),
7111
- !disableNavigation && /* @__PURE__ */ jsxs(Fragment$1, { children: [
7106
+ !disableNavigation && /* @__PURE__ */ jsxs(Fragment, { children: [
7112
7107
  months.length > 1 && /* @__PURE__ */ jsx("div", { className: cx(prefix("calendar__navigation")), children: isFirst && prevButton }),
7113
7108
  /* @__PURE__ */ jsx("div", { className: prefix("calendar__selects"), children: /* @__PURE__ */ jsxs(ClearContexts, { children: [
7114
7109
  /* @__PURE__ */ jsx(
@@ -7188,10 +7183,10 @@ function Calendar({
7188
7183
  ...otherProps
7189
7184
  }) {
7190
7185
  const prefix = usePrefix();
7191
- const [locale] = useLocale();
7192
- dateFnsLocale ??= locale.dateFnsLocale;
7193
- previousMonthLabel ??= locale.Calendar.previousMonthLabel;
7194
- nextMonthLabel ??= locale.Calendar.nextMonthLabel;
7186
+ const [locale7] = useLocale();
7187
+ dateFnsLocale ??= locale7.dateFnsLocale;
7188
+ previousMonthLabel ??= locale7.Calendar.previousMonthLabel;
7189
+ nextMonthLabel ??= locale7.Calendar.nextMonthLabel;
7195
7190
  const minAllowedDate = useMemo(() => {
7196
7191
  const minDates = [
7197
7192
  toValidDate(minDate),
@@ -7593,10 +7588,10 @@ function useDateTransformer({
7593
7588
  shortFormat,
7594
7589
  fullFormat
7595
7590
  } = {}) {
7596
- const [locale] = useLocale();
7597
- dateFnsLocale ??= locale.dateFnsLocale;
7598
- shortFormat ??= locale.DateInput.shortFormat ?? dateFnsLocale.formatLong?.date({ width: "short" }) ?? DEFAULT_SHORT_DATE_FORMAT;
7599
- fullFormat ??= locale.DateInput.fullFormat ?? dateFnsLocale.formatLong?.date({ width: "full" }) ?? DEFAULT_FULL_DATE_FORMAT;
7591
+ const [locale7] = useLocale();
7592
+ dateFnsLocale ??= locale7.dateFnsLocale;
7593
+ shortFormat ??= locale7.DateInput.shortFormat ?? dateFnsLocale.formatLong?.date({ width: "short" }) ?? DEFAULT_SHORT_DATE_FORMAT;
7594
+ fullFormat ??= locale7.DateInput.fullFormat ?? dateFnsLocale.formatLong?.date({ width: "full" }) ?? DEFAULT_FULL_DATE_FORMAT;
7600
7595
  return useMemo(
7601
7596
  () => ({
7602
7597
  parse: (formattedDate, { width = "short" } = {}) => parseDateStrict(
@@ -7675,11 +7670,11 @@ const DateInput = forwardRef(
7675
7670
  ...otherProps
7676
7671
  }, forwardedRef) {
7677
7672
  const prefix = usePrefix();
7678
- const [locale] = useLocale();
7679
- dateFnsLocale ??= locale.dateFnsLocale;
7680
- placeholder ??= locale.DateInput.placeholder;
7681
- formatDescription ??= locale.DateInput.formatDescription;
7682
- calendarButtonLabel ??= locale.DateInput.calendarButtonLabel;
7673
+ const [locale7] = useLocale();
7674
+ dateFnsLocale ??= locale7.dateFnsLocale;
7675
+ placeholder ??= locale7.DateInput.placeholder;
7676
+ formatDescription ??= locale7.DateInput.formatDescription;
7677
+ calendarButtonLabel ??= locale7.DateInput.calendarButtonLabel;
7683
7678
  const { printHidden } = usePrintClassNames();
7684
7679
  const { format: formatDate, parse: parseDate } = useDateTransformer({
7685
7680
  locale: dateFnsLocale,
@@ -7843,7 +7838,7 @@ const DateInput = forwardRef(
7843
7838
  popoverContentProps?.ref,
7844
7839
  popoverRef
7845
7840
  );
7846
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
7841
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
7847
7842
  /* @__PURE__ */ jsxs(Popover, { open: popoverState.open, modal: popoverState.modal, children: [
7848
7843
  /* @__PURE__ */ jsx(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx(
7849
7844
  InputWithContainerRef,
@@ -7857,7 +7852,7 @@ const DateInput = forwardRef(
7857
7852
  onFocus: combineEventHandlers(onFocus, handleInputFocus),
7858
7853
  onBlurToOutside: handleControlBlur,
7859
7854
  showClearButton,
7860
- endAdornment: /* @__PURE__ */ jsxs(Fragment$1, { children: [
7855
+ endAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
7861
7856
  endAdornment,
7862
7857
  /* @__PURE__ */ jsx(ControlAddon, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(
7863
7858
  "button",
@@ -8109,14 +8104,14 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8109
8104
  ...otherProps
8110
8105
  }, forwardedRef) {
8111
8106
  const prefix = usePrefix();
8112
- const [locale] = useLocale();
8113
- clearButtonsLabel ??= locale.Input.clearButtonLabel;
8114
- dateFnsLocale ??= locale.dateFnsLocale;
8115
- placeholder ??= locale.DateInput.placeholder;
8116
- formatDescription ??= locale.DateInput.formatDescription;
8117
- startInputLabel ??= locale.DateRangeInput.startInputLabel;
8118
- endInputLabel ??= locale.DateRangeInput.endInputLabel;
8119
- calendarButtonLabel ??= locale.DateRangeInput.calendarButtonLabel;
8107
+ const [locale7] = useLocale();
8108
+ clearButtonsLabel ??= locale7.Input.clearButtonLabel;
8109
+ dateFnsLocale ??= locale7.dateFnsLocale;
8110
+ placeholder ??= locale7.DateInput.placeholder;
8111
+ formatDescription ??= locale7.DateInput.formatDescription;
8112
+ startInputLabel ??= locale7.DateRangeInput.startInputLabel;
8113
+ endInputLabel ??= locale7.DateRangeInput.endInputLabel;
8114
+ calendarButtonLabel ??= locale7.DateRangeInput.calendarButtonLabel;
8120
8115
  const { format: formatDate, parse: parseDate } = useDateTransformer({
8121
8116
  locale: dateFnsLocale,
8122
8117
  shortFormat,
@@ -9246,8 +9241,8 @@ const FeedbackPopover = forwardRef(function FeedbackPopover2({
9246
9241
  ...otherProps
9247
9242
  }, forwardedRef) {
9248
9243
  const prefix = usePrefix();
9249
- const [locale] = useLocale();
9250
- label ??= locale.FeedbackPopover.label;
9244
+ const [locale7] = useLocale();
9245
+ label ??= locale7.FeedbackPopover.label;
9251
9246
  const variant = useIsInTableCell() ? "cell" : "default";
9252
9247
  const [feedbacksCount, setFeedbacksCount] = useState({
9253
9248
  success: 0,
@@ -9284,7 +9279,7 @@ const FeedbackPopover = forwardRef(function FeedbackPopover2({
9284
9279
  );
9285
9280
  const inField = controlFocused !== void 0;
9286
9281
  const accent = dominantFeedbackType === "error" ? "danger" : dominantFeedbackType;
9287
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
9282
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9288
9283
  /* @__PURE__ */ jsx(
9289
9284
  FeedbackPopoverContext.Provider,
9290
9285
  {
@@ -9374,8 +9369,8 @@ const Feedback = forwardRef(
9374
9369
  return () => onRemoveFeedback?.(type);
9375
9370
  }, [onAddFeedback, onRemoveFeedback, type]);
9376
9371
  const isInFeedbackList = useIsInFeedbackList();
9377
- const [locale] = useLocale();
9378
- visuallyHiddenPrefix ??= locale.Feedback.visuallyHiddenPrefix;
9372
+ const [locale7] = useLocale();
9373
+ visuallyHiddenPrefix ??= locale7.Feedback.visuallyHiddenPrefix;
9379
9374
  const visuallyHiddenPrefixText = typeof visuallyHiddenPrefix === "function" ? visuallyHiddenPrefix(type) : visuallyHiddenPrefix;
9380
9375
  const feedbackId = useSetFieldFeedback(id, type === "error");
9381
9376
  const As = asChild ? Slot : isInFeedbackList ? "li" : "div";
@@ -9456,8 +9451,8 @@ const FieldGroupHeader = forwardRef(function FieldGroupHeader2({
9456
9451
  ...otherProps
9457
9452
  }, forwardedRef) {
9458
9453
  const prefix = usePrefix();
9459
- const [locale] = useLocale();
9460
- visuallyHiddenCodePrefix ??= locale.FieldGroupHeader.visuallyHiddenCodePrefix;
9454
+ const [locale7] = useLocale();
9455
+ visuallyHiddenCodePrefix ??= locale7.FieldGroupHeader.visuallyHiddenCodePrefix;
9461
9456
  const generatedId = useId();
9462
9457
  const codeId = code ? codeProps?.id ?? prefix(`field-group-code-${generatedId}`) : void 0;
9463
9458
  const { setCodeId } = useFieldGroupContext();
@@ -9764,10 +9759,10 @@ function useNumericTransformer({
9764
9759
  prefix,
9765
9760
  suffix
9766
9761
  } = {}) {
9767
- const [locale] = useLocale();
9768
- decimalSeparator ??= locale.NumericInput.decimalSeparator ?? ".";
9769
- groupingStyle ??= locale.NumericInput.groupingStyle ?? "thousand";
9770
- groupSeparator ??= locale.NumericInput.groupSeparator ?? ",";
9762
+ const [locale7] = useLocale();
9763
+ decimalSeparator ??= locale7.NumericInput.decimalSeparator ?? ".";
9764
+ groupingStyle ??= locale7.NumericInput.groupingStyle ?? "thousand";
9765
+ groupSeparator ??= locale7.NumericInput.groupSeparator ?? ",";
9771
9766
  const options = useMemo(
9772
9767
  () => ({
9773
9768
  valueIsInteger,
@@ -9893,10 +9888,10 @@ const NumericInput = forwardRef(function DateInput3({
9893
9888
  const maxString = numericToString(max2);
9894
9889
  const exclusiveMinString = numericToString(exclusiveMin);
9895
9890
  const exclusiveMaxString = numericToString(exclusiveMax);
9896
- const [locale] = useLocale();
9897
- decimalSeparator ??= locale.NumericInput.decimalSeparator ?? ".";
9898
- groupingStyle ??= locale.NumericInput.groupingStyle ?? "thousand";
9899
- groupSeparator ??= locale.NumericInput.groupSeparator ?? ",";
9891
+ const [locale7] = useLocale();
9892
+ decimalSeparator ??= locale7.NumericInput.decimalSeparator ?? ".";
9893
+ groupingStyle ??= locale7.NumericInput.groupingStyle ?? "thousand";
9894
+ groupSeparator ??= locale7.NumericInput.groupSeparator ?? ",";
9900
9895
  if (process.env.NODE_ENV !== "production") {
9901
9896
  validateNumericProps({
9902
9897
  valueIsInteger,
@@ -10198,8 +10193,8 @@ const RadioGroup = forwardRef(function RadioGroup2({
10198
10193
  ...otherProps
10199
10194
  }, forwardedRef) {
10200
10195
  const prefix = usePrefix();
10201
- const [locale] = useLocale();
10202
- clearButtonLabel ??= locale.Input.clearButtonLabel;
10196
+ const [locale7] = useLocale();
10197
+ clearButtonLabel ??= locale7.Input.clearButtonLabel;
10203
10198
  const labelId = useFieldLabelId();
10204
10199
  const dataTableColumnLabelId = useDataTableColumnLabelId();
10205
10200
  const descriptionIds = useFieldDescriptionIds();
@@ -10668,7 +10663,7 @@ const TabContent = forwardRef(function TabContent2({ asChild, value, className,
10668
10663
  const { showAllTabsWhilePrinting } = useTabsContext();
10669
10664
  const tabLabel = useTabLabel(stringValue);
10670
10665
  const As = printing && showAllTabsWhilePrinting ? asChild ? Slot : "div" : Tabs$1.TabsContent;
10671
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
10666
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
10672
10667
  printing && showAllTabsWhilePrinting && /* @__PURE__ */ jsx(
10673
10668
  "span",
10674
10669
  {
@@ -11312,10 +11307,11 @@ export {
11312
11307
  computed,
11313
11308
  controlStatusToAccent,
11314
11309
  cx,
11315
- enGB,
11316
- enUS,
11310
+ locale as enGB,
11311
+ locale2 as enUS,
11317
11312
  formatNumericValue,
11318
- fr,
11313
+ locale3 as fr,
11314
+ locale4 as frFR,
11319
11315
  ignoreFormControlsKeyboardShortcut,
11320
11316
  isNumericStringNegative,
11321
11317
  matchAgainstFilter,
@@ -11328,7 +11324,8 @@ export {
11328
11324
  numericToString,
11329
11325
  parseDateStrict,
11330
11326
  parseNumericValue,
11331
- pt,
11327
+ locale5 as pt,
11328
+ locale6 as ptPT,
11332
11329
  registerKeyboardShortcut,
11333
11330
  setBoolDataAttr,
11334
11331
  setDefaultPrefix,
@@ -11374,6 +11371,7 @@ export {
11374
11371
  usePrint,
11375
11372
  usePrintClassNames,
11376
11373
  usePrintInProgress,
11374
+ usePrinterDocumentTitle,
11377
11375
  usePrinting,
11378
11376
  useResponsiveValues,
11379
11377
  useScrollPosition,