@parallelworks/ui 0.51.0 → 0.52.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 +155 -14
- package/dist/ai/agent/toolStrings.d.ts +2 -0
- package/dist/ai/agent/toolStrings.js +20 -18
- package/dist/ai/ai.css +12 -0
- package/dist/ai/components/AllocationSelector.js +5 -1
- package/dist/ai/components/AttachmentManager.js +51 -42
- package/dist/ai/components/AttachmentUpload.d.ts +4 -2
- package/dist/ai/components/AttachmentUpload.js +9 -9
- package/dist/ai/components/BlockedGroupBanner.js +8 -14
- package/dist/ai/components/BranchNavigator.js +11 -12
- package/dist/ai/components/ChatEmptyState.js +12 -19
- package/dist/ai/components/ChatInput.d.ts +4 -3
- package/dist/ai/components/ChatInput.js +27 -13
- package/dist/ai/components/ChatMessage.js +45 -121
- package/dist/ai/components/ChatMessageList.d.ts +5 -2
- package/dist/ai/components/ChatMessageList.js +89 -51
- package/dist/ai/components/ChatSidebar.js +11 -7
- package/dist/ai/components/ChatThread.js +1 -13
- package/dist/ai/components/DragOverlay.js +3 -3
- package/dist/ai/components/MessageAttachments.d.ts +10 -0
- package/dist/ai/components/MessageAttachments.js +78 -0
- package/dist/ai/components/ModelSelector.js +3 -3
- package/dist/ai/components/PastedText.js +2 -2
- package/dist/ai/components/ProviderIssueBanner.js +19 -23
- package/dist/ai/components/ShareDialog.js +2 -2
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -2
- package/dist/ai/components/agent/ActivityLine.js +8 -51
- package/dist/ai/components/agent/AgentMessageParts.js +114 -53
- package/dist/ai/core/ChatProvider.d.ts +16 -5
- package/dist/ai/core/ChatProvider.js +41 -8
- package/dist/ai/core/config.js +4 -3
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +3 -3
- package/dist/ai/strings.d.ts +29 -3
- package/dist/ai/strings.js +81 -26
- package/dist/ai/types.d.ts +4 -0
- package/dist/ai/ui/Notice.d.ts +2 -2
- package/dist/ai/ui/Notice.js +29 -62
- package/dist/ai/ui/sidebar.d.ts +5 -3
- package/dist/ai/ui/sidebar.js +21 -9
- package/dist/components/ActionMenu.d.ts +1 -0
- package/dist/components/ActionMenu.js +6 -1
- package/dist/components/AppLink.d.ts +26 -0
- package/dist/components/AppLink.js +51 -0
- package/dist/components/Avatar.d.ts +2 -1
- package/dist/components/Avatar.js +4 -2
- package/dist/components/Button.d.ts +15 -5
- package/dist/components/Button.js +47 -40
- package/dist/components/Callout.d.ts +31 -7
- package/dist/components/Callout.js +50 -19
- package/dist/components/Card.d.ts +11 -6
- package/dist/components/Card.js +14 -8
- package/dist/components/Checkbox.js +2 -1
- package/dist/components/ColorInput.js +5 -3
- package/dist/components/Combobox.js +49 -19
- package/dist/components/ConfirmModal.d.ts +19 -8
- package/dist/components/ConfirmModal.js +31 -53
- package/dist/components/CopyButton.d.ts +38 -0
- package/dist/components/CopyButton.js +68 -0
- package/dist/components/CreateModal.js +118 -111
- package/dist/components/DatePicker.js +12 -8
- package/dist/components/DescriptionList.d.ts +25 -5
- package/dist/components/DescriptionList.js +56 -22
- package/dist/components/Disclosure.js +1 -1
- package/dist/components/Drawer.js +10 -16
- package/dist/components/Field.d.ts +15 -5
- package/dist/components/Field.js +40 -8
- package/dist/components/IconButton.d.ts +14 -5
- package/dist/components/IconButton.js +25 -14
- package/dist/components/InfoTip.d.ts +4 -1
- package/dist/components/InfoTip.js +2 -1
- package/dist/components/Input.d.ts +14 -8
- package/dist/components/Input.js +46 -31
- package/dist/components/Loader.js +1 -1
- package/dist/components/MenuEntries.d.ts +4 -0
- package/dist/components/MenuEntries.js +11 -12
- package/dist/components/Meter.js +5 -4
- package/dist/components/Modal.d.ts +28 -4
- package/dist/components/Modal.js +37 -14
- package/dist/components/Overview.d.ts +20 -12
- package/dist/components/Overview.js +14 -9
- package/dist/components/PageHeader.d.ts +47 -65
- package/dist/components/PageHeader.js +275 -153
- package/dist/components/PageHeaderAction.d.ts +67 -0
- package/dist/components/PageHeaderAction.js +107 -0
- package/dist/components/Pagination.js +6 -16
- package/dist/components/Popover.js +3 -2
- package/dist/components/Provider.d.ts +77 -19
- package/dist/components/Provider.js +139 -130
- package/dist/components/Radio.js +2 -1
- package/dist/components/RefreshButton.js +7 -8
- package/dist/components/RequiredMark.js +1 -1
- package/dist/components/Section.js +1 -1
- package/dist/components/Select.d.ts +4 -9
- package/dist/components/Select.js +24 -11
- package/dist/components/SettingModeOption.d.ts +1 -1
- package/dist/components/SettingModeOption.js +7 -1
- package/dist/components/SettingsCard.d.ts +5 -3
- package/dist/components/SettingsCard.js +27 -20
- package/dist/components/Slider.js +1 -1
- package/dist/components/StatusBadge.js +2 -2
- package/dist/components/Switch.js +5 -4
- package/dist/components/Table.d.ts +30 -20
- package/dist/components/Table.js +50 -73
- package/dist/components/Tabs.d.ts +3 -7
- package/dist/components/Tabs.js +6 -10
- package/dist/components/ThemeEditor.js +18 -8
- package/dist/components/Toast.d.ts +11 -3
- package/dist/components/Toast.js +45 -20
- package/dist/components/buttonClasses.js +1 -1
- package/dist/components/comboboxItems.d.ts +4 -0
- package/dist/components/comboboxItems.js +6 -1
- package/dist/components/dismiss.d.ts +12 -0
- package/dist/components/dismiss.js +19 -0
- package/dist/components/fieldBox.d.ts +4 -0
- package/dist/components/fieldBox.js +7 -3
- package/dist/components/floating.d.ts +3 -3
- package/dist/components/floating.js +1 -1
- package/dist/components/markdownCodeBreaks.js +3 -4
- package/dist/components/pageHeaderStore.d.ts +41 -0
- package/dist/components/pageHeaderStore.js +67 -0
- package/dist/components/pathBreaks.d.ts +8 -0
- package/dist/components/pathBreaks.js +28 -0
- package/dist/components/segmented.js +1 -1
- package/dist/components/shortcutKey.d.ts +2 -1
- package/dist/components/shortcutKey.js +19 -2
- package/dist/components/splitter.js +1 -1
- package/dist/components/useCssIsDark.js +40 -18
- package/dist/components/useTheme.js +9 -10
- package/dist/dev.d.ts +9 -0
- package/dist/dev.js +14 -0
- package/dist/editor/Editor.d.ts +3 -2
- package/dist/editor/Editor.js +11 -2
- package/dist/editor/EditorField.d.ts +2 -1
- package/dist/editor/EditorField.js +11 -29
- package/dist/editor/FormCodePanel.d.ts +7 -3
- package/dist/editor/FormCodePanel.js +14 -7
- package/dist/editor/Monaco.d.ts +14 -5
- package/dist/editor/Monaco.js +163 -112
- package/dist/editor/index.d.ts +5 -5
- package/dist/editor/index.js +3 -3
- package/dist/editor/themes.d.ts +8 -5
- package/dist/editor/themes.js +58 -30
- package/dist/editor/yaml.d.ts +6 -2
- package/dist/editor/yaml.js +11 -2
- package/dist/file-explorer/FileExplorer.js +143 -124
- package/dist/file-explorer/FileExplorerContext.js +1 -1
- package/dist/file-explorer/FilePreview/StreamedBadge.js +3 -1
- package/dist/file-explorer/FilePreview/Viewer.js +2 -2
- package/dist/file-explorer/FilePreview/index.js +4 -4
- package/dist/file-explorer/FileRow.js +1 -1
- package/dist/file-explorer/FileRowsWindow.js +34 -3
- package/dist/file-explorer/FileTable.js +3 -1
- package/dist/file-explorer/TreeView.js +37 -14
- package/dist/file-explorer/helpers.d.ts +2 -1
- package/dist/file-explorer/helpers.js +21 -20
- package/dist/file-explorer/toasts.js +27 -19
- package/dist/file-explorer/treeRows.d.ts +6 -0
- package/dist/file-explorer/treeRows.js +19 -1
- package/dist/file-explorer/useNearEnd.js +3 -6
- package/dist/form/Fields/CheckboxGroupField.js +12 -5
- package/dist/form/Fields/DurationField.js +1 -1
- package/dist/form/Fields/LabelField.js +1 -1
- package/dist/form/Fields/ObjectField.d.ts +1 -1
- package/dist/form/Fields/ObjectField.js +3 -2
- package/dist/form/Fields/StringField.js +16 -29
- package/dist/form/Fields/TextAreaField.js +3 -4
- package/dist/form/Form.js +3 -8
- package/dist/form/Wizard/WizardNavigation.js +0 -3
- package/dist/form/Wizard/utils.js +1 -1
- package/dist/form/fieldFrame.d.ts +1 -1
- package/dist/form/fieldFrame.js +2 -2
- package/dist/form/types/fieldComponentTypes.d.ts +2 -1
- package/dist/graph/AnnotationBanner.d.ts +1 -2
- package/dist/graph/AnnotationBanner.js +30 -32
- package/dist/graph/Connectors.js +4 -1
- package/dist/graph/DependencyGraph.js +2 -2
- package/dist/graph/GraphEditor.js +11 -9
- package/dist/graph/GraphEditorDialogs.js +1 -1
- package/dist/graph/GraphNode.js +7 -4
- package/dist/graph/InputDialog.js +1 -1
- package/dist/graph/InputsEditor.js +14 -11
- package/dist/graph/MatrixGroup.js +9 -3
- package/dist/graph/Reveal.js +18 -10
- package/dist/graph/ShortcutsButton.d.ts +11 -2
- package/dist/graph/ShortcutsButton.js +14 -3
- package/dist/graph/TreeView.js +35 -18
- package/dist/graph/WorkflowSettingsDialog.js +1 -1
- package/dist/graph/editorFields.js +1 -1
- package/dist/graph/editorRows.js +16 -10
- package/dist/graph/editorStrings.d.ts +7 -0
- package/dist/graph/editorStrings.js +8 -1
- package/dist/graph/inputRefs.js +1 -1
- package/dist/graph/settingsViews.js +11 -18
- package/dist/graph/stepWith.js +1 -1
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +4 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.js +16 -16
- package/dist/list/ActionToolbar.d.ts +42 -6
- package/dist/list/ActionToolbar.js +297 -101
- package/dist/list/ListPage.d.ts +15 -23
- package/dist/list/ListPage.js +42 -43
- package/dist/list/ListTable.d.ts +32 -7
- package/dist/list/ListTable.js +48 -12
- package/dist/list/ListViewControls.js +1 -1
- package/dist/list/UserHoverCard.js +7 -15
- package/dist/list/index.d.ts +2 -2
- package/dist/list/index.js +2 -2
- package/dist/list/listSearch.js +12 -10
- package/dist/list/listView.d.ts +10 -1
- package/dist/list/listView.js +15 -1
- package/dist/logviewer/LogViewer.d.ts +4 -2
- package/dist/logviewer/LogViewer.js +87 -69
- package/dist/logviewer/logviewer.css +3 -2
- package/dist/reducedMotion.d.ts +5 -0
- package/dist/reducedMotion.js +20 -0
- package/dist/safeUrl.d.ts +1 -1
- package/dist/safeUrl.js +4 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/components/Breadcrumbs.d.ts +0 -37
- package/dist/components/Breadcrumbs.js +0 -90
- package/dist/components/CopyToClipboard.d.ts +0 -17
- package/dist/components/CopyToClipboard.js +0 -66
- package/dist/components/Sort.d.ts +0 -9
- package/dist/components/Sort.js +0 -42
|
@@ -3,15 +3,26 @@ import { useLocalPersistedState } from "./persistedState.js";
|
|
|
3
3
|
import { Toaster } from "./Toast.js";
|
|
4
4
|
import { TooltipProvider } from "./Tooltip.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { createContext, use, useCallback, useContext, useEffect,
|
|
6
|
+
import { createContext, use, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
7
|
+
import { dequal } from "dequal";
|
|
7
8
|
//#region src/components/Provider.tsx
|
|
9
|
+
var isGroup = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10
|
+
function mergeStrings(defaults, overrides) {
|
|
11
|
+
if (!isGroup(overrides) || !isGroup(defaults)) return defaults;
|
|
12
|
+
const merged = { ...defaults };
|
|
13
|
+
for (const [key, value] of Object.entries(overrides)) {
|
|
14
|
+
if (value === void 0) continue;
|
|
15
|
+
merged[key] = isGroup(value) && isGroup(merged[key]) ? mergeStrings(merged[key], value) : value;
|
|
16
|
+
}
|
|
17
|
+
return merged;
|
|
18
|
+
}
|
|
8
19
|
var DefaultLink = ({ href, ...rest }) => /* @__PURE__ */ jsx("a", {
|
|
9
20
|
href: safeUrl(href),
|
|
10
21
|
...rest
|
|
11
22
|
});
|
|
12
23
|
/** The provider's link slot, with a plain anchor fallback. */
|
|
13
24
|
function useLink() {
|
|
14
|
-
return useContext(
|
|
25
|
+
return useContext(SlotsContext).link ?? DefaultLink;
|
|
15
26
|
}
|
|
16
27
|
var defaultUseRunFile = () => ({
|
|
17
28
|
data: void 0,
|
|
@@ -84,6 +95,13 @@ var DEFAULTS = {
|
|
|
84
95
|
remove: "Remove",
|
|
85
96
|
sort: "Sort",
|
|
86
97
|
userAvatar: "User avatar",
|
|
98
|
+
presence: {
|
|
99
|
+
online: "online",
|
|
100
|
+
offline: "offline",
|
|
101
|
+
busy: "busy",
|
|
102
|
+
away: "away"
|
|
103
|
+
},
|
|
104
|
+
withPresence: (name, presence) => `${name}, ${presence}`,
|
|
87
105
|
moreInfo: "More information",
|
|
88
106
|
actions: "Actions",
|
|
89
107
|
edit: "Edit",
|
|
@@ -92,9 +110,12 @@ var DEFAULTS = {
|
|
|
92
110
|
clearSearch: "Clear search",
|
|
93
111
|
filterPlaceholder: "Filter…",
|
|
94
112
|
breadcrumb: "Breadcrumb",
|
|
113
|
+
showFullPath: "Show full path",
|
|
95
114
|
yes: "Yes",
|
|
96
115
|
no: "No",
|
|
97
116
|
opensInNewTab: "(opens in a new tab)",
|
|
117
|
+
codeEditor: "Code editor",
|
|
118
|
+
readOnlyText: "This text is read-only.",
|
|
98
119
|
resizePanel: "Resize panel",
|
|
99
120
|
panelWidth: (px) => `${px} pixels wide`,
|
|
100
121
|
refresh: "Refresh",
|
|
@@ -106,7 +127,8 @@ var DEFAULTS = {
|
|
|
106
127
|
noOptionsFound: "No options found",
|
|
107
128
|
showOptions: "Show options",
|
|
108
129
|
add: (text) => `Add “${text}”`,
|
|
109
|
-
limitReached: (max) => `Up to ${max}
|
|
130
|
+
limitReached: (max) => `Up to ${max}`,
|
|
131
|
+
removeValue: (label) => `Remove ${label}`
|
|
110
132
|
},
|
|
111
133
|
datePicker: {
|
|
112
134
|
pickDate: "Pick a date",
|
|
@@ -176,9 +198,9 @@ var DEFAULTS = {
|
|
|
176
198
|
top: "Top",
|
|
177
199
|
clearSelection: "Clear selection",
|
|
178
200
|
copyLines: (count) => count === 1 ? "Copy 1 line" : `Copy ${count} lines`,
|
|
179
|
-
copyAll: "Copy
|
|
180
|
-
hideDebug: "Hide
|
|
181
|
-
showDebug: "Show
|
|
201
|
+
copyAll: "Copy all",
|
|
202
|
+
hideDebug: "Hide debug",
|
|
203
|
+
showDebug: "Show debug",
|
|
182
204
|
filterLogs: "Filter logs",
|
|
183
205
|
beginningOfLog: "Beginning of log",
|
|
184
206
|
loadingOlderEntries: "Loading older entries…",
|
|
@@ -195,7 +217,8 @@ var DEFAULTS = {
|
|
|
195
217
|
endBeforeStart: "End time must be after the start time.",
|
|
196
218
|
endInFuture: "End time cannot be in the future.",
|
|
197
219
|
follow: "Follow",
|
|
198
|
-
following: "Following"
|
|
220
|
+
following: "Following",
|
|
221
|
+
selectLine: (line) => `Select line ${line}`
|
|
199
222
|
},
|
|
200
223
|
dag: {
|
|
201
224
|
workflow: "Workflow",
|
|
@@ -203,7 +226,7 @@ var DEFAULTS = {
|
|
|
203
226
|
status: "Status",
|
|
204
227
|
runtime: "Runtime",
|
|
205
228
|
submitted: "Submitted",
|
|
206
|
-
resetView: "Reset
|
|
229
|
+
resetView: "Reset view",
|
|
207
230
|
previousGraph: "Back to the previous graph",
|
|
208
231
|
nextGraph: "Forward to the next graph",
|
|
209
232
|
matrixOf: (name) => `Matrix: ${name}`,
|
|
@@ -227,6 +250,23 @@ var DEFAULTS = {
|
|
|
227
250
|
warning: "Warning",
|
|
228
251
|
notice: "Notice"
|
|
229
252
|
},
|
|
253
|
+
annotationsLabel: ({ error, warning, notice }) => `Annotations: ${[
|
|
254
|
+
[
|
|
255
|
+
error,
|
|
256
|
+
"error",
|
|
257
|
+
"errors"
|
|
258
|
+
],
|
|
259
|
+
[
|
|
260
|
+
warning,
|
|
261
|
+
"warning",
|
|
262
|
+
"warnings"
|
|
263
|
+
],
|
|
264
|
+
[
|
|
265
|
+
notice,
|
|
266
|
+
"notice",
|
|
267
|
+
"notices"
|
|
268
|
+
]
|
|
269
|
+
].filter(([count]) => count).map(([count, one, many]) => `${count} ${count === 1 ? one : many}`).join(", ")}`,
|
|
230
270
|
annotationSource: (job, step) => `in ${job} → ${step}`,
|
|
231
271
|
stepNumber: (index) => `step ${index}`
|
|
232
272
|
},
|
|
@@ -250,7 +290,7 @@ var DEFAULTS = {
|
|
|
250
290
|
preview: "Preview",
|
|
251
291
|
openFullPreview: "Open full preview",
|
|
252
292
|
previewLayout: "Preview layout",
|
|
253
|
-
|
|
293
|
+
compact: "Compact",
|
|
254
294
|
fullWindow: "Full window",
|
|
255
295
|
streamed: "Streamed",
|
|
256
296
|
streamedTooltip: "Streamed securely to your browser over a short-lived signed URL — never written to disk.",
|
|
@@ -298,12 +338,12 @@ var DEFAULTS = {
|
|
|
298
338
|
uri: "URI",
|
|
299
339
|
cors: {
|
|
300
340
|
explanation: {
|
|
301
|
-
title: "CORS
|
|
341
|
+
title: "CORS configuration required",
|
|
302
342
|
description: "This storage location cannot be accessed from the browser because it is missing Cross-Origin Resource Sharing (CORS) rules.",
|
|
303
343
|
action: "You can automatically configure these rules to allow access from this domain.",
|
|
304
344
|
note: "Note: Changes may take up to 30 seconds to propagate."
|
|
305
345
|
},
|
|
306
|
-
actions: { addRules: "Add CORS
|
|
346
|
+
actions: { addRules: "Add CORS rules" },
|
|
307
347
|
propagating: {
|
|
308
348
|
title: "Propagating CORS rules",
|
|
309
349
|
description: "The storage provider is rolling out the new rules to its endpoints. This usually completes within a minute.",
|
|
@@ -341,7 +381,7 @@ var DEFAULTS = {
|
|
|
341
381
|
noItemsForDeletion: "No items selected for deletion.",
|
|
342
382
|
deleting: "Deleting item(s) from storage...",
|
|
343
383
|
deleteSomeFailed: "Failed to delete one or more items. Please try again.",
|
|
344
|
-
deleteSuccess: "Deleted
|
|
384
|
+
deleteSuccess: "Deleted from storage.",
|
|
345
385
|
deleteFailed: (message) => `Failed to delete item(s): ${message}`,
|
|
346
386
|
noFilesToUpload: "No files to upload or target path not selected.",
|
|
347
387
|
invalidUploadTarget: "This target path is not valid for upload.",
|
|
@@ -351,14 +391,16 @@ var DEFAULTS = {
|
|
|
351
391
|
corsNoStorage: "No storage selected",
|
|
352
392
|
corsAdded: "CORS rules added successfully",
|
|
353
393
|
corsPropagating: "CORS rules were added, but are still propagating. Try again in a moment.",
|
|
354
|
-
previewUnsupported: "Preview is not supported for this storage."
|
|
394
|
+
previewUnsupported: "Preview is not supported for this storage.",
|
|
395
|
+
loadFailed: (name, message) => `Failed to load contents for ${name}: ${message}`,
|
|
396
|
+
unknownError: "Unknown error"
|
|
355
397
|
},
|
|
356
398
|
chrome: {
|
|
357
399
|
explorer: "Explorer",
|
|
358
400
|
upload: "Upload",
|
|
359
401
|
downloadFromBrowser: "From browser",
|
|
360
402
|
access: "Access",
|
|
361
|
-
manageAccess: "Manage
|
|
403
|
+
manageAccess: "Manage access",
|
|
362
404
|
selectAll: "Select all",
|
|
363
405
|
name: "Name",
|
|
364
406
|
size: "Size",
|
|
@@ -373,21 +415,25 @@ var DEFAULTS = {
|
|
|
373
415
|
storageClass: "Storage class",
|
|
374
416
|
details: "Details",
|
|
375
417
|
selectFiles: "Select files",
|
|
376
|
-
selectFolder: "Select folder"
|
|
418
|
+
selectFolder: "Select folder",
|
|
419
|
+
files: "Files",
|
|
420
|
+
folders: "Folders",
|
|
421
|
+
location: "Location",
|
|
422
|
+
shareHelp: "This will generate a pre-signed URL for this file. Anyone with this link can temporarily access and download the file, even if they don't have an account. The link will automatically expire after 12 hours."
|
|
377
423
|
},
|
|
378
424
|
confirmUpload: {
|
|
379
|
-
title: "Confirm
|
|
425
|
+
title: "Confirm upload",
|
|
380
426
|
text: (path) => `Please confirm the following objects you want to upload to ${path}.`,
|
|
381
427
|
defaultPath: "the selected path",
|
|
382
428
|
noPath: "No path selected",
|
|
383
429
|
confirm: "Confirm",
|
|
384
430
|
target: "Target:",
|
|
385
|
-
sizeLimitTitle: "Upload
|
|
431
|
+
sizeLimitTitle: "Upload size limit exceeded",
|
|
386
432
|
sizeLimitBody: (total, max) => `The total upload size (${total}) exceeds the maximum allowed limit of ${max}.`,
|
|
387
433
|
sizeLimitHint: "Please reduce the number of files or upload them in smaller batches."
|
|
388
434
|
},
|
|
389
435
|
confirmDelete: {
|
|
390
|
-
title: "Confirm
|
|
436
|
+
title: "Confirm delete",
|
|
391
437
|
text: "Are you sure you want to delete the following item(s)? Folders are deleted with everything inside them. This action cannot be undone."
|
|
392
438
|
},
|
|
393
439
|
empty: {
|
|
@@ -400,14 +446,14 @@ var DEFAULTS = {
|
|
|
400
446
|
shareThisFile: "Share this file"
|
|
401
447
|
},
|
|
402
448
|
upload: {
|
|
403
|
-
inQueue: (position, total) => `In
|
|
449
|
+
inQueue: (position, total) => `In queue (#${position} of ${total})`,
|
|
404
450
|
queuedShort: (position, total) => `Queued #${position} / ${total}`,
|
|
405
451
|
destination: "Destination:",
|
|
406
452
|
eta: "ETA:",
|
|
407
453
|
uploading: "Uploading...",
|
|
408
|
-
completeTitle: "Upload
|
|
409
|
-
failedTitle: "Upload
|
|
410
|
-
unknownTitle: "Unknown
|
|
454
|
+
completeTitle: "Upload complete",
|
|
455
|
+
failedTitle: "Upload failed",
|
|
456
|
+
unknownTitle: "Unknown status",
|
|
411
457
|
unknownShort: "Unknown",
|
|
412
458
|
canceled: "Canceled",
|
|
413
459
|
completed: "Completed",
|
|
@@ -420,14 +466,14 @@ var DEFAULTS = {
|
|
|
420
466
|
minimizeDetails: "Minimize details",
|
|
421
467
|
sessionNotQueued: (id, status) => `Upload session with ID ${id} is not queued, current status is ${status}`,
|
|
422
468
|
allCanceled: (count) => `All ${count} file(s) were canceled by user.`,
|
|
423
|
-
someUploaded: (count) => `${count} file(s) uploaded
|
|
469
|
+
someUploaded: (count) => `${count} file(s) uploaded.`,
|
|
424
470
|
someCanceled: (count) => `${count} file(s) canceled by user.`,
|
|
425
|
-
allUploaded: "
|
|
471
|
+
allUploaded: "Uploaded the file(s).",
|
|
426
472
|
failedSummary: (failed, total) => `${failed}/${total} files failed to upload:`,
|
|
427
473
|
failReasonGeneric: "The file(s) may be too large or the connection may have been interrupted.",
|
|
428
474
|
refreshFailed: (name, message) => `Failed to refresh storage data for ${name}. ${message}. Please try again.`,
|
|
429
475
|
unknownError: "Unknown error",
|
|
430
|
-
overallProgress: "Overall
|
|
476
|
+
overallProgress: "Overall progress",
|
|
431
477
|
cancelFile: (name) => `Cancel ${name}`,
|
|
432
478
|
confirmCancelFile: "Cancel?",
|
|
433
479
|
confirmCancelAll: "Cancel all uploading files?",
|
|
@@ -451,8 +497,6 @@ var DEFAULTS = {
|
|
|
451
497
|
allSteps: "All steps",
|
|
452
498
|
stepDone: "Done",
|
|
453
499
|
stepNeedsAttention: "Needs a fix",
|
|
454
|
-
previousStep: "Go to previous step",
|
|
455
|
-
nextStep: "Go to next step",
|
|
456
500
|
runWizard: "Execute",
|
|
457
501
|
fixErrorsToContinue: "Please fix errors before proceeding",
|
|
458
502
|
stepFailed: "An error occurred",
|
|
@@ -474,6 +518,9 @@ var DEFAULTS = {
|
|
|
474
518
|
labelId: "ID",
|
|
475
519
|
labelUrl: "URL",
|
|
476
520
|
couldNotLoad: (noun) => `Couldn't load ${noun}`,
|
|
521
|
+
data: "data",
|
|
522
|
+
count: (count, noun) => `${count} ${noun}`,
|
|
523
|
+
matchCount: (matches, total, nounPlural) => `${matches} of ${total} ${nounPlural}`,
|
|
477
524
|
displayOptions: "Display options",
|
|
478
525
|
grouping: "Grouping",
|
|
479
526
|
ordering: "Ordering",
|
|
@@ -483,6 +530,7 @@ var DEFAULTS = {
|
|
|
483
530
|
descending: "Descending",
|
|
484
531
|
columnHeaders: "Column headers",
|
|
485
532
|
showColumnHeaders: "Show column headers",
|
|
533
|
+
selectAll: "Select all",
|
|
486
534
|
showActions: "Show actions",
|
|
487
535
|
showRowActions: "Show row actions",
|
|
488
536
|
alwaysShowActions: "Always show actions",
|
|
@@ -520,28 +568,32 @@ var DEFAULTS = {
|
|
|
520
568
|
},
|
|
521
569
|
slots: {}
|
|
522
570
|
};
|
|
523
|
-
var
|
|
571
|
+
var StringsContext = createContext(DEFAULTS.strings);
|
|
572
|
+
var NavigationContext = createContext(DEFAULTS.navigation);
|
|
573
|
+
var DataContext = createContext(DEFAULTS.data);
|
|
574
|
+
var SlotsContext = createContext(DEFAULTS.slots);
|
|
575
|
+
var EngineContext = createContext(void 0);
|
|
524
576
|
function useStrings() {
|
|
525
|
-
return useContext(
|
|
577
|
+
return useContext(StringsContext);
|
|
526
578
|
}
|
|
527
579
|
function useNavigation() {
|
|
528
|
-
return useContext(
|
|
580
|
+
return useContext(NavigationContext);
|
|
529
581
|
}
|
|
530
582
|
function useWorkflowJsonResolver() {
|
|
531
|
-
return useContext(
|
|
583
|
+
return useContext(DataContext).resolveWorkflowJson;
|
|
532
584
|
}
|
|
533
585
|
function useRepoSuggestions() {
|
|
534
|
-
return useContext(
|
|
586
|
+
return useContext(DataContext).repoSuggestions;
|
|
535
587
|
}
|
|
536
588
|
var NO_ACTIONS = {};
|
|
537
589
|
function useWorkflowActions() {
|
|
538
|
-
return useContext(
|
|
590
|
+
return useContext(DataContext).workflowActions ?? NO_ACTIONS;
|
|
539
591
|
}
|
|
540
592
|
function useSecretVariablesResolver() {
|
|
541
|
-
return useContext(
|
|
593
|
+
return useContext(DataContext).resolveSecretVariables;
|
|
542
594
|
}
|
|
543
595
|
function useSlots() {
|
|
544
|
-
return useContext(
|
|
596
|
+
return useContext(SlotsContext);
|
|
545
597
|
}
|
|
546
598
|
var loadedEngines = /* @__PURE__ */ new WeakMap();
|
|
547
599
|
function loadEngine(load) {
|
|
@@ -563,18 +615,18 @@ function resolveEngine(source) {
|
|
|
563
615
|
}
|
|
564
616
|
/** The engine when one is provided and `enabled`; suspends while a loader resolves. */
|
|
565
617
|
function useOptionalWorkflowEngine(enabled = true) {
|
|
566
|
-
const source = useContext(
|
|
618
|
+
const source = useContext(EngineContext);
|
|
567
619
|
if (!enabled || !source) return;
|
|
568
620
|
return resolveEngine(source);
|
|
569
621
|
}
|
|
570
622
|
function useWorkflowEngine() {
|
|
571
|
-
const source = useContext(
|
|
623
|
+
const source = useContext(EngineContext);
|
|
572
624
|
if (!source) throw new Error("Workflow forms and graphs need a UIProvider with an engine.");
|
|
573
625
|
return resolveEngine(source);
|
|
574
626
|
}
|
|
575
627
|
/** The engine once it has loaded, without suspending; renders again when a loader resolves. */
|
|
576
628
|
function useLoadedWorkflowEngine() {
|
|
577
|
-
const source = useContext(
|
|
629
|
+
const source = useContext(EngineContext);
|
|
578
630
|
const [, setLoaded] = useState(0);
|
|
579
631
|
const entry = typeof source === "function" ? loadEngine(source) : void 0;
|
|
580
632
|
const engine = typeof source === "function" ? entry?.engine : source;
|
|
@@ -598,114 +650,71 @@ function useWorkflowEditing() {
|
|
|
598
650
|
}
|
|
599
651
|
/** Resolves the engine without suspending, for async callers such as editor completions. */
|
|
600
652
|
function useWorkflowEngineLoader() {
|
|
601
|
-
const source = useContext(
|
|
653
|
+
const source = useContext(EngineContext);
|
|
602
654
|
return useCallback(async () => {
|
|
603
655
|
if (!source) return;
|
|
604
656
|
return typeof source === "function" ? loadEngine(source).promise : source;
|
|
605
657
|
}, [source]);
|
|
606
658
|
}
|
|
607
659
|
function useProvisionCorsRules() {
|
|
608
|
-
return useContext(
|
|
660
|
+
return useContext(DataContext).provisionCorsRules;
|
|
609
661
|
}
|
|
610
662
|
function useRunFile(slug, path, options) {
|
|
611
|
-
const { useRunFile: boundUseRunFile } = useContext(
|
|
663
|
+
const { useRunFile: boundUseRunFile } = useContext(DataContext);
|
|
612
664
|
return boundUseRunFile(slug, path, options);
|
|
613
665
|
}
|
|
614
666
|
function usePersistedState(key, defaultValue) {
|
|
615
|
-
const { usePersistedState: boundUsePersistedState } = useContext(
|
|
667
|
+
const { usePersistedState: boundUsePersistedState } = useContext(DataContext);
|
|
616
668
|
return boundUsePersistedState(key, defaultValue);
|
|
617
669
|
}
|
|
618
|
-
function
|
|
670
|
+
function useByValue(value) {
|
|
671
|
+
const ref = useRef(value);
|
|
672
|
+
if (ref.current !== value && !dequal(ref.current, value)) ref.current = value;
|
|
673
|
+
return ref.current;
|
|
674
|
+
}
|
|
675
|
+
function useMerged(compute, input) {
|
|
676
|
+
const stableInput = useByValue(input);
|
|
677
|
+
const ref = useRef(null);
|
|
678
|
+
if (!ref.current || ref.current.input !== stableInput) ref.current = {
|
|
679
|
+
input: stableInput,
|
|
680
|
+
value: compute()
|
|
681
|
+
};
|
|
682
|
+
return ref.current.value;
|
|
683
|
+
}
|
|
684
|
+
function UIProvider({ strings, navigation, data, slots, engine: engineProp, children }) {
|
|
685
|
+
const [firstLoader] = useState(() => typeof engineProp === "function" ? engineProp : void 0);
|
|
686
|
+
const engine = typeof engineProp === "function" ? firstLoader ?? engineProp : engineProp;
|
|
619
687
|
useEffect(() => {
|
|
620
688
|
if (typeof engine === "function") loadEngine(engine);
|
|
621
689
|
}, [engine]);
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
...strings?.theme
|
|
651
|
-
},
|
|
652
|
-
logviewer: {
|
|
653
|
-
...DEFAULTS.strings.logviewer,
|
|
654
|
-
...strings?.logviewer
|
|
655
|
-
},
|
|
656
|
-
dag: {
|
|
657
|
-
...DEFAULTS.strings.dag,
|
|
658
|
-
...strings?.dag
|
|
659
|
-
},
|
|
660
|
-
jobActions: {
|
|
661
|
-
...DEFAULTS.strings.jobActions,
|
|
662
|
-
...strings?.jobActions
|
|
663
|
-
},
|
|
664
|
-
graphEditor: {
|
|
665
|
-
...DEFAULTS.strings.graphEditor,
|
|
666
|
-
...strings?.graphEditor
|
|
667
|
-
},
|
|
668
|
-
inputsEditor: {
|
|
669
|
-
...DEFAULTS.strings.inputsEditor,
|
|
670
|
-
...strings?.inputsEditor
|
|
671
|
-
},
|
|
672
|
-
fileExplorer: {
|
|
673
|
-
...DEFAULTS.strings.fileExplorer,
|
|
674
|
-
...strings?.fileExplorer
|
|
675
|
-
},
|
|
676
|
-
form: {
|
|
677
|
-
...DEFAULTS.strings.form,
|
|
678
|
-
...strings?.form
|
|
679
|
-
},
|
|
680
|
-
time: {
|
|
681
|
-
...DEFAULTS.strings.time,
|
|
682
|
-
...strings?.time
|
|
683
|
-
},
|
|
684
|
-
list: {
|
|
685
|
-
...DEFAULTS.strings.list,
|
|
686
|
-
...strings?.list
|
|
687
|
-
}
|
|
688
|
-
},
|
|
689
|
-
navigation: {
|
|
690
|
-
...DEFAULTS.navigation,
|
|
691
|
-
...navigation
|
|
692
|
-
},
|
|
693
|
-
data: {
|
|
694
|
-
...DEFAULTS.data,
|
|
695
|
-
...data
|
|
696
|
-
},
|
|
697
|
-
slots: slots ?? DEFAULTS.slots,
|
|
698
|
-
engine
|
|
699
|
-
}), [
|
|
700
|
-
strings,
|
|
701
|
-
navigation,
|
|
702
|
-
data,
|
|
703
|
-
slots,
|
|
704
|
-
engine
|
|
705
|
-
]);
|
|
706
|
-
return /* @__PURE__ */ jsxs(UIContext.Provider, {
|
|
707
|
-
value,
|
|
708
|
-
children: [/* @__PURE__ */ jsx(TooltipProvider, { children }), /* @__PURE__ */ jsx(Toaster, {})]
|
|
690
|
+
const mergedStrings = useMerged(() => mergeStrings(DEFAULTS.strings, strings), strings);
|
|
691
|
+
const mergedData = useMerged(() => ({
|
|
692
|
+
...DEFAULTS.data,
|
|
693
|
+
...data
|
|
694
|
+
}), data);
|
|
695
|
+
const stableSlots = useByValue(slots ?? DEFAULTS.slots);
|
|
696
|
+
const navigationRef = useRef(navigation);
|
|
697
|
+
navigationRef.current = navigation;
|
|
698
|
+
const [stableNavigation] = useState(() => ({
|
|
699
|
+
goTo: (to) => (navigationRef.current?.goTo ?? DEFAULTS.navigation.goTo)(to),
|
|
700
|
+
openStepSource: (uses, sourceUrl) => (navigationRef.current?.openStepSource ?? DEFAULTS.navigation.openStepSource)(uses, sourceUrl),
|
|
701
|
+
openExternal: (href) => (navigationRef.current?.openExternal ?? DEFAULTS.navigation.openExternal)(href)
|
|
702
|
+
}));
|
|
703
|
+
return /* @__PURE__ */ jsx(StringsContext, {
|
|
704
|
+
value: mergedStrings,
|
|
705
|
+
children: /* @__PURE__ */ jsx(NavigationContext, {
|
|
706
|
+
value: stableNavigation,
|
|
707
|
+
children: /* @__PURE__ */ jsx(DataContext, {
|
|
708
|
+
value: mergedData,
|
|
709
|
+
children: /* @__PURE__ */ jsx(SlotsContext, {
|
|
710
|
+
value: stableSlots,
|
|
711
|
+
children: /* @__PURE__ */ jsxs(EngineContext, {
|
|
712
|
+
value: engine,
|
|
713
|
+
children: [/* @__PURE__ */ jsx(TooltipProvider, { children }), /* @__PURE__ */ jsx(Toaster, {})]
|
|
714
|
+
})
|
|
715
|
+
})
|
|
716
|
+
})
|
|
717
|
+
})
|
|
709
718
|
});
|
|
710
719
|
}
|
|
711
720
|
//#endregion
|
package/dist/components/Radio.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
|
+
import { focusOutline } from "./fieldBox.js";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Radio } from "@base-ui/react/radio";
|
|
4
5
|
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
@@ -8,7 +9,7 @@ import { RadioGroup } from "@base-ui/react/radio-group";
|
|
|
8
9
|
function Radio$1({ className, ...props }) {
|
|
9
10
|
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
10
11
|
...props,
|
|
11
|
-
className: cx("flex size-4 shrink-0 items-center justify-center rounded-full border border-(--theme-border) bg-(--theme-input-bg) cursor-pointer
|
|
12
|
+
className: cx("flex size-4 shrink-0 items-center justify-center rounded-full border border-(--theme-border-strong) bg-(--theme-input-bg) cursor-pointer transition-colors motion-reduce:transition-none", focusOutline, "data-checked:border-(--theme-accent) data-checked:bg-(--theme-accent)", "aria-invalid:border-(--theme-error)", "data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
12
13
|
children: /* @__PURE__ */ jsx(Radio.Indicator, { className: "size-1.5 rounded-full bg-(--theme-accent-text)" })
|
|
13
14
|
});
|
|
14
15
|
}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
|
-
import { RefreshIcon } from "../icons.js";
|
|
3
2
|
import { buttonClasses } from "./buttonClasses.js";
|
|
3
|
+
import { RefreshIcon } from "../icons.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { useStrings } from "./Provider.js";
|
|
6
6
|
import { useRelativeTime } from "./relativeTime.js";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { useState } from "react";
|
|
9
9
|
//#region src/components/RefreshButton.tsx
|
|
10
10
|
/** Fetches again on demand, and says so while it does, out loud too. */
|
|
11
11
|
function RefreshButton({ onRefresh, refreshing = false, updatedAt, size = "md", iconOnly = false }) {
|
|
12
12
|
const { common: t } = useStrings();
|
|
13
13
|
const [pending, setPending] = useState(false);
|
|
14
|
-
const mounted = useRef(true);
|
|
15
|
-
useEffect(() => () => {
|
|
16
|
-
mounted.current = false;
|
|
17
|
-
}, []);
|
|
18
14
|
const busy = refreshing || pending;
|
|
19
15
|
const ago = useRelativeTime(updatedAt);
|
|
20
16
|
const refresh = () => {
|
|
@@ -22,7 +18,7 @@ function RefreshButton({ onRefresh, refreshing = false, updatedAt, size = "md",
|
|
|
22
18
|
const result = onRefresh();
|
|
23
19
|
if (result instanceof Promise) {
|
|
24
20
|
setPending(true);
|
|
25
|
-
result.finally(() =>
|
|
21
|
+
result.finally(() => setPending(false));
|
|
26
22
|
}
|
|
27
23
|
};
|
|
28
24
|
const button = /* @__PURE__ */ jsxs("button", {
|
|
@@ -38,7 +34,10 @@ function RefreshButton({ onRefresh, refreshing = false, updatedAt, size = "md",
|
|
|
38
34
|
children: [/* @__PURE__ */ jsx(RefreshIcon, {
|
|
39
35
|
"aria-hidden": "true",
|
|
40
36
|
className: cx("shrink-0 motion-reduce:animate-none motion-reduce:transition-none", busy ? "animate-spin" : "transition-transform duration-300 group-hover:rotate-180")
|
|
41
|
-
}), !iconOnly && (ago ?
|
|
37
|
+
}), !iconOnly && (ago ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("span", {
|
|
38
|
+
className: "sr-only",
|
|
39
|
+
children: [t.refresh, ". "]
|
|
40
|
+
}), t.updated(ago)] }) : t.refresh)]
|
|
42
41
|
});
|
|
43
42
|
return /* @__PURE__ */ jsxs(Fragment, { children: [iconOnly ? /* @__PURE__ */ jsx(Tooltip, {
|
|
44
43
|
content: t.refresh,
|
|
@@ -75,7 +75,7 @@ function Section({ title, description, beside, actions, variant = "plain", colla
|
|
|
75
75
|
children: /* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
76
76
|
...titleProps,
|
|
77
77
|
"aria-describedby": describedBy,
|
|
78
|
-
className: cx("group flex min-w-0 cursor-pointer items-center gap-1 text-left", fill && "w-full", titleClasses[variant], foldedTitleClasses[variant]),
|
|
78
|
+
className: cx("group flex min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-focus)", fill && "w-full", titleClasses[variant], foldedTitleClasses[variant]),
|
|
79
79
|
children: [/* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
80
80
|
"aria-hidden": "true",
|
|
81
81
|
className: cx("shrink-0 transition-transform group-data-panel-open:rotate-90 motion-reduce:transition-none", "px-1 text-[1.25rem]")
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { Select as BaseSelect } from '@base-ui/react/select';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import { type ComboboxItem } from './comboboxItems.js';
|
|
3
4
|
import { type FieldBoxSize } from './fieldBox.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
label: string;
|
|
7
|
-
/** A second line under the label, such as what an option does. */
|
|
8
|
-
description?: string | undefined;
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
disabled?: boolean | undefined;
|
|
11
|
-
}
|
|
5
|
+
/** An option of a Select: the same shape as a Combobox's, so a list moves between them as is. */
|
|
6
|
+
export type SelectItem<Value> = ComboboxItem<Value>;
|
|
12
7
|
export type SelectProps<Value, Multiple extends boolean | undefined = false> = Omit<BaseSelect.Root.Props<Value, Multiple>, 'items' | 'children'> & {
|
|
13
8
|
items: readonly SelectItem<Value>[];
|
|
14
9
|
placeholder?: string | undefined;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
2
|
import { CheckIcon, ChevronDownIcon } from "../icons.js";
|
|
3
|
-
import { panelClassName,
|
|
3
|
+
import { panelClassName, positionerClassName } from "./floating.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { fieldBox } from "./fieldBox.js";
|
|
6
|
+
import { pickerItemClassName } from "./comboboxItems.js";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { useId } from "react";
|
|
7
9
|
import { Select } from "@base-ui/react/select";
|
|
8
10
|
//#region src/components/Select.tsx
|
|
9
11
|
var triggerClassName = "flex cursor-pointer items-center justify-between gap-2 pr-1.5 text-left";
|
|
10
12
|
/** Picks one value, or several with `multiple`, from a short list. Use
|
|
11
13
|
* Combobox when the list is long enough to need filtering. */
|
|
12
14
|
function Select$1({ items, placeholder, className, "aria-label": ariaLabel, "aria-labelledby": labelledBy, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-required": required, trigger, triggerTooltip, size = "md", onItemHighlighted, ...rootProps }) {
|
|
15
|
+
const uid = useId();
|
|
13
16
|
const labelOf = (value) => items.find((item) => Object.is(item.value, value))?.label;
|
|
14
17
|
const triggerProps = {
|
|
15
18
|
"aria-label": ariaLabel,
|
|
@@ -50,26 +53,36 @@ function Select$1({ items, placeholder, className, "aria-label": ariaLabel, "ari
|
|
|
50
53
|
className: cx("min-w-(--anchor-width) max-w-[min(20rem,var(--available-width))]", panelClassName),
|
|
51
54
|
children: /* @__PURE__ */ jsx(Select.List, {
|
|
52
55
|
className: "max-h-[min(15rem,var(--available-height))] overflow-y-auto py-1",
|
|
53
|
-
children: items.map((item) => /* @__PURE__ */ jsxs(Select.Item, {
|
|
56
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxs(Select.Item, {
|
|
54
57
|
value: item.value,
|
|
55
58
|
disabled: item.disabled,
|
|
59
|
+
"aria-labelledby": `${uid}${index}label`,
|
|
60
|
+
"aria-describedby": item.description && `${uid}${index}description`,
|
|
56
61
|
onFocus: onItemHighlighted && (() => onItemHighlighted(item.value)),
|
|
57
|
-
className:
|
|
62
|
+
className: pickerItemClassName,
|
|
58
63
|
children: [
|
|
59
|
-
/* @__PURE__ */ jsx(
|
|
60
|
-
className: "
|
|
61
|
-
children:
|
|
64
|
+
item.icon && /* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: "flex shrink-0 items-center",
|
|
66
|
+
children: item.icon
|
|
62
67
|
}),
|
|
63
68
|
/* @__PURE__ */ jsxs("span", {
|
|
64
|
-
className: "
|
|
65
|
-
children: [
|
|
69
|
+
className: "flex min-w-0 flex-col",
|
|
70
|
+
children: [/* @__PURE__ */ jsx(Select.ItemText, {
|
|
71
|
+
id: `${uid}${index}label`,
|
|
66
72
|
className: "truncate",
|
|
67
73
|
children: item.label
|
|
74
|
+
}), item.description && /* @__PURE__ */ jsx("span", {
|
|
75
|
+
id: `${uid}${index}description`,
|
|
76
|
+
className: "text-xs leading-snug text-(--theme-muted-text-color)",
|
|
77
|
+
children: item.description
|
|
68
78
|
})]
|
|
69
79
|
}),
|
|
70
|
-
|
|
71
|
-
className: "
|
|
72
|
-
children:
|
|
80
|
+
/* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
81
|
+
className: "ml-auto flex shrink-0 items-center",
|
|
82
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
className: "size-3.5"
|
|
85
|
+
})
|
|
73
86
|
})
|
|
74
87
|
]
|
|
75
88
|
}, String(item.value)))
|