@nxgt/material 3.65.0 → 3.67.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 (118) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +6 -2
  3. package/dist/{alert-dialog-C0nGUSCP.js → alert-dialog-BgQDxcYh.js} +1 -1
  4. package/dist/{async-slice-CyansBvD.js → async-slice-BCZyWgGr.js} +48 -25
  5. package/dist/{background-qdnet2A5.js → background-D1gC4m2R.js} +1 -1
  6. package/dist/backgrounds.js +1 -1
  7. package/dist/{button-D5k3K-gM.js → button-2de_lrix.js} +1 -1
  8. package/dist/charts.js +3 -3
  9. package/dist/{chip-lWXIJkqo.js → chip-Cs0uEjpu.js} +2 -2
  10. package/dist/{code-editor-aXG4CdY-.js → code-editor-BYhBAfcc.js} +5 -5
  11. package/dist/code-editor.js +5 -5
  12. package/dist/{code-language-items-CsaXyApg.js → code-language-items-xhmbF6wA.js} +2 -2
  13. package/dist/components/components.css +2 -0
  14. package/dist/components/ui/layout/app-shell/activity-backdrop.css +4 -3
  15. package/dist/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
  16. package/dist/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
  17. package/dist/components/ui/primitives/toggle-group/toggle-group.css +5 -1
  18. package/dist/{components-DNcTvjlv.js → components-BRWaX4Xk.js} +17477 -17205
  19. package/dist/components.js +28 -28
  20. package/dist/{compose-refs-DZ0iIVF-.js → compose-refs-G4J4kaUA.js} +1 -1
  21. package/dist/{dialog-DWNaxpa-.js → dialog-Co5oksU1.js} +4 -4
  22. package/dist/dnd.js +2 -2
  23. package/dist/{dropdown-menu-ChvAIQIW.js → dropdown-menu-DdzyvN76.js} +1 -1
  24. package/dist/editor.js +365 -365
  25. package/dist/{empty-state-CFLcVzKL.js → empty-state-CQ0CV0kA.js} +2 -2
  26. package/dist/{field-blur-CV9orzdJ.js → field-blur-B2y-bNYi.js} +1 -1
  27. package/dist/{field-blur-context-C8BX8IBy.js → field-blur-context-BZtwcPUV.js} +1 -1
  28. package/dist/{hooks-DilW-3jc.js → hooks-DjuYsY-j.js} +2 -2
  29. package/dist/hooks.js +2 -2
  30. package/dist/{hover-card-IeS_1RPH.js → hover-card-BeBVy6tB.js} +1 -1
  31. package/dist/i18n.js +3 -3
  32. package/dist/{icon-badge-Bf4SoA2i.js → icon-badge-DbYsbzwZ.js} +3 -3
  33. package/dist/{icon-button-l3dQTRrC.js → icon-button-Co6ttdv1.js} +1 -1
  34. package/dist/lib/components/ui/actions/back-link/back-link.d.ts +10 -0
  35. package/dist/lib/components/ui/actions/back-link/index.d.ts +1 -0
  36. package/dist/lib/components/ui/actions/index.d.ts +2 -0
  37. package/dist/lib/components/ui/actions/link/link.d.ts +1 -19
  38. package/dist/lib/components/ui/actions/share-button/index.d.ts +3 -0
  39. package/dist/lib/components/ui/actions/share-button/share-button.d.ts +17 -0
  40. package/dist/lib/components/ui/actions/share-button/share-or-copy.d.ts +17 -0
  41. package/dist/lib/components/ui/collections/dnd/index.d.ts +1 -1
  42. package/dist/lib/components/ui/collections/row-menu/index.d.ts +1 -0
  43. package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +6 -1
  44. package/dist/lib/components/ui/collections/row-menu/use-row-menu-focus.d.ts +30 -0
  45. package/dist/lib/components/ui/display/enrolment-card/use-enrolment-card-labels.d.ts +1 -1
  46. package/dist/lib/components/ui/display/recovery-codes/use-recovery-codes-labels.d.ts +1 -1
  47. package/dist/lib/components/ui/display/recovery-codes-status/use-recovery-codes-status-labels.d.ts +1 -1
  48. package/dist/lib/components/ui/display/stat-card/partials/stat-card-link-parts.d.ts +7 -0
  49. package/dist/lib/components/ui/display/stat-card/stat-card.d.ts +6 -1
  50. package/dist/lib/components/ui/display/stat-card/types.d.ts +14 -0
  51. package/dist/lib/components/ui/feedback/step-up-dialog/use-step-up-labels.d.ts +1 -1
  52. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  53. package/dist/lib/components/ui/fields/number-field/number-control.d.ts +4 -1
  54. package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +5 -0
  55. package/dist/lib/components/ui/fields/verification-code/use-verification-labels.d.ts +1 -1
  56. package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
  57. package/dist/lib/components/ui/media/media-player-host/use-host-engine.d.ts +1 -1
  58. package/dist/lib/components/ui/primitives/link/link-component-provider.d.ts +1 -1
  59. package/dist/lib/components/ui/primitives/link/nav-current.d.ts +22 -0
  60. package/dist/lib/components/ui/primitives/link/router-link.d.ts +25 -0
  61. package/dist/lib/components/ui/primitives/tabs/index.d.ts +2 -0
  62. package/dist/lib/components/ui/primitives/tabs/internal.d.ts +2 -0
  63. package/dist/lib/components/ui/primitives/tabs/partials/tabs-nav-link.d.ts +22 -0
  64. package/dist/lib/components/ui/primitives/tabs/tab-param-url.d.ts +53 -0
  65. package/dist/lib/components/ui/primitives/tabs/tabs-nav.d.ts +22 -0
  66. package/dist/lib/components/ui/primitives/tabs/tabs-selectors.d.ts +8 -0
  67. package/dist/lib/components/ui/primitives/tabs/use-tab-param.d.ts +35 -0
  68. package/dist/lib/components/ui/primitives/tabs/use-tabs-overflow.d.ts +4 -1
  69. package/dist/lib/components/ui/primitives/toggle-group/index.d.ts +1 -0
  70. package/dist/lib/components/ui/primitives/toggle-group/segmented-nav-item.d.ts +20 -0
  71. package/dist/lib/components/ui/primitives/toggle-group/segmented-nav.d.ts +22 -0
  72. package/dist/lib/components/ui/primitives/toggle-group/toggle-group.d.ts +4 -3
  73. package/dist/lib/i18n/resources/en/en.d.ts +5 -0
  74. package/dist/lib/i18n/resources/en/material.json.d.ts +6 -1
  75. package/dist/lib/i18n/resources/fr/fr.d.ts +5 -0
  76. package/dist/lib/i18n/resources/fr/material.json.d.ts +6 -1
  77. package/dist/lib/i18n/resources/resources.d.ts +10 -0
  78. package/dist/lib/i18n/translator.d.ts +1 -1
  79. package/dist/lib.js +31 -54
  80. package/dist/main.js +42 -42
  81. package/dist/map.js +8 -8
  82. package/dist/material.css +1 -1
  83. package/dist/pdf-reader.js +1 -1
  84. package/dist/print.js +1 -1
  85. package/dist/{public-B-greXGt.js → public-AXwv1h3v.js} +10 -10
  86. package/dist/{rich-code-block-Cv6s59vB.js → rich-code-block-qSvkA5rI.js} +5 -5
  87. package/dist/{sortable-provider-DVmZcglU.js → sortable-provider-DPk-RVEU.js} +3 -3
  88. package/dist/{spinner-OQAweH2r.js → spinner-PdSk7zEs.js} +1 -1
  89. package/dist/theme-picker.js +2 -2
  90. package/dist/{theme-toggle-DPx44p6a.js → theme-toggle-CZQckLDd.js} +2 -2
  91. package/dist/{toggle-group-BkH23Jk4.js → toggle-group-DXXlqid2.js} +1 -1
  92. package/dist/{toolbar-items-CQ3S_XZw.js → toolbar-items-BmNYNaRB.js} +3 -3
  93. package/dist/{translate-material-BHL4g2UB.js → translate-material-BlCQ6AW9.js} +1 -1
  94. package/dist/{translator-BJsjXcAp.js → translator-ChpeKCO3.js} +8 -2
  95. package/dist/{typography-CwhEwPay.js → typography-C4JSRr2B.js} +1 -1
  96. package/dist/{use-chat-composer-R0vng5RU.js → use-chat-composer-OUa9akfM.js} +1725 -1719
  97. package/dist/{use-heading-spy-Brcn0l_J.js → use-heading-spy-K-HUp4o_.js} +4 -4
  98. package/dist/{use-material-translation-mY3U83TV.js → use-material-translation-DkE9J5NE.js} +1 -1
  99. package/dist/{use-return-focus-BQ413TNG.js → use-return-focus-KypnR7vv.js} +1 -1
  100. package/docs/components/README.md +3 -1
  101. package/docs/components/buttons-and-actions.md +50 -0
  102. package/docs/components/data-display.md +14 -1
  103. package/docs/components/data-table-filter-and-lists.md +68 -4
  104. package/docs/components/form-fields.md +9 -1
  105. package/docs/components/primitives.md +209 -0
  106. package/docs/previews/buttons-actions-backlink.webp +0 -0
  107. package/docs/previews/buttons-actions-sharebutton.webp +0 -0
  108. package/docs/previews/primitives-segmentednav.webp +0 -0
  109. package/docs/previews/primitives-tabsnav.webp +0 -0
  110. package/docs/roadmap.md +2 -1
  111. package/docs/troubleshooting.md +42 -3
  112. package/lib/components/components.css +2 -0
  113. package/lib/components/ui/layout/app-shell/activity-backdrop.css +4 -3
  114. package/lib/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
  115. package/lib/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
  116. package/lib/components/ui/primitives/toggle-group/toggle-group.css +5 -1
  117. package/package.json +1 -1
  118. /package/dist/lib/{components/ui/collections/dnd → lib}/compose-refs.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { t } from "./use-material-translation-mY3U83TV.js";
