@alfadocs/ui-kit-debug 1.95.0 → 1.95.1

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 (156) hide show
  1. package/dist/_chunks/{actions-cell-renderer-B1yaOfQM.js → actions-cell-renderer-BVn3vDTg.js} +3 -3
  2. package/dist/_chunks/{actions-cell-renderer-B1yaOfQM.js.map → actions-cell-renderer-BVn3vDTg.js.map} +1 -1
  3. package/dist/_chunks/{anamnesis-summary-rows-DTZ3per6.js → anamnesis-summary-rows-krsCC-F4.js} +4 -4
  4. package/dist/_chunks/{anamnesis-summary-rows-DTZ3per6.js.map → anamnesis-summary-rows-krsCC-F4.js.map} +1 -1
  5. package/dist/_chunks/{appointment-card-Bstc1p7a.js → appointment-card-Csx4544A.js} +2 -2
  6. package/dist/_chunks/{appointment-card-Bstc1p7a.js.map → appointment-card-Csx4544A.js.map} +1 -1
  7. package/dist/_chunks/{appointment-peek-C0kKqnFk.js → appointment-peek-CcDCWb-F.js} +2 -2
  8. package/dist/_chunks/{appointment-peek-C0kKqnFk.js.map → appointment-peek-CcDCWb-F.js.map} +1 -1
  9. package/dist/_chunks/{appointment-timeline-rbt9AwHO.js → appointment-timeline-DW6FN6u8.js} +3 -3
  10. package/dist/_chunks/{appointment-timeline-rbt9AwHO.js.map → appointment-timeline-DW6FN6u8.js.map} +1 -1
  11. package/dist/_chunks/{appointment-tray-6zd8RLIL.js → appointment-tray-CZfXwHWz.js} +2 -2
  12. package/dist/_chunks/{appointment-tray-6zd8RLIL.js.map → appointment-tray-CZfXwHWz.js.map} +1 -1
  13. package/dist/_chunks/{balance-badge-cell-vZxbOFgP.js → balance-badge-cell-DbgEQsou.js} +3 -3
  14. package/dist/_chunks/{balance-badge-cell-vZxbOFgP.js.map → balance-badge-cell-DbgEQsou.js.map} +1 -1
  15. package/dist/_chunks/{button-group-ZVb1Q-w4.js → button-group-CUnNnt8a.js} +2 -2
  16. package/dist/_chunks/{button-group-ZVb1Q-w4.js.map → button-group-CUnNnt8a.js.map} +1 -1
  17. package/dist/_chunks/{calendar-appointment-editor-dialog-WDKc3jMA.js → calendar-appointment-editor-dialog-D3tQ8N34.js} +11 -11
  18. package/dist/_chunks/{calendar-appointment-editor-dialog-WDKc3jMA.js.map → calendar-appointment-editor-dialog-D3tQ8N34.js.map} +1 -1
  19. package/dist/_chunks/{care-plan-card-DD9rEWYN.js → care-plan-card-YWKV8Kjq.js} +2 -2
  20. package/dist/_chunks/{care-plan-card-DD9rEWYN.js.map → care-plan-card-YWKV8Kjq.js.map} +1 -1
  21. package/dist/_chunks/{care-plan-entry-card-4VaY2c96.js → care-plan-entry-card-CApivtMW.js} +2 -2
  22. package/dist/_chunks/{care-plan-entry-card-4VaY2c96.js.map → care-plan-entry-card-CApivtMW.js.map} +1 -1
  23. package/dist/_chunks/{care-plan-header-CXUJQt8Q.js → care-plan-header-BBh0X7EO.js} +2 -2
  24. package/dist/_chunks/{care-plan-header-CXUJQt8Q.js.map → care-plan-header-BBh0X7EO.js.map} +1 -1
  25. package/dist/_chunks/{chart-pMkQN-qy.js → chart-bddVIElM.js} +2 -2
  26. package/dist/_chunks/{chart-pMkQN-qy.js.map → chart-bddVIElM.js.map} +1 -1
  27. package/dist/_chunks/{dashboard-grid-DwJ_HV3d.js → dashboard-grid-DrOkTtya.js} +2 -2
  28. package/dist/_chunks/{dashboard-grid-DwJ_HV3d.js.map → dashboard-grid-DrOkTtya.js.map} +1 -1
  29. package/dist/_chunks/{data-table-C_nnpJ-Q.js → data-table-Bh9_IEj4.js} +3 -3
  30. package/dist/_chunks/{data-table-C_nnpJ-Q.js.map → data-table-Bh9_IEj4.js.map} +1 -1
  31. package/dist/_chunks/{document-preview-ytR1FcWA.js → document-preview-CL1xsnLS.js} +2 -2
  32. package/dist/_chunks/{document-preview-ytR1FcWA.js.map → document-preview-CL1xsnLS.js.map} +1 -1
  33. package/dist/_chunks/{dropdown-menu-D1we7oAY.js → dropdown-menu-CqxBthww.js} +2 -2
  34. package/dist/_chunks/{dropdown-menu-D1we7oAY.js.map → dropdown-menu-CqxBthww.js.map} +1 -1
  35. package/dist/_chunks/{editable-currency-cell-renderer-rWYiF4EI.js → editable-currency-cell-renderer-BQYL5GjP.js} +2 -2
  36. package/dist/_chunks/{editable-currency-cell-renderer-rWYiF4EI.js.map → editable-currency-cell-renderer-BQYL5GjP.js.map} +1 -1
  37. package/dist/_chunks/{face-scheme-BKSE98bo.js → face-scheme-DyHc3zPt.js} +4 -4
  38. package/dist/_chunks/{face-scheme-BKSE98bo.js.map → face-scheme-DyHc3zPt.js.map} +1 -1
  39. package/dist/_chunks/{file-manager-CAIbuaSs.js → file-manager-Cgf2yc10.js} +4 -4
  40. package/dist/_chunks/{file-manager-CAIbuaSs.js.map → file-manager-Cgf2yc10.js.map} +1 -1
  41. package/dist/_chunks/{header-settings-BeA2fnol.js → header-settings-DittkpqU.js} +2 -2
  42. package/dist/_chunks/{header-settings-BeA2fnol.js.map → header-settings-DittkpqU.js.map} +1 -1
  43. package/dist/_chunks/{heatmap-DdF8qTTV.js → heatmap-9Ql8Ny9d.js} +2 -2
  44. package/dist/_chunks/{heatmap-DdF8qTTV.js.map → heatmap-9Ql8Ny9d.js.map} +1 -1
  45. package/dist/_chunks/{icon-button-group-CRKFR48b.js → icon-button-group-mXvYDaba.js} +2 -2
  46. package/dist/_chunks/{icon-button-group-CRKFR48b.js.map → icon-button-group-mXvYDaba.js.map} +1 -1
  47. package/dist/_chunks/{marketplace-app-shell-CJQtx3sv.js → marketplace-app-shell-C8nHixB8.js} +4 -4
  48. package/dist/_chunks/{marketplace-app-shell-CJQtx3sv.js.map → marketplace-app-shell-C8nHixB8.js.map} +1 -1
  49. package/dist/_chunks/{message-tray-Cllf-v0G.js → message-tray-18_TrLCy.js} +2 -2
  50. package/dist/_chunks/{message-tray-Cllf-v0G.js.map → message-tray-18_TrLCy.js.map} +1 -1
  51. package/dist/_chunks/{muscle-scheme-B7qMW0ho.js → muscle-scheme-CznhrQlo.js} +2 -2
  52. package/dist/_chunks/{muscle-scheme-B7qMW0ho.js.map → muscle-scheme-CznhrQlo.js.map} +1 -1
  53. package/dist/_chunks/{notes-panel-ib7I3aNf.js → notes-panel-D6YhNGHU.js} +2 -2
  54. package/dist/_chunks/{notes-panel-ib7I3aNf.js.map → notes-panel-D6YhNGHU.js.map} +1 -1
  55. package/dist/_chunks/{notification-tray-0OkA2duS.js → notification-tray-CQK3lw87.js} +2 -2
  56. package/dist/_chunks/{notification-tray-0OkA2duS.js.map → notification-tray-CQK3lw87.js.map} +1 -1
  57. package/dist/_chunks/{patient-details-DTlpBYHJ.js → patient-details-DQQpgx4A.js} +2 -2
  58. package/dist/_chunks/{patient-details-DTlpBYHJ.js.map → patient-details-DQQpgx4A.js.map} +1 -1
  59. package/dist/_chunks/{patient-field-row-DWTKV1hF.js → patient-field-row-Cb5jUd5Q.js} +2 -2
  60. package/dist/_chunks/{patient-field-row-DWTKV1hF.js.map → patient-field-row-Cb5jUd5Q.js.map} +1 -1
  61. package/dist/_chunks/{patient-search-Ca9j5cWb.js → patient-search-Cp2efqHs.js} +2 -2
  62. package/dist/_chunks/{patient-search-Ca9j5cWb.js.map → patient-search-Cp2efqHs.js.map} +1 -1
  63. package/dist/_chunks/{patient-summary-card-C61AR4Tn.js → patient-summary-card-BvMI0eMu.js} +2 -2
  64. package/dist/_chunks/{patient-summary-card-C61AR4Tn.js.map → patient-summary-card-BvMI0eMu.js.map} +1 -1
  65. package/dist/_chunks/{practice-results-BWX9y6mS.js → practice-results-ZOVlrb43.js} +3 -3
  66. package/dist/_chunks/practice-results-ZOVlrb43.js.map +1 -0
  67. package/dist/_chunks/{product-hub-panel-bHi7lkVD.js → product-hub-panel-CqRJlmb7.js} +2 -2
  68. package/dist/_chunks/{product-hub-panel-bHi7lkVD.js.map → product-hub-panel-CqRJlmb7.js.map} +1 -1
  69. package/dist/_chunks/{public-footer-IoRWoAMz.js → public-footer-BiPiU_lk.js} +2 -2
  70. package/dist/_chunks/{public-footer-IoRWoAMz.js.map → public-footer-BiPiU_lk.js.map} +1 -1
  71. package/dist/_chunks/{rich-text-editor-BfEu57dk.js → rich-text-editor-iw2tJLKA.js} +2 -2
  72. package/dist/_chunks/{rich-text-editor-BfEu57dk.js.map → rich-text-editor-iw2tJLKA.js.map} +1 -1
  73. package/dist/_chunks/{separator-CYU_bGFn.js → separator-Bdc9bqoJ.js} +18 -19
  74. package/dist/_chunks/separator-Bdc9bqoJ.js.map +1 -0
  75. package/dist/_chunks/{signature-request-BVGeF0qB.js → signature-request-CLtMgQKi.js} +3 -3
  76. package/dist/_chunks/{signature-request-BVGeF0qB.js.map → signature-request-CLtMgQKi.js.map} +1 -1
  77. package/dist/_chunks/{signed-out-frame-CgRXOUzi.js → signed-out-frame-CRwVTCjY.js} +2 -2
  78. package/dist/_chunks/{signed-out-frame-CgRXOUzi.js.map → signed-out-frame-CRwVTCjY.js.map} +1 -1
  79. package/dist/_chunks/{tab-bar-BEODTG6k.js → tab-bar-C_pggqVr.js} +2 -2
  80. package/dist/_chunks/{tab-bar-BEODTG6k.js.map → tab-bar-C_pggqVr.js.map} +1 -1
  81. package/dist/_chunks/{tabs-BmxQu-TJ.js → tabs-DYHgRVSJ.js} +2 -2
  82. package/dist/_chunks/{tabs-BmxQu-TJ.js.map → tabs-DYHgRVSJ.js.map} +1 -1
  83. package/dist/_chunks/{task-editor-Cv7xSakv.js → task-editor-BlGdXR9F.js} +2 -2
  84. package/dist/_chunks/{task-editor-Cv7xSakv.js.map → task-editor-BlGdXR9F.js.map} +1 -1
  85. package/dist/_chunks/{tasks-panel-BTCYGLGA.js → tasks-panel-Q0CiEAff.js} +2 -2
  86. package/dist/_chunks/{tasks-panel-BTCYGLGA.js.map → tasks-panel-Q0CiEAff.js.map} +1 -1
  87. package/dist/_chunks/{theme-toggle-DKpzb0-M.js → theme-toggle-jZRbAidE.js} +3 -3
  88. package/dist/_chunks/{theme-toggle-DKpzb0-M.js.map → theme-toggle-jZRbAidE.js.map} +1 -1
  89. package/dist/_chunks/{token-insert-menu-DtAnBd0x.js → token-insert-menu-Dl3x2ekR.js} +2 -2
  90. package/dist/_chunks/{token-insert-menu-DtAnBd0x.js.map → token-insert-menu-Dl3x2ekR.js.map} +1 -1
  91. package/dist/_chunks/{tooth-scheme-COJJkdsi.js → tooth-scheme-Bd7xECuj.js} +2 -2
  92. package/dist/_chunks/{tooth-scheme-COJJkdsi.js.map → tooth-scheme-Bd7xECuj.js.map} +1 -1
  93. package/dist/_chunks/{use-appointment-details-read-B6uhmNdV.js → use-appointment-details-read-CpXRSfPI.js} +5 -5
  94. package/dist/_chunks/{use-appointment-details-read-B6uhmNdV.js.map → use-appointment-details-read-CpXRSfPI.js.map} +1 -1
  95. package/dist/_chunks/{workflow-map-BcfOwsSB.js → workflow-map-BWJhlZbC.js} +2 -2
  96. package/dist/_chunks/{workflow-map-BcfOwsSB.js.map → workflow-map-BWJhlZbC.js.map} +1 -1
  97. package/dist/_chunks/{workflow-status-Dc_CyEz5.js → workflow-status-HQ6ziE46.js} +2 -2
  98. package/dist/_chunks/{workflow-status-Dc_CyEz5.js.map → workflow-status-HQ6ziE46.js.map} +1 -1
  99. package/dist/_chunks/{workflow-webhook-action-B_nBJ_ht.js → workflow-webhook-action-Uhyfr6_6.js} +2 -2
  100. package/dist/_chunks/{workflow-webhook-action-B_nBJ_ht.js.map → workflow-webhook-action-Uhyfr6_6.js.map} +1 -1
  101. package/dist/agent-catalog.json +1 -1
  102. package/dist/components/appointment-card/index.js +2 -2
  103. package/dist/components/appointment-details-panel/index.js +1 -1
  104. package/dist/components/appointment-peek/index.js +1 -1
  105. package/dist/components/appointment-timeline/index.js +1 -1
  106. package/dist/components/button-group/index.js +1 -1
  107. package/dist/components/care-plan-card/index.js +1 -1
  108. package/dist/components/care-plan-entry-card/index.js +1 -1
  109. package/dist/components/care-plan-header/index.js +1 -1
  110. package/dist/components/chart/index.js +1 -1
  111. package/dist/components/dashboard-grid/index.js +1 -1
  112. package/dist/components/data-table/index.js +3 -3
  113. package/dist/components/document-preview/index.js +1 -1
  114. package/dist/components/dropdown-menu/index.js +1 -1
  115. package/dist/components/face-scheme/index.js +1 -1
  116. package/dist/components/file-manager/index.js +1 -1
  117. package/dist/components/header-settings/index.js +1 -1
  118. package/dist/components/heatmap/index.js +1 -1
  119. package/dist/components/icon-button-group/index.js +1 -1
  120. package/dist/components/message-tray/index.js +1 -1
  121. package/dist/components/muscle-scheme/index.js +1 -1
  122. package/dist/components/notes-panel/index.js +1 -1
  123. package/dist/components/notification-tray/index.js +1 -1
  124. package/dist/components/patient-details/index.js +1 -1
  125. package/dist/components/patient-search/index.js +1 -1
  126. package/dist/components/patient-summary-card/index.js +1 -1
  127. package/dist/components/patient-table/index.js +1 -1
  128. package/dist/components/practice-results/index.js +1 -1
  129. package/dist/components/product-hub-tray/index.js +1 -1
  130. package/dist/components/public-footer/index.js +1 -1
  131. package/dist/components/rich-text-editor/index.js +1 -1
  132. package/dist/components/separator/index.js +1 -1
  133. package/dist/components/separator/separator.d.ts.map +1 -1
  134. package/dist/components/skeleton-scheme/index.js +1 -1
  135. package/dist/components/tab-bar/index.js +1 -1
  136. package/dist/components/tabs/index.js +1 -1
  137. package/dist/components/task-editor/index.js +1 -1
  138. package/dist/components/tasks-panel/index.js +1 -1
  139. package/dist/components/theme-toggle/index.js +1 -1
  140. package/dist/components/token-insert-menu/index.js +1 -1
  141. package/dist/components/tooth-scheme/index.js +1 -1
  142. package/dist/components/workflow/index.js +1 -1
  143. package/dist/components/workflow-status/index.js +1 -1
  144. package/dist/core.css +1 -1
  145. package/dist/host-compat.css +4 -1
  146. package/dist/index.js +48 -48
  147. package/dist/patterns/anamnesis/index.js +1 -1
  148. package/dist/patterns/calendar/index.js +1 -1
  149. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  150. package/dist/patterns/signature-request/index.js +1 -1
  151. package/dist/patterns/signed-out-frame/index.js +1 -1
  152. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  153. package/dist/tokens.css +1 -1
  154. package/package.json +1 -1
  155. package/dist/_chunks/practice-results-BWX9y6mS.js.map +0 -1
  156. package/dist/_chunks/separator-CYU_bGFn.js.map +0 -1
