@parallelworks/ui 0.41.0 → 0.43.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 +25 -0
- package/dist/ai/components/AllocationSelector.d.ts +3 -4
- package/dist/ai/components/AllocationSelector.js +37 -33
- package/dist/ai/components/AttachmentManager.js +7 -7
- package/dist/ai/components/AttachmentUpload.js +5 -5
- package/dist/ai/components/BranchNavigator.js +1 -1
- package/dist/ai/components/ChatEmptyState.js +2 -2
- package/dist/ai/components/ChatInput.js +10 -8
- package/dist/ai/components/ChatLayout.js +4 -5
- package/dist/ai/components/ChatMessage.js +12 -12
- package/dist/ai/components/ChatMessageList.js +9 -9
- package/dist/ai/components/ChatSidebar.js +8 -9
- package/dist/ai/components/ChatThread.js +4 -4
- package/dist/ai/components/ComposerChrome.d.ts +2 -2
- package/dist/ai/components/ComposerChrome.js +3 -6
- package/dist/ai/components/DragOverlay.js +2 -2
- package/dist/ai/components/ModelSelector.d.ts +5 -3
- package/dist/ai/components/ModelSelector.js +102 -339
- package/dist/ai/components/PastedText.js +11 -11
- package/dist/ai/components/ProviderIssueBanner.d.ts +2 -0
- package/dist/ai/components/ProviderIssueBanner.js +34 -16
- package/dist/ai/components/Reasoning.js +4 -4
- package/dist/ai/components/ShareDialog.js +43 -35
- package/dist/ai/components/SlashMenu.d.ts +12 -2
- package/dist/ai/components/SlashMenu.js +29 -13
- package/dist/ai/components/agent/ActivityLine.js +3 -3
- package/dist/ai/components/agent/AgentMessageParts.js +20 -20
- package/dist/ai/components/agent/PermissionPicker.js +13 -11
- package/dist/ai/components/conversationActions.d.ts +4 -6
- package/dist/ai/components/conversationActions.js +9 -13
- package/dist/ai/core/ChatProvider.js +1 -1
- package/dist/ai/core/config.js +1 -1
- package/dist/ai/core/providerIssues.d.ts +7 -0
- package/dist/ai/core/providerIssues.js +9 -1
- package/dist/ai/core/useKeyboardShortcuts.d.ts +4 -0
- package/dist/ai/core/useKeyboardShortcuts.js +8 -2
- package/dist/ai/index.d.ts +0 -1
- package/dist/ai/index.js +1 -2
- package/dist/ai/strings.d.ts +19 -0
- package/dist/ai/strings.js +18 -1
- package/dist/ai/ui/Avatar.js +5 -5
- package/dist/ai/ui/ConversationSidebar.d.ts +0 -1
- package/dist/ai/ui/ConversationSidebar.js +6 -7
- package/dist/ai/ui/Markdown.js +3 -3
- package/dist/ai/ui/Notice.js +6 -6
- package/dist/ai/ui/chip.d.ts +4 -0
- package/dist/ai/ui/chip.js +8 -0
- package/dist/ai/ui/sidebar.d.ts +6 -5
- package/dist/ai/ui/sidebar.js +39 -43
- package/dist/components/ActionMenu.d.ts +13 -0
- package/dist/components/ActionMenu.js +30 -0
- package/dist/components/Avatar.js +6 -6
- package/dist/components/Breadcrumbs.js +1 -1
- package/dist/components/Button.js +10 -10
- package/dist/components/Callout.js +2 -2
- package/dist/components/Card.js +3 -3
- package/dist/components/Combobox.d.ts +49 -0
- package/dist/components/Combobox.js +405 -0
- package/dist/components/ConfirmModal.js +11 -11
- package/dist/components/ContextMenu.d.ts +23 -0
- package/dist/components/ContextMenu.js +89 -0
- package/dist/components/CopyToClipboard.js +2 -2
- package/dist/components/CreateModal.d.ts +19 -38
- package/dist/components/CreateModal.js +116 -267
- package/dist/components/DescriptionList.js +8 -8
- package/dist/components/Filter.js +2 -2
- package/dist/components/FilterPill.js +2 -2
- package/dist/components/HoverCard.d.ts +14 -0
- package/dist/components/HoverCard.js +33 -0
- package/dist/components/IconButton.d.ts +5 -5
- package/dist/components/IconButton.js +18 -22
- package/dist/components/InfoTip.d.ts +15 -0
- package/dist/components/InfoTip.js +60 -0
- package/dist/components/Input.js +5 -5
- package/dist/components/LetterBadge.js +2 -2
- package/dist/components/Loader.js +3 -3
- package/dist/components/Markdown.js +1 -1
- package/dist/components/MarkdownImpl.js +2 -2
- package/dist/components/Menu.d.ts +33 -0
- package/dist/components/Menu.js +86 -0
- package/dist/components/MenuEntries.d.ts +56 -0
- package/dist/components/MenuEntries.js +123 -0
- package/dist/components/Modal.d.ts +29 -0
- package/dist/components/Modal.js +47 -0
- package/dist/components/Overview.js +11 -10
- package/dist/components/PageHeader.d.ts +10 -16
- package/dist/components/PageHeader.js +69 -95
- package/dist/components/Pagination.js +5 -5
- package/dist/components/Provider.d.ts +5 -11
- package/dist/components/Provider.js +11 -14
- package/dist/components/Radio.d.ts +8 -0
- package/dist/components/Radio.js +16 -0
- package/dist/components/SectionHeader.js +2 -2
- package/dist/components/SegmentedControl.d.ts +6 -5
- package/dist/components/SegmentedControl.js +34 -30
- package/dist/components/Select.d.ts +27 -0
- package/dist/components/Select.js +78 -0
- package/dist/components/SettingModeOption.d.ts +5 -8
- package/dist/components/SettingModeOption.js +10 -12
- package/dist/components/SettingRow.js +4 -4
- package/dist/components/SettingsCard.js +4 -4
- package/dist/components/SettingsGroup.js +2 -2
- package/dist/components/Sort.js +1 -1
- package/dist/components/StatusBadge.js +7 -7
- package/dist/components/StatusIcons.js +4 -4
- package/dist/components/Switch.d.ts +22 -0
- package/dist/components/Switch.js +28 -0
- package/dist/components/Table.js +11 -11
- package/dist/components/Tooltip.d.ts +24 -20
- package/dist/components/Tooltip.js +58 -76
- package/dist/components/comboboxItems.d.ts +24 -0
- package/dist/components/comboboxItems.js +10 -0
- package/dist/components/floating.d.ts +14 -0
- package/dist/components/floating.js +21 -0
- package/dist/components/search.d.ts +2 -0
- package/dist/components/search.js +14 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorField.js +16 -21
- package/dist/editor/FormCodePanel.js +19 -19
- package/dist/editor/Monaco.js +3 -3
- package/dist/file-explorer/FileExplorer.js +77 -81
- package/dist/file-explorer/FileExplorerContext.js +2 -2
- package/dist/file-explorer/FilePreview/CodePreviewEditor.js +1 -1
- package/dist/file-explorer/FilePreview/Inline.js +1 -1
- package/dist/file-explorer/FilePreview/StreamedBadge.js +5 -6
- package/dist/file-explorer/FilePreview/Viewer.js +8 -8
- package/dist/file-explorer/FilePreview/index.d.ts +1 -1
- package/dist/file-explorer/FilePreview/index.js +49 -83
- package/dist/file-explorer/FileRow.d.ts +4 -3
- package/dist/file-explorer/FileRow.js +32 -38
- package/dist/file-explorer/FileRowsWindow.d.ts +3 -2
- package/dist/file-explorer/FileRowsWindow.js +4 -4
- package/dist/file-explorer/FileTable.d.ts +3 -2
- package/dist/file-explorer/FileTable.js +3 -3
- package/dist/file-explorer/LoadMoreRow.js +1 -1
- package/dist/file-explorer/TreeView.js +11 -16
- package/dist/file-explorer/helpers.js +11 -12
- package/dist/file-explorer/toasts.js +11 -11
- package/dist/form/FieldGroup.d.ts +11 -0
- package/dist/form/FieldGroup.js +36 -0
- package/dist/form/FieldWrapper.js +4 -4
- package/dist/form/Fields/BooleanField.js +23 -33
- package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
- package/dist/form/Fields/CheckboxGroupField.js +9 -13
- package/dist/form/Fields/ColorField.d.ts +1 -2
- package/dist/form/Fields/ColorField.js +6 -11
- package/dist/form/Fields/DropdownField.d.ts +3 -13
- package/dist/form/Fields/DropdownField.js +40 -27
- package/dist/form/Fields/DurationField.d.ts +1 -2
- package/dist/form/Fields/DurationField.js +25 -32
- package/dist/form/Fields/LabelField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.d.ts +6 -12
- package/dist/form/Fields/MultiDropdownField.js +31 -22
- package/dist/form/Fields/NumberField.d.ts +1 -1
- package/dist/form/Fields/NumberField.js +65 -35
- package/dist/form/Fields/ObjectField.d.ts +1 -1
- package/dist/form/Fields/ObjectField.js +12 -43
- package/dist/form/Fields/RadioField.d.ts +1 -1
- package/dist/form/Fields/RadioField.js +30 -41
- package/dist/form/Fields/RangeField.d.ts +1 -2
- package/dist/form/Fields/RangeField.js +23 -16
- package/dist/form/Fields/StringField.d.ts +1 -2
- package/dist/form/Fields/StringField.js +58 -26
- package/dist/form/Fields/TextAreaField.js +12 -10
- package/dist/form/Form.d.ts +30 -48
- package/dist/form/Form.js +306 -412
- package/dist/form/FormLayout.js +9 -9
- package/dist/form/Wizard/WizardContainer.d.ts +1 -4
- package/dist/form/Wizard/WizardContainer.js +40 -56
- package/dist/form/Wizard/WizardNavigation.js +1 -1
- package/dist/form/Wizard/WizardStepContent.d.ts +1 -5
- package/dist/form/Wizard/WizardStepContent.js +11 -16
- package/dist/form/Wizard/WizardStepIndicator.js +6 -6
- package/dist/form/Wizard/types.d.ts +0 -14
- package/dist/form/fieldRegistry.d.ts +1 -1
- package/dist/form/fieldRegistry.js +6 -6
- package/dist/form/formEditing.js +1 -1
- package/dist/form/index.d.ts +5 -4
- package/dist/form/index.js +6 -7
- package/dist/form/lib.js +3 -2
- package/dist/form/types/fieldComponentTypes.d.ts +8 -10
- package/dist/form/useChoiceField.d.ts +18 -0
- package/dist/form/useChoiceField.js +46 -0
- package/dist/form/useFieldValue.d.ts +7 -0
- package/dist/form/useFieldValue.js +20 -0
- package/dist/form/useParsedOpts.d.ts +3 -1
- package/dist/form/useParsedOpts.js +12 -17
- package/dist/form/utils/dependentOptions.d.ts +8 -4
- package/dist/form/utils/dependentOptions.js +25 -17
- package/dist/form/utils/fieldItems.d.ts +32 -0
- package/dist/form/utils/fieldItems.js +32 -0
- package/dist/form/utils/fieldPath.d.ts +10 -0
- package/dist/form/utils/fieldPath.js +20 -0
- package/dist/form/utils/shareEqual.d.ts +6 -0
- package/dist/form/utils/shareEqual.js +38 -0
- package/dist/graph/AnnotationBanner.js +8 -8
- package/dist/graph/Collapse.d.ts +1 -0
- package/dist/graph/Collapse.js +6 -27
- package/dist/graph/Connectors.js +5 -5
- package/dist/graph/DependencyGraph.js +20 -19
- package/dist/graph/GraphEditor.js +30 -41
- package/dist/graph/GraphEditorDialogs.js +17 -17
- package/dist/graph/GraphNode.js +1 -1
- package/dist/graph/InputDialog.js +19 -22
- package/dist/graph/InputsEditor.js +58 -66
- package/dist/graph/JobSummary.js +42 -39
- package/dist/graph/MatrixGroup.js +1 -1
- package/dist/graph/ProblemsButton.js +18 -19
- package/dist/graph/Reveal.js +1 -1
- package/dist/graph/ShortcutsButton.js +15 -18
- package/dist/graph/SuggestionInput.d.ts +5 -10
- package/dist/graph/SuggestionInput.js +14 -18
- package/dist/graph/ToolbarPopover.d.ts +11 -6
- package/dist/graph/ToolbarPopover.js +35 -67
- package/dist/graph/TreeView.js +24 -37
- package/dist/graph/WorkflowSettingsDialog.js +4 -4
- package/dist/graph/editorChrome.js +13 -12
- package/dist/graph/editorFields.js +29 -29
- package/dist/graph/editorPrimitives.d.ts +1 -1
- package/dist/graph/editorPrimitives.js +10 -7
- package/dist/graph/editorRows.js +103 -97
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/graphEditorState.d.ts +4 -3
- package/dist/graph/inputRefs.js +9 -9
- package/dist/graph/settingsViews.js +6 -7
- package/dist/graph/stepWith.js +6 -6
- package/dist/index.d.ts +14 -15
- package/dist/index.js +15 -14
- package/dist/list/ActionToolbar.d.ts +6 -14
- package/dist/list/ActionToolbar.js +48 -96
- package/dist/list/ListPage.d.ts +6 -12
- package/dist/list/ListPage.js +46 -29
- package/dist/list/ListPager.js +4 -4
- package/dist/list/ListTable.js +5 -5
- package/dist/list/ListViewControls.d.ts +5 -4
- package/dist/list/ListViewControls.js +177 -267
- package/dist/list/UserHoverCard.d.ts +3 -17
- package/dist/list/UserHoverCard.js +21 -45
- package/dist/list/index.d.ts +3 -4
- package/dist/list/index.js +3 -4
- package/dist/list/listSearch.js +12 -11
- package/dist/list/rowMenu.d.ts +68 -0
- package/dist/list/rowMenu.js +136 -0
- package/dist/logviewer/LogViewer.js +26 -26
- package/dist/styles.css +1 -1
- package/package.json +7 -13
- package/dist/ai/ui/Dropdown.d.ts +0 -31
- package/dist/ai/ui/Dropdown.js +0 -110
- package/dist/components/AddMenu.d.ts +0 -18
- package/dist/components/AddMenu.js +0 -46
- package/dist/components/BareModal.d.ts +0 -17
- package/dist/components/BareModal.js +0 -77
- package/dist/components/CollapsiblePanel.d.ts +0 -27
- package/dist/components/CollapsiblePanel.js +0 -77
- package/dist/components/Dropdown.d.ts +0 -28
- package/dist/components/Dropdown.js +0 -355
- package/dist/components/Listbox.d.ts +0 -21
- package/dist/components/Listbox.js +0 -119
- package/dist/components/MultiSelect.d.ts +0 -22
- package/dist/components/MultiSelect.js +0 -168
- package/dist/components/SwitchToggle.d.ts +0 -15
- package/dist/components/SwitchToggle.js +0 -57
- package/dist/components/SwitchToggleSmall.d.ts +0 -6
- package/dist/components/SwitchToggleSmall.js +0 -14
- package/dist/components/Toggle.d.ts +0 -6
- package/dist/components/Toggle.js +0 -20
- package/dist/components/dropdownUtils.d.ts +0 -37
- package/dist/components/dropdownUtils.js +0 -99
- package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -25
- package/dist/form/SpecialTypes/DropdownWrapper.js +0 -28
- package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +0 -51
- package/dist/form/SpecialTypes/FormikCustomDropdown.js +0 -119
- package/dist/form/SpecialTypes/FormikCustomInput.d.ts +0 -19
- package/dist/form/SpecialTypes/FormikCustomInput.js +0 -121
- package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +0 -13
- package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +0 -31
- package/dist/form/SpecialTypes/FormikNumericInput.d.ts +0 -9
- package/dist/form/SpecialTypes/FormikNumericInput.js +0 -60
- package/dist/form/SpecialTypes/index.d.ts +0 -3
- package/dist/list/HoverCard.d.ts +0 -24
- package/dist/list/HoverCard.js +0 -73
- package/dist/list/RowContextMenu.d.ts +0 -127
- package/dist/list/RowContextMenu.js +0 -515
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type MenuEntry, type MenuSearch } from './MenuEntries.js';
|
|
2
|
+
/** Where a menu opens: under an element, such as the button that opened it, or
|
|
3
|
+
* at a pointer event's point, which then moves with the element it landed on. */
|
|
4
|
+
export type MenuAnchor = Element | {
|
|
5
|
+
clientX: number;
|
|
6
|
+
clientY: number;
|
|
7
|
+
currentTarget?: EventTarget | null;
|
|
8
|
+
};
|
|
9
|
+
export interface OpenMenuOptions {
|
|
10
|
+
search?: MenuSearch | undefined;
|
|
11
|
+
/** Called once the menu closes, or another menu replaces it. */
|
|
12
|
+
onClose?: (() => void) | undefined;
|
|
13
|
+
}
|
|
14
|
+
export type OpenMenu = (at: MenuAnchor, items: MenuEntry[], options?: OpenMenuOptions) => void;
|
|
15
|
+
/**
|
|
16
|
+
* One menu that any number of rows, buttons or a canvas open with their own
|
|
17
|
+
* items, so a long list holds a single menu rather than one per row. Render
|
|
18
|
+
* `contextMenu` once.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useContextMenu(): {
|
|
21
|
+
openMenu: OpenMenu;
|
|
22
|
+
contextMenu: import("react").JSX.Element | null;
|
|
23
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { MenuPopup } from "./Menu.js";
|
|
2
|
+
import { MenuEntries, MenuFilter } from "./MenuEntries.js";
|
|
3
|
+
import { Menu } from "@base-ui/react/menu";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useCallback, useRef, useState } from "react";
|
|
6
|
+
//#region src/components/ContextMenu.tsx
|
|
7
|
+
function pointRect(x, y) {
|
|
8
|
+
return {
|
|
9
|
+
x,
|
|
10
|
+
y,
|
|
11
|
+
left: x,
|
|
12
|
+
top: y,
|
|
13
|
+
right: x,
|
|
14
|
+
bottom: y,
|
|
15
|
+
width: 0,
|
|
16
|
+
height: 0
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function toAnchor(at) {
|
|
20
|
+
if (at instanceof Element) return at;
|
|
21
|
+
const { clientX, clientY } = at;
|
|
22
|
+
const on = at.currentTarget instanceof Element ? at.currentTarget : null;
|
|
23
|
+
if (!on) return { getBoundingClientRect: () => pointRect(clientX, clientY) };
|
|
24
|
+
const start = on.getBoundingClientRect();
|
|
25
|
+
const dx = clientX - start.left;
|
|
26
|
+
const dy = clientY - start.top;
|
|
27
|
+
return {
|
|
28
|
+
contextElement: on,
|
|
29
|
+
getBoundingClientRect: () => {
|
|
30
|
+
const now = on.getBoundingClientRect();
|
|
31
|
+
return pointRect(now.left + dx, now.top + dy);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* One menu that any number of rows, buttons or a canvas open with their own
|
|
37
|
+
* items, so a long list holds a single menu rather than one per row. Render
|
|
38
|
+
* `contextMenu` once.
|
|
39
|
+
*/
|
|
40
|
+
function useContextMenu() {
|
|
41
|
+
const [opened, setOpened] = useState(null);
|
|
42
|
+
const [open, setOpen] = useState(false);
|
|
43
|
+
const owner = useRef(null);
|
|
44
|
+
const release = useCallback(() => {
|
|
45
|
+
const was = owner.current;
|
|
46
|
+
owner.current = null;
|
|
47
|
+
was?.onClose?.();
|
|
48
|
+
}, []);
|
|
49
|
+
const openMenu = useCallback((at, items, options) => {
|
|
50
|
+
if (items.length === 0) return;
|
|
51
|
+
release();
|
|
52
|
+
const next = {
|
|
53
|
+
...options,
|
|
54
|
+
anchor: toAnchor(at),
|
|
55
|
+
items
|
|
56
|
+
};
|
|
57
|
+
owner.current = next;
|
|
58
|
+
setOpened(next);
|
|
59
|
+
setOpen(true);
|
|
60
|
+
}, [release]);
|
|
61
|
+
const onOpenChange = useCallback((next) => {
|
|
62
|
+
if (!next) setOpen(false);
|
|
63
|
+
}, []);
|
|
64
|
+
const onOpenChangeComplete = useCallback((next) => {
|
|
65
|
+
if (!next) release();
|
|
66
|
+
}, [release]);
|
|
67
|
+
return {
|
|
68
|
+
openMenu,
|
|
69
|
+
contextMenu: opened && /* @__PURE__ */ jsx(MenuFilter, {
|
|
70
|
+
search: opened.search,
|
|
71
|
+
children: (query) => /* @__PURE__ */ jsx(Menu.Root, {
|
|
72
|
+
open,
|
|
73
|
+
onOpenChange,
|
|
74
|
+
onOpenChangeComplete,
|
|
75
|
+
modal: false,
|
|
76
|
+
children: /* @__PURE__ */ jsx(MenuPopup, {
|
|
77
|
+
anchor: opened.anchor,
|
|
78
|
+
children: /* @__PURE__ */ jsx(MenuEntries, {
|
|
79
|
+
entries: opened.items,
|
|
80
|
+
search: opened.search,
|
|
81
|
+
query
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
}, opened.search ? "search" : "plain")
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { useContextMenu };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useNotify, useStrings } from "./Provider.js";
|
|
2
1
|
import { FaCheck } from "../icons/fa/FaCheck.js";
|
|
3
2
|
import { FaEye } from "../icons/fa/FaEye.js";
|
|
4
3
|
import { FaEyeSlash } from "../icons/fa/FaEyeSlash.js";
|
|
5
4
|
import { FiCopy } from "../icons/fi/FiCopy.js";
|
|
6
5
|
import { HiOutlineClipboardCopy } from "../icons/hi/HiOutlineClipboardCopy.js";
|
|
7
|
-
import {
|
|
6
|
+
import { useNotify, useStrings } from "./Provider.js";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { useState } from "react";
|
|
9
9
|
//#region src/components/CopyToClipboard.tsx
|
|
10
10
|
function CopyToClipboard({ as = "div", text, className, children, showIcon = true }) {
|
|
11
11
|
const notify = useNotify();
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComboboxItems } from './comboboxItems.js';
|
|
3
|
+
import type { MenuEntry } from './MenuEntries.js';
|
|
3
4
|
interface CreateModalProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
onClose: () => void;
|
|
6
7
|
typeIcon?: ReactNode;
|
|
7
8
|
typeLabel: string;
|
|
8
9
|
/** Makes the type chip a dropdown to switch between sibling form types. */
|
|
9
|
-
typeMenu?:
|
|
10
|
+
typeMenu?: MenuEntry[] | undefined;
|
|
10
11
|
namePlaceholder: string;
|
|
11
12
|
hideName?: boolean;
|
|
12
13
|
initialName?: string | undefined;
|
|
@@ -37,69 +38,49 @@ interface CreateModalProps {
|
|
|
37
38
|
/** Submits on Enter in the name field or ⌘/Ctrl+Enter from anywhere in the panel. */
|
|
38
39
|
export declare function CreateModal({ open, onClose, typeIcon, typeLabel, typeMenu, namePlaceholder, hideName, initialName, showDescription, descriptionPlaceholder, submitLabel, submittingLabel, validateName, sanitizeName, nameHint, children, properties, advanced, submitDisabled, hideSubmit, nameOptional, onNameChange, dirty, showFavorite, onSubmit, }: CreateModalProps): import("react").JSX.Element;
|
|
39
40
|
/** Labeled single-line input row for the dialog's extra fields. */
|
|
40
|
-
export declare function CreateModalField({ label, tooltip, ...props }: InputHTMLAttributes<HTMLInputElement> & {
|
|
41
|
+
export declare function CreateModalField({ label, tooltip, id, ...props }: InputHTMLAttributes<HTMLInputElement> & {
|
|
41
42
|
label: string;
|
|
42
43
|
/** Help text surfaced via an info icon next to the label. */
|
|
43
44
|
tooltip?: string | undefined;
|
|
44
45
|
}): import("react").JSX.Element;
|
|
45
46
|
/** Labeled multi-line field for credential blobs (JSON keys, PEM keys). */
|
|
46
|
-
export declare function CreateModalTextarea({ label, tooltip, rows, ...props }: TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
47
|
+
export declare function CreateModalTextarea({ label, tooltip, rows, id, ...props }: TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
47
48
|
label: string;
|
|
48
49
|
/** Help text surfaced via an info icon next to the label. */
|
|
49
50
|
tooltip?: string | undefined;
|
|
50
51
|
}): import("react").JSX.Element;
|
|
51
|
-
/** Labeled input
|
|
52
|
-
export declare function CreateModalAutocompleteField({ label, tooltip, value,
|
|
52
|
+
/** Labeled input with suggestions; any text is allowed. */
|
|
53
|
+
export declare function CreateModalAutocompleteField({ label, tooltip, value, onValueChange, items, placeholder, }: {
|
|
53
54
|
label: string;
|
|
54
55
|
/** Help text surfaced via an info icon next to the label. */
|
|
55
56
|
tooltip?: string;
|
|
56
57
|
value: string;
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
onValueChange: (value: string) => void;
|
|
59
|
+
/** Suggestions, filtered by what's typed. */
|
|
60
|
+
items: string[];
|
|
59
61
|
placeholder?: string;
|
|
60
62
|
}): import("react").JSX.Element;
|
|
61
63
|
/** Compact property pill with an on/off switch. */
|
|
62
|
-
export declare function CreateModalSwitch({ label, checked,
|
|
64
|
+
export declare function CreateModalSwitch({ label, checked, onCheckedChange, tooltip, }: {
|
|
63
65
|
label: string;
|
|
64
66
|
checked: boolean;
|
|
65
|
-
|
|
67
|
+
onCheckedChange: (checked: boolean) => void;
|
|
66
68
|
/** Help text surfaced on hover (explains what the toggle does). */
|
|
67
69
|
tooltip?: string;
|
|
68
70
|
}): import("react").JSX.Element;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
/** Small leading icon (e.g. the resource's provider icon). */
|
|
73
|
-
icon?: ReactNode;
|
|
74
|
-
/** Category header to group this option under in the dropdown. */
|
|
75
|
-
group?: string;
|
|
76
|
-
/** Hidden behind the group's toggle row until the group is expanded. */
|
|
77
|
-
collapsible?: boolean;
|
|
78
|
-
/** Always listed regardless of the typed filter (e.g. a trailing "Create new…" action). */
|
|
79
|
-
pinned?: boolean;
|
|
80
|
-
/** Muted second line under the label (e.g. the allocation a group bills to). */
|
|
81
|
-
description?: string;
|
|
82
|
-
/** Listed but not selectable (e.g. a group whose allocation is exhausted). */
|
|
83
|
-
disabled?: boolean;
|
|
84
|
-
}
|
|
85
|
-
/** Callers gating collapse on list size must use this same threshold so
|
|
86
|
-
* collapsed rows always come with a filter to find them. */
|
|
87
|
-
export declare const CREATE_MODAL_SELECT_FILTER_THRESHOLD = 8;
|
|
88
|
-
/** Compact property pill with a dropdown of options. Options may carry leading
|
|
89
|
-
* icons and group headers (e.g. Clusters vs Kubernetes). */
|
|
90
|
-
export declare function CreateModalSelect({ label, icon, value, options, onChange, disabled, disabledHint, tooltip, collapsedLabel, }: {
|
|
71
|
+
/** Compact property pill that picks one value from a searchable list. Items may carry
|
|
72
|
+
* icons, descriptions and group headings (e.g. Clusters vs Kubernetes). */
|
|
73
|
+
export declare function CreateModalSelect({ label, icon, value, items, onValueChange, disabled, disabledReason, tooltip, }: {
|
|
91
74
|
label: string;
|
|
92
75
|
icon?: ReactNode;
|
|
93
76
|
value?: string | undefined;
|
|
94
|
-
|
|
95
|
-
|
|
77
|
+
items: ComboboxItems<string>;
|
|
78
|
+
onValueChange: (value: string) => void;
|
|
96
79
|
/** Gray the pill out (e.g. while a prerequisite pill is unset). */
|
|
97
80
|
disabled?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
|
|
81
|
+
/** Why the pill is disabled, shown in place of the tooltip (e.g. the prerequisite). */
|
|
82
|
+
disabledReason?: string | undefined;
|
|
100
83
|
/** Help text surfaced on hover (explains what the pill selects). */
|
|
101
84
|
tooltip?: string;
|
|
102
|
-
/** Label for the toggle row hiding a group's collapsible options. */
|
|
103
|
-
collapsedLabel?: (count: number) => string;
|
|
104
85
|
}): import("react").JSX.Element;
|
|
105
86
|
export {};
|