@nxgt/material 3.64.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 (126) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +4 -1
  3. package/dist/{alert-dialog-RHm6WtQj.js → alert-dialog-BgQDxcYh.js} +1 -1
  4. package/dist/{async-slice-DmX59NyA.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-DfS_amfQ.js → button-2de_lrix.js} +1 -1
  8. package/dist/charts.js +818 -807
  9. package/dist/{chip-Cbndukko.js → chip-Cs0uEjpu.js} +2 -2
  10. package/dist/{code-editor-B0tN8Ha_.js → code-editor-BYhBAfcc.js} +403 -393
  11. package/dist/code-editor.js +5 -5
  12. package/dist/{code-language-items-andgHKrM.js → code-language-items-xhmbF6wA.js} +2 -2
  13. package/dist/components/components.css +2 -0
  14. package/dist/components/ui/display/chip/chip-soft.css +19 -5
  15. package/dist/components/ui/layout/app-shell/activity-backdrop.css +4 -3
  16. package/dist/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
  17. package/dist/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
  18. package/dist/components/ui/primitives/toggle-group/toggle-group.css +5 -1
  19. package/dist/{components-2kTVPsMg.js → components-DYiyCe6v.js} +16922 -16679
  20. package/dist/components.js +28 -28
  21. package/dist/{compose-refs-DZ0iIVF-.js → compose-refs-G4J4kaUA.js} +1 -1
  22. package/dist/{dialog-Bd7Hid2L.js → dialog-Co5oksU1.js} +4 -4
  23. package/dist/dnd.js +2 -2
  24. package/dist/{dropdown-menu-_SyVmSuy.js → dropdown-menu-DdzyvN76.js} +1 -1
  25. package/dist/editor.js +365 -365
  26. package/dist/{empty-state-D-2ZMXXJ.js → empty-state-CQ0CV0kA.js} +2 -2
  27. package/dist/{field-blur-DyOByjzw.js → field-blur-B2y-bNYi.js} +1 -1
  28. package/dist/{field-blur-context-DPe5_Nv5.js → field-blur-context-BZtwcPUV.js} +1 -1
  29. package/dist/{hooks-a7_exKWS.js → hooks-DjuYsY-j.js} +2 -2
  30. package/dist/hooks.js +2 -2
  31. package/dist/{hover-card-D_0smKBQ.js → hover-card-BeBVy6tB.js} +1 -1
  32. package/dist/i18n.js +3 -3
  33. package/dist/{icon-badge-CBCU3ySF.js → icon-badge-DbYsbzwZ.js} +3 -3
  34. package/dist/{icon-button-hKHsWTAt.js → icon-button-Co6ttdv1.js} +1 -1
  35. package/dist/lib/components/ui/actions/index.d.ts +1 -0
  36. package/dist/lib/components/ui/actions/link/link.d.ts +1 -19
  37. package/dist/lib/components/ui/actions/share-button/index.d.ts +3 -0
  38. package/dist/lib/components/ui/actions/share-button/share-button.d.ts +17 -0
  39. package/dist/lib/components/ui/actions/share-button/share-or-copy.d.ts +17 -0
  40. package/dist/lib/components/ui/collections/dnd/index.d.ts +1 -1
  41. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +1 -0
  42. package/dist/lib/components/ui/collections/server-table/past-end.d.ts +3 -0
  43. package/dist/lib/components/ui/collections/server-table/types.d.ts +2 -2
  44. package/dist/lib/components/ui/collections/server-table/use-table-answer.d.ts +1 -1
  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/primitives/link/link-component-provider.d.ts +1 -1
  58. package/dist/lib/components/ui/primitives/link/nav-current.d.ts +22 -0
  59. package/dist/lib/components/ui/primitives/link/router-link.d.ts +25 -0
  60. package/dist/lib/components/ui/primitives/tabs/index.d.ts +2 -0
  61. package/dist/lib/components/ui/primitives/tabs/internal.d.ts +2 -0
  62. package/dist/lib/components/ui/primitives/tabs/partials/tabs-nav-link.d.ts +22 -0
  63. package/dist/lib/components/ui/primitives/tabs/tab-param-url.d.ts +53 -0
  64. package/dist/lib/components/ui/primitives/tabs/tabs-nav.d.ts +22 -0
  65. package/dist/lib/components/ui/primitives/tabs/tabs-selectors.d.ts +8 -0
  66. package/dist/lib/components/ui/primitives/tabs/use-tab-param.d.ts +35 -0
  67. package/dist/lib/components/ui/primitives/tabs/use-tabs-overflow.d.ts +4 -1
  68. package/dist/lib/components/ui/primitives/toggle-group/index.d.ts +1 -0
  69. package/dist/lib/components/ui/primitives/toggle-group/segmented-nav-item.d.ts +20 -0
  70. package/dist/lib/components/ui/primitives/toggle-group/segmented-nav.d.ts +22 -0
  71. package/dist/lib/components/ui/primitives/toggle-group/toggle-group.d.ts +4 -3
  72. package/dist/lib/components/ui/widgets/code-editor/code-editor-field.d.ts +7 -6
  73. package/dist/lib/components/ui/widgets/code-editor/code-editor-types.d.ts +6 -0
  74. package/dist/lib/components/ui/widgets/code-editor/use-code-editor-instance.d.ts +12 -1
  75. package/dist/lib/components/ui/widgets/native-charts/core/reference-geometry.d.ts +16 -2
  76. package/dist/lib/i18n/resources/en/en.d.ts +6 -0
  77. package/dist/lib/i18n/resources/en/material.json.d.ts +7 -1
  78. package/dist/lib/i18n/resources/fr/fr.d.ts +6 -0
  79. package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -1
  80. package/dist/lib/i18n/resources/resources.d.ts +12 -0
  81. package/dist/lib/i18n/translator.d.ts +1 -1
  82. package/dist/lib.js +31 -54
  83. package/dist/main.js +42 -42
  84. package/dist/map.js +8 -8
  85. package/dist/material.css +1 -1
  86. package/dist/pdf-reader.js +1 -1
  87. package/dist/print.js +1 -1
  88. package/dist/{public-D8JGp3PH.js → public-AXwv1h3v.js} +10 -10
  89. package/dist/{rich-code-block-0R3bidsM.js → rich-code-block-qSvkA5rI.js} +5 -5
  90. package/dist/{sortable-provider-B75v53sB.js → sortable-provider-DPk-RVEU.js} +3 -3
  91. package/dist/{spinner-CAnpF3RK.js → spinner-PdSk7zEs.js} +1 -1
  92. package/dist/theme-picker.js +2 -2
  93. package/dist/{theme-toggle-pQ5F602V.js → theme-toggle-CZQckLDd.js} +2 -2
  94. package/dist/{toggle-group-BkH23Jk4.js → toggle-group-DXXlqid2.js} +1 -1
  95. package/dist/{toolbar-items-_ezD5B0r.js → toolbar-items-BmNYNaRB.js} +3 -3
  96. package/dist/{translate-material-CvZK8_S6.js → translate-material-BlCQ6AW9.js} +1 -1
  97. package/dist/{translator-Caf-d96e.js → translator-ChpeKCO3.js} +10 -2
  98. package/dist/{typography-CEK19bj8.js → typography-C4JSRr2B.js} +1 -1
  99. package/dist/{use-chat-composer-Dpvi_-CR.js → use-chat-composer-OUa9akfM.js} +1725 -1719
  100. package/dist/{use-heading-spy-mmcyEGmm.js → use-heading-spy-K-HUp4o_.js} +4 -4
  101. package/dist/{use-material-translation-C_1cWRzW.js → use-material-translation-DkE9J5NE.js} +1 -1
  102. package/dist/{use-return-focus-1ZIchrBM.js → use-return-focus-KypnR7vv.js} +1 -1
  103. package/docs/components/README.md +3 -1
  104. package/docs/components/buttons-and-actions.md +30 -1
  105. package/docs/components/data-display.md +14 -1
  106. package/docs/components/data-table-filter-and-lists.md +16 -3
  107. package/docs/components/form-fields.md +9 -1
  108. package/docs/components/navigation-and-layout.md +9 -5
  109. package/docs/components/primitives.md +209 -0
  110. package/docs/components/rich-widgets.md +1 -0
  111. package/docs/guides/charts.md +1 -1
  112. package/docs/guides/code-editor.md +14 -0
  113. package/docs/guides/i18n.md +3 -1
  114. package/docs/previews/buttons-actions-sharebutton.webp +0 -0
  115. package/docs/previews/primitives-segmentednav.webp +0 -0
  116. package/docs/previews/primitives-tabsnav.webp +0 -0
  117. package/docs/roadmap.md +2 -1
  118. package/docs/troubleshooting.md +35 -7
  119. package/lib/components/components.css +2 -0
  120. package/lib/components/ui/display/chip/chip-soft.css +19 -5
  121. package/lib/components/ui/layout/app-shell/activity-backdrop.css +4 -3
  122. package/lib/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
  123. package/lib/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
  124. package/lib/components/ui/primitives/toggle-group/toggle-group.css +5 -1
  125. package/package.json +2 -2
  126. /package/dist/lib/{components/ui/collections/dnd → lib}/compose-refs.d.ts +0 -0