@@ -3,7 +3,7 @@ import { forwardRef as Ge, useState as q, useCallback as F, useRef as P, Childre
3
3
  import { c as Me } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Oe } from "react-i18next";
5
5
  import { I as Ie } from "./icon-button-S8_weU3g.js";
6
- import { D as k } from "./dropdown-menu-D1we7oAY.js";
6
+ import { D as k } from "./dropdown-menu-CqxBthww.js";
7
7
  import { u as Ue } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
8
  import { u as $e } from "./use-priority-overflow-Cdmb5EiR.js";
9
9
  import { E as Re } from "./ellipsis-dRo9ouSU.js";
@@ -424,4 +424,4 @@ function De(n) {
424
424
  export {
425
425
  Ee as I
426
426
  };
427
- //# sourceMappingURL=icon-button-group-CRKFR48b.js.map
427
+ //# sourceMappingURL=icon-button-group-mXvYDaba.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button-group-CRKFR48b.js","sources":["../../src/components/icon-button-group/icon-button-group.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Ellipsis } from 'lucide-react';\nimport { IconButton, type IconButtonProps } from '../button/icon-button';\nimport type { ButtonProps } from '../button/button';\nimport { DropdownMenu } from '../dropdown-menu';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { usePriorityOverflow } from '../../hooks/use-priority-overflow';\n\ntype ButtonIntent = NonNullable<ButtonProps['intent']>;\n\n/**\n * A bare boolean `inert` JSX prop is unsafe across this kit's peer range\n * (`^18.2.0 || ^19.0.0`; the devDependency pins React 19.2.0, so neither\n * Storybook nor CI exercises React 18 here). React 18 doesn't recognise\n * `inert` as a boolean HTML attribute and drops a bare `true` silently —\n * which is what the platform (react-dom 18.3.1) hit, leaving these\n * `aria-hidden` measurement/trigger clones focusable and clickable.\n * Passing a non-boolean value like `inert=\"\"` instead makes it WORSE on\n * React 19: it recognises `inert` as boolean and explicitly warns\n * \"Received an empty string for a non-boolean attribute `inert`... will\n * treat the attribute as if it were false\", dropping it there too — see\n * the full comment on `forceInert` in `button-group.tsx` (this is the\n * same component shape, duplicated here for the same reason).\n */\nfunction forceInert<T extends HTMLElement>(node: T | null): void {\n if (node) node.inert = true;\n}\n\n// Intentionally does NOT compose `@radix-ui/react-toggle-group`. Radix\n// ToggleGroup's render shape makes it hard to layer shared-border chrome\n// across children (first-child / last-child / internal-divider CSS), and\n// the three-mode + three-role matrix (group / toolbar / radiogroup × momentary\n// / toggle-single / toggle-multi) is broader than Radix's single / multi\n// contract. The roving-tabindex implementation below mirrors Radix's pattern\n// so keyboard semantics stay consistent. See 05-accessibility.mdx for the\n// WAI-ARIA toolbar / radiogroup references.\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst iconButtonGroupVariants = cva(\n [\n 'ds:inline-flex ds:isolate',\n // Hairline border around the group unifies the children into one\n // visual unit. Internal child dividers are drawn via the per-child\n // class list below.\n 'ds:border ds:border-border',\n 'ds:rounded-[var(--radius-md)]',\n // Ensure the focus ring of a pressed child sits above its siblings.\n 'ds:[&>*]:relative ds:[&>*:focus-visible]:z-10',\n ].join(' '),\n {\n variants: {\n orientation: {\n horizontal: [\n 'ds:flex-row',\n // Flatten internal corners on children so the outer radius owns\n // the rounded edges.\n 'ds:[&>*:not(:first-child)]:rounded-s-none',\n 'ds:[&>*:not(:last-child)]:rounded-e-none',\n // Internal divider — logical so it flips in RTL.\n 'ds:[&>*:not(:first-child)]:border-s',\n 'ds:[&>*:not(:first-child)]:border-border',\n // The children already own an outer border (from IconButton's\n // own border in secondary/outline variants). Collapse the doubled\n // border so we don't get a 2px seam.\n 'ds:[&>*]:border-0',\n ].join(' '),\n vertical: [\n 'ds:flex-col',\n // Vertical groups flow block-wise. Reading direction doesn't\n // invert vertical stacks in any locale this DS targets, so the\n // physical `rounded-t/b` is intentional.\n 'ds:[&>*:not(:first-child)]:rounded-t-none',\n 'ds:[&>*:not(:last-child)]:rounded-b-none',\n 'ds:[&>*:not(:first-child)]:border-t',\n 'ds:[&>*:not(:first-child)]:border-border',\n 'ds:[&>*]:border-0',\n ].join(' '),\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n },\n);\n\n// Hidden measurement rows: laid out (so widths are real) but invisible,\n// non-interactive and out of the a11y tree. Never display:none.\nconst MEASURE_ROW_CLASSES =\n 'ds:absolute ds:start-0 ds:top-0 ds:invisible ds:pointer-events-none';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type IconButtonGroupRole = 'group' | 'toolbar' | 'radiogroup';\nexport type IconButtonGroupMode =\n | 'momentary'\n | 'toggle-single'\n | 'toggle-multi';\n\ntype SharedPropsBase = {\n /** Forwarded to every child that does not set its own `size`. */\n size?: 'sm' | 'md' | 'lg';\n orientation?: 'horizontal' | 'vertical';\n /** Disables every child. Uses `aria-disabled` on children (not the HTML\n * attribute) so each child still takes focus — matches WAI-ARIA toolbar\n * guidance. Visual disabled styling picks up the `aria-disabled:*`\n * variant declared on the Button base class. */\n disabled?: boolean;\n /** Intent applied to every child that does not set its own `intent`.\n * Defaults to `outline` — grouped icon buttons are peers, not a row\n * of solid-primary CTAs. */\n intent?: ButtonIntent;\n /** `'menu'` keeps the strip on one line whatever the container width:\n * children that stop fitting move into a dropdown behind an ellipsis\n * trigger, preserving toggle semantics (radio / checkbox items). The\n * group then fills its container's inline size. Horizontal only.\n * Children set `data-overflow-pin` to always stay in the strip. */\n overflow?: 'none' | 'menu';\n children: ReactNode;\n};\n\n// At least one of `aria-label` / `aria-labelledby` must be present. This\n// discriminated pair makes the TypeScript compiler reject a group with\n// neither — see the a11y acceptance criteria in the user story.\ntype AccessibleNameProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string };\n\ntype SharedProps = SharedPropsBase & AccessibleNameProps;\n\n// Role + mode combinations are not all valid. Encoded via a discriminated\n// union so the compiler rejects nonsensical pairings (e.g. a multi-select\n// radiogroup).\ntype GroupRoleProps =\n | { role?: 'group'; mode?: 'momentary' | 'toggle-single' | 'toggle-multi' }\n | { role: 'toolbar'; mode?: 'momentary' | 'toggle-single' | 'toggle-multi' }\n | { role: 'radiogroup'; mode: 'toggle-single' };\n\ntype MomentaryProps = SharedProps & {\n mode?: 'momentary';\n value?: never;\n defaultValue?: never;\n onValueChange?: never;\n};\n\ntype ToggleSingleProps = SharedProps & {\n mode: 'toggle-single';\n value?: string;\n defaultValue?: string;\n onValueChange?: (next: string) => void;\n};\n\ntype ToggleMultiProps = SharedProps & {\n mode: 'toggle-multi';\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (next: string[]) => void;\n};\n\nexport type IconButtonGroupProps = (\n | MomentaryProps\n | ToggleSingleProps\n | ToggleMultiProps\n) &\n GroupRoleProps &\n Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'onChange' | 'children'> &\n VariantProps<typeof iconButtonGroupVariants>;\n\n/* ------------------------------------------------------------------ */\n/* IconButtonGroup */\n/* ------------------------------------------------------------------ */\n\nexport const IconButtonGroup = forwardRef<HTMLDivElement, IconButtonGroupProps>(\n (props, ref) => {\n const {\n size,\n orientation = 'horizontal',\n role = 'group',\n mode = 'momentary',\n disabled = false,\n intent = 'outline',\n overflow = 'none',\n className,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n // Controlled-value props are consumed via `props as …` below; strip them\n // here so they never spread onto the root <div> (React would warn that\n // `onValueChange` is an unknown DOM event handler).\n value: _value,\n defaultValue: _defaultValue,\n onValueChange: _onValueChange,\n ...rest\n } = props as IconButtonGroupProps & { className?: string };\n const { t } = useTranslation('ui');\n\n if (import.meta.env.DEV && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'IconButtonGroup: `aria-label` or `aria-labelledby` is required for accessibility.',\n );\n }\n if (\n import.meta.env.DEV &&\n overflow === 'menu' &&\n orientation === 'vertical'\n ) {\n console.warn(\n 'IconButtonGroup: overflow=\"menu\" is horizontal-only; falling back to overflow=\"none\".',\n );\n }\n const overflowEnabled = overflow === 'menu' && orientation !== 'vertical';\n\n /* ---- Controlled / uncontrolled value for toggle modes --------- */\n const [internalValue, setInternalValue] = useState<string | string[]>(\n () => {\n if (mode === 'toggle-single') {\n const p = props as ToggleSingleProps;\n return p.defaultValue ?? '';\n }\n if (mode === 'toggle-multi') {\n const p = props as ToggleMultiProps;\n return p.defaultValue ?? [];\n }\n return '';\n },\n );\n\n const resolvedValue: string | string[] = (() => {\n if (mode === 'toggle-single') {\n const p = props as ToggleSingleProps;\n return p.value !== undefined ? p.value : internalValue;\n }\n if (mode === 'toggle-multi') {\n const p = props as ToggleMultiProps;\n return p.value !== undefined ? p.value : internalValue;\n }\n return '';\n })();\n\n const commitValue = useCallback(\n (next: string | string[]) => {\n if (mode === 'toggle-single') {\n const p = props as ToggleSingleProps;\n if (p.value === undefined) setInternalValue(next as string);\n p.onValueChange?.(next as string);\n } else if (mode === 'toggle-multi') {\n const p = props as ToggleMultiProps;\n if (p.value === undefined) setInternalValue(next as string[]);\n p.onValueChange?.(next as string[]);\n }\n },\n [mode, props],\n );\n\n /* ---- Roving tabindex state — only active in toolbar / radiogroup - */\n const rovingTabindex = role === 'toolbar' || role === 'radiogroup';\n const buttonsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const [focusIndex, setFocusIndex] = useState(0);\n\n const registerIndex = useCallback(\n (index: number, el: HTMLButtonElement | null) => {\n buttonsRef.current[index] = el;\n },\n [],\n );\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [isRTL, setIsRTL] = useState(false);\n // `useLayoutEffect` so the direction is correct BEFORE the first paint\n // (otherwise a user pressing an arrow key on the first frame after mount\n // would hit the default-LTR mapping even in an RTL document).\n useIsomorphicLayoutEffect(() => {\n if (typeof window === 'undefined') return;\n const node = rootRef.current;\n if (!node) return;\n // Read the computed direction from the group's own wrapper so a\n // scoped `dir='rtl'` on any ancestor (not just <html>) flips arrow\n // navigation. `getComputedStyle` walks up automatically.\n const dir = window.getComputedStyle(node).direction;\n setIsRTL(dir === 'rtl');\n }, []);\n\n /* ---- Arrow-key navigation for roving tabindex ----------------- */\n const handleRootKeyDown = useCallback(\n (event: ReactKeyboardEvent<HTMLDivElement>) => {\n if (!rovingTabindex) return;\n const count = buttonsRef.current.filter(Boolean).length;\n if (count === 0) return;\n\n const forwardKey =\n orientation === 'vertical'\n ? 'ArrowDown'\n : isRTL\n ? 'ArrowLeft'\n : 'ArrowRight';\n const backwardKey =\n orientation === 'vertical'\n ? 'ArrowUp'\n : isRTL\n ? 'ArrowRight'\n : 'ArrowLeft';\n\n let next: number | null = null;\n if (event.key === forwardKey) next = (focusIndex + 1) % count;\n else if (event.key === backwardKey)\n next = (focusIndex - 1 + count) % count;\n else if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = count - 1;\n\n if (next === null) return;\n // Skip over disabled children.\n const maxAttempts = count;\n let attempts = 0;\n let candidate = next;\n while (attempts < maxAttempts) {\n const el = buttonsRef.current[candidate];\n if (\n el &&\n el.getAttribute('aria-disabled') !== 'true' &&\n !el.disabled\n ) {\n break;\n }\n candidate =\n event.key === backwardKey || event.key === 'End'\n ? (candidate - 1 + count) % count\n : (candidate + 1) % count;\n attempts += 1;\n }\n event.preventDefault();\n setFocusIndex(candidate);\n buttonsRef.current[candidate]?.focus();\n // WAI-ARIA radiogroup pattern: arrow keys MOVE focus AND CHANGE\n // the selected radio in one action. toolbar pattern (and plain\n // group) only moves focus.\n if (role === 'radiogroup' && mode === 'toggle-single') {\n const child = childArrayRef.current[candidate];\n if (child && typeof child === 'object' && 'props' in child) {\n const cValue = (child as ReactElement<{ value?: string }>).props\n .value;\n // Same guard as the click path: re-committing the already\n // selected value is a no-op, so Home/End on the selected radio\n // never fires a spurious onValueChange.\n if (cValue && cValue !== resolvedValue) commitValue(cValue);\n }\n }\n },\n [\n rovingTabindex,\n orientation,\n isRTL,\n focusIndex,\n role,\n mode,\n commitValue,\n resolvedValue,\n ],\n );\n\n /* ---- Overflow bookkeeping (menu mode only) --------------------- */\n type OverflowChildProps = IconButtonProps & {\n value?: string;\n 'data-overflow-pin'?: boolean | 'true' | '';\n };\n const allElements = overflowEnabled\n ? (Children.toArray(children).filter(isValidElement) as Array<\n ReactElement<OverflowChildProps>\n >)\n : [];\n const mirrorLabel = (child: ReactElement<OverflowChildProps>) => {\n const aria = child.props['aria-label'];\n if (typeof aria === 'string') return aria;\n return typeof child.props.tooltip === 'string'\n ? child.props.tooltip\n : null;\n };\n /* A child's own aria-disabled holds in the menu too, and so does\n `loading`: the menu item would otherwise run its click. */\n const childUnavailable = (child: ReactElement<OverflowChildProps>) =>\n child.props.disabled === true ||\n child.props.loading === true ||\n isAriaDisabled(child.props['aria-disabled']);\n const warnedRef = useRef(false);\n const pinnedFlags = allElements.map((child) => {\n const explicit = child.props['data-overflow-pin'] !== undefined;\n const mirrorable = mirrorLabel(child) !== null;\n if (\n import.meta.env.DEV &&\n !explicit &&\n !mirrorable &&\n !warnedRef.current\n ) {\n warnedRef.current = true;\n console.warn(\n 'IconButtonGroup: a child without aria-label / tooltip cannot move into the overflow menu — it stays pinned in the strip.',\n );\n }\n return explicit || !mirrorable;\n });\n\n const { containerRef, fullRowRef, triggerProbeRef, visible, overflowing } =\n usePriorityOverflow({\n enabled: overflowEnabled,\n count: allElements.length,\n pinned: pinnedFlags,\n });\n // `fullRowRef`/`triggerProbeRef` are already stable (`useCallback([])`\n // inside the hook), so wrapping them keeps a stable identity too —\n // required so the ref callback fires once per mount rather than on\n // every render. See `forceInert` above.\n const fullRowInertRef = useCallback(\n (node: HTMLDivElement | null) => {\n forceInert(node);\n fullRowRef(node);\n },\n [fullRowRef],\n );\n const triggerProbeInertRef = useCallback(\n (node: HTMLSpanElement | null) => {\n forceInert(node);\n triggerProbeRef(node);\n },\n [triggerProbeRef],\n );\n\n const triggerNodeRef = useRef<HTMLButtonElement | null>(null);\n\n /* ---- Build enhanced children ---------------------------------- */\n const childArray = overflowEnabled\n ? allElements.filter((_, i) => visible[i])\n : Children.toArray(children);\n if (overflowEnabled) {\n buttonsRef.current.length = childArray.length + (overflowing ? 1 : 0);\n }\n // Mirror into a ref so the keydown handler (referenced from Memo deps)\n // can read the latest child list without inflating the dep array.\n const childArrayRef = useRef<ReturnType<typeof Children.toArray>>([]);\n childArrayRef.current = childArray;\n\n // APG radiogroup pattern: Tab must land on the CHECKED radio, not the\n // first one. Keep the roving tab stop pinned to the selected child —\n // covers initial mount (checked child not first) and controlled value\n // changes. Arrow/click interactions already align focusIndex with the\n // selection, so this effect is a no-op for them.\n const checkedIndex =\n role === 'radiogroup' && mode === 'toggle-single'\n ? childArray.findIndex(\n (child) =>\n isValidElement(child) &&\n (child as ReactElement<{ value?: string }>).props.value ===\n resolvedValue,\n )\n : -1;\n useEffect(() => {\n if (checkedIndex >= 0) setFocusIndex(checkedIndex);\n }, [checkedIndex]);\n\n const visibleCount = childArray.length;\n // Clamp the roving focus when items move into the menu; hand real focus\n // to the trigger only when the focused node was the one that left.\n useEffect(() => {\n if (!rovingTabindex || !overflowEnabled) return;\n const total = visibleCount + (overflowing ? 1 : 0);\n if (total > 0 && focusIndex >= total) {\n setFocusIndex(total - 1);\n if (document.activeElement === document.body) {\n triggerNodeRef.current?.focus();\n }\n }\n }, [\n rovingTabindex,\n overflowEnabled,\n visibleCount,\n overflowing,\n focusIndex,\n ]);\n\n /* The roving tabindex seeds at 0, but an HTML-disabled child takes\n no tabindex at all — if the first children are disabled (a Save\n that is not yet committable, say) Tab could not enter the group\n and its remaining buttons became unreachable. Seed on the first\n child that can actually hold focus; the arrow keys already skip\n disabled children the same way. */\n /* A `loading` child does not count: it stays focusable, so a child\n that starts loading while focused keeps the tab stop. */\n const childIsDisabled = (child: unknown): boolean => {\n if (!isValidElement(child)) return false;\n return (\n (child as ReactElement<{ disabled?: boolean }>).props.disabled === true\n );\n };\n const firstFocusable = childArray.findIndex((c) => !childIsDisabled(c));\n const effectiveFocusIndex = !childIsDisabled(childArray[focusIndex])\n ? focusIndex\n : firstFocusable !== -1\n ? firstFocusable\n : /* Every visible child is disabled: the overflow trigger is the\n only thing left that can hold focus. Without this the group\n has no tab stop at all and the menu is unreachable. */\n overflowing\n ? visibleCount\n : focusIndex;\n\n const enhanced = childArray.map((child, index) => {\n if (!isValidElement(child)) {\n if (import.meta.env.DEV) {\n console.warn(\n 'IconButtonGroup: children should be <IconButton> elements.',\n );\n }\n return child;\n }\n\n const childEl = child as ReactElement<\n IconButtonProps & {\n value?: string;\n asChild?: boolean;\n children?: ReactNode;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n }\n >;\n\n // DEV-time sanity: warn if we got something that isn't an IconButton.\n // `React.cloneElement` would still work, but IconButton-specific\n // props (::before target size, forwarded tooltip) wouldn't apply.\n // `asChild` wrappers (e.g. DropdownMenu.Trigger) are fine when they\n // Slot-merge the cloned props onto their own IconButton child, as are\n // components that declare a static `rendersIconButton` marker (the\n // DataTable toolbar leaves — each renders one IconButton trigger and\n // forwards ref/tabIndex/onFocus to it).\n if (import.meta.env.DEV && childEl.type !== IconButton) {\n const slotChild =\n childEl.props.asChild === true ? childEl.props.children : null;\n const wrapsIconButton =\n isValidElement(slotChild) && slotChild.type === IconButton;\n const rendersIconButton =\n (childEl.type as { rendersIconButton?: boolean })\n .rendersIconButton === true;\n if (!wrapsIconButton && !rendersIconButton) {\n console.warn(\n 'IconButtonGroup: each child should be a DS <IconButton>. Other elements break target-size + focus-ring contracts.',\n );\n }\n }\n\n const childValue = childEl.props.value;\n\n // Compute aria-pressed / aria-checked for toggle modes.\n const { ariaPressed, ariaChecked } = computeToggleAria(\n mode,\n role,\n childValue,\n resolvedValue,\n );\n\n const groupDisabled = disabled === true;\n const childDisabled = childEl.props.disabled === true;\n const childAriaDisabled = isAriaDisabled(childEl.props['aria-disabled']);\n\n // Click handling — wrap so aria-disabled (group-level) blocks\n // activation, then forward to the child's own onClick.\n const wrappedOnClick: React.MouseEventHandler<HTMLButtonElement> = (\n event,\n ) => {\n // aria-disabled is advisory; the native click still fires. Block\n // it explicitly, whether the group or the child set it.\n if (groupDisabled || childAriaDisabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n // Forward to the child's own handler first so consumers can run\n // analytics / preventDefault.\n childEl.props.onClick?.(event);\n if (event.defaultPrevented) return;\n if (!childValue) return;\n if (mode === 'toggle-single') {\n // Contract: exactly one pressed. Clicking the pressed one is a\n // no-op. This matches Radix ToggleGroup type='single' and the\n // radiogroup pattern.\n if (resolvedValue === childValue) return;\n commitValue(childValue);\n } else if (mode === 'toggle-multi') {\n const list = resolvedValue as string[];\n const next = list.includes(childValue)\n ? list.filter((v) => v !== childValue)\n : [...list, childValue];\n commitValue(next);\n }\n };\n\n // cloneElement's typed overload rejects `ref` as a prop, so we\n // build the override bag as `unknown` and cast to the element's\n // prop type. React at runtime routes `ref` via its usual channel.\n const setMergedRef = (node: HTMLButtonElement | null) => {\n registerIndex(index, node);\n const originalRef = (\n childEl as unknown as { ref?: React.Ref<HTMLButtonElement> }\n ).ref;\n if (typeof originalRef === 'function') originalRef(node);\n else if (\n originalRef !== null &&\n originalRef !== undefined &&\n typeof originalRef === 'object'\n ) {\n (\n originalRef as React.MutableRefObject<HTMLButtonElement | null>\n ).current = node;\n }\n };\n\n // Per the user story: group-level disabled injects `aria-disabled`\n // so the child stays focusable; child-level `disabled` still uses\n // the HTML attribute (child's own contract). When both are true\n // we leave the HTML disabled in place (strictest cue wins).\n /* A child's own `aria-disabled` (a busy Save that keeps focus, say)\n survives; the group only adds one. */\n const ariaDisabled =\n groupDisabled && !childDisabled ? true : childEl.props['aria-disabled'];\n\n // If the group is disabled OR we are in a toggle mode, we need the\n // wrapped click handler. In pure momentary mode with no group\n // disable, the child's own onClick is passed through unchanged.\n const needsWrappedClick = mode !== 'momentary' || groupDisabled;\n\n const overrides = {\n intent: childEl.props.intent ?? intent,\n size: childEl.props.size ?? size,\n disabled: childDisabled,\n 'aria-disabled': ariaDisabled,\n onClick: needsWrappedClick ? wrappedOnClick : childEl.props.onClick,\n 'aria-pressed': ariaPressed,\n 'aria-checked': ariaChecked,\n // When the group is a radiogroup, children must be `role=\"radio\"`\n // so screen readers announce them as radio buttons and so\n // `getByRole('radio')` works in tests. The button element is\n // re-purposed as a radio; `aria-checked` above carries the state.\n role: role === 'radiogroup' ? 'radio' : undefined,\n tabIndex: rovingTabindex\n ? index === effectiveFocusIndex\n ? 0\n : -1\n : undefined,\n onFocus: (ev: React.FocusEvent<HTMLButtonElement>) => {\n if (rovingTabindex) setFocusIndex(index);\n childEl.props.onFocus?.(ev);\n },\n ref: setMergedRef,\n } as unknown as Partial<IconButtonProps>;\n\n return cloneElement(childEl, overrides);\n });\n\n const mergedRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref && typeof ref === 'object') {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n };\n\n if (!overflowEnabled) {\n return (\n <div\n ref={mergedRootRef}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-orientation={role === 'toolbar' ? orientation : undefined}\n onKeyDown={handleRootKeyDown}\n className={iconButtonGroupVariants({ orientation, className })}\n data-component=\"icon-button-group\"\n {...rest}\n >\n {enhanced}\n </div>\n );\n }\n\n /* ---- Menu path: measurement rows + strip + ellipsis trigger ---- */\n const moreLabel = t('buttonGroup.more', 'More options');\n const groupDisabled = disabled === true;\n const overflowItems = allElements\n .map((childEl, i) => ({ childEl, i }))\n .filter(({ i }) => !visible[i]);\n\n let menuContent: ReactNode = null;\n if (mode === 'toggle-single') {\n menuContent = (\n <DropdownMenu.RadioGroup\n value={resolvedValue as string}\n onValueChange={(v) => {\n if (!groupDisabled && v !== resolvedValue) commitValue(v);\n }}\n >\n {overflowItems.map(({ childEl, i }) => (\n <DropdownMenu.RadioItem\n key={childEl.key ?? i}\n value={childEl.props.value ?? ''}\n disabled={groupDisabled || childUnavailable(childEl)}\n >\n {mirrorLabel(childEl)}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n );\n } else if (mode === 'toggle-multi') {\n menuContent = overflowItems.map(({ childEl, i }) => {\n const v = childEl.props.value;\n const list = resolvedValue as string[];\n const checked = v ? list.includes(v) : false;\n return (\n <DropdownMenu.CheckboxItem\n key={childEl.key ?? i}\n checked={checked}\n disabled={groupDisabled || childUnavailable(childEl)}\n onCheckedChange={() => {\n if (groupDisabled || !v) return;\n commitValue(checked ? list.filter((x) => x !== v) : [...list, v]);\n }}\n >\n {mirrorLabel(childEl)}\n </DropdownMenu.CheckboxItem>\n );\n });\n } else {\n menuContent = overflowItems.map(({ childEl, i }) => (\n <DropdownMenu.Item\n key={childEl.key ?? i}\n startIcon={childEl.props.icon}\n disabled={groupDisabled || childUnavailable(childEl)}\n onSelect={(event) => {\n childEl.props.onClick?.(\n event as unknown as React.MouseEvent<HTMLButtonElement>,\n );\n }}\n >\n {mirrorLabel(childEl)}\n </DropdownMenu.Item>\n ));\n }\n\n const trigger = overflowing ? (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton\n icon={<Ellipsis />}\n intent={intent}\n size={size}\n aria-label={moreLabel}\n ref={(node: HTMLButtonElement | null) => {\n triggerNodeRef.current = node;\n registerIndex(visibleCount, node);\n }}\n tabIndex={\n rovingTabindex\n ? effectiveFocusIndex === visibleCount\n ? 0\n : -1\n : undefined\n }\n onFocus={\n rovingTabindex ? () => setFocusIndex(visibleCount) : undefined\n }\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">{menuContent}</DropdownMenu.Content>\n </DropdownMenu.Root>\n ) : null;\n\n const stripClasses = iconButtonGroupVariants({ orientation });\n // A radiogroup may own only radios, so its trigger sits beside the strip;\n // toolbar / group keep the trigger inside as the last joined control.\n const triggerInside = role !== 'radiogroup';\n const stripDiv = (\n <div\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-orientation={role === 'toolbar' ? orientation : undefined}\n onKeyDown={triggerInside ? handleRootKeyDown : undefined}\n className={`${stripClasses} ds:max-w-full`}\n >\n {enhanced}\n {triggerInside ? trigger : null}\n </div>\n );\n\n return (\n <div\n ref={mergedRootRef}\n data-component=\"icon-button-group\"\n className={[\n 'ds:relative ds:block ds:w-full ds:min-w-0 ds:overflow-x-clip',\n className ?? '',\n ]\n .join(' ')\n .trim()}\n {...rest}\n >\n <div ref={containerRef} className=\"ds:block ds:w-full ds:min-w-0\">\n <div\n ref={fullRowInertRef}\n aria-hidden=\"true\"\n inert\n className={`${MEASURE_ROW_CLASSES} ${stripClasses}`}\n >\n {allElements.map((childEl, i) =>\n cloneElement(childEl, {\n key: childEl.key ?? i,\n intent: childEl.props.intent ?? intent,\n size: childEl.props.size ?? size,\n tabIndex: -1,\n ref: null,\n } as Partial<OverflowChildProps>),\n )}\n </div>\n <span\n ref={triggerProbeInertRef}\n aria-hidden=\"true\"\n inert\n className={MEASURE_ROW_CLASSES}\n >\n <IconButton\n icon={<Ellipsis />}\n intent={intent}\n size={size}\n aria-label={moreLabel}\n tabIndex={-1}\n />\n </span>\n {triggerInside ? (\n stripDiv\n ) : (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- non-focusable wrapper; arrow-key roving bubbles up from the focusable IconButtons in the strip and the overflow trigger\n <div\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\"\n onKeyDown={handleRootKeyDown}\n >\n {stripDiv}\n {trigger}\n </div>\n )}\n </div>\n </div>\n );\n },\n);\n\nIconButtonGroup.displayName = 'IconButtonGroup';\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction computeToggleAria(\n mode: IconButtonGroupMode,\n role: IconButtonGroupRole,\n childValue: string | undefined,\n resolvedValue: string | string[],\n): { ariaPressed?: boolean; ariaChecked?: boolean } {\n if (mode === 'momentary' || !childValue) return {};\n\n const isActive =\n mode === 'toggle-multi'\n ? (resolvedValue as string[]).includes(childValue)\n : resolvedValue === childValue;\n\n // radiogroup uses aria-checked; toolbar/group use aria-pressed.\n if (role === 'radiogroup') {\n return { ariaChecked: isActive };\n }\n return { ariaPressed: isActive };\n}\n\n/** `aria-disabled` as a child may set it: a boolean or its string form. */\nfunction isAriaDisabled(value: unknown): boolean {\n return value === true || value === 'true';\n}\n"],"names":["forceInert","node","iconButtonGroupVariants","cva","MEASURE_ROW_CLASSES","IconButtonGroup","forwardRef","props","ref","size","orientation","role","mode","disabled","intent","overflow","className","children","ariaLabel","ariaLabelledBy","_value","_defaultValue","_onValueChange","rest","t","useTranslation","overflowEnabled","internalValue","setInternalValue","useState","resolvedValue","p","commitValue","useCallback","next","_a","_b","rovingTabindex","buttonsRef","useRef","focusIndex","setFocusIndex","registerIndex","index","el","rootRef","isRTL","setIsRTL","useIsomorphicLayoutEffect","dir","handleRootKeyDown","event","count","forwardKey","backwardKey","maxAttempts","attempts","candidate","child","childArrayRef","cValue","allElements","Children","isValidElement","mirrorLabel","aria","childUnavailable","isAriaDisabled","pinnedFlags","explicit","mirrorable","containerRef","fullRowRef","triggerProbeRef","visible","overflowing","usePriorityOverflow","fullRowInertRef","triggerProbeInertRef","triggerNodeRef","childArray","_","i","checkedIndex","useEffect","visibleCount","total","childIsDisabled","firstFocusable","c","effectiveFocusIndex","enhanced","childEl","childValue","ariaPressed","ariaChecked","computeToggleAria","groupDisabled","childDisabled","childAriaDisabled","wrappedOnClick","list","v","setMergedRef","originalRef","ariaDisabled","needsWrappedClick","overrides","ev","cloneElement","mergedRootRef","jsx","moreLabel","overflowItems","menuContent","DropdownMenu","checked","x","trigger","jsxs","IconButton","Ellipsis","stripClasses","triggerInside","stripDiv","isActive","value"],"mappings":";;;;;;;;;AAuCA,SAASA,GAAkCC,GAAsB;AAC/D,EAAIA,QAAW,QAAQ;AACzB;AAeA,MAAMC,KAA0BC;AAAA,EAC9B;AAAA,IACE;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,YAAY;AAAA,UACV;AAAA;AAAA;AAAA,UAGA;AAAA,UACA;AAAA;AAAA,UAEA;AAAA,UACA;AAAA;AAAA;AAAA;AAAA,UAIA;AAAA,QAAA,EACA,KAAK,GAAG;AAAA,QACV,UAAU;AAAA,UACR;AAAA;AAAA;AAAA;AAAA,UAIA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,EACA,KAAK,GAAG;AAAA,MAAA;AAAA,IACZ;AAAA,IAEF,iBAAiB;AAAA,MACf,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GAIMC,KACJ,uEAqFWC,KAAkBC;AAAA,EAC7B,CAACC,GAAOC,MAAQ;AACd,UAAM;AAAA,MACJ,MAAAC;AAAA,MACA,aAAAC,IAAc;AAAA,MACd,MAAAC,IAAO;AAAA,MACP,MAAAC,IAAO;AAAA,MACP,UAAAC,IAAW;AAAA,MACX,QAAAC,IAAS;AAAA,MACT,UAAAC,KAAW;AAAA,MACX,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,cAAcC;AAAA,MACd,mBAAmBC;AAAA;AAAA;AAAA;AAAA,MAInB,OAAOC;AAAA,MACP,cAAcC;AAAA,MACd,eAAeC;AAAA,MACf,GAAGC;AAAA,IAAA,IACDhB,GACE,EAAE,GAAAiB,GAAA,IAAMC,GAAe,IAAI,GAgB3BC,IAAkBX,OAAa,UAAUL,MAAgB,YAGzD,CAACiB,IAAeC,EAAgB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AAA,EAGN;AACF;AAEAjH,GAAgB,cAAc;AAM9B,SAAS2F,GACPpF,GACAD,GACAkF,GACA/D,GACkD;AAClD,MAAIlB,MAAS,eAAe,CAACiF,UAAmB,CAAA;AAEhD,QAAMgC,IACJjH,MAAS,iBACJkB,EAA2B,SAAS+D,CAAU,IAC/C/D,MAAkB+D;AAGxB,SAAIlF,MAAS,eACJ,EAAE,aAAakH,EAAA,IAEjB,EAAE,aAAaA,EAAA;AACxB;AAGA,SAAS1D,GAAe2D,GAAyB;AAC/C,SAAOA,MAAU,MAAQA,MAAU;AACrC;"}
1
+ {"version":3,"file":"icon-button-group-mXvYDaba.js","sources":["../../src/components/icon-button-group/icon-button-group.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Ellipsis } from 'lucide-react';\nimport { IconButton, type IconButtonProps } from '../button/icon-button';\nimport type { ButtonProps } from '../button/button';\nimport { DropdownMenu } from '../dropdown-menu';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { usePriorityOverflow } from '../../hooks/use-priority-overflow';\n\ntype ButtonIntent = NonNullable<ButtonProps['intent']>;\n\n/**\n * A bare boolean `inert` JSX prop is unsafe across this kit's peer range\n * (`^18.2.0 || ^19.0.0`; the devDependency pins React 19.2.0, so neither\n * Storybook nor CI exercises React 18 here). React 18 doesn't recognise\n * `inert` as a boolean HTML attribute and drops a bare `true` silently —\n * which is what the platform (react-dom 18.3.1) hit, leaving these\n * `aria-hidden` measurement/trigger clones focusable and clickable.\n * Passing a non-boolean value like `inert=\"\"` instead makes it WORSE on\n * React 19: it recognises `inert` as boolean and explicitly warns\n * \"Received an empty string for a non-boolean attribute `inert`... will\n * treat the attribute as if it were false\", dropping it there too — see\n * the full comment on `forceInert` in `button-group.tsx` (this is the\n * same component shape, duplicated here for the same reason).\n */\nfunction forceInert<T extends HTMLElement>(node: T | null): void {\n if (node) node.inert = true;\n}\n\n// Intentionally does NOT compose `@radix-ui/react-toggle-group`. Radix\n// ToggleGroup's render shape makes it hard to layer shared-border chrome\n// across children (first-child / last-child / internal-divider CSS), and\n// the three-mode + three-role matrix (group / toolbar / radiogroup × momentary\n// / toggle-single / toggle-multi) is broader than Radix's single / multi\n// contract. The roving-tabindex implementation below mirrors Radix's pattern\n// so keyboard semantics stay consistent. See 05-accessibility.mdx for the\n// WAI-ARIA toolbar / radiogroup references.\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst iconButtonGroupVariants = cva(\n [\n 'ds:inline-flex ds:isolate',\n // Hairline border around the group unifies the children into one\n // visual unit. Internal child dividers are drawn via the per-child\n // class list below.\n 'ds:border ds:border-border',\n 'ds:rounded-[var(--radius-md)]',\n // Ensure the focus ring of a pressed child sits above its siblings.\n 'ds:[&>*]:relative ds:[&>*:focus-visible]:z-10',\n ].join(' '),\n {\n variants: {\n orientation: {\n horizontal: [\n 'ds:flex-row',\n // Flatten internal corners on children so the outer radius owns\n // the rounded edges.\n 'ds:[&>*:not(:first-child)]:rounded-s-none',\n 'ds:[&>*:not(:last-child)]:rounded-e-none',\n // Internal divider — logical so it flips in RTL.\n 'ds:[&>*:not(:first-child)]:border-s',\n 'ds:[&>*:not(:first-child)]:border-border',\n // The children already own an outer border (from IconButton's\n // own border in secondary/outline variants). Collapse the doubled\n // border so we don't get a 2px seam.\n 'ds:[&>*]:border-0',\n ].join(' '),\n vertical: [\n 'ds:flex-col',\n // Vertical groups flow block-wise. Reading direction doesn't\n // invert vertical stacks in any locale this DS targets, so the\n // physical `rounded-t/b` is intentional.\n 'ds:[&>*:not(:first-child)]:rounded-t-none',\n 'ds:[&>*:not(:last-child)]:rounded-b-none',\n 'ds:[&>*:not(:first-child)]:border-t',\n 'ds:[&>*:not(:first-child)]:border-border',\n 'ds:[&>*]:border-0',\n ].join(' '),\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n },\n);\n\n// Hidden measurement rows: laid out (so widths are real) but invisible,\n// non-interactive and out of the a11y tree. Never display:none.\nconst MEASURE_ROW_CLASSES =\n 'ds:absolute ds:start-0 ds:top-0 ds:invisible ds:pointer-events-none';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type IconButtonGroupRole = 'group' | 'toolbar' | 'radiogroup';\nexport type IconButtonGroupMode =\n | 'momentary'\n | 'toggle-single'\n | 'toggle-multi';\n\ntype SharedPropsBase = {\n /** Forwarded to every child that does not set its own `size`. */\n size?: 'sm' | 'md' | 'lg';\n orientation?: 'horizontal' | 'vertical';\n /** Disables every child. Uses `aria-disabled` on children (not the HTML\n * attribute) so each child still takes focus — matches WAI-ARIA toolbar\n * guidance. Visual disabled styling picks up the `aria-disabled:*`\n * variant declared on the Button base class. */\n disabled?: boolean;\n /** Intent applied to every child that does not set its own `intent`.\n * Defaults to `outline` — grouped icon buttons are peers, not a row\n * of solid-primary CTAs. */\n intent?: ButtonIntent;\n /** `'menu'` keeps the strip on one line whatever the container width:\n * children that stop fitting move into a dropdown behind an ellipsis\n * trigger, preserving toggle semantics (radio / checkbox items). The\n * group then fills its container's inline size. Horizontal only.\n * Children set `data-overflow-pin` to always stay in the strip. */\n overflow?: 'none' | 'menu';\n children: ReactNode;\n};\n\n// At least one of `aria-label` / `aria-labelledby` must be present. This\n// discriminated pair makes the TypeScript compiler reject a group with\n// neither — see the a11y acceptance criteria in the user story.\ntype AccessibleNameProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string };\n\ntype SharedProps = SharedPropsBase & AccessibleNameProps;\n\n// Role + mode combinations are not all valid. Encoded via a discriminated\n// union so the compiler rejects nonsensical pairings (e.g. a multi-select\n// radiogroup).\ntype GroupRoleProps =\n | { role?: 'group'; mode?: 'momentary' | 'toggle-single' | 'toggle-multi' }\n | { role: 'toolbar'; mode?: 'momentary' | 'toggle-single' | 'toggle-multi' }\n | { role: 'radiogroup'; mode: 'toggle-single' };\n\ntype MomentaryProps = SharedProps & {\n mode?: 'momentary';\n value?: never;\n defaultValue?: never;\n onValueChange?: never;\n};\n\ntype ToggleSingleProps = SharedProps & {\n mode: 'toggle-single';\n value?: string;\n defaultValue?: string;\n onValueChange?: (next: string) => void;\n};\n\ntype ToggleMultiProps = SharedProps & {\n mode: 'toggle-multi';\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (next: string[]) => void;\n};\n\nexport type IconButtonGroupProps = (\n | MomentaryProps\n | ToggleSingleProps\n | ToggleMultiProps\n) &\n GroupRoleProps &\n Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'onChange' | 'children'> &\n VariantProps<typeof iconButtonGroupVariants>;\n\n/* ------------------------------------------------------------------ */\n/* IconButtonGroup */\n/* ------------------------------------------------------------------ */\n\nexport const IconButtonGroup = forwardRef<HTMLDivElement, IconButtonGroupProps>(\n (props, ref) => {\n const {\n size,\n orientation = 'horizontal',\n role = 'group',\n mode = 'momentary',\n disabled = false,\n intent = 'outline',\n overflow = 'none',\n className,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n // Controlled-value props are consumed via `props as …` below; strip them\n // here so they never spread onto the root <div> (React would warn that\n // `onValueChange` is an unknown DOM event handler).\n value: _value,\n defaultValue: _defaultValue,\n onValueChange: _onValueChange,\n ...rest\n } = props as IconButtonGroupProps & { className?: string };\n const { t } = useTranslation('ui');\n\n if (import.meta.env.DEV && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'IconButtonGroup: `aria-label` or `aria-labelledby` is required for accessibility.',\n );\n }\n if (\n import.meta.env.DEV &&\n overflow === 'menu' &&\n orientation === 'vertical'\n ) {\n console.warn(\n 'IconButtonGroup: overflow=\"menu\" is horizontal-only; falling back to overflow=\"none\".',\n );\n }\n const overflowEnabled = overflow === 'menu' && orientation !== 'vertical';\n\n /* ---- Controlled / uncontrolled value for toggle modes --------- */\n const [internalValue, setInternalValue] = useState<string | string[]>(\n () => {\n if (mode === 'toggle-single') {\n const p = props as ToggleSingleProps;\n return p.defaultValue ?? '';\n }\n if (mode === 'toggle-multi') {\n const p = props as ToggleMultiProps;\n return p.defaultValue ?? [];\n }\n return '';\n },\n );\n\n const resolvedValue: string | string[] = (() => {\n if (mode === 'toggle-single') {\n const p = props as ToggleSingleProps;\n return p.value !== undefined ? p.value : internalValue;\n }\n if (mode === 'toggle-multi') {\n const p = props as ToggleMultiProps;\n return p.value !== undefined ? p.value : internalValue;\n }\n return '';\n })();\n\n const commitValue = useCallback(\n (next: string | string[]) => {\n if (mode === 'toggle-single') {\n const p = props as ToggleSingleProps;\n if (p.value === undefined) setInternalValue(next as string);\n p.onValueChange?.(next as string);\n } else if (mode === 'toggle-multi') {\n const p = props as ToggleMultiProps;\n if (p.value === undefined) setInternalValue(next as string[]);\n p.onValueChange?.(next as string[]);\n }\n },\n [mode, props],\n );\n\n /* ---- Roving tabindex state — only active in toolbar / radiogroup - */\n const rovingTabindex = role === 'toolbar' || role === 'radiogroup';\n const buttonsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const [focusIndex, setFocusIndex] = useState(0);\n\n const registerIndex = useCallback(\n (index: number, el: HTMLButtonElement | null) => {\n buttonsRef.current[index] = el;\n },\n [],\n );\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [isRTL, setIsRTL] = useState(false);\n // `useLayoutEffect` so the direction is correct BEFORE the first paint\n // (otherwise a user pressing an arrow key on the first frame after mount\n // would hit the default-LTR mapping even in an RTL document).\n useIsomorphicLayoutEffect(() => {\n if (typeof window === 'undefined') return;\n const node = rootRef.current;\n if (!node) return;\n // Read the computed direction from the group's own wrapper so a\n // scoped `dir='rtl'` on any ancestor (not just <html>) flips arrow\n // navigation. `getComputedStyle` walks up automatically.\n const dir = window.getComputedStyle(node).direction;\n setIsRTL(dir === 'rtl');\n }, []);\n\n /* ---- Arrow-key navigation for roving tabindex ----------------- */\n const handleRootKeyDown = useCallback(\n (event: ReactKeyboardEvent<HTMLDivElement>) => {\n if (!rovingTabindex) return;\n const count = buttonsRef.current.filter(Boolean).length;\n if (count === 0) return;\n\n const forwardKey =\n orientation === 'vertical'\n ? 'ArrowDown'\n : isRTL\n ? 'ArrowLeft'\n : 'ArrowRight';\n const backwardKey =\n orientation === 'vertical'\n ? 'ArrowUp'\n : isRTL\n ? 'ArrowRight'\n : 'ArrowLeft';\n\n let next: number | null = null;\n if (event.key === forwardKey) next = (focusIndex + 1) % count;\n else if (event.key === backwardKey)\n next = (focusIndex - 1 + count) % count;\n else if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = count - 1;\n\n if (next === null) return;\n // Skip over disabled children.\n const maxAttempts = count;\n let attempts = 0;\n let candidate = next;\n while (attempts < maxAttempts) {\n const el = buttonsRef.current[candidate];\n if (\n el &&\n el.getAttribute('aria-disabled') !== 'true' &&\n !el.disabled\n ) {\n break;\n }\n candidate =\n event.key === backwardKey || event.key === 'End'\n ? (candidate - 1 + count) % count\n : (candidate + 1) % count;\n attempts += 1;\n }\n event.preventDefault();\n setFocusIndex(candidate);\n buttonsRef.current[candidate]?.focus();\n // WAI-ARIA radiogroup pattern: arrow keys MOVE focus AND CHANGE\n // the selected radio in one action. toolbar pattern (and plain\n // group) only moves focus.\n if (role === 'radiogroup' && mode === 'toggle-single') {\n const child = childArrayRef.current[candidate];\n if (child && typeof child === 'object' && 'props' in child) {\n const cValue = (child as ReactElement<{ value?: string }>).props\n .value;\n // Same guard as the click path: re-committing the already\n // selected value is a no-op, so Home/End on the selected radio\n // never fires a spurious onValueChange.\n if (cValue && cValue !== resolvedValue) commitValue(cValue);\n }\n }\n },\n [\n rovingTabindex,\n orientation,\n isRTL,\n focusIndex,\n role,\n mode,\n commitValue,\n resolvedValue,\n ],\n );\n\n /* ---- Overflow bookkeeping (menu mode only) --------------------- */\n type OverflowChildProps = IconButtonProps & {\n value?: string;\n 'data-overflow-pin'?: boolean | 'true' | '';\n };\n const allElements = overflowEnabled\n ? (Children.toArray(children).filter(isValidElement) as Array<\n ReactElement<OverflowChildProps>\n >)\n : [];\n const mirrorLabel = (child: ReactElement<OverflowChildProps>) => {\n const aria = child.props['aria-label'];\n if (typeof aria === 'string') return aria;\n return typeof child.props.tooltip === 'string'\n ? child.props.tooltip\n : null;\n };\n /* A child's own aria-disabled holds in the menu too, and so does\n `loading`: the menu item would otherwise run its click. */\n const childUnavailable = (child: ReactElement<OverflowChildProps>) =>\n child.props.disabled === true ||\n child.props.loading === true ||\n isAriaDisabled(child.props['aria-disabled']);\n const warnedRef = useRef(false);\n const pinnedFlags = allElements.map((child) => {\n const explicit = child.props['data-overflow-pin'] !== undefined;\n const mirrorable = mirrorLabel(child) !== null;\n if (\n import.meta.env.DEV &&\n !explicit &&\n !mirrorable &&\n !warnedRef.current\n ) {\n warnedRef.current = true;\n console.warn(\n 'IconButtonGroup: a child without aria-label / tooltip cannot move into the overflow menu — it stays pinned in the strip.',\n );\n }\n return explicit || !mirrorable;\n });\n\n const { containerRef, fullRowRef, triggerProbeRef, visible, overflowing } =\n usePriorityOverflow({\n enabled: overflowEnabled,\n count: allElements.length,\n pinned: pinnedFlags,\n });\n // `fullRowRef`/`triggerProbeRef` are already stable (`useCallback([])`\n // inside the hook), so wrapping them keeps a stable identity too —\n // required so the ref callback fires once per mount rather than on\n // every render. See `forceInert` above.\n const fullRowInertRef = useCallback(\n (node: HTMLDivElement | null) => {\n forceInert(node);\n fullRowRef(node);\n },\n [fullRowRef],\n );\n const triggerProbeInertRef = useCallback(\n (node: HTMLSpanElement | null) => {\n forceInert(node);\n triggerProbeRef(node);\n },\n [triggerProbeRef],\n );\n\n const triggerNodeRef = useRef<HTMLButtonElement | null>(null);\n\n /* ---- Build enhanced children ---------------------------------- */\n const childArray = overflowEnabled\n ? allElements.filter((_, i) => visible[i])\n : Children.toArray(children);\n if (overflowEnabled) {\n buttonsRef.current.length = childArray.length + (overflowing ? 1 : 0);\n }\n // Mirror into a ref so the keydown handler (referenced from Memo deps)\n // can read the latest child list without inflating the dep array.\n const childArrayRef = useRef<ReturnType<typeof Children.toArray>>([]);\n childArrayRef.current = childArray;\n\n // APG radiogroup pattern: Tab must land on the CHECKED radio, not the\n // first one. Keep the roving tab stop pinned to the selected child —\n // covers initial mount (checked child not first) and controlled value\n // changes. Arrow/click interactions already align focusIndex with the\n // selection, so this effect is a no-op for them.\n const checkedIndex =\n role === 'radiogroup' && mode === 'toggle-single'\n ? childArray.findIndex(\n (child) =>\n isValidElement(child) &&\n (child as ReactElement<{ value?: string }>).props.value ===\n resolvedValue,\n )\n : -1;\n useEffect(() => {\n if (checkedIndex >= 0) setFocusIndex(checkedIndex);\n }, [checkedIndex]);\n\n const visibleCount = childArray.length;\n // Clamp the roving focus when items move into the menu; hand real focus\n // to the trigger only when the focused node was the one that left.\n useEffect(() => {\n if (!rovingTabindex || !overflowEnabled) return;\n const total = visibleCount + (overflowing ? 1 : 0);\n if (total > 0 && focusIndex >= total) {\n setFocusIndex(total - 1);\n if (document.activeElement === document.body) {\n triggerNodeRef.current?.focus();\n }\n }\n }, [\n rovingTabindex,\n overflowEnabled,\n visibleCount,\n overflowing,\n focusIndex,\n ]);\n\n /* The roving tabindex seeds at 0, but an HTML-disabled child takes\n no tabindex at all — if the first children are disabled (a Save\n that is not yet committable, say) Tab could not enter the group\n and its remaining buttons became unreachable. Seed on the first\n child that can actually hold focus; the arrow keys already skip\n disabled children the same way. */\n /* A `loading` child does not count: it stays focusable, so a child\n that starts loading while focused keeps the tab stop. */\n const childIsDisabled = (child: unknown): boolean => {\n if (!isValidElement(child)) return false;\n return (\n (child as ReactElement<{ disabled?: boolean }>).props.disabled === true\n );\n };\n const firstFocusable = childArray.findIndex((c) => !childIsDisabled(c));\n const effectiveFocusIndex = !childIsDisabled(childArray[focusIndex])\n ? focusIndex\n : firstFocusable !== -1\n ? firstFocusable\n : /* Every visible child is disabled: the overflow trigger is the\n only thing left that can hold focus. Without this the group\n has no tab stop at all and the menu is unreachable. */\n overflowing\n ? visibleCount\n : focusIndex;\n\n const enhanced = childArray.map((child, index) => {\n if (!isValidElement(child)) {\n if (import.meta.env.DEV) {\n console.warn(\n 'IconButtonGroup: children should be <IconButton> elements.',\n );\n }\n return child;\n }\n\n const childEl = child as ReactElement<\n IconButtonProps & {\n value?: string;\n asChild?: boolean;\n children?: ReactNode;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n }\n >;\n\n // DEV-time sanity: warn if we got something that isn't an IconButton.\n // `React.cloneElement` would still work, but IconButton-specific\n // props (::before target size, forwarded tooltip) wouldn't apply.\n // `asChild` wrappers (e.g. DropdownMenu.Trigger) are fine when they\n // Slot-merge the cloned props onto their own IconButton child, as are\n // components that declare a static `rendersIconButton` marker (the\n // DataTable toolbar leaves — each renders one IconButton trigger and\n // forwards ref/tabIndex/onFocus to it).\n if (import.meta.env.DEV && childEl.type !== IconButton) {\n const slotChild =\n childEl.props.asChild === true ? childEl.props.children : null;\n const wrapsIconButton =\n isValidElement(slotChild) && slotChild.type === IconButton;\n const rendersIconButton =\n (childEl.type as { rendersIconButton?: boolean })\n .rendersIconButton === true;\n if (!wrapsIconButton && !rendersIconButton) {\n console.warn(\n 'IconButtonGroup: each child should be a DS <IconButton>. Other elements break target-size + focus-ring contracts.',\n );\n }\n }\n\n const childValue = childEl.props.value;\n\n // Compute aria-pressed / aria-checked for toggle modes.\n const { ariaPressed, ariaChecked } = computeToggleAria(\n mode,\n role,\n childValue,\n resolvedValue,\n );\n\n const groupDisabled = disabled === true;\n const childDisabled = childEl.props.disabled === true;\n const childAriaDisabled = isAriaDisabled(childEl.props['aria-disabled']);\n\n // Click handling — wrap so aria-disabled (group-level) blocks\n // activation, then forward to the child's own onClick.\n const wrappedOnClick: React.MouseEventHandler<HTMLButtonElement> = (\n event,\n ) => {\n // aria-disabled is advisory; the native click still fires. Block\n // it explicitly, whether the group or the child set it.\n if (groupDisabled || childAriaDisabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n // Forward to the child's own handler first so consumers can run\n // analytics / preventDefault.\n childEl.props.onClick?.(event);\n if (event.defaultPrevented) return;\n if (!childValue) return;\n if (mode === 'toggle-single') {\n // Contract: exactly one pressed. Clicking the pressed one is a\n // no-op. This matches Radix ToggleGroup type='single' and the\n // radiogroup pattern.\n if (resolvedValue === childValue) return;\n commitValue(childValue);\n } else if (mode === 'toggle-multi') {\n const list = resolvedValue as string[];\n const next = list.includes(childValue)\n ? list.filter((v) => v !== childValue)\n : [...list, childValue];\n commitValue(next);\n }\n };\n\n // cloneElement's typed overload rejects `ref` as a prop, so we\n // build the override bag as `unknown` and cast to the element's\n // prop type. React at runtime routes `ref` via its usual channel.\n const setMergedRef = (node: HTMLButtonElement | null) => {\n registerIndex(index, node);\n const originalRef = (\n childEl as unknown as { ref?: React.Ref<HTMLButtonElement> }\n ).ref;\n if (typeof originalRef === 'function') originalRef(node);\n else if (\n originalRef !== null &&\n originalRef !== undefined &&\n typeof originalRef === 'object'\n ) {\n (\n originalRef as React.MutableRefObject<HTMLButtonElement | null>\n ).current = node;\n }\n };\n\n // Per the user story: group-level disabled injects `aria-disabled`\n // so the child stays focusable; child-level `disabled` still uses\n // the HTML attribute (child's own contract). When both are true\n // we leave the HTML disabled in place (strictest cue wins).\n /* A child's own `aria-disabled` (a busy Save that keeps focus, say)\n survives; the group only adds one. */\n const ariaDisabled =\n groupDisabled && !childDisabled ? true : childEl.props['aria-disabled'];\n\n // If the group is disabled OR we are in a toggle mode, we need the\n // wrapped click handler. In pure momentary mode with no group\n // disable, the child's own onClick is passed through unchanged.\n const needsWrappedClick = mode !== 'momentary' || groupDisabled;\n\n const overrides = {\n intent: childEl.props.intent ?? intent,\n size: childEl.props.size ?? size,\n disabled: childDisabled,\n 'aria-disabled': ariaDisabled,\n onClick: needsWrappedClick ? wrappedOnClick : childEl.props.onClick,\n 'aria-pressed': ariaPressed,\n 'aria-checked': ariaChecked,\n // When the group is a radiogroup, children must be `role=\"radio\"`\n // so screen readers announce them as radio buttons and so\n // `getByRole('radio')` works in tests. The button element is\n // re-purposed as a radio; `aria-checked` above carries the state.\n role: role === 'radiogroup' ? 'radio' : undefined,\n tabIndex: rovingTabindex\n ? index === effectiveFocusIndex\n ? 0\n : -1\n : undefined,\n onFocus: (ev: React.FocusEvent<HTMLButtonElement>) => {\n if (rovingTabindex) setFocusIndex(index);\n childEl.props.onFocus?.(ev);\n },\n ref: setMergedRef,\n } as unknown as Partial<IconButtonProps>;\n\n return cloneElement(childEl, overrides);\n });\n\n const mergedRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref && typeof ref === 'object') {\n (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n };\n\n if (!overflowEnabled) {\n return (\n <div\n ref={mergedRootRef}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-orientation={role === 'toolbar' ? orientation : undefined}\n onKeyDown={handleRootKeyDown}\n className={iconButtonGroupVariants({ orientation, className })}\n data-component=\"icon-button-group\"\n {...rest}\n >\n {enhanced}\n </div>\n );\n }\n\n /* ---- Menu path: measurement rows + strip + ellipsis trigger ---- */\n const moreLabel = t('buttonGroup.more', 'More options');\n const groupDisabled = disabled === true;\n const overflowItems = allElements\n .map((childEl, i) => ({ childEl, i }))\n .filter(({ i }) => !visible[i]);\n\n let menuContent: ReactNode = null;\n if (mode === 'toggle-single') {\n menuContent = (\n <DropdownMenu.RadioGroup\n value={resolvedValue as string}\n onValueChange={(v) => {\n if (!groupDisabled && v !== resolvedValue) commitValue(v);\n }}\n >\n {overflowItems.map(({ childEl, i }) => (\n <DropdownMenu.RadioItem\n key={childEl.key ?? i}\n value={childEl.props.value ?? ''}\n disabled={groupDisabled || childUnavailable(childEl)}\n >\n {mirrorLabel(childEl)}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n );\n } else if (mode === 'toggle-multi') {\n menuContent = overflowItems.map(({ childEl, i }) => {\n const v = childEl.props.value;\n const list = resolvedValue as string[];\n const checked = v ? list.includes(v) : false;\n return (\n <DropdownMenu.CheckboxItem\n key={childEl.key ?? i}\n checked={checked}\n disabled={groupDisabled || childUnavailable(childEl)}\n onCheckedChange={() => {\n if (groupDisabled || !v) return;\n commitValue(checked ? list.filter((x) => x !== v) : [...list, v]);\n }}\n >\n {mirrorLabel(childEl)}\n </DropdownMenu.CheckboxItem>\n );\n });\n } else {\n menuContent = overflowItems.map(({ childEl, i }) => (\n <DropdownMenu.Item\n key={childEl.key ?? i}\n startIcon={childEl.props.icon}\n disabled={groupDisabled || childUnavailable(childEl)}\n onSelect={(event) => {\n childEl.props.onClick?.(\n event as unknown as React.MouseEvent<HTMLButtonElement>,\n );\n }}\n >\n {mirrorLabel(childEl)}\n </DropdownMenu.Item>\n ));\n }\n\n const trigger = overflowing ? (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <IconButton\n icon={<Ellipsis />}\n intent={intent}\n size={size}\n aria-label={moreLabel}\n ref={(node: HTMLButtonElement | null) => {\n triggerNodeRef.current = node;\n registerIndex(visibleCount, node);\n }}\n tabIndex={\n rovingTabindex\n ? effectiveFocusIndex === visibleCount\n ? 0\n : -1\n : undefined\n }\n onFocus={\n rovingTabindex ? () => setFocusIndex(visibleCount) : undefined\n }\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">{menuContent}</DropdownMenu.Content>\n </DropdownMenu.Root>\n ) : null;\n\n const stripClasses = iconButtonGroupVariants({ orientation });\n // A radiogroup may own only radios, so its trigger sits beside the strip;\n // toolbar / group keep the trigger inside as the last joined control.\n const triggerInside = role !== 'radiogroup';\n const stripDiv = (\n <div\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-orientation={role === 'toolbar' ? orientation : undefined}\n onKeyDown={triggerInside ? handleRootKeyDown : undefined}\n className={`${stripClasses} ds:max-w-full`}\n >\n {enhanced}\n {triggerInside ? trigger : null}\n </div>\n );\n\n return (\n <div\n ref={mergedRootRef}\n data-component=\"icon-button-group\"\n className={[\n 'ds:relative ds:block ds:w-full ds:min-w-0 ds:overflow-x-clip',\n className ?? '',\n ]\n .join(' ')\n .trim()}\n {...rest}\n >\n <div ref={containerRef} className=\"ds:block ds:w-full ds:min-w-0\">\n <div\n ref={fullRowInertRef}\n aria-hidden=\"true\"\n inert\n className={`${MEASURE_ROW_CLASSES} ${stripClasses}`}\n >\n {allElements.map((childEl, i) =>\n cloneElement(childEl, {\n key: childEl.key ?? i,\n intent: childEl.props.intent ?? intent,\n size: childEl.props.size ?? size,\n tabIndex: -1,\n ref: null,\n } as Partial<OverflowChildProps>),\n )}\n </div>\n <span\n ref={triggerProbeInertRef}\n aria-hidden=\"true\"\n inert\n className={MEASURE_ROW_CLASSES}\n >\n <IconButton\n icon={<Ellipsis />}\n intent={intent}\n size={size}\n aria-label={moreLabel}\n tabIndex={-1}\n />\n </span>\n {triggerInside ? (\n stripDiv\n ) : (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- non-focusable wrapper; arrow-key roving bubbles up from the focusable IconButtons in the strip and the overflow trigger\n <div\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\"\n onKeyDown={handleRootKeyDown}\n >\n {stripDiv}\n {trigger}\n </div>\n )}\n </div>\n </div>\n );\n },\n);\n\nIconButtonGroup.displayName = 'IconButtonGroup';\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction computeToggleAria(\n mode: IconButtonGroupMode,\n role: IconButtonGroupRole,\n childValue: string | undefined,\n resolvedValue: string | string[],\n): { ariaPressed?: boolean; ariaChecked?: boolean } {\n if (mode === 'momentary' || !childValue) return {};\n\n const isActive =\n mode === 'toggle-multi'\n ? (resolvedValue as string[]).includes(childValue)\n : resolvedValue === childValue;\n\n // radiogroup uses aria-checked; toolbar/group use aria-pressed.\n if (role === 'radiogroup') {\n return { ariaChecked: isActive };\n }\n return { ariaPressed: isActive };\n}\n\n/** `aria-disabled` as a child may set it: a boolean or its string form. */\nfunction isAriaDisabled(value: unknown): boolean {\n return value === true || value === 'true';\n}\n"],"names":["forceInert","node","iconButtonGroupVariants","cva","MEASURE_ROW_CLASSES","IconButtonGroup","forwardRef","props","ref","size","orientation","role","mode","disabled","intent","overflow","className","children","ariaLabel","ariaLabelledBy","_value","_defaultValue","_onValueChange","rest","t","useTranslation","overflowEnabled","internalValue","setInternalValue","useState","resolvedValue","p","commitValue","useCallback","next","_a","_b","rovingTabindex","buttonsRef","useRef","focusIndex","setFocusIndex","registerIndex","index","el","rootRef","isRTL","setIsRTL","useIsomorphicLayoutEffect","dir","handleRootKeyDown","event","count","forwardKey","backwardKey","maxAttempts","attempts","candidate","child","childArrayRef","cValue","allElements","Children","isValidElement","mirrorLabel","aria","childUnavailable","isAriaDisabled","pinnedFlags","explicit","mirrorable","containerRef","fullRowRef","triggerProbeRef","visible","overflowing","usePriorityOverflow","fullRowInertRef","triggerProbeInertRef","triggerNodeRef","childArray","_","i","checkedIndex","useEffect","visibleCount","total","childIsDisabled","firstFocusable","c","effectiveFocusIndex","enhanced","childEl","childValue","ariaPressed","ariaChecked","computeToggleAria","groupDisabled","childDisabled","childAriaDisabled","wrappedOnClick","list","v","setMergedRef","originalRef","ariaDisabled","needsWrappedClick","overrides","ev","cloneElement","mergedRootRef","jsx","moreLabel","overflowItems","menuContent","DropdownMenu","checked","x","trigger","jsxs","IconButton","Ellipsis","stripClasses","triggerInside","stripDiv","isActive","value"],"mappings":";;;;;;;;;AAuCA,SAASA,GAAkCC,GAAsB;AAC/D,EAAIA,QAAW,QAAQ;AACzB;AAeA,MAAMC,KAA0BC;AAAA,EAC9B;AAAA,IACE;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,EAAA,EACA,KAAK,GAAG;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AAA;AACxB;AAGA,SAAS1D,GAAe2D,GAAyB;AAC/C,SAAOA,MAAU,MAAQA,MAAU;AACrC;"}
@@ -6,10 +6,10 @@ import { A as q } from "./app-frame-DUPEwu4E.js";
6
6
  import { A as F } from "./avatar-a6042Ox2.js";
7
7
  import { A as be } from "./alert-9kEwDza3.js";
8
8
  import { C as U } from "./card-BA4Ig_kn.js";
9
- import { D as u } from "./dropdown-menu-D1we7oAY.js";
10
- import { T as ke } from "./tab-bar-BEODTG6k.js";
9
+ import { D as u } from "./dropdown-menu-CqxBthww.js";
10
+ import { T as ke } from "./tab-bar-C_pggqVr.js";
11
11
  import { a as Y, H as we, g as Ne, f as G, e as ye, c as Se, d as Ce } from "./header-l_B8MV0g.js";
12
- import { H as Ae } from "./header-settings-BeA2fnol.js";
12
+ import { H as Ae } from "./header-settings-DittkpqU.js";
13
13
  import { S as Te } from "./sign-in-with-alfadocs-button-DzrNgbWv.js";
14
14
  import { S as Ee, a as ee, v as ze, h as Ie, c as Me, r as Le, b as He, l as Ve, m as Be, k as Re, j as J } from "./sidebar-BS24EnYd.js";
15
15
  import { N as De } from "./navigation-dismiss-B1mcW1CT.js";
@@ -656,4 +656,4 @@ export {
656
656
  na as M,
657
657
  y as P
658
658
  };
659
- //# sourceMappingURL=marketplace-app-shell-CJQtx3sv.js.map
659
+ //# sourceMappingURL=marketplace-app-shell-C8nHixB8.js.map