@nizivo/react 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES +12 -5
- package/dist/_engines/react-aria/dialog.client.js +16 -24
- package/dist/_engines/react-aria/drawer.client.js +8 -0
- package/dist/_engines/react-aria/file-upload.client.js +50 -0
- package/dist/_engines/react-aria/menu.client.js +17 -13
- package/dist/_engines/react-aria/open-state.client.js +53 -0
- package/dist/_engines/react-aria/outside-press.client.js +61 -0
- package/dist/_engines/react-aria/overlay.client.js +6 -1
- package/dist/_engines/react-aria/popover.client.js +148 -0
- package/dist/_engines/react-aria/popup.client.js +31 -5
- package/dist/_engines/react-aria/select.client.js +22 -12
- package/dist/_engines/react-aria/toast.client.js +38 -0
- package/dist/_engines/react-aria/tooltip.client.js +11 -11
- package/dist/_internal/data-status.d.ts +3 -0
- package/dist/_internal/data-status.js +13 -0
- package/dist/_internal/glyphs.js +54 -1
- package/dist/_internal/modal.client.js +54 -0
- package/dist/_internal/nested-focus.js +33 -0
- package/dist/alert/alert-dismiss.client.d.ts +1 -1
- package/dist/alert/alert-dismiss.client.js +3 -1
- package/dist/app-shell/app-shell.d.ts +24 -0
- package/dist/app-shell/app-shell.js +56 -0
- package/dist/app-shell/index.d.ts +2 -0
- package/dist/app-shell/index.js +1 -0
- package/dist/avatar/avatar.d.ts +96 -0
- package/dist/avatar/avatar.js +94 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +1 -0
- package/dist/banner/banner-dismiss.client.d.ts +32 -0
- package/dist/banner/banner-dismiss.client.js +38 -0
- package/dist/banner/banner.d.ts +34 -0
- package/dist/banner/banner.js +47 -0
- package/dist/banner/index.d.ts +3 -0
- package/dist/banner/index.js +3 -0
- package/dist/breadcrumb/breadcrumb.d.ts +46 -0
- package/dist/breadcrumb/breadcrumb.js +46 -0
- package/dist/breadcrumb/breadcrumb.parts.d.ts +6 -0
- package/dist/breadcrumb/breadcrumb.parts.js +9 -0
- package/dist/breadcrumb/index.d.ts +3 -0
- package/dist/breadcrumb/index.js +3 -0
- package/dist/button/button.d.ts +3 -2
- package/dist/card/card.d.ts +9 -2
- package/dist/chip-group/chip-group.client.d.ts +88 -0
- package/dist/chip-group/chip-group.client.js +157 -0
- package/dist/chip-group/index.d.ts +2 -0
- package/dist/chip-group/index.js +1 -0
- package/dist/choice-card/choice-card.client.d.ts +66 -0
- package/dist/choice-card/choice-card.client.js +138 -0
- package/dist/choice-card/index.d.ts +2 -0
- package/dist/choice-card/index.js +1 -0
- package/dist/config/config.client.d.ts +16 -1
- package/dist/config/config.client.js +18 -3
- package/dist/config/index.d.ts +2 -2
- package/dist/contracts/index.d.ts +1 -1
- package/dist/css/app-shell.css +2 -0
- package/dist/css/avatar.css +2 -0
- package/dist/css/banner.css +2 -0
- package/dist/css/base.css +1 -1
- package/dist/css/breadcrumb.css +2 -0
- package/dist/css/card.css +1 -1
- package/dist/css/chip-group.css +2 -0
- package/dist/css/choice-card.css +2 -0
- package/dist/css/delta.css +1 -1
- package/dist/css/drawer.css +2 -0
- package/dist/css/file-upload.css +2 -0
- package/dist/css/form.css +2 -0
- package/dist/css/heading.css +1 -1
- package/dist/css/kpi-tile.css +2 -0
- package/dist/css/metric.css +2 -0
- package/dist/css/mobile-tab-bar.css +2 -0
- package/dist/css/mobile-top-bar.css +2 -0
- package/dist/css/motion.css +2 -0
- package/dist/css/nav-item.css +2 -0
- package/dist/css/number-value.css +2 -0
- package/dist/css/page-header.css +2 -0
- package/dist/css/pagination.css +2 -0
- package/dist/css/password-input.css +2 -0
- package/dist/css/popover.css +2 -0
- package/dist/css/ranked-list.css +2 -0
- package/dist/css/search-field.css +2 -0
- package/dist/css/sidebar.css +2 -0
- package/dist/css/split.css +2 -0
- package/dist/css/sticky-bar.css +2 -0
- package/dist/css/table-selection.css +2 -0
- package/dist/css/table.css +2 -0
- package/dist/css/text.css +1 -1
- package/dist/css/toast.css +2 -0
- package/dist/css/top-bar.css +2 -0
- package/dist/css/trend-card.css +2 -0
- package/dist/dialog/dialog.client.d.ts +1 -1
- package/dist/dialog/dialog.client.js +15 -37
- package/dist/drawer/drawer.client.d.ts +25 -0
- package/dist/drawer/drawer.client.js +154 -0
- package/dist/drawer/drawer.contract.d.ts +98 -0
- package/dist/drawer/drawer.parts.d.ts +6 -0
- package/dist/drawer/drawer.parts.js +16 -0
- package/dist/drawer/index.d.ts +5 -0
- package/dist/drawer/index.js +3 -0
- package/dist/field/field-scope.client.js +9 -2
- package/dist/file-upload/file-upload.client.d.ts +9 -0
- package/dist/file-upload/file-upload.client.js +406 -0
- package/dist/file-upload/file-upload.contract.d.ts +112 -0
- package/dist/file-upload/index.d.ts +3 -0
- package/dist/file-upload/index.js +1 -0
- package/dist/file-upload/seam.d.ts +1 -0
- package/dist/form/form.client.d.ts +38 -0
- package/dist/form/form.client.js +127 -0
- package/dist/form/form.d.ts +36 -0
- package/dist/form/form.js +29 -0
- package/dist/form/index.d.ts +4 -0
- package/dist/form/index.js +4 -0
- package/dist/form/submit-button.client.d.ts +20 -0
- package/dist/form/submit-button.client.js +19 -0
- package/dist/heading/heading.d.ts +4 -1
- package/dist/i18n/format-label.d.ts +24 -0
- package/dist/i18n/format-label.js +19 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.js +1 -0
- package/dist/icon-button/icon-button.client.js +1 -1
- package/dist/icon-button/icon-button.js +1 -1
- package/dist/index.d.ts +84 -5
- package/dist/index.js +49 -4
- package/dist/kpi-tile/index.d.ts +2 -0
- package/dist/kpi-tile/index.js +1 -0
- package/dist/kpi-tile/kpi-tile.d.ts +30 -0
- package/dist/kpi-tile/kpi-tile.js +48 -0
- package/dist/locales/en-US.d.ts +77 -0
- package/dist/locales/en-US.js +83 -0
- package/dist/menu/menu.contract.d.ts +1 -1
- package/dist/metric/index.d.ts +2 -0
- package/dist/metric/index.js +1 -0
- package/dist/metric/metric.d.ts +72 -0
- package/dist/metric/metric.js +116 -0
- package/dist/mobile-tab-bar/index.d.ts +4 -0
- package/dist/mobile-tab-bar/index.js +4 -0
- package/dist/mobile-tab-bar/mobile-tab-bar-inset.client.js +38 -0
- package/dist/mobile-tab-bar/mobile-tab-bar-more.client.d.ts +26 -0
- package/dist/mobile-tab-bar/mobile-tab-bar-more.client.js +60 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.d.ts +39 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.js +54 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.parts.d.ts +6 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.parts.js +9 -0
- package/dist/mobile-top-bar/index.d.ts +2 -0
- package/dist/mobile-top-bar/index.js +1 -0
- package/dist/mobile-top-bar/mobile-top-bar.d.ts +17 -0
- package/dist/mobile-top-bar/mobile-top-bar.js +31 -0
- package/dist/motion/count-up.client.d.ts +39 -0
- package/dist/motion/count-up.client.js +109 -0
- package/dist/motion/index.d.ts +2 -0
- package/dist/motion/index.js +1 -0
- package/dist/nav-item/index.d.ts +2 -0
- package/dist/nav-item/index.js +1 -0
- package/dist/nav-item/nav-item.d.ts +35 -0
- package/dist/nav-item/nav-item.js +50 -0
- package/dist/number-value/index.d.ts +2 -0
- package/dist/number-value/index.js +1 -0
- package/dist/number-value/number-value.d.ts +25 -0
- package/dist/number-value/number-value.js +26 -0
- package/dist/page-header/index.d.ts +2 -0
- package/dist/page-header/index.js +1 -0
- package/dist/page-header/page-header.d.ts +19 -0
- package/dist/page-header/page-header.js +39 -0
- package/dist/pagination/index.d.ts +2 -0
- package/dist/pagination/index.js +1 -0
- package/dist/pagination/pagination.d.ts +74 -0
- package/dist/pagination/pagination.js +136 -0
- package/dist/password-input/index.d.ts +2 -0
- package/dist/password-input/index.js +1 -0
- package/dist/password-input/password-input.client.d.ts +52 -0
- package/dist/password-input/password-input.client.js +106 -0
- package/dist/popover/index.d.ts +5 -0
- package/dist/popover/index.js +3 -0
- package/dist/popover/popover.client.d.ts +20 -0
- package/dist/popover/popover.client.js +113 -0
- package/dist/popover/popover.contract.d.ts +88 -0
- package/dist/popover/popover.parts.d.ts +6 -0
- package/dist/popover/popover.parts.js +13 -0
- package/dist/ranked-list/index.d.ts +3 -0
- package/dist/ranked-list/index.js +3 -0
- package/dist/ranked-list/ranked-list.d.ts +85 -0
- package/dist/ranked-list/ranked-list.js +153 -0
- package/dist/ranked-list/ranked-list.parts.d.ts +6 -0
- package/dist/ranked-list/ranked-list.parts.js +10 -0
- package/dist/search-field/index.d.ts +2 -0
- package/dist/search-field/index.js +1 -0
- package/dist/search-field/search-field.client.d.ts +55 -0
- package/dist/search-field/search-field.client.js +136 -0
- package/dist/select/select.contract.d.ts +1 -1
- package/dist/sidebar/index.d.ts +4 -0
- package/dist/sidebar/index.js +4 -0
- package/dist/sidebar/sidebar-item.client.d.ts +10 -0
- package/dist/sidebar/sidebar-item.client.js +55 -0
- package/dist/sidebar/sidebar.d.ts +45 -0
- package/dist/sidebar/sidebar.js +62 -0
- package/dist/sidebar/sidebar.parts.d.ts +6 -0
- package/dist/sidebar/sidebar.parts.js +11 -0
- package/dist/split/index.d.ts +3 -0
- package/dist/split/index.js +3 -0
- package/dist/split/split.d.ts +28 -0
- package/dist/split/split.js +33 -0
- package/dist/split/split.parts.d.ts +6 -0
- package/dist/split/split.parts.js +10 -0
- package/dist/sticky-bar/index.d.ts +2 -0
- package/dist/sticky-bar/index.js +1 -0
- package/dist/sticky-bar/sticky-bar.d.ts +16 -0
- package/dist/sticky-bar/sticky-bar.js +26 -0
- package/dist/styles.css +66 -7
- package/dist/table/index.d.ts +3 -0
- package/dist/table/index.js +3 -0
- package/dist/table/table.d.ts +101 -0
- package/dist/table/table.js +121 -0
- package/dist/table/table.parts.d.ts +6 -0
- package/dist/table/table.parts.js +18 -0
- package/dist/table-selection/index.d.ts +3 -0
- package/dist/table-selection/index.js +3 -0
- package/dist/table-selection/table-selection.client.d.ts +14 -0
- package/dist/table-selection/table-selection.client.js +84 -0
- package/dist/table-selection/table-selection.d.ts +34 -0
- package/dist/table-selection/table-selection.js +50 -0
- package/dist/text/text.d.ts +13 -2
- package/dist/toast/index.d.ts +4 -0
- package/dist/toast/index.js +3 -0
- package/dist/toast/seam.d.ts +2 -0
- package/dist/toast/store.d.ts +19 -0
- package/dist/toast/store.js +136 -0
- package/dist/toast/toast.contract.d.ts +56 -0
- package/dist/toast/toaster.client.d.ts +10 -0
- package/dist/toast/toaster.client.js +305 -0
- package/dist/tooltip/tooltip.contract.d.ts +1 -1
- package/dist/top-bar/index.d.ts +2 -0
- package/dist/top-bar/index.js +1 -0
- package/dist/top-bar/top-bar.d.ts +17 -0
- package/dist/top-bar/top-bar.js +35 -0
- package/dist/trend-card/index.d.ts +2 -0
- package/dist/trend-card/index.js +1 -0
- package/dist/trend-card/trend-card.d.ts +34 -0
- package/dist/trend-card/trend-card.js +74 -0
- package/package.json +167 -4
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
3
|
+
//#region src/banner/banner.d.ts
|
|
4
|
+
/** Figma "Tone": `brand` is Figma's Promo (handoff Q25, D-bq). */
|
|
5
|
+
export type BannerTone = "brand" | "warning";
|
|
6
|
+
export interface BannerState {
|
|
7
|
+
tone: BannerTone;
|
|
8
|
+
}
|
|
9
|
+
export interface BannerProps extends Omit<ComponentPropsWithRef<"div">, "title"> {
|
|
10
|
+
/** @default 'brand' */
|
|
11
|
+
tone?: BannerTone;
|
|
12
|
+
/** One line, Heading/H4. The description is `children`. */
|
|
13
|
+
title?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* A 72 px picture before the text, such as Figma's product render on the brand banner:
|
|
16
|
+
* `<img src="…" alt="" width={72} height={72} />`. Decorative; the text carries the message.
|
|
17
|
+
*/
|
|
18
|
+
media?: ReactNode;
|
|
19
|
+
/** Decorative tone glyph at 24 px, such as a triangle for `warning`; used when there is no `media`. */
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
/** One control after the text, such as `<Button variant="primary">Add storefront</Button>`. */
|
|
22
|
+
action?: ReactNode;
|
|
23
|
+
/** `<BannerDismiss onDismiss={…} />`; leave it out for a banner that blocks work and stays. */
|
|
24
|
+
dismiss?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* No live role by default: a banner present on page load must not interrupt. Pass `role="status"`
|
|
27
|
+
* for one added after a user action.
|
|
28
|
+
*/
|
|
29
|
+
role?: ComponentPropsWithRef<"div">["role"];
|
|
30
|
+
render?: RenderProp<BannerState>;
|
|
31
|
+
}
|
|
32
|
+
/** A page-wide message under the header (Figma Banner 7275:15120): one at a time. */
|
|
33
|
+
export declare function Banner({ tone, title, media, icon, action, dismiss, render, className, children, ...rest }: BannerProps): ReactElement;
|
|
34
|
+
//#endregion
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cx } from "../_internal/cx.js";
|
|
2
|
+
import { renderElement } from "../contracts/render.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/banner/banner.tsx
|
|
5
|
+
/** A page-wide message under the header (Figma Banner 7275:15120): one at a time. */
|
|
6
|
+
function Banner({ tone = "brand", title, media, icon, action, dismiss, render, className, children, ...rest }) {
|
|
7
|
+
return renderElement("div", render, { tone }, {
|
|
8
|
+
"data-slot": "banner",
|
|
9
|
+
"data-tone": tone,
|
|
10
|
+
...rest,
|
|
11
|
+
className: cx("nz-banner", className),
|
|
12
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
+
media != null ? /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: "nz-banner-media",
|
|
15
|
+
"data-slot": "banner-media",
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
children: media
|
|
18
|
+
}) : icon != null && /* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "nz-banner-icon",
|
|
20
|
+
"data-slot": "banner-icon",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
children: icon
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "nz-banner-content",
|
|
26
|
+
"data-slot": "banner-content",
|
|
27
|
+
children: [title != null && /* @__PURE__ */ jsx("div", {
|
|
28
|
+
className: "nz-banner-title",
|
|
29
|
+
"data-slot": "banner-title",
|
|
30
|
+
children: title
|
|
31
|
+
}), children != null && children !== false && children !== "" && /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "nz-banner-description",
|
|
33
|
+
"data-slot": "banner-description",
|
|
34
|
+
children
|
|
35
|
+
})]
|
|
36
|
+
}),
|
|
37
|
+
action != null && /* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: "nz-banner-action",
|
|
39
|
+
"data-slot": "banner-action",
|
|
40
|
+
children: action
|
|
41
|
+
}),
|
|
42
|
+
dismiss
|
|
43
|
+
] })
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Banner };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Banner, BannerProps, BannerState, BannerTone } from "./banner.js";
|
|
2
|
+
import { BannerDismiss, BannerDismissLabels, BannerDismissProps } from "./banner-dismiss.client.js";
|
|
3
|
+
export { Banner, BannerDismiss, type BannerDismissLabels, type BannerDismissProps, type BannerProps, type BannerState, type BannerTone };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
3
|
+
//#region src/breadcrumb/breadcrumb.d.ts
|
|
4
|
+
/** Breadcrumb's own strings (§16.4): serialisable, English defaults. */
|
|
5
|
+
export interface BreadcrumbLabels {
|
|
6
|
+
/** The landmark's name. @default 'Breadcrumb' */
|
|
7
|
+
nav: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BreadcrumbRootProps extends ComponentPropsWithRef<"nav"> {
|
|
10
|
+
/**
|
|
11
|
+
* Replaces the chevron between levels on every `Breadcrumb.Item` that sets none. It is decorative
|
|
12
|
+
* (`aria-hidden`), so a character such as "/" is fine. It is not mirrored under `dir="rtl"`.
|
|
13
|
+
*/
|
|
14
|
+
separator?: ReactNode;
|
|
15
|
+
/** An `aria-label` wins over `labels.nav`. */
|
|
16
|
+
labels?: Partial<BreadcrumbLabels>;
|
|
17
|
+
/** Must render a navigation landmark (a `<nav>`, or an element with `role="navigation"`). */
|
|
18
|
+
render?: RenderProp<Record<string, never>>;
|
|
19
|
+
/** `Breadcrumb.Item` elements, the root of the site first. */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface BreadcrumbItemState {
|
|
23
|
+
current: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface BreadcrumbItemProps extends Omit<ComponentPropsWithRef<"a">, "children"> {
|
|
26
|
+
/**
|
|
27
|
+
* The page being shown: renders text with `aria-current="page"` instead of a link (Figma: the last
|
|
28
|
+
* item, Label/M Strong). @default false
|
|
29
|
+
*/
|
|
30
|
+
current?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The router's link, for example `render={<Link href="/products" />}`. It must render an `<a>`.
|
|
33
|
+
* Ignored on the current item, which is not a link; so are the other anchor props (`href`), while
|
|
34
|
+
* `className` goes on whichever element renders.
|
|
35
|
+
*/
|
|
36
|
+
render?: RenderProp<BreadcrumbItemState>;
|
|
37
|
+
/**
|
|
38
|
+
* The mark before this level (none is drawn before the first). Only the default chevron mirrors
|
|
39
|
+
* under `dir="rtl"`. @default the chevron glyph
|
|
40
|
+
*/
|
|
41
|
+
separator?: ReactNode;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export declare function BreadcrumbRoot({ separator, labels, render, className, children, ...rest }: BreadcrumbRootProps): ReactElement;
|
|
45
|
+
export declare function BreadcrumbItem({ current, render, separator, className, children, ...rest }: BreadcrumbItemProps): ReactElement;
|
|
46
|
+
//#endregion
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cx } from "../_internal/cx.js";
|
|
2
|
+
import { renderElement } from "../contracts/render.js";
|
|
3
|
+
import { ChevronGlyph } from "../_internal/glyphs.js";
|
|
4
|
+
import { Children, cloneElement, isValidElement } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/breadcrumb/breadcrumb.tsx
|
|
7
|
+
function BreadcrumbRoot({ separator, labels, render, className, children, ...rest }) {
|
|
8
|
+
const items = separator === void 0 ? children : Children.map(children, (child) => isValidElement(child) && child.type === BreadcrumbItem && child.props.separator === void 0 ? cloneElement(child, { separator }) : child);
|
|
9
|
+
return renderElement("nav", render, {}, {
|
|
10
|
+
"data-slot": "breadcrumb",
|
|
11
|
+
"aria-label": labels?.nav ?? "Breadcrumb",
|
|
12
|
+
...rest,
|
|
13
|
+
className: cx("nz-breadcrumb", className),
|
|
14
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
15
|
+
className: "nz-breadcrumb-list",
|
|
16
|
+
"data-slot": "breadcrumb-list",
|
|
17
|
+
children: items
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function BreadcrumbItem({ current = false, render, separator, className, children, ...rest }) {
|
|
22
|
+
const level = current ? /* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: cx("nz-breadcrumb-current", className),
|
|
24
|
+
"data-slot": "breadcrumb-current",
|
|
25
|
+
"aria-current": "page",
|
|
26
|
+
children
|
|
27
|
+
}) : renderElement("a", render, { current }, {
|
|
28
|
+
"data-slot": "breadcrumb-link",
|
|
29
|
+
...rest,
|
|
30
|
+
className: cx("nz-breadcrumb-link", className),
|
|
31
|
+
children
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
34
|
+
className: "nz-breadcrumb-item",
|
|
35
|
+
"data-slot": "breadcrumb-item",
|
|
36
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
37
|
+
className: "nz-breadcrumb-separator",
|
|
38
|
+
"data-slot": "breadcrumb-separator",
|
|
39
|
+
"data-mirror": separator === void 0 ? "rtl" : void 0,
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
children: separator ?? /* @__PURE__ */ jsx(ChevronGlyph, {})
|
|
42
|
+
}), level]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { BreadcrumbItem, BreadcrumbRoot };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BreadcrumbItem, BreadcrumbRoot } from "./breadcrumb.js";
|
|
2
|
+
declare namespace breadcrumb_parts_d_exports {
|
|
3
|
+
export { BreadcrumbItem as Item, BreadcrumbRoot as Root };
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { BreadcrumbItem as Item, BreadcrumbRoot as Root, breadcrumb_parts_d_exports };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { BreadcrumbItem, BreadcrumbRoot } from "./breadcrumb.js";
|
|
3
|
+
//#region src/breadcrumb/breadcrumb.parts.ts
|
|
4
|
+
var breadcrumb_parts_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Item: () => BreadcrumbItem,
|
|
6
|
+
Root: () => BreadcrumbRoot
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { BreadcrumbItem as Item, BreadcrumbRoot as Root, breadcrumb_parts_exports };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BreadcrumbItem, BreadcrumbItemProps, BreadcrumbItemState, BreadcrumbLabels, BreadcrumbRoot, BreadcrumbRootProps } from "./breadcrumb.js";
|
|
2
|
+
import { breadcrumb_parts_d_exports } from "./breadcrumb.parts.js";
|
|
3
|
+
export { breadcrumb_parts_d_exports as Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbItemState, type BreadcrumbLabels, BreadcrumbRoot, type BreadcrumbRootProps };
|
package/dist/button/button.d.ts
CHANGED
|
@@ -44,8 +44,9 @@ export interface ButtonProps extends Omit<ComponentPropsWithRef<"button">, "chil
|
|
|
44
44
|
render?: RenderProp<ButtonState>;
|
|
45
45
|
/**
|
|
46
46
|
* Overrides Button's strings, for example `labels={{ pending: 'Wird geladen…' }}`; `pending: ''`
|
|
47
|
-
* shows no text and keeps the label visible. Translation is per instance
|
|
48
|
-
* pass its own.
|
|
47
|
+
* shows no text and keeps the label visible. Translation is per instance: Button is a server
|
|
48
|
+
* part, so `NizivoConfig labels` does not reach it, and an app wraps Button once to pass its own.
|
|
49
|
+
* SubmitButton, its client twin, does read them (`button.pending`).
|
|
49
50
|
*/
|
|
50
51
|
labels?: Partial<ButtonLabels>;
|
|
51
52
|
children?: ReactNode;
|
package/dist/card/card.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { RenderProp } from "../contracts/render.js";
|
|
2
2
|
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
3
3
|
//#region src/card/card.d.ts
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Figma "Style": Surface | Subtle | Inverse, plus the tinted surfaces of the dashboard widgets (KPI
|
|
6
|
+
* Tile "Tinted", Insight Card Brand and Accent; figma/04 §2/§3, M41): `brand` (bg/brand-subtle) and
|
|
7
|
+
* `accent` (bg/accent-subtle).
|
|
8
|
+
*/
|
|
9
|
+
export type CardTone = "surface" | "subtle" | "inverse" | "brand" | "accent";
|
|
6
10
|
export type CardTitleLevel = 2 | 3 | 4 | 5 | 6;
|
|
7
11
|
/** 24 px (`md`, Figma) or 20 px (`sm`). */
|
|
8
12
|
export type CardPadding = "sm" | "md";
|
|
@@ -16,6 +20,9 @@ export interface CardRootState {
|
|
|
16
20
|
export interface CardRootProps extends ComponentPropsWithRef<"div"> {
|
|
17
21
|
/**
|
|
18
22
|
* `inverse` sets `data-nz-scheme="inverse"`, so every token inside resolves in the inverse scheme.
|
|
23
|
+
* Every tone declares `--nz-surface`, the colour the card paints, for children to read with a
|
|
24
|
+
* fallback (`var(--nz-surface, var(--nz-bg-surface))`); on `brand` and `accent` a Delta pill
|
|
25
|
+
* inside is `bg/surface`, so it shows on the tint (M42).
|
|
19
26
|
* @default 'surface'
|
|
20
27
|
*/
|
|
21
28
|
tone?: CardTone;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ChangeDetails } from "../contracts/details.js";
|
|
3
|
+
import { ComponentPropsWithRef, JSX, ReactNode } from "react";
|
|
4
|
+
//#region src/chip-group/chip-group.client.d.ts
|
|
5
|
+
/** Why the value changed: the user checked or cleared an input (a pointer or a key). */
|
|
6
|
+
export type ChipGroupChangeReason = "input";
|
|
7
|
+
/** ChipGroup's own strings (§16.4): serialisable, English defaults. */
|
|
8
|
+
export interface ChipGroupLabels {
|
|
9
|
+
/**
|
|
10
|
+
* Describes an `unavailable` chip (out of stock), read after its name; the strike-through is
|
|
11
|
+
* only visual. @default 'Unavailable'
|
|
12
|
+
*/
|
|
13
|
+
unavailable: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ChipGroupState {
|
|
16
|
+
multiple: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
invalid: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** What `onValueChange` receives: the checked value, or with `multiple` every checked value. */
|
|
21
|
+
export type ChipGroupValue<M extends boolean> = M extends true ? string[] : string;
|
|
22
|
+
/**
|
|
23
|
+
* `M` is `true` when `multiple` is: TypeScript infers it from the prop, so `value`, `defaultValue`
|
|
24
|
+
* and `onValueChange` take arrays exactly when the chips are checkboxes.
|
|
25
|
+
*/
|
|
26
|
+
export interface ChipGroupProps<M extends boolean = false> extends Omit<ComponentPropsWithRef<"div">, "defaultValue" | "onChange" | "role"> {
|
|
27
|
+
/**
|
|
28
|
+
* Any number of values: native checkboxes under `role="group"`. Without it, one value: native
|
|
29
|
+
* radios under `role="radiogroup"`. @default false
|
|
30
|
+
*/
|
|
31
|
+
multiple?: M;
|
|
32
|
+
/** Controlled: the checked chip's `value` (or `null` for none); with `multiple`, every one's. */
|
|
33
|
+
value?: M extends true ? readonly string[] : string | null;
|
|
34
|
+
/** The chip, or with `multiple` the chips, checked at first (`form.reset()` returns to them). */
|
|
35
|
+
defaultValue?: M extends true ? readonly string[] : string;
|
|
36
|
+
/**
|
|
37
|
+
* Called when the user checks a chip (or, with `multiple`, checks or clears one), with every checked
|
|
38
|
+
* value in document order; `details.event` is the native `change` event.
|
|
39
|
+
*/
|
|
40
|
+
onValueChange?: (value: ChipGroupValue<M>, details: ChangeDetails<ChipGroupChangeReason>) => void;
|
|
41
|
+
/**
|
|
42
|
+
* A choice must be made before the form submits. One value only: on checkboxes the browser would
|
|
43
|
+
* require every one.
|
|
44
|
+
*/
|
|
45
|
+
required?: M extends true ? never : boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The inputs' shared name, and the `FormData` key (a multiple group submits one entry per checked
|
|
48
|
+
* chip). Without one (and outside a named Field), a generated name groups the inputs.
|
|
49
|
+
*/
|
|
50
|
+
name?: string;
|
|
51
|
+
/** The `<form>` the inputs belong to, when they are outside it. */
|
|
52
|
+
form?: string;
|
|
53
|
+
/** Disables every chip. */
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
/** An error message is presented (set by a Field). */
|
|
56
|
+
invalid?: boolean;
|
|
57
|
+
labels?: Partial<ChipGroupLabels>;
|
|
58
|
+
render?: RenderProp<ChipGroupState>;
|
|
59
|
+
/** `Chip` elements. */
|
|
60
|
+
children?: ReactNode;
|
|
61
|
+
}
|
|
62
|
+
export interface ChipState {
|
|
63
|
+
disabled: boolean;
|
|
64
|
+
unavailable: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface ChipProps extends Omit<ComponentPropsWithRef<"label">, "htmlFor" | "aria-label"> {
|
|
67
|
+
/** This chip's value: what `onValueChange` receives and the form submits. */
|
|
68
|
+
value: string;
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Out of stock, or otherwise not available: it keeps its colour, gets a strike-through and is
|
|
72
|
+
* described as `labels.unavailable`. It can still be chosen (to show "Notify me", for example);
|
|
73
|
+
* add `disabled` to stop that. @default false
|
|
74
|
+
*/
|
|
75
|
+
unavailable?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* A swatch or glyph before the text (Figma Type=Colour), in a 24 px circle; decorative. A colour
|
|
78
|
+
* is data: pass an element with that background, such as `<span style={{ background: '#2e5a3c' }} />`.
|
|
79
|
+
*/
|
|
80
|
+
leading?: ReactNode;
|
|
81
|
+
/** Names a chip with no text (a swatch only): it goes on the input, which is what is announced. */
|
|
82
|
+
"aria-label"?: string;
|
|
83
|
+
render?: RenderProp<ChipState>;
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
}
|
|
86
|
+
export declare function ChipGroup<M extends boolean = false>({ multiple: multipleProp, value: valueProp, defaultValue: defaultValueProp, onValueChange: onValueChangeProp, name, form, required: requiredProp, disabled, invalid, labels: labelsProp, "aria-describedby": describedBy, "aria-labelledby": labelledBy, render, className, children, ...rest }: ChipGroupProps<M>): JSX.Element;
|
|
87
|
+
export declare function Chip({ value, disabled, unavailable, leading, "aria-label": ariaLabel, render, className, children, ...rest }: ChipProps): JSX.Element;
|
|
88
|
+
//#endregion
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../_internal/cx.js";
|
|
3
|
+
import { mergeProps } from "../contracts/merge-props.js";
|
|
4
|
+
import { renderElement } from "../contracts/render.js";
|
|
5
|
+
import { useLabels } from "../config/config.client.js";
|
|
6
|
+
import { details } from "../contracts/details.js";
|
|
7
|
+
import { stateAttrs } from "../contracts/state.js";
|
|
8
|
+
import { useFieldControl } from "../field/field-scope.client.js";
|
|
9
|
+
import { clearFocus, definedProps, markFocus, markKeyDown } from "../_internal/nested-focus.js";
|
|
10
|
+
import { createContext, use, useId, useMemo } from "react";
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
//#region src/chip-group/chip-group.client.tsx
|
|
13
|
+
const GroupContext = createContext(null);
|
|
14
|
+
function ChipGroup({ multiple: multipleProp, value: valueProp, defaultValue: defaultValueProp, onValueChange: onValueChangeProp, name, form, required: requiredProp, disabled, invalid, labels: labelsProp, "aria-describedby": describedBy, "aria-labelledby": labelledBy, render, className, children, ...rest }) {
|
|
15
|
+
const labels = useLabels("chipGroup", labelsProp);
|
|
16
|
+
const multiple = multipleProp === true;
|
|
17
|
+
const value = valueProp;
|
|
18
|
+
const defaultValue = defaultValueProp;
|
|
19
|
+
const required = requiredProp;
|
|
20
|
+
const onValueChange = onValueChangeProp;
|
|
21
|
+
const field = useFieldControl({
|
|
22
|
+
name,
|
|
23
|
+
required: multiple ? false : required,
|
|
24
|
+
disabled,
|
|
25
|
+
invalid,
|
|
26
|
+
"aria-describedby": describedBy
|
|
27
|
+
});
|
|
28
|
+
const generated = useId();
|
|
29
|
+
const { required: inputRequired, onInvalid, onInput, onBlur } = field.controlProps;
|
|
30
|
+
const groupName = field.name ?? generated;
|
|
31
|
+
const unavailable = labels?.unavailable ?? "Unavailable";
|
|
32
|
+
const group = useMemo(() => {
|
|
33
|
+
const controlled = value !== void 0;
|
|
34
|
+
const has = (list, item) => typeof list === "string" ? list === item : list?.includes(item) === true;
|
|
35
|
+
return {
|
|
36
|
+
name: groupName,
|
|
37
|
+
multiple,
|
|
38
|
+
checkedProps: (item) => controlled ? { checked: has(value, item) } : { defaultChecked: has(defaultValue, item) },
|
|
39
|
+
disabled: field.disabled,
|
|
40
|
+
invalid: field.invalid,
|
|
41
|
+
unavailable,
|
|
42
|
+
input: definedProps({
|
|
43
|
+
required: multiple ? void 0 : inputRequired,
|
|
44
|
+
form,
|
|
45
|
+
onInvalid,
|
|
46
|
+
onInput,
|
|
47
|
+
onBlur
|
|
48
|
+
}),
|
|
49
|
+
onChange(item, event) {
|
|
50
|
+
if (onValueChange === void 0) return;
|
|
51
|
+
const target = event.currentTarget;
|
|
52
|
+
if (!multiple) {
|
|
53
|
+
if (target.checked) onValueChange(item, details("input", event.nativeEvent));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const checked = [...target.closest("[data-slot=\"chip-group\"]")?.querySelectorAll("input[data-slot=\"chip-input\"]") ?? []].filter((input) => input.name === groupName && input.checked).map((input) => input.value);
|
|
57
|
+
onValueChange(checked, details("input", event.nativeEvent));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}, [
|
|
61
|
+
groupName,
|
|
62
|
+
multiple,
|
|
63
|
+
value,
|
|
64
|
+
defaultValue,
|
|
65
|
+
field.disabled,
|
|
66
|
+
field.invalid,
|
|
67
|
+
unavailable,
|
|
68
|
+
inputRequired,
|
|
69
|
+
form,
|
|
70
|
+
onInvalid,
|
|
71
|
+
onInput,
|
|
72
|
+
onBlur,
|
|
73
|
+
onValueChange
|
|
74
|
+
]);
|
|
75
|
+
return /* @__PURE__ */ jsx(GroupContext, {
|
|
76
|
+
value: group,
|
|
77
|
+
children: renderElement("div", render, {
|
|
78
|
+
multiple,
|
|
79
|
+
disabled: field.disabled,
|
|
80
|
+
invalid: field.invalid
|
|
81
|
+
}, {
|
|
82
|
+
"data-slot": "chip-group",
|
|
83
|
+
...stateAttrs({
|
|
84
|
+
disabled: field.disabled,
|
|
85
|
+
invalid: field.invalid,
|
|
86
|
+
required: field.required
|
|
87
|
+
}),
|
|
88
|
+
...rest,
|
|
89
|
+
role: multiple ? "group" : "radiogroup",
|
|
90
|
+
"aria-labelledby": labelledBy ?? field.labelledBy,
|
|
91
|
+
"aria-describedby": field.describedBy,
|
|
92
|
+
"aria-invalid": !multiple && field.invalid ? true : void 0,
|
|
93
|
+
"aria-required": !multiple && field.required ? true : void 0,
|
|
94
|
+
className: cx("nz-chip-group", className),
|
|
95
|
+
children
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function Chip({ value, disabled, unavailable = false, leading, "aria-label": ariaLabel, render, className, children, ...rest }) {
|
|
100
|
+
const group = use(GroupContext);
|
|
101
|
+
if (group === null) throw new Error("Chip must be inside ChipGroup");
|
|
102
|
+
const off = disabled === true || group.disabled;
|
|
103
|
+
const noteId = useId();
|
|
104
|
+
const strike = unavailable ? /* @__PURE__ */ jsx("span", {
|
|
105
|
+
className: "nz-chip-strike",
|
|
106
|
+
"data-slot": "chip-strike",
|
|
107
|
+
"aria-hidden": "true"
|
|
108
|
+
}) : null;
|
|
109
|
+
return renderElement("label", render, {
|
|
110
|
+
disabled: off,
|
|
111
|
+
unavailable
|
|
112
|
+
}, {
|
|
113
|
+
"data-slot": "chip",
|
|
114
|
+
...stateAttrs({ disabled: off }),
|
|
115
|
+
...rest,
|
|
116
|
+
className: cx("nz-chip", className),
|
|
117
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx("input", {
|
|
119
|
+
...mergeProps(group.input, {
|
|
120
|
+
onChange: (event) => group.onChange(value, event),
|
|
121
|
+
onFocus: markFocus,
|
|
122
|
+
onBlur: clearFocus,
|
|
123
|
+
onKeyDown: markKeyDown
|
|
124
|
+
}),
|
|
125
|
+
...group.checkedProps(value),
|
|
126
|
+
type: group.multiple ? "checkbox" : "radio",
|
|
127
|
+
className: "nz-chip-input",
|
|
128
|
+
"data-slot": "chip-input",
|
|
129
|
+
name: group.name,
|
|
130
|
+
value,
|
|
131
|
+
disabled: off || void 0,
|
|
132
|
+
"aria-label": ariaLabel,
|
|
133
|
+
"aria-describedby": unavailable ? noteId : void 0,
|
|
134
|
+
"aria-invalid": group.multiple && group.invalid ? true : void 0
|
|
135
|
+
}),
|
|
136
|
+
leading != null && /* @__PURE__ */ jsxs("span", {
|
|
137
|
+
className: "nz-chip-leading",
|
|
138
|
+
"data-slot": "chip-leading",
|
|
139
|
+
"aria-hidden": "true",
|
|
140
|
+
children: [leading, strike]
|
|
141
|
+
}),
|
|
142
|
+
children != null && /* @__PURE__ */ jsx("span", {
|
|
143
|
+
className: "nz-chip-label",
|
|
144
|
+
"data-slot": "chip-label",
|
|
145
|
+
children
|
|
146
|
+
}),
|
|
147
|
+
leading == null && strike,
|
|
148
|
+
unavailable && /* @__PURE__ */ jsx("span", {
|
|
149
|
+
id: noteId,
|
|
150
|
+
hidden: true,
|
|
151
|
+
children: group.unavailable
|
|
152
|
+
})
|
|
153
|
+
] })
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
export { Chip, ChipGroup };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Chip, ChipGroup, ChipGroupChangeReason, ChipGroupLabels, ChipGroupProps, ChipGroupState, ChipGroupValue, ChipProps, ChipState } from "./chip-group.client.js";
|
|
2
|
+
export { Chip, ChipGroup, type ChipGroupChangeReason, type ChipGroupLabels, type ChipGroupProps, type ChipGroupState, type ChipGroupValue, type ChipProps, type ChipState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Chip, ChipGroup } from "./chip-group.client.js";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ChangeDetails } from "../contracts/details.js";
|
|
3
|
+
import { ComponentPropsWithRef, JSX, ReactNode } from "react";
|
|
4
|
+
//#region src/choice-card/choice-card.client.d.ts
|
|
5
|
+
/** Why the value changed: the user checked a radio (a pointer or a key). */
|
|
6
|
+
export type ChoiceCardChangeReason = "input";
|
|
7
|
+
export interface ChoiceCardGroupState {
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
invalid: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ChoiceCardGroupProps extends Omit<ComponentPropsWithRef<"div">, "defaultValue" | "onChange" | "role"> {
|
|
12
|
+
/** Controlled: the checked card's `value`, or `null` for none. */
|
|
13
|
+
value?: string | null;
|
|
14
|
+
/** The card checked at first (uncontrolled; `form.reset()` returns to it). */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Called when the user checks a card; `details.event` is the native `change` event. */
|
|
17
|
+
onValueChange?: (value: string, details: ChangeDetails<ChoiceCardChangeReason>) => void;
|
|
18
|
+
/**
|
|
19
|
+
* The radios' shared name, and the `FormData` key. Without one (and outside a named Field), a
|
|
20
|
+
* generated name groups the radios.
|
|
21
|
+
*/
|
|
22
|
+
name?: string;
|
|
23
|
+
/** The `<form>` the radios belong to, when they are outside it. */
|
|
24
|
+
form?: string;
|
|
25
|
+
/** A choice must be made before the form submits. */
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/** Disables every card. */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* An error message is presented (set by a Field): the checked card, or every card when none is
|
|
31
|
+
* checked, shows the critical edge.
|
|
32
|
+
*/
|
|
33
|
+
invalid?: boolean;
|
|
34
|
+
render?: RenderProp<ChoiceCardGroupState>;
|
|
35
|
+
/** `ChoiceCard` elements, possibly with other content between them (an "Add" row). */
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export interface ChoiceCardState {
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface ChoiceCardProps extends Omit<ComponentPropsWithRef<"label">, "htmlFor"> {
|
|
42
|
+
/** This card's value: what `onValueChange` receives and the form submits. */
|
|
43
|
+
value: string;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A mark after the radio, such as a card brand's logo (Figma's 44 × 30 Mark); decorative, so put
|
|
47
|
+
* the brand's name in the text too.
|
|
48
|
+
*/
|
|
49
|
+
leading?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* A second line, such as "Expires 08/28". It describes the radio (`aria-describedby`) instead of
|
|
52
|
+
* joining its name.
|
|
53
|
+
*/
|
|
54
|
+
description?: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Content at the card's end, such as a "Default" `Badge` (Figma's Show default): composition, not a
|
|
57
|
+
* prop. Its text joins the radio's name, after `children`.
|
|
58
|
+
*/
|
|
59
|
+
trailing?: ReactNode;
|
|
60
|
+
render?: RenderProp<ChoiceCardState>;
|
|
61
|
+
/** The radio's name, such as "Visa ending in 4242". */
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
}
|
|
64
|
+
export declare function ChoiceCardGroup({ value, defaultValue, onValueChange, name, form, required, disabled, invalid, "aria-describedby": describedBy, "aria-labelledby": labelledBy, render, className, children, ...rest }: ChoiceCardGroupProps): JSX.Element;
|
|
65
|
+
export declare function ChoiceCard({ value, disabled, leading, description, trailing, render, className, children, ...rest }: ChoiceCardProps): JSX.Element;
|
|
66
|
+
//#endregion
|