@nxgt/material 3.65.0 → 3.66.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 (110) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +4 -1
  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-DYiyCe6v.js} +16868 -16636
  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/index.d.ts +1 -0
  35. package/dist/lib/components/ui/actions/link/link.d.ts +1 -19
  36. package/dist/lib/components/ui/actions/share-button/index.d.ts +3 -0
  37. package/dist/lib/components/ui/actions/share-button/share-button.d.ts +17 -0
  38. package/dist/lib/components/ui/actions/share-button/share-or-copy.d.ts +17 -0
  39. package/dist/lib/components/ui/collections/dnd/index.d.ts +1 -1
  40. package/dist/lib/components/ui/display/enrolment-card/use-enrolment-card-labels.d.ts +1 -1
  41. package/dist/lib/components/ui/display/recovery-codes/use-recovery-codes-labels.d.ts +1 -1
  42. package/dist/lib/components/ui/display/recovery-codes-status/use-recovery-codes-status-labels.d.ts +1 -1
  43. package/dist/lib/components/ui/display/stat-card/partials/stat-card-link-parts.d.ts +7 -0
  44. package/dist/lib/components/ui/display/stat-card/stat-card.d.ts +6 -1
  45. package/dist/lib/components/ui/display/stat-card/types.d.ts +14 -0
  46. package/dist/lib/components/ui/feedback/step-up-dialog/use-step-up-labels.d.ts +1 -1
  47. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  48. package/dist/lib/components/ui/fields/number-field/number-control.d.ts +4 -1
  49. package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +5 -0
  50. package/dist/lib/components/ui/fields/verification-code/use-verification-labels.d.ts +1 -1
  51. package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
  52. package/dist/lib/components/ui/primitives/link/link-component-provider.d.ts +1 -1
  53. package/dist/lib/components/ui/primitives/link/nav-current.d.ts +22 -0
  54. package/dist/lib/components/ui/primitives/link/router-link.d.ts +25 -0
  55. package/dist/lib/components/ui/primitives/tabs/index.d.ts +2 -0
  56. package/dist/lib/components/ui/primitives/tabs/internal.d.ts +2 -0
  57. package/dist/lib/components/ui/primitives/tabs/partials/tabs-nav-link.d.ts +22 -0
  58. package/dist/lib/components/ui/primitives/tabs/tab-param-url.d.ts +53 -0
  59. package/dist/lib/components/ui/primitives/tabs/tabs-nav.d.ts +22 -0
  60. package/dist/lib/components/ui/primitives/tabs/tabs-selectors.d.ts +8 -0
  61. package/dist/lib/components/ui/primitives/tabs/use-tab-param.d.ts +35 -0
  62. package/dist/lib/components/ui/primitives/tabs/use-tabs-overflow.d.ts +4 -1
  63. package/dist/lib/components/ui/primitives/toggle-group/index.d.ts +1 -0
  64. package/dist/lib/components/ui/primitives/toggle-group/segmented-nav-item.d.ts +20 -0
  65. package/dist/lib/components/ui/primitives/toggle-group/segmented-nav.d.ts +22 -0
  66. package/dist/lib/components/ui/primitives/toggle-group/toggle-group.d.ts +4 -3
  67. package/dist/lib/i18n/resources/en/en.d.ts +5 -0
  68. package/dist/lib/i18n/resources/en/material.json.d.ts +6 -1
  69. package/dist/lib/i18n/resources/fr/fr.d.ts +5 -0
  70. package/dist/lib/i18n/resources/fr/material.json.d.ts +6 -1
  71. package/dist/lib/i18n/resources/resources.d.ts +10 -0
  72. package/dist/lib/i18n/translator.d.ts +1 -1
  73. package/dist/lib.js +31 -54
  74. package/dist/main.js +42 -42
  75. package/dist/map.js +8 -8
  76. package/dist/material.css +1 -1
  77. package/dist/pdf-reader.js +1 -1
  78. package/dist/print.js +1 -1
  79. package/dist/{public-B-greXGt.js → public-AXwv1h3v.js} +10 -10
  80. package/dist/{rich-code-block-Cv6s59vB.js → rich-code-block-qSvkA5rI.js} +5 -5
  81. package/dist/{sortable-provider-DVmZcglU.js → sortable-provider-DPk-RVEU.js} +3 -3
  82. package/dist/{spinner-OQAweH2r.js → spinner-PdSk7zEs.js} +1 -1
  83. package/dist/theme-picker.js +2 -2
  84. package/dist/{theme-toggle-DPx44p6a.js → theme-toggle-CZQckLDd.js} +2 -2
  85. package/dist/{toggle-group-BkH23Jk4.js → toggle-group-DXXlqid2.js} +1 -1
  86. package/dist/{toolbar-items-CQ3S_XZw.js → toolbar-items-BmNYNaRB.js} +3 -3
  87. package/dist/{translate-material-BHL4g2UB.js → translate-material-BlCQ6AW9.js} +1 -1
  88. package/dist/{translator-BJsjXcAp.js → translator-ChpeKCO3.js} +8 -2
  89. package/dist/{typography-CwhEwPay.js → typography-C4JSRr2B.js} +1 -1
  90. package/dist/{use-chat-composer-R0vng5RU.js → use-chat-composer-OUa9akfM.js} +1725 -1719
  91. package/dist/{use-heading-spy-Brcn0l_J.js → use-heading-spy-K-HUp4o_.js} +4 -4
  92. package/dist/{use-material-translation-mY3U83TV.js → use-material-translation-DkE9J5NE.js} +1 -1
  93. package/dist/{use-return-focus-BQ413TNG.js → use-return-focus-KypnR7vv.js} +1 -1
  94. package/docs/components/README.md +3 -1
  95. package/docs/components/buttons-and-actions.md +29 -0
  96. package/docs/components/data-display.md +14 -1
  97. package/docs/components/form-fields.md +9 -1
  98. package/docs/components/primitives.md +209 -0
  99. package/docs/previews/buttons-actions-sharebutton.webp +0 -0
  100. package/docs/previews/primitives-segmentednav.webp +0 -0
  101. package/docs/previews/primitives-tabsnav.webp +0 -0
  102. package/docs/roadmap.md +2 -1
  103. package/docs/troubleshooting.md +26 -0
  104. package/lib/components/components.css +2 -0
  105. package/lib/components/ui/layout/app-shell/activity-backdrop.css +4 -3
  106. package/lib/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
  107. package/lib/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
  108. package/lib/components/ui/primitives/toggle-group/toggle-group.css +5 -1
  109. package/package.json +1 -1
  110. /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";
@@ -12,6 +12,7 @@ export * from './load-more-footer/index.js';
12
12
  export * from './responsive-button/index.js';
13
13
  export * from './scroll-to-latest-button/index.js';
14
14
  export * from './scroll-to-top/index.js';
15
+ export * from './share-button/index.js';
15
16
  export * from './split-button/index.js';
16
17
  export * from './theme-toggle/index.js';
17
18
  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,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;