3
- import { t as n } from "./typography-CwhEwPay.js";
2
+ import { t } from "./use-material-translation-DkE9J5NE.js";
3
+ import { t as n } from "./typography-C4JSRr2B.js";
4
4
  import { a as r, c as i, i as a, n as o, o as s, r as c, t as l, u } from "./state-scenes-BX03WmSu.js";
5
5
  import { Suspense as d } from "react";
6
6
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./field-blur-context-C8BX8IBy.js";
1
+ import { t as e } from "./field-blur-context-BZtwcPUV.js";
2
2
  import { t } from "./useEvent-2fKq-6w8.js";
3
3
  import n, { useCallback as r, useEffect as i, useRef as a } from "react";
4
4
  import { jsx as o } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { l as t } from "./dist-lmHmz_bu.js";
3
- import { t as n } from "./typography-CwhEwPay.js";
3
+ import { t as n } from "./typography-C4JSRr2B.js";
4
4
  import * as r from "react";
5
5
  import { createContext as i, use as a, useMemo as o } from "react";
6
6
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { i as e } from "./translate-material-BHL4g2UB.js";
1
+ import { i as e } from "./translate-material-BlCQ6AW9.js";
2
2
  import { t } from "./number.utils-BG_eEt5g.js";
3
- import { n } from "./use-heading-spy-Brcn0l_J.js";
3
+ import { n } from "./use-heading-spy-K-HUp4o_.js";
4
4
  import { useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
5
5
  import { jsx as c } from "react/jsx-runtime";
6
6
  import { useBlocker as l, useNavigate as u, useSearchParams as d } from "react-router";
package/dist/hooks.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as e, i as t, o as n, r, s as i } from "./theme-store-BdPp43cV.js";
2
2
  import { n as a, t as o } from "./use-theme-BCLireTd.js";