@@ -0,0 +1,25 @@
1
+ import { ComponentProps } from 'react';
2
+ import { LinkProps } from 'react-router';
3
+ import { LinkComponent } from './link-component.js';
4
+ export type RouterLinkProps = Pick<LinkProps, 'to' | 'replace' | 'state' | 'target' | 'reloadDocument' | 'preventScrollReset'> & {
5
+ /**
6
+ * @deprecated Use ActivityLayout's route transition (React's
7
+ * `<ViewTransition>`); removed after React Router v9.
8
+ */
9
+ viewTransition?: LinkProps['viewTransition'];
10
+ /** Saves the target instead of opening it: `true`, or the file name. */
11
+ download?: boolean | string;
12
+ /**
13
+ * Renders the link with this component instead of React Router's `Link`;
14
+ * it wins over `LinkComponentProvider`. It receives `to` as `href`, with
15
+ * `target`, `download` and the button's classes; `replace`, `state`,
16
+ * `reloadDocument` and `preventScrollReset` are router-only and not passed.
17
+ */
18
+ linkComponent?: LinkComponent;
19
+ };
20
+ export declare const ROUTER_KEYS: ReadonlyArray<keyof RouterLinkProps>;
21
+ export declare function splitLinkProps<P extends RouterLinkProps>(props: P): {
22
+ link: RouterLinkProps;
23
+ rest: Omit<P, keyof RouterLinkProps>;
24
+ };
25
+ export declare function ButtonLink({ to, replace, state, reloadDocument, preventScrollReset, viewTransition, linkComponent, ...props }: RouterLinkProps & ComponentProps<'a'>): import("react").JSX.Element;
@@ -1 +1,3 @@
1
1
  export * from './tabs.js';
