rift-ds 1.29.0 → 1.31.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 +6 -3
- package/behaviors/locale.d.ts +7 -0
- package/behaviors/locale.js +5 -0
- package/behaviors/shell.css +33 -0
- package/bin/rift-ds.mjs +36 -10
- package/bin/templates/app/components/rift/ColorModeScript.tsx +7 -3
- package/bin/templates/blocks/app/planner/PlannerGrid.tsx +58 -0
- package/bin/templates/blocks/app/planner/Requests.tsx +42 -0
- package/bin/templates/blocks/app/planner/page.module.css +17 -0
- package/bin/templates/blocks/app/planner/page.tsx +32 -0
- 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/components/blocks/AppShell.module.css +8 -41
- package/bin/templates/blocks/components/blocks/AppShell.tsx +9 -11
- package/bin/templates/blocks/registry.json +27 -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.actions.ts +108 -0
- package/bin/templates/chat/app/api/chat/route.ts +0 -2
- package/bin/templates/chat/components/chat/ChatMount.actions.tsx +55 -0
- package/bin/templates/chat/components/chat/ChatMount.tsx +14 -1
- package/bin/templates/chat/components/chat/proposals/ProposalCard.tsx +81 -0
- package/bin/templates/chat/components/chat/proposals/actions.ts +60 -0
- package/bin/templates/chat/components/chat/proposals/confirmation.ts +9 -0
- package/bin/templates/chat/components/chat/proposals/renderers.tsx +9 -0
- package/chat/ChatLauncher.d.ts +13 -2
- package/chat/ChatLauncher.js +9 -2
- package/chat/ChatProvider.d.ts +19 -2
- package/chat/ChatProvider.js +26 -3
- package/chat/ChatWidget.css +10 -0
- package/chat/ChatWidget.d.ts +2 -1
- package/chat/ChatWidget.js +8 -6
- package/chat/actions.d.ts +52 -6
- package/chat/actions.js +53 -5
- package/chat/contextSchema.d.ts +76 -0
- package/chat/contextSchema.js +58 -0
- package/chat/index.d.ts +2 -2
- package/chat/index.js +5 -1
- package/chat/registry.json.d.ts +2 -2
- package/chat/registry.json.js +1 -1
- package/chat/server.d.ts +18 -2
- package/chat/server.js +10 -1
- package/chat/suggestions.d.ts +7 -0
- package/chat/suggestions.js +13 -1
- package/chat/types.d.ts +23 -0
- package/chat/useChat.d.ts +2 -2
- package/chat/useChat.js +15 -1
- package/components/Alert/Alert.css +12 -0
- package/components/Alert/Alert.d.ts +2 -0
- package/components/Alert/Alert.js +3 -1
- package/components/AppSidebar/AppSidebar.css +12 -0
- 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/ButtonGroup/ButtonGroup.css +10 -1
- 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/RadarChart.js +24 -10
- 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 +52 -2
- package/components/DataTable/DataTable.d.ts +47 -3
- package/components/DataTable/DataTable.js +71 -7
- package/components/DataTable/columnTypes.d.ts +1 -1
- package/components/DataTable/columnTypes.js +1 -1
- package/components/DataTable/periodColumns.d.ts +37 -0
- package/components/DataTable/periodColumns.js +48 -0
- package/components/DateInput/DateInput.d.ts +4 -2
- package/components/DateInput/DateInput.js +7 -3
- package/components/DatePicker/DatePicker.css +22 -6
- package/components/DatePicker/DatePicker.d.ts +2 -1
- package/components/DatePicker/DatePicker.js +2 -2
- package/components/DateRangePicker/DateRangePicker.js +2 -2
- package/components/DecisionRow/DecisionRow.css +46 -0
- package/components/DecisionRow/DecisionRow.d.ts +62 -0
- package/components/DecisionRow/DecisionRow.js +93 -0
- 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 +113 -0
- package/components/EventCalendar/EventCalendar.d.ts +48 -4
- package/components/EventCalendar/EventCalendar.js +145 -25
- package/components/FormSection/FormSection.css +70 -0
- package/components/FormSection/FormSection.d.ts +35 -0
- package/components/FormSection/FormSection.js +35 -0
- package/components/FunnelChart/FunnelChart.js +33 -22
- package/components/Globe/Globe.css +7 -0
- package/components/Globe/Globe.js +1 -1
- 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 +3 -2
- package/components/ShaderScene/ShaderScene.js +47 -4
- 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 +18 -0
- package/components/Table/Table.d.ts +2 -0
- package/components/Table/Table.js +6 -2
- package/components/Tabs/Tabs.css +44 -3
- 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/Timeline/Timeline.css +8 -0
- package/components/Widget/Widget.css +23 -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/WorldMap/WorldMap.css +15 -0
- package/components/WorldMap/WorldMap.js +56 -1
- package/components/registry.d.ts +25 -0
- package/components/registry.js +8 -0
- package/components/registry.json +251 -33
- package/components/registry.json.d.ts +251 -33
- package/components/registry.json.js +1 -1
- package/index.d.ts +11 -0
- package/index.js +26 -0
- package/package.json +1 -1
- package/tokens/motion.d.ts +2 -0
- package/tokens/motion.js +2 -0
- package/tokens/presets/blueprint.css +9 -0
- package/tokens/presets/bubblegum.css +9 -0
- package/tokens/presets/contrast.css +3 -3
- package/tokens/presets/coral.css +3 -3
- package/tokens/presets/ember.css +9 -0
- package/tokens/presets/getaway.css +9 -0
- package/tokens/presets/gold.css +3 -3
- package/tokens/presets/mono.css +3 -3
- package/tokens/presets/pink.css +3 -3
- package/tokens/presets/plum.css +3 -3
- package/tokens/presets/signal.css +9 -0
- package/tokens/presets/smoke.css +9 -0
- package/tokens/presets/velvet.css +9 -0
- package/tokens/presets/violet.css +3 -3
- package/tokens/presets/volt.css +9 -0
- package/tokens/presets/warm.css +3 -3
- package/tokens/values.d.ts +31 -0
- package/tokens/values.js +16 -0
- package/tokens/values.json.js +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
DECISION ROW
|
|
3
|
+
WidgetRow with a decision's lifecycle: the row's own layout, faces and
|
|
4
|
+
gaps are WidgetRow's (Widget.css), so a decision sits in a Widget beside
|
|
5
|
+
plain rows with nothing restated here. This file only adds the root and
|
|
6
|
+
the focus ring the row takes when it settles with nowhere else for focus
|
|
7
|
+
to go.
|
|
8
|
+
============================================ */
|
|
9
|
+
|
|
10
|
+
/* Base */
|
|
11
|
+
|
|
12
|
+
.ds-decision-row {
|
|
13
|
+
display: block;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
border-radius: var(--radius-300);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* States */
|
|
19
|
+
|
|
20
|
+
/* A settled row with no Undo holds focus itself after the reader's press,
|
|
21
|
+
so the ring is the row's, in the focus colour every control uses. */
|
|
22
|
+
.ds-decision-row:focus-visible {
|
|
23
|
+
outline: 2px solid var(--color-action-primary-bg);
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* The settled mark sits in the actions slot as one item. */
|
|
28
|
+
.ds-decision-row__outcome {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Narrow rows: the title keeps a floor, stated on the icon scale, and the
|
|
33
|
+
decision wraps to its own line under it, set to the row's end, rather
|
|
34
|
+
than squeezing the title to nothing and running off the edge. */
|
|
35
|
+
.ds-decision-row .ds-widget-row {
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
row-gap: var(--gap-200);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.ds-decision-row .ds-widget-row__main {
|
|
41
|
+
flex-basis: calc(var(--icon-size-1200) * 3);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ds-decision-row .ds-widget-row__actions {
|
|
45
|
+
margin-inline-start: auto;
|
|
46
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Where a decision stands: waiting on the reader, or settled one way or the other. */
|
|
3
|
+
export type DecisionRowStatus = 'pending' | 'accepted' | 'declined';
|
|
4
|
+
/** Props owned by DecisionRow itself; everything else falls through to the row's root `<div>`. */
|
|
5
|
+
type DecisionRowOwnProps = {
|
|
6
|
+
/** What is waiting on a decision: who asked and for what. Collides with the native `title` tooltip attribute on purpose: the row shows it. */
|
|
7
|
+
title: string;
|
|
8
|
+
/** A quiet second line: the dates, the amount, the reason given. */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** A leading mark: an Avatar, a StatusDot, an icon. Decorative unless the element names itself. */
|
|
11
|
+
leading?: React.ReactNode;
|
|
12
|
+
/** A trailing fact before the decision: when it was asked, how long it has waited. */
|
|
13
|
+
meta?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Where the decision stands, for controlled use. Pair with `onStatusChange`. Unset, the row keeps its own, starting at `defaultStatus`.
|
|
16
|
+
* @default "pending"
|
|
17
|
+
*/
|
|
18
|
+
status?: DecisionRowStatus;
|
|
19
|
+
/** Where it stands to begin with, for uncontrolled use. */
|
|
20
|
+
defaultStatus?: DecisionRowStatus;
|
|
21
|
+
/** Fires with the new status when the reader accepts, declines or undoes. */
|
|
22
|
+
onStatusChange?: (status: DecisionRowStatus) => void;
|
|
23
|
+
/** Fires when the reader accepts. */
|
|
24
|
+
onAccept?: () => void;
|
|
25
|
+
/** Fires when the reader declines. */
|
|
26
|
+
onDecline?: () => void;
|
|
27
|
+
/** Offers Undo on a settled row, which returns it to pending and fires this. Leave it unset where a decision cannot be reversed. */
|
|
28
|
+
onUndo?: () => void;
|
|
29
|
+
/** The accept button's colour: `destructive` for a decision whose yes takes something away (remove a member, delete a draft), as ActionCard's `tone` does for a change. */
|
|
30
|
+
tone?: 'default' | 'destructive';
|
|
31
|
+
/** The accept button's words. */
|
|
32
|
+
acceptLabel?: string;
|
|
33
|
+
/** The decline button's words. */
|
|
34
|
+
declineLabel?: string;
|
|
35
|
+
/** The settled mark's words once accepted. */
|
|
36
|
+
acceptedLabel?: string;
|
|
37
|
+
/** The settled mark's words once declined. */
|
|
38
|
+
declinedLabel?: string;
|
|
39
|
+
/** The undo button's words. */
|
|
40
|
+
undoLabel?: string;
|
|
41
|
+
/** What is announced when the row settles, given its title and the settled mark's words: "Accepted: Room booking". */
|
|
42
|
+
settledAnnouncement?: (title: string, outcome: string) => string;
|
|
43
|
+
/** Additional CSS classes */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** A ref onto the row's root `<div>`. */
|
|
46
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
47
|
+
};
|
|
48
|
+
export interface DecisionRowProps extends DecisionRowOwnProps, Omit<React.HTMLAttributes<HTMLDivElement>, keyof DecisionRowOwnProps> {
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* DecisionRow: one item waiting on a yes or a no, as a row in a list. While
|
|
52
|
+
* it is pending it offers two buttons in the host's words (Approve and Deny,
|
|
53
|
+
* Accept and Decline, Keep and Discard); once decided it settles to a mark
|
|
54
|
+
* saying which, with Undo while the host can reverse it. It is WidgetRow with
|
|
55
|
+
* that lifecycle, so it sits in a Widget beside plain rows.
|
|
56
|
+
*
|
|
57
|
+
* The buttons leave the row when it settles, so focus moves with them, to
|
|
58
|
+
* Undo when there is one and to the row otherwise, and the outcome is
|
|
59
|
+
* announced, so a keyboard or screen-reader user is never left on nothing.
|
|
60
|
+
*/
|
|
61
|
+
export declare function DecisionRow({ title, description, leading, meta, status: statusProp, defaultStatus, onStatusChange, onAccept, onDecline, onUndo, tone, acceptLabel, declineLabel, acceptedLabel, declinedLabel, undoLabel, settledAnnouncement, className, ref, ...rest }: DecisionRowProps): React.JSX.Element;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useRef, useEffect } from "react";
|
|
4
|
+
import { Badge } from "../Badge/Badge.js";
|
|
5
|
+
import { Button } from "../Button/Button.js";
|
|
6
|
+
import { WidgetRow } from "../Widget/Widget.js";
|
|
7
|
+
import "../../behaviors/visually-hidden.css";
|
|
8
|
+
import "./DecisionRow.css";
|
|
9
|
+
function DecisionRow({
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
leading,
|
|
13
|
+
meta,
|
|
14
|
+
status: statusProp,
|
|
15
|
+
defaultStatus = "pending",
|
|
16
|
+
onStatusChange,
|
|
17
|
+
onAccept,
|
|
18
|
+
onDecline,
|
|
19
|
+
onUndo,
|
|
20
|
+
tone = "default",
|
|
21
|
+
acceptLabel = "Accept",
|
|
22
|
+
declineLabel = "Decline",
|
|
23
|
+
acceptedLabel = "Accepted",
|
|
24
|
+
declinedLabel = "Declined",
|
|
25
|
+
undoLabel = "Undo",
|
|
26
|
+
settledAnnouncement = (rowTitle, outcome) => `${outcome}: ${rowTitle}`,
|
|
27
|
+
className = "",
|
|
28
|
+
ref,
|
|
29
|
+
...rest
|
|
30
|
+
}) {
|
|
31
|
+
const baseClass = "ds-decision-row";
|
|
32
|
+
const [ownStatus, setOwnStatus] = useState(defaultStatus);
|
|
33
|
+
const status = statusProp ?? ownStatus;
|
|
34
|
+
const rootRef = useRef(null);
|
|
35
|
+
const movedByPress = useRef(false);
|
|
36
|
+
const setRef = (node) => {
|
|
37
|
+
rootRef.current = node;
|
|
38
|
+
if (typeof ref === "function") ref(node);
|
|
39
|
+
else if (ref) ref.current = node;
|
|
40
|
+
};
|
|
41
|
+
const decide = (next) => {
|
|
42
|
+
movedByPress.current = true;
|
|
43
|
+
if (statusProp === void 0) setOwnStatus(next);
|
|
44
|
+
onStatusChange?.(next);
|
|
45
|
+
if (next === "accepted") onAccept?.();
|
|
46
|
+
else if (next === "declined") onDecline?.();
|
|
47
|
+
else onUndo?.();
|
|
48
|
+
};
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (!movedByPress.current) return;
|
|
51
|
+
movedByPress.current = false;
|
|
52
|
+
const root = rootRef.current;
|
|
53
|
+
if (!root) return;
|
|
54
|
+
const target = status === "pending" ? root.querySelector(`.${baseClass}__accept`) : root.querySelector(`.${baseClass}__undo`) ?? root;
|
|
55
|
+
target?.focus();
|
|
56
|
+
}, [status]);
|
|
57
|
+
const settled = status !== "pending";
|
|
58
|
+
const outcome = status === "accepted" ? acceptedLabel : declinedLabel;
|
|
59
|
+
const actions = settled ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__outcome`, "aria-hidden": "true", children: /* @__PURE__ */ jsx(Badge, { variant: status === "accepted" ? "positive" : "neutral", label: outcome }) }),
|
|
61
|
+
onUndo && /* @__PURE__ */ jsx(Button, { className: `${baseClass}__undo`, variant: "tertiary", size: "compact", iconLeft: "undo", label: undoLabel, onClick: () => decide("pending") })
|
|
62
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
Button,
|
|
65
|
+
{
|
|
66
|
+
className: `${baseClass}__accept`,
|
|
67
|
+
variant: "secondary",
|
|
68
|
+
tone,
|
|
69
|
+
size: "compact",
|
|
70
|
+
label: acceptLabel,
|
|
71
|
+
onClick: () => decide("accepted")
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(Button, { variant: "tertiary", tone: "neutral", size: "compact", label: declineLabel, onClick: () => decide("declined") })
|
|
75
|
+
] });
|
|
76
|
+
return /* @__PURE__ */ jsxs(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
...rest,
|
|
80
|
+
ref: setRef,
|
|
81
|
+
tabIndex: settled && !onUndo ? -1 : rest.tabIndex,
|
|
82
|
+
className: [baseClass, settled ? `${baseClass}--settled` : "", className].filter(Boolean).join(" "),
|
|
83
|
+
"data-status": status,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx(WidgetRow, { title, description, leading, meta, actions }),
|
|
86
|
+
/* @__PURE__ */ jsx("span", { className: "ds-visually-hidden", role: "status", children: settled ? settledAnnouncement(title, outcome) : "" })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
DecisionRow
|
|
93
|
+
};
|
|
@@ -97,6 +97,34 @@
|
|
|
97
97
|
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/* Emphasis: the entry the others add up to, under a rule, its term and
|
|
101
|
+
value in the emphasis weight and the primary text colour. With dividers
|
|
102
|
+
the entry above already draws the rule. */
|
|
103
|
+
.ds-description-list__item--emphasis {
|
|
104
|
+
padding-block-start: var(--padding-300);
|
|
105
|
+
border-block-start: var(--border-025) solid var(--color-divider);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ds-description-list--dividers .ds-description-list__item--emphasis {
|
|
109
|
+
border-block-start: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ds-description-list__item--emphasis .ds-description-list__term {
|
|
113
|
+
color: var(--color-text-primary);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ds-description-list--default .ds-description-list__item--emphasis .ds-description-list__term,
|
|
117
|
+
.ds-description-list--default .ds-description-list__item--emphasis .ds-description-list__details {
|
|
118
|
+
font-family: var(--font-paragraph-emphasis-family);
|
|
119
|
+
font-weight: var(--font-paragraph-emphasis-weight);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ds-description-list--compact .ds-description-list__item--emphasis .ds-description-list__term,
|
|
123
|
+
.ds-description-list--compact .ds-description-list__item--emphasis .ds-description-list__details {
|
|
124
|
+
font-family: var(--font-paragraph-sm-emphasis-family);
|
|
125
|
+
font-weight: var(--font-paragraph-sm-emphasis-weight);
|
|
126
|
+
}
|
|
127
|
+
|
|
100
128
|
/* Inline: term and value in two columns, the term a quarter, a third or a half */
|
|
101
129
|
.ds-description-list--inline .ds-description-list__item {
|
|
102
130
|
display: grid;
|
|
@@ -11,6 +11,8 @@ export type DescriptionListEntry = {
|
|
|
11
11
|
action?: React.ReactNode;
|
|
12
12
|
/** Offer a copy button: `true` copies the value when it is text, a string copies that string (the unformatted account number behind a formatted one). */
|
|
13
13
|
copyable?: boolean | string;
|
|
14
|
+
/** Sets the entry apart as the one the others add up to (a total, a balance due): its term and value in the emphasis weight and the primary text colour, under a rule. */
|
|
15
|
+
emphasis?: boolean;
|
|
14
16
|
};
|
|
15
17
|
/** Props owned by DescriptionList itself; everything else falls through to the `<dl>`. */
|
|
16
18
|
type DescriptionListOwnProps = {
|
|
@@ -60,5 +62,5 @@ type DescriptionListItemOwnProps = Omit<DescriptionListEntry, 'id'> & {
|
|
|
60
62
|
export interface DescriptionListItemProps extends DescriptionListItemOwnProps, Omit<React.ComponentPropsWithRef<'div'>, keyof DescriptionListItemOwnProps> {
|
|
61
63
|
}
|
|
62
64
|
/** One term and its value inside a DescriptionList, for a list written out by hand. Server-renderable. */
|
|
63
|
-
export declare function DescriptionListItem({ term, details, children, action, copyable, className, ref, ...rest }: DescriptionListItemProps): React.JSX.Element;
|
|
65
|
+
export declare function DescriptionListItem({ term, details, children, action, copyable, emphasis, className, ref, ...rest }: DescriptionListItemProps): React.JSX.Element;
|
|
64
66
|
export {};
|
|
@@ -5,11 +5,11 @@ import "../../behaviors/visually-hidden.css";
|
|
|
5
5
|
import "./DescriptionList.css";
|
|
6
6
|
const isEmpty = (value) => value == null || value === false || value === "";
|
|
7
7
|
const textOf = (value) => typeof value === "string" || typeof value === "number" ? String(value) : null;
|
|
8
|
-
function renderEntry({ term, details, id, action, copyable }, settings, className = "", rest = {}, ref) {
|
|
8
|
+
function renderEntry({ term, details, id, action, copyable, emphasis }, settings, className = "", rest = {}, ref) {
|
|
9
9
|
const empty = isEmpty(details);
|
|
10
10
|
const copyText = empty ? null : typeof copyable === "string" ? copyable : copyable ? textOf(details) : null;
|
|
11
11
|
const termText = textOf(term);
|
|
12
|
-
const classes = ["ds-description-list__item", className].filter(Boolean).join(" ");
|
|
12
|
+
const classes = ["ds-description-list__item", emphasis && "ds-description-list__item--emphasis", className].filter(Boolean).join(" ");
|
|
13
13
|
return /* @__PURE__ */ jsxs("div", { ...rest, ref, id: id ?? rest.id, className: classes, children: [
|
|
14
14
|
/* @__PURE__ */ jsx("dt", { className: "ds-description-list__term", children: term }),
|
|
15
15
|
/* @__PURE__ */ jsxs("dd", { className: "ds-description-list__details", children: [
|
|
@@ -75,6 +75,7 @@ function DescriptionListItem({
|
|
|
75
75
|
children,
|
|
76
76
|
action,
|
|
77
77
|
copyable,
|
|
78
|
+
emphasis,
|
|
78
79
|
className = "",
|
|
79
80
|
ref,
|
|
80
81
|
...rest
|
|
@@ -87,7 +88,7 @@ function DescriptionListItem({
|
|
|
87
88
|
onValueCopy: passed?.onValueCopy
|
|
88
89
|
};
|
|
89
90
|
return renderEntry(
|
|
90
|
-
{ term, details: details ?? children, action, copyable },
|
|
91
|
+
{ term, details: details ?? children, action, copyable, emphasis },
|
|
91
92
|
settings,
|
|
92
93
|
className,
|
|
93
94
|
divRest,
|
|
@@ -5,6 +5,7 @@ import { CircularButton } from "../CircularButton/CircularButton.js";
|
|
|
5
5
|
import { MOTION_FEEDBACK_RESET_MS } from "../../tokens/motion.js";
|
|
6
6
|
function writeClipboard(text) {
|
|
7
7
|
const fallback = () => {
|
|
8
|
+
const focused = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
8
9
|
const textarea = document.createElement("textarea");
|
|
9
10
|
textarea.value = text;
|
|
10
11
|
textarea.setAttribute("readonly", "");
|
|
@@ -13,6 +14,7 @@ function writeClipboard(text) {
|
|
|
13
14
|
textarea.select();
|
|
14
15
|
document.execCommand("copy");
|
|
15
16
|
document.body.removeChild(textarea);
|
|
17
|
+
focused?.focus({ preventScroll: true });
|
|
16
18
|
};
|
|
17
19
|
if (navigator.clipboard?.writeText) navigator.clipboard.writeText(text).catch(fallback);
|
|
18
20
|
else fallback();
|
|
@@ -49,10 +49,12 @@ type DropdownOwnProps = {
|
|
|
49
49
|
disabled?: boolean;
|
|
50
50
|
/** Whether the dropdown is required */
|
|
51
51
|
required?: boolean;
|
|
52
|
-
/** Error state */
|
|
52
|
+
/** Error state: marks the control invalid and, in the older form without `errorText`, recolours the helper text as the error message. */
|
|
53
53
|
error?: boolean;
|
|
54
|
-
/** Helper
|
|
54
|
+
/** Helper text displayed below the control. With the older `error` flag and no `errorText`, it doubles as the error message. */
|
|
55
55
|
helperText?: string;
|
|
56
|
+
/** 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. */
|
|
57
|
+
errorText?: React.ReactNode;
|
|
56
58
|
/** Called with the newly selected value */
|
|
57
59
|
onValueChange?: (value: string) => void;
|
|
58
60
|
/** Whether the list is open, controlled. Leave undefined to let the dropdown open and close itself. */
|
|
@@ -23,6 +23,7 @@ const Dropdown = React.forwardRef(
|
|
|
23
23
|
required = false,
|
|
24
24
|
error = false,
|
|
25
25
|
helperText,
|
|
26
|
+
errorText,
|
|
26
27
|
onValueChange,
|
|
27
28
|
open: openProp,
|
|
28
29
|
defaultOpen = false,
|
|
@@ -75,11 +76,13 @@ const Dropdown = React.forwardRef(
|
|
|
75
76
|
};
|
|
76
77
|
const baseClass = "ds-dropdown";
|
|
77
78
|
const isGrouped = groups && groups.length > 0;
|
|
79
|
+
const hasErrorText = errorText != null && errorText !== false && errorText !== "";
|
|
80
|
+
const invalid = error || hasErrorText;
|
|
78
81
|
const classes = [
|
|
79
82
|
baseClass,
|
|
80
83
|
size === "compact" ? `${baseClass}--compact` : "",
|
|
81
84
|
isOpen ? `${baseClass}--open` : "",
|
|
82
|
-
|
|
85
|
+
invalid ? `${baseClass}--error` : "",
|
|
83
86
|
disabled ? `${baseClass}--disabled` : "",
|
|
84
87
|
className
|
|
85
88
|
].filter(Boolean).join(" ");
|
|
@@ -194,6 +197,7 @@ const Dropdown = React.forwardRef(
|
|
|
194
197
|
ref: setRootRef,
|
|
195
198
|
label,
|
|
196
199
|
helperText,
|
|
200
|
+
errorText,
|
|
197
201
|
error,
|
|
198
202
|
required,
|
|
199
203
|
disabled,
|
|
@@ -212,8 +216,8 @@ const Dropdown = React.forwardRef(
|
|
|
212
216
|
"aria-label": ariaLabelAttr ?? ariaLabel ?? (!label ? placeholder : void 0),
|
|
213
217
|
"aria-controls": isOpen ? `${inputId}-listbox` : void 0,
|
|
214
218
|
"aria-activedescendant": activeOptionId,
|
|
215
|
-
"aria-describedby": [ariaDescribedBy, helperText ? `${inputId}-helper` : void 0].filter(Boolean).join(" ") || void 0,
|
|
216
|
-
"aria-invalid":
|
|
219
|
+
"aria-describedby": [ariaDescribedBy, hasErrorText ? `${inputId}-error` : void 0, helperText ? `${inputId}-helper` : void 0].filter(Boolean).join(" ") || void 0,
|
|
220
|
+
"aria-invalid": invalid || void 0,
|
|
217
221
|
tabIndex: disabled ? -1 : 0,
|
|
218
222
|
onClick: handleToggle,
|
|
219
223
|
onKeyDown: handleKeyDown,
|
|
@@ -40,6 +40,18 @@
|
|
|
40
40
|
--icon-size: var(--icon-size-600);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/* Tones: the icon tile takes a status role, for a result that worked or a
|
|
44
|
+
step that failed; the copy stays in the page's text colours. */
|
|
45
|
+
.ds-empty-state--positive .ds-empty-state__icon {
|
|
46
|
+
background-color: var(--color-status-positive-bg);
|
|
47
|
+
color: var(--color-status-positive-icon);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ds-empty-state--error .ds-empty-state__icon {
|
|
51
|
+
background-color: var(--color-status-error-bg);
|
|
52
|
+
color: var(--color-status-error-icon);
|
|
53
|
+
}
|
|
54
|
+
|
|
43
55
|
/* ============================================
|
|
44
56
|
CONTENT
|
|
45
57
|
============================================ */
|
|
@@ -19,6 +19,13 @@ type EmptyStateOwnProps = {
|
|
|
19
19
|
* dashed container, which reads better inside a card, table, or panel.
|
|
20
20
|
*/
|
|
21
21
|
variant?: 'plain' | 'bordered';
|
|
22
|
+
/**
|
|
23
|
+
* The icon tile's status colour. `default` is the quiet tile for nothing
|
|
24
|
+
* to show; `positive` is a result that worked (the end of a flow, with
|
|
25
|
+
* what happens next in the description and the action); `error` is a
|
|
26
|
+
* load or a step that failed.
|
|
27
|
+
*/
|
|
28
|
+
tone?: 'default' | 'positive' | 'error';
|
|
22
29
|
/** Additional CSS classes */
|
|
23
30
|
className?: string;
|
|
24
31
|
};
|
|
@@ -11,6 +11,7 @@ const EmptyState = React.forwardRef(
|
|
|
11
11
|
action,
|
|
12
12
|
size = "default",
|
|
13
13
|
variant = "plain",
|
|
14
|
+
tone = "default",
|
|
14
15
|
className = "",
|
|
15
16
|
...rest
|
|
16
17
|
}, ref) => {
|
|
@@ -19,6 +20,7 @@ const EmptyState = React.forwardRef(
|
|
|
19
20
|
baseClass,
|
|
20
21
|
`${baseClass}--${variant}`,
|
|
21
22
|
size === "compact" ? `${baseClass}--compact` : "",
|
|
23
|
+
tone !== "default" ? `${baseClass}--${tone}` : "",
|
|
22
24
|
className
|
|
23
25
|
].filter(Boolean).join(" ");
|
|
24
26
|
return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
|
|
@@ -284,6 +284,54 @@ button.ds-event-calendar__event:focus-visible {
|
|
|
284
284
|
font-variant-numeric: tabular-nums;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
+
/* ============================================
|
|
288
|
+
SPANS — an event over several days
|
|
289
|
+
Its pill on each day squares off the side the
|
|
290
|
+
event runs on through, so the days read as one
|
|
291
|
+
bar; the dot marks the first day only.
|
|
292
|
+
============================================ */
|
|
293
|
+
|
|
294
|
+
.ds-event-calendar__event--continued {
|
|
295
|
+
border-start-start-radius: 0;
|
|
296
|
+
border-end-start-radius: 0;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.ds-event-calendar__event--continues {
|
|
300
|
+
border-start-end-radius: 0;
|
|
301
|
+
border-end-end-radius: 0;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.ds-event-calendar__event--continued .ds-event-calendar__event-dot {
|
|
305
|
+
visibility: hidden;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/* ============================================
|
|
309
|
+
LEGEND — what each event colour means
|
|
310
|
+
============================================ */
|
|
311
|
+
|
|
312
|
+
.ds-event-calendar__legend {
|
|
313
|
+
display: flex;
|
|
314
|
+
flex-wrap: wrap;
|
|
315
|
+
gap: var(--gap-200) var(--gap-400);
|
|
316
|
+
margin: var(--gap-300) 0 0;
|
|
317
|
+
padding: 0;
|
|
318
|
+
list-style: none;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.ds-event-calendar__legend-item {
|
|
322
|
+
--ds-event-accent: var(--color-status-neutral-border);
|
|
323
|
+
|
|
324
|
+
display: inline-flex;
|
|
325
|
+
align-items: center;
|
|
326
|
+
gap: var(--gap-100);
|
|
327
|
+
color: var(--color-text-secondary);
|
|
328
|
+
font-family: var(--font-paragraph-sm-family);
|
|
329
|
+
font-size: var(--font-paragraph-sm-size);
|
|
330
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
331
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
332
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
333
|
+
}
|
|
334
|
+
|
|
287
335
|
/* ============================================
|
|
288
336
|
EVENT ACCENTS — core accent roles only
|
|
289
337
|
============================================ */
|
|
@@ -363,3 +411,68 @@ button.ds-event-calendar__more:focus-visible {
|
|
|
363
411
|
text-align: center;
|
|
364
412
|
}
|
|
365
413
|
}
|
|
414
|
+
|
|
415
|
+
/* On a phone a month cell is too narrow for any title: a pill cut to one
|
|
416
|
+
letter says nothing. The month grid draws each event as its dot, the
|
|
417
|
+
dots of a day wrapping in a row under the date, and a day's events read
|
|
418
|
+
in full from the selected-day panel or the pill's own name. The week
|
|
419
|
+
and day views have the room, and keep their pills. */
|
|
420
|
+
@media (max-width: 480px) {
|
|
421
|
+
.ds-event-calendar:not(.ds-event-calendar--week):not(.ds-event-calendar--day) .ds-event-calendar__events {
|
|
422
|
+
flex-direction: row;
|
|
423
|
+
flex-wrap: wrap;
|
|
424
|
+
justify-content: center;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.ds-event-calendar:not(.ds-event-calendar--week):not(.ds-event-calendar--day) .ds-event-calendar__event {
|
|
428
|
+
padding: var(--padding-050);
|
|
429
|
+
background-color: transparent;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.ds-event-calendar:not(.ds-event-calendar--week):not(.ds-event-calendar--day) .ds-event-calendar__event-title {
|
|
433
|
+
display: none;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* ============================================
|
|
438
|
+
WEEK VIEW — one week, every event shown
|
|
439
|
+
The cells take the room a week has to give,
|
|
440
|
+
so a busy day lists everything without an
|
|
441
|
+
overflow row.
|
|
442
|
+
============================================ */
|
|
443
|
+
|
|
444
|
+
.ds-event-calendar--week .ds-event-calendar__cell {
|
|
445
|
+
min-height: calc(var(--control-height-default) * 5);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* ============================================
|
|
449
|
+
DAY VIEW — one day, the week view's cell alone
|
|
450
|
+
============================================ */
|
|
451
|
+
|
|
452
|
+
.ds-event-calendar--day .ds-event-calendar__grid {
|
|
453
|
+
grid-template-columns: 1fr;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* ============================================
|
|
457
|
+
SELECTED DAY — the host's panel for the chosen day
|
|
458
|
+
============================================ */
|
|
459
|
+
|
|
460
|
+
.ds-event-calendar__selected-day {
|
|
461
|
+
margin-block-start: var(--gap-300);
|
|
462
|
+
padding-block-start: var(--padding-300);
|
|
463
|
+
border-block-start: var(--border-025) solid var(--color-divider);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* A legend entry that switches its colour: the shared Chip, its dot in the
|
|
467
|
+
entry's accent (an uncoloured entry takes the neutral one, at no weight,
|
|
468
|
+
so the accent class on the chip always wins). */
|
|
469
|
+
:where(.ds-event-calendar__legend .ds-chip) {
|
|
470
|
+
--ds-event-accent: var(--color-status-neutral-border);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/* In a chip the dot is the entry's whole mark, so it takes the larger step. */
|
|
474
|
+
.ds-event-calendar__legend .ds-chip .ds-event-calendar__event-dot {
|
|
475
|
+
display: block;
|
|
476
|
+
width: var(--gap-200);
|
|
477
|
+
height: var(--gap-200);
|
|
478
|
+
}
|
|
@@ -4,8 +4,10 @@ export type EventCalendarColor = 'neutral' | 'coral' | 'violet' | 'cobalt' | 'am
|
|
|
4
4
|
export interface EventCalendarEvent {
|
|
5
5
|
/** Unique event identifier. */
|
|
6
6
|
id: string;
|
|
7
|
-
/** The day the event falls on (YYYY-MM-DD). */
|
|
7
|
+
/** The day the event falls on (YYYY-MM-DD), or its first day when it runs over several. */
|
|
8
8
|
date: string;
|
|
9
|
+
/** The last day of an event that runs over several days (YYYY-MM-DD, inclusive): it shows on every day from `date` to this one, its pills joined across the days and its dot on the first. */
|
|
10
|
+
endDate?: string;
|
|
9
11
|
/** Short label shown in the event pill. */
|
|
10
12
|
title: string;
|
|
11
13
|
/** Start time as already-formatted text like "09:30". Untimed events sort first. */
|
|
@@ -13,6 +15,13 @@ export interface EventCalendarEvent {
|
|
|
13
15
|
/** Accent for the pill's dot, from the core accent roles. Defaults to `neutral`. */
|
|
14
16
|
color?: EventCalendarColor;
|
|
15
17
|
}
|
|
18
|
+
/** A colour the calendar's events use, and what it means, for the legend. */
|
|
19
|
+
export interface EventCalendarLegendItem {
|
|
20
|
+
/** The accent, as an event's `color` names it. */
|
|
21
|
+
color: EventCalendarColor;
|
|
22
|
+
/** What events in this colour are ("Offsites", "Deadlines"). */
|
|
23
|
+
label: string;
|
|
24
|
+
}
|
|
16
25
|
/** Props owned by EventCalendar itself — everything else falls through to the root element. */
|
|
17
26
|
type EventCalendarOwnProps = {
|
|
18
27
|
/** The events to place on the grid, including any that fall on the visible leading and trailing days of the neighbouring months. */
|
|
@@ -40,16 +49,50 @@ type EventCalendarOwnProps = {
|
|
|
40
49
|
* consumer; pair with `onDateClick` to move it.
|
|
41
50
|
*/
|
|
42
51
|
selectedDate?: string;
|
|
52
|
+
/** The date the calendar treats as today (`YYYY-MM-DD`): it carries the today chip and picks the month shown first. Defaults to the device's date; pin it for a demo, a test or a time zone the device is not in. */
|
|
53
|
+
today?: string;
|
|
54
|
+
/** What each event colour means, shown as a row of dots and labels under the grid. With `legendToggles`, each entry also shows and hides its colour's events. */
|
|
55
|
+
legend?: EventCalendarLegendItem[];
|
|
56
|
+
/** Makes each legend entry a selectable Chip that shows or hides the events of its colour, so a reader can narrow a busy calendar by kind. */
|
|
57
|
+
legendToggles?: boolean;
|
|
58
|
+
/** The colours whose events are hidden, for controlled use. Pair with `onHiddenColorsChange`. */
|
|
59
|
+
hiddenColors?: EventCalendarColor[];
|
|
60
|
+
/** The colours hidden to begin with, for uncontrolled use. */
|
|
61
|
+
defaultHiddenColors?: EventCalendarColor[];
|
|
62
|
+
/** Fires with the hidden colours after a legend entry is switched. */
|
|
63
|
+
onHiddenColorsChange?: (colors: EventCalendarColor[]) => void;
|
|
64
|
+
/** The name of the legend's set of toggles, when `legendToggles` is on. */
|
|
65
|
+
legendLabel?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Draws a panel for the selected day under the grid, in every view: handed
|
|
68
|
+
* the day (YYYY-MM-DD) and its events as shown, it returns what the panel
|
|
69
|
+
* holds (a list of the day's events, a form to add one). Shown only while
|
|
70
|
+
* `selectedDate` is set.
|
|
71
|
+
*/
|
|
72
|
+
renderSelectedDay?: (date: string, events: EventCalendarEvent[]) => React.ReactNode;
|
|
43
73
|
/** Trailing header slot, e.g. a "New event" Button. */
|
|
44
74
|
actions?: React.ReactNode;
|
|
75
|
+
/** `month` shows the whole month, a day's overflow folded behind "+N more"; `week` shows one week in tall cells with every event, stepping a week at a time from the selected day's week (else today's), which it keeps as its own state after mount; `day` shows that one day the same way, stepping a day at a time. */
|
|
76
|
+
view?: 'month' | 'week' | 'day';
|
|
45
77
|
/** Accessible name of the previous-month button. */
|
|
46
78
|
previousLabel?: string;
|
|
47
79
|
/** Accessible name of the next-month button. */
|
|
48
80
|
nextLabel?: string;
|
|
81
|
+
/** Accessible name of the previous-week button, in the week view. */
|
|
82
|
+
previousWeekLabel?: string;
|
|
83
|
+
/** Accessible name of the next-week button, in the week view. */
|
|
84
|
+
nextWeekLabel?: string;
|
|
85
|
+
/** Accessible name of the previous-day button, in the day view. */
|
|
86
|
+
previousDayLabel?: string;
|
|
87
|
+
/** Accessible name of the next-day button, in the day view. */
|
|
88
|
+
nextDayLabel?: string;
|
|
89
|
+
/** The visible text of the control that folds an expanded day back, when a day's "+N more" opens it in place (with no `onDateClick`). */
|
|
90
|
+
showLessLabel?: string;
|
|
49
91
|
/**
|
|
50
92
|
* The month heading, given the first day of the month in view: the visible
|
|
51
93
|
* title and the name of the day grid. Defaults to the month name and the
|
|
52
|
-
* year in `locale` ("January 2026" in `en-US`).
|
|
94
|
+
* year in `locale` ("January 2026" in `en-US`). Month view only; the week
|
|
95
|
+
* view's heading is the week's range in `locale`.
|
|
53
96
|
*/
|
|
54
97
|
monthLabel?: (month: Date) => string;
|
|
55
98
|
/**
|
|
@@ -67,8 +110,9 @@ type EventCalendarOwnProps = {
|
|
|
67
110
|
/**
|
|
68
111
|
* The weekday headers above the grid: seven entries, Sunday first, laid
|
|
69
112
|
* out from `weekStartsOn`. Defaults to the short weekday names in `locale`
|
|
70
|
-
* ("Sun" to "Sat" in `en-US`)
|
|
71
|
-
* the
|
|
113
|
+
* ("Sun" to "Sat" in `en-US`), or its narrow names where the short ones
|
|
114
|
+
* are whole words (Arabic); a list of any other length falls back to the
|
|
115
|
+
* default.
|
|
72
116
|
*/
|
|
73
117
|
weekdayLabels?: string[];
|
|
74
118
|
/**
|