3
- import { a as s, c, d as l, o as u, r as d, s as f, t as p } from "./use-heading-spy-Brcn0l_J.js";
3
+ import { a as s, c, d as l, o as u, r as d, s as f, t as p } from "./use-heading-spy-K-HUp4o_.js";
4
4
  import { r as m } from "./use-csp-nonce-ZKs9k-ov.js";
5
5
  import { t as h } from "./use-mobile-BDro060N.js";
6
6
  import { t as g } from "./use-scroll-away-PQRFZkT2.js";
7
- import { a as _, c as v, d as y, f as b, g as x, h as S, i as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M } from "./hooks-DilW-3jc.js";
7
+ import { a as _, c as v, d as y, f as b, g as x, h as S, i as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M } from "./hooks-DjuYsY-j.js";
8
8
  export { r as DEFAULT_THEME, t as applyResolvedTheme, e as applyThemeName, _ as buildOptions, s as busySettler, b as clearDrafts, u as createSubmitGuard, D as extractNode, S as isLeaving, n as resolveTheme, i as resolveThemeName, x as shouldBlockNavigation, T as useAllowedTransitions, d as useCountdown, m as useCspNonce, E as useDiscardGuard, O as useDrafts, c as useFocusOnMount, y as useFormatters, p as useHeadingSpy, a as useIsClient, h as useIsMobile, l as useLocalizedDate, w as useNavigationHandler, M as useNavigationHandlers, v as useNumberFormatter, A as useOptions, C as useReactRouterBlock, g as useScrollAway, k as useSearchParam, f as useSubmitOnce, o as useTheme, j as useUnsavedGuard };
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { o as t } from "./dist-DVRQkaTK.js";
3
3
  import { a as n, c as r, i, l as a, s as o } from "./dist-lmHmz_bu.js";