2
+ export * from './tabs-nav.js';
3
+ export * from './use-tab-param.js';
@@ -0,0 +1,2 @@
1
+ export { TABS_OVERFLOW_FADE } from './tabs-overflow-classes.js';
2
+ export { useTabsOverflow } from './use-tabs-overflow.js';
@@ -0,0 +1,22 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { RouterLinkProps } from '../../link/router-link.js';
3
+ /** What a `TabsNav` tells its links: the current value. */
4
+ export declare const TabsNavCurrent: {
5
+ Provider: import('react').Provider<string | undefined>;
6
+ useIsCurrent: (value: string | undefined, current: boolean | undefined) => boolean;
7
+ };
8
+ export type TabsNavLinkProps = RouterLinkProps & Omit<ComponentProps<'a'>, 'href'> & {
9
+ /** Matched against the `TabsNav`'s `value` to mark this link current. */
10
+ value?: string;
11
+ /** Marks this link current (or not), whatever the `TabsNav`'s `value` says. */
12
+ current?: boolean;
13
+ /** Shown before the label. */
14
+ icon?: ReactNode;
15
+ };
16
+ /**
17
+ * One link of a `TabsNav`, wearing the tab look. The current one carries
18
+ * `aria-current="page"` and `data-state="active"`. It renders the router's
19
+ * link (or the `LinkComponentProvider`'s), `to` being the target and
20
+ * `preventScrollReset` on, so changing tab keeps the scroll position.
21
+ */
22
+ export declare function TabsNavLink({ value, current, icon, className, children, ...props }: TabsNavLinkProps): import("react").JSX.Element;
@@ -0,0 +1,53 @@
1
+ export type TabValues = readonly [string, ...string[]];
2
+ export type TabParamOptions<V extends TabValues = TabValues> = {
3
+ /** The search param holding the tab (`tab`). */
4
+ param?: string;
5
+ /** The tabs a URL may name, in display order. */
6
+ values: V;
7
+ /** The tab shown when the param is absent or unknown (the first value). */
8
+ defaultValue?: V[number];
9
+ };
10
+ /** The default tab: `defaultValue` when it is one of `values`, else the first. */
11
+ export declare function defaultTab({ values, defaultValue }: TabParamOptions): string;
12
+ /** The param's value if it names a tab, else the default (an unknown value falls back). */
13
+ export declare function resolveTab(raw: string | null, options: TabParamOptions): string;
14
+ /**
15
+ * The `to` of a tab: the location's path and its other params kept, the param
16
+ * set to `tab`. The hash is dropped, unless `keepHash` is on: React Router's
17
+ * `ScrollRestoration` scrolls to a hash even with `preventScrollReset`. The
18
+ * default tab writes no param, unless `explicitDefault` is on (another param
19
+ * implies a tab, so the default must be spelled out to stay pickable).
20
+ */
21
+ export declare function tabHref(location: {
22
+ pathname: string;
23
+ search: string;
24
+ hash: string;
25
+ }, tab: string, options: TabParamOptions & {
26
+ explicitDefault?: boolean;
27
+ keepHash?: boolean;
28
+ }): string;
29
+ /**
30
+ * The ids a tab and its panel carry, stable for tests:
31
+ * `<prefix>-<value>` and `<prefix>-panel-<value>`. The value must be id-safe
32
+ * (no spaces); the prefix keeps two tab sets on one page apart.
33
+ */
34
+ export declare function tabIds(value: string, prefix?: string): {
35
+ tab: string;
36
+ panel: string;
37
+ };
38
+ /** True when the two URLs differ by that search param only (the hash is ignored). */
39
+ export declare function onlyParamChanged(current: URL, next: URL, param: string): boolean;
40
+ /** The slice of React Router's `ShouldRevalidateFunctionArgs` that `skipTabChange` reads. */
41
+ export type RevalidateArgs = {
42
+ currentUrl: URL;
43
+ nextUrl: URL;
44
+ defaultShouldRevalidate: boolean;
45
+ formMethod?: string;
46
+ actionResult?: unknown;
47
+ };
48
+ /**
49
+ * `false` for a plain navigation that changed only the tab param; otherwise
50
+ * `defaultShouldRevalidate`, so a same-URL, fetcher or manual revalidation,
51
+ * and any submission, still reloads.
52
+ */
53
+ export declare function shouldSkipTabChange(args: RevalidateArgs, param: string): boolean;
@@ -0,0 +1,22 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { TabsNavLink } from './partials/tabs-nav-link.js';
3
+ import { TabsLook } from './tabs-classes.js';
4
+ export type { TabsNavLinkProps } from './partials/tabs-nav-link.js';
5
+ export type TabsNavProps = Omit<ComponentProps<'nav'>, 'aria-label'> & {
6
+ /** Names the navigation for assistive technology ("Account sections"). */
7
+ 'aria-label': string;
8
+ /** The current link's `value`; a link's own `current` overrides it. */
9
+ value?: string;
10
+ /** `underline` (the default) or `segmented`, as `Tabs`. */
11
+ variant?: TabsLook;
12
+ children?: ReactNode;
13
+ };
14
+ /**
15
+ * Route tabs as links: a `<nav>` of `TabsNavLink`s in the `Tabs` look, with
16
+ * its sliding indicator and its scroll cue on a phone. Each link is a plain
17
+ * link (open in a new tab, copy the address, Tab moves between them), the
18
+ * current one marked `aria-current="page"`. Use `Tabs` when the panels are
19
+ * on the page, `TabsNav` when each tab is a place to go.
20
+ */
21
+ declare function TabsNav({ value, variant, className, children, ref, ...props }: TabsNavProps): import("react").JSX.Element;
22
+ export { TabsNav, TabsNavLink };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * What the sliding indicator and the overflow cue measure: a `Tabs` trigger
3
+ * (`role="tab"`) or a `TabsNav` link, which is a plain link and has no tab
4
+ * role but wears the same `data-slot`.
5
+ */
6
+ export declare const TAB = "[role=\"tab\"], [data-slot=\"tabs-trigger\"]";
7
+ /** The selected one of them. */
8
+ export declare const ACTIVE_TAB = "[role=\"tab\"][data-state=\"active\"], [data-slot=\"tabs-trigger\"][data-state=\"active\"]";
@@ -0,0 +1,35 @@
1
+ import { ShouldRevalidateFunction } from 'react-router';
2
+ import { TabParamOptions, TabValues } from './tab-param-url.js';
3
+ export type { TabParamOptions, TabValues } from './tab-param-url.js';
4
+ export { tabIds } from './tab-param-url.js';
5
+ export type UseTabParamOptions<V extends TabValues = TabValues> = TabParamOptions<V> & {
6
+ /**
7
+ * Write the default tab's param out too. Turn it on when another param
8
+ * implies a tab, so the default tab can still be picked.
9
+ */
10
+ explicitDefault?: boolean;
11
+ /**
12
+ * Keep the location's hash in a tab's `to`. Off by default: React Router's
13
+ * `ScrollRestoration` jumps to a hash even with `preventScrollReset`.
14
+ */
15
+ keepHash?: boolean;
16
+ };
17
+ /**
18
+ * The current tab kept in a search param, for `TabsNav` / `SegmentedNav`.
19
+ * `value` is the param if it names one of `values`, else `defaultValue`, else
20
+ * the first value. `hrefFor(tab)` is the `to` of a tab: the path and the other
21
+ * params are kept, the hash is dropped (`keepHash` keeps it) and the default
22
+ * tab writes no param. `values` is read as literal types, so `value` and
23
+ * `hrefFor` take only those tabs.
24
+ */
25
+ export declare function useTabParam<const V extends TabValues>(options: UseTabParamOptions<V>): {
26
+ value: V[number];
27
+ hrefFor: (tab: V[number]) => string;
28
+ };
29
+ /**
30
+ * For a route's `shouldRevalidate`: skips the loaders when a navigation
31
+ * changed only the tab param. A same-URL, fetcher or manual revalidation, and
32
+ * any submission, keep `defaultShouldRevalidate`. Parent routes' loaders still
33
+ * revalidate unless they export it too.
34
+ */
35
+ export declare function skipTabChange(param?: string): ShouldRevalidateFunction;
@@ -23,4 +23,7 @@ export declare function revealTab(list: HTMLElement, tab: HTMLElement, behavior?
23
23
  * in `useFollowScroll` and runs only while the list overflows. The same
24
24
  * effect keeps the active tab (and the focused one) in view.
25
25
  */
26
- export declare function useTabsOverflow(ref: RefObject<HTMLElement | null>): TabsOverflow;
26
+ export declare function useTabsOverflow(ref: RefObject<HTMLElement | null>, selectors?: {
27
+ tab: string;
28
+ active: string;
29
+ }): TabsOverflow;
@@ -1 +1,2 @@
1
+ export * from './segmented-nav.js';
1
2
  export * from './toggle-group.js';
@@ -0,0 +1,20 @@
1
+ import { ComponentProps } from 'react';
2
+ import { RouterLinkProps } from '../link/router-link.js';
3
+ /** What a `SegmentedNav` tells its items: the current value. */
4
+ export declare const SegmentedNavCurrent: {
5
+ Provider: import('react').Provider<string | undefined>;
6
+ useIsCurrent: (value: string | undefined, current: boolean | undefined) => boolean;
7
+ };
8
+ export type SegmentedNavItemProps = RouterLinkProps & Omit<ComponentProps<'a'>, 'href'> & {
9
+ /** Matched against the `SegmentedNav`'s `value` to mark this item current. */
10
+ value?: string;
11
+ /** Marks this item current (or not), whatever the `SegmentedNav`'s `value` says. */
12
+ current?: boolean;
13
+ };
14
+ /**
15
+ * One link of a `SegmentedNav`, wearing the segmented item look. The current
16
+ * one carries `aria-current="page"` and its pill. It renders the router's
17
+ * link (or the `LinkComponentProvider`'s), `to` being the target and
18
+ * `preventScrollReset` on, so changing segment keeps the scroll position.
19
+ */
20
+ export declare function SegmentedNavItem({ value, current, className, ...props }: SegmentedNavItemProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { SegmentedNavItem } from './segmented-nav-item.js';
3
+ import { ToggleGroupSize } from './toggle-group.variants.js';
4
+ export type { SegmentedNavItemProps } from './segmented-nav-item.js';
5
+ export type SegmentedNavProps = Omit<ComponentProps<'nav'>, 'aria-label'> & {
6
+ /** Names the navigation for assistive technology ("Period"). */
7
+ 'aria-label': string;
8
+ /** The current item's `value`; an item's own `current` overrides it. */
9
+ value?: string;
10
+ /** `sm`, `md` (the default) or `lg`, as `ToggleGroup`. */
11
+ size?: Exclude<ToggleGroupSize, 'default'> | null;
12
+ children?: ReactNode;
13
+ };
14
+ /**
15
+ * The segmented `ToggleGroup` look as a `<nav>` of links: a period or a view
16
+ * kept in the address. Each item is a real link, the current one marked
17
+ * `aria-current="page"` and drawn as the selected pill. Tab moves from link
18
+ * to link. A nav wider than its container scrolls inside itself, with an
19
+ * edge fade. Use `ToggleGroup` for a choice that stays on the page.
20
+ */
21
+ declare function SegmentedNav({ value, size, className, children, ref, ...props }: SegmentedNavProps): import("react").JSX.Element;
22
+ export { SegmentedNav, SegmentedNavItem };
@@ -24,9 +24,10 @@ export type ToggleGroupItemProps = ComponentProps<typeof ToggleGroupPrimitive.It
24
24
  * One toggle. Its children are its content: a label, an icon, or both. An
25
25
  * icon alone needs an `aria-label` (or `aria-labelledby`): only then is the
26
26
  * item drawn as a square icon button. Selected, a label-only item of a
27
- * connected group draws a check at its start without growing. With `asChild`
28
- * (a link per period, say), the child becomes the item and the check goes
29
- * inside it, before the child's own content.
27
+ * connected group draws a check at its start without growing. With `asChild`,
28
+ * the child becomes the item and the check goes inside it, before the child's
29
+ * own content. For one link per period or view, use `SegmentedNav`: its items
30
+ * are real links with `aria-current`, not radios.
30
31
  */
31
32
  declare function ToggleGroupItem({ className, children, variant: _variant, size: _size, ...props }: ToggleGroupItemProps): import("react").JSX.Element;
32
33
  declare function ToggleGroupSeparator({ className, ...props }: Omit<SeparatorProps, 'orientation'>): import("react").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
+ import { CodeEditorProps } from './code-editor-types.js';
2
3
  /** The field around the editor: its label, its helper or error text, the blur root. */
3
- export declare function CodeEditorField({ label, required, helperText, invalid, className, children, }: {
4
- label?: ReactNode;
5
- required?: boolean;
6
- helperText?: ReactNode;
7
- invalid?: boolean;
8
- className?: string;
4
+ export declare function CodeEditorField({ props: { label, required, helperText, className }, view: { helperId, invalid }, children, }: {
5
+ props: CodeEditorProps;
6
+ view: {
7
+ helperId: string;
8
+ invalid: boolean;
9
+ };
9
10
  children: ReactNode;
10
11
  }): import("react").JSX.Element;
@@ -46,6 +46,12 @@ export type CodeEditorHandle = {
46
46
  export type CodeEditorProps = {
47
47
  label?: ReactNode;
48
48
  helperText?: ReactNode;
49
+ /**
50
+ * The id(s) of the element(s) that describe the code (a question's
51
+ * description line, `QuestionCodeField.describedBy`): set on Monaco's
52
+ * input, before the field's own helper text id.
53
+ */
54
+ 'aria-describedby'?: string;
49
55
  error?: boolean;
50
56
  required?: boolean;
51
57
  disabled?: boolean;
@@ -1,16 +1,27 @@
1
+ import { ReactNode } from 'react';
1
2
  import { CodeMarker } from './status/code-markers.js';
2
3
  import { CodeEditorInstance } from './status/use-code-markers.js';
4
+ /**
5
+ * Monaco's `aria-describedby`: the caller's ids first, then the helper
6
+ * text's, each id once.
7
+ */
8
+ export declare function codeDescribedBy(own: string | undefined, helperText: ReactNode, helperId: string): string | undefined;
9
+ /** Sets or clears `aria-describedby` on Monaco's input. */
10
+ export declare function setDescribedBy(input: Pick<Element, 'setAttribute' | 'removeAttribute'> | null | undefined, value: string | undefined): void;
3
11
  /**
4
12
  * The mounted Monaco editor and what the frame shows of it: every marker,
5
13
  * the caret's position, whether the field is invalid (`error`, or an error
6
14
  * marker), and the status pill's reveal.
7
15
  */
8
- export declare function useCodeEditorInstance({ error, markers, onMarkersChange, }: {
16
+ export declare function useCodeEditorInstance({ error, helperText, 'aria-describedby': ariaDescribedBy, markers, onMarkersChange, }: {
9
17
  error?: boolean;
18
+ helperText?: ReactNode;
19
+ 'aria-describedby'?: string;
10
20
  markers?: CodeMarker[];
11
21
  onMarkersChange?: (markers: CodeMarker[]) => void;
12
22
  }): {
13
23
  instance: CodeEditorInstance | null;
24
+ helperId: string;
14
25
  setInstance: import('react').Dispatch<import('react').SetStateAction<CodeEditorInstance | null>>;
15
26
  allMarkers: CodeMarker[];
16
27
  position: import('./status/use-cursor-position.js').CursorPosition;
@@ -44,8 +44,22 @@ export declare function bandBox(band: Pick<RefBand, 'from' | 'to'>, domain: Doma
44
44
  export declare function thresholdAt(value: number, domain: Domain, y: (value: number) => number): number | null;
45
45
  /** The baseline of a band's label: inside the band under its top edge, or above a band too thin to hold it. */
46
46
  export declare function bandLabelBaseline(top: number, height: number): number;
47
- /** The baseline of a threshold's label: above its line, or under it at the top of the plot. */
48
- export declare function thresholdLabelBaseline(lineY: number): number;
47
+ /** How far a point's marker reaches from its centre (the tone ring is the widest, 7 px). */
48
+ export declare const MARKER_REACH = 8;
49
+ /**
50
+ * The y of the markers that fall over the stretch `left` to `right` of the
51
+ * plot, a marker reaching `MARKER_REACH` px beyond its x. `ys` is the y of
52
+ * each row (null where the row has no value) and `x` maps a row to a pixel.
53
+ */
54
+ export declare function markersBetween(ys: readonly (number | null)[], x: (index: number) => number, left: number, right: number): number[];
55
+ /**
56
+ * The baseline of a threshold's label: above its line, or under it at the top
57
+ * of the plot. `pointYs` are the y of the series' points under the label's
58
+ * width: when one would sit on the label above the line and none would
59
+ * under it, the label goes to the other side, so it never covers a point or
60
+ * its marker.
61
+ */
62
+ export declare function thresholdLabelBaseline(lineY: number, pointYs?: readonly number[]): number;
49
63
  /** How many of `values` lie outside `band` (a missing value is not counted, nor one in a row where a stepped band has no range), and how many there are. */
50
64
  export declare function outsideBand(values: readonly (number | null | undefined)[], band: Pick<RefBand, 'from' | 'to' | 'ranges'>): {
51
65
  outside: number;
@@ -1315,6 +1315,8 @@ export declare const en: {
1315
1315
  "number-field": {
1316
1316
  decrease: string;
1317
1317
  increase: string;
1318
+ "decrease-named": string;
1319
+ "increase-named": string;
1318
1320
  };
1319
1321
  "textarea-field": {
1320
1322
  count: string;
@@ -1367,6 +1369,9 @@ export declare const en: {
1367
1369
  "page-failed-title": string;
1368
1370
  "back-to-start": string;
1369
1371
  };
1372
+ share: {
1373
+ share: string;
1374
+ };
1370
1375
  "language-switcher": {
1371
1376
  label: string;
1372
1377
  };
@@ -1504,6 +1509,7 @@ export declare const en: {
1504
1509
  apply: string;
1505
1510
  reset: string;
1506
1511
  "clear-all": string;
1512
+ "inline-clear-hint": string;
1507
1513
  min: string;
1508
1514
  max: string;
1509
1515
  presets: {
@@ -1304,7 +1304,9 @@ declare const _default: {
1304
1304
  },
1305
1305
  "number-field": {
1306
1306
  "decrease": "Decrease",
1307
- "increase": "Increase"
1307
+ "increase": "Increase",
1308
+ "decrease-named": "Decrease {label}",
1309
+ "increase-named": "Increase {label}"
1308
1310
  },
1309
1311
  "textarea-field": {
1310
1312
  "count": "{count}/{max}"
@@ -1357,6 +1359,9 @@ declare const _default: {
1357
1359
  "page-failed-title": "This page could not be loaded",
1358
1360
  "back-to-start": "Back to the start"
1359
1361
  },
1362
+ "share": {
1363
+ "share": "Share"
1364
+ },
1360
1365
  "language-switcher": {
1361
1366
  "label": "Language"
1362
1367
  },
@@ -1494,6 +1499,7 @@ declare const _default: {
1494
1499
  "apply": "Apply Filters",
1495
1500
  "reset": "Reset",
1496
1501
  "clear-all": "Clear all",
1502
+ "inline-clear-hint": "Pressing a selected chip removes it from the filter",
1497
1503
  "min": "Min",
1498
1504
  "max": "Max",
1499
1505
  "presets": {
@@ -1315,6 +1315,8 @@ export declare const fr: {
1315
1315
  "number-field": {
1316
1316
  decrease: string;
1317
1317
  increase: string;
1318
+ "decrease-named": string;
1319
+ "increase-named": string;
1318
1320
  };
1319
1321
  "textarea-field": {
1320
1322
  count: string;
@@ -1367,6 +1369,9 @@ export declare const fr: {
1367
1369
  "page-failed-title": string;
1368
1370
  "back-to-start": string;
1369
1371
  };
1372
+ share: {
1373
+ share: string;
1374
+ };
1370
1375
  "language-switcher": {
1371
1376
  label: string;
1372
1377
  };
@@ -1504,6 +1509,7 @@ export declare const fr: {
1504
1509
  apply: string;
1505
1510
  reset: string;
1506
1511
  "clear-all": string;
1512
+ "inline-clear-hint": string;
1507
1513
  min: string;
1508
1514
  max: string;
1509
1515
  presets: {
@@ -1304,7 +1304,9 @@ declare const _default: {
1304
1304
  },
1305
1305
  "number-field": {
1306
1306
  "decrease": "Diminuer",
1307
- "increase": "Augmenter"
1307
+ "increase": "Augmenter",
1308
+ "decrease-named": "Diminuer {label}",
1309
+ "increase-named": "Augmenter {label}"
1308
1310
  },
1309
1311
  "textarea-field": {
1310
1312
  "count": "{count}/{max}"
@@ -1357,6 +1359,9 @@ declare const _default: {
1357
1359
  "page-failed-title": "Cette page n’a pas pu être chargée",
1358
1360
  "back-to-start": "Retour au début"
1359
1361
  },
1362
+ "share": {
1363
+ "share": "Partager"
1364
+ },
1360
1365
  "language-switcher": {
1361
1366
  "label": "Langue"
1362
1367
  },
@@ -1494,6 +1499,7 @@ declare const _default: {
1494
1499
  "apply": "Appliquer",
1495
1500
  "reset": "Réinitialiser",
1496
1501
  "clear-all": "Tout effacer",
1502
+ "inline-clear-hint": "Appuyer sur une puce sélectionnée la retire du filtre",
1497
1503
  "min": "Min",
1498
1504
  "max": "Max",
1499
1505
  "presets": {
@@ -1313,6 +1313,8 @@ export declare const resources: {
1313
1313
  "number-field": {
1314
1314
  decrease: string;
1315
1315
  increase: string;
1316
+ "decrease-named": string;
1317
+ "increase-named": string;
1316
1318
  };
1317
1319
  "textarea-field": {
1318
1320
  count: string;
@@ -1365,6 +1367,9 @@ export declare const resources: {
1365
1367
  "page-failed-title": string;
1366
1368
  "back-to-start": string;
1367
1369
  };
1370
+ share: {
1371
+ share: string;
1372
+ };
1368
1373
  "language-switcher": {
1369
1374
  label: string;
1370
1375
  };
@@ -1502,6 +1507,7 @@ export declare const resources: {
1502
1507
  apply: string;
1503
1508
  reset: string;
1504
1509
  "clear-all": string;
1510
+ "inline-clear-hint": string;
1505
1511
  min: string;
1506
1512
  max: string;
1507
1513
  presets: {
@@ -4288,6 +4294,8 @@ export declare const resources: {
4288
4294
  "number-field": {
4289
4295
  decrease: string;
4290
4296
  increase: string;
4297
+ "decrease-named": string;
4298
+ "increase-named": string;
4291
4299
  };
4292
4300
  "textarea-field": {
4293
4301
  count: string;
@@ -4340,6 +4348,9 @@ export declare const resources: {
4340
4348
  "page-failed-title": string;
4341
4349
  "back-to-start": string;
4342
4350
  };
4351
+ share: {
4352
+ share: string;
4353
+ };
4343
4354
  "language-switcher": {
4344
4355
  label: string;
4345
4356
  };
@@ -4477,6 +4488,7 @@ export declare const resources: {
4477
4488
  apply: string;
4478
4489
  reset: string;
4479
4490
  "clear-all": string;
4491
+ "inline-clear-hint": string;
4480
4492
  min: string;
4481
4493
  max: string;
4482
4494
  presets: {