@ciridae/ui 1.0.3 → 1.0.4
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/dist/chat/conversation-source.d.ts +15 -1
- package/dist/chat/describe-tool-call.d.ts +3 -3
- package/dist/chat/describe-tool-call.js +3 -3
- package/dist/chat/message-text.js +2 -2
- package/dist/ciridae.css +16 -4
- package/dist/components/activity-feed.d.ts +1 -0
- package/dist/components/activity-feed.js +1 -0
- package/dist/components/app-frame.d.ts +13 -1
- package/dist/components/app-frame.js +45 -3
- package/dist/components/app-navigation.d.ts +28 -1
- package/dist/components/app-navigation.js +105 -14
- package/dist/components/badge.d.ts +29 -4
- package/dist/components/badge.js +134 -15
- package/dist/components/bulk-action-bar.js +3 -3
- package/dist/components/button.d.ts +10 -3
- package/dist/components/button.js +77 -44
- package/dist/components/calendar.js +44 -17
- package/dist/components/centered-page.js +2 -2
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +16 -11
- package/dist/components/chat-client-source.js +47 -6
- package/dist/components/chat-sheet-controller.d.ts +1 -0
- package/dist/components/chat-sheet-controller.js +1 -0
- package/dist/components/chat-sheet.d.ts +10 -2
- package/dist/components/chat-sheet.js +76 -39
- package/dist/components/chat.d.ts +90 -14
- package/dist/components/chat.js +402 -101
- package/dist/components/checkbox-item.d.ts +5 -2
- package/dist/components/checkbox-item.js +9 -5
- package/dist/components/chip.d.ts +5 -0
- package/dist/components/chip.js +27 -1
- package/dist/components/column-settings.js +1 -1
- package/dist/components/command-menu.d.ts +5 -1
- package/dist/components/command-menu.js +98 -32
- package/dist/components/command-palette.d.ts +6 -2
- package/dist/components/command-palette.js +20 -10
- package/dist/components/data-display.d.ts +35 -4
- package/dist/components/data-display.js +138 -19
- package/dist/components/data-grid.d.ts +14 -2
- package/dist/components/data-grid.js +61 -26
- package/dist/components/date-range-picker.js +9 -20
- package/dist/components/drawer.d.ts +5 -0
- package/dist/components/drawer.js +91 -54
- package/dist/components/editable-field.d.ts +12 -3
- package/dist/components/editable-field.js +57 -27
- package/dist/components/email-input.js +6 -5
- package/dist/components/environment-frame.d.ts +1 -1
- package/dist/components/environment-frame.js +37 -6
- package/dist/components/filter-bar.js +39 -28
- package/dist/components/form-controls.d.ts +9 -0
- package/dist/components/form-controls.js +46 -22
- package/dist/components/form-layout.d.ts +7 -3
- package/dist/components/form-layout.js +68 -23
- package/dist/components/glass-menu.d.ts +3 -0
- package/dist/components/glass-menu.js +63 -0
- package/dist/components/gradient-edge.d.ts +9 -0
- package/dist/components/gradient-edge.js +31 -0
- package/dist/components/input.d.ts +4 -2
- package/dist/components/input.js +26 -15
- package/dist/components/keycap.d.ts +9 -5
- package/dist/components/keycap.js +57 -19
- package/dist/components/lightbox.js +2 -1
- package/dist/components/locale.d.ts +10 -0
- package/dist/components/locale.js +18 -2
- package/dist/components/log-entry.d.ts +40 -0
- package/dist/components/log-entry.js +146 -0
- package/dist/components/mention-input.js +4 -3
- package/dist/components/menu.d.ts +6 -2
- package/dist/components/menu.js +34 -37
- package/dist/components/meter.d.ts +9 -1
- package/dist/components/meter.js +64 -6
- package/dist/components/navigation.d.ts +21 -4
- package/dist/components/navigation.js +84 -19
- package/dist/components/notification-tray.js +5 -4
- package/dist/components/overlays.d.ts +3 -1
- package/dist/components/overlays.js +69 -40
- package/dist/components/page-frame.js +1 -1
- package/dist/components/panel.d.ts +1 -1
- package/dist/components/panel.js +18 -12
- package/dist/components/radio-card.js +10 -9
- package/dist/components/record.d.ts +25 -1
- package/dist/components/record.js +147 -18
- package/dist/components/segmented-bar.d.ts +3 -1
- package/dist/components/segmented-bar.js +16 -6
- package/dist/components/select.d.ts +5 -2
- package/dist/components/select.js +103 -127
- package/dist/components/shell-skeleton.js +1 -1
- package/dist/components/shell.d.ts +2 -2
- package/dist/components/shell.js +43 -45
- package/dist/components/sidebar.d.ts +7 -2
- package/dist/components/sidebar.js +55 -27
- package/dist/components/single-line-text.d.ts +2 -0
- package/dist/components/single-line-text.js +16 -0
- package/dist/components/site-banner.d.ts +5 -2
- package/dist/components/site-banner.js +17 -6
- package/dist/components/skeleton.d.ts +7 -6
- package/dist/components/skeleton.js +28 -16
- package/dist/components/skeletons.d.ts +12 -0
- package/dist/components/skeletons.js +71 -8
- package/dist/components/stages.d.ts +78 -6
- package/dist/components/stages.js +512 -156
- package/dist/components/stat-card.d.ts +10 -2
- package/dist/components/stat-card.js +92 -37
- package/dist/components/status-banner.js +1 -1
- package/dist/components/tabs.js +26 -13
- package/dist/components/theme-toggle.d.ts +4 -0
- package/dist/components/theme-toggle.js +67 -0
- package/dist/components/toast.d.ts +9 -2
- package/dist/components/toast.js +78 -29
- package/dist/preset.js +289 -33
- package/dist/styled-system/styles.css +3115 -1044
- package/dist/styled-system/tokens/index.mjs +598 -22
- package/dist/styled-system/tokens/tokens.d.ts +11 -11
- package/dist/styled-system/types/prop-type.d.ts +2 -2
- package/dist/styles.css +16 -4
- package/dist/theme/color.d.ts +3 -0
- package/dist/theme/color.js +5 -0
- package/dist/theme/derive.d.ts +9 -2
- package/dist/theme/derive.js +72 -12
- package/dist/theme/palettes.d.ts +49 -6
- package/dist/theme/palettes.js +84 -15
- package/dist/theme/tokens.d.ts +3 -3
- package/dist/theme/tokens.js +107 -32
- package/package.json +9 -1
|
@@ -1,34 +1,75 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { css } from "#primitives/css";
|
|
2
|
+
import { css, cx } from "#primitives/css";
|
|
3
3
|
import { createTableColumns, Table } from "./data-grid.js";
|
|
4
4
|
import { Cluster, MutedText, Stack, Text, Toolbar } from "./layout.js";
|
|
5
|
-
import { Panel, PanelHeader } from "./panel.js";
|
|
5
|
+
import { cardSurface, Panel, PanelHeader } from "./panel.js";
|
|
6
6
|
import { Skeleton } from "./skeleton.js";
|
|
7
7
|
// These placeholders stand in for product page chrome, so their spacing mirrors the page,
|
|
8
8
|
// panel, and sidebar layouts a Crucible screen builds around them.
|
|
9
9
|
/** Mirrors SidebarSection: its label's inset and the same gap between rows. */
|
|
10
|
-
const sidebarSection = css({ display: "grid", gap: "
|
|
10
|
+
const sidebarSection = css({ display: "grid", gap: "control.trackInset" });
|
|
11
11
|
const sidebarLabel = css({
|
|
12
12
|
display: "flex",
|
|
13
13
|
alignItems: "center",
|
|
14
14
|
paddingInline: "control.compactInline",
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
paddingTop: "layout.tightGap",
|
|
16
|
+
paddingBottom: "control.compactBlock",
|
|
17
|
+
fontSize: "code",
|
|
17
18
|
lineHeight: "tight",
|
|
18
19
|
});
|
|
19
20
|
const sidebarRow = css({
|
|
20
21
|
display: "flex",
|
|
21
22
|
alignItems: "center",
|
|
22
|
-
gap: "
|
|
23
|
-
height: "control.
|
|
23
|
+
gap: "layout.controlGap",
|
|
24
|
+
height: "control.row",
|
|
24
25
|
paddingInline: "control.compactInline",
|
|
25
26
|
});
|
|
26
27
|
const pageTitle = css({ fontSize: "heading.section" });
|
|
27
28
|
const panelRow = css({
|
|
28
29
|
paddingBlock: "control.block",
|
|
29
|
-
borderTop: "1px solid token(colors.border.
|
|
30
|
+
borderTop: "1px solid token(colors.border.divider)",
|
|
30
31
|
"&:first-of-type": { borderTop: "0" },
|
|
31
32
|
});
|
|
33
|
+
// A list row: two lines of copy over each other, then a status chip at the end.
|
|
34
|
+
const listRow = css({
|
|
35
|
+
display: "flex",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
gap: "layout.contentGap",
|
|
38
|
+
padding: "control.block",
|
|
39
|
+
lineHeight: "tight",
|
|
40
|
+
});
|
|
41
|
+
const listRowCopy = css({ display: "grid", gap: "control.iconGap", flex: "1", minWidth: "0" });
|
|
42
|
+
// A stat tile's and a card's placeholders wear the card they stand in for.
|
|
43
|
+
const statTile = css(cardSurface, {
|
|
44
|
+
display: "grid",
|
|
45
|
+
alignContent: "start",
|
|
46
|
+
justifyItems: "start",
|
|
47
|
+
gap: "skeleton.tileGap",
|
|
48
|
+
minHeight: "tile.minimum",
|
|
49
|
+
paddingBlock: "tile.block",
|
|
50
|
+
paddingInline: "tile.inline",
|
|
51
|
+
lineHeight: "tight",
|
|
52
|
+
});
|
|
53
|
+
const card = css(cardSurface, {
|
|
54
|
+
display: "grid",
|
|
55
|
+
alignContent: "start",
|
|
56
|
+
gap: "layout.clusterGap",
|
|
57
|
+
minHeight: "skeleton.card",
|
|
58
|
+
padding: "panel.card",
|
|
59
|
+
lineHeight: "tight",
|
|
60
|
+
});
|
|
61
|
+
const cardHeader = css({ display: "grid", gap: "layout.controlGap" });
|
|
62
|
+
const cardBars = css({
|
|
63
|
+
display: "grid",
|
|
64
|
+
alignContent: "center",
|
|
65
|
+
gap: "layout.contentGap",
|
|
66
|
+
minHeight: "skeleton.cardBody",
|
|
67
|
+
});
|
|
68
|
+
const cardBar = css({ display: "flex", alignItems: "center", gap: "layout.controlGap" });
|
|
69
|
+
const cardTakeaway = css({
|
|
70
|
+
paddingTop: "panel.default",
|
|
71
|
+
borderTop: "1px solid token(colors.border.divider)",
|
|
72
|
+
});
|
|
32
73
|
const textWidths = ["72%", "54%", "64%", "46%"];
|
|
33
74
|
/** Stands in for a labelled group of sidebar rows: a section label, then icon-and-name rows. */
|
|
34
75
|
export function SidebarRowsSkeleton({ rows = 3 }) {
|
|
@@ -42,6 +83,28 @@ export function PageHeaderSkeleton({ avatar = false, actions = 0, }) {
|
|
|
42
83
|
export function PanelSkeleton({ rows = 4 }) {
|
|
43
84
|
return (_jsxs(Panel, { tone: "outline", children: [_jsx(PanelHeader, { level: 2, title: _jsx(Skeleton, { shape: "text", style: { width: 120 } }) }), _jsx("div", { children: Array.from({ length: rows }, (_, index) => (_jsxs(Toolbar, { justify: "between", className: panelRow, children: [_jsx(Skeleton, { shape: "text", style: { width: 80 } }), _jsx(Skeleton, { shape: "text", style: { width: 96 + (index % 3) * 24 } })] }, index))) })] }));
|
|
44
85
|
}
|
|
86
|
+
/* Each placeholder row varies its bars' widths, so a column of them does not read as a grid. */
|
|
87
|
+
const listRowWidths = [
|
|
88
|
+
[220, 90],
|
|
89
|
+
[180, 120],
|
|
90
|
+
[200, 70],
|
|
91
|
+
];
|
|
92
|
+
/** Stands in for list rows: a line of text over a line of small print, then a status chip. */
|
|
93
|
+
export function ListRowsSkeleton({ rows = 3 }) {
|
|
94
|
+
return (_jsx("div", { children: Array.from({ length: rows }, (_, index) => {
|
|
95
|
+
const [text, caption] = listRowWidths[index % listRowWidths.length];
|
|
96
|
+
return (_jsxs("div", { className: listRow, children: [_jsxs("div", { className: listRowCopy, children: [_jsx(Skeleton, { shape: "text", height: "line", style: { maxWidth: text } }), _jsx(Skeleton, { shape: "text", height: "smallLine", style: { maxWidth: caption } })] }), _jsx(Skeleton, { shape: "pill", width: "short" })] }, index));
|
|
97
|
+
}) }));
|
|
98
|
+
}
|
|
99
|
+
/** Stands in for a stat tile: its label, a small badge for the figure, and a line of small print. */
|
|
100
|
+
export function StatTileSkeleton({ className }) {
|
|
101
|
+
return (_jsxs("div", { className: cx(statTile, className), children: [_jsx(Skeleton, { shape: "text", height: "line", style: { width: 100 } }), _jsx(Skeleton, { shape: "pill", height: "badge", style: { width: 48 } }), _jsx(Skeleton, { shape: "text", height: "smallLine", style: { width: 120 } })] }));
|
|
102
|
+
}
|
|
103
|
+
const cardBarWidths = ["35%", "46%", "60%", "23%"];
|
|
104
|
+
/** Stands in for a card: a title and its meta line, labelled bars, and a takeaway under a rule. */
|
|
105
|
+
export function CardSkeleton({ bars = 4 }) {
|
|
106
|
+
return (_jsxs("div", { className: card, children: [_jsxs("div", { className: cardHeader, children: [_jsx(Skeleton, { shape: "text", height: "line", style: { width: 170 } }), _jsx(Skeleton, { shape: "text", height: "smallLine", style: { maxWidth: 220 } })] }), _jsx("div", { className: cardBars, children: Array.from({ length: bars }, (_, index) => (_jsxs("div", { className: cardBar, children: [_jsx(Skeleton, { shape: "text", height: "smallLine", style: { width: 56 } }), _jsx(Skeleton, { height: "bar", width: cardBarWidths[index % cardBarWidths.length] })] }, index))) }), _jsx("div", { className: cardTakeaway, children: _jsx(Skeleton, { shape: "text", height: "smallLine", style: { maxWidth: 200 } }) })] }));
|
|
107
|
+
}
|
|
45
108
|
/** Placeholder for a row's compact edit and delete icon buttons. */
|
|
46
109
|
export function RowActionsSkeleton() {
|
|
47
110
|
return (_jsxs(Cluster, { gap: "12", render: _jsx("span", {}), children: [_jsx(Skeleton, { shape: "circle", style: { width: 24 } }), _jsx(Skeleton, { shape: "circle", style: { width: 24 } })] }));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type MenuItem } from "./menu.js";
|
|
2
1
|
import type { Tone } from "./badge.js";
|
|
3
|
-
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import type { ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
3
|
/**
|
|
5
4
|
* Where a step stands: `done`; `current`, the reader's to do; `waiting` on someone else; `agent`,
|
|
6
5
|
* an agent is on it; `blocked`; `locked` until an earlier step lands; `todo`, ahead.
|
|
@@ -10,7 +9,7 @@ export type StepDotProps = Omit<ComponentProps<"span">, "children"> & {
|
|
|
10
9
|
status: StepStatus;
|
|
11
10
|
/** `medium` 16px, `small` 14px on rows and the strip, `chip` 12px inside chips. */
|
|
12
11
|
size?: "chip" | "small" | "medium";
|
|
13
|
-
/** Drawn in place of the status
|
|
12
|
+
/** Drawn in place of the status mark, such as a count. */
|
|
14
13
|
children?: ReactNode;
|
|
15
14
|
};
|
|
16
15
|
/** A step's status as a dot; decorative, so the text beside it says the status. */
|
|
@@ -30,7 +29,7 @@ export type StageStripProps = Omit<ComponentProps<"ol">, "children" | "defaultVa
|
|
|
30
29
|
value?: string;
|
|
31
30
|
defaultValue?: string;
|
|
32
31
|
onValueChange?: (id: string) => void;
|
|
33
|
-
/** Past this many stages the strip
|
|
32
|
+
/** Past this many stages the strip folds the finished ones and the tail. Defaults to 7. */
|
|
34
33
|
maxVisible?: number;
|
|
35
34
|
};
|
|
36
35
|
export declare function StageStrip({ stages, value, defaultValue, onValueChange, maxVisible, className, ...props }: StageStripProps): import("react").JSX.Element;
|
|
@@ -45,6 +44,23 @@ export type StepAction = {
|
|
|
45
44
|
content: ReactNode;
|
|
46
45
|
};
|
|
47
46
|
};
|
|
47
|
+
/** One way forward from a stuck step. */
|
|
48
|
+
export type HelpOption = {
|
|
49
|
+
label: string;
|
|
50
|
+
/** What choosing it does, in a line. */
|
|
51
|
+
detail?: string;
|
|
52
|
+
icon?: ReactNode;
|
|
53
|
+
onSelect?: () => void;
|
|
54
|
+
};
|
|
55
|
+
export type HelpMenuProps = {
|
|
56
|
+
trigger: ReactElement;
|
|
57
|
+
/** The header, such as "Stuck on this?". */
|
|
58
|
+
title: ReactNode;
|
|
59
|
+
/** Under the header, such as what changes once an option is chosen. */
|
|
60
|
+
detail?: ReactNode;
|
|
61
|
+
options: readonly HelpOption[];
|
|
62
|
+
};
|
|
63
|
+
export declare function HelpMenu({ trigger, title, detail, options }: HelpMenuProps): import("react").JSX.Element;
|
|
48
64
|
export type CurrentStepProps = Omit<ComponentProps<"div">, "title"> & {
|
|
49
65
|
/**
|
|
50
66
|
* What the step asks of the reader: `warning` theirs to do, `success` ready or landing,
|
|
@@ -57,8 +73,8 @@ export type CurrentStepProps = Omit<ComponentProps<"div">, "title"> & {
|
|
|
57
73
|
description?: ReactNode;
|
|
58
74
|
primary?: StepAction;
|
|
59
75
|
secondary?: StepAction;
|
|
60
|
-
/** A "Not sure?" menu beside the actions. */
|
|
61
|
-
help?:
|
|
76
|
+
/** A "Not sure?" help menu beside the actions. */
|
|
77
|
+
help?: Omit<HelpMenuProps, "trigger">;
|
|
62
78
|
/** Something is under way: a spinner replaces the dot. */
|
|
63
79
|
busy?: boolean;
|
|
64
80
|
expanded?: boolean;
|
|
@@ -78,10 +94,21 @@ export type ConfirmationRowProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
78
94
|
};
|
|
79
95
|
/** A move that just landed, with when and an undo. */
|
|
80
96
|
export declare function ConfirmationRow({ message, at, onUndo, labels: ownLabels, className, ...props }: ConfirmationRowProps): import("react").JSX.Element;
|
|
97
|
+
export type RequirementProps = Omit<ComponentProps<"span">, "children"> & {
|
|
98
|
+
status: StepStatus;
|
|
99
|
+
children: ReactNode;
|
|
100
|
+
meta?: ReactNode;
|
|
101
|
+
nested?: boolean;
|
|
102
|
+
};
|
|
103
|
+
export declare function Requirement({ status, meta, nested, children, className, ...props }: RequirementProps): import("react").JSX.Element;
|
|
81
104
|
export type ChecklistStep = {
|
|
82
105
|
id?: string;
|
|
83
106
|
label: ReactNode;
|
|
84
107
|
status: StepStatus;
|
|
108
|
+
/** After the label, such as who it waits on or when it landed. */
|
|
109
|
+
meta?: ReactNode;
|
|
110
|
+
/** Depends on the step before it, and indents under it. */
|
|
111
|
+
nested?: boolean;
|
|
85
112
|
};
|
|
86
113
|
export type ChecklistGroup = {
|
|
87
114
|
id: string;
|
|
@@ -95,3 +122,48 @@ export type StageChecklistProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
95
122
|
};
|
|
96
123
|
/** Checklists side by side, each under its label with its meta or how many of its steps are done. */
|
|
97
124
|
export declare function StageChecklist({ groups, className, ...props }: StageChecklistProps): import("react").JSX.Element;
|
|
125
|
+
export type StepChipStatus = "done" | "current" | "todo" | "agent";
|
|
126
|
+
export type StepChipProps = Omit<ComponentProps<"span">, "children"> & {
|
|
127
|
+
status: StepChipStatus;
|
|
128
|
+
children: ReactNode;
|
|
129
|
+
};
|
|
130
|
+
export declare function StepChip({ status, children, className, ...props }: StepChipProps): import("react").JSX.Element;
|
|
131
|
+
export type StepChainStep = {
|
|
132
|
+
id: string;
|
|
133
|
+
label: ReactNode;
|
|
134
|
+
status: StepChipStatus;
|
|
135
|
+
};
|
|
136
|
+
export type StepChainProps = Omit<ComponentProps<"div">, "children"> & {
|
|
137
|
+
lead: {
|
|
138
|
+
label: ReactNode;
|
|
139
|
+
status: "done" | "current" | "todo";
|
|
140
|
+
};
|
|
141
|
+
steps: readonly StepChainStep[];
|
|
142
|
+
};
|
|
143
|
+
export declare function StepChain({ lead, steps, className, ...props }: StepChainProps): import("react").JSX.Element;
|
|
144
|
+
export type ParallelActor = {
|
|
145
|
+
kind: "person";
|
|
146
|
+
avatar: ReactNode;
|
|
147
|
+
} | {
|
|
148
|
+
kind: "agent" | "system";
|
|
149
|
+
};
|
|
150
|
+
export type ParallelChipProps = Omit<ComponentProps<"span">, "children"> & {
|
|
151
|
+
actor: ParallelActor;
|
|
152
|
+
who: ReactNode;
|
|
153
|
+
doing: ReactNode;
|
|
154
|
+
action?: {
|
|
155
|
+
label: ReactNode;
|
|
156
|
+
onClick: () => void;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export declare function ParallelChip({ actor, who, doing, action, className, ...props }: ParallelChipProps): import("react").JSX.Element;
|
|
160
|
+
export type PartState = "done" | "needsYou" | "notStarted";
|
|
161
|
+
export type PartsRollupProps = Omit<ComponentProps<"div">, "children"> & {
|
|
162
|
+
/** How many parts, in words, such as "3 parts". */
|
|
163
|
+
label: ReactNode;
|
|
164
|
+
/** Each part's state, in the parts' order. */
|
|
165
|
+
parts: readonly PartState[];
|
|
166
|
+
/** The counts in plain words, such as "1 done · 1 needs you · 1 not started". */
|
|
167
|
+
legend: ReactNode;
|
|
168
|
+
};
|
|
169
|
+
export declare function PartsRollup({ label, parts, legend, className, ...props }: PartsRollupProps): import("react").JSX.Element;
|