@ostack.tech/ui 0.8.2 → 0.9.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.
Files changed (65) hide show
  1. package/dist/chunks/{en-BfgHKQwn.js → en-Dem8nwZz.js} +20 -6
  2. package/dist/chunks/en-Dem8nwZz.js.map +1 -0
  3. package/dist/chunks/platformUtils-C3IHCr90.js +6 -0
  4. package/dist/chunks/platformUtils-C3IHCr90.js.map +1 -0
  5. package/dist/locales/en-GB.js +4 -4
  6. package/dist/locales/en-GB.js.map +1 -1
  7. package/dist/locales/en-US.js +4 -4
  8. package/dist/locales/en-US.js.map +1 -1
  9. package/dist/locales/fr-FR.js +49 -8
  10. package/dist/locales/fr-FR.js.map +1 -1
  11. package/dist/locales/pt-PT.js +35 -8
  12. package/dist/locales/pt-PT.js.map +1 -1
  13. package/dist/ostack-ui.css +33 -10
  14. package/dist/ostack-ui.css.map +1 -1
  15. package/dist/ostack-ui.js +805 -352
  16. package/dist/ostack-ui.js.map +1 -1
  17. package/dist/types/components/Alert/Alert.d.ts +1 -1
  18. package/dist/types/components/Button/Button.d.ts +20 -0
  19. package/dist/types/components/Calendar/Calendar.d.ts +9 -6
  20. package/dist/types/components/Calendar/CalendarContext.d.ts +4 -1
  21. package/dist/types/components/Calendar/{CalendarMonthCaption.d.ts → CalendarHeader.d.ts} +1 -1
  22. package/dist/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +62 -4
  23. package/dist/types/components/CommandMenu/CommandMenuItem.d.ts +1 -1
  24. package/dist/types/components/DateInput/DateInput.d.ts +10 -17
  25. package/dist/types/components/DateRangeInput/DateRangeInput.d.ts +11 -13
  26. package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
  27. package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
  28. package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
  29. package/dist/types/components/IconButton/IconButton.d.ts +24 -7
  30. package/dist/types/components/Keybinds/Key.d.ts +9 -0
  31. package/dist/types/components/Keybinds/KeyPress.d.ts +7 -0
  32. package/dist/types/components/Keybinds/Keybind.d.ts +7 -0
  33. package/dist/types/components/Keybinds/Keybinds.d.ts +20 -0
  34. package/dist/types/components/Keybinds/index.d.ts +1 -0
  35. package/dist/types/components/Label/Label.d.ts +0 -2
  36. package/dist/types/components/MenuList/MenuListItem.d.ts +15 -0
  37. package/dist/types/components/Spinner/Spinner.d.ts +2 -8
  38. package/dist/types/components/Tabs/TabList.d.ts +10 -1
  39. package/dist/types/components/Toast/Toast.d.ts +9 -0
  40. package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +20 -2
  41. package/dist/types/index.d.ts +1 -0
  42. package/dist/types/locales/en.d.ts +1 -1
  43. package/dist/types/providers/LocalizationProvider/LocalizationObject.d.ts +10 -6
  44. package/dist/types/utils/intersperse.d.ts +8 -0
  45. package/dist/types/utils/keyboardShortcut.d.ts +21 -8
  46. package/dist/types/utils/parseDateStrict.d.ts +3 -1
  47. package/dist/types/utils/platformUtils.d.ts +2 -0
  48. package/dist/types/utils/useDateTransformer.d.ts +10 -31
  49. package/package.json +2 -2
  50. package/scss/_utils.scss +1 -0
  51. package/scss/components/Button/_Button.scss +5 -0
  52. package/scss/components/Calendar/_Calendar-variables.scss +16 -16
  53. package/scss/components/Calendar/_Calendar.scss +16 -16
  54. package/scss/components/IconButton/_IconButton.scss +5 -0
  55. package/scss/components/Keyboard/_Keyboard-variables.scss +18 -0
  56. package/scss/components/Keyboard/_Keyboard.scss +13 -10
  57. package/scss/components/MenuList/_MenuList.scss +4 -0
  58. package/scss/components/Tooltip/_Tooltip-variables.scss +4 -0
  59. package/scss/components/Tooltip/_Tooltip.scss +1 -0
  60. package/scss/scss/helpers/_visually-hidden.scss +11 -2
  61. package/scss/scss/placeholders/button/_button-variables.scss +4 -0
  62. package/scss/scss/placeholders/button/_button.scss +4 -0
  63. package/scss/scss/placeholders/menu/_menu-variables.scss +92 -1
  64. package/scss/scss/placeholders/menu/_menu.scss +61 -1
  65. package/dist/chunks/en-BfgHKQwn.js.map +0 -1
