rift-ds 1.28.0 → 1.30.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/README.md +5 -4
- package/bin/rift-ds.mjs +5 -4
- package/bin/templates/app/components/rift/ColorModeScript.tsx +7 -3
- package/bin/templates/blocks/app/settings/ProfileForm.tsx +98 -0
- package/bin/templates/blocks/app/settings/page.module.css +11 -0
- package/bin/templates/blocks/app/settings/page.tsx +84 -0
- package/bin/templates/blocks/app/shader/page.module.css +75 -0
- package/bin/templates/blocks/app/shader/page.tsx +81 -0
- package/bin/templates/blocks/components/blocks/AppShell.module.css +8 -41
- package/bin/templates/blocks/components/blocks/AppShell.tsx +9 -11
- package/bin/templates/blocks/components/blocks/emberScene.ts +53 -0
- package/bin/templates/blocks/registry.json +24 -0
- package/bin/templates/chat/app/api/chat/feedback/route.ts +0 -3
- package/bin/templates/chat/app/api/chat/followups/route.ts +0 -3
- package/bin/templates/chat/app/api/chat/route.ts +0 -2
- package/chat/ChatLauncher.d.ts +9 -1
- package/chat/ChatLauncher.js +3 -1
- package/chat/threads.js +7 -4
- package/components/Alert/Alert.css +12 -0
- package/components/Alert/Alert.d.ts +2 -0
- package/components/Alert/Alert.js +3 -1
- package/components/Attachment/Attachment.css +92 -0
- package/components/Attachment/FileRow.d.ts +47 -0
- package/components/Attachment/FileRow.js +38 -0
- package/components/Avatar/Avatar.css +14 -0
- package/components/Avatar/Avatar.d.ts +3 -1
- package/components/Avatar/Avatar.js +3 -2
- package/components/Button/Button.css +38 -0
- package/components/Button/Button.d.ts +8 -0
- package/components/Button/Button.js +2 -0
- package/components/Chart/AreaChart.d.ts +2 -0
- package/components/Chart/AreaChart.js +2 -1
- package/components/Chart/BarChart.d.ts +2 -0
- package/components/Chart/BarChart.js +2 -1
- package/components/Chart/ComboChart.d.ts +4 -0
- package/components/Chart/ComboChart.js +4 -2
- package/components/Chart/LineChart.d.ts +2 -0
- package/components/Chart/LineChart.js +2 -1
- package/components/Chart/PieChart.d.ts +4 -4
- package/components/Chart/PieChart.js +1 -1
- package/components/Chart/ScatterChart.d.ts +2 -0
- package/components/Chart/ScatterChart.js +2 -1
- package/components/Checklist/Checklist.css +123 -0
- package/components/Checklist/Checklist.d.ts +66 -0
- package/components/Checklist/Checklist.js +115 -0
- package/components/CircularButton/CircularButton.css +39 -0
- package/components/CircularButton/CircularButton.d.ts +13 -0
- package/components/CircularButton/CircularButton.js +18 -4
- package/components/ColourSwatch/ColourSwatch.css +3 -1
- package/components/ColourSwatch/ColourSwatch.d.ts +5 -3
- package/components/ColourSwatch/ColourSwatch.js +5 -0
- package/components/Combobox/Combobox.d.ts +4 -2
- package/components/Combobox/Combobox.js +7 -3
- package/components/DataTable/DataTable.css +35 -0
- package/components/DataTable/DataTable.d.ts +34 -2
- package/components/DataTable/DataTable.js +58 -5
- package/components/DataTable/columnTypes.d.ts +1 -1
- package/components/DataTable/columnTypes.js +1 -1
- package/components/DateInput/DateInput.d.ts +4 -2
- package/components/DateInput/DateInput.js +7 -3
- package/components/DescriptionList/DescriptionList.css +28 -0
- package/components/DescriptionList/DescriptionList.d.ts +3 -1
- package/components/DescriptionList/DescriptionList.js +4 -3
- package/components/DescriptionList/DescriptionListCopy.js +2 -0
- package/components/Dropdown/Dropdown.d.ts +4 -2
- package/components/Dropdown/Dropdown.js +7 -3
- package/components/EmptyState/EmptyState.css +12 -0
- package/components/EmptyState/EmptyState.d.ts +7 -0
- package/components/EmptyState/EmptyState.js +2 -0
- package/components/EventCalendar/EventCalendar.css +59 -0
- package/components/EventCalendar/EventCalendar.d.ts +24 -2
- package/components/EventCalendar/EventCalendar.js +104 -19
- package/components/FormSection/FormSection.css +70 -0
- package/components/FormSection/FormSection.d.ts +35 -0
- package/components/FormSection/FormSection.js +35 -0
- package/components/Grid/Grid.css +52 -0
- package/components/Grid/Grid.d.ts +30 -0
- package/components/Grid/Grid.js +36 -0
- package/components/Icon/Icon.css +55 -0
- package/components/Icon/Icon.d.ts +27 -0
- package/components/Icon/Icon.js +42 -0
- package/components/NumberInput/NumberInput.d.ts +4 -2
- package/components/NumberInput/NumberInput.js +7 -3
- package/components/OrgChart/OrgChart.css +143 -0
- package/components/OrgChart/OrgChart.d.ts +44 -0
- package/components/OrgChart/OrgChart.js +26 -0
- package/components/PageHeader/PageHeader.css +74 -0
- package/components/PageHeader/PageHeader.d.ts +39 -0
- package/components/PageHeader/PageHeader.js +33 -0
- package/components/Panel/Panel.css +7 -0
- package/components/Panel/Panel.d.ts +5 -2
- package/components/Panel/Panel.js +2 -1
- package/components/ResourceTimeline/ResourceTimeline.css +194 -0
- package/components/ResourceTimeline/ResourceTimeline.d.ts +57 -0
- package/components/ResourceTimeline/ResourceTimeline.js +129 -0
- package/components/ShaderField/useShaderField.js +13 -1
- package/components/ShaderScene/ShaderScene.d.ts +39 -15
- package/components/ShaderScene/ShaderScene.js +87 -6
- package/components/ShaderScene/assemble.d.ts +10 -3
- package/components/ShaderScene/assemble.js +29 -0
- package/components/ShaderScene/renderer.d.ts +12 -4
- package/components/ShaderScene/renderer.js +32 -20
- package/components/ShaderScene/scenes.d.ts +78 -0
- package/components/ShaderScene/scenes.js +933 -1
- package/components/ShaderScene/types.d.ts +52 -23
- package/components/Stack/Stack.css +68 -0
- package/components/Stack/Stack.d.ts +37 -0
- package/components/Stack/Stack.js +39 -0
- package/components/Stat/Stat.css +65 -0
- package/components/Stat/Stat.d.ts +7 -1
- package/components/Stat/Stat.js +16 -1
- package/components/Table/Table.css +11 -0
- package/components/Table/Table.d.ts +2 -0
- package/components/Table/Table.js +5 -1
- package/components/Tabs/Tabs.css +23 -0
- package/components/Tabs/Tabs.d.ts +9 -8
- package/components/Tabs/Tabs.js +38 -5
- package/components/Textarea/Textarea.d.ts +4 -2
- package/components/Textarea/Textarea.js +7 -3
- package/components/ThemeToggle/colorMode.d.ts +17 -1
- package/components/ThemeToggle/colorMode.js +11 -2
- package/components/Widget/Widget.css +21 -0
- package/components/Widget/Widget.d.ts +4 -0
- package/components/Widget/Widget.js +13 -5
- package/components/Wizard/Wizard.css +67 -0
- package/components/Wizard/Wizard.d.ts +54 -0
- package/components/Wizard/Wizard.js +71 -0
- package/components/registry.d.ts +25 -0
- package/components/registry.js +8 -0
- package/components/registry.json +234 -33
- package/components/registry.json.d.ts +234 -33
- package/components/registry.json.js +1 -1
- package/index.d.ts +10 -0
- package/index.js +20 -0
- package/package.json +1 -1
- package/tokens/motion.d.ts +2 -0
- package/tokens/motion.js +2 -0
- package/tokens/values.d.ts +31 -0
- package/tokens/values.js +16 -0
- package/tokens/values.json.js +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
CHECKLIST
|
|
3
|
+
A heading with the count done and a bar, then
|
|
4
|
+
one row per task: the Checkbox with its label
|
|
5
|
+
and description, and at the row's end the
|
|
6
|
+
owner's avatar and an action. Rows divide like
|
|
7
|
+
a WidgetRow list, on --color-divider.
|
|
8
|
+
============================================ */
|
|
9
|
+
|
|
10
|
+
/* Base */
|
|
11
|
+
.ds-checklist {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: var(--gap-400);
|
|
15
|
+
min-width: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Header */
|
|
19
|
+
.ds-checklist__header {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: var(--gap-200);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ds-checklist__title {
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ds-checklist__progress {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--gap-300);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ds-checklist__count {
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
font-family: var(--font-paragraph-sm-family);
|
|
38
|
+
font-size: var(--font-paragraph-sm-size);
|
|
39
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
40
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
41
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
42
|
+
color: var(--color-text-secondary);
|
|
43
|
+
font-variant-numeric: tabular-nums;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ds-checklist__bar {
|
|
47
|
+
flex: 1 1 auto;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* List */
|
|
52
|
+
.ds-checklist__list {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
margin: 0;
|
|
56
|
+
padding: 0;
|
|
57
|
+
list-style: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ds-checklist__item {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
gap: var(--gap-300);
|
|
65
|
+
padding-block: var(--padding-300);
|
|
66
|
+
border-block-end: var(--border-025) solid var(--color-divider);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ds-checklist__item:last-child {
|
|
70
|
+
border-block-end: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ds-checklist--compact .ds-checklist__item {
|
|
74
|
+
padding-block: var(--padding-200);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ds-checklist__task {
|
|
78
|
+
min-width: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Owner and action at the row's end */
|
|
82
|
+
.ds-checklist__meta {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: var(--gap-200);
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Read-only rows: the shared box beside the label, in Checkbox's own type. */
|
|
90
|
+
.ds-checklist__static {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: flex-start;
|
|
93
|
+
gap: var(--gap-200);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ds-checklist__text {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: var(--gap-050);
|
|
100
|
+
min-width: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ds-checklist__label {
|
|
104
|
+
font-family: var(--font-paragraph-family);
|
|
105
|
+
font-size: var(--font-paragraph-size);
|
|
106
|
+
font-weight: var(--font-paragraph-weight);
|
|
107
|
+
line-height: var(--font-paragraph-line-height);
|
|
108
|
+
letter-spacing: var(--font-paragraph-letter-spacing);
|
|
109
|
+
color: var(--color-text-primary);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ds-checklist--compact .ds-checklist__label,
|
|
113
|
+
.ds-checklist__description {
|
|
114
|
+
font-family: var(--font-paragraph-sm-family);
|
|
115
|
+
font-size: var(--font-paragraph-sm-size);
|
|
116
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
117
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
118
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ds-checklist__description {
|
|
122
|
+
color: var(--color-text-tertiary);
|
|
123
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** One task on a checklist. */
|
|
3
|
+
export interface ChecklistItem {
|
|
4
|
+
/** A stable id, which `values` holds while the task is done. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** What the task is ("Invite your team"). */
|
|
7
|
+
label: string;
|
|
8
|
+
/** A line under the label on what doing it involves. */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Who the task is with: a name, and an image for their avatar. */
|
|
11
|
+
owner?: {
|
|
12
|
+
name: string;
|
|
13
|
+
src?: string;
|
|
14
|
+
};
|
|
15
|
+
/** A control at the end of the row that does the task or opens it, such as a compact Button or a Link. */
|
|
16
|
+
action?: React.ReactNode;
|
|
17
|
+
/** Holds the task as it is: it cannot be ticked or unticked. */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Props owned by Checklist itself; everything else falls through to the root `<section>`. */
|
|
21
|
+
type ChecklistOwnProps = {
|
|
22
|
+
/** The tasks, in the order they are best done. */
|
|
23
|
+
items: ChecklistItem[];
|
|
24
|
+
/**
|
|
25
|
+
* The checklist's heading, which names its section.
|
|
26
|
+
* Note: this shadows the native `title` tooltip attribute, which Checklist does not expose.
|
|
27
|
+
*/
|
|
28
|
+
title?: string;
|
|
29
|
+
/** The ids of the done tasks, for a controlled list. Leave undefined to let the list keep its own, seeded from `defaultValues`. */
|
|
30
|
+
values?: string[];
|
|
31
|
+
/** The ids done on first render when the list is uncontrolled. */
|
|
32
|
+
defaultValues?: string[];
|
|
33
|
+
/** Fires with every done id after a task is ticked or unticked. */
|
|
34
|
+
onValuesChange?: (values: string[]) => void;
|
|
35
|
+
/** Shows the done marks without letting them change, for a list that reports what the host already knows (a setup's steps, a review's checks). */
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
/** Shows how many tasks are done, as a count and a bar, under the heading. Defaults to true. */
|
|
38
|
+
showProgress?: boolean;
|
|
39
|
+
/** The progress count, given the done and total tasks already written in the resolved locale. Defaults to "3 of 5 done". */
|
|
40
|
+
progressLabel?: (done: string, total: string) => string;
|
|
41
|
+
/** The owner avatar's accessible name, given the owner's name. Defaults to "Owner: <name>". */
|
|
42
|
+
ownerLabel?: (name: string) => string;
|
|
43
|
+
/** A read-only row's state, read after its label. Defaults to "Done". */
|
|
44
|
+
doneLabel?: string;
|
|
45
|
+
/** A read-only row's state when it is not done. Defaults to "Not done". */
|
|
46
|
+
notDoneLabel?: string;
|
|
47
|
+
/** The BCP 47 locale the counts are written in, such as `ar-EG`. Defaults to the nearest LocaleProvider's, else `en-US`. */
|
|
48
|
+
locale?: string;
|
|
49
|
+
/** Row density: `compact` for a checklist in a side panel. */
|
|
50
|
+
size?: 'default' | 'compact';
|
|
51
|
+
/** The title's place in the outline. Defaults to 3, a part of a section. */
|
|
52
|
+
headingLevel?: 2 | 3 | 4;
|
|
53
|
+
/** Additional CSS classes */
|
|
54
|
+
className?: string;
|
|
55
|
+
};
|
|
56
|
+
export interface ChecklistProps extends ChecklistOwnProps, Omit<React.ComponentPropsWithRef<'section'>, keyof ChecklistOwnProps | 'children'> {
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Tasks with a done state each: a setup to finish, an onboarding to work
|
|
60
|
+
* through, the checks before a release. Each row is a Checkbox with the
|
|
61
|
+
* task's label and description, its owner's avatar and an optional action,
|
|
62
|
+
* under a heading with the count done and a bar. Read-only, it reports done
|
|
63
|
+
* marks the host owns.
|
|
64
|
+
*/
|
|
65
|
+
export declare function Checklist({ items, title, values, defaultValues, onValuesChange, readOnly, showProgress, progressLabel, ownerLabel, doneLabel, notDoneLabel, locale: localeProp, size, headingLevel, className, ref, ...rest }: ChecklistProps): React.JSX.Element;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
|
+
import { Avatar } from "../Avatar/Avatar.js";
|
|
5
|
+
import { CheckboxIndicator, Checkbox } from "../Checkbox/Checkbox.js";
|
|
6
|
+
import { Heading } from "../Heading/Heading.js";
|
|
7
|
+
import { ProgressBar } from "../ProgressBar/ProgressBar.js";
|
|
8
|
+
import { formatNumber } from "../../behaviors/locale.js";
|
|
9
|
+
import { useLocale } from "../../behaviors/LocaleProvider.js";
|
|
10
|
+
import "../../behaviors/visually-hidden.css";
|
|
11
|
+
import "./Checklist.css";
|
|
12
|
+
const defaultProgressLabel = (done, total) => `${done} of ${total} done`;
|
|
13
|
+
const defaultOwnerLabel = (name) => `Owner: ${name}`;
|
|
14
|
+
function Checklist({
|
|
15
|
+
items,
|
|
16
|
+
title,
|
|
17
|
+
values,
|
|
18
|
+
defaultValues,
|
|
19
|
+
onValuesChange,
|
|
20
|
+
readOnly = false,
|
|
21
|
+
showProgress = true,
|
|
22
|
+
progressLabel = defaultProgressLabel,
|
|
23
|
+
ownerLabel = defaultOwnerLabel,
|
|
24
|
+
doneLabel = "Done",
|
|
25
|
+
notDoneLabel = "Not done",
|
|
26
|
+
locale: localeProp,
|
|
27
|
+
size = "default",
|
|
28
|
+
headingLevel = 3,
|
|
29
|
+
className = "",
|
|
30
|
+
ref,
|
|
31
|
+
...rest
|
|
32
|
+
}) {
|
|
33
|
+
const locale = useLocale(localeProp);
|
|
34
|
+
const headingId = useId();
|
|
35
|
+
const [internal, setInternal] = useState(() => defaultValues ?? []);
|
|
36
|
+
const done = values ?? internal;
|
|
37
|
+
const doneSet = new Set(done);
|
|
38
|
+
const doneCount = items.filter((item) => doneSet.has(item.id)).length;
|
|
39
|
+
const total = items.length;
|
|
40
|
+
const toggle = (id, checked) => {
|
|
41
|
+
const next = checked ? [...done.filter((v) => v !== id), id] : done.filter((v) => v !== id);
|
|
42
|
+
if (values === void 0) setInternal(next);
|
|
43
|
+
onValuesChange?.(next);
|
|
44
|
+
};
|
|
45
|
+
const countText = progressLabel(formatNumber(doneCount, locale), formatNumber(total, locale));
|
|
46
|
+
const classes = ["ds-checklist", size === "compact" ? "ds-checklist--compact" : "", className].filter(Boolean).join(" ");
|
|
47
|
+
return /* @__PURE__ */ jsxs("section", { "aria-labelledby": title ? headingId : void 0, ...rest, ref, className: classes, children: [
|
|
48
|
+
(title || showProgress) && /* @__PURE__ */ jsxs("div", { className: "ds-checklist__header", children: [
|
|
49
|
+
title && /* @__PURE__ */ jsx(Heading, { id: headingId, level: headingLevel, tier: "title-body", className: "ds-checklist__title", children: title }),
|
|
50
|
+
showProgress && total > 0 && /* @__PURE__ */ jsxs("div", { className: "ds-checklist__progress", children: [
|
|
51
|
+
/* @__PURE__ */ jsx("span", { className: "ds-checklist__count", children: countText }),
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
ProgressBar,
|
|
54
|
+
{
|
|
55
|
+
value: doneCount / total * 100,
|
|
56
|
+
size: "compact",
|
|
57
|
+
"aria-label": countText,
|
|
58
|
+
locale,
|
|
59
|
+
className: "ds-checklist__bar"
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsx("ul", { className: "ds-checklist__list", children: items.map((item) => {
|
|
65
|
+
const isDone = doneSet.has(item.id);
|
|
66
|
+
return /* @__PURE__ */ jsxs(
|
|
67
|
+
"li",
|
|
68
|
+
{
|
|
69
|
+
className: ["ds-checklist__item", isDone ? "ds-checklist__item--done" : ""].filter(Boolean).join(" "),
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx("div", { className: "ds-checklist__task", children: readOnly ? /* @__PURE__ */ jsxs("div", { className: "ds-checklist__static", children: [
|
|
72
|
+
/* @__PURE__ */ jsx(CheckboxIndicator, { checked: isDone, size }),
|
|
73
|
+
/* @__PURE__ */ jsxs("span", { className: "ds-checklist__text", children: [
|
|
74
|
+
/* @__PURE__ */ jsxs("span", { className: "ds-checklist__label", children: [
|
|
75
|
+
item.label,
|
|
76
|
+
/* @__PURE__ */ jsxs("span", { className: "ds-visually-hidden", children: [
|
|
77
|
+
", ",
|
|
78
|
+
isDone ? doneLabel : notDoneLabel
|
|
79
|
+
] })
|
|
80
|
+
] }),
|
|
81
|
+
item.description && /* @__PURE__ */ jsx("span", { className: "ds-checklist__description", children: item.description })
|
|
82
|
+
] })
|
|
83
|
+
] }) : /* @__PURE__ */ jsx(
|
|
84
|
+
Checkbox,
|
|
85
|
+
{
|
|
86
|
+
label: item.label,
|
|
87
|
+
helperText: item.description,
|
|
88
|
+
checked: isDone,
|
|
89
|
+
disabled: item.disabled,
|
|
90
|
+
size,
|
|
91
|
+
onCheckedChange: (checked) => toggle(item.id, checked)
|
|
92
|
+
}
|
|
93
|
+
) }),
|
|
94
|
+
(item.owner || item.action) && /* @__PURE__ */ jsxs("div", { className: "ds-checklist__meta", children: [
|
|
95
|
+
item.owner && /* @__PURE__ */ jsx(
|
|
96
|
+
Avatar,
|
|
97
|
+
{
|
|
98
|
+
name: item.owner.name,
|
|
99
|
+
src: item.owner.src,
|
|
100
|
+
size: "sm",
|
|
101
|
+
"aria-label": ownerLabel(item.owner.name)
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
item.action
|
|
105
|
+
] })
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
item.id
|
|
109
|
+
);
|
|
110
|
+
}) })
|
|
111
|
+
] });
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
Checklist
|
|
115
|
+
};
|
|
@@ -388,3 +388,42 @@
|
|
|
388
388
|
outline: 2px solid var(--color-action-primary-bg);
|
|
389
389
|
outline-offset: 2px;
|
|
390
390
|
}
|
|
391
|
+
|
|
392
|
+
/* ============================================
|
|
393
|
+
BADGE
|
|
394
|
+
A count or a dot on the top-end corner, in
|
|
395
|
+
BottomNav's count-badge treatment.
|
|
396
|
+
============================================ */
|
|
397
|
+
|
|
398
|
+
.ds-circular-button--badged {
|
|
399
|
+
position: relative;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.ds-circular-button__badge {
|
|
403
|
+
position: absolute;
|
|
404
|
+
inset-block-start: calc(var(--padding-100) * -1);
|
|
405
|
+
inset-inline-end: calc(var(--padding-100) * -1);
|
|
406
|
+
box-sizing: border-box;
|
|
407
|
+
min-width: 16px;
|
|
408
|
+
height: 16px;
|
|
409
|
+
padding: 0 var(--padding-100);
|
|
410
|
+
border-radius: var(--radius-pill);
|
|
411
|
+
background-color: var(--color-count-badge-bg);
|
|
412
|
+
color: var(--color-count-badge-text);
|
|
413
|
+
font-family: var(--font-caption-family);
|
|
414
|
+
font-size: var(--font-caption-size);
|
|
415
|
+
font-weight: var(--font-paragraph-sm-emphasis-weight);
|
|
416
|
+
line-height: var(--font-caption-line-height);
|
|
417
|
+
text-align: center;
|
|
418
|
+
white-space: nowrap;
|
|
419
|
+
pointer-events: none;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.ds-circular-button__badge--dot {
|
|
423
|
+
inset-block-start: var(--padding-050);
|
|
424
|
+
inset-inline-end: var(--padding-050);
|
|
425
|
+
min-width: 0;
|
|
426
|
+
width: 8px;
|
|
427
|
+
height: 8px;
|
|
428
|
+
padding: 0;
|
|
429
|
+
}
|
|
@@ -64,6 +64,19 @@ type CircularButtonOwnProps = {
|
|
|
64
64
|
target?: string;
|
|
65
65
|
/** Optional rel attribute for links */
|
|
66
66
|
rel?: string;
|
|
67
|
+
/** A mark on the button's top-end corner, as BottomNav draws one: a count (a notification bell's unread), or `true` for a dot with no number. */
|
|
68
|
+
badge?: number | string | true;
|
|
69
|
+
/** The highest count the badge spells out; a larger one reads "99+". Defaults to 99. */
|
|
70
|
+
badgeMax?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Text read after `ariaLabel` while the button carries a badge, given the
|
|
73
|
+
* badge. Defaults to ", new" for a dot and ", 3 new" for a count; the
|
|
74
|
+
* leading comma and space are part of the text. The tooltip keeps
|
|
75
|
+
* `ariaLabel` alone.
|
|
76
|
+
*/
|
|
77
|
+
badgeLabel?: (badge: number | string | true) => string;
|
|
78
|
+
/** The BCP 47 locale a numeric badge is written in, such as `ar-EG`. Defaults to `en-US`. This component can render from a Server Component, so it takes the prop alone and reads no LocaleProvider. */
|
|
79
|
+
locale?: string;
|
|
67
80
|
/** Additional CSS classes */
|
|
68
81
|
className?: string;
|
|
69
82
|
/**
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Spinner } from "../Spinner/Spinner.js";
|
|
4
4
|
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
5
5
|
import "./CircularButton.css";
|
|
6
6
|
import "../../fonts/material-symbols.css";
|
|
7
7
|
import { mirrorClass } from "../../behaviors/direction.js";
|
|
8
|
+
import { formatNumber, DEFAULT_LOCALE } from "../../behaviors/locale.js";
|
|
8
9
|
function resolveCircularButtonCell(variant, tone) {
|
|
9
10
|
const emphasis = variant === "neutral" ? "primary" : variant;
|
|
10
11
|
const resolvedTone = tone ?? (variant === "neutral" ? "neutral" : "default");
|
|
@@ -32,6 +33,10 @@ const CircularButton = React.forwardRef(
|
|
|
32
33
|
href,
|
|
33
34
|
target,
|
|
34
35
|
rel,
|
|
36
|
+
badge,
|
|
37
|
+
badgeMax = 99,
|
|
38
|
+
badgeLabel = defaultBadgeLabel,
|
|
39
|
+
locale = DEFAULT_LOCALE,
|
|
35
40
|
className = "",
|
|
36
41
|
linkComponent,
|
|
37
42
|
...rest
|
|
@@ -48,9 +53,17 @@ const CircularButton = React.forwardRef(
|
|
|
48
53
|
`${baseClass}--${resolvedState}`,
|
|
49
54
|
`${baseClass}--${size}`,
|
|
50
55
|
isLoading && `${baseClass}--loading`,
|
|
56
|
+
badge !== void 0 && `${baseClass}--badged`,
|
|
51
57
|
className
|
|
52
58
|
].filter(Boolean).join(" ");
|
|
53
|
-
const
|
|
59
|
+
const glyph = isLoading ? /* @__PURE__ */ jsx("span", { className: `${baseClass}__icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx(Spinner, { size: size === "compact" ? "sm" : "md", tone: "inherit" }) }) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__icon${typeof icon === "string" ? ` material-symbols-rounded ${mirrorClass(icon)}` : ""}`, "aria-hidden": "true", children: icon });
|
|
60
|
+
const badgeText = badge === void 0 || badge === true ? null : typeof badge === "number" ? badge > badgeMax ? `${formatNumber(badgeMax, locale)}+` : formatNumber(badge, locale) : badge;
|
|
61
|
+
const children = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
62
|
+
glyph,
|
|
63
|
+
badge === true && /* @__PURE__ */ jsx("span", { className: `${baseClass}__badge ${baseClass}__badge--dot`, "aria-hidden": "true" }),
|
|
64
|
+
badgeText !== null && /* @__PURE__ */ jsx("span", { className: `${baseClass}__badge`, "aria-hidden": "true", children: badgeText })
|
|
65
|
+
] });
|
|
66
|
+
const accessibleName = badge === void 0 ? ariaLabel : `${ariaLabel}${badgeLabel(badge)}`;
|
|
54
67
|
const control = href && !isDisabled && !isLoading ? /* @__PURE__ */ jsx(
|
|
55
68
|
Link,
|
|
56
69
|
{
|
|
@@ -60,7 +73,7 @@ const CircularButton = React.forwardRef(
|
|
|
60
73
|
href,
|
|
61
74
|
target,
|
|
62
75
|
rel,
|
|
63
|
-
"aria-label":
|
|
76
|
+
"aria-label": accessibleName,
|
|
64
77
|
children
|
|
65
78
|
}
|
|
66
79
|
) : /* @__PURE__ */ jsx(
|
|
@@ -72,7 +85,7 @@ const CircularButton = React.forwardRef(
|
|
|
72
85
|
className: classes,
|
|
73
86
|
disabled: isDisabled || isLoading,
|
|
74
87
|
"aria-busy": isLoading || void 0,
|
|
75
|
-
"aria-label":
|
|
88
|
+
"aria-label": accessibleName,
|
|
76
89
|
children
|
|
77
90
|
}
|
|
78
91
|
);
|
|
@@ -82,6 +95,7 @@ const CircularButton = React.forwardRef(
|
|
|
82
95
|
}
|
|
83
96
|
);
|
|
84
97
|
CircularButton.displayName = "CircularButton";
|
|
98
|
+
const defaultBadgeLabel = (badge) => badge === true ? ", new" : `, ${badge} new`;
|
|
85
99
|
export {
|
|
86
100
|
CircularButton
|
|
87
101
|
};
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
/* Sizing */
|
|
14
14
|
flex: 1 1 0;
|
|
15
15
|
min-width: 250px;
|
|
16
|
-
height:
|
|
16
|
+
/* A floor, not a fixed height: a long token name wraps onto more lines in
|
|
17
|
+
a narrow column, and the card grows rather than cutting its last row. */
|
|
18
|
+
min-height: 360px;
|
|
17
19
|
|
|
18
20
|
/* Appearance */
|
|
19
21
|
border: var(--border-025) solid var(--color-bg-container-border);
|
|
@@ -22,13 +22,15 @@ export interface ColourSwatchProps {
|
|
|
22
22
|
status?: boolean;
|
|
23
23
|
/** CSS custom property for the status left border colour */
|
|
24
24
|
borderVar?: string;
|
|
25
|
+
/** The label of the row that prints the token's name, the value of `cssVar`, as text */
|
|
26
|
+
tokenLabel?: string;
|
|
25
27
|
/** Additional CSS classes */
|
|
26
28
|
className?: string;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* ColourSwatch component from Figma design system
|
|
30
|
-
* Displays a colour swatch card with a values box showing
|
|
31
|
-
* Primitive, Hex, and RGB. Values switch when theme changes.
|
|
32
|
+
* Displays a colour swatch card with a values box showing the
|
|
33
|
+
* token's name, then Primitive, Hex, and RGB. Values switch when theme changes.
|
|
32
34
|
* Used on Semantic colours and Primitive colours pages.
|
|
33
35
|
*/
|
|
34
|
-
export declare const ColourSwatch: ({ label, cssVar, dark, light, theme, status, borderVar, className, }: ColourSwatchProps) => React.JSX.Element;
|
|
36
|
+
export declare const ColourSwatch: ({ label, cssVar, dark, light, theme, status, borderVar, tokenLabel, className, }: ColourSwatchProps) => React.JSX.Element;
|
|
@@ -9,6 +9,7 @@ const ColourSwatch = ({
|
|
|
9
9
|
theme = "dark",
|
|
10
10
|
status = false,
|
|
11
11
|
borderVar,
|
|
12
|
+
tokenLabel = "Token",
|
|
12
13
|
className = ""
|
|
13
14
|
}) => {
|
|
14
15
|
const baseClass = "ds-colour-swatch";
|
|
@@ -22,6 +23,10 @@ const ColourSwatch = ({
|
|
|
22
23
|
return /* @__PURE__ */ jsxs("div", { className: classes, style, children: [
|
|
23
24
|
/* @__PURE__ */ jsx("div", { className: `${baseClass}__title-box`, children: /* @__PURE__ */ jsx("h3", { className: `${baseClass}__title`, children: label }) }),
|
|
24
25
|
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__values`, children: [
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__row`, children: [
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: tokenLabel }),
|
|
28
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__data`, children: cssVar })
|
|
29
|
+
] }),
|
|
25
30
|
values.primitive && /* @__PURE__ */ jsxs("div", { className: `${baseClass}__row`, children: [
|
|
26
31
|
/* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: "Primitive" }),
|
|
27
32
|
/* @__PURE__ */ jsx("span", { className: `${baseClass}__data`, children: values.primitive })
|
|
@@ -45,10 +45,12 @@ type ComboboxOwnProps = {
|
|
|
45
45
|
disabled?: boolean;
|
|
46
46
|
/** Whether the combobox is required */
|
|
47
47
|
required?: boolean;
|
|
48
|
-
/** Error state
|
|
48
|
+
/** Error state: marks the control invalid and, in the older form without `errorText`, recolours the helper text as the error message. */
|
|
49
49
|
error?: boolean;
|
|
50
|
-
/** Helper
|
|
50
|
+
/** Helper text displayed below the control. With the older `error` flag and no `errorText`, it doubles as the error message. */
|
|
51
51
|
helperText?: string;
|
|
52
|
+
/** The error message, shown under the control while the helper text keeps its place. Setting it marks the control invalid, so `error` is not needed alongside it; Field's spec owns the wiring. */
|
|
53
|
+
errorText?: React.ReactNode;
|
|
52
54
|
/** Show a loading affordance in the menu — for async option fetching */
|
|
53
55
|
loading?: boolean;
|
|
54
56
|
/** Message shown when the filter matches no options */
|
|
@@ -20,6 +20,7 @@ const Combobox = React.forwardRef(({
|
|
|
20
20
|
required = false,
|
|
21
21
|
error = false,
|
|
22
22
|
helperText,
|
|
23
|
+
errorText,
|
|
23
24
|
loading = false,
|
|
24
25
|
emptyMessage = "No results found",
|
|
25
26
|
loadingMessage = "Loading…",
|
|
@@ -212,11 +213,13 @@ const Combobox = React.forwardRef(({
|
|
|
212
213
|
}, [focusedIndex, isOpen]);
|
|
213
214
|
const listboxId = `${inputId}-listbox`;
|
|
214
215
|
const activeOptionId = focusedIndex >= 0 && filteredOptions[focusedIndex] ? `${inputId}-option-${filteredOptions[focusedIndex].value}` : void 0;
|
|
216
|
+
const hasErrorText = errorText != null && errorText !== false && errorText !== "";
|
|
217
|
+
const invalid = error || hasErrorText;
|
|
215
218
|
const classes = [
|
|
216
219
|
baseClass,
|
|
217
220
|
size === "compact" ? `${baseClass}--compact` : "",
|
|
218
221
|
isOpen ? `${baseClass}--open` : "",
|
|
219
|
-
|
|
222
|
+
invalid ? `${baseClass}--error` : "",
|
|
220
223
|
disabled ? `${baseClass}--disabled` : "",
|
|
221
224
|
multiple ? `${baseClass}--multiple` : "",
|
|
222
225
|
className
|
|
@@ -259,6 +262,7 @@ const Combobox = React.forwardRef(({
|
|
|
259
262
|
ref: setRootRef,
|
|
260
263
|
label,
|
|
261
264
|
helperText,
|
|
265
|
+
errorText,
|
|
262
266
|
error,
|
|
263
267
|
required,
|
|
264
268
|
disabled,
|
|
@@ -306,8 +310,8 @@ const Combobox = React.forwardRef(({
|
|
|
306
310
|
"aria-activedescendant": activeOptionId,
|
|
307
311
|
"aria-label": ariaLabelAttr ?? ariaLabel ?? (!label ? placeholder : void 0),
|
|
308
312
|
"aria-labelledby": ariaLabelledBy,
|
|
309
|
-
"aria-describedby": [ariaDescribedBy, helperText ? `${inputId}-helper` : void 0].filter(Boolean).join(" ") || void 0,
|
|
310
|
-
"aria-invalid":
|
|
313
|
+
"aria-describedby": [ariaDescribedBy, hasErrorText ? `${inputId}-error` : void 0, helperText ? `${inputId}-helper` : void 0].filter(Boolean).join(" ") || void 0,
|
|
314
|
+
"aria-invalid": invalid || void 0,
|
|
311
315
|
"aria-required": required || void 0,
|
|
312
316
|
placeholder: multiple && hasSelection ? "" : placeholder,
|
|
313
317
|
value: inputValue,
|
|
@@ -846,6 +846,41 @@
|
|
|
846
846
|
text-decoration: underline;
|
|
847
847
|
}
|
|
848
848
|
|
|
849
|
+
/* ============================================
|
|
850
|
+
ROW ACTION (rowHref / onRowClick)
|
|
851
|
+
============================================ */
|
|
852
|
+
|
|
853
|
+
/* The whole row is one target: the pointer says so, and the row's name
|
|
854
|
+
takes its underline while the row is hovered, the way a link answers. */
|
|
855
|
+
.ds-data-table__row--action {
|
|
856
|
+
cursor: pointer;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.ds-data-table__row-link {
|
|
860
|
+
/* Body text in the cell's own type, as the rest of the row reads: the
|
|
861
|
+
row's hover and the underline mark it, not the action colour. */
|
|
862
|
+
color: inherit;
|
|
863
|
+
font: inherit;
|
|
864
|
+
text-align: inherit;
|
|
865
|
+
text-decoration: none;
|
|
866
|
+
background: none;
|
|
867
|
+
border: none;
|
|
868
|
+
padding: 0;
|
|
869
|
+
margin: 0;
|
|
870
|
+
cursor: pointer;
|
|
871
|
+
border-radius: var(--radius-100);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.ds-data-table__row--action:hover .ds-data-table__row-link,
|
|
875
|
+
.ds-data-table__row-link:focus-visible {
|
|
876
|
+
text-decoration: underline;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.ds-data-table__row-link:focus-visible {
|
|
880
|
+
outline: 2px solid var(--color-action-primary-bg);
|
|
881
|
+
outline-offset: 2px;
|
|
882
|
+
}
|
|
883
|
+
|
|
849
884
|
/* ============================================
|
|
850
885
|
STACKED
|
|
851
886
|
`phoneLayout="stack"` narrower than a phone:
|
|
@@ -20,6 +20,14 @@ export interface DataTableColumn<R extends DataTableRow = DataTableRow> {
|
|
|
20
20
|
align?: 'start' | 'center' | 'end' | 'left' | 'right';
|
|
21
21
|
/** Render the cell for a row; defaults to the row's raw value for this key. */
|
|
22
22
|
render?: (row: R) => React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Derives the column's value from the row's other values, such as a line's
|
|
25
|
+
* total from its quantity and unit price (`(values) => Number(values.quantity) * Number(values.price)`).
|
|
26
|
+
* The table reads it wherever it reads a value, so it sorts, filters, totals
|
|
27
|
+
* and groups, and it follows an edit to the cells it reads as the edit is
|
|
28
|
+
* made. A computed column is never editable.
|
|
29
|
+
*/
|
|
30
|
+
compute?: (values: R['values']) => DataTableValue;
|
|
23
31
|
/** Whether this column names each row: its cells render as row headers, and its value names the row's checkbox ("Select Ada Lovelace"). One column per table. */
|
|
24
32
|
rowHeader?: boolean;
|
|
25
33
|
/** Narrowest width a resize can reach, in pixels. Defaults to what the header needs (its padding, two letters of label, and its sort glyph and menu button) or, for an editable column, its editor, whichever is wider. */
|
|
@@ -73,6 +81,14 @@ export interface DataTableColumn<R extends DataTableRow = DataTableRow> {
|
|
|
73
81
|
format?: DataTableColumnFormat;
|
|
74
82
|
/** Whether the table can be grouped by this column, from its header menu or a TableToolbar. Defaults to false. */
|
|
75
83
|
groupable?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The order this column's groups take, as the values they gather by
|
|
86
|
+
* (`['Revenue', 'Cost of sales', 'Expenses']`): the groups listed come
|
|
87
|
+
* first, in this order whichever way the column sorts, and any others
|
|
88
|
+
* follow in the column's own order. A `status` column already groups in
|
|
89
|
+
* its options' order.
|
|
90
|
+
*/
|
|
91
|
+
groupOrder?: string[];
|
|
76
92
|
/**
|
|
77
93
|
* The calculation a group row shows in this column, and the totals
|
|
78
94
|
* footer's starting pick: `sum`, `avg`, `min`, `max`, `count`,
|
|
@@ -346,8 +362,24 @@ type DataTableOwnProps<R extends DataTableRow = DataTableRow> = {
|
|
|
346
362
|
defaultSorts?: DataTableSort[];
|
|
347
363
|
/** Fires with every sort after one changes, first sort first. `onSortChange` fires too, with the first or `null`. */
|
|
348
364
|
onSortsChange?: (sorts: DataTableSort[]) => void;
|
|
349
|
-
/** The link component a `link` column's cells render through, so the app's router handles them. Defaults to the nearest `LinkProvider`'s, else a plain anchor. */
|
|
365
|
+
/** The link component a `link` column's cells and `rowHref` render through, so the app's router handles them. Defaults to the nearest `LinkProvider`'s, else a plain anchor. */
|
|
350
366
|
linkComponent?: LinkComponent;
|
|
367
|
+
/**
|
|
368
|
+
* Makes each row a link to the address it returns. The row header's content
|
|
369
|
+
* (the `rowHeader` column, else the first column shown) becomes the link,
|
|
370
|
+
* so a keyboard and a screen reader reach it as one, and a click anywhere
|
|
371
|
+
* else on the row follows it, except on the row's own controls or while
|
|
372
|
+
* text is being selected. A row it returns `undefined` for stays plain. A
|
|
373
|
+
* row header's `render` should not draw a link of its own alongside it.
|
|
374
|
+
*/
|
|
375
|
+
rowHref?: (row: R) => string | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* Makes each row open something in place (a drawer, a dialog) instead of
|
|
378
|
+
* navigating: the row header's content becomes a button that calls it, and
|
|
379
|
+
* a click anywhere else on the row presses that button, except on the
|
|
380
|
+
* row's own controls. `rowHref` wins on a row both give an action.
|
|
381
|
+
*/
|
|
382
|
+
onRowClick?: (row: R) => void;
|
|
351
383
|
/**
|
|
352
384
|
* Draws only the rows in view, so a table of thousands scrolls as
|
|
353
385
|
* smoothly as one of ten. `auto` (the default) does it for an unpaged,
|
|
@@ -574,7 +606,7 @@ type DataTableOwnProps<R extends DataTableRow = DataTableRow> = {
|
|
|
574
606
|
};
|
|
575
607
|
export interface DataTableProps<R extends DataTableRow = DataTableRow> extends DataTableOwnProps<R>, Omit<React.ComponentPropsWithRef<'div'>, keyof DataTableOwnProps<R>> {
|
|
576
608
|
}
|
|
577
|
-
export declare function DataTable<R extends DataTableRow = DataTableRow>({ columns: columnsProp, rows, pageSize: pageSizeProp, defaultPageSize, onPageSizeChange, pageSizeOptions, page: pageProp, defaultPage, onPageChange, pageSizeLabel, phoneLayout, selectable, selectedIds, defaultSelectedIds, onSelectionChange, sort, defaultSort, onSortChange, sorts: sortsProp, defaultSorts, onSortsChange, multiSort, onViewChange, virtualize, onLoadMore, hasMore, renderDetail, expandedIds: expandedProp, defaultExpandedIds, onExpandedIdsChange, expandMode, grouping: groupingProp, defaultGrouping, onGroupingChange, totalsRow, totals: totalsProp, defaultTotals, onTotalsChange, linkComponent, searchable, searchPlaceholder, toolbar, size: sizeProp, defaultSize, onSizeChange, filters: filtersProp, defaultFilters, onFiltersChange, search: searchProp, defaultSearch, onSearchChange, filterLabels: filterLabelsProp, striped, caption, emptyState, selectAllLabel, selectRowLabel, sortLabel, sortRankLabel, sortAnnouncement, pageAnnouncement, resultsLabel, selectedLabel, paginationLabels, emptyStateLabels, resizableColumns, reorderableColumns, columnMenu, reorderableRows, stickyHeader, maxHeight, navigation, columnWidths, defaultColumnWidths, onColumnWidthsChange, columnOrder, defaultColumnOrder, onColumnOrderChange, columnPinning, defaultColumnPinning, onColumnPinningChange, hiddenColumns, defaultHiddenColumns, onHiddenColumnsChange, rowOrder, defaultRowOrder, onRowOrderChange, columnLabels, columnDividers, cellText, rowActions, rowActionsVisibility, editMode, onCellEdit, onRowEdit, manual, rowCount: rowCountProp, loading, error, onRetry, loadLabels, locale: localeProp, className, ref, ...rest }: DataTableProps<R>): React.JSX.Element;
|
|
609
|
+
export declare function DataTable<R extends DataTableRow = DataTableRow>({ columns: columnsProp, rows: rowsProp, pageSize: pageSizeProp, defaultPageSize, onPageSizeChange, pageSizeOptions, page: pageProp, defaultPage, onPageChange, pageSizeLabel, phoneLayout, selectable, selectedIds, defaultSelectedIds, onSelectionChange, sort, defaultSort, onSortChange, sorts: sortsProp, defaultSorts, onSortsChange, multiSort, onViewChange, virtualize, onLoadMore, hasMore, renderDetail, expandedIds: expandedProp, defaultExpandedIds, onExpandedIdsChange, expandMode, grouping: groupingProp, defaultGrouping, onGroupingChange, totalsRow, totals: totalsProp, defaultTotals, onTotalsChange, linkComponent, rowHref, onRowClick, searchable, searchPlaceholder, toolbar, size: sizeProp, defaultSize, onSizeChange, filters: filtersProp, defaultFilters, onFiltersChange, search: searchProp, defaultSearch, onSearchChange, filterLabels: filterLabelsProp, striped, caption, emptyState, selectAllLabel, selectRowLabel, sortLabel, sortRankLabel, sortAnnouncement, pageAnnouncement, resultsLabel, selectedLabel, paginationLabels, emptyStateLabels, resizableColumns, reorderableColumns, columnMenu, reorderableRows, stickyHeader, maxHeight, navigation, columnWidths, defaultColumnWidths, onColumnWidthsChange, columnOrder, defaultColumnOrder, onColumnOrderChange, columnPinning, defaultColumnPinning, onColumnPinningChange, hiddenColumns, defaultHiddenColumns, onHiddenColumnsChange, rowOrder, defaultRowOrder, onRowOrderChange, columnLabels, columnDividers, cellText, rowActions, rowActionsVisibility, editMode, onCellEdit, onRowEdit, manual, rowCount: rowCountProp, loading, error, onRetry, loadLabels, locale: localeProp, className, ref, ...rest }: DataTableProps<R>): React.JSX.Element;
|
|
578
610
|
/**
|
|
579
611
|
* A stored view made safe for a table's columns as they are now: columns
|
|
580
612
|
* that no longer exist drop out of every part of it, a filter whose
|