@bitrix24/b24ui-nuxt 2.2.1 → 2.4.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 +5 -4
- package/cli/package.json +1 -1
- package/dist/module.d.mts +2 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -2
- package/dist/runtime/air-design-tokens/013_b24_mobile_light.css +1 -0
- package/dist/runtime/air-design-tokens/014_b24_mobile_dark.css +1 -0
- package/dist/runtime/air-design-tokens/015_b24_mobile_edge-light.css +1 -0
- package/dist/runtime/air-design-tokens/016_b24_mobile_edge-dark.css +1 -0
- package/dist/runtime/air-design-tokens/023_b24_desktop_light.css +1 -0
- package/dist/runtime/air-design-tokens/024_b24_desktop_dark.css +1 -0
- package/dist/runtime/air-design-tokens/025_b24_desktop_edge-light.css +1 -0
- package/dist/runtime/air-design-tokens/026_b24_desktop_edge-dark.css +1 -0
- package/dist/runtime/air-design-tokens/design-tokens/app.json +23812 -0
- package/dist/runtime/air-design-tokens/design-tokens/mobileapp.json +7476 -0
- package/dist/runtime/air-design-tokens/index.css +1 -1
- package/dist/runtime/components/Accordion.d.vue.ts +17 -8
- package/dist/runtime/components/Accordion.vue +16 -13
- package/dist/runtime/components/Accordion.vue.d.ts +17 -8
- package/dist/runtime/components/Advice.d.vue.ts +4 -1
- package/dist/runtime/components/Advice.vue +14 -12
- package/dist/runtime/components/Advice.vue.d.ts +4 -1
- package/dist/runtime/components/Alert.d.vue.ts +6 -3
- package/dist/runtime/components/Alert.vue +12 -10
- package/dist/runtime/components/Alert.vue.d.ts +6 -3
- package/dist/runtime/components/App.d.vue.ts +8 -6
- package/dist/runtime/components/App.vue.d.ts +8 -6
- package/dist/runtime/components/Avatar.d.vue.ts +2 -2
- package/dist/runtime/components/Avatar.vue +7 -5
- package/dist/runtime/components/Avatar.vue.d.ts +2 -2
- package/dist/runtime/components/AvatarGroup.d.vue.ts +1 -1
- package/dist/runtime/components/AvatarGroup.vue +6 -4
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.d.vue.ts +4 -1
- package/dist/runtime/components/Badge.vue +10 -8
- package/dist/runtime/components/Badge.vue.d.ts +4 -1
- package/dist/runtime/components/Banner.d.vue.ts +3 -4
- package/dist/runtime/components/Banner.vue +60 -32
- package/dist/runtime/components/Banner.vue.d.ts +3 -4
- package/dist/runtime/components/Breadcrumb.d.vue.ts +8 -6
- package/dist/runtime/components/Breadcrumb.vue +13 -11
- package/dist/runtime/components/Breadcrumb.vue.d.ts +8 -6
- package/dist/runtime/components/Button.d.vue.ts +4 -1
- package/dist/runtime/components/Button.vue +15 -13
- package/dist/runtime/components/Button.vue.d.ts +4 -1
- package/dist/runtime/components/Calendar.d.vue.ts +14 -6
- package/dist/runtime/components/Calendar.vue +27 -14
- package/dist/runtime/components/Calendar.vue.d.ts +14 -6
- package/dist/runtime/components/Card.d.vue.ts +1 -1
- package/dist/runtime/components/Card.vue +7 -5
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/ChatMessage.d.vue.ts +3 -1
- package/dist/runtime/components/ChatMessage.vue +11 -9
- package/dist/runtime/components/ChatMessage.vue.d.ts +3 -1
- package/dist/runtime/components/ChatMessages.d.vue.ts +6 -1
- package/dist/runtime/components/ChatMessages.vue +16 -11
- package/dist/runtime/components/ChatMessages.vue.d.ts +6 -1
- package/dist/runtime/components/ChatPalette.d.vue.ts +1 -1
- package/dist/runtime/components/ChatPalette.vue +6 -4
- package/dist/runtime/components/ChatPalette.vue.d.ts +1 -1
- package/dist/runtime/components/ChatPrompt.d.vue.ts +9 -4
- package/dist/runtime/components/ChatPrompt.vue +10 -7
- package/dist/runtime/components/ChatPrompt.vue.d.ts +9 -4
- package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +9 -3
- package/dist/runtime/components/ChatPromptSubmit.vue +5 -3
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +9 -3
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -2
- package/dist/runtime/components/Checkbox.vue +19 -12
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -2
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +16 -11
- package/dist/runtime/components/CheckboxGroup.vue +9 -7
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +16 -11
- package/dist/runtime/components/Chip.d.vue.ts +8 -3
- package/dist/runtime/components/Chip.vue +6 -4
- package/dist/runtime/components/Chip.vue.d.ts +8 -3
- package/dist/runtime/components/Collapsible.d.vue.ts +5 -3
- package/dist/runtime/components/Collapsible.vue +5 -3
- package/dist/runtime/components/Collapsible.vue.d.ts +5 -3
- package/dist/runtime/components/ColorPicker.d.vue.ts +7 -3
- package/dist/runtime/components/ColorPicker.vue +10 -8
- package/dist/runtime/components/ColorPicker.vue.d.ts +7 -3
- package/dist/runtime/components/CommandPalette.d.vue.ts +38 -15
- package/dist/runtime/components/CommandPalette.vue +59 -52
- package/dist/runtime/components/CommandPalette.vue.d.ts +38 -15
- package/dist/runtime/components/Container.d.vue.ts +4 -1
- package/dist/runtime/components/Container.vue +5 -2
- package/dist/runtime/components/Container.vue.d.ts +4 -1
- package/dist/runtime/components/ContextMenu.d.vue.ts +10 -6
- package/dist/runtime/components/ContextMenu.vue +5 -3
- package/dist/runtime/components/ContextMenu.vue.d.ts +10 -6
- package/dist/runtime/components/ContextMenuContent.d.vue.ts +14 -6
- package/dist/runtime/components/ContextMenuContent.vue +11 -11
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +14 -6
- package/dist/runtime/components/Countdown.d.vue.ts +12 -3
- package/dist/runtime/components/Countdown.vue +12 -10
- package/dist/runtime/components/Countdown.vue.d.ts +12 -3
- package/dist/runtime/components/DashboardGroup.d.vue.ts +11 -3
- package/dist/runtime/components/DashboardGroup.vue +15 -11
- package/dist/runtime/components/DashboardGroup.vue.d.ts +11 -3
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +59 -0
- package/dist/runtime/components/DashboardNavbar.vue +79 -0
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +59 -0
- package/dist/runtime/components/DashboardPanel.d.vue.ts +31 -0
- package/dist/runtime/components/DashboardPanel.vue +66 -0
- package/dist/runtime/components/DashboardPanel.vue.d.ts +31 -0
- package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +22 -0
- package/dist/runtime/components/DashboardResizeHandle.vue +30 -0
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +22 -0
- package/dist/runtime/components/DashboardSearch.d.vue.ts +13 -4
- package/dist/runtime/components/DashboardSearch.vue +9 -4
- package/dist/runtime/components/DashboardSearch.vue.d.ts +13 -4
- package/dist/runtime/components/DashboardSearchButton.d.vue.ts +6 -1
- package/dist/runtime/components/DashboardSearchButton.vue +11 -7
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +6 -1
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +89 -0
- package/dist/runtime/components/DashboardSidebar.vue +169 -0
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +89 -0
- package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +21 -0
- package/dist/runtime/components/DashboardSidebarCollapse.vue +64 -0
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +21 -0
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +21 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +65 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +21 -0
- package/dist/runtime/components/DashboardToolbar.d.vue.ts +26 -0
- package/dist/runtime/components/DashboardToolbar.vue +34 -0
- package/dist/runtime/components/DashboardToolbar.vue.d.ts +26 -0
- package/dist/runtime/components/DescriptionList.d.vue.ts +8 -6
- package/dist/runtime/components/DescriptionList.vue +16 -14
- package/dist/runtime/components/DescriptionList.vue.d.ts +8 -6
- package/dist/runtime/components/Drawer.d.vue.ts +100 -0
- package/dist/runtime/components/Drawer.vue +133 -0
- package/dist/runtime/components/Drawer.vue.d.ts +100 -0
- package/dist/runtime/components/DropdownMenu.d.vue.ts +10 -6
- package/dist/runtime/components/DropdownMenu.vue +7 -10
- package/dist/runtime/components/DropdownMenu.vue.d.ts +10 -6
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +14 -6
- package/dist/runtime/components/DropdownMenuContent.vue +14 -12
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +14 -6
- package/dist/runtime/components/Editor.d.vue.ts +30 -15
- package/dist/runtime/components/Editor.vue +46 -20
- package/dist/runtime/components/Editor.vue.d.ts +30 -15
- package/dist/runtime/components/EditorDragHandle.d.vue.ts +18 -3
- package/dist/runtime/components/EditorDragHandle.vue +17 -8
- package/dist/runtime/components/EditorDragHandle.vue.d.ts +18 -3
- package/dist/runtime/components/EditorEmojiMenu.d.vue.ts +12 -6
- package/dist/runtime/components/EditorEmojiMenu.vue +5 -2
- package/dist/runtime/components/EditorEmojiMenu.vue.d.ts +12 -6
- package/dist/runtime/components/EditorMentionMenu.d.vue.ts +12 -6
- package/dist/runtime/components/EditorMentionMenu.vue +9 -3
- package/dist/runtime/components/EditorMentionMenu.vue.d.ts +12 -6
- package/dist/runtime/components/EditorSuggestionMenu.d.vue.ts +12 -6
- package/dist/runtime/components/EditorSuggestionMenu.vue +5 -2
- package/dist/runtime/components/EditorSuggestionMenu.vue.d.ts +12 -6
- package/dist/runtime/components/EditorToolbar.d.vue.ts +8 -6
- package/dist/runtime/components/EditorToolbar.vue +16 -13
- package/dist/runtime/components/EditorToolbar.vue.d.ts +8 -6
- package/dist/runtime/components/Empty.d.vue.ts +3 -1
- package/dist/runtime/components/Empty.vue +12 -10
- package/dist/runtime/components/Empty.vue.d.ts +3 -1
- package/dist/runtime/components/Error.d.vue.ts +6 -2
- package/dist/runtime/components/Error.vue +9 -7
- package/dist/runtime/components/Error.vue.d.ts +6 -2
- package/dist/runtime/components/FieldGroup.d.vue.ts +7 -2
- package/dist/runtime/components/FieldGroup.vue +4 -2
- package/dist/runtime/components/FieldGroup.vue.d.ts +7 -2
- package/dist/runtime/components/FileUpload.d.vue.ts +13 -8
- package/dist/runtime/components/FileUpload.vue +20 -18
- package/dist/runtime/components/FileUpload.vue.d.ts +13 -8
- package/dist/runtime/components/Footer.d.vue.ts +30 -0
- package/dist/runtime/components/Footer.vue +47 -0
- package/dist/runtime/components/Footer.vue.d.ts +30 -0
- package/dist/runtime/components/FooterColumns.d.vue.ts +69 -0
- package/dist/runtime/components/FooterColumns.vue +83 -0
- package/dist/runtime/components/FooterColumns.vue.d.ts +69 -0
- package/dist/runtime/components/Form.d.vue.ts +14 -6
- package/dist/runtime/components/Form.vue +10 -2
- package/dist/runtime/components/Form.vue.d.ts +14 -6
- package/dist/runtime/components/FormField.d.vue.ts +3 -1
- package/dist/runtime/components/FormField.vue +13 -11
- package/dist/runtime/components/FormField.vue.d.ts +3 -1
- package/dist/runtime/components/Header.d.vue.ts +81 -0
- package/dist/runtime/components/Header.vue +147 -0
- package/dist/runtime/components/Header.vue.d.ts +81 -0
- package/dist/runtime/components/Input.d.vue.ts +63 -15
- package/dist/runtime/components/Input.vue +18 -14
- package/dist/runtime/components/Input.vue.d.ts +63 -15
- package/dist/runtime/components/InputDate.d.vue.ts +16 -6
- package/dist/runtime/components/InputDate.vue +20 -13
- package/dist/runtime/components/InputDate.vue.d.ts +16 -6
- package/dist/runtime/components/InputMenu.d.vue.ts +185 -30
- package/dist/runtime/components/InputMenu.vue +92 -67
- package/dist/runtime/components/InputMenu.vue.d.ts +185 -30
- package/dist/runtime/components/InputNumber.d.vue.ts +26 -19
- package/dist/runtime/components/InputNumber.vue +25 -16
- package/dist/runtime/components/InputNumber.vue.d.ts +26 -19
- package/dist/runtime/components/InputTags.d.vue.ts +19 -7
- package/dist/runtime/components/InputTags.vue +18 -14
- package/dist/runtime/components/InputTags.vue.d.ts +19 -7
- package/dist/runtime/components/InputTime.d.vue.ts +11 -7
- package/dist/runtime/components/InputTime.vue +19 -11
- package/dist/runtime/components/InputTime.vue.d.ts +11 -7
- package/dist/runtime/components/Kbd.d.vue.ts +5 -1
- package/dist/runtime/components/Kbd.vue +5 -2
- package/dist/runtime/components/Kbd.vue.d.ts +5 -1
- package/dist/runtime/components/Link.d.vue.ts +7 -1
- package/dist/runtime/components/Link.vue +7 -7
- package/dist/runtime/components/Link.vue.d.ts +7 -1
- package/dist/runtime/components/LinkBase.d.vue.ts +6 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +6 -3
- package/dist/runtime/components/Main.d.vue.ts +24 -0
- package/dist/runtime/components/Main.vue +26 -0
- package/dist/runtime/components/Main.vue.d.ts +24 -0
- package/dist/runtime/components/Modal.d.vue.ts +17 -8
- package/dist/runtime/components/Modal.vue +19 -26
- package/dist/runtime/components/Modal.vue.d.ts +17 -8
- package/dist/runtime/components/ModalDialogClose.d.vue.ts +1 -1
- package/dist/runtime/components/ModalDialogClose.vue.d.ts +1 -1
- package/dist/runtime/components/Navbar.d.vue.ts +3 -1
- package/dist/runtime/components/Navbar.vue +4 -2
- package/dist/runtime/components/Navbar.vue.d.ts +3 -1
- package/dist/runtime/components/NavbarDivider.d.vue.ts +3 -1
- package/dist/runtime/components/NavbarDivider.vue +4 -2
- package/dist/runtime/components/NavbarDivider.vue.d.ts +3 -1
- package/dist/runtime/components/NavbarSection.d.vue.ts +3 -1
- package/dist/runtime/components/NavbarSection.vue +4 -2
- package/dist/runtime/components/NavbarSection.vue.d.ts +3 -1
- package/dist/runtime/components/NavbarSpacer.d.vue.ts +3 -1
- package/dist/runtime/components/NavbarSpacer.vue +4 -2
- package/dist/runtime/components/NavbarSpacer.vue.d.ts +3 -1
- package/dist/runtime/components/NavigationMenu.d.vue.ts +34 -26
- package/dist/runtime/components/NavigationMenu.vue +122 -61
- package/dist/runtime/components/NavigationMenu.vue.d.ts +34 -26
- package/dist/runtime/components/Page.d.vue.ts +26 -0
- package/dist/runtime/components/Page.vue +39 -0
- package/dist/runtime/components/Page.vue.d.ts +26 -0
- package/dist/runtime/components/PageAside.d.vue.ts +28 -0
- package/dist/runtime/components/PageAside.vue +38 -0
- package/dist/runtime/components/PageAside.vue.d.ts +28 -0
- package/dist/runtime/components/PageBody.d.vue.ts +22 -0
- package/dist/runtime/components/PageBody.vue +26 -0
- package/dist/runtime/components/PageBody.vue.d.ts +22 -0
- package/dist/runtime/components/PageCard.d.vue.ts +3 -1
- package/dist/runtime/components/PageCard.vue +13 -11
- package/dist/runtime/components/PageCard.vue.d.ts +3 -1
- package/dist/runtime/components/PageColumns.d.vue.ts +4 -1
- package/dist/runtime/components/PageColumns.vue +5 -2
- package/dist/runtime/components/PageColumns.vue.d.ts +4 -1
- package/dist/runtime/components/PageFeature.d.vue.ts +47 -0
- package/dist/runtime/components/PageFeature.vue +79 -0
- package/dist/runtime/components/PageFeature.vue.d.ts +47 -0
- package/dist/runtime/components/PageGrid.d.vue.ts +4 -1
- package/dist/runtime/components/PageGrid.vue +5 -2
- package/dist/runtime/components/PageGrid.vue.d.ts +4 -1
- package/dist/runtime/components/PageHeader.d.vue.ts +37 -0
- package/dist/runtime/components/PageHeader.vue +67 -0
- package/dist/runtime/components/PageHeader.vue.d.ts +37 -0
- package/dist/runtime/components/PageLinks.d.vue.ts +8 -6
- package/dist/runtime/components/PageLinks.vue +12 -10
- package/dist/runtime/components/PageLinks.vue.d.ts +8 -6
- package/dist/runtime/components/PageList.d.vue.ts +6 -1
- package/dist/runtime/components/PageList.vue +5 -2
- package/dist/runtime/components/PageList.vue.d.ts +6 -1
- package/dist/runtime/components/PageSection.d.vue.ts +71 -0
- package/dist/runtime/components/PageSection.vue +110 -0
- package/dist/runtime/components/PageSection.vue.d.ts +71 -0
- package/dist/runtime/components/Pagination.d.vue.ts +11 -3
- package/dist/runtime/components/Pagination.vue +11 -9
- package/dist/runtime/components/Pagination.vue.d.ts +11 -3
- package/dist/runtime/components/PinInput.d.vue.ts +15 -6
- package/dist/runtime/components/PinInput.vue +11 -4
- package/dist/runtime/components/PinInput.vue.d.ts +15 -6
- package/dist/runtime/components/Popover.d.vue.ts +11 -6
- package/dist/runtime/components/Popover.vue +8 -3
- package/dist/runtime/components/Popover.vue.d.ts +11 -6
- package/dist/runtime/components/Progress.d.vue.ts +7 -3
- package/dist/runtime/components/Progress.vue +9 -7
- package/dist/runtime/components/Progress.vue.d.ts +7 -3
- package/dist/runtime/components/RadioGroup.d.vue.ts +13 -8
- package/dist/runtime/components/RadioGroup.vue +13 -11
- package/dist/runtime/components/RadioGroup.vue.d.ts +13 -8
- package/dist/runtime/components/Range.d.vue.ts +14 -9
- package/dist/runtime/components/Range.vue +8 -6
- package/dist/runtime/components/Range.vue.d.ts +14 -9
- package/dist/runtime/components/ScrollArea.d.vue.ts +17 -6
- package/dist/runtime/components/ScrollArea.vue +35 -11
- package/dist/runtime/components/ScrollArea.vue.d.ts +17 -6
- package/dist/runtime/components/Select.d.vue.ts +76 -23
- package/dist/runtime/components/Select.vue +40 -38
- package/dist/runtime/components/Select.vue.d.ts +76 -23
- package/dist/runtime/components/SelectMenu.d.vue.ts +146 -35
- package/dist/runtime/components/SelectMenu.vue +98 -68
- package/dist/runtime/components/SelectMenu.vue.d.ts +146 -35
- package/dist/runtime/components/Separator.d.vue.ts +7 -2
- package/dist/runtime/components/Separator.vue +9 -7
- package/dist/runtime/components/Separator.vue.d.ts +7 -2
- package/dist/runtime/components/Sidebar.d.vue.ts +3 -1
- package/dist/runtime/components/Sidebar.vue +4 -2
- package/dist/runtime/components/Sidebar.vue.d.ts +3 -1
- package/dist/runtime/components/SidebarBody.d.vue.ts +4 -4
- package/dist/runtime/components/SidebarBody.vue +4 -2
- package/dist/runtime/components/SidebarBody.vue.d.ts +4 -4
- package/dist/runtime/components/SidebarFooter.d.vue.ts +3 -4
- package/dist/runtime/components/SidebarFooter.vue +4 -2
- package/dist/runtime/components/SidebarFooter.vue.d.ts +3 -4
- package/dist/runtime/components/SidebarHeader.d.vue.ts +3 -4
- package/dist/runtime/components/SidebarHeader.vue +4 -2
- package/dist/runtime/components/SidebarHeader.vue.d.ts +3 -4
- package/dist/runtime/components/SidebarHeading.d.vue.ts +3 -4
- package/dist/runtime/components/SidebarHeading.vue +4 -2
- package/dist/runtime/components/SidebarHeading.vue.d.ts +3 -4
- package/dist/runtime/components/SidebarLayout.d.vue.ts +6 -1
- package/dist/runtime/components/SidebarLayout.vue +22 -20
- package/dist/runtime/components/SidebarLayout.vue.d.ts +6 -1
- package/dist/runtime/components/SidebarSection.d.vue.ts +3 -4
- package/dist/runtime/components/SidebarSection.vue +4 -2
- package/dist/runtime/components/SidebarSection.vue.d.ts +3 -4
- package/dist/runtime/components/SidebarSpacer.d.vue.ts +3 -4
- package/dist/runtime/components/SidebarSpacer.vue +4 -2
- package/dist/runtime/components/SidebarSpacer.vue.d.ts +3 -4
- package/dist/runtime/components/Skeleton.d.vue.ts +5 -3
- package/dist/runtime/components/Skeleton.vue +4 -2
- package/dist/runtime/components/Skeleton.vue.d.ts +5 -3
- package/dist/runtime/components/Slideover.d.vue.ts +13 -3
- package/dist/runtime/components/Slideover.vue +24 -19
- package/dist/runtime/components/Slideover.vue.d.ts +13 -3
- package/dist/runtime/components/Stepper.d.vue.ts +24 -10
- package/dist/runtime/components/Stepper.vue +31 -25
- package/dist/runtime/components/Stepper.vue.d.ts +24 -10
- package/dist/runtime/components/Switch.d.vue.ts +2 -2
- package/dist/runtime/components/Switch.vue +20 -14
- package/dist/runtime/components/Switch.vue.d.ts +2 -2
- package/dist/runtime/components/Table.d.vue.ts +25 -10
- package/dist/runtime/components/Table.vue +26 -24
- package/dist/runtime/components/Table.vue.d.ts +25 -10
- package/dist/runtime/components/TableWrapper.d.vue.ts +6 -3
- package/dist/runtime/components/TableWrapper.vue +4 -2
- package/dist/runtime/components/TableWrapper.vue.d.ts +6 -3
- package/dist/runtime/components/Tabs.d.vue.ts +16 -7
- package/dist/runtime/components/Tabs.vue +23 -17
- package/dist/runtime/components/Tabs.vue.d.ts +16 -7
- package/dist/runtime/components/Textarea.d.vue.ts +63 -15
- package/dist/runtime/components/Textarea.vue +19 -15
- package/dist/runtime/components/Textarea.vue.d.ts +63 -15
- package/dist/runtime/components/Theme.d.vue.ts +17 -0
- package/dist/runtime/components/Theme.vue +17 -0
- package/dist/runtime/components/Theme.vue.d.ts +17 -0
- package/dist/runtime/components/Timeline.d.vue.ts +24 -10
- package/dist/runtime/components/Timeline.vue +35 -24
- package/dist/runtime/components/Timeline.vue.d.ts +24 -10
- package/dist/runtime/components/Toast.d.vue.ts +7 -3
- package/dist/runtime/components/Toast.vue +16 -16
- package/dist/runtime/components/Toast.vue.d.ts +7 -3
- package/dist/runtime/components/Toaster.d.vue.ts +8 -1
- package/dist/runtime/components/Toaster.vue +7 -4
- package/dist/runtime/components/Toaster.vue.d.ts +8 -1
- package/dist/runtime/components/Tooltip.d.vue.ts +6 -3
- package/dist/runtime/components/Tooltip.vue +9 -7
- package/dist/runtime/components/Tooltip.vue.d.ts +6 -3
- package/dist/runtime/components/User.d.vue.ts +3 -1
- package/dist/runtime/components/User.vue +9 -7
- package/dist/runtime/components/User.vue.d.ts +3 -1
- package/dist/runtime/components/color-mode/ColorModeAvatar.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +1 -1
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +3 -1
- package/dist/runtime/components/color-mode/ColorModeButton.vue +5 -3
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +3 -1
- package/dist/runtime/components/color-mode/ColorModeImage.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeImage.vue +8 -3
- package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +3 -1
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +6 -2
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +3 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +17 -9
- package/dist/runtime/components/content/ContentSearch.vue +9 -4
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +17 -9
- package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +6 -1
- package/dist/runtime/components/content/ContentSearchButton.vue +6 -4
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +6 -1
- package/dist/runtime/components/content/ContentSurround.d.vue.ts +8 -6
- package/dist/runtime/components/content/ContentSurround.vue +10 -8
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +8 -6
- package/dist/runtime/components/content/ContentToc.d.vue.ts +11 -6
- package/dist/runtime/components/content/ContentToc.vue +16 -14
- package/dist/runtime/components/content/ContentToc.vue.d.ts +11 -6
- package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +7 -3
- package/dist/runtime/components/locale/LocaleSelect.vue +6 -2
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +7 -3
- package/dist/runtime/components/prose/A.d.vue.ts +1 -1
- package/dist/runtime/components/prose/A.vue +4 -2
- package/dist/runtime/components/prose/A.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Accordion.d.vue.ts +3 -1
- package/dist/runtime/components/prose/Accordion.vue +4 -2
- package/dist/runtime/components/prose/Accordion.vue.d.ts +3 -1
- package/dist/runtime/components/prose/AccordionItem.d.vue.ts +4 -1
- package/dist/runtime/components/prose/AccordionItem.vue +5 -2
- package/dist/runtime/components/prose/AccordionItem.vue.d.ts +4 -1
- package/dist/runtime/components/prose/Badge.d.vue.ts +4 -1
- package/dist/runtime/components/prose/Badge.vue +5 -2
- package/dist/runtime/components/prose/Badge.vue.d.ts +4 -1
- package/dist/runtime/components/prose/Blockquote.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Blockquote.vue +4 -2
- package/dist/runtime/components/prose/Blockquote.vue.d.ts +1 -4
- package/dist/runtime/components/prose/Callout.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Callout.vue +12 -4
- package/dist/runtime/components/prose/Callout.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Card.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Card.vue +8 -6
- package/dist/runtime/components/prose/Card.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CardGroup.d.vue.ts +4 -1
- package/dist/runtime/components/prose/CardGroup.vue +5 -2
- package/dist/runtime/components/prose/CardGroup.vue.d.ts +4 -1
- package/dist/runtime/components/prose/Code.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Code.vue +4 -2
- package/dist/runtime/components/prose/Code.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodeCollapse.d.vue.ts +2 -2
- package/dist/runtime/components/prose/CodeCollapse.vue +7 -5
- package/dist/runtime/components/prose/CodeCollapse.vue.d.ts +2 -2
- package/dist/runtime/components/prose/CodeGroup.d.vue.ts +5 -3
- package/dist/runtime/components/prose/CodeGroup.vue +9 -7
- package/dist/runtime/components/prose/CodeGroup.vue.d.ts +5 -3
- package/dist/runtime/components/prose/CodeIcon.d.vue.ts +1 -1
- package/dist/runtime/components/prose/CodeIcon.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodePreview.d.vue.ts +1 -1
- package/dist/runtime/components/prose/CodePreview.vue +6 -4
- package/dist/runtime/components/prose/CodePreview.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Collapsible.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Collapsible.vue +7 -5
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Em.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Em.vue +4 -2
- package/dist/runtime/components/prose/Em.vue.d.ts +1 -4
- package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Field.vue +10 -8
- package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
- package/dist/runtime/components/prose/FieldGroup.d.vue.ts +4 -1
- package/dist/runtime/components/prose/FieldGroup.vue +5 -2
- package/dist/runtime/components/prose/FieldGroup.vue.d.ts +4 -1
- package/dist/runtime/components/prose/H1.d.vue.ts +3 -1
- package/dist/runtime/components/prose/H1.vue +5 -3
- package/dist/runtime/components/prose/H1.vue.d.ts +3 -1
- package/dist/runtime/components/prose/H2.d.vue.ts +3 -1
- package/dist/runtime/components/prose/H2.vue +7 -5
- package/dist/runtime/components/prose/H2.vue.d.ts +3 -1
- package/dist/runtime/components/prose/H3.d.vue.ts +3 -1
- package/dist/runtime/components/prose/H3.vue +7 -5
- package/dist/runtime/components/prose/H3.vue.d.ts +3 -1
- package/dist/runtime/components/prose/H4.d.vue.ts +3 -1
- package/dist/runtime/components/prose/H4.vue +7 -5
- package/dist/runtime/components/prose/H4.vue.d.ts +3 -1
- package/dist/runtime/components/prose/H5.d.vue.ts +3 -1
- package/dist/runtime/components/prose/H5.vue +4 -2
- package/dist/runtime/components/prose/H5.vue.d.ts +3 -1
- package/dist/runtime/components/prose/H6.d.vue.ts +3 -1
- package/dist/runtime/components/prose/H6.vue +4 -2
- package/dist/runtime/components/prose/H6.vue.d.ts +3 -1
- package/dist/runtime/components/prose/Hr.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Hr.vue +4 -2
- package/dist/runtime/components/prose/Hr.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Img.d.vue.ts +3 -1
- package/dist/runtime/components/prose/Img.vue +10 -9
- package/dist/runtime/components/prose/Img.vue.d.ts +3 -1
- package/dist/runtime/components/prose/Kbd.d.vue.ts +4 -1
- package/dist/runtime/components/prose/Kbd.vue +5 -2
- package/dist/runtime/components/prose/Kbd.vue.d.ts +4 -1
- package/dist/runtime/components/prose/Li.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Li.vue +4 -2
- package/dist/runtime/components/prose/Li.vue.d.ts +1 -4
- package/dist/runtime/components/prose/Ol.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Ol.vue +4 -2
- package/dist/runtime/components/prose/Ol.vue.d.ts +1 -4
- package/dist/runtime/components/prose/P.d.vue.ts +4 -1
- package/dist/runtime/components/prose/P.vue +4 -2
- package/dist/runtime/components/prose/P.vue.d.ts +4 -1
- package/dist/runtime/components/prose/Pre.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Pre.vue +9 -7
- package/dist/runtime/components/prose/Pre.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Steps.d.vue.ts +4 -1
- package/dist/runtime/components/prose/Steps.vue +5 -2
- package/dist/runtime/components/prose/Steps.vue.d.ts +4 -1
- package/dist/runtime/components/prose/Strong.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Strong.vue +4 -2
- package/dist/runtime/components/prose/Strong.vue.d.ts +1 -4
- package/dist/runtime/components/prose/Table.d.vue.ts +7 -1
- package/dist/runtime/components/prose/Table.vue +5 -3
- package/dist/runtime/components/prose/Table.vue.d.ts +7 -1
- package/dist/runtime/components/prose/Tabs.d.vue.ts +5 -3
- package/dist/runtime/components/prose/Tabs.vue +4 -2
- package/dist/runtime/components/prose/Tabs.vue.d.ts +5 -3
- package/dist/runtime/components/prose/TabsItem.d.vue.ts +4 -1
- package/dist/runtime/components/prose/TabsItem.vue +5 -2
- package/dist/runtime/components/prose/TabsItem.vue.d.ts +4 -1
- package/dist/runtime/components/prose/Tbody.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Tbody.vue +4 -2
- package/dist/runtime/components/prose/Tbody.vue.d.ts +1 -4
- package/dist/runtime/components/prose/Td.d.vue.ts +2 -4
- package/dist/runtime/components/prose/Td.vue +8 -3
- package/dist/runtime/components/prose/Td.vue.d.ts +2 -4
- package/dist/runtime/components/prose/Th.d.vue.ts +2 -4
- package/dist/runtime/components/prose/Th.vue +8 -3
- package/dist/runtime/components/prose/Th.vue.d.ts +2 -4
- package/dist/runtime/components/prose/Thead.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Thead.vue +4 -2
- package/dist/runtime/components/prose/Thead.vue.d.ts +1 -4
- package/dist/runtime/components/prose/Tr.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Tr.vue +4 -2
- package/dist/runtime/components/prose/Tr.vue.d.ts +1 -4
- package/dist/runtime/components/prose/Ul.d.vue.ts +1 -4
- package/dist/runtime/components/prose/Ul.vue +4 -2
- package/dist/runtime/components/prose/Ul.vue.d.ts +1 -4
- package/dist/runtime/components/prose/callout/Caution.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Caution.vue.d.ts +2 -2
- package/dist/runtime/components/prose/callout/Note.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Note.vue.d.ts +2 -2
- package/dist/runtime/components/prose/callout/Tip.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Tip.vue.d.ts +2 -2
- package/dist/runtime/components/prose/callout/Warning.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Warning.vue.d.ts +2 -2
- package/dist/runtime/composables/color-mode/useColorMode.d.ts +6 -0
- package/dist/runtime/composables/color-mode/useColorMode.js +15 -6
- package/dist/runtime/composables/defineShortcuts.js +4 -1
- package/dist/runtime/composables/internal/useFilter.d.ts +9 -0
- package/dist/runtime/composables/internal/useFilter.js +60 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useComponentUI.d.ts +33 -0
- package/dist/runtime/composables/useComponentUI.js +13 -0
- package/dist/runtime/composables/useEditorMenu.d.ts +12 -1
- package/dist/runtime/composables/useEditorMenu.js +156 -151
- package/dist/runtime/composables/useFieldGroup.d.ts +1 -1
- package/dist/runtime/composables/useFormField.d.ts +1 -1
- package/dist/runtime/composables/useLoading.d.ts +3 -0
- package/dist/runtime/composables/useOverlay.d.ts +3 -1
- package/dist/runtime/composables/useResizable.d.ts +1 -1
- package/dist/runtime/composables/useResizable.js +1 -1
- package/dist/runtime/composables/useToast.d.ts +4 -0
- package/dist/runtime/composables/useToast.js +25 -1
- package/dist/runtime/dictionary/icons.d.ts +3 -0
- package/dist/runtime/dictionary/icons.js +7 -1
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/keyframes.css +1 -1
- package/dist/runtime/plugins/platform.d.ts +34 -0
- package/dist/runtime/plugins/platform.js +31 -0
- package/dist/runtime/plugins/ui-version.d.ts +1 -1
- package/dist/runtime/types/color-mode.d.ts +1 -1
- package/dist/runtime/types/editor.d.ts +2 -1
- package/dist/runtime/types/html.d.ts +3 -1
- package/dist/runtime/types/index.d.ts +19 -0
- package/dist/runtime/types/index.js +19 -0
- package/dist/runtime/types/input.d.ts +16 -6
- package/dist/runtime/types/utils.d.ts +10 -8
- package/dist/runtime/utils/ai.d.ts +7 -0
- package/dist/runtime/utils/dashboard.d.ts +4 -5
- package/dist/runtime/utils/dashboard.js +1 -1
- package/dist/runtime/utils/editor.d.ts +1 -1
- package/dist/runtime/utils/editor.js +28 -10
- package/dist/runtime/utils/fuse.js +22 -3
- package/dist/runtime/utils/index.d.ts +3 -1
- package/dist/runtime/utils/index.js +13 -3
- package/dist/runtime/utils/overlay.d.ts +19 -0
- package/dist/runtime/utils/overlay.js +13 -0
- package/dist/runtime/utils/virtualizer.d.ts +1 -3
- package/dist/runtime/utils/virtualizer.js +15 -6
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +3 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +6 -2
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +3 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +7 -1
- package/dist/runtime/vue/overrides/inertia/Link.vue +1 -0
- package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +7 -1
- package/dist/runtime/vue/overrides/inertia/LinkBase.d.vue.ts +6 -3
- package/dist/runtime/vue/overrides/inertia/LinkBase.vue.d.ts +6 -3
- package/dist/runtime/vue/overrides/none/Link.d.vue.ts +7 -1
- package/dist/runtime/vue/overrides/none/Link.vue +11 -3
- package/dist/runtime/vue/overrides/none/Link.vue.d.ts +7 -1
- package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +7 -1
- package/dist/runtime/vue/overrides/vue-router/Link.vue +2 -2
- package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +7 -1
- package/dist/runtime/vue/plugins/router.d.ts +4 -0
- package/dist/runtime/vue/plugins/router.js +7 -0
- package/dist/runtime/vue/stubs/base.d.ts +9 -13
- package/dist/runtime/vue/stubs/base.js +11 -33
- package/dist/shared/{b24ui-nuxt.C-CS9MBp.mjs → b24ui-nuxt.DstlkmYO.mjs} +904 -60
- package/dist/unplugin.d.mts +2 -1
- package/dist/unplugin.mjs +6 -3
- package/dist/vite.d.mts +2 -3
- package/dist/vite.mjs +1 -1
- package/package.json +68 -58
- package/dist/meta.d.mts +0 -220263
- package/dist/meta.mjs +0 -220263
|
@@ -26,6 +26,7 @@ import { useEventListener, useElementBounding, watchThrottled, watchPausable } f
|
|
|
26
26
|
import { isClient } from "@vueuse/shared";
|
|
27
27
|
import { ColorTranslator } from "colortranslator";
|
|
28
28
|
import { useAppConfig } from "#imports";
|
|
29
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
29
30
|
import { tv } from "../utils/tv";
|
|
30
31
|
const props = defineProps({
|
|
31
32
|
as: { type: null, required: false },
|
|
@@ -35,10 +36,11 @@ const props = defineProps({
|
|
|
35
36
|
format: { type: String, required: false, default: "hex" },
|
|
36
37
|
size: { type: null, required: false },
|
|
37
38
|
class: { type: null, required: false },
|
|
38
|
-
b24ui: { type:
|
|
39
|
+
b24ui: { type: Object, required: false }
|
|
39
40
|
});
|
|
40
41
|
const modelValue = defineModel({ type: String, ...void 0 });
|
|
41
42
|
const appConfig = useAppConfig();
|
|
43
|
+
const uiProp = useComponentUI("colorPicker", props);
|
|
42
44
|
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.colorPicker || {} })({
|
|
43
45
|
size: props.size
|
|
44
46
|
}));
|
|
@@ -178,19 +180,19 @@ const trackThumbStyle = computed(() => ({
|
|
|
178
180
|
</script>
|
|
179
181
|
|
|
180
182
|
<template>
|
|
181
|
-
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [
|
|
182
|
-
<div data-slot="picker" :class="b24ui.picker({ class:
|
|
183
|
+
<Primitive :as="as" data-slot="root" :class="b24ui.root({ class: [uiProp?.root, props.class] })" :data-disabled="disabled ? true : void 0">
|
|
184
|
+
<div data-slot="picker" :class="b24ui.picker({ class: uiProp?.picker })">
|
|
183
185
|
<div
|
|
184
186
|
ref="selectorRef"
|
|
185
187
|
data-slot="selector"
|
|
186
|
-
:class="b24ui.selector({ class:
|
|
188
|
+
:class="b24ui.selector({ class: uiProp?.selector })"
|
|
187
189
|
:style="selectorStyle"
|
|
188
190
|
>
|
|
189
|
-
<div data-slot="selectorBackground" :class="b24ui.selectorBackground({ class:
|
|
191
|
+
<div data-slot="selectorBackground" :class="b24ui.selectorBackground({ class: uiProp?.selectorBackground })" data-color-picker-background>
|
|
190
192
|
<div
|
|
191
193
|
ref="selectorThumbRef"
|
|
192
194
|
data-slot="selectorThumb"
|
|
193
|
-
:class="b24ui.selectorThumb({ class:
|
|
195
|
+
:class="b24ui.selectorThumb({ class: uiProp?.selectorThumb })"
|
|
194
196
|
:style="selectorThumbStyle"
|
|
195
197
|
:data-disabled="disabled ? true : void 0"
|
|
196
198
|
/>
|
|
@@ -199,13 +201,13 @@ const trackThumbStyle = computed(() => ({
|
|
|
199
201
|
<div
|
|
200
202
|
ref="trackRef"
|
|
201
203
|
data-slot="track"
|
|
202
|
-
:class="b24ui.track({ class:
|
|
204
|
+
:class="b24ui.track({ class: uiProp?.track })"
|
|
203
205
|
data-color-picker-track
|
|
204
206
|
>
|
|
205
207
|
<div
|
|
206
208
|
ref="trackThumbRef"
|
|
207
209
|
data-slot="trackThumb"
|
|
208
|
-
:class="b24ui.trackThumb({ class:
|
|
210
|
+
:class="b24ui.trackThumb({ class: uiProp?.trackThumb })"
|
|
209
211
|
:style="trackThumbStyle"
|
|
210
212
|
:data-disabled="disabled ? true : void 0"
|
|
211
213
|
/>
|
|
@@ -32,6 +32,8 @@ export type ColorPickerProps = {
|
|
|
32
32
|
class?: any;
|
|
33
33
|
b24ui?: ColorPicker['slots'];
|
|
34
34
|
};
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
35
37
|
declare const __VLS_export: import("vue").DefineComponent<ColorPickerProps & {
|
|
36
38
|
modelValue?: string;
|
|
37
39
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -40,6 +42,8 @@ declare const __VLS_export: import("vue").DefineComponent<ColorPickerProps & {
|
|
|
40
42
|
modelValue?: string;
|
|
41
43
|
}> & Readonly<{
|
|
42
44
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
43
|
-
}>, {
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
}>, {
|
|
46
|
+
defaultValue: string;
|
|
47
|
+
throttle: number;
|
|
48
|
+
format: "hex" | "rgb" | "hsl" | "cmyk" | "lab";
|
|
49
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -55,12 +55,16 @@ export interface CommandPaletteGroup<T extends CommandPaletteItem = CommandPalet
|
|
|
55
55
|
/**
|
|
56
56
|
* @memo not use loadingIcon
|
|
57
57
|
*/
|
|
58
|
-
export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandPaletteGroup<any>, T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ListboxRootProps, 'multiple' | 'disabled' | 'modelValue' | 'defaultValue' | 'highlightOnHover' | 'selectionBehavior'>, Pick<UseComponentIconsProps, 'loading'> {
|
|
58
|
+
export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandPaletteGroup<any>, T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ListboxRootProps, 'multiple' | 'disabled' | 'modelValue' | 'defaultValue' | 'highlightOnHover' | 'selectionBehavior' | 'by'>, Pick<UseComponentIconsProps, 'loading'> {
|
|
59
59
|
/**
|
|
60
60
|
* The element or component this component should render as.
|
|
61
61
|
* @defaultValue 'div'
|
|
62
62
|
*/
|
|
63
63
|
as?: any;
|
|
64
|
+
/**
|
|
65
|
+
* @defaultValue 'md'
|
|
66
|
+
*/
|
|
67
|
+
size?: CommandPalette['variants']['size'];
|
|
64
68
|
/**
|
|
65
69
|
* The icon displayed in the input.
|
|
66
70
|
* @defaultValue icons.search
|
|
@@ -120,6 +124,11 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
|
|
|
120
124
|
* @IconComponent
|
|
121
125
|
*/
|
|
122
126
|
backIcon?: IconComponent;
|
|
127
|
+
/**
|
|
128
|
+
* Configure the input or hide it with `false`.
|
|
129
|
+
* @defaultValue true
|
|
130
|
+
*/
|
|
131
|
+
input?: boolean | Omit<InputProps, 'modelValue' | 'defaultValue'>;
|
|
123
132
|
groups?: G[];
|
|
124
133
|
/**
|
|
125
134
|
* Options for [useFuse](https://vueuse.org/integrations/useFuse).
|
|
@@ -146,11 +155,16 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
|
|
|
146
155
|
*/
|
|
147
156
|
overscan?: number;
|
|
148
157
|
/**
|
|
149
|
-
* Estimated size (in px) of each item
|
|
158
|
+
* Estimated size (in px) of each item, or a function that returns the size for a given index
|
|
150
159
|
* @defaultValue 32
|
|
151
160
|
*/
|
|
152
|
-
estimateSize?: number;
|
|
161
|
+
estimateSize?: number | ((index: number) => number);
|
|
153
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* When `items` is an array of objects, select the field to use as the value instead of the object itself.
|
|
165
|
+
* @defaultValue undefined
|
|
166
|
+
*/
|
|
167
|
+
valueKey?: GetItemKeys<T>;
|
|
154
168
|
/**
|
|
155
169
|
* The key used to get the label from the item.
|
|
156
170
|
* @defaultValue 'label'
|
|
@@ -197,27 +211,36 @@ export type CommandPaletteSlots<G extends CommandPaletteGroup<T> = CommandPalett
|
|
|
197
211
|
'item-description': SlotProps<T>;
|
|
198
212
|
'item-trailing': SlotProps<T>;
|
|
199
213
|
} & Record<string, SlotProps<G>> & Record<string, SlotProps<T>>;
|
|
200
|
-
declare const
|
|
201
|
-
|
|
214
|
+
declare const _default: typeof __VLS_export;
|
|
215
|
+
export default _default;
|
|
216
|
+
declare const __VLS_export: <G extends CommandPaletteGroup<T>, T extends CommandPaletteItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
217
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(CommandPaletteProps<G, T> & {
|
|
202
218
|
searchTerm?: string;
|
|
203
|
-
}) &
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
219
|
+
}) & {
|
|
220
|
+
onHighlight?: ((payload: {
|
|
221
|
+
ref: HTMLElement;
|
|
222
|
+
value: T;
|
|
223
|
+
} | undefined) => any) | undefined;
|
|
224
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
225
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
226
|
+
onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
|
|
227
|
+
onLeave?: ((event: Event) => any) | undefined;
|
|
228
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
229
|
+
}> & (typeof globalThis extends {
|
|
207
230
|
__VLS_PROPS_FALLBACK: infer P;
|
|
208
231
|
} ? P : {});
|
|
209
232
|
expose: (exposed: {}) => void;
|
|
210
233
|
attrs: any;
|
|
211
234
|
slots: CommandPaletteSlots<G, T>;
|
|
212
|
-
emit: (((evt: "
|
|
235
|
+
emit: (((evt: "highlight", payload: {
|
|
213
236
|
ref: HTMLElement;
|
|
214
237
|
value: T;
|
|
215
|
-
} | undefined) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "leave", event: Event) => void)) & ((
|
|
238
|
+
} | undefined) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: T) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "leave", event: Event) => void)) & ((event: "update:searchTerm", value: string) => void);
|
|
216
239
|
}>) => import("vue").VNode & {
|
|
217
240
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
218
241
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
242
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
243
|
+
[K in keyof T]: T[K];
|
|
244
|
+
} : {
|
|
222
245
|
[K in keyof T as K]: T[K];
|
|
223
|
-
} & {};
|
|
246
|
+
}) & {};
|
|
@@ -4,11 +4,12 @@ import theme from "#build/b24ui/command-palette";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, ref, useTemplateRef, toRef } from "vue";
|
|
7
|
-
import { ListboxRoot, ListboxFilter, ListboxContent, ListboxGroup, ListboxGroupLabel, ListboxVirtualizer, ListboxItem, ListboxItemIndicator,
|
|
7
|
+
import { ListboxRoot, ListboxFilter, ListboxContent, ListboxGroup, ListboxGroupLabel, ListboxVirtualizer, ListboxItem, ListboxItemIndicator, useForwardPropsEmits } from "reka-ui";
|
|
8
8
|
import { defu } from "defu";
|
|
9
9
|
import { reactivePick, createReusableTemplate, refThrottled } from "@vueuse/core";
|
|
10
10
|
import { useFuse } from "@vueuse/integrations/useFuse";
|
|
11
11
|
import { useAppConfig } from "#imports";
|
|
12
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
12
13
|
import { useLocale } from "../composables/useLocale";
|
|
13
14
|
import { omit, get } from "../utils";
|
|
14
15
|
import { highlight } from "../utils/fuse";
|
|
@@ -26,6 +27,7 @@ import B24Kbd from "./Kbd.vue";
|
|
|
26
27
|
defineOptions({ inheritAttrs: false });
|
|
27
28
|
const props = defineProps({
|
|
28
29
|
as: { type: null, required: false },
|
|
30
|
+
size: { type: null, required: false },
|
|
29
31
|
icon: { type: [Function, Object], required: false },
|
|
30
32
|
trailingIcon: { type: [Function, Object], required: false },
|
|
31
33
|
selectedIcon: { type: [Function, Object], required: false },
|
|
@@ -36,20 +38,23 @@ const props = defineProps({
|
|
|
36
38
|
closeIcon: { type: [Function, Object], required: false },
|
|
37
39
|
back: { type: [Boolean, Object], required: false, default: true },
|
|
38
40
|
backIcon: { type: [Function, Object], required: false },
|
|
41
|
+
input: { type: [Boolean, Object], required: false, default: true },
|
|
39
42
|
groups: { type: Array, required: false },
|
|
40
43
|
fuse: { type: Object, required: false },
|
|
41
44
|
virtualize: { type: [Boolean, Object], required: false, default: false },
|
|
45
|
+
valueKey: { type: null, required: false },
|
|
42
46
|
labelKey: { type: null, required: false, default: "label" },
|
|
43
47
|
descriptionKey: { type: null, required: false, default: "description" },
|
|
44
48
|
preserveGroupOrder: { type: Boolean, required: false, default: false },
|
|
45
49
|
class: { type: null, required: false },
|
|
46
|
-
b24ui: { type:
|
|
50
|
+
b24ui: { type: Object, required: false },
|
|
47
51
|
multiple: { type: Boolean, required: false },
|
|
48
52
|
disabled: { type: Boolean, required: false },
|
|
49
|
-
modelValue: { type: null, required: false
|
|
53
|
+
modelValue: { type: null, required: false },
|
|
50
54
|
defaultValue: { type: null, required: false },
|
|
51
55
|
highlightOnHover: { type: Boolean, required: false, default: true },
|
|
52
56
|
selectionBehavior: { type: String, required: false },
|
|
57
|
+
by: { type: [String, Function], required: false },
|
|
53
58
|
loading: { type: Boolean, required: false }
|
|
54
59
|
});
|
|
55
60
|
const emits = defineEmits(["update:modelValue", "highlight", "entryFocus", "leave", "update:open"]);
|
|
@@ -57,12 +62,12 @@ const slots = defineSlots();
|
|
|
57
62
|
const searchTerm = defineModel("searchTerm", { type: String, ...{ default: "" } });
|
|
58
63
|
const { t } = useLocale();
|
|
59
64
|
const appConfig = useAppConfig();
|
|
60
|
-
const
|
|
61
|
-
const
|
|
65
|
+
const uiProp = useComponentUI("commandPalette", props);
|
|
66
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "disabled", "multiple", "modelValue", "defaultValue", "highlightOnHover", "by"), emits);
|
|
62
67
|
const virtualizerProps = toRef(() => {
|
|
63
68
|
if (!props.virtualize) return false;
|
|
64
69
|
return defu(typeof props.virtualize === "boolean" ? {} : props.virtualize, {
|
|
65
|
-
estimateSize: getEstimateSize(filteredItems.value, "md", props.descriptionKey)
|
|
70
|
+
estimateSize: getEstimateSize(filteredItems.value, "md", props.descriptionKey, !!slots["item-description"])
|
|
66
71
|
});
|
|
67
72
|
});
|
|
68
73
|
const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate({
|
|
@@ -82,6 +87,7 @@ const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate({
|
|
|
82
87
|
}
|
|
83
88
|
});
|
|
84
89
|
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.commandPalette || {} })({
|
|
90
|
+
size: props.size,
|
|
85
91
|
virtualize: !!props.virtualize
|
|
86
92
|
}));
|
|
87
93
|
const fuse = computed(() => defu({}, props.fuse, {
|
|
@@ -210,17 +216,17 @@ function onSelect(e, item) {
|
|
|
210
216
|
|
|
211
217
|
<template>
|
|
212
218
|
<DefineItemTemplate v-slot="{ item, index, group }">
|
|
213
|
-
<
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
<B24Link v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
220
|
+
<ListboxItem
|
|
221
|
+
:value="props.valueKey ? get(item, props.valueKey) : omit(item, ['matches', 'group', 'onSelect', 'labelHtml', 'suffixHtml', 'children'])"
|
|
222
|
+
:disabled="item.disabled"
|
|
223
|
+
as-child
|
|
224
|
+
@select="onSelect($event, item)"
|
|
225
|
+
>
|
|
220
226
|
<B24LinkBase
|
|
221
227
|
v-bind="slotProps"
|
|
222
228
|
data-slot="item"
|
|
223
|
-
:class="b24ui.item({ class: [
|
|
229
|
+
:class="b24ui.item({ class: [uiProp?.item, item.b24ui?.item, item.class], active: active || item.active })"
|
|
224
230
|
>
|
|
225
231
|
<slot
|
|
226
232
|
:name="item.slot || group?.slot || 'item'"
|
|
@@ -238,38 +244,38 @@ function onSelect(e, item) {
|
|
|
238
244
|
:is="icons.loading"
|
|
239
245
|
v-if="item.loading"
|
|
240
246
|
data-slot="itemLeadingIcon"
|
|
241
|
-
:class="b24ui.itemLeadingIcon({ class: [
|
|
247
|
+
:class="b24ui.itemLeadingIcon({ class: [uiProp?.itemLeadingIcon, item.b24ui?.itemLeadingIcon], loading: true })"
|
|
242
248
|
/>
|
|
243
249
|
<Component
|
|
244
250
|
:is="item.icon"
|
|
245
251
|
v-else-if="item.icon"
|
|
246
252
|
data-slot="itemLeadingIcon"
|
|
247
|
-
:class="b24ui.itemLeadingIcon({ class: [
|
|
253
|
+
:class="b24ui.itemLeadingIcon({ class: [uiProp?.itemLeadingIcon, item.b24ui?.itemLeadingIcon], active: active || item.active })"
|
|
248
254
|
/>
|
|
249
255
|
<B24Avatar
|
|
250
256
|
v-else-if="item.avatar"
|
|
251
|
-
:size="item.b24ui?.itemLeadingAvatarSize ||
|
|
257
|
+
:size="item.b24ui?.itemLeadingAvatarSize || uiProp?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()"
|
|
252
258
|
v-bind="item.avatar"
|
|
253
259
|
data-slot="itemLeadingAvatar"
|
|
254
|
-
:class="b24ui.itemLeadingAvatar({ class: [
|
|
260
|
+
:class="b24ui.itemLeadingAvatar({ class: [uiProp?.itemLeadingAvatar, item.b24ui?.itemLeadingAvatar], active: active || item.active })"
|
|
255
261
|
/>
|
|
256
262
|
<B24Chip
|
|
257
263
|
v-else-if="item.chip"
|
|
258
|
-
:size="item.b24ui?.itemLeadingChipSize ||
|
|
264
|
+
:size="item.b24ui?.itemLeadingChipSize || uiProp?.itemLeadingChipSize || b24ui.itemLeadingChipSize()"
|
|
259
265
|
inset
|
|
260
266
|
standalone
|
|
261
267
|
v-bind="item.chip"
|
|
262
268
|
data-slot="itemLeadingChip"
|
|
263
|
-
:class="b24ui.itemLeadingChip({ class: [
|
|
269
|
+
:class="b24ui.itemLeadingChip({ class: [uiProp?.itemLeadingChip, item.b24ui?.itemLeadingChip], active: active || item.active })"
|
|
264
270
|
/>
|
|
265
271
|
</slot>
|
|
266
272
|
|
|
267
273
|
<span
|
|
268
274
|
v-if="item.prefix || (item.labelHtml || get(item, props.labelKey)) || (item.suffixHtml || item.suffix) || !!slots[item.slot ? `${item.slot}-label` : group?.slot ? `${group.slot}-label` : `item-label`] || (get(item, props.descriptionKey) || !!slots[item.slot ? `${item.slot}-description` : group?.slot ? `${group.slot}-description` : `item-description`])"
|
|
269
275
|
data-slot="itemWrapper"
|
|
270
|
-
:class="b24ui.itemWrapper({ class: [
|
|
276
|
+
:class="b24ui.itemWrapper({ class: [uiProp?.itemWrapper, item.b24ui?.itemWrapper] })"
|
|
271
277
|
>
|
|
272
|
-
<span data-slot="itemLabel" :class="b24ui.itemLabel({ class: [
|
|
278
|
+
<span data-slot="itemLabel" :class="b24ui.itemLabel({ class: [uiProp?.itemLabel, item.b24ui?.itemLabel], active: active || item.active })">
|
|
273
279
|
<slot
|
|
274
280
|
:name="item.slot ? `${item.slot}-label` : group?.slot ? `${group.slot}-label` : `item-label`"
|
|
275
281
|
:item="item"
|
|
@@ -279,31 +285,31 @@ function onSelect(e, item) {
|
|
|
279
285
|
<span
|
|
280
286
|
v-if="item.prefix"
|
|
281
287
|
data-slot="itemLabelPrefix"
|
|
282
|
-
:class="b24ui.itemLabelPrefix({ class: [
|
|
288
|
+
:class="b24ui.itemLabelPrefix({ class: [uiProp?.itemLabelPrefix, item.b24ui?.itemLabelPrefix] })"
|
|
283
289
|
>{{ item.prefix }}</span>
|
|
284
290
|
|
|
285
291
|
<span
|
|
286
292
|
v-if="item.labelHtml"
|
|
287
293
|
data-slot="itemLabelBase"
|
|
288
|
-
:class="b24ui.itemLabelBase({ class: [
|
|
294
|
+
:class="b24ui.itemLabelBase({ class: [uiProp?.itemLabelBase, item.b24ui?.itemLabelBase], active: active || item.active })"
|
|
289
295
|
v-html="item.labelHtml || get(item, props.labelKey)"
|
|
290
296
|
/>
|
|
291
297
|
<span
|
|
292
298
|
v-else
|
|
293
299
|
data-slot="itemLabelBase"
|
|
294
|
-
:class="b24ui.itemLabelBase({ class: [
|
|
300
|
+
:class="b24ui.itemLabelBase({ class: [uiProp?.itemLabelBase, item.b24ui?.itemLabelBase], active: active || item.active })"
|
|
295
301
|
>{{ get(item, props.labelKey) }}</span>
|
|
296
302
|
|
|
297
303
|
<span
|
|
298
304
|
v-if="item.suffixHtml"
|
|
299
305
|
data-slot="itemLabelSuffix"
|
|
300
|
-
:class="b24ui.itemLabelSuffix({ class: [
|
|
306
|
+
:class="b24ui.itemLabelSuffix({ class: [uiProp?.itemLabelSuffix, item.b24ui?.itemLabelSuffix], active: active || item.active })"
|
|
301
307
|
v-html="item.suffixHtml || item.suffix"
|
|
302
308
|
/>
|
|
303
309
|
<span
|
|
304
310
|
v-else-if="item.suffix"
|
|
305
311
|
data-slot="itemLabelSuffix"
|
|
306
|
-
:class="b24ui.itemLabelSuffix({ class: [
|
|
312
|
+
:class="b24ui.itemLabelSuffix({ class: [uiProp?.itemLabelSuffix, item.b24ui?.itemLabelSuffix], active: active || item.active })"
|
|
307
313
|
>{{ item.suffix }}</span>
|
|
308
314
|
</slot>
|
|
309
315
|
</span>
|
|
@@ -311,7 +317,7 @@ function onSelect(e, item) {
|
|
|
311
317
|
<span
|
|
312
318
|
v-if="get(item, props.descriptionKey)"
|
|
313
319
|
data-slot="itemDescription"
|
|
314
|
-
:class="b24ui.itemDescription({ class: [
|
|
320
|
+
:class="b24ui.itemDescription({ class: [uiProp?.itemDescription, item.b24ui?.itemDescription] })"
|
|
315
321
|
>
|
|
316
322
|
<slot
|
|
317
323
|
:name="item.slot ? `${item.slot}-description` : group?.slot ? `${group.slot}-description` : `item-description`"
|
|
@@ -324,7 +330,7 @@ function onSelect(e, item) {
|
|
|
324
330
|
</span>
|
|
325
331
|
</span>
|
|
326
332
|
|
|
327
|
-
<span data-slot="itemTrailing" :class="b24ui.itemTrailing({ class: [
|
|
333
|
+
<span data-slot="itemTrailing" :class="b24ui.itemTrailing({ class: [uiProp?.itemTrailing, item.b24ui?.itemTrailing] })">
|
|
328
334
|
<slot
|
|
329
335
|
:name="item.slot ? `${item.slot}-trailing` : group?.slot ? `${group.slot}-trailing` : `item-trailing`"
|
|
330
336
|
:item="item"
|
|
@@ -335,14 +341,14 @@ function onSelect(e, item) {
|
|
|
335
341
|
:is="childrenIcon || icons.chevronRight"
|
|
336
342
|
v-if="item.children && item.children.length > 0"
|
|
337
343
|
data-slot="itemTrailingIcon"
|
|
338
|
-
:class="b24ui.itemTrailingIcon({ class: [
|
|
344
|
+
:class="b24ui.itemTrailingIcon({ class: [uiProp?.itemTrailingIcon, item.b24ui?.itemTrailingIcon] })"
|
|
339
345
|
/>
|
|
340
346
|
|
|
341
|
-
<span v-else-if="item.kbds?.length" data-slot="itemTrailingKbds" :class="b24ui.itemTrailingKbds({ class: [
|
|
347
|
+
<span v-else-if="item.kbds?.length" data-slot="itemTrailingKbds" :class="b24ui.itemTrailingKbds({ class: [uiProp?.itemTrailingKbds, item.b24ui?.itemTrailingKbds] })">
|
|
342
348
|
<B24Kbd
|
|
343
349
|
v-for="(kbd, kbdIndex) in item.kbds"
|
|
344
350
|
:key="kbdIndex"
|
|
345
|
-
:size="item.b24ui?.itemTrailingKbdsSize ||
|
|
351
|
+
:size="item.b24ui?.itemTrailingKbdsSize || uiProp?.itemTrailingKbdsSize || b24ui.itemTrailingKbdsSize()"
|
|
346
352
|
v-bind="typeof kbd === 'string' ? { value: kbd } : kbd"
|
|
347
353
|
/>
|
|
348
354
|
</span>
|
|
@@ -351,7 +357,7 @@ function onSelect(e, item) {
|
|
|
351
357
|
:is="group.highlightedIcon"
|
|
352
358
|
v-else-if="group?.highlightedIcon"
|
|
353
359
|
data-slot="itemTrailingHighlightedIcon"
|
|
354
|
-
:class="b24ui.itemTrailingHighlightedIcon({ class: [
|
|
360
|
+
:class="b24ui.itemTrailingHighlightedIcon({ class: [uiProp?.itemTrailingHighlightedIcon, item.b24ui?.itemTrailingHighlightedIcon] })"
|
|
355
361
|
/>
|
|
356
362
|
</slot>
|
|
357
363
|
|
|
@@ -359,41 +365,42 @@ function onSelect(e, item) {
|
|
|
359
365
|
<Component
|
|
360
366
|
:is="selectedIcon || icons.check"
|
|
361
367
|
data-slot="itemTrailingIcon"
|
|
362
|
-
:class="b24ui.itemTrailingIcon({ class: [
|
|
368
|
+
:class="b24ui.itemTrailingIcon({ class: [uiProp?.itemTrailingIcon, item.b24ui?.itemTrailingIcon] })"
|
|
363
369
|
/>
|
|
364
370
|
</ListboxItemIndicator>
|
|
365
371
|
</span>
|
|
366
372
|
</slot>
|
|
367
373
|
</B24LinkBase>
|
|
368
|
-
</
|
|
369
|
-
</
|
|
374
|
+
</ListboxItem>
|
|
375
|
+
</B24Link>
|
|
370
376
|
</DefineItemTemplate>
|
|
371
377
|
|
|
372
|
-
<ListboxRoot v-bind="{ ...rootProps, ...$attrs }" ref="rootRef" :selection-behavior="selectionBehavior" data-slot="root" :class="b24ui.root({ class: [
|
|
373
|
-
<ListboxFilter v-model="searchTerm" as-child>
|
|
378
|
+
<ListboxRoot v-bind="{ ...rootProps, ...$attrs }" ref="rootRef" :selection-behavior="selectionBehavior" data-slot="root" :class="b24ui.root({ class: [uiProp?.root, props.class] })">
|
|
379
|
+
<ListboxFilter v-if="input" v-model="searchTerm" as-child>
|
|
374
380
|
<B24Input
|
|
375
|
-
:placeholder="placeholder"
|
|
376
381
|
no-border
|
|
377
382
|
no-padding
|
|
383
|
+
:size="size"
|
|
384
|
+
v-bind="typeof props.input === 'object' ? props.input : {}"
|
|
385
|
+
:placeholder="placeholder"
|
|
378
386
|
:autofocus="autofocus"
|
|
379
|
-
|
|
380
|
-
size="xl"
|
|
387
|
+
:loading="loading"
|
|
381
388
|
:trailing-icon="trailingIcon"
|
|
382
389
|
:icon="icon || icons.search"
|
|
383
390
|
data-slot="input"
|
|
384
|
-
:class="b24ui.input({ class:
|
|
391
|
+
:class="b24ui.input({ class: uiProp?.input })"
|
|
385
392
|
@keydown.backspace="onBackspace"
|
|
386
393
|
>
|
|
387
394
|
<template v-if="history?.length && (back || !!slots.back)" #leading>
|
|
388
395
|
<slot name="back" :b24ui="b24ui">
|
|
389
396
|
<B24Button
|
|
390
397
|
:icon="backIcon || icons.arrowLeft"
|
|
391
|
-
size="
|
|
398
|
+
:size="size"
|
|
392
399
|
color="air-selection"
|
|
393
400
|
:aria-label="t('commandPalette.back')"
|
|
394
401
|
v-bind="typeof back === 'object' ? back : {}"
|
|
395
402
|
data-slot="back"
|
|
396
|
-
:class="b24ui.back({ class:
|
|
403
|
+
:class="b24ui.back({ class: uiProp?.back })"
|
|
397
404
|
@click="navigateBack"
|
|
398
405
|
/>
|
|
399
406
|
</slot>
|
|
@@ -404,12 +411,12 @@ function onSelect(e, item) {
|
|
|
404
411
|
<B24Button
|
|
405
412
|
v-if="close"
|
|
406
413
|
:icon="closeIcon || icons.close"
|
|
407
|
-
size="
|
|
414
|
+
:size="size"
|
|
408
415
|
color="air-tertiary-no-accent"
|
|
409
416
|
:aria-label="t('commandPalette.close')"
|
|
410
417
|
v-bind="typeof close === 'object' ? close : {}"
|
|
411
418
|
data-slot="close"
|
|
412
|
-
:class="b24ui.close({ class:
|
|
419
|
+
:class="b24ui.close({ class: uiProp?.close })"
|
|
413
420
|
@click="emits('update:open', false)"
|
|
414
421
|
/>
|
|
415
422
|
</slot>
|
|
@@ -417,8 +424,8 @@ function onSelect(e, item) {
|
|
|
417
424
|
</B24Input>
|
|
418
425
|
</ListboxFilter>
|
|
419
426
|
|
|
420
|
-
<ListboxContent data-slot="content" :class="b24ui.content({ class:
|
|
421
|
-
<div v-if="filteredGroups?.length" role="presentation" data-slot="viewport" :class="b24ui.viewport({ class:
|
|
427
|
+
<ListboxContent data-slot="content" :class="b24ui.content({ class: uiProp?.content })">
|
|
428
|
+
<div v-if="filteredGroups?.length" role="presentation" data-slot="viewport" :class="b24ui.viewport({ class: uiProp?.viewport })">
|
|
422
429
|
<ListboxVirtualizer
|
|
423
430
|
v-if="!!virtualize"
|
|
424
431
|
v-slot="{ option: item, virtualItem }"
|
|
@@ -430,8 +437,8 @@ function onSelect(e, item) {
|
|
|
430
437
|
</ListboxVirtualizer>
|
|
431
438
|
|
|
432
439
|
<template v-else>
|
|
433
|
-
<ListboxGroup v-for="group in filteredGroups" :key="`group-${group.id}`" data-slot="group" :class="b24ui.group({ class:
|
|
434
|
-
<ListboxGroupLabel v-if="get(group, props.labelKey)" data-slot="label" :class="b24ui.label({ class:
|
|
440
|
+
<ListboxGroup v-for="group in filteredGroups" :key="`group-${group.id}`" data-slot="group" :class="b24ui.group({ class: uiProp?.group })">
|
|
441
|
+
<ListboxGroupLabel v-if="get(group, props.labelKey)" data-slot="label" :class="b24ui.label({ class: uiProp?.label })">
|
|
435
442
|
{{ get(group, props.labelKey) }}
|
|
436
443
|
</ListboxGroupLabel>
|
|
437
444
|
|
|
@@ -446,14 +453,14 @@ function onSelect(e, item) {
|
|
|
446
453
|
</template>
|
|
447
454
|
</div>
|
|
448
455
|
|
|
449
|
-
<div v-else data-slot="empty" :class="b24ui.empty({ class:
|
|
456
|
+
<div v-else data-slot="empty" :class="b24ui.empty({ class: uiProp?.empty })">
|
|
450
457
|
<slot name="empty" :search-term="searchTerm">
|
|
451
458
|
{{ searchTerm ? t("commandPalette.noMatch", { searchTerm }) : t("commandPalette.noData") }}
|
|
452
459
|
</slot>
|
|
453
460
|
</div>
|
|
454
461
|
</ListboxContent>
|
|
455
462
|
|
|
456
|
-
<div v-if="!!slots.footer" data-slot="footer" :class="b24ui.footer({ class:
|
|
463
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="b24ui.footer({ class: uiProp?.footer })">
|
|
457
464
|
<slot name="footer" :b24ui="b24ui" />
|
|
458
465
|
</div>
|
|
459
466
|
</ListboxRoot>
|
|
@@ -55,12 +55,16 @@ export interface CommandPaletteGroup<T extends CommandPaletteItem = CommandPalet
|
|
|
55
55
|
/**
|
|
56
56
|
* @memo not use loadingIcon
|
|
57
57
|
*/
|
|
58
|
-
export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandPaletteGroup<any>, T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ListboxRootProps, 'multiple' | 'disabled' | 'modelValue' | 'defaultValue' | 'highlightOnHover' | 'selectionBehavior'>, Pick<UseComponentIconsProps, 'loading'> {
|
|
58
|
+
export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandPaletteGroup<any>, T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ListboxRootProps, 'multiple' | 'disabled' | 'modelValue' | 'defaultValue' | 'highlightOnHover' | 'selectionBehavior' | 'by'>, Pick<UseComponentIconsProps, 'loading'> {
|
|
59
59
|
/**
|
|
60
60
|
* The element or component this component should render as.
|
|
61
61
|
* @defaultValue 'div'
|
|
62
62
|
*/
|
|
63
63
|
as?: any;
|
|
64
|
+
/**
|
|
65
|
+
* @defaultValue 'md'
|
|
66
|
+
*/
|
|
67
|
+
size?: CommandPalette['variants']['size'];
|
|
64
68
|
/**
|
|
65
69
|
* The icon displayed in the input.
|
|
66
70
|
* @defaultValue icons.search
|
|
@@ -120,6 +124,11 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
|
|
|
120
124
|
* @IconComponent
|
|
121
125
|
*/
|
|
122
126
|
backIcon?: IconComponent;
|
|
127
|
+
/**
|
|
128
|
+
* Configure the input or hide it with `false`.
|
|
129
|
+
* @defaultValue true
|
|
130
|
+
*/
|
|
131
|
+
input?: boolean | Omit<InputProps, 'modelValue' | 'defaultValue'>;
|
|
123
132
|
groups?: G[];
|
|
124
133
|
/**
|
|
125
134
|
* Options for [useFuse](https://vueuse.org/integrations/useFuse).
|
|
@@ -146,11 +155,16 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
|
|
|
146
155
|
*/
|
|
147
156
|
overscan?: number;
|
|
148
157
|
/**
|
|
149
|
-
* Estimated size (in px) of each item
|
|
158
|
+
* Estimated size (in px) of each item, or a function that returns the size for a given index
|
|
150
159
|
* @defaultValue 32
|
|
151
160
|
*/
|
|
152
|
-
estimateSize?: number;
|
|
161
|
+
estimateSize?: number | ((index: number) => number);
|
|
153
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* When `items` is an array of objects, select the field to use as the value instead of the object itself.
|
|
165
|
+
* @defaultValue undefined
|
|
166
|
+
*/
|
|
167
|
+
valueKey?: GetItemKeys<T>;
|
|
154
168
|
/**
|
|
155
169
|
* The key used to get the label from the item.
|
|
156
170
|
* @defaultValue 'label'
|
|
@@ -197,27 +211,36 @@ export type CommandPaletteSlots<G extends CommandPaletteGroup<T> = CommandPalett
|
|
|
197
211
|
'item-description': SlotProps<T>;
|
|
198
212
|
'item-trailing': SlotProps<T>;
|
|
199
213
|
} & Record<string, SlotProps<G>> & Record<string, SlotProps<T>>;
|
|
200
|
-
declare const
|
|
201
|
-
|
|
214
|
+
declare const _default: typeof __VLS_export;
|
|
215
|
+
export default _default;
|
|
216
|
+
declare const __VLS_export: <G extends CommandPaletteGroup<T>, T extends CommandPaletteItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
217
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(CommandPaletteProps<G, T> & {
|
|
202
218
|
searchTerm?: string;
|
|
203
|
-
}) &
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
219
|
+
}) & {
|
|
220
|
+
onHighlight?: ((payload: {
|
|
221
|
+
ref: HTMLElement;
|
|
222
|
+
value: T;
|
|
223
|
+
} | undefined) => any) | undefined;
|
|
224
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
225
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
226
|
+
onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
|
|
227
|
+
onLeave?: ((event: Event) => any) | undefined;
|
|
228
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
229
|
+
}> & (typeof globalThis extends {
|
|
207
230
|
__VLS_PROPS_FALLBACK: infer P;
|
|
208
231
|
} ? P : {});
|
|
209
232
|
expose: (exposed: {}) => void;
|
|
210
233
|
attrs: any;
|
|
211
234
|
slots: CommandPaletteSlots<G, T>;
|
|
212
|
-
emit: (((evt: "
|
|
235
|
+
emit: (((evt: "highlight", payload: {
|
|
213
236
|
ref: HTMLElement;
|
|
214
237
|
value: T;
|
|
215
|
-
} | undefined) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "leave", event: Event) => void)) & ((
|
|
238
|
+
} | undefined) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: T) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "leave", event: Event) => void)) & ((event: "update:searchTerm", value: string) => void);
|
|
216
239
|
}>) => import("vue").VNode & {
|
|
217
240
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
218
241
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
242
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
243
|
+
[K in keyof T]: T[K];
|
|
244
|
+
} : {
|
|
222
245
|
[K in keyof T as K]: T[K];
|
|
223
|
-
} & {};
|
|
246
|
+
}) & {};
|
|
@@ -5,13 +5,16 @@ export interface ContainerProps {
|
|
|
5
5
|
*/
|
|
6
6
|
as?: any;
|
|
7
7
|
class?: any;
|
|
8
|
+
b24ui?: {
|
|
9
|
+
base?: any;
|
|
10
|
+
};
|
|
8
11
|
}
|
|
9
12
|
export interface ContainerSlots {
|
|
10
13
|
default(props?: {}): any;
|
|
11
14
|
}
|
|
12
|
-
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ContainerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ContainerSlots>;
|
|
13
15
|
declare const _default: typeof __VLS_export;
|
|
14
16
|
export default _default;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ContainerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ContainerSlots>;
|
|
15
18
|
type __VLS_WithSlots<T, S> = T & {
|
|
16
19
|
new (): {
|
|
17
20
|
$slots: S;
|