4
- import { C as s, S as c, f as l, m as u, p as d, u as f } from "./spinner-OQAweH2r.js";
4
+ import { C as s, S as c, f as l, m as u, p as d, u as f } from "./spinner-PdSk7zEs.js";
5
5
  import { t as p } from "./in-dialog-Vwkyp-M5.js";
6
6
  import { i as m } from "./escape-owner-DpaP0lm1.js";
7
7
  import * as h from "react";
package/dist/i18n.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./is-production-GLw59WU8.js";
2
- import { c as t, d as n, i as r, l as i, n as a, o, r as s, t as c, u as l } from "./translator-BJsjXcAp.js";
3
- import { i as u, n as d, r as f, t as p } from "./translate-material-BHL4g2UB.js";
2
+ import { c as t, d as n, i as r, l as i, n as a, o, r as s, t as c, u as l } from "./translator-ChpeKCO3.js";
3
+ import { i as u, n as d, r as f, t as p } from "./translate-material-BlCQ6AW9.js";
4
4
  import { o as m, t as h } from "./merge-BCZE6HGq.js";
5
- import { t as g } from "./use-material-translation-mY3U83TV.js";
5
+ import { t as g } from "./use-material-translation-DkE9J5NE.js";
6
6
  import { useCallback as _ } from "react";
7
7
  //#region lib/i18n/merge-resources.ts
