@parallelworks/ui 0.43.0 → 0.45.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 +348 -25
- package/dist/ai/agent/diff.d.ts +2 -1
- package/dist/ai/agent/diff.js +4 -12
- package/dist/ai/agent/diffHighlight.d.ts +1 -1
- package/dist/ai/agent/diffHighlight.js +4 -3
- package/dist/ai/agent/index.d.ts +2 -1
- package/dist/ai/agent/toolStrings.d.ts +37 -0
- package/dist/ai/agent/toolStrings.js +35 -0
- package/dist/ai/agent/toolfmt.d.ts +8 -3
- package/dist/ai/agent/toolfmt.js +50 -65
- package/dist/ai/ai.css +18 -31
- package/dist/ai/components/AllocationSelector.js +2 -2
- package/dist/ai/components/AttachmentManager.js +28 -29
- package/dist/ai/components/AttachmentUpload.js +25 -30
- package/dist/ai/components/BlockedGroupBanner.js +2 -2
- package/dist/ai/components/BranchNavigator.js +3 -4
- package/dist/ai/components/ChatEmptyState.js +8 -7
- package/dist/ai/components/ChatInput.js +10 -12
- package/dist/ai/components/ChatLayout.js +3 -3
- package/dist/ai/components/ChatMessage.js +49 -61
- package/dist/ai/components/ChatMessageList.js +46 -42
- package/dist/ai/components/ChatSidebar.js +26 -34
- package/dist/ai/components/ChatStage.js +1 -1
- package/dist/ai/components/ComposerChrome.js +3 -4
- package/dist/ai/components/DragOverlay.js +6 -4
- package/dist/ai/components/ModelSelector.js +14 -15
- package/dist/ai/components/PastedText.js +18 -14
- package/dist/ai/components/ProviderIssueBanner.js +3 -4
- package/dist/ai/components/Reasoning.d.ts +12 -6
- package/dist/ai/components/Reasoning.js +31 -18
- package/dist/ai/components/ShareDialog.js +25 -28
- package/dist/ai/components/SlashMenu.js +3 -3
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -5
- package/dist/ai/components/agent/ActivityLine.js +17 -54
- package/dist/ai/components/agent/AgentMessageParts.js +139 -149
- package/dist/ai/components/conversationActions.js +16 -16
- package/dist/ai/core/ChatProvider.d.ts +2 -4
- package/dist/ai/core/ChatProvider.js +25 -38
- package/dist/ai/core/exportConversation.js +4 -4
- package/dist/ai/core/sidebarState.d.ts +8 -6
- package/dist/ai/core/sidebarState.js +21 -28
- package/dist/ai/core/useKeyboardShortcuts.js +14 -5
- package/dist/ai/index.d.ts +4 -5
- package/dist/ai/index.js +7 -7
- package/dist/ai/strings.d.ts +14 -31
- package/dist/ai/strings.js +19 -39
- package/dist/ai/types.d.ts +0 -5
- package/dist/ai/ui/ConversationSidebar.d.ts +12 -9
- package/dist/ai/ui/ConversationSidebar.js +43 -87
- package/dist/ai/ui/Markdown.d.ts +3 -6
- package/dist/ai/ui/Markdown.js +6 -73
- package/dist/ai/ui/Notice.js +10 -12
- package/dist/ai/ui/chip.d.ts +2 -2
- package/dist/ai/ui/chip.js +1 -1
- package/dist/ai/ui/sidebar.d.ts +4 -20
- package/dist/ai/ui/sidebar.js +30 -67
- package/dist/ai/utils.d.ts +0 -1
- package/dist/ai/utils.js +1 -14
- package/dist/brandIcons.d.ts +51 -0
- package/dist/brandIcons.js +75 -0
- package/dist/components/Avatar.d.ts +3 -1
- package/dist/components/Avatar.js +34 -28
- package/dist/components/Button.d.ts +12 -7
- package/dist/components/Button.js +39 -44
- package/dist/components/Callout.js +18 -12
- package/dist/components/Card.d.ts +18 -8
- package/dist/components/Card.js +17 -6
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox.js +30 -0
- package/dist/components/Combobox.d.ts +9 -1
- package/dist/components/Combobox.js +71 -44
- package/dist/components/ConfirmModal.js +11 -11
- package/dist/components/ContextMenu.d.ts +2 -8
- package/dist/components/ContextMenu.js +2 -29
- package/dist/components/CopyToClipboard.js +17 -36
- package/dist/components/CreateModal.d.ts +3 -24
- package/dist/components/CreateModal.js +46 -113
- package/dist/components/DatePicker.d.ts +31 -0
- package/dist/components/DatePicker.js +191 -0
- package/dist/components/DescriptionList.js +4 -4
- package/dist/components/Disclosure.d.ts +34 -0
- package/dist/components/Disclosure.js +46 -0
- package/dist/components/Drawer.d.ts +47 -0
- package/dist/components/Drawer.js +120 -0
- package/dist/components/EmptyState.d.ts +15 -10
- package/dist/components/EmptyState.js +13 -8
- package/dist/components/ExternalLink.d.ts +8 -0
- package/dist/components/ExternalLink.js +29 -0
- package/dist/components/Field.d.ts +70 -0
- package/dist/components/Field.js +159 -0
- package/dist/components/HoverCard.js +11 -14
- package/dist/components/IconButton.d.ts +16 -13
- package/dist/components/IconButton.js +27 -18
- package/dist/components/InfoTip.js +16 -23
- package/dist/components/Input.d.ts +10 -9
- package/dist/components/Input.js +54 -96
- package/dist/components/LetterBadge.js +2 -2
- package/dist/components/Loader.d.ts +15 -8
- package/dist/components/Loader.js +29 -19
- package/dist/components/Markdown.d.ts +7 -1
- package/dist/components/Markdown.js +2 -0
- package/dist/components/MarkdownImpl.d.ts +1 -1
- package/dist/components/MarkdownImpl.js +55 -14
- package/dist/components/Menu.js +13 -15
- package/dist/components/MenuEntries.js +11 -16
- package/dist/components/Meter.d.ts +48 -0
- package/dist/components/Meter.js +94 -0
- package/dist/components/Modal.js +11 -14
- package/dist/components/NumberInput.d.ts +25 -0
- package/dist/components/NumberInput.js +55 -0
- package/dist/components/Overview.js +12 -10
- package/dist/components/PageHeader.d.ts +2 -3
- package/dist/components/PageHeader.js +30 -21
- package/dist/components/Pagination.d.ts +27 -14
- package/dist/components/Pagination.js +86 -25
- package/dist/components/Popover.d.ts +47 -0
- package/dist/components/Popover.js +63 -0
- package/dist/components/Provider.d.ts +197 -80
- package/dist/components/Provider.js +200 -118
- package/dist/components/Radio.d.ts +1 -1
- package/dist/components/Radio.js +4 -4
- package/dist/components/RefreshButton.d.ts +15 -0
- package/dist/components/RefreshButton.js +53 -0
- package/dist/components/RunStatusIcon.d.ts +12 -0
- package/dist/components/RunStatusIcon.js +84 -0
- package/dist/components/SearchInput.d.ts +16 -0
- package/dist/components/SearchInput.js +52 -0
- package/dist/components/Section.d.ts +28 -0
- package/dist/components/Section.js +76 -0
- package/dist/components/SegmentedControl.d.ts +7 -11
- package/dist/components/SegmentedControl.js +25 -56
- package/dist/components/Select.d.ts +8 -1
- package/dist/components/Select.js +47 -43
- package/dist/components/SettingModeOption.d.ts +3 -5
- package/dist/components/SettingModeOption.js +5 -6
- package/dist/components/SettingsCard.d.ts +32 -19
- package/dist/components/SettingsCard.js +40 -13
- package/dist/components/Skeleton.d.ts +22 -0
- package/dist/components/Skeleton.js +34 -0
- package/dist/components/Slider.d.ts +16 -0
- package/dist/components/Slider.js +30 -0
- package/dist/components/Sort.js +4 -6
- package/dist/components/StatusBadge.d.ts +3 -1
- package/dist/components/StatusBadge.js +9 -32
- package/dist/components/StatusIcons.d.ts +0 -4
- package/dist/components/StatusIcons.js +5 -13
- package/dist/components/Switch.d.ts +5 -1
- package/dist/components/Switch.js +23 -6
- package/dist/components/Table.js +13 -20
- package/dist/components/Tabs.d.ts +52 -0
- package/dist/components/Tabs.js +75 -0
- package/dist/components/ThemeEditor.d.ts +29 -0
- package/dist/components/ThemeEditor.js +397 -0
- package/dist/components/Toast.d.ts +57 -0
- package/dist/components/Toast.js +203 -0
- package/dist/components/Tooltip.js +12 -15
- package/dist/components/buttonClasses.d.ts +18 -0
- package/dist/components/buttonClasses.js +31 -0
- package/dist/components/codeTheme.d.ts +5 -0
- package/dist/components/codeTheme.js +93 -0
- package/dist/components/fieldBox.d.ts +14 -0
- package/dist/components/fieldBox.js +29 -0
- package/dist/components/floating.d.ts +26 -5
- package/dist/components/floating.js +31 -9
- package/dist/{ai/ui/codeBreaks.js → components/markdownCodeBreaks.js} +1 -1
- package/dist/components/persistedState.d.ts +2 -0
- package/dist/components/persistedState.js +63 -0
- package/dist/components/relativeTime.d.ts +36 -8
- package/dist/components/relativeTime.js +106 -23
- package/dist/components/segmented.d.ts +17 -0
- package/dist/components/segmented.js +27 -0
- package/dist/components/shortcutKey.d.ts +4 -0
- package/dist/components/shortcutKey.js +27 -0
- package/dist/components/splitter.d.ts +26 -0
- package/dist/components/splitter.js +69 -0
- package/dist/components/tone.d.ts +9 -0
- package/dist/components/tone.js +30 -0
- package/dist/components/useCopy.d.ts +14 -0
- package/dist/components/useCopy.js +31 -0
- package/dist/components/useCssIsDark.d.ts +2 -0
- package/dist/components/useCssIsDark.js +2 -1
- package/dist/components/useTheme.d.ts +10 -0
- package/dist/components/useTheme.js +40 -0
- package/dist/cx.d.ts +5 -0
- package/dist/cx.js +11 -0
- package/dist/editor/Editor.js +2 -2
- package/dist/editor/EditorField.js +7 -10
- package/dist/editor/FormCodePanel.js +10 -23
- package/dist/editor/Monaco.js +7 -4
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +2 -2
- package/dist/editor/themes.d.ts +4 -0
- package/dist/editor/themes.js +75 -76
- package/dist/file-explorer/FileExplorer.js +180 -187
- package/dist/file-explorer/FileExplorerContext.js +36 -58
- package/dist/file-explorer/FilePreview/CodePreviewEditor.js +2 -1
- package/dist/file-explorer/FilePreview/Inline.js +9 -7
- package/dist/file-explorer/FilePreview/StreamedBadge.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +32 -34
- package/dist/file-explorer/FilePreview/index.js +60 -92
- package/dist/file-explorer/FileRow.js +10 -15
- package/dist/file-explorer/FileRowsWindow.js +2 -6
- package/dist/file-explorer/FileTable.js +2 -2
- package/dist/file-explorer/FileTableHeaders.js +8 -11
- package/dist/file-explorer/LoadMoreRow.js +8 -9
- package/dist/file-explorer/TreeView.js +16 -16
- package/dist/file-explorer/helpers.d.ts +1 -4
- package/dist/file-explorer/helpers.js +101 -114
- package/dist/file-explorer/lib/utils.d.ts +0 -2
- package/dist/file-explorer/lib/utils.js +1 -25
- package/dist/file-explorer/toasts.js +104 -185
- package/dist/form/Fields/BooleanField.js +12 -14
- package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
- package/dist/form/Fields/CheckboxGroupField.js +16 -18
- package/dist/form/Fields/ColorField.js +11 -11
- package/dist/form/Fields/DropdownField.d.ts +1 -1
- package/dist/form/Fields/DropdownField.js +20 -36
- package/dist/form/Fields/DurationField.d.ts +1 -1
- package/dist/form/Fields/DurationField.js +36 -50
- package/dist/form/Fields/LabelField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.d.ts +1 -1
- package/dist/form/Fields/MultiDropdownField.js +9 -14
- package/dist/form/Fields/NumberField.d.ts +1 -1
- package/dist/form/Fields/NumberField.js +13 -48
- package/dist/form/Fields/ObjectField.js +3 -3
- package/dist/form/Fields/RadioField.d.ts +1 -1
- package/dist/form/Fields/RadioField.js +15 -18
- package/dist/form/Fields/RangeField.js +34 -35
- package/dist/form/Fields/StringField.d.ts +1 -1
- package/dist/form/Fields/StringField.js +15 -25
- package/dist/form/Fields/TextAreaField.js +10 -15
- package/dist/form/Form.d.ts +7 -2
- package/dist/form/Form.js +144 -49
- package/dist/form/FormLayout.js +18 -12
- package/dist/form/Wizard/WizardContainer.js +44 -18
- package/dist/form/Wizard/WizardNavigation.d.ts +1 -1
- package/dist/form/Wizard/WizardNavigation.js +31 -56
- package/dist/form/Wizard/WizardStepIndicator.d.ts +3 -0
- package/dist/form/Wizard/WizardStepIndicator.js +98 -114
- package/dist/form/Wizard/types.d.ts +2 -2
- package/dist/form/fieldFrame.d.ts +7 -0
- package/dist/form/fieldFrame.js +19 -0
- package/dist/form/index.d.ts +5 -5
- package/dist/form/index.js +4 -6
- package/dist/form/layoutCSS.js +5 -4
- package/dist/form/types/fieldComponentTypes.d.ts +5 -3
- package/dist/form/useChoiceField.js +2 -3
- package/dist/form/useFieldValue.d.ts +3 -0
- package/dist/form/useFieldValue.js +24 -7
- package/dist/form/utils/duration.d.ts +2 -2
- package/dist/form/utils/duration.js +3 -3
- package/dist/form/utils/fieldPath.d.ts +5 -3
- package/dist/form/utils/fieldPath.js +18 -3
- package/dist/form/utils/secondaryField.d.ts +0 -7
- package/dist/form/utils/secondaryField.js +1 -12
- package/dist/form/validation.d.ts +29 -0
- package/dist/form/validation.js +14 -0
- package/dist/format.d.ts +28 -0
- package/dist/format.js +64 -0
- package/dist/graph/AnnotationBanner.js +20 -31
- package/dist/graph/Connectors.js +1 -1
- package/dist/graph/DependencyGraph.js +51 -65
- package/dist/graph/GraphEditor.js +24 -28
- package/dist/graph/GraphEditorDialogs.js +239 -245
- package/dist/graph/InputDialog.js +93 -112
- package/dist/graph/InputsEditor.js +83 -84
- package/dist/graph/JobSummary.js +10 -11
- package/dist/graph/MatrixGroup.js +3 -3
- package/dist/graph/ProblemsButton.js +9 -10
- package/dist/graph/ShortcutsButton.js +12 -17
- package/dist/graph/SuggestionInput.d.ts +1 -2
- package/dist/graph/SuggestionInput.js +1 -3
- package/dist/graph/TreeView.js +47 -45
- package/dist/graph/WorkflowSettingsDialog.js +97 -102
- package/dist/graph/editorChrome.js +10 -12
- package/dist/graph/editorFields.d.ts +19 -16
- package/dist/graph/editorFields.js +97 -135
- package/dist/graph/editorPrimitives.js +2 -2
- package/dist/graph/editorRows.js +22 -25
- package/dist/graph/editorStrings.d.ts +16 -19
- package/dist/graph/editorStrings.js +11 -23
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/graphEditorState.d.ts +4 -4
- package/dist/graph/inputRefs.d.ts +0 -13
- package/dist/graph/inputRefs.js +121 -159
- package/dist/graph/settingsViews.js +5 -3
- package/dist/graph/stepWith.js +100 -100
- package/dist/graph/toolbarPanel.d.ts +8 -0
- package/dist/graph/toolbarPanel.js +11 -0
- package/dist/icons.d.ts +234 -23
- package/dist/icons.js +249 -264
- package/dist/index.d.ts +38 -21
- package/dist/index.js +42 -21
- package/dist/list/ActionToolbar.d.ts +1 -5
- package/dist/list/ActionToolbar.js +21 -20
- package/dist/list/ListPage.js +7 -7
- package/dist/list/ListTable.d.ts +3 -2
- package/dist/list/ListTable.js +33 -29
- package/dist/list/ListViewControls.d.ts +0 -17
- package/dist/list/ListViewControls.js +50 -118
- package/dist/list/UserHoverCard.js +24 -32
- package/dist/list/index.d.ts +2 -4
- package/dist/list/index.js +3 -5
- package/dist/list/listSearch.d.ts +1 -1
- package/dist/list/listSearch.js +19 -14
- package/dist/list/rowMenu.js +20 -26
- package/dist/logviewer/LogViewer.js +268 -382
- package/dist/logviewer/logviewer.css +53 -41
- package/dist/styles/base.css +16 -40
- package/dist/styles/theme.css +75 -106
- package/dist/styles.css +1 -1
- package/dist/theme/color.d.ts +40 -0
- package/dist/theme/color.js +228 -0
- package/dist/theme/contrast.d.ts +42 -0
- package/dist/theme/contrast.js +145 -0
- package/dist/theme/derive.d.ts +25 -0
- package/dist/theme/derive.js +475 -0
- package/dist/theme/fit.d.ts +35 -0
- package/dist/theme/fit.js +185 -0
- package/dist/theme/index.d.ts +14 -29
- package/dist/theme/index.js +20 -279
- package/dist/theme/model.d.ts +64 -0
- package/dist/theme/model.js +219 -0
- package/package.json +9 -5
- package/dist/ai/ui/Avatar.d.ts +0 -7
- package/dist/ai/ui/Avatar.js +0 -24
- package/dist/components/Filter.d.ts +0 -15
- package/dist/components/Filter.js +0 -32
- package/dist/components/FilterPill.d.ts +0 -7
- package/dist/components/FilterPill.js +0 -14
- package/dist/components/Indicator.d.ts +0 -4
- package/dist/components/Indicator.js +0 -44
- package/dist/components/SectionHeader.d.ts +0 -8
- package/dist/components/SectionHeader.js +0 -11
- package/dist/components/SettingRow.d.ts +0 -18
- package/dist/components/SettingRow.js +0 -35
- package/dist/components/SettingsGroup.d.ts +0 -8
- package/dist/components/SettingsGroup.js +0 -17
- package/dist/components/ghostButton.d.ts +0 -4
- package/dist/components/ghostButton.js +0 -7
- package/dist/components/inputClasses.d.ts +0 -1
- package/dist/components/inputClasses.js +0 -4
- package/dist/duration.d.ts +0 -3
- package/dist/duration.js +0 -17
- package/dist/form/FieldGroup.d.ts +0 -11
- package/dist/form/FieldGroup.js +0 -36
- package/dist/form/FieldWrapper.d.ts +0 -16
- package/dist/form/FieldWrapper.js +0 -55
- package/dist/form/fieldContext.d.ts +0 -19
- package/dist/form/fieldContext.js +0 -26
- package/dist/graph/Collapse.d.ts +0 -7
- package/dist/graph/Collapse.js +0 -15
- package/dist/graph/ToolbarPopover.d.ts +0 -13
- package/dist/graph/ToolbarPopover.js +0 -39
- package/dist/icons/ai/AiOutlineRollback.js +0 -16
- package/dist/icons/bi/BiBell.js +0 -16
- package/dist/icons/bi/BiBellOff.js +0 -16
- package/dist/icons/bi/BiBuildings.js +0 -20
- package/dist/icons/bi/BiError.js +0 -20
- package/dist/icons/bi/BiExpandVertical.js +0 -16
- package/dist/icons/bi/BiPause.js +0 -16
- package/dist/icons/bi/BiPlay.js +0 -16
- package/dist/icons/bi/BiRedo.js +0 -16
- package/dist/icons/bi/BiSolidCheckShield.js +0 -16
- package/dist/icons/bi/BiSolidTrashAlt.js +0 -16
- package/dist/icons/bi/BiStop.js +0 -16
- package/dist/icons/bi/BiUndo.js +0 -16
- package/dist/icons/bs/BsArrowsCollapse.js +0 -22
- package/dist/icons/bs/BsBank2.js +0 -19
- package/dist/icons/bs/BsBriefcase.js +0 -19
- package/dist/icons/bs/BsBucket.js +0 -19
- package/dist/icons/bs/BsCalendarX.js +0 -23
- package/dist/icons/bs/BsChatLeft.js +0 -19
- package/dist/icons/bs/BsChevronDoubleDown.js +0 -29
- package/dist/icons/bs/BsChevronDoubleUp.js +0 -29
- package/dist/icons/bs/BsClipboardCheck.js +0 -34
- package/dist/icons/bs/BsCurrencyDollar.js +0 -19
- package/dist/icons/bs/BsDash.js +0 -19
- package/dist/icons/bs/BsFileEarmarkZip.js +0 -23
- package/dist/icons/bs/BsFiles.js +0 -19
- package/dist/icons/bs/BsGeoAlt.js +0 -23
- package/dist/icons/bs/BsGrid.js +0 -19
- package/dist/icons/bs/BsLayers.js +0 -19
- package/dist/icons/bs/BsLayoutThreeColumns.js +0 -19
- package/dist/icons/bs/BsListUl.js +0 -22
- package/dist/icons/bs/BsMortarboard.js +0 -23
- package/dist/icons/bs/BsMusicNoteBeamed.js +0 -34
- package/dist/icons/bs/BsOpenai.js +0 -19
- package/dist/icons/bs/BsPersonPlus.js +0 -26
- package/dist/icons/bs/BsSearch.js +0 -19
- package/dist/icons/bs/BsSend.js +0 -19
- package/dist/icons/bs/BsShieldSlash.js +0 -22
- package/dist/icons/bs/BsStar.js +0 -19
- package/dist/icons/bs/BsStarFill.js +0 -19
- package/dist/icons/bs/BsStopCircle.js +0 -23
- package/dist/icons/bs/BsTag.js +0 -23
- package/dist/icons/bs/BsTelephone.js +0 -19
- package/dist/icons/bs/BsTerminal.js +0 -23
- package/dist/icons/bs/BsTerminalFill.js +0 -19
- package/dist/icons/bs/BsThreeDots.js +0 -19
- package/dist/icons/bs/BsThreeDotsVertical.js +0 -19
- package/dist/icons/bs/BsZoomIn.js +0 -37
- package/dist/icons/fa/FaAmazon.js +0 -16
- package/dist/icons/fa/FaAngleDown.js +0 -16
- package/dist/icons/fa/FaAngleLeft.js +0 -16
- package/dist/icons/fa/FaAngleRight.js +0 -16
- package/dist/icons/fa/FaAngleUp.js +0 -16
- package/dist/icons/fa/FaArrowDown.js +0 -16
- package/dist/icons/fa/FaArrowLeft.js +0 -16
- package/dist/icons/fa/FaArrowRight.js +0 -16
- package/dist/icons/fa/FaArrowUp.js +0 -16
- package/dist/icons/fa/FaBalanceScale.js +0 -16
- package/dist/icons/fa/FaCaretDown.js +0 -16
- package/dist/icons/fa/FaCentos.js +0 -16
- package/dist/icons/fa/FaChartLine.js +0 -16
- package/dist/icons/fa/FaChartPie.js +0 -16
- package/dist/icons/fa/FaCheck.js +0 -16
- package/dist/icons/fa/FaChevronDown.js +0 -16
- package/dist/icons/fa/FaChevronUp.js +0 -16
- package/dist/icons/fa/FaChrome.js +0 -16
- package/dist/icons/fa/FaCircleNotch.js +0 -16
- package/dist/icons/fa/FaCloud.js +0 -16
- package/dist/icons/fa/FaCloudDownloadAlt.js +0 -16
- package/dist/icons/fa/FaCog.js +0 -16
- package/dist/icons/fa/FaCogs.js +0 -16
- package/dist/icons/fa/FaComments.js +0 -16
- package/dist/icons/fa/FaCompress.js +0 -16
- package/dist/icons/fa/FaDesktop.js +0 -16
- package/dist/icons/fa/FaDocker.js +0 -16
- package/dist/icons/fa/FaDollarSign.js +0 -16
- package/dist/icons/fa/FaEdge.js +0 -16
- package/dist/icons/fa/FaEdit.js +0 -16
- package/dist/icons/fa/FaExclamationTriangle.js +0 -16
- package/dist/icons/fa/FaExpand.js +0 -16
- package/dist/icons/fa/FaEye.js +0 -16
- package/dist/icons/fa/FaEyeSlash.js +0 -16
- package/dist/icons/fa/FaFile.js +0 -16
- package/dist/icons/fa/FaFilePdf.js +0 -16
- package/dist/icons/fa/FaFilter.js +0 -16
- package/dist/icons/fa/FaFirefoxBrowser.js +0 -16
- package/dist/icons/fa/FaFlask.js +0 -16
- package/dist/icons/fa/FaFolder.js +0 -16
- package/dist/icons/fa/FaGithub.js +0 -16
- package/dist/icons/fa/FaGitlab.js +0 -16
- package/dist/icons/fa/FaGlobe.js +0 -16
- package/dist/icons/fa/FaGlobeAmericas.js +0 -16
- package/dist/icons/fa/FaImage.js +0 -16
- package/dist/icons/fa/FaInfoCircle.js +0 -16
- package/dist/icons/fa/FaKey.js +0 -16
- package/dist/icons/fa/FaLayerGroup.js +0 -16
- package/dist/icons/fa/FaLink.js +0 -16
- package/dist/icons/fa/FaLinkedin.js +0 -16
- package/dist/icons/fa/FaLinux.js +0 -16
- package/dist/icons/fa/FaList.js +0 -16
- package/dist/icons/fa/FaLock.js +0 -16
- package/dist/icons/fa/FaOpenid.js +0 -16
- package/dist/icons/fa/FaOpera.js +0 -16
- package/dist/icons/fa/FaPaperclip.js +0 -16
- package/dist/icons/fa/FaPlus.js +0 -16
- package/dist/icons/fa/FaPowerOff.js +0 -16
- package/dist/icons/fa/FaPrint.js +0 -16
- package/dist/icons/fa/FaQrcode.js +0 -16
- package/dist/icons/fa/FaQuestionCircle.js +0 -16
- package/dist/icons/fa/FaRedhat.js +0 -16
- package/dist/icons/fa/FaRegCircle.js +0 -16
- package/dist/icons/fa/FaRegFileImage.js +0 -16
- package/dist/icons/fa/FaRegFolder.js +0 -16
- package/dist/icons/fa/FaRobot.js +0 -16
- package/dist/icons/fa/FaRocket.js +0 -16
- package/dist/icons/fa/FaRunning.js +0 -16
- package/dist/icons/fa/FaSafari.js +0 -16
- package/dist/icons/fa/FaSave.js +0 -16
- package/dist/icons/fa/FaSearch.js +0 -16
- package/dist/icons/fa/FaShieldAlt.js +0 -16
- package/dist/icons/fa/FaSlack.js +0 -16
- package/dist/icons/fa/FaStar.js +0 -16
- package/dist/icons/fa/FaStop.js +0 -16
- package/dist/icons/fa/FaSuse.js +0 -16
- package/dist/icons/fa/FaTerminal.js +0 -16
- package/dist/icons/fa/FaTimes.js +0 -16
- package/dist/icons/fa/FaUbuntu.js +0 -16
- package/dist/icons/fa/FaUndoAlt.js +0 -16
- package/dist/icons/fa/FaUnlink.js +0 -16
- package/dist/icons/fa/FaUser.js +0 -16
- package/dist/icons/fa/FaUsers.js +0 -16
- package/dist/icons/fa/FaWindows.js +0 -16
- package/dist/icons/fa6/FaApple.js +0 -16
- package/dist/icons/fa6/FaArrowsRotate.js +0 -16
- package/dist/icons/fa6/FaDebian.js +0 -16
- package/dist/icons/fa6/FaFilterCircleXmark.js +0 -16
- package/dist/icons/fa6/FaInbox.js +0 -16
- package/dist/icons/fa6/FaLocationDot.js +0 -16
- package/dist/icons/fa6/FaRegFilePdf.js +0 -16
- package/dist/icons/fa6/FaRegFolderOpen.js +0 -16
- package/dist/icons/fa6/FaUpRightFromSquare.js +0 -16
- package/dist/icons/fa6/FaWandMagicSparkles.js +0 -16
- package/dist/icons/fa6/FaXTwitter.js +0 -16
- package/dist/icons/fi/FiActivity.js +0 -23
- package/dist/icons/fi/FiAlertCircle.js +0 -49
- package/dist/icons/fi/FiChevronDown.js +0 -23
- package/dist/icons/fi/FiClock.js +0 -31
- package/dist/icons/fi/FiCopy.js +0 -34
- package/dist/icons/fi/FiDownload.js +0 -40
- package/dist/icons/fi/FiFile.js +0 -27
- package/dist/icons/fi/FiFileText.js +0 -55
- package/dist/icons/fi/FiHardDrive.js +0 -55
- package/dist/icons/fi/FiRotateCcw.js +0 -27
- package/dist/icons/fi/FiUpload.js +0 -40
- package/dist/icons/fi/FiX.js +0 -37
- package/dist/icons/fi/FiZap.js +0 -23
- package/dist/icons/gi/GiSpy.js +0 -16
- package/dist/icons/go/GoGitCommit.js +0 -16
- package/dist/icons/go/GoGitPullRequest.js +0 -20
- package/dist/icons/go/GoIssueOpened.js +0 -16
- package/dist/icons/go/GoPlus.js +0 -16
- package/dist/icons/go/GoRepoForked.js +0 -28
- package/dist/icons/go/GoSignOut.js +0 -16
- package/dist/icons/go/GoSkip.js +0 -20
- package/dist/icons/go/GoVideo.js +0 -20
- package/dist/icons/gr/GrCloudComputer.js +0 -20
- package/dist/icons/gr/GrInbox.js +0 -20
- package/dist/icons/gr/GrServerCluster.js +0 -20
- package/dist/icons/gr/GrStorage.js +0 -20
- package/dist/icons/gr/GrTasks.js +0 -20
- package/dist/icons/hi/HiCog.js +0 -24
- package/dist/icons/hi/HiDuplicate.js +0 -24
- package/dist/icons/hi/HiOutlineArchive.js +0 -26
- package/dist/icons/hi/HiOutlineClipboardCopy.js +0 -26
- package/dist/icons/hi/HiOutlineHome.js +0 -26
- package/dist/icons/hi/HiQuestionMarkCircle.js +0 -24
- package/dist/icons/hi/HiServer.js +0 -24
- package/dist/icons/hi2/HiMiniCheckCircle.js +0 -24
- package/dist/icons/hi2/HiMiniLanguage.js +0 -28
- package/dist/icons/hi2/HiMiniMinusCircle.js +0 -24
- package/dist/icons/hi2/HiMiniXCircle.js +0 -24
- package/dist/icons/hi2/HiSparkles.js +0 -24
- package/dist/icons/im/ImSpinner5.js +0 -19
- package/dist/icons/io/IoIosNotifications.js +0 -16
- package/dist/icons/io/IoMdBuild.js +0 -16
- package/dist/icons/io/IoMdClose.js +0 -16
- package/dist/icons/io5/IoCloudUploadOutline.js +0 -32
- package/dist/icons/io5/IoDocumentTextOutline.js +0 -31
- package/dist/icons/io5/IoFileTrayFullOutline.js +0 -31
- package/dist/icons/io5/IoHeart.js +0 -16
- package/dist/icons/io5/IoHeartDislike.js +0 -16
- package/dist/icons/io5/IoHeartOutline.js +0 -22
- package/dist/icons/io5/IoInformationCircleOutline.js +0 -50
- package/dist/icons/io5/IoSettingsOutline.js +0 -22
- package/dist/icons/io5/IoWarningOutline.js +0 -40
- package/dist/icons/lu/LuArrowRight.js +0 -27
- package/dist/icons/lu/LuBadgeCheck.js +0 -27
- package/dist/icons/lu/LuBraces.js +0 -27
- package/dist/icons/lu/LuBrainCircuit.js +0 -101
- package/dist/icons/lu/LuCalendar.js +0 -46
- package/dist/icons/lu/LuCheck.js +0 -23
- package/dist/icons/lu/LuChevronLeft.js +0 -23
- package/dist/icons/lu/LuChevronRight.js +0 -23
- package/dist/icons/lu/LuCode.js +0 -27
- package/dist/icons/lu/LuExternalLink.js +0 -35
- package/dist/icons/lu/LuEye.js +0 -31
- package/dist/icons/lu/LuEyeOff.js +0 -40
- package/dist/icons/lu/LuFolderTree.js +0 -40
- package/dist/icons/lu/LuIdCard.js +0 -55
- package/dist/icons/lu/LuKeyboard.js +0 -71
- package/dist/icons/lu/LuLogs.js +0 -65
- package/dist/icons/lu/LuMail.js +0 -33
- package/dist/icons/lu/LuMegaphone.js +0 -27
- package/dist/icons/lu/LuMoon.js +0 -23
- package/dist/icons/lu/LuNetwork.js +0 -63
- package/dist/icons/lu/LuPartyPopper.js +0 -65
- package/dist/icons/lu/LuSettings2.js +0 -48
- package/dist/icons/lu/LuSheet.js +0 -72
- package/dist/icons/lu/LuShield.js +0 -23
- package/dist/icons/lu/LuSun.js +0 -69
- package/dist/icons/lu/LuTextCursorInput.js +0 -45
- package/dist/icons/lu/LuX.js +0 -27
- package/dist/icons/lu/LuZoomIn.js +0 -59
- package/dist/icons/lu/LuZoomOut.js +0 -49
- package/dist/icons/md/MdClear.js +0 -23
- package/dist/icons/md/MdDragHandle.js +0 -23
- package/dist/icons/md/MdInstallDesktop.js +0 -31
- package/dist/icons/md/MdOutlineAttachMoney.js +0 -23
- package/dist/icons/md/MdOutlineMoneyOff.js +0 -23
- package/dist/icons/md/MdPieChart.js +0 -23
- package/dist/icons/md/MdRefresh.js +0 -23
- package/dist/icons/md/MdReplay.js +0 -23
- package/dist/icons/md/MdSmartphone.js +0 -23
- package/dist/icons/pi/PiArrowBendUpRightBold.js +0 -19
- package/dist/icons/pi/PiPlugsConnectedFill.js +0 -19
- package/dist/icons/pi/PiRectangleDashed.js +0 -19
- package/dist/icons/pi/PiShareBold.js +0 -19
- package/dist/icons/si/SiAnthropic.js +0 -19
- package/dist/icons/si/SiHelm.js +0 -19
- package/dist/icons/si/SiKubernetes.js +0 -19
- package/dist/icons/tb/TbAlertTriangle.js +0 -35
- package/dist/icons/tb/TbAlertTriangleFilled.js +0 -19
- package/dist/icons/tb/TbApi.js +0 -40
- package/dist/icons/tb/TbBrain.js +0 -50
- package/dist/icons/tb/TbBuildingTunnel.js +0 -65
- package/dist/icons/tb/TbEdit.js +0 -35
- package/dist/icons/tb/TbLayoutSidebar.js +0 -27
- package/dist/icons/tb/TbLayoutSidebarLeftCollapse.js +0 -35
- package/dist/icons/tb/TbLayoutSidebarRightCollapse.js +0 -35
- package/dist/icons/tb/TbUser.js +0 -27
- package/dist/icons/tb/TbUserOff.js +0 -35
- package/dist/icons/tb/TbWorldShare.js +0 -55
- package/dist/icons/tb/TbWorldWww.js +0 -65
- package/dist/icons/ti/TiArrowSortedDown.js +0 -20
- package/dist/icons/ti/TiArrowSortedUp.js +0 -20
- package/dist/icons/ti/TiArrowUnsorted.js +0 -20
- package/dist/icons/ti/TiCancel.js +0 -20
- package/dist/icons/vsc/VscChromeMinimize.js +0 -19
- package/dist/icons/vsc/VscJson.js +0 -19
- package/dist/icons/vsc/VscLayoutSidebarLeft.js +0 -19
- package/dist/icons/vsc/VscPass.js +0 -27
- package/dist/icons/vsc/VscSplitHorizontal.js +0 -19
- package/dist/icons/vsc/VscTerminalPowershell.js +0 -19
- package/dist/list/ListPager.d.ts +0 -14
- package/dist/list/ListPager.js +0 -62
- package/dist/list/textEntry.d.ts +0 -2
- package/dist/list/textEntry.js +0 -10
- /package/dist/{ai/ui/codeBreaks.d.ts → components/markdownCodeBreaks.d.ts} +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { panelClassName, panelItemClassName, portalContainer, positionerClassName } from "./floating.js";
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { AddIcon, CheckIcon, ChevronDownIcon, RemoveIcon } from "../icons.js";
|
|
3
|
+
import { panelClassName, panelItemClassName, positionerClassName } from "./floating.js";
|
|
5
4
|
import { Tooltip } from "./Tooltip.js";
|
|
6
5
|
import { useStrings } from "./Provider.js";
|
|
7
6
|
import { useQueryMatch } from "./search.js";
|
|
8
7
|
import { isComboboxGroup } from "./comboboxItems.js";
|
|
9
|
-
import {
|
|
8
|
+
import { fieldBox } from "./fieldBox.js";
|
|
10
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
12
11
|
import { Combobox } from "@base-ui/react/combobox";
|
|
@@ -66,16 +65,20 @@ function useEntries(items) {
|
|
|
66
65
|
}
|
|
67
66
|
function useEntryFilter() {
|
|
68
67
|
const match = useQueryMatch();
|
|
69
|
-
return useCallback((entry, query) => match(query, entry.label, typeof entry.value === "string" ? entry.value : void 0, entry.group), [match]);
|
|
68
|
+
return useCallback((entry, query) => entry.created === true || match(query, entry.label, typeof entry.value === "string" ? entry.value : void 0, entry.group), [match]);
|
|
70
69
|
}
|
|
71
70
|
var entryLabel = (entry) => entry?.label ?? "";
|
|
72
|
-
var fieldClassName =
|
|
71
|
+
var fieldClassName = cx(fieldBox({
|
|
72
|
+
within: true,
|
|
73
|
+
multiline: true,
|
|
74
|
+
padded: false
|
|
75
|
+
}), "relative flex items-center gap-1");
|
|
73
76
|
var inputClassName = "h-full min-w-12 flex-1 self-stretch border-0 bg-transparent py-1.5 pl-3 text-inherit outline-none placeholder:text-(--theme-muted-text-color) disabled:cursor-not-allowed";
|
|
74
77
|
var triggerClassName = "flex shrink-0 items-center self-stretch px-2 text-(--theme-muted-text-color) disabled:cursor-not-allowed";
|
|
75
|
-
var popupInputClassName =
|
|
78
|
+
var popupInputClassName = fieldBox({ size: "sm" });
|
|
76
79
|
/** A pick-from-the-list field: one value, or several with `multiple`. Typing filters the list. */
|
|
77
80
|
function Combobox$1(props) {
|
|
78
|
-
const { items, isItemEqualToValue = dequal, itemToStringLabel = String, className, placeholder, disabled, required, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, trigger, triggerTooltip } = props;
|
|
81
|
+
const { items, isItemEqualToValue = dequal, itemToStringLabel = String, className, placeholder, disabled, required, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, trigger, triggerTooltip } = props;
|
|
79
82
|
const entries = useEntries(items);
|
|
80
83
|
const filter = useEntryFilter();
|
|
81
84
|
const strings = useStrings();
|
|
@@ -89,25 +92,46 @@ function Combobox$1(props) {
|
|
|
89
92
|
const toEntries = (values) => values?.map(entryOf);
|
|
90
93
|
const toSingle = (value) => value === void 0 ? void 0 : value === null ? null : entryOf(value);
|
|
91
94
|
const selected = props.multiple ? void 0 : toSingle(props.value);
|
|
95
|
+
const [uncontrolledCount, setUncontrolledCount] = useState(props.multiple ? props.defaultValue?.length ?? 0 : 0);
|
|
96
|
+
const chosen = props.multiple ? props.value ?? null : null;
|
|
97
|
+
const full = props.multiple && props.maxItems !== void 0 && (chosen?.length ?? uncontrolledCount) >= props.maxItems;
|
|
98
|
+
const isChosen = (entry) => chosen?.some((value) => isItemEqualToValue(entry.value, value)) ?? false;
|
|
99
|
+
const typed = inputValue?.trim() ?? "";
|
|
100
|
+
const lowered = typed.toLocaleLowerCase();
|
|
101
|
+
const sameText = (value, label) => label?.toLocaleLowerCase() === lowered || typeof value === "string" && value.toLocaleLowerCase() === lowered;
|
|
102
|
+
const created = props.multiple && props.creatable && typed !== "" && !full && !entries.flat.some((entry) => sameText(entry.value, entry.label)) && !chosen?.some((value) => sameText(value)) ? {
|
|
103
|
+
value: typed,
|
|
104
|
+
label: t.add(typed),
|
|
105
|
+
icon: /* @__PURE__ */ jsx(AddIcon, {}),
|
|
106
|
+
created: true
|
|
107
|
+
} : void 0;
|
|
108
|
+
const [first] = entries.items;
|
|
109
|
+
const listItems = !created ? entries.items : first !== void 0 && "items" in first ? [{
|
|
110
|
+
label: "",
|
|
111
|
+
items: [created],
|
|
112
|
+
order: -1
|
|
113
|
+
}, ...entries.items] : [created, ...entries.items];
|
|
92
114
|
const selectedIcon = selected?.icon && (inputValue === null || inputValue === selected.label) ? selected.icon : null;
|
|
93
115
|
const input = /* @__PURE__ */ jsx(Combobox.Input, {
|
|
94
116
|
id: trigger ? void 0 : id,
|
|
95
|
-
placeholder,
|
|
117
|
+
placeholder: full && props.maxItems !== void 0 ? t.limitReached(props.maxItems) : placeholder,
|
|
118
|
+
maxLength: props.multiple ? props.maxLength : void 0,
|
|
96
119
|
"aria-label": ariaLabel || void 0,
|
|
97
120
|
"aria-labelledby": ariaLabelledBy,
|
|
98
121
|
"aria-describedby": ariaDescribedBy,
|
|
99
122
|
"aria-invalid": ariaInvalid || void 0,
|
|
123
|
+
"aria-required": ariaRequired || required || void 0,
|
|
100
124
|
autoComplete: "off",
|
|
101
125
|
className: trigger ? popupInputClassName : inputClassName
|
|
102
126
|
});
|
|
103
127
|
const itemRow = (entry, rowProps) => /* @__PURE__ */ jsxs(Combobox.Item, {
|
|
104
128
|
value: entry,
|
|
105
|
-
disabled: entry.disabled,
|
|
129
|
+
disabled: entry.disabled || full && !isChosen(entry),
|
|
106
130
|
...rowProps.props,
|
|
107
131
|
className: itemClassName,
|
|
108
132
|
children: [/* @__PURE__ */ jsx(ItemContent, { entry }), /* @__PURE__ */ jsx(Combobox.ItemIndicator, {
|
|
109
133
|
className: "ml-auto flex shrink-0 items-center",
|
|
110
|
-
children: /* @__PURE__ */ jsx(
|
|
134
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
111
135
|
})]
|
|
112
136
|
}, rowProps.key);
|
|
113
137
|
const parts = trigger ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Tooltip, {
|
|
@@ -118,6 +142,7 @@ function Combobox$1(props) {
|
|
|
118
142
|
"aria-labelledby": ariaLabelledBy,
|
|
119
143
|
"aria-describedby": ariaDescribedBy,
|
|
120
144
|
"aria-invalid": ariaInvalid || void 0,
|
|
145
|
+
"aria-required": ariaRequired || required || void 0,
|
|
121
146
|
render: trigger
|
|
122
147
|
})
|
|
123
148
|
}), /* @__PURE__ */ jsx(ListPopup, {
|
|
@@ -133,7 +158,7 @@ function Combobox$1(props) {
|
|
|
133
158
|
renderItem: itemRow
|
|
134
159
|
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Combobox.InputGroup, {
|
|
135
160
|
"data-testid": "combobox",
|
|
136
|
-
className:
|
|
161
|
+
className: cx(fieldClassName, className),
|
|
137
162
|
children: [props.multiple ? /* @__PURE__ */ jsxs(Combobox.Chips, {
|
|
138
163
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-1 py-1 pl-1",
|
|
139
164
|
children: [/* @__PURE__ */ jsx(Combobox.Value, { children: (values) => values.map((entry) => /* @__PURE__ */ jsxs(Combobox.Chip, {
|
|
@@ -142,7 +167,7 @@ function Combobox$1(props) {
|
|
|
142
167
|
children: [entry.label, /* @__PURE__ */ jsx(Combobox.ChipRemove, {
|
|
143
168
|
"aria-label": `${strings.common.remove} ${entry.label}`,
|
|
144
169
|
className: "flex size-4 items-center justify-center rounded hover:bg-(--theme-hover)",
|
|
145
|
-
children: /* @__PURE__ */ jsx(
|
|
170
|
+
children: /* @__PURE__ */ jsx(RemoveIcon, { className: "size-3" })
|
|
146
171
|
})]
|
|
147
172
|
}, entry.label)) }), input]
|
|
148
173
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [selectedIcon && /* @__PURE__ */ jsx("span", {
|
|
@@ -152,7 +177,7 @@ function Combobox$1(props) {
|
|
|
152
177
|
"aria-label": t.showOptions,
|
|
153
178
|
"data-testid": "combobox-button",
|
|
154
179
|
className: triggerClassName,
|
|
155
|
-
children: /* @__PURE__ */ jsx(
|
|
180
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3" })
|
|
156
181
|
})]
|
|
157
182
|
}), /* @__PURE__ */ jsx(ListPopup, {
|
|
158
183
|
listRef: list,
|
|
@@ -162,7 +187,7 @@ function Combobox$1(props) {
|
|
|
162
187
|
renderItem: itemRow
|
|
163
188
|
})] });
|
|
164
189
|
const root = {
|
|
165
|
-
items:
|
|
190
|
+
items: listItems,
|
|
166
191
|
filter,
|
|
167
192
|
isItemEqualToValue: (a, b) => isItemEqualToValue(a.value, b.value),
|
|
168
193
|
itemToStringLabel: entryLabel,
|
|
@@ -171,6 +196,7 @@ function Combobox$1(props) {
|
|
|
171
196
|
disabled,
|
|
172
197
|
required,
|
|
173
198
|
virtualized: true,
|
|
199
|
+
autoHighlight: Boolean(props.multiple && props.creatable),
|
|
174
200
|
children: parts
|
|
175
201
|
};
|
|
176
202
|
return props.multiple ? /* @__PURE__ */ jsx(Combobox.Root, {
|
|
@@ -178,7 +204,10 @@ function Combobox$1(props) {
|
|
|
178
204
|
multiple: true,
|
|
179
205
|
value: toEntries(props.value),
|
|
180
206
|
defaultValue: toEntries(props.defaultValue),
|
|
181
|
-
onValueChange: (next) =>
|
|
207
|
+
onValueChange: (next) => {
|
|
208
|
+
setUncontrolledCount(next.length);
|
|
209
|
+
props.onValueChange?.(next.map((entry) => entry.value));
|
|
210
|
+
}
|
|
182
211
|
}) : /* @__PURE__ */ jsx(Combobox.Root, {
|
|
183
212
|
...root,
|
|
184
213
|
value: selected,
|
|
@@ -187,7 +216,7 @@ function Combobox$1(props) {
|
|
|
187
216
|
});
|
|
188
217
|
}
|
|
189
218
|
/** A free-text field that suggests values as you type. */
|
|
190
|
-
function Autocomplete$1({ items, value, defaultValue, onValueChange, className, placeholder, disabled, required, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid }) {
|
|
219
|
+
function Autocomplete$1({ items, value, defaultValue, onValueChange, className, placeholder, disabled, required, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired }) {
|
|
191
220
|
const entries = useEntries(items);
|
|
192
221
|
const filter = useEntryFilter();
|
|
193
222
|
const t = useStrings().dropdown;
|
|
@@ -205,7 +234,7 @@ function Autocomplete$1({ items, value, defaultValue, onValueChange, className,
|
|
|
205
234
|
virtualized: true,
|
|
206
235
|
children: [/* @__PURE__ */ jsxs(Autocomplete.InputGroup, {
|
|
207
236
|
"data-testid": "combobox",
|
|
208
|
-
className:
|
|
237
|
+
className: cx(fieldClassName, className),
|
|
209
238
|
children: [/* @__PURE__ */ jsx(Autocomplete.Input, {
|
|
210
239
|
id,
|
|
211
240
|
placeholder,
|
|
@@ -213,13 +242,14 @@ function Autocomplete$1({ items, value, defaultValue, onValueChange, className,
|
|
|
213
242
|
"aria-labelledby": ariaLabelledBy,
|
|
214
243
|
"aria-describedby": ariaDescribedBy,
|
|
215
244
|
"aria-invalid": ariaInvalid || void 0,
|
|
245
|
+
"aria-required": ariaRequired || required || void 0,
|
|
216
246
|
autoComplete: "off",
|
|
217
247
|
className: inputClassName
|
|
218
248
|
}), entries.flat.length > 0 && /* @__PURE__ */ jsx(Autocomplete.Trigger, {
|
|
219
249
|
"aria-label": t.showOptions,
|
|
220
250
|
"data-testid": "combobox-button",
|
|
221
251
|
className: triggerClassName,
|
|
222
|
-
children: /* @__PURE__ */ jsx(
|
|
252
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3" })
|
|
223
253
|
})]
|
|
224
254
|
}), /* @__PURE__ */ jsx(ListPopup, {
|
|
225
255
|
listRef: list,
|
|
@@ -233,7 +263,7 @@ function Autocomplete$1({ items, value, defaultValue, onValueChange, className,
|
|
|
233
263
|
})]
|
|
234
264
|
});
|
|
235
265
|
}
|
|
236
|
-
var itemClassName =
|
|
266
|
+
var itemClassName = cx(panelItemClassName, "data-selected:font-medium");
|
|
237
267
|
function ItemContent({ entry }) {
|
|
238
268
|
return /* @__PURE__ */ jsxs(Fragment, { children: [entry.icon && /* @__PURE__ */ jsx("span", {
|
|
239
269
|
className: "flex shrink-0 items-center",
|
|
@@ -275,30 +305,27 @@ function GroupHeading({ group }) {
|
|
|
275
305
|
}
|
|
276
306
|
/** Portal, positioner and popup shared by Combobox and Autocomplete; both use the same parts. */
|
|
277
307
|
function ListPopup({ listRef, empty, statusGroups = [], query = "", header, className = "w-(--anchor-width) max-w-(--available-width)", renderItem }) {
|
|
278
|
-
return /* @__PURE__ */ jsx(Combobox.Portal, {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
className:
|
|
284
|
-
children:
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
empty
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}) })
|
|
298
|
-
]
|
|
299
|
-
})
|
|
308
|
+
return /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
309
|
+
align: "start",
|
|
310
|
+
sideOffset: 4,
|
|
311
|
+
className: positionerClassName,
|
|
312
|
+
children: /* @__PURE__ */ jsxs(Combobox.Popup, {
|
|
313
|
+
className: cx("overflow-hidden", className, panelClassName),
|
|
314
|
+
children: [
|
|
315
|
+
header,
|
|
316
|
+
empty && statusGroups.length === 0 && /* @__PURE__ */ jsx(Combobox.Empty, {
|
|
317
|
+
className: "px-3 py-2 text-(--theme-muted-text-color) empty:hidden",
|
|
318
|
+
children: empty
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ jsx(Combobox.List, { children: /* @__PURE__ */ jsx(VirtualList, {
|
|
321
|
+
ref: listRef,
|
|
322
|
+
statusGroups,
|
|
323
|
+
query,
|
|
324
|
+
renderItem
|
|
325
|
+
}) })
|
|
326
|
+
]
|
|
300
327
|
})
|
|
301
|
-
});
|
|
328
|
+
}) });
|
|
302
329
|
}
|
|
303
330
|
function toRows(filtered, statusGroups) {
|
|
304
331
|
const nodes = statusGroups.length ? [...filtered, ...statusGroups].sort((a, b) => ("order" in a ? a.order : 0) - ("order" in b ? b.order : 0)) : filtered;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { useStrings } from "./Provider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from "./Button.js";
|
|
3
3
|
import { Modal, ModalDescription, ModalTitle } from "./Modal.js";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
7
6
|
//#region src/components/ConfirmModal.tsx
|
|
8
7
|
function ConfirmModal({ open, onClose, title, description, children, confirmLabel, onConfirm, confirmDisabled = false, destructive = false, align = "top", cancelLabel, closeOnConfirm = true }) {
|
|
9
|
-
const
|
|
8
|
+
const { common } = useStrings();
|
|
10
9
|
const [pending, setPending] = useState(false);
|
|
11
10
|
const firedRef = useRef(false);
|
|
12
11
|
useEffect(() => {
|
|
@@ -54,17 +53,18 @@ function ConfirmModal({ open, onClose, title, description, children, confirmLabe
|
|
|
54
53
|
]
|
|
55
54
|
}), /* @__PURE__ */ jsxs("div", {
|
|
56
55
|
className: "mt-5 flex items-center justify-end gap-2 border-t border-(--theme-border) px-5 py-3",
|
|
57
|
-
children: [/* @__PURE__ */ jsx(
|
|
58
|
-
|
|
56
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
57
|
+
variant: "ghost",
|
|
58
|
+
size: "sm",
|
|
59
59
|
onClick: onClose,
|
|
60
60
|
disabled: pending,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
children: cancelLabel ?? common.cancel
|
|
62
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
63
|
+
variant: destructive ? "danger" : "primary",
|
|
64
|
+
size: "sm",
|
|
65
65
|
onClick: runConfirm,
|
|
66
|
-
disabled: confirmDisabled
|
|
67
|
-
|
|
66
|
+
disabled: confirmDisabled,
|
|
67
|
+
loading: pending,
|
|
68
68
|
children: confirmLabel
|
|
69
69
|
})]
|
|
70
70
|
})]
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
+
import { type FloatingAnchor } from './floating.js';
|
|
1
2
|
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
3
|
export interface OpenMenuOptions {
|
|
10
4
|
search?: MenuSearch | undefined;
|
|
11
5
|
/** Called once the menu closes, or another menu replaces it. */
|
|
12
6
|
onClose?: (() => void) | undefined;
|
|
13
7
|
}
|
|
14
|
-
export type OpenMenu = (at:
|
|
8
|
+
export type OpenMenu = (at: FloatingAnchor, items: MenuEntry[], options?: OpenMenuOptions) => void;
|
|
15
9
|
/**
|
|
16
10
|
* One menu that any number of rows, buttons or a canvas open with their own
|
|
17
11
|
* items, so a long list holds a single menu rather than one per row. Render
|
|
@@ -1,37 +1,10 @@
|
|
|
1
|
+
import { toPositionerAnchor } from "./floating.js";
|
|
1
2
|
import { MenuPopup } from "./Menu.js";
|
|
2
3
|
import { MenuEntries, MenuFilter } from "./MenuEntries.js";
|
|
3
4
|
import { Menu } from "@base-ui/react/menu";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { useCallback, useRef, useState } from "react";
|
|
6
7
|
//#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
8
|
/**
|
|
36
9
|
* One menu that any number of rows, buttons or a canvas open with their own
|
|
37
10
|
* items, so a long list holds a single menu rather than one per row. Render
|
|
@@ -51,7 +24,7 @@ function useContextMenu() {
|
|
|
51
24
|
release();
|
|
52
25
|
const next = {
|
|
53
26
|
...options,
|
|
54
|
-
anchor:
|
|
27
|
+
anchor: toPositionerAnchor(at),
|
|
55
28
|
items
|
|
56
29
|
};
|
|
57
30
|
owner.current = next;
|
|
@@ -1,29 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { FiCopy } from "../icons/fi/FiCopy.js";
|
|
5
|
-
import { HiOutlineClipboardCopy } from "../icons/hi/HiOutlineClipboardCopy.js";
|
|
6
|
-
import { useNotify, useStrings } from "./Provider.js";
|
|
1
|
+
import { CheckIcon, CopyIcon, EyeIcon, EyeOffIcon } from "../icons.js";
|
|
2
|
+
import { useStrings } from "./Provider.js";
|
|
3
|
+
import { useCopy } from "./useCopy.js";
|
|
7
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { useState } from "react";
|
|
9
5
|
//#region src/components/CopyToClipboard.tsx
|
|
10
6
|
function CopyToClipboard({ as = "div", text, className, children, showIcon = true }) {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const handleCopy =
|
|
14
|
-
try {
|
|
15
|
-
await navigator.clipboard.writeText(text);
|
|
16
|
-
notify.info("Copied to clipboard");
|
|
17
|
-
} catch {
|
|
18
|
-
notify.error("Failed to copy to clipboard");
|
|
19
|
-
}
|
|
20
|
-
};
|
|
7
|
+
const { common } = useStrings();
|
|
8
|
+
const { copy } = useCopy();
|
|
9
|
+
const handleCopy = () => void copy(text);
|
|
21
10
|
return /* @__PURE__ */ jsxs(as, {
|
|
22
11
|
className,
|
|
23
12
|
onClick: handleCopy,
|
|
24
13
|
...as === "button" ? { type: "button" } : {
|
|
25
14
|
role: "button",
|
|
26
|
-
"aria-label":
|
|
15
|
+
"aria-label": common.copy,
|
|
27
16
|
tabIndex: 0,
|
|
28
17
|
onKeyDown: (e) => {
|
|
29
18
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -32,22 +21,14 @@ function CopyToClipboard({ as = "div", text, className, children, showIcon = tru
|
|
|
32
21
|
}
|
|
33
22
|
}
|
|
34
23
|
},
|
|
35
|
-
children: [showIcon && /* @__PURE__ */ jsx(
|
|
24
|
+
children: [showIcon && /* @__PURE__ */ jsx(CopyIcon, {}), children]
|
|
36
25
|
});
|
|
37
26
|
}
|
|
38
27
|
function CopyCodeBlock({ textToCopy, children, secret = false, isRevealed = false, onRevealToggle }) {
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const handleCopy =
|
|
42
|
-
if (copied)
|
|
43
|
-
try {
|
|
44
|
-
await navigator.clipboard.writeText(textToCopy);
|
|
45
|
-
setCopied(true);
|
|
46
|
-
notify.info("Copied to clipboard");
|
|
47
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
48
|
-
} catch {
|
|
49
|
-
notify.error("Failed to copy to clipboard");
|
|
50
|
-
}
|
|
28
|
+
const { common } = useStrings();
|
|
29
|
+
const { copy, copied } = useCopy();
|
|
30
|
+
const handleCopy = () => {
|
|
31
|
+
if (!copied) copy(textToCopy);
|
|
51
32
|
};
|
|
52
33
|
return /* @__PURE__ */ jsxs("div", {
|
|
53
34
|
className: "group relative",
|
|
@@ -65,9 +46,9 @@ function CopyCodeBlock({ textToCopy, children, secret = false, isRevealed = fals
|
|
|
65
46
|
onRevealToggle?.();
|
|
66
47
|
},
|
|
67
48
|
className: "p-2 rounded-md opacity-0 group-hover:opacity-100 transition-all duration-150",
|
|
68
|
-
"aria-label": isRevealed ?
|
|
69
|
-
title: isRevealed ?
|
|
70
|
-
children: isRevealed ? /* @__PURE__ */ jsx(
|
|
49
|
+
"aria-label": isRevealed ? common.hideValue : common.showValue,
|
|
50
|
+
title: isRevealed ? common.hideValue : common.showValue,
|
|
51
|
+
children: isRevealed ? /* @__PURE__ */ jsx(EyeIcon, {}) : /* @__PURE__ */ jsx(EyeOffIcon, {})
|
|
71
52
|
}), /* @__PURE__ */ jsx("button", {
|
|
72
53
|
type: "button",
|
|
73
54
|
onClick: (e) => {
|
|
@@ -75,8 +56,8 @@ function CopyCodeBlock({ textToCopy, children, secret = false, isRevealed = fals
|
|
|
75
56
|
handleCopy();
|
|
76
57
|
},
|
|
77
58
|
className: "p-2 rounded-md opacity-0 group-hover:opacity-100 transition-all duration-150",
|
|
78
|
-
"aria-label": copied ?
|
|
79
|
-
children: copied ? /* @__PURE__ */ jsx(
|
|
59
|
+
"aria-label": copied ? common.copied : common.copyToClipboard,
|
|
60
|
+
children: copied ? /* @__PURE__ */ jsx(CheckIcon, { className: "text-green-400" }) : /* @__PURE__ */ jsx(CopyIcon, {})
|
|
80
61
|
})]
|
|
81
62
|
})]
|
|
82
63
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
import { type ComboboxItems } from './comboboxItems.js';
|
|
3
3
|
import type { MenuEntry } from './MenuEntries.js';
|
|
4
4
|
interface CreateModalProps {
|
|
@@ -19,7 +19,9 @@ interface CreateModalProps {
|
|
|
19
19
|
/** Normalize the name as the user types (e.g. strip disallowed characters). */
|
|
20
20
|
sanitizeName?: (name: string) => string;
|
|
21
21
|
nameHint?: ((name: string) => ReactNode) | undefined;
|
|
22
|
+
/** The dialog's fields: an `Input`, or a `Field` around any other control. */
|
|
22
23
|
children?: ReactNode;
|
|
24
|
+
/** Compact pills, such as `CreateModalSelect` and `CreateModalSwitch`, in a row under the name. */
|
|
23
25
|
properties?: ReactNode;
|
|
24
26
|
advanced?: ReactNode;
|
|
25
27
|
submitDisabled?: boolean;
|
|
@@ -37,29 +39,6 @@ interface CreateModalProps {
|
|
|
37
39
|
}
|
|
38
40
|
/** Submits on Enter in the name field or ⌘/Ctrl+Enter from anywhere in the panel. */
|
|
39
41
|
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;
|
|
40
|
-
/** Labeled single-line input row for the dialog's extra fields. */
|
|
41
|
-
export declare function CreateModalField({ label, tooltip, id, ...props }: InputHTMLAttributes<HTMLInputElement> & {
|
|
42
|
-
label: string;
|
|
43
|
-
/** Help text surfaced via an info icon next to the label. */
|
|
44
|
-
tooltip?: string | undefined;
|
|
45
|
-
}): import("react").JSX.Element;
|
|
46
|
-
/** Labeled multi-line field for credential blobs (JSON keys, PEM keys). */
|
|
47
|
-
export declare function CreateModalTextarea({ label, tooltip, rows, id, ...props }: TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
48
|
-
label: string;
|
|
49
|
-
/** Help text surfaced via an info icon next to the label. */
|
|
50
|
-
tooltip?: string | undefined;
|
|
51
|
-
}): import("react").JSX.Element;
|
|
52
|
-
/** Labeled input with suggestions; any text is allowed. */
|
|
53
|
-
export declare function CreateModalAutocompleteField({ label, tooltip, value, onValueChange, items, placeholder, }: {
|
|
54
|
-
label: string;
|
|
55
|
-
/** Help text surfaced via an info icon next to the label. */
|
|
56
|
-
tooltip?: string;
|
|
57
|
-
value: string;
|
|
58
|
-
onValueChange: (value: string) => void;
|
|
59
|
-
/** Suggestions, filtered by what's typed. */
|
|
60
|
-
items: string[];
|
|
61
|
-
placeholder?: string;
|
|
62
|
-
}): import("react").JSX.Element;
|
|
63
42
|
/** Compact property pill with an on/off switch. */
|
|
64
43
|
export declare function CreateModalSwitch({ label, checked, onCheckedChange, tooltip, }: {
|
|
65
44
|
label: string;
|