@parallelworks/ui 0.34.0 → 0.35.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 +201 -0
- package/dist/ai/components/ChatEmptyState.js +71 -86
- package/dist/ai/components/ChatInput.d.ts +11 -3
- package/dist/ai/components/ChatInput.js +19 -11
- package/dist/ai/components/ChatSidebar.js +12 -130
- package/dist/ai/components/ChatStage.d.ts +11 -0
- package/dist/ai/components/ChatStage.js +26 -0
- package/dist/ai/components/ComposerChrome.d.ts +3 -0
- package/dist/ai/components/ComposerChrome.js +21 -2
- package/dist/ai/components/conversationActions.d.ts +23 -0
- package/dist/ai/components/conversationActions.js +108 -0
- package/dist/ai/index.d.ts +4 -3
- package/dist/ai/index.js +6 -5
- package/dist/ai/strings.d.ts +1 -0
- package/dist/ai/strings.js +2 -1
- package/dist/ai/ui/ConversationSidebar.d.ts +3 -2
- package/dist/ai/ui/ConversationSidebar.js +2 -1
- package/dist/ai/ui/sidebar.d.ts +6 -0
- package/dist/ai/ui/sidebar.js +10 -1
- package/dist/components/Dropdown.js +3 -1
- package/dist/components/FilterPill.js +1 -0
- package/dist/components/Provider.d.ts +14 -0
- package/dist/components/Provider.js +14 -3
- package/dist/components/SegmentedControl.d.ts +24 -0
- package/dist/components/SegmentedControl.js +69 -0
- package/dist/editing.d.ts +32 -0
- package/dist/editor/FormCodePanel.js +1 -1
- package/dist/engine.d.ts +3 -0
- package/dist/form/FieldWrapper.js +1 -1
- package/dist/form/Fields/CheckboxGroupField.d.ts +3 -3
- package/dist/form/Fields/CheckboxGroupField.js +10 -4
- package/dist/form/Fields/RadioField.d.ts +5 -3
- package/dist/form/Fields/RadioField.js +25 -17
- package/dist/form/Fields/fieldOption.d.ts +12 -0
- package/dist/form/Fields/fieldOption.js +17 -0
- package/dist/form/Form.d.ts +4 -2
- package/dist/form/Form.js +170 -68
- package/dist/form/FormLayout.d.ts +7 -0
- package/dist/form/FormLayout.js +144 -0
- package/dist/form/SpecialTypes/FormikCustomDropdown.js +1 -1
- package/dist/form/SpecialTypes/FormikCustomInput.js +7 -0
- package/dist/form/Wizard/WizardContainer.d.ts +1 -1
- package/dist/form/Wizard/WizardContainer.js +244 -49
- package/dist/form/Wizard/WizardNavigation.js +4 -4
- package/dist/form/Wizard/WizardStepContent.d.ts +1 -1
- package/dist/form/Wizard/WizardStepContent.js +19 -10
- package/dist/form/Wizard/WizardStepIndicator.js +35 -7
- package/dist/form/Wizard/types.d.ts +19 -6
- package/dist/form/Wizard/useWizardState.d.ts +1 -0
- package/dist/form/Wizard/useWizardState.js +5 -1
- package/dist/form/Wizard/utils.d.ts +7 -0
- package/dist/form/Wizard/utils.js +18 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +4 -2
- package/dist/form/layout.d.ts +50 -0
- package/dist/form/layout.js +125 -0
- package/dist/form/layoutCSS.d.ts +10 -0
- package/dist/form/layoutCSS.js +234 -0
- package/dist/form/lib.d.ts +2 -0
- package/dist/form/lib.js +17 -2
- package/dist/form/types/fieldTypes.d.ts +8 -23
- package/dist/graph/DependencyGraph.d.ts +20 -1
- package/dist/graph/DependencyGraph.js +437 -142
- package/dist/graph/MatrixGroup.d.ts +3 -1
- package/dist/graph/MatrixGroup.js +31 -28
- package/dist/graph/TreeView.js +6 -6
- package/dist/graph/gridSpacing.d.ts +7 -0
- package/dist/graph/gridSpacing.js +10 -0
- package/dist/graph/util.d.ts +2 -0
- package/dist/graph/util.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/list/ListViewControls.d.ts +15 -0
- package/dist/list/ListViewControls.js +9 -3
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.js +2 -2
- package/dist/styles/base.css +3 -1
- package/dist/styles/theme.css +5 -0
- package/dist/styles.css +1 -1
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +3 -2
- package/package.json +4 -2
- package/dist/ai/components/ComposerFrame.d.ts +0 -16
- package/dist/ai/components/ComposerFrame.js +0 -33
|
@@ -12,7 +12,7 @@ export declare function MatrixGroupSummaryItem({ matrixGroup, status, isExpanded
|
|
|
12
12
|
preview: boolean;
|
|
13
13
|
}): import("react").JSX.Element;
|
|
14
14
|
/** Matrix group node in the DAG visualization. */
|
|
15
|
-
export declare function MatrixGroupNode({ matrixGroup, jobNames, idPrefix, isExpanded, onToggle, jobs, activeDists, onMouseEnter, onMouseLeave, hoveredRelated, animT, zBase, handlers, preview, }: {
|
|
15
|
+
export declare function MatrixGroupNode({ matrixGroup, jobNames, idPrefix, isExpanded, onToggle, jobs, activeDists, onMouseEnter, onMouseLeave, hoveredRelated, animT, zBase, handlers, preview, rowsAbove, }: {
|
|
16
16
|
matrixGroup: MatrixGroup;
|
|
17
17
|
jobNames: string[];
|
|
18
18
|
idPrefix: string;
|
|
@@ -27,4 +27,6 @@ export declare function MatrixGroupNode({ matrixGroup, jobNames, idPrefix, isExp
|
|
|
27
27
|
zBase: number;
|
|
28
28
|
handlers: JobHandlers;
|
|
29
29
|
preview: boolean;
|
|
30
|
+
/** Empty rows of its column above this node. */
|
|
31
|
+
rowsAbove?: number;
|
|
30
32
|
}): import("react").JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { useWorkflowEngine } from "../components/Provider.js";
|
|
1
|
+
import { useStrings, useWorkflowEngine } from "../components/Provider.js";
|
|
2
2
|
import { Indicator } from "../components/Indicator.js";
|
|
3
|
+
import { emptyRowsStyle } from "./gridSpacing.js";
|
|
3
4
|
import { Reveal } from "./Reveal.js";
|
|
4
5
|
import { Joblist } from "./JobSummary.js";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/graph/MatrixGroup.tsx
|
|
7
8
|
/** Matrix group item in the summary sidebar. */
|
|
8
9
|
function MatrixGroupSummaryItem({ matrixGroup, status, isExpanded, onToggle, jobs, handlers, preview }) {
|
|
10
|
+
const { dag: t } = useStrings();
|
|
9
11
|
return /* @__PURE__ */ jsxs("div", {
|
|
10
12
|
className: "py-1.5",
|
|
11
13
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
@@ -15,18 +17,14 @@ function MatrixGroupSummaryItem({ matrixGroup, status, isExpanded, onToggle, job
|
|
|
15
17
|
className: "cursor-pointer flex items-center gap-x-1.5 w-full text-left",
|
|
16
18
|
children: [/* @__PURE__ */ jsx(Indicator, { status }), /* @__PURE__ */ jsxs("div", {
|
|
17
19
|
className: "font-semibold",
|
|
18
|
-
children: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
" jobs)"
|
|
27
|
-
]
|
|
28
|
-
})
|
|
29
|
-
]
|
|
20
|
+
children: [t.matrixOf(matrixGroup.originaljob), /* @__PURE__ */ jsxs("span", {
|
|
21
|
+
className: "font-normal text-sm ml-1",
|
|
22
|
+
children: [
|
|
23
|
+
"(",
|
|
24
|
+
t.jobCount(matrixGroup.members.length),
|
|
25
|
+
")"
|
|
26
|
+
]
|
|
27
|
+
})]
|
|
30
28
|
})]
|
|
31
29
|
}), /* @__PURE__ */ jsx(Reveal, {
|
|
32
30
|
open: isExpanded,
|
|
@@ -43,16 +41,33 @@ function MatrixGroupSummaryItem({ matrixGroup, status, isExpanded, onToggle, job
|
|
|
43
41
|
});
|
|
44
42
|
}
|
|
45
43
|
/** Matrix group node in the DAG visualization. */
|
|
46
|
-
function MatrixGroupNode({ matrixGroup, jobNames, idPrefix, isExpanded, onToggle, jobs, activeDists, onMouseEnter, onMouseLeave, hoveredRelated, animT, zBase, handlers, preview }) {
|
|
44
|
+
function MatrixGroupNode({ matrixGroup, jobNames, idPrefix, isExpanded, onToggle, jobs, activeDists, onMouseEnter, onMouseLeave, hoveredRelated, animT, zBase, handlers, preview, rowsAbove = 0 }) {
|
|
45
|
+
const { dag: t } = useStrings();
|
|
47
46
|
const matrixName = matrixGroup.originaljob;
|
|
48
47
|
const first = jobNames[0] ?? "";
|
|
49
48
|
const matrixMembers = matrixGroup.members;
|
|
50
49
|
const { aggStatus, statusLabel } = useWorkflowEngine().matrixStatus(matrixMembers.map((m) => jobs[m]?.status));
|
|
50
|
+
const header = /* @__PURE__ */ jsxs("button", {
|
|
51
|
+
type: "button",
|
|
52
|
+
"aria-expanded": isExpanded,
|
|
53
|
+
className: "cursor-pointer w-full text-left",
|
|
54
|
+
onClick: onToggle,
|
|
55
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: "font-semibold text-md p-0.5",
|
|
57
|
+
children: t.matrixOf(matrixName.length > 20 ? `${matrixName.slice(0, 20)}...` : matrixName)
|
|
58
|
+
}), !isExpanded && /* @__PURE__ */ jsxs("div", {
|
|
59
|
+
className: "mt-1 border-t border-(--theme-border) pt-1 flex items-center gap-x-1",
|
|
60
|
+
children: [!preview && /* @__PURE__ */ jsx(Indicator, { status: aggStatus }), /* @__PURE__ */ jsx("span", { children: preview ? t.jobCount(matrixMembers.length) : statusLabel })]
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
51
63
|
return /* @__PURE__ */ jsxs("div", {
|
|
52
64
|
id: `node_${idPrefix}${first}`,
|
|
53
65
|
role: "none",
|
|
54
66
|
className: "relative m-24",
|
|
55
|
-
style: {
|
|
67
|
+
style: {
|
|
68
|
+
zIndex: (activeDists?.has(first) ? 25 : 1) + zBase,
|
|
69
|
+
...emptyRowsStyle(rowsAbove)
|
|
70
|
+
},
|
|
56
71
|
onMouseEnter,
|
|
57
72
|
onMouseLeave,
|
|
58
73
|
onFocus: onMouseEnter,
|
|
@@ -63,19 +78,7 @@ function MatrixGroupNode({ matrixGroup, jobNames, idPrefix, isExpanded, onToggle
|
|
|
63
78
|
opacity: hoveredRelated && !hoveredRelated.has(first) ? .5 : 1,
|
|
64
79
|
transition: `opacity ${animT}s`
|
|
65
80
|
},
|
|
66
|
-
children: [/* @__PURE__ */
|
|
67
|
-
type: "button",
|
|
68
|
-
"aria-expanded": isExpanded,
|
|
69
|
-
className: "cursor-pointer w-full text-left",
|
|
70
|
-
onClick: onToggle,
|
|
71
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
72
|
-
className: "font-semibold text-md p-0.5",
|
|
73
|
-
children: ["Matrix: ", matrixName.length > 20 ? `${matrixName.slice(0, 20)}...` : matrixName]
|
|
74
|
-
}), !isExpanded && /* @__PURE__ */ jsxs("div", {
|
|
75
|
-
className: "mt-1 border-t border-(--theme-border) pt-1 flex items-center gap-x-1",
|
|
76
|
-
children: [/* @__PURE__ */ jsx(Indicator, { status: aggStatus }), /* @__PURE__ */ jsx("span", { children: statusLabel })]
|
|
77
|
-
})]
|
|
78
|
-
}), /* @__PURE__ */ jsx(Reveal, {
|
|
81
|
+
children: [header, /* @__PURE__ */ jsx(Reveal, {
|
|
79
82
|
open: isExpanded,
|
|
80
83
|
growWidth: true,
|
|
81
84
|
children: /* @__PURE__ */ jsx("div", {
|
package/dist/graph/TreeView.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useRunFile, useSlots, useWorkflowEngine } from "../components/Provider.js";
|
|
1
|
+
import { useRunFile, useSlots, useStrings, useWorkflowEngine } from "../components/Provider.js";
|
|
2
2
|
import { LuChevronRight } from "../icons/lu/LuChevronRight.js";
|
|
3
3
|
import { LoaderIcon } from "../components/StatusIcons.js";
|
|
4
4
|
import { Indicator } from "../components/Indicator.js";
|
|
@@ -182,6 +182,7 @@ function StepRow({ step, index, isExpanded, onToggle, prefix, jobName, state })
|
|
|
182
182
|
}
|
|
183
183
|
function TreeView({ jobs, slug, expandedJobs, setExpandedJobs }) {
|
|
184
184
|
const engine = useWorkflowEngine();
|
|
185
|
+
const { dag } = useStrings();
|
|
185
186
|
const visibleJobNames = useMemo(() => {
|
|
186
187
|
return Object.keys(jobs).filter((jobName) => jobs[jobName]?.if !== false);
|
|
187
188
|
}, [jobs]);
|
|
@@ -250,7 +251,7 @@ function TreeView({ jobs, slug, expandedJobs, setExpandedJobs }) {
|
|
|
250
251
|
const job = jobs[jobName];
|
|
251
252
|
if (!job) continue;
|
|
252
253
|
const matrixOrigin = job._matrix?.originaljob;
|
|
253
|
-
if (matrixOrigin) {
|
|
254
|
+
if (matrixOrigin && (matrixGroups[matrixOrigin]?.members.length ?? 0) > 1) {
|
|
254
255
|
if (seenMatrixGroups.has(matrixOrigin)) continue;
|
|
255
256
|
seenMatrixGroups.add(matrixOrigin);
|
|
256
257
|
const group = matrixGroups[matrixOrigin];
|
|
@@ -271,11 +272,10 @@ function TreeView({ jobs, slug, expandedJobs, setExpandedJobs }) {
|
|
|
271
272
|
/* @__PURE__ */ jsxs("span", {
|
|
272
273
|
className: "font-mono text-sm text-[var(--theme-app)]",
|
|
273
274
|
children: [
|
|
274
|
-
|
|
275
|
-
matrixOrigin,
|
|
275
|
+
dag.matrixOf(matrixOrigin),
|
|
276
276
|
" (",
|
|
277
|
-
group.members.length,
|
|
278
|
-
"
|
|
277
|
+
dag.jobCount(group.members.length),
|
|
278
|
+
")"
|
|
279
279
|
]
|
|
280
280
|
})
|
|
281
281
|
]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export declare const SLOT_PITCH = 176;
|
|
3
|
+
/** Top margin for a node that sits below `rows` empty rows of its column. */
|
|
4
|
+
export declare function emptyRowsStyle(rows: number): CSSProperties;
|
|
5
|
+
export declare const COLUMN_PITCH = 381;
|
|
6
|
+
/** Left margin for a column that follows `columns` empty ones. */
|
|
7
|
+
export declare function emptyColumnsStyle(columns: number): CSSProperties;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Top margin for a node that sits below `rows` empty rows of its column. */
|
|
2
|
+
function emptyRowsStyle(rows) {
|
|
3
|
+
return rows > 0 ? { marginTop: `calc(6rem + ${rows * 176}px)` } : {};
|
|
4
|
+
}
|
|
5
|
+
/** Left margin for a column that follows `columns` empty ones. */
|
|
6
|
+
function emptyColumnsStyle(columns) {
|
|
7
|
+
return columns > 0 ? { marginLeft: columns * 381 } : {};
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { emptyColumnsStyle, emptyRowsStyle };
|
package/dist/graph/util.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { WorkflowJob } from './types.js';
|
|
2
|
+
/** How far below a node's top edge its connectors meet it, level with its first job. */
|
|
3
|
+
export declare const NODE_CONNECTOR_Y = 37;
|
|
2
4
|
/** A job as people read it: `run_tests` is "Run tests", a matrix member "Build (2/4)". */
|
|
3
5
|
export declare function jobLabel(jobName: string, job?: WorkflowJob): string;
|
|
4
6
|
/** A copy of `set` with `key` added, or removed if it was there. */
|
package/dist/graph/util.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/** A job as people read it: `run_tests` is "Run tests", a matrix member "Build (2/4)". */
|
|
3
3
|
function jobLabel(jobName, job) {
|
|
4
4
|
const matrix = job?._matrix;
|
|
5
|
-
if (matrix?.originaljob) return `${capitalize(matrix.originaljob)} (${(matrix.index ?? 0) + 1}/${matrix.totalingroup ?? "?"})`;
|
|
6
|
-
return capitalize(jobName).replace(/_/g, " ");
|
|
5
|
+
if (matrix?.originaljob && matrix.totalingroup !== 1) return `${capitalize(matrix.originaljob)} (${(matrix.index ?? 0) + 1}/${matrix.totalingroup ?? "?"})`;
|
|
6
|
+
return capitalize(matrix?.originaljob ?? jobName).replace(/_/g, " ");
|
|
7
7
|
}
|
|
8
8
|
function capitalize(s) {
|
|
9
9
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export { type PersistedStateHook, type RunFileResult, type UIData, type UILinkCo
|
|
|
35
35
|
export { RequiredMark } from './components/RequiredMark.js';
|
|
36
36
|
export { useRelativeTime } from './components/relativeTime.js';
|
|
37
37
|
export { default as SectionHeader } from './components/SectionHeader.js';
|
|
38
|
+
export { SegmentedControl, type SegmentedOption } from './components/SegmentedControl.js';
|
|
38
39
|
export { SettingModeOption } from './components/SettingModeOption.js';
|
|
39
40
|
export { SettingRow, SettingSection } from './components/SettingRow.js';
|
|
40
41
|
export { default as SettingsCard } from './components/SettingsCard.js';
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import { BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction
|
|
|
33
33
|
import { Pagination } from "./components/Pagination.js";
|
|
34
34
|
import { useRelativeTime } from "./components/relativeTime.js";
|
|
35
35
|
import SectionHeader from "./components/SectionHeader.js";
|
|
36
|
+
import { SegmentedControl } from "./components/SegmentedControl.js";
|
|
36
37
|
import { SettingModeOption } from "./components/SettingModeOption.js";
|
|
37
38
|
import { SettingRow, SettingSection } from "./components/SettingRow.js";
|
|
38
39
|
import SettingsCard from "./components/SettingsCard.js";
|
|
@@ -45,4 +46,4 @@ import { CompactTable, Table } from "./components/Table.js";
|
|
|
45
46
|
import { Toggle } from "./components/Toggle.js";
|
|
46
47
|
import { useCssIsDark } from "./components/useCssIsDark.js";
|
|
47
48
|
import { DEFAULT_PRESET, THEME_PRESETS, THEME_TOKENS, applyTheme, contrastRatio, deriveTheme, isDarkColor } from "./theme/index.js";
|
|
48
|
-
export { AddMenu, Avatar, BareModal, BreadcrumbProvider, BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, Button, CREATE_MODAL_SELECT_FILTER_THRESHOLD, Callout, Card, CardHeader, CompactTable, ConfirmModal, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, Filter, FilterPill, GlobalTooltip, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, IconButton, Indicator, Input, LetterBadge, Loader, Markdown, MaybeCollapsible, MethodButton, MultiSelectDropdown, Overview, PageHeader, Pagination, RequiredMark, SectionHeader, SettingModeOption, SettingRow, SettingSection, SettingsCard, SettingsGroup, Sort, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, Textarea, Toggle, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, avatarInitials, contrastRatio, dangerButtonClasses, deriveTheme, filterOption, flattenOptions, formatTooltipContent, ghostButtonClasses, headerActionButtonClasses, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, statusTextClass, toggleSetMember, truncationTooltipProps, useBreadcrumb, useClearBreadcrumbs, useCssIsDark, useHideBreadcrumbs, useNavigation, useNotify, useOptionalWorkflowEngine, usePersistedState, useProvisionCorsRules, useRelativeTime, useRunFile, useSetBreadcrumbs, useSetDefaultBreadcrumbs, useSlots, useStrings, useWorkflowEngine, useWorkflowEngineLoader };
|
|
49
|
+
export { AddMenu, Avatar, BareModal, BreadcrumbProvider, BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, Button, CREATE_MODAL_SELECT_FILTER_THRESHOLD, Callout, Card, CardHeader, CompactTable, ConfirmModal, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, Filter, FilterPill, GlobalTooltip, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, IconButton, Indicator, Input, LetterBadge, Loader, Markdown, MaybeCollapsible, MethodButton, MultiSelectDropdown, Overview, PageHeader, Pagination, RequiredMark, SectionHeader, SegmentedControl, SettingModeOption, SettingRow, SettingSection, SettingsCard, SettingsGroup, Sort, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, Textarea, Toggle, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, avatarInitials, contrastRatio, dangerButtonClasses, deriveTheme, filterOption, flattenOptions, formatTooltipContent, ghostButtonClasses, headerActionButtonClasses, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, statusTextClass, toggleSetMember, truncationTooltipProps, useBreadcrumb, useClearBreadcrumbs, useCssIsDark, useHideBreadcrumbs, useNavigation, useNotify, useOptionalWorkflowEngine, usePersistedState, useProvisionCorsRules, useRelativeTime, useRunFile, useSetBreadcrumbs, useSetDefaultBreadcrumbs, useSlots, useStrings, useWorkflowEngine, useWorkflowEngineLoader };
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { ListView } from './listView.js';
|
|
2
3
|
/** Shared chrome for the toolbar control buttons (Filter, Display, Search) so
|
|
3
4
|
* they read as a consistent button cluster — matched by ListSearchControl. */
|
|
4
5
|
export declare const listControlButtonClasses = "relative flex h-7 w-7 items-center justify-center rounded-md border border-(--theme-border) text-(--theme-muted-text-color) hover:bg-(--theme-muted-panel-bg) hover:text-(--theme-app) transition-colors";
|
|
6
|
+
/** A header-strip button that opens a panel under it. The panel is a
|
|
7
|
+
* non-modal dialog named by the button, not a menu: it holds switches,
|
|
8
|
+
* pills and text rather than menu items. Portals into .ds-root so the panel
|
|
9
|
+
* escapes the toolbar's overflow clipping. */
|
|
10
|
+
export declare function AnchoredPopover({ icon, label, active, shortcut, panelClassName, children, }: {
|
|
11
|
+
icon: ReactNode;
|
|
12
|
+
label: string;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
/** Single-key shortcut (e.g. 'f') that opens the popover; also shown in the
|
|
15
|
+
* tooltip. */
|
|
16
|
+
shortcut?: string;
|
|
17
|
+
panelClassName?: string;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
5
20
|
export declare function ListDisplayMenu<T>({ view, label }: {
|
|
6
21
|
view: ListView<T>;
|
|
7
22
|
label?: string;
|
|
@@ -22,7 +22,10 @@ function pillClass(on) {
|
|
|
22
22
|
return cx("whitespace-nowrap rounded-full border px-2.5 py-1 text-[12px] transition-colors", on ? "border-transparent bg-(--theme-muted-panel-bg) text-(--theme-app)" : "border-(--theme-border) text-(--theme-muted-text-color) hover:bg-(--theme-muted-panel-bg) hover:text-(--theme-app)");
|
|
23
23
|
}
|
|
24
24
|
var SECTION_LABEL = "mb-2 text-[11px] font-medium uppercase tracking-wide text-(--theme-muted-text-color)";
|
|
25
|
-
/**
|
|
25
|
+
/** A header-strip button that opens a panel under it. The panel is a
|
|
26
|
+
* non-modal dialog named by the button, not a menu: it holds switches,
|
|
27
|
+
* pills and text rather than menu items. Portals into .ds-root so the panel
|
|
28
|
+
* escapes the toolbar's overflow clipping. */
|
|
26
29
|
function AnchoredPopover({ icon, label, active, shortcut, panelClassName, children }) {
|
|
27
30
|
const btnRef = useRef(null);
|
|
28
31
|
const panelRef = useRef(null);
|
|
@@ -70,6 +73,8 @@ function AnchoredPopover({ icon, label, active, shortcut, panelClassName, childr
|
|
|
70
73
|
type: "button",
|
|
71
74
|
onClick: () => pos ? close() : open(),
|
|
72
75
|
"aria-label": label,
|
|
76
|
+
"aria-haspopup": "dialog",
|
|
77
|
+
"aria-expanded": pos !== null,
|
|
73
78
|
"data-tooltip-id": TOOLTIP_ID,
|
|
74
79
|
"data-tooltip-content": label,
|
|
75
80
|
"data-tooltip-shortcut": shortcut ? shortcut.toUpperCase() : void 0,
|
|
@@ -85,7 +90,8 @@ function AnchoredPopover({ icon, label, active, shortcut, panelClassName, childr
|
|
|
85
90
|
},
|
|
86
91
|
children: /* @__PURE__ */ jsx("div", {
|
|
87
92
|
ref: panelRef,
|
|
88
|
-
role: "
|
|
93
|
+
role: "dialog",
|
|
94
|
+
"aria-label": label,
|
|
89
95
|
onMouseDown: (e) => e.stopPropagation(),
|
|
90
96
|
className: cx("absolute rounded-lg border border-(--theme-border) bg-(--theme-app-bg) shadow-lg", panelClassName),
|
|
91
97
|
style: {
|
|
@@ -389,4 +395,4 @@ function FacetOptions({ view, facet, selected }) {
|
|
|
389
395
|
});
|
|
390
396
|
}
|
|
391
397
|
//#endregion
|
|
392
|
-
export { ListDisplayMenu, ListFilterMenu, listControlButtonClasses };
|
|
398
|
+
export { AnchoredPopover, ListDisplayMenu, ListFilterMenu, listControlButtonClasses };
|
package/dist/list/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { HoverCardSurface, useHoverCard } from './HoverCard.js';
|
|
|
3
3
|
export { ListColumns, ListPage, type ListPageProps, ListRow, ListRowActionsProvider, type ListSection, type PinnedRowAction, useListNavigate, } from './ListPage.js';
|
|
4
4
|
export { LIST_PAGE_SIZES, ListPager } from './ListPager.js';
|
|
5
5
|
export { actionsColumnWidth, GroupRow, ListActionsHeader, ListError, ListSkeleton, listTableFixedProps, listTableProps, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, } from './ListTable.js';
|
|
6
|
-
export { ListDisplayMenu, ListFilterMenu, listControlButtonClasses, } from './ListViewControls.js';
|
|
6
|
+
export { AnchoredPopover, ListDisplayMenu, ListFilterMenu, listControlButtonClasses, } from './ListViewControls.js';
|
|
7
7
|
export { ListCount, type ListSearch, ListSearchControl, useListSearch, } from './listSearch.js';
|
|
8
8
|
export { type ActionDef, type ColumnDef, DEFAULT_ORDER, FAVORITE_ORDER, type FilterFacet, type ListView, type ListViewChrome, type ListViewConfig, type OrderByOption, useListView, } from './listView.js';
|
|
9
9
|
export { assembleRowMenu, type CopyFields, type CopySubmenu, MoreButton, type OpenMenu, type RowAction, type RowMenuItem, rowContextMenuProps, toolbarActionToRowAction, toRowMenuItem, useCopySubmenu, useRowMenu, useRowMenuActive, } from './RowContextMenu.js';
|
package/dist/list/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import { HoverCardSurface, useHoverCard } from "./HoverCard.js";
|
|
|
4
4
|
import { GroupRow, ListActionsHeader, ListError, ListSkeleton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, actionsColumnWidth, listTableFixedProps, listTableProps } from "./ListTable.js";
|
|
5
5
|
import { ListColumns, ListPage, ListRow, ListRowActionsProvider, useListNavigate } from "./ListPage.js";
|
|
6
6
|
import { isTextEntryContext } from "./textEntry.js";
|
|
7
|
-
import { ListDisplayMenu, ListFilterMenu, listControlButtonClasses } from "./ListViewControls.js";
|
|
7
|
+
import { AnchoredPopover, ListDisplayMenu, ListFilterMenu, listControlButtonClasses } from "./ListViewControls.js";
|
|
8
8
|
import { LIST_PAGE_SIZES, ListPager } from "./ListPager.js";
|
|
9
9
|
import { ListCount, ListSearchControl, useListSearch } from "./listSearch.js";
|
|
10
10
|
import { DEFAULT_ORDER, FAVORITE_ORDER, useListView } from "./listView.js";
|
|
11
11
|
import { HoverCardRow, HoverCardTrigger, UserHoverCard } from "./UserHoverCard.js";
|
|
12
|
-
export { ActionToolbar, DEFAULT_ORDER, FAVORITE_ORDER, GroupRow, HoverCardRow, HoverCardSurface, HoverCardTrigger, LIST_PAGE_SIZES, ListActionsHeader, ListColumns, ListCount, ListDisplayMenu, ListError, ListFilterMenu, ListPage, ListPager, ListRow, ListRowActionsProvider, ListSearchControl, ListSkeleton, MoreButton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, ToolbarButton, UserHoverCard, actionsColumnWidth, assembleRowMenu, isTextEntryContext, listControlButtonClasses, listTableFixedProps, listTableProps, rowContextMenuProps, stickyTabsClasses, stickyTabsUnderHeaderClasses, stickyToolbarClasses, toRowMenuItem, toolbarActionToRowAction, useCopySubmenu, useHoverCard, useListNavigate, useListSearch, useListView, useRowMenu, useRowMenuActive };
|
|
12
|
+
export { ActionToolbar, AnchoredPopover, DEFAULT_ORDER, FAVORITE_ORDER, GroupRow, HoverCardRow, HoverCardSurface, HoverCardTrigger, LIST_PAGE_SIZES, ListActionsHeader, ListColumns, ListCount, ListDisplayMenu, ListError, ListFilterMenu, ListPage, ListPager, ListRow, ListRowActionsProvider, ListSearchControl, ListSkeleton, MoreButton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, ToolbarButton, UserHoverCard, actionsColumnWidth, assembleRowMenu, isTextEntryContext, listControlButtonClasses, listTableFixedProps, listTableProps, rowContextMenuProps, stickyTabsClasses, stickyTabsUnderHeaderClasses, stickyToolbarClasses, toRowMenuItem, toolbarActionToRowAction, useCopySubmenu, useHoverCard, useListNavigate, useListSearch, useListView, useRowMenu, useRowMenuActive };
|
package/dist/styles/base.css
CHANGED
package/dist/styles/theme.css
CHANGED
|
@@ -65,6 +65,11 @@
|
|
|
65
65
|
color: var(--theme-panel, #000);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/* The bordered panel graphs and settings cards sit in; graph circles hide connectors with its color. */
|
|
69
|
+
@utility panel {
|
|
70
|
+
@apply border-solid rounded-2xl border border-(--theme-border) theme-panel;
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
@utility theme-muted-panel {
|
|
69
74
|
background-color: var(--theme-muted-panel-bg, #f8f9fa);
|
|
70
75
|
color: var(--theme-muted-panel-color, #5f6b76);
|