package/dist/ostack-ui.js CHANGED
@@ -1,17 +1,18 @@
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
- import { tinykeys } from "tinykeys";
1
+ import { forwardRef, createContext, useContext, useCallback, useRef, useEffect, useId, useMemo, useState, memo, Fragment as Fragment$1, isValidElement, cloneElement, Children, useImperativeHandle, startTransition, useLayoutEffect as useLayoutEffect$1, createElement, useDeferredValue, useSyncExternalStore } from "react";
2
+ import { tinykeys, parseKeybinding } 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
8
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
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";
9
+ import { faArrowRight, faArrowLeft, faArrowDown, faArrowUp, faClose, faTriangleExclamation, faCircleExclamation, faCircleCheck, faCircleInfo, faChevronUp, faChevronDown, faRedo, faCircleQuestion, faSortDown, faSortUp, faAsterisk, faMinus, faCheck, faFilter, 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, 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
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
12
+ import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Slot as Slot$1, Portal as Portal$1, Tooltip as Tooltip$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";
14
13
  import { subscribeWithSelector } from "zustand/middleware";
14
+ import { I as IS_APPLE } from "./chunks/platformUtils-C3IHCr90.js";
15
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
15
16
  import { locale } from "./locales/en-GB.js";
16
17
  import { locale as locale2 } from "./locales/en-US.js";
17
18
  import { locale as locale3, locale as locale4 } from "./locales/fr-FR.js";
@@ -50,7 +51,7 @@ function usePrefix() {
50
51
  function cx(...args) {
51
52
  const classNames = [];
52
53
  for (const arg of args) {
53
- if (!arg) {
54
+ if (!arg || typeof arg === "boolean") {
54
55
  continue;
55
56
  }
56
57
  if (Array.isArray(arg)) {
@@ -1296,6 +1297,128 @@ function setBoolDataAttr(element, attr, condition) {
1296
1297
  delete element.dataset[attr];
1297
1298
  }
1298
1299
  }
1300
+ const FORM_CONTROLS = ["INPUT", "TEXTAREA", "SELECT"];
1301
+ const KEY_CLEAN_UP = /^Key|^Digit/;
1302
+ function registerKeyboardShortcut(keybinds, action, {
1303
+ target = window,
1304
+ eventType = "keydown",
1305
+ sequenceTimeout = 1e3,
1306
+ ignore,
1307
+ capture = false,
1308
+ preventDefault
1309
+ } = {}) {
1310
+ const ignorableAction = (event) => {
1311
+ if (!ignore?.(event)) {
1312
+ if (preventDefault) {
1313
+ event.preventDefault();
1314
+ }
1315
+ action(event);
1316
+ }
1317
+ };
1318
+ const keybindsMap = typeof keybinds === "string" ? { [keybinds]: ignorableAction } : keybinds.reduce(
1319
+ (keybindsMap2, shortcut) => {
1320
+ keybindsMap2[shortcut] = ignorableAction;
1321
+ return keybindsMap2;
1322
+ },
1323
+ {}
1324
+ );
1325
+ return tinykeys(target, keybindsMap, {
1326
+ event: eventType,
1327
+ timeout: sequenceTimeout,
1328
+ capture
1329
+ });
1330
+ }
1331
+ function useKeyboardShortcut(keybinds, action, {
1332
+ disabled,
1333
+ target = window,
1334
+ eventType = "keydown",
1335
+ sequenceTimeout = 1e3,
1336
+ ignore,
1337
+ capture = false,
1338
+ preventDefault
1339
+ } = {}) {
1340
+ const keybindsString = Array.isArray(keybinds) ? keybinds.join("__") : keybinds;
1341
+ const latestCallbacks = useLatestValues({ action, ignore });
1342
+ useEffect(() => {
1343
+ if (!disabled && keybindsString && target !== null) {
1344
+ return registerKeyboardShortcut(
1345
+ keybindsString.split("__"),
1346
+ (evt) => latestCallbacks.action(evt),
1347
+ {
1348
+ target,
1349
+ eventType,
1350
+ sequenceTimeout,
1351
+ ignore: (evt) => latestCallbacks.ignore?.(evt) ?? false,
1352
+ capture,
1353
+ preventDefault
1354
+ }
1355
+ );
1356
+ }
1357
+ }, [
1358
+ capture,
1359
+ disabled,
1360
+ eventType,
1361
+ latestCallbacks,
1362
+ preventDefault,
1363
+ sequenceTimeout,
1364
+ keybindsString,
1365
+ target
1366
+ ]);
1367
+ }
1368
+ function ignoreFormControlsKeyboardShortcut(event) {
1369
+ return event.target !== null && event.target instanceof HTMLElement && FORM_CONTROLS.includes(event.target.tagName);
1370
+ }
1371
+ function normalizeKeybinds(keybinds) {
1372
+ if (keybinds == null) {
1373
+ return [];
1374
+ }
1375
+ if (!Array.isArray(keybinds)) {
1376
+ keybinds = [keybinds];
1377
+ }
1378
+ return keybinds.map(
1379
+ (keybind) => parseKeybinding(keybind).map((keyPress) => {
1380
+ const mods = keyPress[0];
1381
+ let key = keyPress[1];
1382
+ key = key.replace(KEY_CLEAN_UP, "");
1383
+ if (key.length === 1) {
1384
+ key = key.toUpperCase();
1385
+ } else if (key instanceof RegExp) {
1386
+ key = `(${key.source.slice(1, -1)})`;
1387
+ }
1388
+ return [...mods, key];
1389
+ })
1390
+ );
1391
+ }
1392
+ function keybindsToAriaKeyShortcuts(keybinds) {
1393
+ return normalizeKeybinds(keybinds).map(
1394
+ (keybind) => keybind.map(
1395
+ (keyPresses) => keyPresses.map((key) => key === "+" ? "plus" : key).join("+")
1396
+ ).join(" ")
1397
+ ).join(" ") || void 0;
1398
+ }
1399
+ const VisuallyHidden = forwardRef(function VisuallyHidden2({
1400
+ asChild,
1401
+ as = "span",
1402
+ focusable,
1403
+ className,
1404
+ ...otherProps
1405
+ }, forwardedRef) {
1406
+ const prefix = usePrefix();
1407
+ const As = asChild ? Slot : as;
1408
+ return /* @__PURE__ */ jsx(
1409
+ As,
1410
+ {
1411
+ className: cx(
1412
+ !focusable && prefix("visually-hidden"),
1413
+ focusable && prefix("visually-hidden-focusable"),
1414
+ className
1415
+ ),
1416
+ tabIndex: focusable ? 0 : void 0,
1417
+ ...otherProps,
1418
+ ref: forwardedRef
1419
+ }
1420
+ );
1421
+ });
1299
1422
  const Icon = memo(
1300
1423
  forwardRef(function Icon2({ size, color, label, flip, className, ...otherProps }, forwardedRef) {
1301
1424
  const prefix = usePrefix();
@@ -1313,15 +1436,181 @@ const Icon = memo(
1313
1436
  ...otherProps
1314
1437
  }
1315
1438
  );
1316
- return label ? /* @__PURE__ */ jsx(AccessibleIcon.Root, { label, children: icon }) : icon;
1439
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1440
+ icon,
1441
+ label && /* @__PURE__ */ jsx(VisuallyHidden, { children: label })
1442
+ ] });
1317
1443
  })
1318
1444
  );
1319
- const Spinner = forwardRef(
1320
- function Spinner2({ asChild, size, color, label, className, ...otherProps }, forwardedRef) {
1445
+ function intersperse(array, separator) {
1446
+ return array.reduce((acc, element, i, array2) => {
1447
+ acc.push(element);
1448
+ if (i < array2.length - 1) {
1449
+ acc.push(
1450
+ typeof separator === "function" ? separator(i) : separator
1451
+ );
1452
+ }
1453
+ return acc;
1454
+ }, []);
1455
+ }
1456
+ const Keyboard = forwardRef(
1457
+ function Keyboard2({ asChild, className, ...otherProps }, forwardedRef) {
1321
1458
  const prefix = usePrefix();
1322
- const As = asChild ? Slot : "span";
1323
- const spinner = /* @__PURE__ */ jsx(
1459
+ const As = asChild ? Slot : "kbd";
1460
+ return /* @__PURE__ */ jsx(
1324
1461
  As,
1462
+ {
1463
+ className: cx(prefix("keyboard"), className),
1464
+ ref: forwardedRef,
1465
+ ...otherProps
1466
+ }
1467
+ );
1468
+ }
1469
+ );
1470
+ const DEFAULT_KEY_SYMBOLS = {
1471
+ Control: IS_APPLE ? "⌃" : "Ctrl",
1472
+ Alt: IS_APPLE ? "⌥" : "Alt",
1473
+ Option: IS_APPLE ? "⌥" : "Alt",
1474
+ Shift: IS_APPLE ? "⇧" : "Shift",
1475
+ Meta: IS_APPLE ? "⌘" : "Win",
1476
+ CapsLock: IS_APPLE ? "⇪" : "Caps Lock",
1477
+ Tab: IS_APPLE ? "⇥" : "Tab",
1478
+ ArrowUp: /* @__PURE__ */ jsx(Icon, { icon: faArrowUp }),
1479
+ ArrowDown: /* @__PURE__ */ jsx(Icon, { icon: faArrowDown }),
1480
+ ArrowLeft: /* @__PURE__ */ jsx(Icon, { icon: faArrowLeft }),
1481
+ ArrowRight: /* @__PURE__ */ jsx(Icon, { icon: faArrowRight }),
1482
+ Enter: IS_APPLE ? "⏎" : "↵",
1483
+ Escape: "Esc",
1484
+ Backspace: "⌫",
1485
+ Delete: IS_APPLE ? "⌦" : "Del",
1486
+ Insert: "Ins",
1487
+ PageUp: "PgUp",
1488
+ PageDown: "PgDn"
1489
+ };
1490
+ const DEFAULT_KEY_LABELS = {
1491
+ Alt: IS_APPLE ? "Option" : "Alt",
1492
+ Option: IS_APPLE ? "Option" : "Alt",
1493
+ Meta: IS_APPLE ? "Command" : "Windows",
1494
+ Enter: IS_APPLE ? "Return" : "Enter"
1495
+ };
1496
+ function Key({ keyName, keyLabels, keySymbols }) {
1497
+ const [locale7] = useLocale();
1498
+ const localeKeySymbols = locale7.Keybinds.keySymbols;
1499
+ const localeKeyLabels = locale7.Keybinds.keyLabels;
1500
+ const symbol = keySymbols?.[keyName] ?? localeKeySymbols?.[keyName] ?? DEFAULT_KEY_SYMBOLS[keyName];
1501
+ const label = keyLabels?.[keyName] ?? localeKeyLabels?.[keyName] ?? DEFAULT_KEY_LABELS[keyName] ?? keyName;
1502
+ return !symbol || symbol === label ? /* @__PURE__ */ jsx(Keyboard, { children: label }) : /* @__PURE__ */ jsxs(Keyboard, { children: [
1503
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: symbol }),
1504
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: label })
1505
+ ] });
1506
+ }
1507
+ const KEY_SEPARATOR = IS_APPLE ? " " : " ⁠+ ";
1508
+ function KeyPress({
1509
+ keyPress,
1510
+ keySymbols,
1511
+ keyLabels
1512
+ }) {
1513
+ return intersperse(
1514
+ keyPress.map((key, i) => /* @__PURE__ */ jsx(
1515
+ Key,
1516
+ {
1517
+ keyName: key,
1518
+ keySymbols,
1519
+ keyLabels
1520
+ },
1521
+ `key-${i}`
1522
+ )),
1523
+ (i) => /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: KEY_SEPARATOR }, `key-separator-${i}`)
1524
+ );
1525
+ }
1526
+ const KEY_PRESS_SEPARATOR = " ";
1527
+ function Keybind({
1528
+ keybind,
1529
+ keyPressesSeparatorLabel,
1530
+ keySymbols,
1531
+ keyLabels
1532
+ }) {
1533
+ const [locale7] = useLocale();
1534
+ keyPressesSeparatorLabel ??= locale7.Keybinds.keyPressesSeparatorLabel;
1535
+ return intersperse(
1536
+ keybind.map((keyPress, i) => /* @__PURE__ */ jsx(
1537
+ KeyPress,
1538
+ {
1539
+ keyPress,
1540
+ keySymbols,
1541
+ keyLabels
1542
+ },
1543
+ `key-press-${i}`
1544
+ )),
1545
+ (i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
1546
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: KEY_PRESS_SEPARATOR }),
1547
+ /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
1548
+ " ",
1549
+ keyPressesSeparatorLabel,
1550
+ " "
1551
+ ] })
1552
+ ] }, `key-press-separator-${i}`)
1553
+ );
1554
+ }
1555
+ const KEYBIND_SEPARATOR = " / ";
1556
+ const Keybinds = forwardRef(
1557
+ function Keybinds2({
1558
+ keybinds,
1559
+ limit,
1560
+ keybindsSeparatorLabel,
1561
+ keyPressesSeparatorLabel,
1562
+ keySymbols,
1563
+ keyLabels,
1564
+ className,
1565
+ ...otherProps
1566
+ }, forwardedRef) {
1567
+ if (limit != null) {
1568
+ if (limit < 1) {
1569
+ throw new RangeError("Limit must be >= 1.");
1570
+ }
1571
+ if (Array.isArray(keybinds)) {
1572
+ keybinds = keybinds.slice(0, limit);
1573
+ }
1574
+ }
1575
+ const prefix = usePrefix();
1576
+ const [locale7] = useLocale();
1577
+ keybindsSeparatorLabel ??= locale7.Keybinds.keybindsSeparatorLabel;
1578
+ const normalizedKeybinds = normalizeKeybinds(keybinds);
1579
+ return normalizedKeybinds.length === 0 ? null : /* @__PURE__ */ jsx(
1580
+ "span",
1581
+ {
1582
+ className: cx(prefix("keybinds"), className),
1583
+ ...otherProps,
1584
+ ref: forwardedRef,
1585
+ children: intersperse(
1586
+ normalizedKeybinds.map((keybind, i) => /* @__PURE__ */ jsx(
1587
+ Keybind,
1588
+ {
1589
+ keybind,
1590
+ keyPressesSeparatorLabel,
1591
+ keySymbols,
1592
+ keyLabels
1593
+ },
1594
+ `keybind-${i}`
1595
+ )),
1596
+ (i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
1597
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: KEYBIND_SEPARATOR }),
1598
+ keybindsSeparatorLabel && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
1599
+ " ",
1600
+ keybindsSeparatorLabel,
1601
+ " "
1602
+ ] })
1603
+ ] }, `keybind-separator-${i}`)
1604
+ )
1605
+ }
1606
+ );
1607
+ }
1608
+ );
1609
+ const Spinner = forwardRef(
1610
+ function Spinner2({ size, color, label, className, ...otherProps }, forwardedRef) {
1611
+ const prefix = usePrefix();
1612
+ return /* @__PURE__ */ jsx(
1613
+ "span",
1325
1614
  {
1326
1615
  className: cx(
1327
1616
  prefix("spinner"),
@@ -1329,13 +1618,12 @@ const Spinner = forwardRef(
1329
1618
  className
1330
1619
  ),
1331
1620
  "data-accent": color,
1332
- role: "status",
1333
- "aria-hidden": true,
1621
+ role: label ? "status" : void 0,
1334
1622
  ref: forwardedRef,
1335
- ...otherProps
1623
+ ...otherProps,
1624
+ children: label && /* @__PURE__ */ jsx(VisuallyHidden, { children: label })
1336
1625
  }
1337
1626
  );
1338
- return label ? /* @__PURE__ */ jsx(AccessibleIcon.Root, { label, children: spinner }) : spinner;
1339
1627
  }
1340
1628
  );
1341
1629
  const Tooltip = forwardRef(function Tooltip2({
@@ -1357,7 +1645,7 @@ const Tooltip = forwardRef(function Tooltip2({
1357
1645
  }, forwardedRef) {
1358
1646
  const prefix = usePrefix();
1359
1647
  const portalContext = usePortalContext();
1360
- return /* @__PURE__ */ jsxs(
1648
+ return content == null || typeof content === "boolean" ? children : /* @__PURE__ */ jsxs(
1361
1649
  Tooltip$1.Root,
1362
1650
  {
1363
1651
  defaultOpen,
@@ -1405,7 +1693,6 @@ const Tooltip = forwardRef(function Tooltip2({
1405
1693
  );
1406
1694
  });
1407
1695
  const TooltipProvider = Tooltip$1.Provider;
1408
- const VisuallyHidden = VisuallyHidden$1.Root;
1409
1696
  const IconButton = forwardRef(function IconButton2({
1410
1697
  as = "button",
1411
1698
  asChild,
@@ -1420,10 +1707,13 @@ const IconButton = forwardRef(function IconButton2({
1420
1707
  loading,
1421
1708
  loadingLabel,
1422
1709
  showSpinner = loading,
1423
- disableTooltip,
1710
+ tooltipContent,
1711
+ keybinds,
1424
1712
  iconProps,
1713
+ labelProps,
1425
1714
  spinnerProps,
1426
1715
  tooltipProps,
1716
+ keybindsProps,
1427
1717
  type,
1428
1718
  onClick,
1429
1719
  className,
@@ -1432,7 +1722,10 @@ const IconButton = forwardRef(function IconButton2({
1432
1722
  }, forwardedRef) {
1433
1723
  const prefix = usePrefix();
1434
1724
  const relevantLabel = loading ? loadingLabel || label : label;
1435
- const labelEl = relevantLabel && /* @__PURE__ */ jsx(VisuallyHidden, { children: relevantLabel });
1725
+ if (tooltipContent === void 0) {
1726
+ tooltipContent = relevantLabel;
1727
+ }
1728
+ const labelEl = relevantLabel && /* @__PURE__ */ jsx(VisuallyHidden, { ...labelProps, children: relevantLabel });
1436
1729
  const iconEl = icon && !showSpinner && /* @__PURE__ */ jsx(Slot, { className: cx(prefix("icon-button__icon"), iconProps?.className), children: isValidElement(icon) ? icon : /* @__PURE__ */ jsx(Icon, { icon, fixedWidth: true, ...iconProps }) });
1437
1730
  const spinnerEl = showSpinner && /* @__PURE__ */ jsx(
1438
1731
  Spinner,
@@ -1478,16 +1771,38 @@ const IconButton = forwardRef(function IconButton2({
1478
1771
  "data-disabled": boolDataAttr(loading || !isButton && disabled),
1479
1772
  "aria-disabled": loading || !isButton && disabled || void 0,
1480
1773
  "data-active": boolDataAttr(active),
1774
+ "aria-keyshortcuts": keybindsToAriaKeyShortcuts(keybinds),
1481
1775
  tabIndex: !isButton && disabled ? -1 : void 0,
1482
1776
  ref: forwardedRef,
1483
1777
  ...otherProps,
1484
1778
  children: content
1485
1779
  }
1486
1780
  );
1487
- return relevantLabel && !disableTooltip ? /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, content: relevantLabel, children: button }) : button;
1781
+ return tooltipContent && typeof tooltipContent !== "boolean" || keybinds ? /* @__PURE__ */ jsx(
1782
+ Tooltip,
1783
+ {
1784
+ ...tooltipProps,
1785
+ content: /* @__PURE__ */ jsxs(Fragment, { children: [
1786
+ tooltipContent && /* @__PURE__ */ jsx("div", { "aria-hidden": true, children: tooltipContent }),
1787
+ keybinds && /* @__PURE__ */ jsx(
1788
+ Keybinds,
1789
+ {
1790
+ "aria-hidden": true,
1791
+ keybinds,
1792
+ ...keybindsProps,
1793
+ className: cx(
1794
+ prefix("icon-button__keybinds"),
1795
+ keybindsProps?.className
1796
+ )
1797
+ }
1798
+ )
1799
+ ] }),
1800
+ children: button
1801
+ }
1802
+ ) : button;
1488
1803
  });
1489
1804
  const CloseButton = forwardRef(
1490
- function CloseIconButton({ icon, label, disableTooltip = true, className, ...otherProps }, forwardedRef) {
1805
+ function CloseIconButton({ icon, label, tooltipContent = null, className, ...otherProps }, forwardedRef) {
1491
1806
  const prefix = usePrefix();
1492
1807
  const [locale7] = useLocale();
1493
1808
  label ??= locale7.CloseButton.label;
@@ -1499,7 +1814,7 @@ const CloseButton = forwardRef(
1499
1814
  circle: true,
1500
1815
  icon: icon ?? faClose,
1501
1816
  label,
1502
- disableTooltip,
1817
+ tooltipContent,
1503
1818
  ...otherProps,
1504
1819
  ref: forwardedRef
1505
1820
  }
@@ -1690,8 +2005,12 @@ const Button = forwardRef(function Button2({
1690
2005
  loading,
1691
2006
  loadingContent,
1692
2007
  showSpinner = loading,
2008
+ tooltipContent,
2009
+ keybinds,
1693
2010
  iconProps,
1694
2011
  spinnerProps,
2012
+ tooltipProps,
2013
+ keybindsProps,
1695
2014
  type,
1696
2015
  onClick,
1697
2016
  className,
@@ -1734,7 +2053,7 @@ const Button = forwardRef(function Button2({
1734
2053
  );
1735
2054
  const isButton = as === "button" && !asChild;
1736
2055
  const As = asChild ? Slot : as;
1737
- return /* @__PURE__ */ jsxs(
2056
+ const buttonEl = /* @__PURE__ */ jsxs(
1738
2057
  As,
1739
2058
  {
1740
2059
  type: type ?? (isButton ? "button" : void 0),
@@ -1751,6 +2070,7 @@ const Button = forwardRef(function Button2({
1751
2070
  "data-disabled": boolDataAttr(loading || !isButton && disabled),
1752
2071
  "aria-disabled": loading || !isButton && disabled || void 0,
1753
2072
  "data-active": boolDataAttr(active),
2073
+ "aria-keyshortcuts": keybindsToAriaKeyShortcuts(keybinds),
1754
2074
  tabIndex: !isButton && disabled ? -1 : void 0,
1755
2075
  ref: forwardedRef,
1756
2076
  ...otherProps,
@@ -1763,6 +2083,28 @@ const Button = forwardRef(function Button2({
1763
2083
  ]
1764
2084
  }
1765
2085
  );
2086
+ return tooltipContent && typeof tooltipContent !== "boolean" || keybinds ? /* @__PURE__ */ jsx(
2087
+ Tooltip,
2088
+ {
2089
+ ...tooltipProps,
2090
+ content: /* @__PURE__ */ jsxs(Fragment, { children: [
2091
+ tooltipContent && /* @__PURE__ */ jsx("div", { children: tooltipContent }),
2092
+ keybinds && /* @__PURE__ */ jsx(
2093
+ Keybinds,
2094
+ {
2095
+ keybinds,
2096
+ "aria-hidden": true,
2097
+ ...keybindsProps,
2098
+ className: cx(
2099
+ prefix("button__keybinds"),
2100
+ keybindsProps?.className
2101
+ )
2102
+ }
2103
+ )
2104
+ ] }),
2105
+ children: buttonEl
2106
+ }
2107
+ ) : buttonEl;
1766
2108
  });
1767
2109
  const AlertDialogProviderContext = createContext(void 0);
1768
2110
  function AlertDialogProvider({ children }) {
@@ -2140,6 +2482,7 @@ const Toast = forwardRef(function Toast2({
2140
2482
  action,
2141
2483
  actionAltText,
2142
2484
  showCloseButton = action === void 0,
2485
+ visuallyHidden,
2143
2486
  rootProps,
2144
2487
  containerProps,
2145
2488
  iconProps,
@@ -2155,7 +2498,7 @@ const Toast = forwardRef(function Toast2({
2155
2498
  const [collapsibleOpen, setCollapsibleOpen] = useState(open);
2156
2499
  useEffect(() => setCollapsibleOpen(open), [open]);
2157
2500
  const accent = severity === "info" ? "primary" : severity;
2158
- return /* @__PURE__ */ jsx(
2501
+ const toast = /* @__PURE__ */ jsx(
2159
2502
  Toast$1.Root,
2160
2503
  {
2161
2504
  type,
@@ -2245,6 +2588,7 @@ const Toast = forwardRef(function Toast2({
2245
2588
  ) })
2246
2589
  }
2247
2590
  );
2591
+ return visuallyHidden ? /* @__PURE__ */ jsx(VisuallyHidden, { asChild: true, children: toast }) : toast;
2248
2592
  });
2249
2593
  const ToastDescription = Toast$1.Description;
2250
2594
  function ToastProvider({ label, ...otherProps }) {
@@ -2888,7 +3232,7 @@ function combineAriaIds(...args) {
2888
3232
  if (innerIds) {
2889
3233
  args.push(innerIds);
2890
3234
  }
2891
- } else if (arg) {
3235
+ } else if (arg && typeof arg !== "boolean") {
2892
3236
  ids.push(String(arg));
2893
3237
  }
2894
3238
  }
@@ -3023,7 +3367,8 @@ const ControlCode = forwardRef(
3023
3367
  visuallyHiddenPrefix,
3024
3368
  " "
3025
3369
  ] }),
3026
- /* @__PURE__ */ jsx(Slottable, { children })
3370
+ /* @__PURE__ */ jsx(Slottable, { children }),
3371
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: ", " })
3027
3372
  ]
3028
3373
  }
3029
3374
  ) });
@@ -3683,21 +4028,13 @@ const Stack = forwardRef(function Stack2({
3683
4028
  ...dataAttrs,
3684
4029
  ref: forwardedRef,
3685
4030
  ...otherProps,
3686
- children: divider ? divideChildren(children, divider, prefix) : children
4031
+ children: divider ? intersperse(
4032
+ Children.toArray(children).filter(Boolean),
4033
+ (i) => cloneElement(divider, { key: prefix(`stack-divider-${i}`) })
4034
+ ) : children
3687
4035
  }
3688
4036
  ) });
3689
4037
  });
3690
- function divideChildren(children, divider, prefix) {
3691
- return Children.toArray(children).filter(Boolean).reduce((dividedChildren, child, i, children2) => {
3692
- dividedChildren.push(child);
3693
- if (i < children2.length - 1) {
3694
- dividedChildren.push(
3695
- cloneElement(divider, { key: prefix(`stack-divider-${i}`) })
3696
- );
3697
- }
3698
- return dividedChildren;
3699
- }, []);
3700
- }
3701
4038
  const DEFAULT_TABLE_ROW_HEIGHT = 41;
3702
4039
  const TableRow = forwardRef(
3703
4040
  function TableRow2({ className, selected, ...otherProps }, forwardedRef) {
@@ -4253,6 +4590,104 @@ function getRowKey(row, rowKey) {
4253
4590
  return typeof rowKey === "function" ? rowKey(row) : row[rowKey];
4254
4591
  }
4255
4592
  const CheckboxGroupContext = createContext(null);
4593
+ function useCreateCheckboxGroupContext({
4594
+ defaultValue,
4595
+ value,
4596
+ onValueChange,
4597
+ name,
4598
+ required,
4599
+ loadingDescriptionId,
4600
+ errorMessageIds,
4601
+ descriptionIds,
4602
+ checkboxGroupRef
4603
+ }) {
4604
+ const prefix = usePrefix();
4605
+ const latest = useLatestValues({ onValueChange });
4606
+ const store = useConstant(
4607
+ () => createStore()(
4608
+ subscribeWithSelector((set, get) => ({
4609
+ value: value ?? defaultValue ?? [],
4610
+ firstCheckboxId: void 0,
4611
+ actions: {
4612
+ handleCheckedChange: (checkboxValue, checked) => {
4613
+ const newValue = checked ? [...get().value, checkboxValue] : get().value.filter((v) => v !== checkboxValue);
4614
+ set({ value: newValue });
4615
+ latest.onValueChange?.(newValue);
4616
+ }
4617
+ }
4618
+ }))
4619
+ )
4620
+ );
4621
+ useEffect(() => {
4622
+ if (value !== void 0) {
4623
+ store.setState({ value });
4624
+ }
4625
+ }, [store, value]);
4626
+ useEffect(() => {
4627
+ const checkboxGroup = checkboxGroupRef.current;
4628
+ if (!checkboxGroup) {
4629
+ return;
4630
+ }
4631
+ const setFirstCheckboxId = () => store.setState({
4632
+ firstCheckboxId: checkboxGroup.querySelector(`.${prefix("checkbox")}`)?.id
4633
+ });
4634
+ const observer = new MutationObserver(setFirstCheckboxId);
4635
+ observer.observe(checkboxGroup, { childList: true, subtree: true });
4636
+ setFirstCheckboxId();
4637
+ return () => observer.disconnect();
4638
+ }, [checkboxGroupRef, prefix, store]);
4639
+ return useMemo(
4640
+ () => ({
4641
+ name,
4642
+ required,
4643
+ loadingDescriptionId,
4644
+ errorMessageIds,
4645
+ descriptionIds,
4646
+ store
4647
+ }),
4648
+ [
4649
+ descriptionIds,
4650
+ errorMessageIds,
4651
+ loadingDescriptionId,
4652
+ name,
4653
+ required,
4654
+ store
4655
+ ]
4656
+ );
4657
+ }
4658
+ function useCheckboxGroupContext() {
4659
+ return useContext(CheckboxGroupContext);
4660
+ }
4661
+ function useIsCheckedInGroup(checkboxValue) {
4662
+ const store = useCheckboxGroupContext()?.store ?? EMPTY_STORE;
4663
+ const handleCheckedChange = useStore(
4664
+ store,
4665
+ (state) => state.actions?.handleCheckedChange
4666
+ );
4667
+ return [
4668
+ useStore(store, (state) => state.value?.includes(checkboxValue)),
4669
+ useMemo(
4670
+ () => handleCheckedChange && ((checked) => handleCheckedChange(checkboxValue, checked)),
4671
+ [checkboxValue, handleCheckedChange]
4672
+ )
4673
+ ];
4674
+ }
4675
+ function useIsRequiredInGroup() {
4676
+ const context = useCheckboxGroupContext();
4677
+ const store = context?.store ?? EMPTY_STORE;
4678
+ const required = context?.required;
4679
+ return useStore(store, (state) => required && state.value.length === 0);
4680
+ }
4681
+ function useCheckboxGroupDescriptionIds(checkboxId) {
4682
+ const context = useCheckboxGroupContext();
4683
+ const store = context?.store ?? EMPTY_STORE;
4684
+ const descriptionIds = context?.descriptionIds;
4685
+ const isFirstCheckbox = useStore(
4686
+ store,
4687
+ (state) => state.firstCheckboxId === checkboxId
4688
+ );
4689
+ return isFirstCheckbox ? descriptionIds : void 0;
4690
+ }
4256
4691
  const NATIVE_CONTROLS = /* @__PURE__ */ new Set([
4257
4692
  "BUTTON",
4258
4693
  "INPUT",
@@ -4266,7 +4701,6 @@ const Label = forwardRef(function Label2({
4266
4701
  asChild,
4267
4702
  required,
4268
4703
  helperText,
4269
- requiredIconLabel,
4270
4704
  helperButtonLabel,
4271
4705
  htmlFor,
4272
4706
  id,
@@ -4283,7 +4717,6 @@ const Label = forwardRef(function Label2({
4283
4717
  }, forwardedRef) {
4284
4718
  const prefix = usePrefix();
4285
4719
  const [locale7] = useLocale();
4286
- requiredIconLabel ??= locale7.Label.requiredIconLabel;
4287
4720
  helperButtonLabel ??= locale7.Label.helperButtonLabel;
4288
4721
  const { printHidden } = usePrintClassNames();
4289
4722
  const labelId = useSetFieldLabel(children, id);
@@ -4337,7 +4770,6 @@ const Label = forwardRef(function Label2({
4337
4770
  /* @__PURE__ */ jsx(
4338
4771
  Icon,
4339
4772
  {
4340
- label: requiredIconLabel && ` (${requiredIconLabel})`,
4341
4773
  ...requiredIconProps,
4342
4774
  className: cx(
4343
4775
  prefix("label__required-icon"),
@@ -4421,7 +4853,7 @@ const Checkbox = forwardRef(function Checkbox2({
4421
4853
  const [locale7] = useLocale();
4422
4854
  loadingDescription ??= locale7.Input.loadingDescription;
4423
4855
  const controlContext = useControlContext();
4424
- const checkboxGroupContext = useContext(CheckboxGroupContext);
4856
+ const checkboxGroupContext = useCheckboxGroupContext();
4425
4857
  const fieldLabelId = useFieldLabelId();
4426
4858
  const dataTableColumnLabelId = useDataTableColumnLabelId();
4427
4859
  const descriptionIds = useFieldDescriptionIds();
@@ -4444,27 +4876,24 @@ const Checkbox = forwardRef(function Checkbox2({
4444
4876
  disabled = controlContext?.disabled || disabled;
4445
4877
  loading = controlContext?.loading || loading;
4446
4878
  readOnly = controlContext?.readOnly || readOnly;
4879
+ const requiredInGroup = useIsRequiredInGroup();
4880
+ const groupDescriptionIds = useCheckboxGroupDescriptionIds(controlId);
4881
+ const [checkedInGroup, setCheckedInGroup] = useIsCheckedInGroup(
4882
+ String(value ?? "")
4883
+ );
4447
4884
  const [checked, setChecked] = useControllableState(
4448
4885
  defaultChecked ?? false,
4449
- controlledChecked ?? checkboxGroupContext?.value.includes(String(value))
4886
+ checkedInGroup ?? controlledChecked
4450
4887
  );
4451
- const onContextCheckedChange = checkboxGroupContext?.onCheckedChange;
4452
4888
  const handleCheckedChange = useCallback(
4453
4889
  (state) => {
4454
4890
  if (!loading && !readOnly) {
4455
4891
  onCheckedChange?.(state);
4456
4892
  setChecked(state);
4457
- onContextCheckedChange?.(value?.toString() ?? "", state === true);
4893
+ setCheckedInGroup?.(state === true);
4458
4894
  }
4459
4895
  },
4460
- [
4461
- loading,
4462
- onCheckedChange,
4463
- onContextCheckedChange,
4464
- readOnly,
4465
- setChecked,
4466
- value
4467
- ]
4896
+ [loading, onCheckedChange, readOnly, setChecked, setCheckedInGroup]
4468
4897
  );
4469
4898
  const setFieldControlFocused = useSetFieldControlFocused();
4470
4899
  const handleFocus = useCallback(() => {
@@ -4521,7 +4950,7 @@ const Checkbox = forwardRef(function Checkbox2({
4521
4950
  ...rootProps,
4522
4951
  className: cx(prefix("checkbox__root"), rootProps?.className),
4523
4952
  children: [
4524
- code && /* @__PURE__ */ jsx(
4953
+ code != null && typeof code !== "boolean" && /* @__PURE__ */ jsx(
4525
4954
  ControlCode,
4526
4955
  {
4527
4956
  ...codeProps,
@@ -4556,7 +4985,7 @@ const Checkbox = forwardRef(function Checkbox2({
4556
4985
  name: name ?? checkboxGroupContext?.name,
4557
4986
  value,
4558
4987
  checked,
4559
- required,
4988
+ required: requiredInGroup || required || void 0,
4560
4989
  disabled,
4561
4990
  "data-loading": boolDataAttr(loading),
4562
4991
  "data-readonly": boolDataAttr(readOnly),
@@ -4575,9 +5004,8 @@ const Checkbox = forwardRef(function Checkbox2({
4575
5004
  errorMessageIds,
4576
5005
  checkboxGroupContext?.errorMessageIds,
4577
5006
  ariaDescribedBy,
4578
- checkboxGroupContext?.ariaDescribedBy,
4579
5007
  descriptionIds,
4580
- checkboxGroupContext?.descriptionIds
5008
+ groupDescriptionIds
4581
5009
  ),
4582
5010
  ...otherProps,
4583
5011
  ref: combinedCheckboxRef,
@@ -4630,7 +5058,7 @@ const Checkbox = forwardRef(function Checkbox2({
4630
5058
  )
4631
5059
  }
4632
5060
  ),
4633
- loadingDescriptionId && /* @__PURE__ */ jsx(VisuallyHidden, { id: loadingDescriptionId, children: loadingDescription })
5061
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription })
4634
5062
  ]
4635
5063
  }
4636
5064
  )
@@ -5891,7 +6319,7 @@ const Input = forwardRef(
5891
6319
  )
5892
6320
  }
5893
6321
  ),
5894
- loadingDescriptionId && /* @__PURE__ */ jsx(VisuallyHidden, { id: loadingDescriptionId, children: loadingDescription })
6322
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription })
5895
6323
  ] });
5896
6324
  }
5897
6325
  );
@@ -6001,6 +6429,7 @@ const MenuListItem = forwardRef(
6001
6429
  showSpinner = loading,
6002
6430
  icon = null,
6003
6431
  iconPlacement,
6432
+ keybinds,
6004
6433
  href,
6005
6434
  target,
6006
6435
  rel,
@@ -6008,6 +6437,7 @@ const MenuListItem = forwardRef(
6008
6437
  contentProps,
6009
6438
  iconProps,
6010
6439
  spinnerProps,
6440
+ keybindsProps,
6011
6441
  className,
6012
6442
  children,
6013
6443
  ...otherProps
@@ -6062,6 +6492,7 @@ const MenuListItem = forwardRef(
6062
6492
  href,
6063
6493
  target,
6064
6494
  rel,
6495
+ "aria-keyshortcuts": type !== "text" ? keybindsToAriaKeyShortcuts(keybinds) : void 0,
6065
6496
  tabIndex: type === "link" && disabled ? -1 : void 0,
6066
6497
  ...actionProps,
6067
6498
  onClick: combineEventHandlers(
@@ -6088,6 +6519,19 @@ const MenuListItem = forwardRef(
6088
6519
  children: loading && loadingContent ? loadingContent : asChild ? children.props.children : children
6089
6520
  }
6090
6521
  ),
6522
+ keybinds && /* @__PURE__ */ jsx(
6523
+ Keybinds,
6524
+ {
6525
+ "aria-hidden": true,
6526
+ keybinds,
6527
+ limit: 1,
6528
+ ...keybindsProps,
6529
+ className: cx(
6530
+ prefix("menu-list__item-keybinds"),
6531
+ keybindsProps?.className
6532
+ )
6533
+ }
6534
+ ),
6091
6535
  iconPlacement === "end" && iconEl,
6092
6536
  iconPlacement === "end" && spinnerEl
6093
6537
  ]
@@ -6098,6 +6542,7 @@ const MenuListItem = forwardRef(
6098
6542
  As,
6099
6543
  {
6100
6544
  className: cx(prefix("menu-list__item"), className),
6545
+ "aria-keyshortcuts": type === "text" ? keybindsToAriaKeyShortcuts(keybinds) : void 0,
6101
6546
  ...otherProps,
6102
6547
  ref: forwardedRef,
6103
6548
  children: asChild ? cloneElement(children, void 0, actionEl) : actionEl
@@ -6339,6 +6784,7 @@ const CommandMenuItem = forwardRef(function CommandMenuItem2({
6339
6784
  showSpinner,
6340
6785
  icon,
6341
6786
  iconPlacement,
6787
+ keybinds,
6342
6788
  href,
6343
6789
  target,
6344
6790
  rel,
@@ -6347,6 +6793,7 @@ const CommandMenuItem = forwardRef(function CommandMenuItem2({
6347
6793
  contentProps,
6348
6794
  iconProps,
6349
6795
  spinnerProps,
6796
+ keybindsProps,
6350
6797
  className,
6351
6798
  children,
6352
6799
  ...otherProps
@@ -6375,6 +6822,7 @@ const CommandMenuItem = forwardRef(function CommandMenuItem2({
6375
6822
  showSpinner,
6376
6823
  icon,
6377
6824
  iconPlacement,
6825
+ keybinds,
6378
6826
  href,
6379
6827
  target,
6380
6828
  rel,
@@ -6389,6 +6837,7 @@ const CommandMenuItem = forwardRef(function CommandMenuItem2({
6389
6837
  contentProps,
6390
6838
  iconProps,
6391
6839
  spinnerProps,
6840
+ keybindsProps,
6392
6841
  asChild: true,
6393
6842
  children: /* @__PURE__ */ jsx(
6394
6843
  Command.Item,
@@ -7069,7 +7518,7 @@ const Select = forwardRef(function Select2({
7069
7518
  const CAPTION_FORMAT = "LLLL y";
7070
7519
  const MONTH_FORMAT = "LLLL";
7071
7520
  const YEAR_FORMAT = "yyyy";
7072
- const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7521
+ const CalendarHeader = memo(function CalendarHeader2({
7073
7522
  calendarMonth,
7074
7523
  displayIndex,
7075
7524
  ...otherProps
@@ -7078,9 +7527,12 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7078
7527
  const {
7079
7528
  minAllowedDate,
7080
7529
  maxAllowedDate,
7530
+ monthSelectLabel,
7531
+ yearSelectLabel,
7081
7532
  previousMonthLabel,
7082
7533
  nextMonthLabel,
7083
- captionProps,
7534
+ headerProps,
7535
+ headerLabelProps,
7084
7536
  previousButtonProps,
7085
7537
  nextButtonProps,
7086
7538
  monthSelectProps,
@@ -7163,9 +7615,12 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7163
7615
  const captionLabel = /* @__PURE__ */ jsx(
7164
7616
  "span",
7165
7617
  {
7166
- className: prefix("calendar__caption-label"),
7167
7618
  role: "status",
7168
- "aria-live": "polite",
7619
+ ...headerLabelProps,
7620
+ className: cx(
7621
+ prefix("calendar__header-label"),
7622
+ headerLabelProps?.className
7623
+ ),
7169
7624
  children: format(displayDate, CAPTION_FORMAT, { locale: locale7 })
7170
7625
  }
7171
7626
  );
@@ -7224,19 +7679,20 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7224
7679
  [locale7, yearDates]
7225
7680
  );
7226
7681
  return /* @__PURE__ */ jsxs(
7227
- "div",
7682
+ "header",
7228
7683
  {
7229
7684
  ...otherProps,
7230
- ...captionProps,
7231
- className: cx(prefix("calendar__caption"), captionProps?.className),
7685
+ ...headerProps,
7686
+ className: cx(prefix("calendar__header"), headerProps?.className),
7232
7687
  children: [
7233
- disableNavigation ? captionLabel : /* @__PURE__ */ jsx(VisuallyHidden, { children: captionLabel }),
7688
+ disableNavigation ? captionLabel : /* @__PURE__ */ jsx(VisuallyHidden, { asChild: true, children: captionLabel }),
7234
7689
  !disableNavigation && /* @__PURE__ */ jsxs(Fragment, { children: [
7235
7690
  months.length > 1 && /* @__PURE__ */ jsx("div", { className: cx(prefix("calendar__navigation")), children: isFirst && prevButton }),
7236
7691
  /* @__PURE__ */ jsx("div", { className: prefix("calendar__selects"), children: /* @__PURE__ */ jsxs(ClearContexts, { children: [
7237
7692
  /* @__PURE__ */ jsx(
7238
7693
  Select,
7239
7694
  {
7695
+ "aria-label": monthSelectLabel,
7240
7696
  disabled: !allowsPrevMonth && !allowsNextMonth,
7241
7697
  showClearButton: false,
7242
7698
  ...monthSelectProps,
@@ -7255,6 +7711,7 @@ const CalendarMonthCaption = memo(function CalendarMonthCaption2({
7255
7711
  /* @__PURE__ */ jsx(
7256
7712
  Select,
7257
7713
  {
7714
+ "aria-label": yearSelectLabel,
7258
7715
  disabled: yearDates.length < 2,
7259
7716
  showClearButton: false,
7260
7717
  ...yearSelectProps,
@@ -7288,6 +7745,8 @@ function Calendar({
7288
7745
  maxMonth,
7289
7746
  minYear,
7290
7747
  maxYear,
7748
+ monthSelectLabel,
7749
+ yearSelectLabel,
7291
7750
  previousMonthLabel,
7292
7751
  nextMonthLabel,
7293
7752
  defaultMonth,
@@ -7299,10 +7758,10 @@ function Calendar({
7299
7758
  showOutsideDays = true,
7300
7759
  fixedWeeks = true,
7301
7760
  disableNavigation,
7302
- locale: dateFnsLocale,
7303
7761
  disabled,
7304
7762
  modifiers,
7305
- captionProps,
7763
+ headerProps,
7764
+ headerLabelProps,
7306
7765
  previousButtonProps,
7307
7766
  nextButtonProps,
7308
7767
  monthSelectProps,
@@ -7312,7 +7771,8 @@ function Calendar({
7312
7771
  }) {
7313
7772
  const prefix = usePrefix();
7314
7773
  const [locale7] = useLocale();
7315
- dateFnsLocale ??= locale7.dateFnsLocale;
7774
+ monthSelectLabel ??= locale7.Calendar.monthSelectLabel;
7775
+ yearSelectLabel ??= locale7.Calendar.yearSelectLabel;
7316
7776
  previousMonthLabel ??= locale7.Calendar.previousMonthLabel;
7317
7777
  nextMonthLabel ??= locale7.Calendar.nextMonthLabel;
7318
7778
  const minAllowedDate = useMemo(() => {
@@ -7400,9 +7860,12 @@ function Calendar({
7400
7860
  value: {
7401
7861
  minAllowedDate,
7402
7862
  maxAllowedDate,
7863
+ monthSelectLabel,
7864
+ yearSelectLabel,
7403
7865
  previousMonthLabel,
7404
7866
  nextMonthLabel,
7405
- captionProps,
7867
+ headerProps,
7868
+ headerLabelProps,
7406
7869
  previousButtonProps,
7407
7870
  nextButtonProps,
7408
7871
  monthSelectProps,
@@ -7411,11 +7874,11 @@ function Calendar({
7411
7874
  children: /* @__PURE__ */ jsx(
7412
7875
  DayPicker,
7413
7876
  {
7414
- locale: dateFnsLocale,
7877
+ locale: locale7.dayPickerLocale,
7415
7878
  required,
7416
7879
  disabled: composedDisabled,
7417
7880
  components: {
7418
- MonthCaption: CalendarMonthCaption,
7881
+ MonthCaption: CalendarHeader,
7419
7882
  Day: CalendarDay,
7420
7883
  Nav: () => null
7421
7884
  },
@@ -7480,7 +7943,7 @@ const CheckboxGroup = forwardRef(function CheckboxGroup2({
7480
7943
  disabled = false,
7481
7944
  readOnly = false,
7482
7945
  defaultValue,
7483
- value: controlledValue,
7946
+ value,
7484
7947
  onValueChange,
7485
7948
  onBlurToOutside,
7486
7949
  codeProps,
@@ -7496,7 +7959,6 @@ const CheckboxGroup = forwardRef(function CheckboxGroup2({
7496
7959
  children,
7497
7960
  "aria-label": ariaLabel,
7498
7961
  "aria-labelledby": ariaLabelledBy,
7499
- "aria-describedby": ariaDescribedBy,
7500
7962
  ...otherProps
7501
7963
  }, forwardedRef) {
7502
7964
  const prefix = usePrefix();
@@ -7518,18 +7980,6 @@ const CheckboxGroup = forwardRef(function CheckboxGroup2({
7518
7980
  const isInTableCell = useIsInTableCell();
7519
7981
  inline ??= isInTableCell;
7520
7982
  variant ??= isInTableCell ? "cell" : "default";
7521
- const [value, setValue] = useControllableState(
7522
- defaultValue ?? [],
7523
- controlledValue
7524
- );
7525
- const handleCheckedChange = useCallback(
7526
- (checkboxValue, checked) => {
7527
- const newValue = checked ? [...value, checkboxValue] : value.filter((v) => v !== checkboxValue);
7528
- setValue(newValue);
7529
- onValueChange?.(newValue);
7530
- },
7531
- [onValueChange, setValue, value]
7532
- );
7533
7983
  const [tabIndex, setTabIndex] = useControllableState(
7534
7984
  disabled ? -1 : 0,
7535
7985
  controlledTabIndex ?? (disabled ? -1 : void 0)
@@ -7568,6 +8018,17 @@ const CheckboxGroup = forwardRef(function CheckboxGroup2({
7568
8018
  },
7569
8019
  [onBlurToOutside, setFieldControlFocused]
7570
8020
  );
8021
+ const checkboxGroupContextValue = useCreateCheckboxGroupContext({
8022
+ defaultValue,
8023
+ value,
8024
+ onValueChange,
8025
+ name,
8026
+ required,
8027
+ loadingDescriptionId,
8028
+ errorMessageIds,
8029
+ descriptionIds,
8030
+ checkboxGroupRef
8031
+ });
7571
8032
  const combinedCheckboxGroupRef = useCombinedRef(
7572
8033
  checkboxGroupRef,
7573
8034
  forwardedRef
@@ -7576,101 +8037,87 @@ const CheckboxGroup = forwardRef(function CheckboxGroup2({
7576
8037
  ControlContext.Provider,
7577
8038
  {
7578
8039
  value: { variant, status, disabled, loading, readOnly },
7579
- children: /* @__PURE__ */ jsx(
7580
- CheckboxGroupContext.Provider,
8040
+ children: /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, { value: checkboxGroupContextValue, children: /* @__PURE__ */ jsxs(
8041
+ "div",
7581
8042
  {
7582
- value: {
7583
- name,
7584
- value,
7585
- onCheckedChange: handleCheckedChange,
7586
- loadingDescriptionId,
7587
- errorMessageIds,
7588
- ariaDescribedBy,
7589
- descriptionIds
7590
- },
7591
- children: /* @__PURE__ */ jsxs(
7592
- "div",
7593
- {
7594
- role: "group",
7595
- id: controlId,
7596
- ...otherProps,
7597
- "data-status": status,
7598
- "data-accent": controlStatusToAccent(status),
7599
- "data-variant": variant,
7600
- className: cx(
7601
- prefix("checkbox-group"),
7602
- inline && prefix("checkbox-group--inline"),
7603
- className
7604
- ),
7605
- onMouseDown: combineEventHandlers(onMouseDown, handleMouseDown),
7606
- onFocus: combineEventHandlers(onFocus, handleFocus),
7607
- onBlur: combineEventHandlers(onBlur, handleBlur),
7608
- "aria-disabled": loading || readOnly || void 0,
7609
- "aria-label": ariaLabel,
7610
- "aria-labelledby": ariaLabelledBy ?? (ariaLabel === void 0 ? combineAriaIds(codeId, labelId ?? dataTableColumnLabelId) : void 0),
7611
- tabIndex,
7612
- ref: combinedCheckboxGroupRef,
7613
- children: [
7614
- code && /* @__PURE__ */ jsx(
7615
- ControlCode,
7616
- {
7617
- status,
7618
- ...codeProps,
7619
- id: codeId,
7620
- className: cx(
7621
- prefix("checkbox-group__code"),
7622
- codeProps?.className
7623
- ),
7624
- children: code
7625
- }
8043
+ role: "group",
8044
+ id: controlId,
8045
+ ...otherProps,
8046
+ "data-status": status,
8047
+ "data-accent": controlStatusToAccent(status),
8048
+ "data-variant": variant,
8049
+ className: cx(
8050
+ prefix("checkbox-group"),
8051
+ inline && prefix("checkbox-group--inline"),
8052
+ className
8053
+ ),
8054
+ onMouseDown: combineEventHandlers(onMouseDown, handleMouseDown),
8055
+ onFocus: combineEventHandlers(onFocus, handleFocus),
8056
+ onBlur: combineEventHandlers(onBlur, handleBlur),
8057
+ "aria-disabled": loading || readOnly || void 0,
8058
+ "aria-label": ariaLabel,
8059
+ "aria-labelledby": ariaLabelledBy ?? (ariaLabel === void 0 ? combineAriaIds(codeId, labelId ?? dataTableColumnLabelId) : void 0),
8060
+ tabIndex,
8061
+ ref: combinedCheckboxGroupRef,
8062
+ children: [
8063
+ code != null && typeof code !== "boolean" && /* @__PURE__ */ jsx(
8064
+ ControlCode,
8065
+ {
8066
+ status,
8067
+ ...codeProps,
8068
+ id: codeId,
8069
+ className: cx(
8070
+ prefix("checkbox-group__code"),
8071
+ codeProps?.className
7626
8072
  ),
7627
- /* @__PURE__ */ jsx(
7628
- "div",
7629
- {
7630
- "data-status": status,
7631
- "data-variant": variant,
7632
- "data-disabled": boolDataAttr(disabled || loading),
7633
- "data-readonly": boolDataAttr(readOnly),
7634
- ...containerProps,
7635
- className: cx(
7636
- prefix("checkbox-group__container"),
7637
- containerProps?.className
7638
- ),
7639
- children: /* @__PURE__ */ jsx(ClearContexts, { children })
7640
- }
8073
+ children: code
8074
+ }
8075
+ ),
8076
+ /* @__PURE__ */ jsx(
8077
+ "div",
8078
+ {
8079
+ "data-status": status,
8080
+ "data-variant": variant,
8081
+ "data-disabled": boolDataAttr(disabled || loading),
8082
+ "data-readonly": boolDataAttr(readOnly),
8083
+ ...containerProps,
8084
+ className: cx(
8085
+ prefix("checkbox-group__container"),
8086
+ containerProps?.className
7641
8087
  ),
7642
- showSpinner && /* @__PURE__ */ jsx(
7643
- "div",
8088
+ children: /* @__PURE__ */ jsx(ClearContexts, { children })
8089
+ }
8090
+ ),
8091
+ showSpinner && /* @__PURE__ */ jsx(
8092
+ "div",
8093
+ {
8094
+ "data-status": status,
8095
+ "data-variant": variant,
8096
+ "data-disabled": boolDataAttr(disabled || loading),
8097
+ "data-readonly": boolDataAttr(readOnly),
8098
+ ...endContainerProps,
8099
+ className: cx(
8100
+ prefix("checkbox-group__end-container"),
8101
+ endContainerProps?.className
8102
+ ),
8103
+ children: /* @__PURE__ */ jsx(
8104
+ Spinner,
7644
8105
  {
7645
- "data-status": status,
7646
- "data-variant": variant,
8106
+ color: controlStatusToAccent(status, "neutral"),
7647
8107
  "data-disabled": boolDataAttr(disabled || loading),
7648
- "data-readonly": boolDataAttr(readOnly),
7649
- ...endContainerProps,
8108
+ ...spinnerProps,
7650
8109
  className: cx(
7651
- prefix("checkbox-group__end-container"),
7652
- endContainerProps?.className
7653
- ),
7654
- children: /* @__PURE__ */ jsx(
7655
- Spinner,
7656
- {
7657
- color: controlStatusToAccent(status, "neutral"),
7658
- "data-disabled": boolDataAttr(disabled || loading),
7659
- ...spinnerProps,
7660
- className: cx(
7661
- prefix("checkbox-group__spinner"),
7662
- spinnerProps?.className
7663
- )
7664
- }
8110
+ prefix("checkbox-group__spinner"),
8111
+ spinnerProps?.className
7665
8112
  )
7666
8113
  }
7667
- ),
7668
- loadingDescriptionId && /* @__PURE__ */ jsx(VisuallyHidden, { id: loadingDescriptionId, children: loadingDescription })
7669
- ]
7670
- }
7671
- )
8114
+ )
8115
+ }
8116
+ ),
8117
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription })
8118
+ ]
7672
8119
  }
7673
- )
8120
+ ) })
7674
8121
  }
7675
8122
  ) });
7676
8123
  });
@@ -7713,37 +8160,37 @@ const Container = forwardRef(
7713
8160
  );
7714
8161
  }
7715
8162
  );
7716
- const REF_DATE = /* @__PURE__ */ new Date(0);
7717
8163
  function parseDateStrict(dateString, dateFormat, options) {
7718
- const date = parse(dateString, dateFormat, REF_DATE, options);
8164
+ const date = parse(
8165
+ dateString,
8166
+ dateFormat,
8167
+ options?.referenceDate ?? /* @__PURE__ */ new Date(),
8168
+ options
8169
+ );
7719
8170
  if (isNaN(+date)) {
7720
8171
  return null;
7721
8172
  }
7722
8173
  return format(date, dateFormat, options) === dateString ? date : null;
7723
8174
  }
7724
- const DEFAULT_SHORT_DATE_FORMAT = "yyyy-MM-dd";
7725
- const DEFAULT_FULL_DATE_FORMAT = "EEEE, d MMMM yyyy";
8175
+ const DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
7726
8176
  function useDateTransformer({
7727
8177
  locale: dateFnsLocale,
7728
- shortFormat,
7729
- fullFormat
8178
+ format: format$1
7730
8179
  } = {}) {
7731
8180
  const [locale7] = useLocale();
7732
- dateFnsLocale ??= locale7.dateFnsLocale;
7733
- shortFormat ??= locale7.DateInput.shortFormat ?? dateFnsLocale.formatLong?.date({ width: "short" }) ?? DEFAULT_SHORT_DATE_FORMAT;
7734
- fullFormat ??= locale7.DateInput.fullFormat ?? dateFnsLocale.formatLong?.date({ width: "full" }) ?? DEFAULT_FULL_DATE_FORMAT;
8181
+ dateFnsLocale ??= locale7.dayPickerLocale;
8182
+ format$1 ??= locale7.DateInput.format ?? dateFnsLocale.formatLong?.date({ width: "short" }) ?? DEFAULT_DATE_FORMAT;
7735
8183
  return useMemo(
7736
8184
  () => ({
7737
- parse: (formattedDate, { width = "short" } = {}) => parseDateStrict(
7738
- formattedDate,
7739
- width === "short" ? shortFormat : fullFormat,
7740
- { locale: dateFnsLocale }
7741
- ),
7742
- format: (date, { width = "short" } = {}) => date != null ? format(date, width === "short" ? shortFormat : fullFormat, {
7743
- locale: dateFnsLocale
8185
+ parse: (formattedDate, options) => parseDateStrict(formattedDate, options?.format ?? format$1, {
8186
+ locale: options?.locale ?? dateFnsLocale,
8187
+ referenceDate: options?.referenceDate
8188
+ }),
8189
+ format: (date, options) => date != null ? format(date, options?.format ?? format$1, {
8190
+ locale: options?.locale ?? dateFnsLocale
7744
8191
  }) : ""
7745
8192
  }),
7746
- [dateFnsLocale, fullFormat, shortFormat]
8193
+ [dateFnsLocale, format$1]
7747
8194
  );
7748
8195
  }
7749
8196
  function DatePicker({
@@ -7794,10 +8241,10 @@ const DateInput = forwardRef(
7794
8241
  maxMonth,
7795
8242
  minYear,
7796
8243
  maxYear,
7797
- locale: dateFnsLocale,
7798
- shortFormat,
7799
- fullFormat,
8244
+ format: format2,
8245
+ announcedFormat,
7800
8246
  formatDescription,
8247
+ selectedDateDescription,
7801
8248
  calendarButtonLabel,
7802
8249
  onPopoverOpenChange,
7803
8250
  onBlurToOutside,
@@ -7812,18 +8259,19 @@ const DateInput = forwardRef(
7812
8259
  }, forwardedRef) {
7813
8260
  const prefix = usePrefix();
7814
8261
  const [locale7] = useLocale();
7815
- dateFnsLocale ??= locale7.dateFnsLocale;
7816
8262
  placeholder ??= locale7.DateInput.placeholder;
8263
+ announcedFormat ??= locale7.dayPickerLocale?.formatLong.date({
8264
+ width: "long"
8265
+ });
7817
8266
  formatDescription ??= locale7.DateInput.formatDescription;
8267
+ selectedDateDescription ??= locale7.DateInput.selectedDateDescription;
7818
8268
  calendarButtonLabel ??= locale7.DateInput.calendarButtonLabel;
7819
8269
  const { printHidden } = usePrintClassNames();
7820
8270
  const { format: formatDate, parse: parseDate } = useDateTransformer({
7821
- locale: dateFnsLocale,
7822
- shortFormat,
7823
- fullFormat
8271
+ format: format2
7824
8272
  });
7825
8273
  const generatedId = useId();
7826
- const formatDescriptionId = formatDescription && prefix(`control-format-${generatedId}`);
8274
+ const formatDescriptionId = formatDescription && prefix(`date-input-format-${generatedId}`);
7827
8275
  const [formattedValue, setFormattedValue] = useControllableState(
7828
8276
  defaultValue === null || isDate(defaultValue) ? formatDate(defaultValue) : defaultValue?.toString() ?? "",
7829
8277
  controlledValue === null || isDate(controlledValue) ? formatDate(controlledValue) : controlledValue?.toString()
@@ -7966,10 +8414,11 @@ const DateInput = forwardRef(
7966
8414
  setFormattedValue
7967
8415
  ]
7968
8416
  );
7969
- const fullFormattedValue = useMemo(
7970
- () => formatDate(dateValue, { width: "full" }),
7971
- [dateValue, formatDate]
8417
+ const descriptionFormattedValue = useMemo(
8418
+ () => formatDate(dateValue, { format: announcedFormat }),
8419
+ [dateValue, announcedFormat, formatDate]
7972
8420
  );
8421
+ const selectedDateDescriptionId = selectedDateDescription && descriptionFormattedValue && prefix(`date-input-selected-${generatedId}`);
7973
8422
  const combinedClearButtonRef = useCombinedRef(
7974
8423
  clearButtonProps?.ref,
7975
8424
  clearButtonRef
@@ -7996,25 +8445,26 @@ const DateInput = forwardRef(
7996
8445
  showClearButton,
7997
8446
  endAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
7998
8447
  endAdornment,
7999
- /* @__PURE__ */ jsx(ControlAddon, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(
8448
+ /* @__PURE__ */ jsx(Tooltip, { content: calendarButtonLabel, children: /* @__PURE__ */ jsx(ControlAddon, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsxs(
8000
8449
  "button",
8001
8450
  {
8002
8451
  className: printHidden,
8003
- "aria-label": calendarButtonLabel?.(
8004
- fullFormattedValue,
8005
- !disabled && !loading && !readOnly
8006
- ),
8007
8452
  onClick: handleAddonButtonClick,
8008
8453
  onBlur: handleControlBlur,
8009
8454
  "data-state": void 0,
8010
8455
  ref: addonButtonRef,
8011
- children: /* @__PURE__ */ jsx(Icon, { icon: faCalendar })
8456
+ "aria-describedby": selectedDateDescriptionId,
8457
+ children: [
8458
+ /* @__PURE__ */ jsx(Icon, { icon: faCalendar }),
8459
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: calendarButtonLabel })
8460
+ ]
8012
8461
  }
8013
- ) }) })
8462
+ ) }) }) })
8014
8463
  ] }),
8015
8464
  "aria-describedby": combineAriaIds(
8465
+ ariaDescribedBy,
8016
8466
  formatDescriptionId,
8017
- ariaDescribedBy
8467
+ selectedDateDescriptionId
8018
8468
  ),
8019
8469
  containerProps: {
8020
8470
  // Propagate open state to container for styling purposes
@@ -8083,7 +8533,6 @@ const DateInput = forwardRef(
8083
8533
  maxMonth,
8084
8534
  minYear,
8085
8535
  maxYear,
8086
- locale: dateFnsLocale,
8087
8536
  monthSelectProps: {
8088
8537
  ...datePickerProps?.monthSelectProps,
8089
8538
  popoverProps: {
@@ -8097,13 +8546,18 @@ const DateInput = forwardRef(
8097
8546
  ...datePickerProps?.yearSelectProps?.popoverProps,
8098
8547
  ref: yearSelectMenuRef
8099
8548
  }
8549
+ },
8550
+ headerLabelProps: {
8551
+ role: popoverState.modal ? "status" : void 0,
8552
+ ...datePickerProps?.headerLabelProps
8100
8553
  }
8101
8554
  }
8102
8555
  )
8103
8556
  }
8104
8557
  )
8105
8558
  ] }),
8106
- formatDescription && /* @__PURE__ */ jsx(VisuallyHidden, { id: formatDescriptionId, children: formatDescription })
8559
+ formatDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: formatDescriptionId, children: formatDescription }),
8560
+ selectedDateDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: selectedDateDescriptionId, children: selectedDateDescription(descriptionFormattedValue) })
8107
8561
  ] });
8108
8562
  }
8109
8563
  );
@@ -8221,12 +8675,13 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8221
8675
  endAdornment,
8222
8676
  showClearButtons = "auto",
8223
8677
  clearButtonsLabel,
8224
- locale: dateFnsLocale,
8225
- shortFormat,
8226
- fullFormat,
8678
+ format: format2,
8679
+ announcedFormat,
8227
8680
  formatDescription,
8228
8681
  startInputLabel,
8229
8682
  endInputLabel,
8683
+ selectedDateDescription,
8684
+ selectedDateRangeDescription,
8230
8685
  calendarButtonLabel,
8231
8686
  placeholder,
8232
8687
  startPlaceholder,
@@ -8251,16 +8706,18 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8251
8706
  const [locale7] = useLocale();
8252
8707
  loadingDescription ??= locale7.Input.loadingDescription;
8253
8708
  clearButtonsLabel ??= locale7.Input.clearButtonLabel;
8254
- dateFnsLocale ??= locale7.dateFnsLocale;
8255
8709
  placeholder ??= locale7.DateInput.placeholder;
8710
+ announcedFormat ??= locale7.dayPickerLocale?.formatLong.date({
8711
+ width: "long"
8712
+ });
8256
8713
  formatDescription ??= locale7.DateInput.formatDescription;
8257
8714
  startInputLabel ??= locale7.DateRangeInput.startInputLabel;
8258
8715
  endInputLabel ??= locale7.DateRangeInput.endInputLabel;
8259
- calendarButtonLabel ??= locale7.DateRangeInput.calendarButtonLabel;
8716
+ selectedDateDescription ??= locale7.DateInput.selectedDateDescription;
8717
+ selectedDateRangeDescription ??= locale7.DateRangeInput.selectedDateRangeDescription;
8718
+ calendarButtonLabel ??= locale7.DateRangeInput.calendarButtonLabel ?? locale7.DateInput.calendarButtonLabel;
8260
8719
  const { format: formatDate, parse: parseDate } = useDateTransformer({
8261
- locale: dateFnsLocale,
8262
- shortFormat,
8263
- fullFormat
8720
+ format: format2
8264
8721
  });
8265
8722
  const dataTableColumnLabelId = useDataTableColumnLabelId();
8266
8723
  const labelId = useFieldLabelId();
@@ -8278,7 +8735,7 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8278
8735
  const startInputLabelId = startInputLabel && prefix(`control-start-label-${generatedId}`);
8279
8736
  const endInputLabelId = endInputLabel && prefix(`control-end-label-${generatedId}`);
8280
8737
  const loadingDescriptionId = loading && loadingDescription && prefix(`control-loading-${generatedId}`);
8281
- const formatDescriptionId = formatDescription && prefix(`control-format-${generatedId}`);
8738
+ const formatDescriptionId = formatDescription && typeof formatDescription !== "boolean" ? prefix(`control-format-${generatedId}`) : void 0;
8282
8739
  const isInTableCell = useIsInTableCell();
8283
8740
  variant ??= isInTableCell ? "cell" : "default";
8284
8741
  const [formattedValue, setFormattedValue] = useControllableState(
@@ -8585,9 +9042,17 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8585
9042
  "control",
8586
9043
  { align }
8587
9044
  );
8588
- const fullFormattedStart = dateValue.start && formatDate(dateValue.start, { width: "full" });
8589
- const fullFormattedEnd = dateValue.end && formatDate(dateValue.end, { width: "full" });
8590
- const fullFormattedValue = fullFormattedStart && fullFormattedEnd ? `${fullFormattedStart}–${fullFormattedEnd}` : fullFormattedStart || fullFormattedEnd;
9045
+ const descriptionFormattedStart = useMemo(
9046
+ () => formatDate(dateValue.start, { format: announcedFormat }),
9047
+ [dateValue.start, announcedFormat, formatDate]
9048
+ );
9049
+ const descriptionFormattedEnd = useMemo(
9050
+ () => formatDate(dateValue.end, { format: announcedFormat }),
9051
+ [dateValue.end, announcedFormat, formatDate]
9052
+ );
9053
+ const selectedStartDateDescriptionId = selectedDateDescription && descriptionFormattedStart && prefix(`date-range-input-start-selected-${generatedId}`);
9054
+ const selectedEndDateDescriptionId = selectedDateDescription && descriptionFormattedEnd && prefix(`date-range-input-end-selected-${generatedId}`);
9055
+ const selectedDateRangeDescriptionId = selectedDateRangeDescription && (descriptionFormattedStart || descriptionFormattedEnd) && prefix(`date-range-input-selected-${generatedId}`);
8591
9056
  const combinedStartContainerRef = useCombinedRef(
8592
9057
  startContainerRef,
8593
9058
  startContainerProps?.ref
@@ -8633,11 +9098,17 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8633
9098
  ...otherProps,
8634
9099
  ref: forwardedRef,
8635
9100
  children: [
8636
- startInputLabelId && /* @__PURE__ */ jsx(VisuallyHidden, { id: startInputLabelId, children: startInputLabel }),
8637
- endInputLabelId && /* @__PURE__ */ jsx(VisuallyHidden, { id: endInputLabelId, children: endInputLabel }),
8638
- loadingDescriptionId && /* @__PURE__ */ jsx(VisuallyHidden, { id: loadingDescriptionId, children: loadingDescription }),
8639
- formatDescriptionId && /* @__PURE__ */ jsx(VisuallyHidden, { id: formatDescriptionId, children: formatDescription }),
8640
- code && /* @__PURE__ */ jsx(
9101
+ startInputLabelId && /* @__PURE__ */ jsx("span", { hidden: true, id: startInputLabelId, children: startInputLabel }),
9102
+ endInputLabelId && /* @__PURE__ */ jsx("span", { hidden: true, id: endInputLabelId, children: endInputLabel }),
9103
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription }),
9104
+ formatDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: formatDescriptionId, children: formatDescription }),
9105
+ selectedStartDateDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: selectedStartDateDescriptionId, children: selectedDateDescription(descriptionFormattedStart) }),
9106
+ selectedEndDateDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: selectedEndDateDescriptionId, children: selectedDateDescription(descriptionFormattedEnd) }),
9107
+ selectedDateRangeDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: selectedDateRangeDescriptionId, children: selectedDateRangeDescription({
9108
+ start: descriptionFormattedStart,
9109
+ end: descriptionFormattedEnd
9110
+ }) }),
9111
+ code != null && typeof code !== "boolean" && /* @__PURE__ */ jsx(
8641
9112
  ControlCode,
8642
9113
  {
8643
9114
  ...codeProps,
@@ -8739,8 +9210,9 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8739
9210
  loadingDescriptionId,
8740
9211
  errorMessageIds,
8741
9212
  startInputProps?.["aria-describedby"],
9213
+ descriptionIds,
8742
9214
  formatDescriptionId,
8743
- descriptionIds
9215
+ selectedStartDateDescriptionId
8744
9216
  ),
8745
9217
  ref: combinedStartInputRef
8746
9218
  }
@@ -8853,8 +9325,9 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8853
9325
  loadingDescriptionId,
8854
9326
  errorMessageIds,
8855
9327
  endInputProps?.["aria-describedby"],
9328
+ descriptionIds,
8856
9329
  formatDescriptionId,
8857
- descriptionIds
9330
+ selectedEndDateDescriptionId
8858
9331
  ),
8859
9332
  ref: combinedEndInputRef
8860
9333
  }
@@ -8899,13 +9372,9 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8899
9372
  }
8900
9373
  ),
8901
9374
  endAdornment,
8902
- /* @__PURE__ */ jsx(ControlAddon, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(
9375
+ /* @__PURE__ */ jsx(Tooltip, { content: calendarButtonLabel, children: /* @__PURE__ */ jsx(ControlAddon, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsxs(
8903
9376
  "button",
8904
9377
  {
8905
- "aria-label": calendarButtonLabel?.(
8906
- fullFormattedValue,
8907
- !disabled && !loading && !readOnly
8908
- ),
8909
9378
  onClick: handleAddonButtonClick,
8910
9379
  onBlur: handleControlBlur,
8911
9380
  "data-state": void 0,
@@ -8914,9 +9383,13 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8914
9383
  printHidden
8915
9384
  ),
8916
9385
  ref: addonButtonRef,
8917
- children: /* @__PURE__ */ jsx(Icon, { icon: faCalendar })
9386
+ "aria-describedby": selectedDateRangeDescriptionId,
9387
+ children: [
9388
+ /* @__PURE__ */ jsx(Icon, { icon: faCalendar }),
9389
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: calendarButtonLabel })
9390
+ ]
8918
9391
  }
8919
- ) }) })
9392
+ ) }) }) })
8920
9393
  ]
8921
9394
  }
8922
9395
  ),
@@ -8975,7 +9448,6 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8975
9448
  maxMonth,
8976
9449
  minYear,
8977
9450
  maxYear,
8978
- locale: dateFnsLocale,
8979
9451
  monthSelectProps: {
8980
9452
  ...dateRangePickerProps?.monthSelectProps,
8981
9453
  popoverProps: {
@@ -8989,6 +9461,10 @@ const DateRangeInput = forwardRef(function DateRangeInput2({
8989
9461
  ...dateRangePickerProps?.yearSelectProps?.popoverProps,
8990
9462
  ref: yearSelectMenuRef
8991
9463
  }
9464
+ },
9465
+ headerLabelProps: {
9466
+ role: popoverState.modal ? "status" : void 0,
9467
+ ...dateRangePickerProps?.headerLabelProps
8992
9468
  }
8993
9469
  }
8994
9470
  )
@@ -9014,10 +9490,12 @@ const DropdownMenuCheckboxItem = forwardRef(function DropdownMenuCheckboxItem2({
9014
9490
  loadingContent,
9015
9491
  showSpinner,
9016
9492
  iconPlacement,
9493
+ keybinds,
9017
9494
  actionProps,
9018
9495
  contentProps,
9019
9496
  iconProps,
9020
9497
  spinnerProps,
9498
+ keybindsProps,
9021
9499
  indicatorProps,
9022
9500
  className,
9023
9501
  ...otherProps
@@ -9056,6 +9534,7 @@ const DropdownMenuCheckboxItem = forwardRef(function DropdownMenuCheckboxItem2({
9056
9534
  loadingContent,
9057
9535
  showSpinner,
9058
9536
  iconPlacement,
9537
+ keybinds,
9059
9538
  actionProps,
9060
9539
  contentProps,
9061
9540
  "data-hide-control": boolDataAttr(!showCheckbox),
@@ -9072,6 +9551,7 @@ const DropdownMenuCheckboxItem = forwardRef(function DropdownMenuCheckboxItem2({
9072
9551
  ) }) }) : null,
9073
9552
  iconProps,
9074
9553
  spinnerProps,
9554
+ keybindsProps,
9075
9555
  asChild: true,
9076
9556
  children: /* @__PURE__ */ jsx(
9077
9557
  DropdownMenu$1.CheckboxItem,
@@ -9179,6 +9659,7 @@ const DropdownMenuItem = forwardRef(function DropdownMenuItem2({
9179
9659
  showSpinner,
9180
9660
  icon,
9181
9661
  iconPlacement,
9662
+ keybinds,
9182
9663
  href,
9183
9664
  target,
9184
9665
  rel,
@@ -9186,6 +9667,7 @@ const DropdownMenuItem = forwardRef(function DropdownMenuItem2({
9186
9667
  contentProps,
9187
9668
  iconProps,
9188
9669
  spinnerProps,
9670
+ keybindsProps,
9189
9671
  className,
9190
9672
  ...otherProps
9191
9673
  }, forwardedRef) {
@@ -9215,6 +9697,7 @@ const DropdownMenuItem = forwardRef(function DropdownMenuItem2({
9215
9697
  showSpinner,
9216
9698
  icon,
9217
9699
  iconPlacement,
9700
+ keybinds,
9218
9701
  href,
9219
9702
  target,
9220
9703
  rel,
@@ -9222,6 +9705,7 @@ const DropdownMenuItem = forwardRef(function DropdownMenuItem2({
9222
9705
  contentProps,
9223
9706
  iconProps,
9224
9707
  spinnerProps,
9708
+ keybindsProps,
9225
9709
  asChild: true,
9226
9710
  children: /* @__PURE__ */ jsx(
9227
9711
  DropdownMenu$1.Item,
@@ -9265,10 +9749,12 @@ const DropdownMenuRadioItem = forwardRef(function DropdownMenuRadioItem2({
9265
9749
  loadingContent,
9266
9750
  showSpinner,
9267
9751
  iconPlacement,
9752
+ keybinds,
9268
9753
  actionProps,
9269
9754
  contentProps,
9270
9755
  iconProps,
9271
9756
  spinnerProps,
9757
+ keybindsProps,
9272
9758
  indicatorProps,
9273
9759
  className,
9274
9760
  ...otherProps
@@ -9294,6 +9780,7 @@ const DropdownMenuRadioItem = forwardRef(function DropdownMenuRadioItem2({
9294
9780
  loadingContent,
9295
9781
  showSpinner,
9296
9782
  iconPlacement,
9783
+ keybinds,
9297
9784
  actionProps,
9298
9785
  contentProps,
9299
9786
  "data-hide-control": boolDataAttr(!showRadio),
@@ -9309,6 +9796,7 @@ const DropdownMenuRadioItem = forwardRef(function DropdownMenuRadioItem2({
9309
9796
  ) }) : null,
9310
9797
  iconProps,
9311
9798
  spinnerProps,
9799
+ keybindsProps,
9312
9800
  asChild: true,
9313
9801
  children: /* @__PURE__ */ jsx(
9314
9802
  DropdownMenu$1.RadioItem,
@@ -9405,14 +9893,15 @@ function useIsInFeedbackList() {
9405
9893
  return useContext(FeedbackListContext);
9406
9894
  }
9407
9895
  const FeedbackList = forwardRef(
9408
- function FeedbackList2({ className, ...otherProps }, forwardedRef) {
9896
+ function FeedbackList2({ className, children, ...otherProps }, forwardedRef) {
9409
9897
  const prefix = usePrefix();
9410
- return /* @__PURE__ */ jsx(FeedbackListContext.Provider, { value: true, children: /* @__PURE__ */ jsx(
9898
+ return /* @__PURE__ */ jsx(FeedbackListContext.Provider, { value: true, children: (!Array.isArray(children) || children.length > 0) && /* @__PURE__ */ jsx(
9411
9899
  "ul",
9412
9900
  {
9413
9901
  className: cx(prefix("feedback-list"), className),
9414
9902
  ...otherProps,
9415
- ref: forwardedRef
9903
+ ref: forwardedRef,
9904
+ children
9416
9905
  }
9417
9906
  ) });
9418
9907
  }
@@ -9428,7 +9917,7 @@ const FEEDBACK_ICON = {
9428
9917
  };
9429
9918
  const FeedbackPopover = forwardRef(function FeedbackPopover2({
9430
9919
  defaultOpen,
9431
- open,
9920
+ open: controlledOpen,
9432
9921
  onOpenChange,
9433
9922
  modal,
9434
9923
  icon,
@@ -9445,6 +9934,7 @@ const FeedbackPopover = forwardRef(function FeedbackPopover2({
9445
9934
  const [locale7] = useLocale();
9446
9935
  label ??= locale7.FeedbackPopover.label;
9447
9936
  const variant = useIsInTableCell() ? "cell" : "default";
9937
+ const [open, setOpen] = useControllableState(defaultOpen, controlledOpen);
9448
9938
  const [feedbacksCount, setFeedbacksCount] = useState({
9449
9939
  success: 0,
9450
9940
  error: 0,
@@ -9480,6 +9970,7 @@ const FeedbackPopover = forwardRef(function FeedbackPopover2({
9480
9970
  );
9481
9971
  const inField = controlFocused !== void 0;
9482
9972
  const accent = dominantFeedbackType === "error" ? "danger" : dominantFeedbackType;
9973
+ const childrenIsElement = isValidElement(children);
9483
9974
  return /* @__PURE__ */ jsxs(Fragment, { children: [
9484
9975
  /* @__PURE__ */ jsx(
9485
9976
  FeedbackPopoverContext.Provider,
@@ -9488,16 +9979,15 @@ const FeedbackPopover = forwardRef(function FeedbackPopover2({
9488
9979
  onAddFeedback: handleAddFeedback,
9489
9980
  onRemoveFeedback: handleRemoveFeedback
9490
9981
  },
9491
- children: /* @__PURE__ */ jsx(VisuallyHidden, { children })
9982
+ children: childrenIsElement ? cloneElement(children, { hidden: true }) : /* @__PURE__ */ jsx("div", { hidden: true, children })
9492
9983
  }
9493
9984
  ),
9494
9985
  /* @__PURE__ */ jsxs(
9495
9986
  Popover,
9496
9987
  {
9497
- defaultOpen,
9498
9988
  open: hasFeedback && (controlFocused || open || false),
9499
- onOpenChange,
9500
- modal: inField ? modal : false,
9989
+ onOpenChange: combineEventHandlers(onOpenChange, setOpen),
9990
+ modal: controlFocused ? false : modal,
9501
9991
  children: [
9502
9992
  hasFeedback && /* @__PURE__ */ jsx(
9503
9993
  "div",
@@ -9545,7 +10035,7 @@ const FeedbackPopover = forwardRef(function FeedbackPopover2({
9545
10035
  ...otherProps,
9546
10036
  "data-accent": accent,
9547
10037
  ref: forwardedRef,
9548
- children
10038
+ children: childrenIsElement ? cloneElement(children, { id: void 0 }) : children
9549
10039
  }
9550
10040
  ) })
9551
10041
  ]
@@ -9564,14 +10054,14 @@ const Feedback = forwardRef(
9564
10054
  ...otherProps
9565
10055
  }, forwardedRef) {
9566
10056
  const prefix = usePrefix();
10057
+ const [locale7] = useLocale();
10058
+ visuallyHiddenPrefix ??= locale7.Feedback.visuallyHiddenPrefix;
9567
10059
  const { onAddFeedback, onRemoveFeedback } = useFeedbackPopoverContext() ?? {};
9568
10060
  useLayoutEffect(() => {
9569
10061
  onAddFeedback?.(type);
9570
10062
  return () => onRemoveFeedback?.(type);
9571
10063
  }, [onAddFeedback, onRemoveFeedback, type]);
9572
10064
  const isInFeedbackList = useIsInFeedbackList();
9573
- const [locale7] = useLocale();
9574
- visuallyHiddenPrefix ??= locale7.Feedback.visuallyHiddenPrefix;
9575
10065
  const visuallyHiddenPrefixText = typeof visuallyHiddenPrefix === "function" ? visuallyHiddenPrefix(type) : visuallyHiddenPrefix;
9576
10066
  const feedbackId = useSetFieldFeedback(id, type === "error");
9577
10067
  const As = asChild ? Slot : isInFeedbackList ? "li" : "div";
@@ -9581,8 +10071,8 @@ const Feedback = forwardRef(
9581
10071
  id: feedbackId,
9582
10072
  className: cx(prefix("feedback"), className),
9583
10073
  "data-accent": type === "error" ? "danger" : type,
9584
- ...otherProps,
9585
10074
  "data-type": type,
10075
+ ...otherProps,
9586
10076
  ref: forwardedRef,
9587
10077
  children: [
9588
10078
  visuallyHiddenPrefixText && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
@@ -9669,7 +10159,7 @@ const FieldGroupHeader = forwardRef(function FieldGroupHeader2({
9669
10159
  ...otherProps,
9670
10160
  ref: forwardedRef,
9671
10161
  children: [
9672
- code && /* @__PURE__ */ jsxs(
10162
+ code != null && typeof code !== "boolean" && /* @__PURE__ */ jsxs(
9673
10163
  "span",
9674
10164
  {
9675
10165
  ...codeProps,
@@ -9680,7 +10170,8 @@ const FieldGroupHeader = forwardRef(function FieldGroupHeader2({
9680
10170
  visuallyHiddenCodePrefix,
9681
10171
  " "
9682
10172
  ] }),
9683
- code
10173
+ code,
10174
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: ", " })
9684
10175
  ]
9685
10176
  }
9686
10177
  ),
@@ -9822,20 +10313,6 @@ const HelperText = forwardRef(
9822
10313
  );
9823
10314
  }
9824
10315
  );
9825
- const Keyboard = forwardRef(
9826
- function Keyboard2({ asChild, className, ...otherProps }, forwardedRef) {
9827
- const prefix = usePrefix();
9828
- const As = asChild ? Slot : "kbd";
9829
- return /* @__PURE__ */ jsx(
9830
- As,
9831
- {
9832
- className: cx(prefix("keyboard"), className),
9833
- ref: forwardedRef,
9834
- ...otherProps
9835
- }
9836
- );
9837
- }
9838
- );
9839
10316
  const Link = forwardRef(function Link2({
9840
10317
  as = "a",
9841
10318
  asChild,
@@ -10314,7 +10791,7 @@ const Radio = forwardRef(function Radio2({
10314
10791
  const controlContext = useControlContext();
10315
10792
  const generatedId = useId();
10316
10793
  const controlId = id ?? prefix(`control-${generatedId}`);
10317
- const codeId = code && (codeProps?.id ?? prefix(`control-code-${generatedId}`));
10794
+ const codeId = code != null && typeof code !== "boolean" && (codeProps?.id ?? prefix(`control-code-${generatedId}`));
10318
10795
  const labelId = children && (labelProps?.id ?? prefix(`radio-label-${generatedId}`));
10319
10796
  const loadingDescriptionId = loading && loadingDescription && prefix(`control-loading-${generatedId}`);
10320
10797
  status = controlContext?.status ?? status;
@@ -10399,7 +10876,7 @@ const Radio = forwardRef(function Radio2({
10399
10876
  className: cx(prefix("radio__spinner"), spinnerProps?.className)
10400
10877
  }
10401
10878
  ),
10402
- loadingDescriptionId && /* @__PURE__ */ jsx(VisuallyHidden, { id: loadingDescriptionId, children: loadingDescription })
10879
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription })
10403
10880
  ]
10404
10881
  }
10405
10882
  );
@@ -10533,7 +11010,7 @@ const RadioGroup = forwardRef(function RadioGroup2({
10533
11010
  ...otherProps,
10534
11011
  ref: combinedRadioGroupRef,
10535
11012
  children: [
10536
- code && /* @__PURE__ */ jsx(
11013
+ code != null && typeof code !== "boolean" && /* @__PURE__ */ jsx(
10537
11014
  ControlCode,
10538
11015
  {
10539
11016
  status,
@@ -10613,7 +11090,7 @@ const RadioGroup = forwardRef(function RadioGroup2({
10613
11090
  ]
10614
11091
  }
10615
11092
  ),
10616
- loadingDescriptionId && /* @__PURE__ */ jsx(VisuallyHidden, { id: loadingDescriptionId, children: loadingDescription })
11093
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription })
10617
11094
  ]
10618
11095
  }
10619
11096
  )
@@ -10867,7 +11344,7 @@ const Tab = forwardRef(function Tab2({ value, status, tabInnerProps, className,
10867
11344
  const tabRef = useRef(null);
10868
11345
  useEffect(() => {
10869
11346
  if (isActive) {
10870
- setTimeout(() => tabRef.current.scrollIntoView({ block: "nearest" }));
11347
+ setTimeout(() => tabRef.current?.scrollIntoView({ block: "nearest" }));
10871
11348
  }
10872
11349
  }, [isActive]);
10873
11350
  const combinedTabRef = useCombinedRef(tabRef, forwardedRef);
@@ -10882,6 +11359,7 @@ const Tab = forwardRef(function Tab2({ value, status, tabInnerProps, className,
10882
11359
  ),
10883
11360
  "data-status": status,
10884
11361
  "data-accent": controlStatusToAccent(status),
11362
+ "aria-invalid": status === "invalid" || void 0,
10885
11363
  ...otherProps,
10886
11364
  ref: combinedTabRef,
10887
11365
  children: [
@@ -10940,8 +11418,21 @@ const TabContent = forwardRef(function TabContent2({ asChild, value, className,
10940
11418
  )
10941
11419
  ] });
10942
11420
  });
10943
- const TabList = forwardRef(function TabList2({ rootProps, containerProps, className, children, ...otherProps }, forwardedRef) {
11421
+ const TabList = forwardRef(function TabList2({
11422
+ scrollLeftButtonLabel,
11423
+ scrollRightButtonLabel,
11424
+ rootProps,
11425
+ containerProps,
11426
+ scrollLeftButtonProps,
11427
+ scrollRightButtonProps,
11428
+ className,
11429
+ children,
11430
+ ...otherProps
11431
+ }, forwardedRef) {
10944
11432
  const prefix = usePrefix();
11433
+ const [locale7] = useLocale();
11434
+ scrollLeftButtonLabel ??= locale7.TabList.scrollLeftButtonLabel;
11435
+ scrollRightButtonLabel ??= locale7.TabList.scrollRightButtonLabel;
10945
11436
  const { variant, showAllTabsWhilePrinting, store } = useTabsContext();
10946
11437
  const { printHidden } = usePrintClassNames();
10947
11438
  const [rootEl, setRootEl] = useState(null);
@@ -11026,7 +11517,18 @@ const TabList = forwardRef(function TabList2({ rootProps, containerProps, classN
11026
11517
  ),
11027
11518
  ref: combinedRootRef,
11028
11519
  children: [
11029
- /* @__PURE__ */ jsx(TabListScrollButton, { side: "left", onClick: () => scrollTabs("left") }),
11520
+ /* @__PURE__ */ jsx(
11521
+ TabListScrollButton,
11522
+ {
11523
+ side: "left",
11524
+ label: scrollLeftButtonLabel,
11525
+ ...scrollLeftButtonProps,
11526
+ onClick: combineEventHandlers(
11527
+ scrollLeftButtonProps?.onClick,
11528
+ () => scrollTabs("left")
11529
+ )
11530
+ }
11531
+ ),
11030
11532
  /* @__PURE__ */ jsx(
11031
11533
  "div",
11032
11534
  {
@@ -11052,16 +11554,34 @@ const TabList = forwardRef(function TabList2({ rootProps, containerProps, classN
11052
11554
  )
11053
11555
  }
11054
11556
  ),
11055
- /* @__PURE__ */ jsx(TabListScrollButton, { side: "right", onClick: () => scrollTabs("right") })
11557
+ /* @__PURE__ */ jsx(
11558
+ TabListScrollButton,
11559
+ {
11560
+ side: "right",
11561
+ label: scrollRightButtonLabel,
11562
+ ...scrollRightButtonProps,
11563
+ onClick: combineEventHandlers(
11564
+ scrollRightButtonProps?.onClick,
11565
+ () => scrollTabs("right")
11566
+ )
11567
+ }
11568
+ )
11056
11569
  ]
11057
11570
  }
11058
11571
  );
11059
11572
  });
11060
- function TabListScrollButton({ side, onClick }) {
11573
+ function TabListScrollButton({
11574
+ side,
11575
+ label,
11576
+ onClick,
11577
+ disabled,
11578
+ className,
11579
+ ...otherProps
11580
+ }) {
11061
11581
  const prefix = usePrefix();
11062
11582
  const { store } = useTabsContext();
11063
11583
  const showScrollButtons = useStore(store, (state) => state.showScrollButtons);
11064
- const disabled = useStore(
11584
+ const shouldDisable = useStore(
11065
11585
  store,
11066
11586
  ({ scrollPosition }) => scrollPosition && (side === "left" ? scrollPosition.left === 0 : scrollPosition.right <= 1)
11067
11587
  );
@@ -11070,15 +11590,16 @@ function TabListScrollButton({ side, onClick }) {
11070
11590
  {
11071
11591
  variant: "ghost",
11072
11592
  icon: side === "left" ? faChevronLeft : faChevronRight,
11073
- label: null,
11593
+ label,
11074
11594
  className: cx(
11075
11595
  prefix("tabs__scroll-button"),
11076
- prefix(`tabs__scroll-button--${side}`)
11596
+ prefix(`tabs__scroll-button--${side}`),
11597
+ className
11077
11598
  ),
11078
- disabled,
11599
+ disabled: shouldDisable || disabled,
11079
11600
  onClick,
11080
11601
  tabIndex: -1,
11081
- "aria-hidden": true
11602
+ ...otherProps
11082
11603
  }
11083
11604
  );
11084
11605
  }
@@ -11178,76 +11699,6 @@ function useMediaBreakpointDown(breakpoint, options) {
11178
11699
  options
11179
11700
  );
11180
11701
  }
11181
- const FORM_CONTROLS = ["INPUT", "TEXTAREA", "SELECT"];
11182
- function registerKeyboardShortcut(keybinds, action, {
11183
- target = window,
11184
- eventType = "keydown",
11185
- sequenceTimeout = 1e3,
11186
- ignore,
11187
- capture = false,
11188
- preventDefault
11189
- } = {}) {
11190
- const ignorableAction = (event) => {
11191
- if (!ignore?.(event)) {
11192
- if (preventDefault) {
11193
- event.preventDefault();
11194
- }
11195
- action(event);
11196
- }
11197
- };
11198
- const keybindsMap = typeof keybinds === "string" ? { [keybinds]: ignorableAction } : keybinds.reduce(
11199
- (keybindsMap2, shortcut) => {
11200
- keybindsMap2[shortcut] = ignorableAction;
11201
- return keybindsMap2;
11202
- },
11203
- {}
11204
- );
11205
- return tinykeys(target, keybindsMap, {
11206
- event: eventType,
11207
- timeout: sequenceTimeout,
11208
- capture
11209
- });
11210
- }
11211
- function useKeyboardShortcut(keybinds, action, {
11212
- enabled = true,
11213
- target = window,
11214
- eventType = "keydown",
11215
- sequenceTimeout = 1e3,
11216
- ignore,
11217
- capture = false,
11218
- preventDefault
11219
- } = {}) {
11220
- const shortcutsString = Array.isArray(keybinds) ? keybinds.join("__") : keybinds;
11221
- const latestCallbacks = useLatestValues({ action, ignore });
11222
- useEffect(() => {
11223
- if (enabled && shortcutsString && target !== null) {
11224
- return registerKeyboardShortcut(
11225
- shortcutsString.split("__"),
11226
- (evt) => latestCallbacks.action(evt),
11227
- {
11228
- target,
11229
- eventType,
11230
- sequenceTimeout,
11231
- ignore: (evt) => latestCallbacks.ignore?.(evt) ?? false,
11232
- capture,
11233
- preventDefault
11234
- }
11235
- );
11236
- }
11237
- }, [
11238
- capture,
11239
- enabled,
11240
- eventType,
11241
- latestCallbacks,
11242
- preventDefault,
11243
- sequenceTimeout,
11244
- shortcutsString,
11245
- target
11246
- ]);
11247
- }
11248
- function ignoreFormControlsKeyboardShortcut(event) {
11249
- return event.target !== null && event.target instanceof HTMLElement && FORM_CONTROLS.includes(event.target.tagName);
11250
- }
11251
11702
  function navigate(url, options) {
11252
11703
  history[options?.replace ? "replaceState" : "pushState"](
11253
11704
  options?.state,
@@ -11429,10 +11880,9 @@ export {
11429
11880
  ControlCode,
11430
11881
  ControlContext,
11431
11882
  DATA_TABLE_SELECTION_COLUMN_WIDTH,
11883
+ DEFAULT_DATE_FORMAT,
11432
11884
  DEFAULT_DOCUMENT_TITLE_BASE_SEPARATOR,
11433
11885
  DEFAULT_DOCUMENT_TITLE_BREADCRUMBS_SEPARATOR,
11434
- DEFAULT_FULL_DATE_FORMAT,
11435
- DEFAULT_SHORT_DATE_FORMAT,
11436
11886
  DEFAULT_TABLE_COLUMN_WIDTH,
11437
11887
  DEFAULT_TABLE_ROW_HEIGHT,
11438
11888
  DataTable,
@@ -11490,6 +11940,7 @@ export {
11490
11940
  IconButton,
11491
11941
  Input,
11492
11942
  InputWithContainerRef,
11943
+ Keybinds,
11493
11944
  Keyboard,
11494
11945
  Label,
11495
11946
  Link,
@@ -11568,8 +12019,10 @@ export {
11568
12019
  locale4 as frFR,
11569
12020
  ignoreFormControlsKeyboardShortcut,
11570
12021
  isNumericStringNegative,
12022
+ keybindsToAriaKeyShortcuts,
11571
12023
  matchAgainstFilter,
11572
12024
  navigate,
12025
+ normalizeKeybinds,
11573
12026
  normalizeNumericString,
11574
12027
  numericStringFloatToInt,
11575
12028
  numericStringIntToFloat,