@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.
- package/CHANGELOG.md +28 -0
- package/README.md +6 -2
- package/dist/{alert-dialog-C0nGUSCP.js → alert-dialog-BgQDxcYh.js} +1 -1
- package/dist/{async-slice-CyansBvD.js → async-slice-BCZyWgGr.js} +48 -25
- package/dist/{background-qdnet2A5.js → background-D1gC4m2R.js} +1 -1
- package/dist/backgrounds.js +1 -1
- package/dist/{button-D5k3K-gM.js → button-2de_lrix.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-lWXIJkqo.js → chip-Cs0uEjpu.js} +2 -2
- package/dist/{code-editor-aXG4CdY-.js → code-editor-BYhBAfcc.js} +5 -5
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-CsaXyApg.js → code-language-items-xhmbF6wA.js} +2 -2
- package/dist/components/components.css +2 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +4 -3
- package/dist/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
- package/dist/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
- package/dist/components/ui/primitives/toggle-group/toggle-group.css +5 -1
- package/dist/{components-DNcTvjlv.js → components-BRWaX4Xk.js} +17477 -17205
- package/dist/components.js +28 -28
- package/dist/{compose-refs-DZ0iIVF-.js → compose-refs-G4J4kaUA.js} +1 -1
- package/dist/{dialog-DWNaxpa-.js → dialog-Co5oksU1.js} +4 -4
- package/dist/dnd.js +2 -2
- package/dist/{dropdown-menu-ChvAIQIW.js → dropdown-menu-DdzyvN76.js} +1 -1
- package/dist/editor.js +365 -365
- package/dist/{empty-state-CFLcVzKL.js → empty-state-CQ0CV0kA.js} +2 -2
- package/dist/{field-blur-CV9orzdJ.js → field-blur-B2y-bNYi.js} +1 -1
- package/dist/{field-blur-context-C8BX8IBy.js → field-blur-context-BZtwcPUV.js} +1 -1
- package/dist/{hooks-DilW-3jc.js → hooks-DjuYsY-j.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-IeS_1RPH.js → hover-card-BeBVy6tB.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-Bf4SoA2i.js → icon-badge-DbYsbzwZ.js} +3 -3
- package/dist/{icon-button-l3dQTRrC.js → icon-button-Co6ttdv1.js} +1 -1
- package/dist/lib/components/ui/actions/back-link/back-link.d.ts +10 -0
- package/dist/lib/components/ui/actions/back-link/index.d.ts +1 -0
- package/dist/lib/components/ui/actions/index.d.ts +2 -0
- package/dist/lib/components/ui/actions/link/link.d.ts +1 -19
- package/dist/lib/components/ui/actions/share-button/index.d.ts +3 -0
- package/dist/lib/components/ui/actions/share-button/share-button.d.ts +17 -0
- package/dist/lib/components/ui/actions/share-button/share-or-copy.d.ts +17 -0
- package/dist/lib/components/ui/collections/dnd/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/row-menu/index.d.ts +1 -0
- package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +6 -1
- package/dist/lib/components/ui/collections/row-menu/use-row-menu-focus.d.ts +30 -0
- package/dist/lib/components/ui/display/enrolment-card/use-enrolment-card-labels.d.ts +1 -1
- package/dist/lib/components/ui/display/recovery-codes/use-recovery-codes-labels.d.ts +1 -1
- package/dist/lib/components/ui/display/recovery-codes-status/use-recovery-codes-status-labels.d.ts +1 -1
- package/dist/lib/components/ui/display/stat-card/partials/stat-card-link-parts.d.ts +7 -0
- package/dist/lib/components/ui/display/stat-card/stat-card.d.ts +6 -1
- package/dist/lib/components/ui/display/stat-card/types.d.ts +14 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/use-step-up-labels.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/number-field/number-control.d.ts +4 -1
- package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +5 -0
- package/dist/lib/components/ui/fields/verification-code/use-verification-labels.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
- package/dist/lib/components/ui/media/media-player-host/use-host-engine.d.ts +1 -1
- package/dist/lib/components/ui/primitives/link/link-component-provider.d.ts +1 -1
- package/dist/lib/components/ui/primitives/link/nav-current.d.ts +22 -0
- package/dist/lib/components/ui/primitives/link/router-link.d.ts +25 -0
- package/dist/lib/components/ui/primitives/tabs/index.d.ts +2 -0
- package/dist/lib/components/ui/primitives/tabs/internal.d.ts +2 -0
- package/dist/lib/components/ui/primitives/tabs/partials/tabs-nav-link.d.ts +22 -0
- package/dist/lib/components/ui/primitives/tabs/tab-param-url.d.ts +53 -0
- package/dist/lib/components/ui/primitives/tabs/tabs-nav.d.ts +22 -0
- package/dist/lib/components/ui/primitives/tabs/tabs-selectors.d.ts +8 -0
- package/dist/lib/components/ui/primitives/tabs/use-tab-param.d.ts +35 -0
- package/dist/lib/components/ui/primitives/tabs/use-tabs-overflow.d.ts +4 -1
- package/dist/lib/components/ui/primitives/toggle-group/index.d.ts +1 -0
- package/dist/lib/components/ui/primitives/toggle-group/segmented-nav-item.d.ts +20 -0
- package/dist/lib/components/ui/primitives/toggle-group/segmented-nav.d.ts +22 -0
- package/dist/lib/components/ui/primitives/toggle-group/toggle-group.d.ts +4 -3
- package/dist/lib/i18n/resources/en/en.d.ts +5 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +6 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +5 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +6 -1
- package/dist/lib/i18n/resources/resources.d.ts +10 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +31 -54
- package/dist/main.js +42 -42
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +1 -1
- package/dist/{public-B-greXGt.js → public-AXwv1h3v.js} +10 -10
- package/dist/{rich-code-block-Cv6s59vB.js → rich-code-block-qSvkA5rI.js} +5 -5
- package/dist/{sortable-provider-DVmZcglU.js → sortable-provider-DPk-RVEU.js} +3 -3
- package/dist/{spinner-OQAweH2r.js → spinner-PdSk7zEs.js} +1 -1
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-DPx44p6a.js → theme-toggle-CZQckLDd.js} +2 -2
- package/dist/{toggle-group-BkH23Jk4.js → toggle-group-DXXlqid2.js} +1 -1
- package/dist/{toolbar-items-CQ3S_XZw.js → toolbar-items-BmNYNaRB.js} +3 -3
- package/dist/{translate-material-BHL4g2UB.js → translate-material-BlCQ6AW9.js} +1 -1
- package/dist/{translator-BJsjXcAp.js → translator-ChpeKCO3.js} +8 -2
- package/dist/{typography-CwhEwPay.js → typography-C4JSRr2B.js} +1 -1
- package/dist/{use-chat-composer-R0vng5RU.js → use-chat-composer-OUa9akfM.js} +1725 -1719
- package/dist/{use-heading-spy-Brcn0l_J.js → use-heading-spy-K-HUp4o_.js} +4 -4
- package/dist/{use-material-translation-mY3U83TV.js → use-material-translation-DkE9J5NE.js} +1 -1
- package/dist/{use-return-focus-BQ413TNG.js → use-return-focus-KypnR7vv.js} +1 -1
- package/docs/components/README.md +3 -1
- package/docs/components/buttons-and-actions.md +50 -0
- package/docs/components/data-display.md +14 -1
- package/docs/components/data-table-filter-and-lists.md +68 -4
- package/docs/components/form-fields.md +9 -1
- package/docs/components/primitives.md +209 -0
- package/docs/previews/buttons-actions-backlink.webp +0 -0
- package/docs/previews/buttons-actions-sharebutton.webp +0 -0
- package/docs/previews/primitives-segmentednav.webp +0 -0
- package/docs/previews/primitives-tabsnav.webp +0 -0
- package/docs/roadmap.md +2 -1
- package/docs/troubleshooting.md +42 -3
- package/lib/components/components.css +2 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +4 -3
- package/lib/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
- package/lib/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
- package/lib/components/ui/primitives/toggle-group/toggle-group.css +5 -1
- package/package.json +1 -1
- /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;
|
|
@@ -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
|
|
26
|
+
export declare function useTabsOverflow(ref: RefObject<HTMLElement | null>, selectors?: {
|
|
27
|
+
tab: string;
|
|
28
|
+
active: string;
|
|
29
|
+
}): TabsOverflow;
|
|
@@ -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
|
-
*
|
|
29
|
-
*
|
|
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;
|
|
@@ -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
|
};
|
|
@@ -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
|
},
|
|
@@ -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
|
};
|
|
@@ -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
|
},
|
|
@@ -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
|
};
|
|
@@ -4289,6 +4294,8 @@ export declare const resources: {
|
|
|
4289
4294
|
"number-field": {
|
|
4290
4295
|
decrease: string;
|
|
4291
4296
|
increase: string;
|
|
4297
|
+
"decrease-named": string;
|
|
4298
|
+
"increase-named": string;
|
|
4292
4299
|
};
|
|
4293
4300
|
"textarea-field": {
|
|
4294
4301
|
count: string;
|
|
@@ -4341,6 +4348,9 @@ export declare const resources: {
|
|
|
4341
4348
|
"page-failed-title": string;
|
|
4342
4349
|
"back-to-start": string;
|
|
4343
4350
|
};
|
|
4351
|
+
share: {
|
|
4352
|
+
share: string;
|
|
4353
|
+
};
|
|
4344
4354
|
"language-switcher": {
|
|
4345
4355
|
label: string;
|
|
4346
4356
|
};
|