8
8
  function v(e, t, n = "") {
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { a as t, i as n, n as r } from "./field-blur-context-C8BX8IBy.js";
3
- import { t as i } from "./icon-button-l3dQTRrC.js";
4
- import { f as a } from "./dialog-DWNaxpa-.js";
2
+ import { a as t, i as n, n as r } from "./field-blur-context-BZtwcPUV.js";
3
+ import { t as i } from "./icon-button-Co6ttdv1.js";
4
+ import { f as a } from "./dialog-Co5oksU1.js";
5
5
  import { isValidElement as o, useId as s } from "react";
6
6
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
7
  import { describedBy as u } from "@nxgt/material-core/described-by";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { n as t } from "./use-shape-morph-BKA_R5P5.js";
3
3
  import { n, t as r } from "./dist-DVRQkaTK.js";
4
- import { n as i, r as a, t as o } from "./spinner-OQAweH2r.js";
4
+ import { n as i, r as a, t as o } from "./spinner-PdSk7zEs.js";
5
5
  import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./use-click-lock-BZYtTmVt.js";
6
6
  import { t as m } from "./is-production-GLw59WU8.js";
7
7
  import { t as h } from "./button-group-context-CaP0X5p_.js";
@@ -0,0 +1,10 @@
1
+ import { ComponentProps } from 'react';
2
+ import { LinkButton } from '../link/link.js';
3
+ export type BackLinkProps = ComponentProps<typeof LinkButton>;
4
+ /**
5
+ * A link to the parent page: a ghost `LinkButton` with a leading arrow. The
6
+ * label names the destination and is the link's accessible name (the arrow is
7
+ * hidden from assistive tech); the arrow mirrors in right-to-left. It takes
8
+ * every `LinkButton` prop, `variant`, `color`, `size` and `linkComponent` included.
9
+ */
10
+ export declare function BackLink({ variant, className, children, ...props }: BackLinkProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './back-link.js';
@@ -1,4 +1,5 @@
1
1
  export * from './action-card/index.js';
2
+ export * from './back-link/index.js';
2
3
  export * from './button/index.js';
3
4
  export * from './button-group/index.js';
4
5
  export * from './copy-button/index.js';
@@ -12,6 +13,7 @@ export * from './load-more-footer/index.js';
12
13
  export * from './responsive-button/index.js';
13
14
  export * from './scroll-to-latest-button/index.js';
14
15
  export * from './scroll-to-top/index.js';
16
+ export * from './share-button/index.js';
15
17
  export * from './split-button/index.js';
16
18
  export * from './theme-toggle/index.js';
17
19
  export * from './toolbar/index.js';
@@ -1,25 +1,7 @@
1
- import { LinkProps } from 'react-router';
2
- import { LinkComponent } from '../../primitives/link/link-component.js';
1
+ import { RouterLinkProps } from '../../primitives/link/router-link.js';
3
2
  import { ButtonProps } from '../button/button.js';
4
3
  import { IconButtonProps } from '../icon-button/icon-button.js';
5
4
  import { ResponsiveButtonProps } from '../responsive-button/responsive-button.js';
6
- type RouterLinkProps = Pick<LinkProps, 'to' | 'replace' | 'state' | 'target' | 'reloadDocument' | 'preventScrollReset'> & {
7
- /**
8
- * @deprecated Use ActivityLayout's route transition (React's
9
- * `<ViewTransition>`); removed after React Router v9.
10
- */
11
- viewTransition?: LinkProps['viewTransition'];
12
- /** Saves the target instead of opening it: `true`, or the file name. */
13
- download?: boolean | string;
14
- /**
15
- * Renders the link with this component instead of React Router's `Link`;
16
- * it wins over `LinkComponentProvider`. It receives `to` as `href`, with
17
- * `target`, `download` and the button's classes; `replace`, `state`,
18
- * `reloadDocument` and `preventScrollReset` are router-only and not passed.
19
- */
20
- linkComponent?: LinkComponent;
21
- };
22
5
  export declare function LinkButton({ variant, className, children, ...props }: Omit<ButtonProps, 'asChild'> & RouterLinkProps): import("react").JSX.Element;
23
6
  export declare function IconLinkButton({ variant, children, ...props }: Omit<IconButtonProps, 'asChild'> & RouterLinkProps): import("react").JSX.Element;
24
7
  export declare function ResponsiveLinkButton({ variant, children, ...props }: Omit<ResponsiveButtonProps, 'asChild'> & RouterLinkProps): import("react").JSX.Element;
25
- export {};
@@ -0,0 +1,3 @@
1
+ export type { ShareButtonProps } from './share-button.js';
2
+ export { SHARE_BUTTON_LABEL, ShareButton } from './share-button.js';
3
+ export type { ShareData, ShareOutcome } from './share-or-copy.js';
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconButtonProps } from '../icon-button/icon-button.js';
3
+ import { ShareData, ShareOutcome } from './share-or-copy.js';
4
+ /** The button's accessible name when no `label` is given (English fallback). */
5
+ export declare const SHARE_BUTTON_LABEL = "Share";
6
+ export type ShareButtonProps = Omit<IconButtonProps, 'onClick' | 'children' | 'tooltip' | 'title'> & ShareData & {
7
+ /** The button's accessible name; it never changes after a click. */
8
+ label?: string;
9
+ /** Announced (not a new name) once the link is on the clipboard. */
10
+ copiedLabel?: string;
11
+ /** Announced when the clipboard refused the text. */
12
+ failedLabel?: string;
13
+ icon?: ReactNode;
14
+ /** Called with the outcome once the share or the copy is over. */
15
+ onShare?: (outcome: ShareOutcome) => void;
16
+ };
17
+ export declare function ShareButton({ title, text, url, label, copiedLabel, failedLabel, icon, onShare, variant, color, ...props }: ShareButtonProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { CopyResult } from '../copy-button/use-copy-status.js';
2
+ /** What the Web Share API takes. */
3
+ export type ShareData = {
4
+ title?: string;
5
+ text?: string;
6
+ url?: string;
7
+ };
8
+ /** `shared` and `cancelled` happen in the system sheet; the others are a copy. */
9
+ export type ShareOutcome = 'shared' | 'cancelled' | CopyResult;
10
+ /** What the fallback puts on the clipboard: the link, else the text, else the title. */
11
+ export declare function copyTextOf(data: ShareData): string;
12
+ /**
13
+ * Opens the system share sheet when there is one; copies otherwise, or when
14
+ * the sheet failed for a reason other than the user closing it. Reads
15
+ * `navigator` when called (a click), never during render, so it is SSR-safe.
16
+ */
17
+ export declare function shareOrCopy(data: ShareData, copy: (text: string) => Promise<CopyResult | undefined>): Promise<ShareOutcome | undefined>;
@@ -1,7 +1,7 @@
1
1
  export { type CollisionDetection, closestCenter, type DragEndEvent, pointerWithin, rectIntersection, type UniqueIdentifier, } from '@dnd-kit/core';
2
2
  export { arrayMove, horizontalListSortingStrategy, verticalListSortingStrategy, } from '@dnd-kit/sortable';
3
3
  export { CSS } from '@dnd-kit/utilities';
4
- export { composeRefs } from './compose-refs.js';
4
+ export { composeRefs } from '../../../../lib/compose-refs.js';
5
5
  export type { DndItemContextValue } from './dnd-item-context.js';
6
6
  export { useDndItem } from './dnd-item-context.js';
7
7
  export type { DndOverlayProps } from './dnd-overlay.js';
@@ -1,3 +1,4 @@
1
1
  export * from './row-menu.js';
2
2
  export * from './row-menu-column.js';
3
3
  export * from './row-menu-trigger.js';
4
+ export * from './use-row-menu-focus.js';
@@ -24,6 +24,11 @@ export type RowMenuProps = {
24
24
  items?: RowMenuItem[];
25
25
  /** Menu content of your own (groups, checkbox items), above `items`. */
26
26
  children?: ReactNode;
27
+ /**
28
+ * The row's id (`getRowId`'s), written on the trigger so `useRowMenuFocus`
29
+ * can hand the focus back to this row's trigger. `rowMenuColumn` sets it.
30
+ */
31
+ rowId?: string;
27
32
  /** The trigger's own props (`disabled`, `className`, `data-*`). */
28
33
  triggerProps?: RowMenuTriggerAttrs;
29
34
  /** Controlled state, as `DropdownMenu`'s. */
@@ -37,4 +42,4 @@ export type RowMenuProps = {
37
42
  * ones come last, after a separator. Focus returns to the trigger when the
38
43
  * menu closes, and when a dialog opened from an item closes.
39
44
  */
40
- export declare function RowMenu({ label, items, children, triggerProps, open, onOpenChange, className, }: RowMenuProps): import("react").JSX.Element;
45
+ export declare function RowMenu({ label, items, children, rowId, triggerProps, open, onOpenChange, className, }: RowMenuProps): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ /** The row menu trigger carrying exactly this id, inside `scope`. */
2
+ export declare function findRowMenuTrigger(rowId: string, scope?: ParentNode): HTMLElement | null;
3
+ /**
4
+ * Focuses the trigger of row `rowId` inside `scope`, and claims it again for
5
+ * the next frames if something takes the focus meanwhile (a dialog's
6
+ * focus scope restores the focus in its own `setTimeout(0)`, a toast can
7
+ * grab it). Answers at once: `true` when the trigger is found and holds the
8
+ * focus right now.
9
+ */
10
+ export declare function focusRowMenuTrigger(rowId: string, scope?: ParentNode): boolean;
11
+ /**
12
+ * Hands the focus back to one row's `RowMenu` trigger once an async action
13
+ * settles, or a toast or a dialog it opened has closed (#2075). Pass `focusRef`
14
+ * to the table (`DataTable`'s `focusRef`, or the `ref` of any element holding
15
+ * the rows) so two tables never share a row id, and call
16
+ * `focusRowMenu(row.id)` right after the action settles or the dialog closes.
17
+ * The row is matched by its id exactly (`getRowId`'s, `RowMenu`'s `rowId`),
18
+ * never by its label. The focus is taken at once and claimed again for two
19
+ * frames if a dialog's focus restore or a toast takes it. For those two frames
20
+ * the focus is claimed back to the trigger whatever took it, so a deliberate
21
+ * focus move (Tab, or a dialog or toast opened right after the call) within
22
+ * them is overridden: call it once the follow-up UI is done. Returns `true`
23
+ * when the trigger was found and holds the focus; `false` for a row that went
24
+ * away
25
+ * (archived, deleted) or a trigger that cannot take it (disabled, inert).
26
+ */
27
+ export declare function useRowMenuFocus(): {
28
+ focusRef: import('react').RefObject<HTMLElement | null>;
29
+ focusRowMenu: (rowId: string) => boolean;
30
+ };
@@ -1,3 +1,3 @@
1
1
  import { EnrolmentCardLabels } from './types.js';
2
- /** The built-in words (English or the active language), with their overrides. */
2
+ /** The built-in words (English or the active language), with their overrides (an explicit `undefined` keeps the built-in label). */
3
3
  export declare function useEnrolmentCardLabels(overrides?: Partial<EnrolmentCardLabels>): EnrolmentCardLabels;
@@ -1,5 +1,5 @@
1
1
  import { RecoveryCodesLabels } from './types.js';
2
- /** The built-in title and warning, and the labels with their overrides. */
2
+ /** The built-in title and warning, and the labels with their overrides (an explicit `undefined` keeps the built-in label). */
3
3
  export declare function useRecoveryCodesLabels(overrides?: Partial<RecoveryCodesLabels>): {
4
4
  labels: RecoveryCodesLabels;
5
5
  title: string;
@@ -1,3 +1,3 @@
1
1
  import { RecoveryCodesStatusLabels } from './types.js';
2
- /** The built-in words (English or the active language), with their overrides. */
2
+ /** The built-in words (English or the active language), with their overrides (an explicit `undefined` keeps the built-in label). */
3
3
  export declare function useRecoveryCodesStatusLabels(overrides?: Partial<RecoveryCodesStatusLabels>): RecoveryCodesStatusLabels;
@@ -0,0 +1,7 @@
1
+ import { StatCardSize } from '../types.js';
2
+ /** What a linked card adds to its own classes: the anchor's hover and focus-visible states. */
3
+ export declare const STAT_CARD_LINKED = "relative group-hover/stat-link:border-primary/40 group-focus-visible/stat-link:ring-[3px] group-focus-visible/stat-link:ring-ring/50";
4
+ /** A link must read as one without hover (a phone has none): a trailing chevron. */
5
+ export declare function StatCardChevron({ size }: {
6
+ size: StatCardSize;
7
+ }): import("react").JSX.Element;
@@ -1,3 +1,8 @@
1
1
  import { StatCardProps } from './types.js';
2
2
  export type { StatCardProps, StatCardSize, StatCardValueSize, StatCardVariant, } from './types.js';
3
- export declare function StatCard({ label, value, hint, delta, deltaTone, icon, loading, tone, variant, valueSize, size, className, ...props }: StatCardProps): import("react").JSX.Element;
3
+ /**
4
+ * The KPI tile. With `href` the whole card is one link (an `<a>`, or the
5
+ * `linkComponent` / `LinkComponentProvider` link) with the card's hover and
6
+ * focus-visible styles, named by its label and value.
7
+ */
8
+ export declare function StatCard({ href, linkComponent, ...props }: StatCardProps): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
2
  import { Card } from '../../primitives/card/card.js';
3
+ import { LinkComponent } from '../../primitives/link/link-component.js';
3
4
  import { Tone } from '../../tones.js';
4
5
  import { StatDeltaTone } from './format-stat-delta.js';
5
6
  export type StatCardVariant = 'outlined' | 'tonal' | 'filled';
@@ -34,6 +35,19 @@ export type StatCardProps = Omit<ComponentProps<typeof Card>, 'children'> & {
34
35
  * apply to it.
35
36
  */
36
37
  size?: StatCardSize;
38
+ /**
39
+ * Makes the whole card one link to this address. The anchor wraps the card
40
+ * (one tab stop; its accessible name is the label and the value), the card
41
+ * gains a hover border and a focus-visible ring, and `className` and the
42
+ * other props still go on the card. An external address (`https://`, `mailto:`) is a plain `<a target="_blank" rel="noreferrer">`, as in `LinkCard`. Without it the card is a plain `div`.
43
+ */
44
+ href?: string;
45
+ /**
46
+ * With `href`: renders the link with this component (your router's `Link`
47
+ * wrapped to take `href`) instead of a plain `<a>`; it wins over
48
+ * `LinkComponentProvider`. It must spread every prop it receives.
49
+ */
50
+ linkComponent?: LinkComponent;
37
51
  /** `display` draws the value larger (`headline-large`); `default` is `headline-small`. */
38
52
  valueSize?: StatCardValueSize;
39
53
  };
@@ -1,3 +1,3 @@
1
1
  import { StepUpDialogLabels } from './types.js';
2
- /** The built-in words (English or the active language), with their overrides. */
2
+ /** The built-in words (English or the active language), with their overrides (an explicit `undefined` keeps the built-in label). */
3
3
  export declare function useStepUpLabels(overrides?: Partial<StepUpDialogLabels>): StepUpDialogLabels;