oneslash-design-system 2.23.0 → 2.24.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 +1 -1
- package/dist/DESIGN.md +13 -2
- package/dist/cases/activity-timeline/activity.d.ts +1 -0
- package/dist/cases/activity-timeline/activity.jsx +43 -0
- package/dist/cases/activity-timeline/versions.d.ts +1 -0
- package/dist/cases/activity-timeline/versions.jsx +130 -0
- package/dist/cases/activity-timeline.md +315 -0
- package/dist/cases/agent-plan-proposal.md +1 -0
- package/dist/cases/ask-page/answered.d.ts +1 -0
- package/dist/cases/ask-page/answered.jsx +240 -0
- package/dist/cases/ask-page/first-visit.d.ts +1 -0
- package/dist/cases/ask-page/first-visit.jsx +118 -0
- package/dist/cases/ask-page.md +542 -0
- package/dist/cases/chart/bars.d.ts +1 -0
- package/dist/cases/chart/bars.jsx +83 -0
- package/dist/cases/chart/lines.d.ts +1 -0
- package/dist/cases/chart/lines.jsx +71 -0
- package/dist/cases/chart.md +258 -0
- package/dist/cases/comment-thread/card.d.ts +1 -0
- package/dist/cases/comment-thread/card.jsx +141 -0
- package/dist/cases/comment-thread/thread.d.ts +1 -0
- package/dist/cases/comment-thread/thread.jsx +87 -0
- package/dist/cases/comment-thread.md +349 -0
- package/dist/cases/dashboard/numbers-first.jsx +62 -1
- package/dist/cases/dashboard.md +75 -3
- package/dist/cases/leaderboard/ranked.d.ts +1 -0
- package/dist/cases/leaderboard/ranked.jsx +44 -0
- package/dist/cases/leaderboard/table.d.ts +1 -0
- package/dist/cases/leaderboard/table.jsx +87 -0
- package/dist/cases/leaderboard.md +177 -0
- package/dist/cases/number-format.md +4 -2
- package/dist/cases/onboarding/checklist.d.ts +1 -0
- package/dist/cases/onboarding/checklist.jsx +92 -0
- package/dist/cases/onboarding/steps.d.ts +3 -0
- package/dist/cases/onboarding/steps.jsx +177 -0
- package/dist/cases/onboarding.md +368 -0
- package/dist/cases/plan-sign-off/one-approver.d.ts +1 -0
- package/dist/cases/plan-sign-off/one-approver.jsx +129 -0
- package/dist/cases/plan-sign-off/team.d.ts +1 -0
- package/dist/cases/plan-sign-off/team.jsx +213 -0
- package/dist/cases/plan-sign-off.md +541 -0
- package/dist/cases/stat-row.md +1 -1
- package/dist/cases/task-header/agent-sets-status.d.ts +1 -0
- package/dist/cases/task-header/agent-sets-status.jsx +164 -0
- package/dist/cases/task-header/people-change-status.d.ts +1 -0
- package/dist/cases/task-header/people-change-status.jsx +175 -0
- package/dist/cases/task-header.md +576 -0
- package/dist/cases.json +645 -7
- package/dist/components/barChart.d.ts +35 -0
- package/dist/components/barChart.jsx +90 -0
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/heading.jsx +5 -3
- package/dist/components/lineChart.d.ts +39 -0
- package/dist/components/lineChart.jsx +128 -0
- package/dist/components/popover.jsx +7 -2
- package/dist/components/timeline.d.ts +32 -0
- package/dist/components/timeline.jsx +54 -0
- package/dist/components/titleBar.d.ts +3 -1
- package/dist/components/titleBar.jsx +9 -4
- package/dist/internal/chart.d.ts +39 -0
- package/dist/internal/chart.js +110 -0
- package/dist/internal/chartFrame.d.ts +29 -0
- package/dist/internal/chartFrame.jsx +57 -0
- package/dist/native-mapping.json +19 -1
- package/dist/stories/BarChart.stories.d.ts +10 -0
- package/dist/stories/BarChart.stories.jsx +104 -0
- package/dist/stories/Cases.generated.stories.d.ts +16 -0
- package/dist/stories/Cases.generated.stories.jsx +32 -0
- package/dist/stories/Heading.stories.d.ts +1 -0
- package/dist/stories/Heading.stories.jsx +17 -0
- package/dist/stories/LineChart.stories.d.ts +9 -0
- package/dist/stories/LineChart.stories.jsx +34 -0
- package/dist/stories/Onboarding.probe.stories.d.ts +6 -0
- package/dist/stories/Onboarding.probe.stories.jsx +12 -0
- package/dist/stories/Popover.stories.d.ts +1 -0
- package/dist/stories/Popover.stories.jsx +17 -0
- package/dist/stories/Timeline.stories.d.ts +8 -0
- package/dist/stories/Timeline.stories.jsx +49 -0
- package/dist/stories/TitleBar.stories.d.ts +1 -0
- package/dist/stories/TitleBar.stories.jsx +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const plotTop = "pt-3";
|
|
3
|
+
export declare const labelRow = "relative mt-3 h-[18px]";
|
|
4
|
+
export interface ChartTable {
|
|
5
|
+
/** The first column names the labels; the rest name the values and are right-aligned */
|
|
6
|
+
columns: string[];
|
|
7
|
+
/** One row per point: the label, then the exact values as text */
|
|
8
|
+
rows: string[][];
|
|
9
|
+
}
|
|
10
|
+
export interface ChartFrameProps {
|
|
11
|
+
/** The base id: the figure's id, and `<id>-title`, `<id>-summary`, `<id>-table` inside */
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
/** One sentence the caller writes from the data, saying what changed */
|
|
15
|
+
summary: string;
|
|
16
|
+
/** The highlighted point in words ('Nov 14: 58 comments'), or '' when none is chosen */
|
|
17
|
+
readout: string;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** No point has a value: the empty text shows in the plot's place and there is no table */
|
|
20
|
+
empty?: boolean;
|
|
21
|
+
emptyText: string;
|
|
22
|
+
table: ChartTable;
|
|
23
|
+
/** The drawing, a `role="group"` tab stop the chart builds */
|
|
24
|
+
plot: React.ReactNode;
|
|
25
|
+
/** The plot's drawn height in px, so the loading Skeleton keeps the chart's size */
|
|
26
|
+
height: number;
|
|
27
|
+
legend?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export default function ChartFrame({ id, title, summary, readout, loading, empty, emptyText, table, plot, height, legend }: ChartFrameProps): React.JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import Heading from '../components/heading';
|
|
4
|
+
import Button from '../components/button';
|
|
5
|
+
import EmptyBox from '../components/emptyBox';
|
|
6
|
+
import Skeleton from '../components/skeleton';
|
|
7
|
+
import TableContainer from '../components/tableContainer';
|
|
8
|
+
import TableHeader from '../components/tableHeader';
|
|
9
|
+
import TableHeaderCell from '../components/tableHeaderCell';
|
|
10
|
+
import TableRow from '../components/tableRow';
|
|
11
|
+
import TableCell from '../components/tableCell';
|
|
12
|
+
// The plot's frame around its drawing, shared so a chart and its loading Skeleton are the same height:
|
|
13
|
+
// room above for the top tick, which hangs half a line over its gridline, and the x label row below,
|
|
14
|
+
// clear of the 0 tick that hangs half a line under the plot.
|
|
15
|
+
export var plotTop = 'pt-3';
|
|
16
|
+
export var labelRow = 'relative mt-3 h-[18px]';
|
|
17
|
+
// The frame both charts share: the title, the summary, the legend, a polite readout line, the plot,
|
|
18
|
+
// and 'Show Table' with the exact values. Not exported from the package; BarChart and LineChart use it.
|
|
19
|
+
export default function ChartFrame(_a) {
|
|
20
|
+
var id = _a.id, title = _a.title, summary = _a.summary, readout = _a.readout, _b = _a.loading, loading = _b === void 0 ? false : _b, _c = _a.empty, empty = _c === void 0 ? false : _c, emptyText = _a.emptyText, table = _a.table, plot = _a.plot, height = _a.height, legend = _a.legend;
|
|
21
|
+
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
|
22
|
+
var titleId = "".concat(id, "-title");
|
|
23
|
+
var tableId = "".concat(id, "-table");
|
|
24
|
+
var ready = !loading && !empty;
|
|
25
|
+
return (<figure id={id} aria-labelledby={titleId} aria-busy={loading || undefined} className="flex w-full min-w-0 flex-col gap-small">
|
|
26
|
+
<Heading level={3} size="subtitle1" id={titleId}>{title}</Heading>
|
|
27
|
+
<p id={"".concat(id, "-summary")} className="text-body2 text-fg-secondary">{summary}</p>
|
|
28
|
+
{legend}
|
|
29
|
+
{/* Kept mounted so each change is announced; it holds a line's height so the plot does not move */}
|
|
30
|
+
<p role="status" aria-live="polite" className="min-h-[21px] break-words text-body2 text-fg-primary">{ready ? readout : ''}</p>
|
|
31
|
+
{loading ? (
|
|
32
|
+
// The plot's frame with the Skeleton in the drawing's place, so nothing moves when it loads
|
|
33
|
+
<div className={plotTop}>
|
|
34
|
+
<div className="[&>div]:h-full" style={{ height: height }}>
|
|
35
|
+
<Skeleton variant="block" label={"Loading ".concat(title)}/>
|
|
36
|
+
</div>
|
|
37
|
+
<div className={labelRow}/>
|
|
38
|
+
</div>) : empty ? (<EmptyBox size="small" text={emptyText}/>) : (plot)}
|
|
39
|
+
{ready && (<>
|
|
40
|
+
<div className="flex">
|
|
41
|
+
<Button type="tertiary" size="small" state="enabled" label={open ? 'Hide Table' : 'Show Table'} aria-expanded={open} aria-controls={tableId} onClickButton={function () { return setOpen(function (o) { return !o; }); }}/>
|
|
42
|
+
</div>
|
|
43
|
+
<div id={tableId}>
|
|
44
|
+
{open && (<TableContainer aria-label={title}>
|
|
45
|
+
<TableHeader>
|
|
46
|
+
<TableRow>
|
|
47
|
+
{table.columns.map(function (c, i) { return (<TableHeaderCell key={c} align={i === 0 ? 'left' : 'right'}>{c}</TableHeaderCell>); })}
|
|
48
|
+
</TableRow>
|
|
49
|
+
</TableHeader>
|
|
50
|
+
{table.rows.map(function (row, r) { return (<TableRow key={r}>
|
|
51
|
+
{row.map(function (cell, i) { return (<TableCell key={i} align={i === 0 ? 'left' : 'right'}>{cell}</TableCell>); })}
|
|
52
|
+
</TableRow>); })}
|
|
53
|
+
</TableContainer>)}
|
|
54
|
+
</div>
|
|
55
|
+
</>)}
|
|
56
|
+
</figure>);
|
|
57
|
+
}
|
package/dist/native-mapping.json
CHANGED
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
"compose": "A `Row` with `Arrangement.spacedBy((-8).dp)` of avatars and a count circle, with `semantics(mergeDescendants = true)` and a label naming the people",
|
|
25
25
|
"note": "To list everyone, make the stack a `Button` that opens a popover (iPad, Mac) or a sheet (iPhone) / a `DropdownMenu` or `ModalBottomSheet`."
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
"ods": "barChart",
|
|
29
|
+
"swiftui": "Swift Charts `Chart` of `BarMark`s with `.accessibilityLabel` and `.accessibilityValue` per mark",
|
|
30
|
+
"compose": "No system chart: draw the bars on a `Canvas` with `semantics` per bar, or show the table",
|
|
31
|
+
"note": "Bars in `primary.main`, the highlighted one in `text.primary`, gridlines in `misc.divider`. The y axis starts at 0; ticks are short (`.compact`), the value and the table exact. A missing day draws no bar and reads \"No data\". Keep a way to show the values as a table."
|
|
32
|
+
},
|
|
27
33
|
{
|
|
28
34
|
"ods": "button",
|
|
29
35
|
"swiftui": "`Button` with `.odsProminentButton()` for accent (`.odsProminentButton(.glass)` for the glass style), `.bordered` for primary",
|
|
@@ -173,6 +179,12 @@
|
|
|
173
179
|
"swiftui": "`Divider`",
|
|
174
180
|
"compose": "`HorizontalDivider`, `VerticalDivider`"
|
|
175
181
|
},
|
|
182
|
+
{
|
|
183
|
+
"ods": "lineChart",
|
|
184
|
+
"swiftui": "Swift Charts `Chart` of `LineMark`s, the second series told apart by `.lineStyle(StrokeStyle(dash:))` in place of `.foregroundStyle(by:)`, with an `AXChartDescriptor`",
|
|
185
|
+
"compose": "No system chart: draw each line as a `Path` on a `Canvas` with `semantics` per point, or show the table",
|
|
186
|
+
"note": "One or two series: the first solid in `primary.main`, the second dashed in `text.secondary`, with a legend. A missing day breaks the line and reads \"No data\"; never draw it as 0. The y axis starts at 0; ticks are short (`.compact`), the readout and the table exact. Keep a way to show the values as a table."
|
|
187
|
+
},
|
|
176
188
|
{
|
|
177
189
|
"ods": "link",
|
|
178
190
|
"swiftui": "`Link`",
|
|
@@ -428,11 +440,17 @@
|
|
|
428
440
|
"swiftui": "`Text(_:style:)` (`.relative`) or `Text(_:format:)` (`.dateTime`)",
|
|
429
441
|
"compose": "`Text` with `DateUtils.getRelativeTimeSpanString` or `DateTimeFormatter.ofLocalizedDateTime`"
|
|
430
442
|
},
|
|
443
|
+
{
|
|
444
|
+
"ods": "timeline",
|
|
445
|
+
"swiftui": "A `List` of rows with a leading `Circle` and a connecting `Rectangle` in an `.overlay`; a selectable row is a `Button`",
|
|
446
|
+
"compose": "A `LazyColumn` of rows with the dot and the connecting line drawn in `Modifier.drawBehind`; a selectable row is `Modifier.clickable`",
|
|
447
|
+
"note": "The dot is the same for every row: color carries nothing. No line after the last row. Mark the selected row with `.accessibilityAddTraits(.isSelected)` / `semantics { selected = true }`. Format the time with `Text(_:format:)` / `DateTimeFormatter.ofLocalizedDateTime`."
|
|
448
|
+
},
|
|
431
449
|
{
|
|
432
450
|
"ods": "titleBar",
|
|
433
451
|
"swiftui": "`.navigationTitle` with `.toolbar` items",
|
|
434
452
|
"compose": "`TopAppBar` with `navigationIcon` and `actions`",
|
|
435
|
-
"note": "The main action stays in the toolbar; the rest go in a `Menu` / an overflow `DropdownMenu`."
|
|
453
|
+
"note": "The main action stays in the toolbar; the rest go in a `Menu` / an overflow `DropdownMenu`. The `meta` line is a `.navigationSubtitle` on Mac and a toolbar `principal` item on iPhone; on Android a second `Text` in the top bar's `title` slot."
|
|
436
454
|
},
|
|
437
455
|
{
|
|
438
456
|
"ods": "toaster",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import BarChart from "../components/barChart";
|
|
3
|
+
declare const meta: Meta<typeof BarChart>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof BarChart>;
|
|
6
|
+
export declare const Week: Story;
|
|
7
|
+
export declare const Month: Story;
|
|
8
|
+
export declare const Empty: Story;
|
|
9
|
+
export declare const Loading: Story;
|
|
10
|
+
export declare const Highlighted: Story;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
23
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import React from "react";
|
|
49
|
+
import BarChart from "../components/barChart";
|
|
50
|
+
var meta = {
|
|
51
|
+
title: "Components/BarChart",
|
|
52
|
+
component: BarChart,
|
|
53
|
+
decorators: [
|
|
54
|
+
function (Story) { return (<div style={{ maxWidth: "640px" }}>
|
|
55
|
+
<Story />
|
|
56
|
+
</div>); },
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
export default meta;
|
|
60
|
+
var week = [
|
|
61
|
+
{ label: "Nov 10", value: 40 },
|
|
62
|
+
{ label: "Nov 11", value: 52 },
|
|
63
|
+
{ label: "Nov 12", value: 47 },
|
|
64
|
+
{ label: "Nov 13", value: 61 },
|
|
65
|
+
{ label: "Nov 14", value: 58 },
|
|
66
|
+
{ label: "Nov 15", value: 66 },
|
|
67
|
+
{ label: "Nov 16", value: 72 },
|
|
68
|
+
];
|
|
69
|
+
// Oct 18 to Nov 16, 2026. Oct 25 and Nov 8 have no data.
|
|
70
|
+
var monthValues = [
|
|
71
|
+
31, 28, 35, 40, 38, 22, 19, null, 36, 41, 39, 44, 30, 26, 37, 45, 43, 48, 51, 33, 29, null, 49, 52, 47, 61, 58, 66, 72, 54,
|
|
72
|
+
];
|
|
73
|
+
var month = monthValues.map(function (value, i) {
|
|
74
|
+
var day = new Date(Date.UTC(2026, 9, 18 + i));
|
|
75
|
+
var label = "".concat(day.toLocaleString("en-US", { month: "short", timeZone: "UTC" }), " ").concat(day.getUTCDate());
|
|
76
|
+
return { label: label, value: value };
|
|
77
|
+
});
|
|
78
|
+
export var Week = {
|
|
79
|
+
render: function () { return (<BarChart id="week" title="Comments this week" summary="Comments rose from 40 on Nov 10 to 72 on Nov 16." data={week} unit="comments"/>); },
|
|
80
|
+
};
|
|
81
|
+
export var Month = {
|
|
82
|
+
tags: ["shell"],
|
|
83
|
+
render: function () { return (<BarChart id="month" title="Comments this month" summary="Comments grew from about 30 a day in late October to 54 on Nov 16. Oct 25 and Nov 8 have no data." data={month} unit="comments"/>); },
|
|
84
|
+
};
|
|
85
|
+
export var Empty = {
|
|
86
|
+
render: function () { return (<BarChart id="empty" title="Comments this week" summary="No comments were counted this week." data={week.map(function (d) { return (__assign(__assign({}, d), { value: null })); })} unit="comments"/>); },
|
|
87
|
+
};
|
|
88
|
+
export var Loading = {
|
|
89
|
+
render: function () { return (<BarChart id="loading" title="Comments this week" summary="Comments per day, Nov 10 to Nov 16." data={[]} unit="comments" loading/>); },
|
|
90
|
+
};
|
|
91
|
+
// The plot has focus and ArrowLeft has highlighted the last bar
|
|
92
|
+
export var Highlighted = {
|
|
93
|
+
render: function () { return (<BarChart id="highlighted" title="Comments this week" summary="Comments rose from 40 on Nov 10 to 72 on Nov 16." data={week} unit="comments"/>); },
|
|
94
|
+
play: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
95
|
+
var plot;
|
|
96
|
+
var canvasElement = _b.canvasElement;
|
|
97
|
+
return __generator(this, function (_c) {
|
|
98
|
+
plot = canvasElement.querySelector("#highlighted [role='group']");
|
|
99
|
+
plot === null || plot === void 0 ? void 0 : plot.focus();
|
|
100
|
+
plot === null || plot === void 0 ? void 0 : plot.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowLeft", bubbles: true }));
|
|
101
|
+
return [2 /*return*/];
|
|
102
|
+
});
|
|
103
|
+
}); },
|
|
104
|
+
};
|
|
@@ -6,6 +6,8 @@ export declare const AboutPage_Profile: Story;
|
|
|
6
6
|
export declare const AcceptInvite_SignedOut: Story;
|
|
7
7
|
export declare const AcceptInvite_SignedIn: Story;
|
|
8
8
|
export declare const AccountMenu_Menu: Story;
|
|
9
|
+
export declare const ActivityTimeline_Activity: Story;
|
|
10
|
+
export declare const ActivityTimeline_Versions: Story;
|
|
9
11
|
export declare const AdminInbox_List: Story;
|
|
10
12
|
export declare const AdminInbox_Split: Story;
|
|
11
13
|
export declare const AgentOptions_Cards: Story;
|
|
@@ -20,6 +22,8 @@ export declare const ApiKeys_List: Story;
|
|
|
20
22
|
export declare const AppShell_Sidebar: Story;
|
|
21
23
|
export declare const AppShell_TopTabs: Story;
|
|
22
24
|
export declare const ArtifactCard_Card: Story;
|
|
25
|
+
export declare const AskPage_FirstVisit: Story;
|
|
26
|
+
export declare const AskPage_Answered: Story;
|
|
23
27
|
export declare const AuthGateLoading_Spinner: Story;
|
|
24
28
|
export declare const AuthGateLoading_SpinnerWithLine: Story;
|
|
25
29
|
export declare const BillingPage_SelfServe: Story;
|
|
@@ -32,11 +36,15 @@ export declare const BreakdownList_Bars: Story;
|
|
|
32
36
|
export declare const BreakdownList_Table: Story;
|
|
33
37
|
export declare const Changelog_OnePage: Story;
|
|
34
38
|
export declare const Changelog_ByMonth: Story;
|
|
39
|
+
export declare const Chart_Bars: Story;
|
|
40
|
+
export declare const Chart_Lines: Story;
|
|
35
41
|
export declare const CheckYourEmail_Page: Story;
|
|
36
42
|
export declare const CheckYourEmail_AlertOnLogin: Story;
|
|
37
43
|
export declare const CodeSample_Block: Story;
|
|
38
44
|
export declare const CodeSample_Command: Story;
|
|
39
45
|
export declare const CollapsibleSearch_Popover: Story;
|
|
46
|
+
export declare const CommentThread_Card: Story;
|
|
47
|
+
export declare const CommentThread_Thread: Story;
|
|
40
48
|
export declare const ComposerLimit_Notice: Story;
|
|
41
49
|
export declare const ComposerLimit_NoticeWithAction: Story;
|
|
42
50
|
export declare const ConfirmDestructiveAction_Modal: Story;
|
|
@@ -93,6 +101,8 @@ export declare const InvoiceList_Table: Story;
|
|
|
93
101
|
export declare const InvoiceList_WithUpcoming: Story;
|
|
94
102
|
export declare const LandingHero_Centered: Story;
|
|
95
103
|
export declare const LandingHero_Split: Story;
|
|
104
|
+
export declare const Leaderboard_Ranked: Story;
|
|
105
|
+
export declare const Leaderboard_Table: Story;
|
|
96
106
|
export declare const LegalPage_Sections: Story;
|
|
97
107
|
export declare const LoadFailure_Region: Story;
|
|
98
108
|
export declare const LoadFailure_Inline: Story;
|
|
@@ -129,6 +139,8 @@ export declare const OauthConsent_Simple: Story;
|
|
|
129
139
|
export declare const OauthConsent_WithScope: Story;
|
|
130
140
|
export declare const OnOffSettings_List: Story;
|
|
131
141
|
export declare const OnThisPage_Aside: Story;
|
|
142
|
+
export declare const Onboarding_Steps: Story;
|
|
143
|
+
export declare const Onboarding_Checklist: Story;
|
|
132
144
|
export declare const OverflowMenu_OnARow: Story;
|
|
133
145
|
export declare const OverflowMenu_InAHeader: Story;
|
|
134
146
|
export declare const PageEnd_CtaBand: Story;
|
|
@@ -149,6 +161,8 @@ export declare const PlanChangeConfirm_Downgrade: Story;
|
|
|
149
161
|
export declare const PlanChangeConfirm_Blocked: Story;
|
|
150
162
|
export declare const PlanPicker_Cards: Story;
|
|
151
163
|
export declare const PlanPicker_List: Story;
|
|
164
|
+
export declare const PlanSignOff_OneApprover: Story;
|
|
165
|
+
export declare const PlanSignOff_Team: Story;
|
|
152
166
|
export declare const PricingSection_Cards: Story;
|
|
153
167
|
export declare const ProductCards_Grid: Story;
|
|
154
168
|
export declare const ProfileForm_Form: Story;
|
|
@@ -188,6 +202,8 @@ export declare const StatusLabel_Dot: Story;
|
|
|
188
202
|
export declare const StatusLabel_Text: Story;
|
|
189
203
|
export declare const TabbedPanels_Tabs: Story;
|
|
190
204
|
export declare const TagFilter_Tags: Story;
|
|
205
|
+
export declare const TaskHeader_PeopleChangeStatus: Story;
|
|
206
|
+
export declare const TaskHeader_AgentSetsStatus: Story;
|
|
191
207
|
export declare const ThemeSwitcher_Menu: Story;
|
|
192
208
|
export declare const ThemeSwitcher_Segmented: Story;
|
|
193
209
|
export declare const TypeToConfirm_Modal: Story;
|
|
@@ -4,6 +4,8 @@ import AboutPage_ProfileExample from "../cases/about-page/profile";
|
|
|
4
4
|
import AcceptInvite_SignedOutExample from "../cases/accept-invite/signed-out";
|
|
5
5
|
import AcceptInvite_SignedInExample from "../cases/accept-invite/signed-in";
|
|
6
6
|
import AccountMenu_MenuExample from "../cases/account-menu/menu";
|
|
7
|
+
import ActivityTimeline_ActivityExample from "../cases/activity-timeline/activity";
|
|
8
|
+
import ActivityTimeline_VersionsExample from "../cases/activity-timeline/versions";
|
|
7
9
|
import AdminInbox_ListExample from "../cases/admin-inbox/list";
|
|
8
10
|
import AdminInbox_SplitExample from "../cases/admin-inbox/split";
|
|
9
11
|
import AgentOptions_CardsExample from "../cases/agent-options/cards";
|
|
@@ -18,6 +20,8 @@ import ApiKeys_ListExample from "../cases/api-keys/list";
|
|
|
18
20
|
import AppShell_SidebarExample from "../cases/app-shell/sidebar";
|
|
19
21
|
import AppShell_TopTabsExample from "../cases/app-shell/top-tabs";
|
|
20
22
|
import ArtifactCard_CardExample from "../cases/artifact-card/card";
|
|
23
|
+
import AskPage_FirstVisitExample from "../cases/ask-page/first-visit";
|
|
24
|
+
import AskPage_AnsweredExample from "../cases/ask-page/answered";
|
|
21
25
|
import AuthGateLoading_SpinnerExample from "../cases/auth-gate-loading/spinner";
|
|
22
26
|
import AuthGateLoading_SpinnerWithLineExample from "../cases/auth-gate-loading/spinner-with-line";
|
|
23
27
|
import BillingPage_SelfServeExample from "../cases/billing-page/self-serve";
|
|
@@ -30,11 +34,15 @@ import BreakdownList_BarsExample from "../cases/breakdown-list/bars";
|
|
|
30
34
|
import BreakdownList_TableExample from "../cases/breakdown-list/table";
|
|
31
35
|
import Changelog_OnePageExample from "../cases/changelog/one-page";
|
|
32
36
|
import Changelog_ByMonthExample from "../cases/changelog/by-month";
|
|
37
|
+
import Chart_BarsExample from "../cases/chart/bars";
|
|
38
|
+
import Chart_LinesExample from "../cases/chart/lines";
|
|
33
39
|
import CheckYourEmail_PageExample from "../cases/check-your-email/page";
|
|
34
40
|
import CheckYourEmail_AlertOnLoginExample from "../cases/check-your-email/alert-on-login";
|
|
35
41
|
import CodeSample_BlockExample from "../cases/code-sample/block";
|
|
36
42
|
import CodeSample_CommandExample from "../cases/code-sample/command";
|
|
37
43
|
import CollapsibleSearch_PopoverExample from "../cases/collapsible-search/popover";
|
|
44
|
+
import CommentThread_CardExample from "../cases/comment-thread/card";
|
|
45
|
+
import CommentThread_ThreadExample from "../cases/comment-thread/thread";
|
|
38
46
|
import ComposerLimit_NoticeExample from "../cases/composer-limit/notice";
|
|
39
47
|
import ComposerLimit_NoticeWithActionExample from "../cases/composer-limit/notice-with-action";
|
|
40
48
|
import ConfirmDestructiveAction_ModalExample from "../cases/confirm-destructive-action/modal";
|
|
@@ -91,6 +99,8 @@ import InvoiceList_TableExample from "../cases/invoice-list/table";
|
|
|
91
99
|
import InvoiceList_WithUpcomingExample from "../cases/invoice-list/with-upcoming";
|
|
92
100
|
import LandingHero_CenteredExample from "../cases/landing-hero/centered";
|
|
93
101
|
import LandingHero_SplitExample from "../cases/landing-hero/split";
|
|
102
|
+
import Leaderboard_RankedExample from "../cases/leaderboard/ranked";
|
|
103
|
+
import Leaderboard_TableExample from "../cases/leaderboard/table";
|
|
94
104
|
import LegalPage_SectionsExample from "../cases/legal-page/sections";
|
|
95
105
|
import LoadFailure_RegionExample from "../cases/load-failure/region";
|
|
96
106
|
import LoadFailure_InlineExample from "../cases/load-failure/inline";
|
|
@@ -127,6 +137,8 @@ import OauthConsent_SimpleExample from "../cases/oauth-consent/simple";
|
|
|
127
137
|
import OauthConsent_WithScopeExample from "../cases/oauth-consent/with-scope";
|
|
128
138
|
import OnOffSettings_ListExample from "../cases/on-off-settings/list";
|
|
129
139
|
import OnThisPage_AsideExample from "../cases/on-this-page/aside";
|
|
140
|
+
import Onboarding_StepsExample from "../cases/onboarding/steps";
|
|
141
|
+
import Onboarding_ChecklistExample from "../cases/onboarding/checklist";
|
|
130
142
|
import OverflowMenu_OnARowExample from "../cases/overflow-menu/on-a-row";
|
|
131
143
|
import OverflowMenu_InAHeaderExample from "../cases/overflow-menu/in-a-header";
|
|
132
144
|
import PageEnd_CtaBandExample from "../cases/page-end/cta-band";
|
|
@@ -147,6 +159,8 @@ import PlanChangeConfirm_DowngradeExample from "../cases/plan-change-confirm/dow
|
|
|
147
159
|
import PlanChangeConfirm_BlockedExample from "../cases/plan-change-confirm/blocked";
|
|
148
160
|
import PlanPicker_CardsExample from "../cases/plan-picker/cards";
|
|
149
161
|
import PlanPicker_ListExample from "../cases/plan-picker/list";
|
|
162
|
+
import PlanSignOff_OneApproverExample from "../cases/plan-sign-off/one-approver";
|
|
163
|
+
import PlanSignOff_TeamExample from "../cases/plan-sign-off/team";
|
|
150
164
|
import PricingSection_CardsExample from "../cases/pricing-section/cards";
|
|
151
165
|
import ProductCards_GridExample from "../cases/product-cards/grid";
|
|
152
166
|
import ProfileForm_FormExample from "../cases/profile-form/form";
|
|
@@ -186,6 +200,8 @@ import StatusLabel_DotExample from "../cases/status-label/dot";
|
|
|
186
200
|
import StatusLabel_TextExample from "../cases/status-label/text";
|
|
187
201
|
import TabbedPanels_TabsExample from "../cases/tabbed-panels/tabs";
|
|
188
202
|
import TagFilter_TagsExample from "../cases/tag-filter/tags";
|
|
203
|
+
import TaskHeader_PeopleChangeStatusExample from "../cases/task-header/people-change-status";
|
|
204
|
+
import TaskHeader_AgentSetsStatusExample from "../cases/task-header/agent-sets-status";
|
|
189
205
|
import ThemeSwitcher_MenuExample from "../cases/theme-switcher/menu";
|
|
190
206
|
import ThemeSwitcher_SegmentedExample from "../cases/theme-switcher/segmented";
|
|
191
207
|
import TypeToConfirm_ModalExample from "../cases/type-to-confirm/modal";
|
|
@@ -204,6 +220,8 @@ export var AboutPage_Profile = { tags: ["shell"], render: function () { return <
|
|
|
204
220
|
export var AcceptInvite_SignedOut = { render: function () { return <AcceptInvite_SignedOutExample />; } };
|
|
205
221
|
export var AcceptInvite_SignedIn = { render: function () { return <AcceptInvite_SignedInExample />; } };
|
|
206
222
|
export var AccountMenu_Menu = { render: function () { return <AccountMenu_MenuExample />; } };
|
|
223
|
+
export var ActivityTimeline_Activity = { tags: ["shell"], render: function () { return <ActivityTimeline_ActivityExample />; } };
|
|
224
|
+
export var ActivityTimeline_Versions = { tags: ["shell"], render: function () { return <ActivityTimeline_VersionsExample />; } };
|
|
207
225
|
export var AdminInbox_List = { tags: ["shell"], render: function () { return <AdminInbox_ListExample />; } };
|
|
208
226
|
export var AdminInbox_Split = { tags: ["shell"], render: function () { return <AdminInbox_SplitExample />; } };
|
|
209
227
|
export var AgentOptions_Cards = { render: function () { return <AgentOptions_CardsExample />; } };
|
|
@@ -218,6 +236,8 @@ export var ApiKeys_List = { render: function () { return <ApiKeys_ListExample />
|
|
|
218
236
|
export var AppShell_Sidebar = { tags: ["shell"], render: function () { return <AppShell_SidebarExample />; } };
|
|
219
237
|
export var AppShell_TopTabs = { tags: ["shell"], render: function () { return <AppShell_TopTabsExample />; } };
|
|
220
238
|
export var ArtifactCard_Card = { render: function () { return <ArtifactCard_CardExample />; } };
|
|
239
|
+
export var AskPage_FirstVisit = { render: function () { return <AskPage_FirstVisitExample />; } };
|
|
240
|
+
export var AskPage_Answered = { render: function () { return <AskPage_AnsweredExample />; } };
|
|
221
241
|
export var AuthGateLoading_Spinner = { render: function () { return <AuthGateLoading_SpinnerExample />; } };
|
|
222
242
|
export var AuthGateLoading_SpinnerWithLine = { render: function () { return <AuthGateLoading_SpinnerWithLineExample />; } };
|
|
223
243
|
export var BillingPage_SelfServe = { tags: ["shell"], render: function () { return <BillingPage_SelfServeExample />; } };
|
|
@@ -230,11 +250,15 @@ export var BreakdownList_Bars = { tags: ["shell"], render: function () { return
|
|
|
230
250
|
export var BreakdownList_Table = { tags: ["shell"], render: function () { return <BreakdownList_TableExample />; } };
|
|
231
251
|
export var Changelog_OnePage = { tags: ["shell"], render: function () { return <Changelog_OnePageExample />; } };
|
|
232
252
|
export var Changelog_ByMonth = { tags: ["shell"], render: function () { return <Changelog_ByMonthExample />; } };
|
|
253
|
+
export var Chart_Bars = { tags: ["shell"], render: function () { return <Chart_BarsExample />; } };
|
|
254
|
+
export var Chart_Lines = { tags: ["shell"], render: function () { return <Chart_LinesExample />; } };
|
|
233
255
|
export var CheckYourEmail_Page = { render: function () { return <CheckYourEmail_PageExample />; } };
|
|
234
256
|
export var CheckYourEmail_AlertOnLogin = { render: function () { return <CheckYourEmail_AlertOnLoginExample />; } };
|
|
235
257
|
export var CodeSample_Block = { tags: ["shell"], render: function () { return <CodeSample_BlockExample />; } };
|
|
236
258
|
export var CodeSample_Command = { tags: ["shell"], render: function () { return <CodeSample_CommandExample />; } };
|
|
237
259
|
export var CollapsibleSearch_Popover = { render: function () { return <CollapsibleSearch_PopoverExample />; } };
|
|
260
|
+
export var CommentThread_Card = { render: function () { return <CommentThread_CardExample />; } };
|
|
261
|
+
export var CommentThread_Thread = { render: function () { return <CommentThread_ThreadExample />; } };
|
|
238
262
|
export var ComposerLimit_Notice = { render: function () { return <ComposerLimit_NoticeExample />; } };
|
|
239
263
|
export var ComposerLimit_NoticeWithAction = { render: function () { return <ComposerLimit_NoticeWithActionExample />; } };
|
|
240
264
|
export var ConfirmDestructiveAction_Modal = { render: function () { return <ConfirmDestructiveAction_ModalExample />; } };
|
|
@@ -291,6 +315,8 @@ export var InvoiceList_Table = { tags: ["shell"], render: function () { return <
|
|
|
291
315
|
export var InvoiceList_WithUpcoming = { tags: ["shell"], render: function () { return <InvoiceList_WithUpcomingExample />; } };
|
|
292
316
|
export var LandingHero_Centered = { tags: ["shell"], render: function () { return <LandingHero_CenteredExample />; } };
|
|
293
317
|
export var LandingHero_Split = { tags: ["shell"], render: function () { return <LandingHero_SplitExample />; } };
|
|
318
|
+
export var Leaderboard_Ranked = { tags: ["shell"], render: function () { return <Leaderboard_RankedExample />; } };
|
|
319
|
+
export var Leaderboard_Table = { tags: ["shell"], render: function () { return <Leaderboard_TableExample />; } };
|
|
294
320
|
export var LegalPage_Sections = { tags: ["shell"], render: function () { return <LegalPage_SectionsExample />; } };
|
|
295
321
|
export var LoadFailure_Region = { render: function () { return <LoadFailure_RegionExample />; } };
|
|
296
322
|
export var LoadFailure_Inline = { render: function () { return <LoadFailure_InlineExample />; } };
|
|
@@ -327,6 +353,8 @@ export var OauthConsent_Simple = { render: function () { return <OauthConsent_Si
|
|
|
327
353
|
export var OauthConsent_WithScope = { render: function () { return <OauthConsent_WithScopeExample />; } };
|
|
328
354
|
export var OnOffSettings_List = { render: function () { return <OnOffSettings_ListExample />; } };
|
|
329
355
|
export var OnThisPage_Aside = { tags: ["shell"], render: function () { return <OnThisPage_AsideExample />; } };
|
|
356
|
+
export var Onboarding_Steps = { render: function () { return <Onboarding_StepsExample />; } };
|
|
357
|
+
export var Onboarding_Checklist = { render: function () { return <Onboarding_ChecklistExample />; } };
|
|
330
358
|
export var OverflowMenu_OnARow = { render: function () { return <OverflowMenu_OnARowExample />; } };
|
|
331
359
|
export var OverflowMenu_InAHeader = { render: function () { return <OverflowMenu_InAHeaderExample />; } };
|
|
332
360
|
export var PageEnd_CtaBand = { tags: ["shell"], render: function () { return <PageEnd_CtaBandExample />; } };
|
|
@@ -347,6 +375,8 @@ export var PlanChangeConfirm_Downgrade = { tags: ["shell"], render: function ()
|
|
|
347
375
|
export var PlanChangeConfirm_Blocked = { tags: ["shell"], render: function () { return <PlanChangeConfirm_BlockedExample />; } };
|
|
348
376
|
export var PlanPicker_Cards = { tags: ["shell"], render: function () { return <PlanPicker_CardsExample />; } };
|
|
349
377
|
export var PlanPicker_List = { tags: ["shell"], render: function () { return <PlanPicker_ListExample />; } };
|
|
378
|
+
export var PlanSignOff_OneApprover = { render: function () { return <PlanSignOff_OneApproverExample />; } };
|
|
379
|
+
export var PlanSignOff_Team = { render: function () { return <PlanSignOff_TeamExample />; } };
|
|
350
380
|
export var PricingSection_Cards = { tags: ["shell"], render: function () { return <PricingSection_CardsExample />; } };
|
|
351
381
|
export var ProductCards_Grid = { tags: ["shell"], render: function () { return <ProductCards_GridExample />; } };
|
|
352
382
|
export var ProfileForm_Form = { render: function () { return <ProfileForm_FormExample />; } };
|
|
@@ -386,6 +416,8 @@ export var StatusLabel_Dot = { tags: ["shell"], render: function () { return <St
|
|
|
386
416
|
export var StatusLabel_Text = { tags: ["shell"], render: function () { return <StatusLabel_TextExample />; } };
|
|
387
417
|
export var TabbedPanels_Tabs = { tags: ["shell"], render: function () { return <TabbedPanels_TabsExample />; } };
|
|
388
418
|
export var TagFilter_Tags = { render: function () { return <TagFilter_TagsExample />; } };
|
|
419
|
+
export var TaskHeader_PeopleChangeStatus = { tags: ["shell"], render: function () { return <TaskHeader_PeopleChangeStatusExample />; } };
|
|
420
|
+
export var TaskHeader_AgentSetsStatus = { tags: ["shell"], render: function () { return <TaskHeader_AgentSetsStatusExample />; } };
|
|
389
421
|
export var ThemeSwitcher_Menu = { tags: ["shell"], render: function () { return <ThemeSwitcher_MenuExample />; } };
|
|
390
422
|
export var ThemeSwitcher_Segmented = { tags: ["shell"], render: function () { return <ThemeSwitcher_SegmentedExample />; } };
|
|
391
423
|
export var TypeToConfirm_Modal = { render: function () { return <TypeToConfirm_ModalExample />; } };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import Heading from "../components/heading";
|
|
3
|
+
import Button from "../components/button";
|
|
2
4
|
var meta = {
|
|
3
5
|
title: "Components/Heading",
|
|
4
6
|
component: Heading,
|
|
@@ -8,3 +10,18 @@ export default meta;
|
|
|
8
10
|
export var Level1 = {
|
|
9
11
|
args: { level: 1, size: "h4", children: "Account settings" },
|
|
10
12
|
};
|
|
13
|
+
function RefProbeView() {
|
|
14
|
+
var ref = React.useRef(null);
|
|
15
|
+
return (<div>
|
|
16
|
+
<Button size="medium" type="primary" state="enabled" label="Go to step" onClickButton={function () { var _a; return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); }}/>
|
|
17
|
+
<Heading level={2} tabIndex={-1} ref={ref} className="outline-none">
|
|
18
|
+
Step two
|
|
19
|
+
</Heading>
|
|
20
|
+
<Button size="medium" type="secondary" state="enabled" label="After"/>
|
|
21
|
+
</div>);
|
|
22
|
+
}
|
|
23
|
+
// For tests/interactions.spec.ts only: a button moves focus to the heading through its ref
|
|
24
|
+
export var RefProbe = {
|
|
25
|
+
tags: ["!dev", "!autodocs", "test-only"],
|
|
26
|
+
render: function () { return <RefProbeView />; },
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import LineChart from "../components/lineChart";
|
|
3
|
+
declare const meta: Meta<typeof LineChart>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof LineChart>;
|
|
6
|
+
export declare const OneSeries: Story;
|
|
7
|
+
export declare const TwoSeries: Story;
|
|
8
|
+
export declare const OnePoint: Story;
|
|
9
|
+
export declare const Huge: Story;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import LineChart from "../components/lineChart";
|
|
3
|
+
var meta = {
|
|
4
|
+
title: "Components/LineChart",
|
|
5
|
+
component: LineChart,
|
|
6
|
+
decorators: [
|
|
7
|
+
function (Story) { return (<div style={{ maxWidth: "640px" }}>
|
|
8
|
+
<Story />
|
|
9
|
+
</div>); },
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
// Nov 3 to Nov 16, 2026
|
|
14
|
+
var days = Array.from({ length: 14 }, function (_, i) {
|
|
15
|
+
var day = new Date(Date.UTC(2026, 10, 3 + i));
|
|
16
|
+
return "".concat(day.toLocaleString("en-US", { month: "short", timeZone: "UTC" }), " ").concat(day.getUTCDate());
|
|
17
|
+
});
|
|
18
|
+
export var OneSeries = {
|
|
19
|
+
render: function () { return (<LineChart id="one-series" title="Comments per day" summary="Comments rose from 31 on Nov 3 to 72 on Nov 16." labels={days} series={[{ name: "comments", values: [31, 35, 33, 40, 38, 44, 42, 47, 52, 49, 58, 61, 66, 72] }]}/>); },
|
|
20
|
+
};
|
|
21
|
+
// Nov 8 has no data for either series
|
|
22
|
+
export var TwoSeries = {
|
|
23
|
+
tags: ["shell"],
|
|
24
|
+
render: function () { return (<LineChart id="two-series" title="Tasks opened and done" summary="More tasks were opened than done on every day. Nov 8 has no data." labels={days} series={[
|
|
25
|
+
{ name: "opened", values: [24, 28, 26, 31, 35, null, 33, 38, 42, 40, 47, 58, 51, 55] },
|
|
26
|
+
{ name: "done", values: [15, 19, 22, 20, 26, null, 25, 29, 31, 34, 36, 41, 44, 46] },
|
|
27
|
+
]}/>); },
|
|
28
|
+
};
|
|
29
|
+
export var OnePoint = {
|
|
30
|
+
render: function () { return (<LineChart id="one-point" title="Comments per day" summary="The first day counted, Nov 16, had 72 comments." labels={["Nov 16"]} series={[{ name: "comments", values: [72] }]}/>); },
|
|
31
|
+
};
|
|
32
|
+
export var Huge = {
|
|
33
|
+
render: function () { return (<LineChart id="huge" title="Comments per day" summary="Comments stayed near 1.2 million a day from Nov 10 to Nov 16." labels={days.slice(7)} series={[{ name: "comments", values: [1180420, 1201903, 1195288, 1210775, 1222014, 1219640, 1234567] }]}/>); },
|
|
34
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import OnboardingSteps from "../cases/onboarding/steps";
|
|
3
|
+
declare const meta: Meta<typeof OnboardingSteps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OnboardingSteps>;
|
|
6
|
+
export declare const StepsProbe: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import OnboardingSteps from "../cases/onboarding/steps";
|
|
3
|
+
var meta = {
|
|
4
|
+
title: "Onboarding",
|
|
5
|
+
component: OnboardingSteps,
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
// For tests/interactions.spec.ts only: the workspace request fails once, then goes through
|
|
9
|
+
export var StepsProbe = {
|
|
10
|
+
tags: ["!dev", "!autodocs", "test-only"],
|
|
11
|
+
render: function () { return <OnboardingSteps failOn="workspace"/>; },
|
|
12
|
+
};
|
|
@@ -45,3 +45,20 @@ var PopoverWithMenuWrapper = function () {
|
|
|
45
45
|
export var WithMenu = {
|
|
46
46
|
render: function () { return <PopoverWithMenuWrapper />; },
|
|
47
47
|
};
|
|
48
|
+
// The caller clears the anchor as it closes: `open` and `anchorEl` change in the same render
|
|
49
|
+
var ClearAnchorProbeBox = function () {
|
|
50
|
+
var _a = useState(null), anchor = _a[0], setAnchor = _a[1];
|
|
51
|
+
return (<div style={{ padding: "100px" }}>
|
|
52
|
+
<button type="button" onClick={function (event) { return setAnchor(anchor ? null : event.currentTarget); }}>
|
|
53
|
+
Open probe
|
|
54
|
+
</button>
|
|
55
|
+
<Popover open={anchor !== null} anchorEl={anchor} onClose={function () { return setAnchor(null); }} returnFocus>
|
|
56
|
+
<input aria-label="Inside"/>
|
|
57
|
+
</Popover>
|
|
58
|
+
</div>);
|
|
59
|
+
};
|
|
60
|
+
export var ClearAnchorProbe = {
|
|
61
|
+
// For tests/interactions.spec.ts only: hidden from the sidebar and the docs, and skipped by the visual gate
|
|
62
|
+
tags: ["!dev", "!autodocs", "test-only"],
|
|
63
|
+
render: function () { return <ClearAnchorProbeBox />; },
|
|
64
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Timeline from "../components/timeline";
|
|
3
|
+
declare const meta: Meta<typeof Timeline>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Timeline>;
|
|
6
|
+
export declare const Activity: Story;
|
|
7
|
+
export declare const Versions: Story;
|
|
8
|
+
export declare const Edges: Story;
|