@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.
Files changed (283) hide show
  1. package/README.md +25 -0
  2. package/dist/ai/components/AllocationSelector.d.ts +3 -4
  3. package/dist/ai/components/AllocationSelector.js +37 -33
  4. package/dist/ai/components/AttachmentManager.js +7 -7
  5. package/dist/ai/components/AttachmentUpload.js +5 -5
  6. package/dist/ai/components/BranchNavigator.js +1 -1
  7. package/dist/ai/components/ChatEmptyState.js +2 -2
  8. package/dist/ai/components/ChatInput.js +10 -8
  9. package/dist/ai/components/ChatLayout.js +4 -5
  10. package/dist/ai/components/ChatMessage.js +12 -12
  11. package/dist/ai/components/ChatMessageList.js +9 -9
  12. package/dist/ai/components/ChatSidebar.js +8 -9
  13. package/dist/ai/components/ChatThread.js +4 -4
  14. package/dist/ai/components/ComposerChrome.d.ts +2 -2
  15. package/dist/ai/components/ComposerChrome.js +3 -6
  16. package/dist/ai/components/DragOverlay.js +2 -2
  17. package/dist/ai/components/ModelSelector.d.ts +5 -3
  18. package/dist/ai/components/ModelSelector.js +102 -339
  19. package/dist/ai/components/PastedText.js +11 -11
  20. package/dist/ai/components/ProviderIssueBanner.d.ts +2 -0
  21. package/dist/ai/components/ProviderIssueBanner.js +34 -16
  22. package/dist/ai/components/Reasoning.js +4 -4
  23. package/dist/ai/components/ShareDialog.js +43 -35
  24. package/dist/ai/components/SlashMenu.d.ts +12 -2
  25. package/dist/ai/components/SlashMenu.js +29 -13
  26. package/dist/ai/components/agent/ActivityLine.js +3 -3
  27. package/dist/ai/components/agent/AgentMessageParts.js +20 -20
  28. package/dist/ai/components/agent/PermissionPicker.js +13 -11
  29. package/dist/ai/components/conversationActions.d.ts +4 -6
  30. package/dist/ai/components/conversationActions.js +9 -13
  31. package/dist/ai/core/ChatProvider.js +1 -1
  32. package/dist/ai/core/config.js +1 -1
  33. package/dist/ai/core/providerIssues.d.ts +7 -0
  34. package/dist/ai/core/providerIssues.js +9 -1
  35. package/dist/ai/core/useKeyboardShortcuts.d.ts +4 -0
  36. package/dist/ai/core/useKeyboardShortcuts.js +8 -2
  37. package/dist/ai/index.d.ts +0 -1
  38. package/dist/ai/index.js +1 -2
  39. package/dist/ai/strings.d.ts +19 -0
  40. package/dist/ai/strings.js +18 -1
  41. package/dist/ai/ui/Avatar.js +5 -5
  42. package/dist/ai/ui/ConversationSidebar.d.ts +0 -1
  43. package/dist/ai/ui/ConversationSidebar.js +6 -7
  44. package/dist/ai/ui/Markdown.js +3 -3
  45. package/dist/ai/ui/Notice.js +6 -6
  46. package/dist/ai/ui/chip.d.ts +4 -0
  47. package/dist/ai/ui/chip.js +8 -0
  48. package/dist/ai/ui/sidebar.d.ts +6 -5
  49. package/dist/ai/ui/sidebar.js +39 -43
  50. package/dist/components/ActionMenu.d.ts +13 -0
  51. package/dist/components/ActionMenu.js +30 -0
  52. package/dist/components/Avatar.js +6 -6
  53. package/dist/components/Breadcrumbs.js +1 -1
  54. package/dist/components/Button.js +10 -10
  55. package/dist/components/Callout.js +2 -2
  56. package/dist/components/Card.js +3 -3
  57. package/dist/components/Combobox.d.ts +49 -0
  58. package/dist/components/Combobox.js +405 -0
  59. package/dist/components/ConfirmModal.js +11 -11
  60. package/dist/components/ContextMenu.d.ts +23 -0
  61. package/dist/components/ContextMenu.js +89 -0
  62. package/dist/components/CopyToClipboard.js +2 -2
  63. package/dist/components/CreateModal.d.ts +19 -38
  64. package/dist/components/CreateModal.js +116 -267
  65. package/dist/components/DescriptionList.js +8 -8
  66. package/dist/components/Filter.js +2 -2
  67. package/dist/components/FilterPill.js +2 -2
  68. package/dist/components/HoverCard.d.ts +14 -0
  69. package/dist/components/HoverCard.js +33 -0
  70. package/dist/components/IconButton.d.ts +5 -5
  71. package/dist/components/IconButton.js +18 -22
  72. package/dist/components/InfoTip.d.ts +15 -0
  73. package/dist/components/InfoTip.js +60 -0
  74. package/dist/components/Input.js +5 -5
  75. package/dist/components/LetterBadge.js +2 -2
  76. package/dist/components/Loader.js +3 -3
  77. package/dist/components/Markdown.js +1 -1
  78. package/dist/components/MarkdownImpl.js +2 -2
  79. package/dist/components/Menu.d.ts +33 -0
  80. package/dist/components/Menu.js +86 -0
  81. package/dist/components/MenuEntries.d.ts +56 -0
  82. package/dist/components/MenuEntries.js +123 -0
  83. package/dist/components/Modal.d.ts +29 -0
  84. package/dist/components/Modal.js +47 -0
  85. package/dist/components/Overview.js +11 -10
  86. package/dist/components/PageHeader.d.ts +10 -16
  87. package/dist/components/PageHeader.js +69 -95
  88. package/dist/components/Pagination.js +5 -5
  89. package/dist/components/Provider.d.ts +5 -11
  90. package/dist/components/Provider.js +11 -14
  91. package/dist/components/Radio.d.ts +8 -0
  92. package/dist/components/Radio.js +16 -0
  93. package/dist/components/SectionHeader.js +2 -2
  94. package/dist/components/SegmentedControl.d.ts +6 -5
  95. package/dist/components/SegmentedControl.js +34 -30
  96. package/dist/components/Select.d.ts +27 -0
  97. package/dist/components/Select.js +78 -0
  98. package/dist/components/SettingModeOption.d.ts +5 -8
  99. package/dist/components/SettingModeOption.js +10 -12
  100. package/dist/components/SettingRow.js +4 -4
  101. package/dist/components/SettingsCard.js +4 -4
  102. package/dist/components/SettingsGroup.js +2 -2
  103. package/dist/components/Sort.js +1 -1
  104. package/dist/components/StatusBadge.js +7 -7
  105. package/dist/components/StatusIcons.js +4 -4
  106. package/dist/components/Switch.d.ts +22 -0
  107. package/dist/components/Switch.js +28 -0
  108. package/dist/components/Table.js +11 -11
  109. package/dist/components/Tooltip.d.ts +24 -20
  110. package/dist/components/Tooltip.js +58 -76
  111. package/dist/components/comboboxItems.d.ts +24 -0
  112. package/dist/components/comboboxItems.js +10 -0
  113. package/dist/components/floating.d.ts +14 -0
  114. package/dist/components/floating.js +21 -0
  115. package/dist/components/search.d.ts +2 -0
  116. package/dist/components/search.js +14 -0
  117. package/dist/editor/Editor.js +1 -1
  118. package/dist/editor/EditorField.js +16 -21
  119. package/dist/editor/FormCodePanel.js +19 -19
  120. package/dist/editor/Monaco.js +3 -3
  121. package/dist/file-explorer/FileExplorer.js +77 -81
  122. package/dist/file-explorer/FileExplorerContext.js +2 -2
  123. package/dist/file-explorer/FilePreview/CodePreviewEditor.js +1 -1
  124. package/dist/file-explorer/FilePreview/Inline.js +1 -1
  125. package/dist/file-explorer/FilePreview/StreamedBadge.js +5 -6
  126. package/dist/file-explorer/FilePreview/Viewer.js +8 -8
  127. package/dist/file-explorer/FilePreview/index.d.ts +1 -1
  128. package/dist/file-explorer/FilePreview/index.js +49 -83
  129. package/dist/file-explorer/FileRow.d.ts +4 -3
  130. package/dist/file-explorer/FileRow.js +32 -38
  131. package/dist/file-explorer/FileRowsWindow.d.ts +3 -2
  132. package/dist/file-explorer/FileRowsWindow.js +4 -4
  133. package/dist/file-explorer/FileTable.d.ts +3 -2
  134. package/dist/file-explorer/FileTable.js +3 -3
  135. package/dist/file-explorer/LoadMoreRow.js +1 -1
  136. package/dist/file-explorer/TreeView.js +11 -16
  137. package/dist/file-explorer/helpers.js +11 -12
  138. package/dist/file-explorer/toasts.js +11 -11
  139. package/dist/form/FieldGroup.d.ts +11 -0
  140. package/dist/form/FieldGroup.js +36 -0
  141. package/dist/form/FieldWrapper.js +4 -4
  142. package/dist/form/Fields/BooleanField.js +23 -33
  143. package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
  144. package/dist/form/Fields/CheckboxGroupField.js +9 -13
  145. package/dist/form/Fields/ColorField.d.ts +1 -2
  146. package/dist/form/Fields/ColorField.js +6 -11
  147. package/dist/form/Fields/DropdownField.d.ts +3 -13
  148. package/dist/form/Fields/DropdownField.js +40 -27
  149. package/dist/form/Fields/DurationField.d.ts +1 -2
  150. package/dist/form/Fields/DurationField.js +25 -32
  151. package/dist/form/Fields/LabelField.js +2 -2
  152. package/dist/form/Fields/MultiDropdownField.d.ts +6 -12
  153. package/dist/form/Fields/MultiDropdownField.js +31 -22
  154. package/dist/form/Fields/NumberField.d.ts +1 -1
  155. package/dist/form/Fields/NumberField.js +65 -35
  156. package/dist/form/Fields/ObjectField.d.ts +1 -1
  157. package/dist/form/Fields/ObjectField.js +12 -43
  158. package/dist/form/Fields/RadioField.d.ts +1 -1
  159. package/dist/form/Fields/RadioField.js +30 -41
  160. package/dist/form/Fields/RangeField.d.ts +1 -2
  161. package/dist/form/Fields/RangeField.js +23 -16
  162. package/dist/form/Fields/StringField.d.ts +1 -2
  163. package/dist/form/Fields/StringField.js +58 -26
  164. package/dist/form/Fields/TextAreaField.js +12 -10
  165. package/dist/form/Form.d.ts +30 -48
  166. package/dist/form/Form.js +306 -412
  167. package/dist/form/FormLayout.js +9 -9
  168. package/dist/form/Wizard/WizardContainer.d.ts +1 -4
  169. package/dist/form/Wizard/WizardContainer.js +40 -56
  170. package/dist/form/Wizard/WizardNavigation.js +1 -1
  171. package/dist/form/Wizard/WizardStepContent.d.ts +1 -5
  172. package/dist/form/Wizard/WizardStepContent.js +11 -16
  173. package/dist/form/Wizard/WizardStepIndicator.js +6 -6
  174. package/dist/form/Wizard/types.d.ts +0 -14
  175. package/dist/form/fieldRegistry.d.ts +1 -1
  176. package/dist/form/fieldRegistry.js +6 -6
  177. package/dist/form/formEditing.js +1 -1
  178. package/dist/form/index.d.ts +5 -4
  179. package/dist/form/index.js +6 -7
  180. package/dist/form/lib.js +3 -2
  181. package/dist/form/types/fieldComponentTypes.d.ts +8 -10
  182. package/dist/form/useChoiceField.d.ts +18 -0
  183. package/dist/form/useChoiceField.js +46 -0
  184. package/dist/form/useFieldValue.d.ts +7 -0
  185. package/dist/form/useFieldValue.js +20 -0
  186. package/dist/form/useParsedOpts.d.ts +3 -1
  187. package/dist/form/useParsedOpts.js +12 -17
  188. package/dist/form/utils/dependentOptions.d.ts +8 -4
  189. package/dist/form/utils/dependentOptions.js +25 -17
  190. package/dist/form/utils/fieldItems.d.ts +32 -0
  191. package/dist/form/utils/fieldItems.js +32 -0
  192. package/dist/form/utils/fieldPath.d.ts +10 -0
  193. package/dist/form/utils/fieldPath.js +20 -0
  194. package/dist/form/utils/shareEqual.d.ts +6 -0
  195. package/dist/form/utils/shareEqual.js +38 -0
  196. package/dist/graph/AnnotationBanner.js +8 -8
  197. package/dist/graph/Collapse.d.ts +1 -0
  198. package/dist/graph/Collapse.js +6 -27
  199. package/dist/graph/Connectors.js +5 -5
  200. package/dist/graph/DependencyGraph.js +20 -19
  201. package/dist/graph/GraphEditor.js +30 -41
  202. package/dist/graph/GraphEditorDialogs.js +17 -17
  203. package/dist/graph/GraphNode.js +1 -1
  204. package/dist/graph/InputDialog.js +19 -22
  205. package/dist/graph/InputsEditor.js +58 -66
  206. package/dist/graph/JobSummary.js +42 -39
  207. package/dist/graph/MatrixGroup.js +1 -1
  208. package/dist/graph/ProblemsButton.js +18 -19
  209. package/dist/graph/Reveal.js +1 -1
  210. package/dist/graph/ShortcutsButton.js +15 -18
  211. package/dist/graph/SuggestionInput.d.ts +5 -10
  212. package/dist/graph/SuggestionInput.js +14 -18
  213. package/dist/graph/ToolbarPopover.d.ts +11 -6
  214. package/dist/graph/ToolbarPopover.js +35 -67
  215. package/dist/graph/TreeView.js +24 -37
  216. package/dist/graph/WorkflowSettingsDialog.js +4 -4
  217. package/dist/graph/editorChrome.js +13 -12
  218. package/dist/graph/editorFields.js +29 -29
  219. package/dist/graph/editorPrimitives.d.ts +1 -1
  220. package/dist/graph/editorPrimitives.js +10 -7
  221. package/dist/graph/editorRows.js +103 -97
  222. package/dist/graph/fieldProblems.js +2 -2
  223. package/dist/graph/graphEditorState.d.ts +4 -3
  224. package/dist/graph/inputRefs.js +9 -9
  225. package/dist/graph/settingsViews.js +6 -7
  226. package/dist/graph/stepWith.js +6 -6
  227. package/dist/index.d.ts +14 -15
  228. package/dist/index.js +15 -14
  229. package/dist/list/ActionToolbar.d.ts +6 -14
  230. package/dist/list/ActionToolbar.js +48 -96
  231. package/dist/list/ListPage.d.ts +6 -12
  232. package/dist/list/ListPage.js +46 -29
  233. package/dist/list/ListPager.js +4 -4
  234. package/dist/list/ListTable.js +5 -5
  235. package/dist/list/ListViewControls.d.ts +5 -4
  236. package/dist/list/ListViewControls.js +177 -267
  237. package/dist/list/UserHoverCard.d.ts +3 -17
  238. package/dist/list/UserHoverCard.js +21 -45
  239. package/dist/list/index.d.ts +3 -4
  240. package/dist/list/index.js +3 -4
  241. package/dist/list/listSearch.js +12 -11
  242. package/dist/list/rowMenu.d.ts +68 -0
  243. package/dist/list/rowMenu.js +136 -0
  244. package/dist/logviewer/LogViewer.js +26 -26
  245. package/dist/styles.css +1 -1
  246. package/package.json +7 -13
  247. package/dist/ai/ui/Dropdown.d.ts +0 -31
  248. package/dist/ai/ui/Dropdown.js +0 -110
  249. package/dist/components/AddMenu.d.ts +0 -18
  250. package/dist/components/AddMenu.js +0 -46
  251. package/dist/components/BareModal.d.ts +0 -17
  252. package/dist/components/BareModal.js +0 -77
  253. package/dist/components/CollapsiblePanel.d.ts +0 -27
  254. package/dist/components/CollapsiblePanel.js +0 -77
  255. package/dist/components/Dropdown.d.ts +0 -28
  256. package/dist/components/Dropdown.js +0 -355
  257. package/dist/components/Listbox.d.ts +0 -21
  258. package/dist/components/Listbox.js +0 -119
  259. package/dist/components/MultiSelect.d.ts +0 -22
  260. package/dist/components/MultiSelect.js +0 -168
  261. package/dist/components/SwitchToggle.d.ts +0 -15
  262. package/dist/components/SwitchToggle.js +0 -57
  263. package/dist/components/SwitchToggleSmall.d.ts +0 -6
  264. package/dist/components/SwitchToggleSmall.js +0 -14
  265. package/dist/components/Toggle.d.ts +0 -6
  266. package/dist/components/Toggle.js +0 -20
  267. package/dist/components/dropdownUtils.d.ts +0 -37
  268. package/dist/components/dropdownUtils.js +0 -99
  269. package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -25
  270. package/dist/form/SpecialTypes/DropdownWrapper.js +0 -28
  271. package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +0 -51
  272. package/dist/form/SpecialTypes/FormikCustomDropdown.js +0 -119
  273. package/dist/form/SpecialTypes/FormikCustomInput.d.ts +0 -19
  274. package/dist/form/SpecialTypes/FormikCustomInput.js +0 -121
  275. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +0 -13
  276. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +0 -31
  277. package/dist/form/SpecialTypes/FormikNumericInput.d.ts +0 -9
  278. package/dist/form/SpecialTypes/FormikNumericInput.js +0 -60
  279. package/dist/form/SpecialTypes/index.d.ts +0 -3
  280. package/dist/list/HoverCard.d.ts +0 -24
  281. package/dist/list/HoverCard.js +0 -73
  282. package/dist/list/RowContextMenu.d.ts +0 -127
  283. 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 { useState } from "react";
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 HeaderAddMenuItem } from './AddMenu.js';
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?: HeaderAddMenuItem[] | undefined;
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 row with typeahead suggestions; free-form values allowed. */
52
- export declare function CreateModalAutocompleteField({ label, tooltip, value, onChange, options, placeholder, }: {
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
- onChange: (value: string) => void;
58
- options: string[];
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, onChange, tooltip, }: {
64
+ export declare function CreateModalSwitch({ label, checked, onCheckedChange, tooltip, }: {
63
65
  label: string;
64
66
  checked: boolean;
65
- onChange: (checked: boolean) => void;
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
- export interface CreateModalSelectOption {
70
- label: string;
71
- value: string;
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
- options: CreateModalSelectOption[];
95
- onChange: (value: string) => void;
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
- /** Shown as the pill's tooltip while disabled (e.g. the prerequisite). */
99
- disabledHint?: string | undefined;
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 {};